Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "pipedream-create-subscription",
name: "Create a Subscription",
description: "Create a Subscription. [See Doc](https://pipedream.com/docs/api/rest/#subscriptions)",
version: "0.1.1",
version: "0.1.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "pipedream-delete-subscription",
name: "Delete a Subscription",
description: "Delete a Subscription. [See Doc](https://pipedream.com/docs/api/rest/#delete-a-subscription)",
version: "0.1.1",
version: "0.1.2",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "pipedream-generate-component-code",
name: "Generate Component Code",
description: "Generate component code using AI.",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
38 changes: 38 additions & 0 deletions components/pipedream/actions/get-app/get-app.mjs
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;
},
};
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;
},
};
23 changes: 17 additions & 6 deletions components/pipedream/actions/get-component/get-component.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "pipedream-get-component",
name: "Get Component",
description: "Get info for a published component. [See docs](https://pipedream.com/docs/api/rest/#get-a-component)",
version: "0.1.1",
version: "0.1.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -28,13 +28,24 @@ export default {
},
},
async run({ $ }) {
const { data } = await this.pipedream.getComponent(this.componentKey, this.globalRegistry);
const {
pipedream,
componentKey,
globalRegistry,
} = this;

if (data) {
$.export("$summary", `Succesfully fetched ${this.componentKey}`);
return data;
const response = await pipedream.getComponent({
$,
key: componentKey,
globalRegistry,
});

if (response.data) {
$.export("$summary", `Successfully fetched component with key \`${componentKey}\``);
return response;
}

console.log(`${this.componentKey} was not found`);
$.export("$summary", `Component \`${componentKey}\` was not found`);
return response;
},
};
72 changes: 72 additions & 0 deletions components/pipedream/actions/list-apps/list-apps.mjs
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;
},
},
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)`);
return response;
},
};
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;
},
};
4 changes: 2 additions & 2 deletions components/pipedream/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/pipedream",
"version": "0.4.2",
"version": "0.5.0",
"description": "Pipedream Pipedream Components",
"main": "pipedream.app.mjs",
"keywords": [
Expand All @@ -10,7 +10,7 @@
"homepage": "https://pipedream.com/apps/pipedream",
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
"dependencies": {
"@pipedream/platform": "^1.4.1",
"@pipedream/platform": "^3.1.0",
"uuidv4": "^6.2.13"
},
"gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535",
Expand Down
Loading
Loading