-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[Components] Pipedream - new components #18909
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 all commits
Commits
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import app from "../../pipedream.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedream-get-app", | ||
| name: "Get App", | ||
| description: "Get details for a specific Pipedream app. [See the documentation](https://pipedream.com/docs/rest-api/api-reference/apps/get-an-app)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| idempotentHint: true, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| appId: { | ||
| propDefinition: [ | ||
| app, | ||
| "appId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { | ||
| app, | ||
| appId, | ||
| } = this; | ||
|
|
||
| const response = await app.getApp({ | ||
| $, | ||
| appId, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved app with ID \`${response.data.id}\``); | ||
| return response; | ||
| }, | ||
| }; | ||
43 changes: 43 additions & 0 deletions
43
...pedream/actions/get-component-from-global-registry/get-component-from-global-registry.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,43 @@ | ||
| import app from "../../pipedream.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedream-get-component-from-global-registry", | ||
| name: "Get Component From Global Registry", | ||
| description: "Get details for a component from the Pipedream global registry. [See the documentation](https://pipedream.com/docs/rest-api/api-reference/components/get-a-component-from-the-global-registry)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| idempotentHint: true, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| key: { | ||
| propDefinition: [ | ||
| app, | ||
| "componentKey", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { | ||
| app, | ||
| key, | ||
| } = this; | ||
|
|
||
| const response = await app.getComponentFromRegistry({ | ||
| $, | ||
| key, | ||
| }); | ||
|
|
||
| if (response.data) { | ||
| $.export("$summary", `Successfully fetched component with key \`${key}\``); | ||
| } else { | ||
| $.export("$summary", `Component \`${key}\` was not found`); | ||
| } | ||
|
|
||
| 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
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,72 @@ | ||
| import app from "../../pipedream.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedream-list-apps", | ||
| name: "List Apps", | ||
| description: "List all available Pipedream apps. [See the documentation](https://pipedream.com/docs/rest-api/api-reference/apps/list-apps)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| idempotentHint: true, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| q: { | ||
| propDefinition: [ | ||
| app, | ||
| "q", | ||
| ], | ||
| }, | ||
| hasComponents: { | ||
| propDefinition: [ | ||
| app, | ||
| "hasComponents", | ||
| ], | ||
| }, | ||
| hasActions: { | ||
| propDefinition: [ | ||
| app, | ||
| "hasActions", | ||
| ], | ||
| }, | ||
| hasTriggers: { | ||
| propDefinition: [ | ||
| app, | ||
| "hasTriggers", | ||
| ], | ||
| }, | ||
| }, | ||
| methods: { | ||
| toNumber(value) { | ||
| return value === "1" || value === 1 || value === "true" || value === true | ||
| ? "1" | ||
| : value; | ||
| }, | ||
jcortes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| async run({ $ }) { | ||
| const { | ||
| app, | ||
| toNumber, | ||
| q, | ||
| hasComponents, | ||
| hasActions, | ||
| hasTriggers, | ||
| } = this; | ||
|
|
||
| const response = await app.listApps({ | ||
| $, | ||
| params: { | ||
| q, | ||
| has_components: toNumber(hasComponents), | ||
| has_actions: toNumber(hasActions), | ||
| has_triggers: toNumber(hasTriggers), | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved ${response.page_info.count} app(s)`); | ||
jcortes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return response; | ||
| }, | ||
| }; | ||
76 changes: 76 additions & 0 deletions
76
...nents/pipedream/actions/search-for-registry-components/search-for-registry-components.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,76 @@ | ||
| import app from "../../pipedream.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedream-search-for-registry-components", | ||
| name: "Search For Registry Components", | ||
| description: "Search for components in the Pipedream global registry using a query string. [See the documentation](https://pipedream.com/docs/rest-api/api-reference/components/search-for-registry-components)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: true, | ||
| idempotentHint: true, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| query: { | ||
| propDefinition: [ | ||
| app, | ||
| "query", | ||
| ], | ||
| }, | ||
| appSlug: { | ||
| label: "App Slug", | ||
| description: "The slug of the app to search for components in", | ||
| optional: true, | ||
| propDefinition: [ | ||
| app, | ||
| "appId", | ||
| () => ({ | ||
| mapper: ({ | ||
| name_slug: value, | ||
| name: label, | ||
| }) => ({ | ||
| value, | ||
| label, | ||
| }), | ||
| }), | ||
| ], | ||
| }, | ||
| similarityThreshold: { | ||
| propDefinition: [ | ||
| app, | ||
| "similarityThreshold", | ||
| ], | ||
| }, | ||
| debug: { | ||
| propDefinition: [ | ||
| app, | ||
| "debug", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { | ||
| app, | ||
| query, | ||
| appSlug, | ||
| similarityThreshold, | ||
| debug, | ||
| } = this; | ||
|
|
||
| const response = await app.searchComponents({ | ||
| $, | ||
| params: { | ||
| query, | ||
| app: appSlug, | ||
| similarity_threshold: similarityThreshold, | ||
| debug, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", "Successfully searched the global registry for components."); | ||
| 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
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.