-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Gong - Get Extensive Data Action #16106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0ea21ee
get-extensive-data
michelle0927 ec0299f
pnpm-lock.yaml
michelle0927 7746e6f
Merge remote-tracking branch 'origin/master' into issue-16062
michelle0927 c847bf5
pnpm-lock.yaml
michelle0927 e0dba5f
bump package version
michelle0927 cea40b0
revert package version
michelle0927 22afa52
Merge remote-tracking branch 'origin/master' into issue-16062
michelle0927 94053c5
updates
michelle0927 c490e46
Merge remote-tracking branch 'origin/master' into issue-16062
michelle0927 c22f0f1
improve error handling
michelle0927 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
90 changes: 90 additions & 0 deletions
90
components/gong/actions/get-extensive-data/get-extensive-data.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,90 @@ | ||
import app from "../../gong.app.mjs"; | ||
import constants from "../../common/constants.mjs"; | ||
|
||
export default { | ||
key: "gong-get-extensive-data", | ||
name: "Get Extensive Data", | ||
description: "Lists detailed call data. [See the documentation](https://us-66463.app.gong.io/settings/api/documentation#post-/v2/calls/extensive)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
app, | ||
fromDateTime: { | ||
propDefinition: [ | ||
app, | ||
"fromDateTime", | ||
], | ||
optional: true, | ||
}, | ||
toDateTime: { | ||
propDefinition: [ | ||
app, | ||
"toDateTime", | ||
], | ||
optional: true, | ||
}, | ||
workspaceId: { | ||
optional: true, | ||
propDefinition: [ | ||
app, | ||
"workspaceId", | ||
], | ||
}, | ||
callIds: { | ||
propDefinition: [ | ||
app, | ||
"callIds", | ||
], | ||
}, | ||
primaryUserIds: { | ||
type: "string[]", | ||
label: "Primary User IDs", | ||
description: "An optional list of user identifiers, if supplied the API will return only the calls hosted by the specified users. The identifiers in this field match the primaryUserId field of the calls.", | ||
propDefinition: [ | ||
app, | ||
"userId", | ||
], | ||
optional: true, | ||
}, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
maxResults: { | ||
type: "integer", | ||
label: "Max Results", | ||
description: "The maximum number or results to return", | ||
default: constants.DEFAULT_MAX, | ||
optional: true, | ||
}, | ||
}, | ||
methods: { | ||
getExtensiveData(args = {}) { | ||
return this.app.post({ | ||
path: "/calls/extensive", | ||
...args, | ||
}); | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const { | ||
app, | ||
getExtensiveData, | ||
maxResults, | ||
...filter | ||
} = this; | ||
|
||
const calls = await app.paginate({ | ||
resourceFn: getExtensiveData, | ||
resourceFnArgs: { | ||
$, | ||
data: { | ||
filter, | ||
}, | ||
}, | ||
resourceName: "calls", | ||
max: maxResults, | ||
}); | ||
|
||
if (calls?.length) { | ||
$.export("$summary", `Successfully retrieved data for ${calls.length} calls`); | ||
} | ||
return calls; | ||
}, | ||
}; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.