Skip to content

Commit f3f62a3

Browse files
authored
Merge branch 'master' into master
2 parents 6193c92 + b1dd5bd commit f3f62a3

File tree

122 files changed

+4225
-1144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+4225
-1144
lines changed

components/attio/attio.app.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
type: "app",
3+
app: "attio",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/attio/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/attio",
3+
"version": "0.0.1",
4+
"description": "Pipedream Attio Components",
5+
"main": "attio.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"attio"
9+
],
10+
"homepage": "https://pipedream.com/apps/attio",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
type: "app",
3+
app: "bitbadges",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/bitbadges/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/bitbadges",
3+
"version": "0.0.1",
4+
"description": "Pipedream BitBadges Components",
5+
"main": "bitbadges.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"bitbadges"
9+
],
10+
"homepage": "https://pipedream.com/apps/bitbadges",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import burstyai from "../../burstyai.app.mjs";
2+
3+
export default {
4+
key: "burstyai-run-workflow",
5+
name: "Run Workflow",
6+
description: "Triggers an AI workflow on BurstyAI. [See the documentation](https://burstyai.readme.io/reference)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
burstyai,
11+
workflow: {
12+
type: "string",
13+
label: "Workflow ID",
14+
description: "The ID of the specific workflow to run. When viewing the workflow in BurstyAI, the ID is the last part of the URL. Example: `65e1cd00141fdc000195cb88`",
15+
},
16+
params: {
17+
type: "object",
18+
label: "Parameters",
19+
description: "Optional parameters for the workflow",
20+
optional: true,
21+
},
22+
waitForCompletion: {
23+
type: "boolean",
24+
label: "Wait For Completion",
25+
description: "Set to `true` to poll the API in 3-second intervals until the workflow is completed",
26+
optional: true,
27+
},
28+
},
29+
async run({ $ }) {
30+
let response = await this.burstyai.triggerWorkflow({
31+
$,
32+
workflow: this.workflow,
33+
data: {
34+
params: this.params || {},
35+
},
36+
});
37+
38+
const jobId = response;
39+
40+
if (this.waitForCompletion) {
41+
const timer = (ms) => new Promise((res) => setTimeout(res, ms));
42+
while (response?.jobStatus !== "END" && response?.jobStatus !== "ERROR") {
43+
response = await this.burstyai.getWorkflowExecutionResult({
44+
$,
45+
jobId,
46+
});
47+
await timer(3000);
48+
}
49+
}
50+
51+
if (response?.status === "END") {
52+
$.export("$summary", `Successfully triggered workflow ${this.workflow}`);
53+
}
54+
55+
return response;
56+
},
57+
};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { axios } from "@pipedream/platform";
2+
3+
export default {
4+
type: "app",
5+
app: "burstyai",
6+
methods: {
7+
_baseUrl() {
8+
return "https://app.burstyai.com/burstyai";
9+
},
10+
_makeRequest(opts = {}) {
11+
const {
12+
$ = this,
13+
path,
14+
...otherOpts
15+
} = opts;
16+
return axios($, {
17+
...otherOpts,
18+
url: `${this._baseUrl()}${path}`,
19+
headers: {
20+
Authorization: `Bearer ${this.$auth.api_key}`,
21+
},
22+
});
23+
},
24+
triggerWorkflow({
25+
workflow, ...args
26+
}) {
27+
return this._makeRequest({
28+
method: "POST",
29+
path: `/aiflows/${workflow}/async_run`,
30+
...args,
31+
});
32+
},
33+
getWorkflowExecutionResult({
34+
jobId, ...args
35+
}) {
36+
return this._makeRequest({
37+
path: `/aiflowjobs/${jobId}/result`,
38+
...args,
39+
});
40+
},
41+
},
42+
};

components/burstyai/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@pipedream/burstyai",
3+
"version": "0.1.0",
4+
"description": "Pipedream BurstyAI Components",
5+
"main": "burstyai.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"burstyai"
9+
],
10+
"homepage": "https://pipedream.com/apps/burstyai",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.0.3"
17+
}
18+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import cliento from "../../cliento.app.mjs";
2+
3+
export default {
4+
key: "cliento-get-ref-data",
5+
name: "Get Reference Data",
6+
description: "Fetch services, resources and mappings for the booking widget. [See the documentation](https://developers.cliento.com/docs/rest-api#fetch-ref-data)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
cliento,
11+
},
12+
async run({ $ }) {
13+
const response = await this.cliento.fetchRefData({
14+
$,
15+
});
16+
$.export("$summary", "Successfully fetched reference data");
17+
return response;
18+
},
19+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import cliento from "../../cliento.app.mjs";
2+
3+
export default {
4+
key: "cliento-get-settings",
5+
name: "Fetch Settings",
6+
description: "Fetch settings and features for the booking widget. [See the documentation](https://developers.cliento.com/docs/rest-api#fetch-settings)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
cliento,
11+
},
12+
async run({ $ }) {
13+
const response = await this.cliento.fetchSettings({
14+
$,
15+
});
16+
$.export("$summary", "Successfully fetched settings");
17+
return response;
18+
},
19+
};
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import cliento from "../../cliento.app.mjs";
2+
3+
export default {
4+
key: "cliento-get-slots",
5+
name: "Get Slots",
6+
description: "Fetch available slots for the given service, resource and dates. [See the documentation](https://developers.cliento.com/docs/rest-api#fetch-slots)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
cliento,
11+
fromDate: {
12+
propDefinition: [
13+
cliento,
14+
"fromDate",
15+
],
16+
},
17+
toDate: {
18+
propDefinition: [
19+
cliento,
20+
"toDate",
21+
],
22+
},
23+
resourceIds: {
24+
propDefinition: [
25+
cliento,
26+
"resourceIds",
27+
],
28+
},
29+
serviceIds: {
30+
propDefinition: [
31+
cliento,
32+
"serviceIds",
33+
],
34+
},
35+
},
36+
async run({ $ }) {
37+
const response = await this.cliento.fetchSlots({
38+
$,
39+
params: {
40+
fromDate: this.fromDate,
41+
toDate: this.toDate,
42+
resIds: this.resourceIds.join(),
43+
srvIds: this.serviceIds.join(),
44+
},
45+
});
46+
if (response?.length) {
47+
$.export("$summary", `Successfully fetched ${response.length} slot${response.length === 1
48+
? ""
49+
: "s"}`);
50+
}
51+
return response;
52+
},
53+
};

0 commit comments

Comments
 (0)