-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Highlevel Oauth - New Components #16462
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Open
michelle0927
wants to merge
4
commits into
master
Choose a base branch
from
issue-16290
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
components/highlevel_oauth/actions/create-record/create-record.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import common from "../../common/base.mjs"; | ||
import { parseObjectEntries } from "../../common/utils.mjs"; | ||
|
||
export default { | ||
...common, | ||
key: "highlevel_oauth-create-record", | ||
name: "Create Record", | ||
description: "Creates a custom object record. [See the documentation](https://highlevel.stoplight.io/docs/integrations/47e05e18c5d41-create-record)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
...common.props, | ||
schemaKey: { | ||
propDefinition: [ | ||
common.props.app, | ||
"schemaKey", | ||
], | ||
}, | ||
ownerId: { | ||
propDefinition: [ | ||
common.props.app, | ||
"userId", | ||
], | ||
label: "Owner ID", | ||
description: "The ID of a user representing the owner of the record. Only supported for custom objects.", | ||
optional: true, | ||
}, | ||
followerIds: { | ||
propDefinition: [ | ||
common.props.app, | ||
"userId", | ||
], | ||
type: "string[]", | ||
label: "Follower IDs", | ||
description: "An array of user IDs representing followers of the record. Only supported for custom objects", | ||
optional: true, | ||
}, | ||
properties: { | ||
propDefinition: [ | ||
common.props.app, | ||
"properties", | ||
], | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.app.createRecord({ | ||
$, | ||
schemaKey: this.schemaKey, | ||
data: { | ||
locationId: this.app.getLocationId(), | ||
owners: [ | ||
this.ownerId, | ||
], | ||
followers: this.followerIds, | ||
properties: parseObjectEntries(this.properties), | ||
}, | ||
}); | ||
$.export("$summary", `Successfully created record with ID: ${response.record.id}`); | ||
return response; | ||
}, | ||
}; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
components/highlevel_oauth/actions/update-note/update-note.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import common from "../../common/base.mjs"; | ||
|
||
export default { | ||
...common, | ||
key: "highlevel_oauth-update-note", | ||
name: "Update Note", | ||
description: "Updates a note associated with a contact. [See the documentation](https://highlevel.stoplight.io/docs/integrations/71814e115658f-update-note)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
...common.props, | ||
contactId: { | ||
propDefinition: [ | ||
common.props.app, | ||
"contactId", | ||
], | ||
description: "The contact that the note is associated with", | ||
}, | ||
noteId: { | ||
propDefinition: [ | ||
common.props.app, | ||
"noteId", | ||
(c) => ({ | ||
contactId: c.contactId, | ||
}), | ||
], | ||
}, | ||
body: { | ||
type: "string", | ||
label: "Body", | ||
description: "The body of the note", | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.app.updateNote({ | ||
$, | ||
contactId: this.contactId, | ||
noteId: this.noteId, | ||
data: { | ||
body: this.body, | ||
}, | ||
}); | ||
$.export("$summary", `Successfully updated note (ID: ${this.noteId})`); | ||
return response; | ||
}, | ||
}; |
71 changes: 71 additions & 0 deletions
71
components/highlevel_oauth/actions/update-record/update-record.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import common from "../../common/base.mjs"; | ||
import { parseObjectEntries } from "../../common/utils.mjs"; | ||
|
||
export default { | ||
...common, | ||
key: "highlevel_oauth-update-record", | ||
name: "Update Record", | ||
description: "Updates a custom object record. [See the documentation](https://highlevel.stoplight.io/docs/integrations/b4c5fdbd3ec85-update-record)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
...common.props, | ||
schemaKey: { | ||
propDefinition: [ | ||
common.props.app, | ||
"schemaKey", | ||
], | ||
}, | ||
recordId: { | ||
propDefinition: [ | ||
common.props.app, | ||
"recordId", | ||
(c) => ({ | ||
schemaKey: c.schemaKey, | ||
}), | ||
], | ||
}, | ||
ownerId: { | ||
propDefinition: [ | ||
common.props.app, | ||
"userId", | ||
], | ||
label: "Owner ID", | ||
description: "The ID of a user representing the owner of the record. Only supported for custom objects.", | ||
optional: true, | ||
}, | ||
followerIds: { | ||
propDefinition: [ | ||
common.props.app, | ||
"userId", | ||
], | ||
type: "string[]", | ||
label: "Follower IDs", | ||
description: "An array of user IDs representing followers of the record. Only supported for custom objects", | ||
optional: true, | ||
}, | ||
properties: { | ||
propDefinition: [ | ||
common.props.app, | ||
"properties", | ||
], | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.app.updateRecord({ | ||
$, | ||
schemaKey: this.schemaKey, | ||
recordId: this.recordId, | ||
data: { | ||
locationId: this.app.getLocationId(), | ||
owners: [ | ||
this.ownerId, | ||
], | ||
followers: this.followerIds, | ||
properties: parseObjectEntries(this.properties), | ||
}, | ||
}); | ||
$.export("$summary", `Successfully updated record with ID: ${response.record.id}`); | ||
return response; | ||
}, | ||
}; | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.