Skip to content

Commit a85e502

Browse files
committed
Merge branch 'master' into google-sheets-fix
2 parents 5af798e + 5937aa2 commit a85e502

File tree

20 files changed

+831
-18
lines changed

20 files changed

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

components/egestor/egestor.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: "egestor",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/egestor/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/egestor",
3+
"version": "0.0.1",
4+
"description": "Pipedream eGestor Components",
5+
"main": "egestor.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"egestor"
9+
],
10+
"homepage": "https://pipedream.com/apps/egestor",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}

components/google_sheets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/google_sheets",
3-
"version": "0.7.13",
3+
"version": "0.8.0",
44
"description": "Pipedream Google_sheets Components",
55
"main": "google_sheets.app.mjs",
66
"keywords": [
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import googleSheets from "../../google_sheets.app.mjs";
2+
import common from "../common/new-row-added.mjs";
3+
import base from "../common/http-based/base.mjs";
4+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
5+
6+
export default {
7+
...common,
8+
key: "google_sheets-new-row-added-polling",
9+
name: "New Row Added",
10+
description: "Emit new event each time a row or rows are added to the bottom of a spreadsheet.",
11+
version: "0.0.1",
12+
dedupe: "unique",
13+
type: "source",
14+
props: {
15+
googleSheets,
16+
db: "$.service.db",
17+
timer: {
18+
type: "$.interface.timer",
19+
static: {
20+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
21+
},
22+
},
23+
watchedDrive: {
24+
propDefinition: [
25+
googleSheets,
26+
"watchedDrive",
27+
],
28+
description: "Defaults to My Drive. To select a [Shared Drive](https://support.google.com/a/users/answer/9310351) instead, select it from this list.",
29+
},
30+
sheetID: {
31+
propDefinition: [
32+
googleSheets,
33+
"sheetID",
34+
(c) => ({
35+
driveId: googleSheets.methods.getDriveId(c.watchedDrive),
36+
}),
37+
],
38+
},
39+
...common.props,
40+
},
41+
methods: {
42+
...base.methods,
43+
...common.methods,
44+
},
45+
async run() {
46+
const spreadsheet = await this.googleSheets.getSpreadsheet(this.sheetID);
47+
return this.processSpreadsheet(spreadsheet);
48+
},
49+
};
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
import app from "../../griptape.app.mjs";
2+
3+
export default {
4+
key: "griptape-create-assistant",
5+
name: "Create Assistant",
6+
description: "Creates a new assistant in Griptape. [See the documentation](https://docs.griptape.ai/stable/griptape-cloud/api/api-reference/#/Assistants/CreateAssistant)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
name: {
12+
propDefinition: [
13+
app,
14+
"name",
15+
],
16+
},
17+
description: {
18+
propDefinition: [
19+
app,
20+
"description",
21+
],
22+
},
23+
input: {
24+
propDefinition: [
25+
app,
26+
"input",
27+
],
28+
},
29+
knowledgeBaseIds: {
30+
type: "string[]",
31+
label: "Knowledge Base IDs",
32+
description: "The knowledge base IDs of the assistant",
33+
optional: true,
34+
propDefinition: [
35+
app,
36+
"knowledgeBaseId",
37+
],
38+
},
39+
rulesetIds: {
40+
type: "string[]",
41+
label: "Ruleset IDs",
42+
description: "The ruleset IDs of the assistant",
43+
optional: true,
44+
propDefinition: [
45+
app,
46+
"rulesetId",
47+
],
48+
},
49+
structureIds: {
50+
type: "string[]",
51+
label: "Structure IDs",
52+
description: "The structure IDs of the assistant",
53+
optional: true,
54+
propDefinition: [
55+
app,
56+
"structureId",
57+
],
58+
},
59+
toolIds: {
60+
type: "string[]",
61+
label: "Tool IDs",
62+
description: "The tool IDs of the assistant",
63+
optional: true,
64+
propDefinition: [
65+
app,
66+
"toolId",
67+
],
68+
},
69+
},
70+
methods: {
71+
createAssistant(args = {}) {
72+
return this.app.post({
73+
path: "/assistants",
74+
...args,
75+
});
76+
},
77+
},
78+
async run({ $ }) {
79+
const {
80+
createAssistant,
81+
name,
82+
description,
83+
input,
84+
knowledgeBaseIds,
85+
rulesetIds,
86+
structureIds,
87+
toolIds,
88+
} = this;
89+
90+
const response = await createAssistant({
91+
$,
92+
data: {
93+
name,
94+
description,
95+
input,
96+
knowledge_base_ids: knowledgeBaseIds,
97+
ruleset_ids: rulesetIds,
98+
structure_ids: structureIds,
99+
tool_ids: toolIds,
100+
},
101+
});
102+
$.export("$summary", `Successfully created a new assistant with ID \`${response.assistant_id}\`.`);
103+
return response;
104+
},
105+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import app from "../../griptape.app.mjs";
2+
3+
export default {
4+
key: "griptape-delete-assistant",
5+
name: "Delete Assistant",
6+
description: "Deletes an existing assistant. [See the documentation](https://docs.griptape.ai/stable/griptape-cloud/api/api-reference/#/Assistants/DeleteAssistant).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
assistantId: {
12+
propDefinition: [
13+
app,
14+
"assistantId",
15+
],
16+
},
17+
},
18+
methods: {
19+
deleteAssistant({
20+
assistantId, ...args
21+
} = {}) {
22+
return this.app.delete({
23+
path: `/assistants/${assistantId}`,
24+
...args,
25+
});
26+
},
27+
},
28+
async run({ $ }) {
29+
const {
30+
deleteAssistant,
31+
assistantId,
32+
} = this;
33+
34+
await deleteAssistant({
35+
$,
36+
assistantId,
37+
});
38+
$.export("$summary", "Successfully deleted assistant");
39+
return {
40+
success: true,
41+
};
42+
},
43+
};
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
import app from "../../griptape.app.mjs";
2+
3+
export default {
4+
key: "griptape-update-assistant",
5+
name: "Update Assistant",
6+
description: "Updates an existing assistant. [See the documentation](https://docs.griptape.ai/stable/griptape-cloud/api/api-reference/#/Assistants/UpdateAssistant).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
assistantId: {
12+
propDefinition: [
13+
app,
14+
"assistantId",
15+
],
16+
},
17+
name: {
18+
optional: true,
19+
propDefinition: [
20+
app,
21+
"name",
22+
],
23+
},
24+
description: {
25+
propDefinition: [
26+
app,
27+
"description",
28+
],
29+
},
30+
input: {
31+
optional: true,
32+
propDefinition: [
33+
app,
34+
"input",
35+
],
36+
},
37+
knowledgeBaseIds: {
38+
type: "string[]",
39+
label: "Knowledge Base IDs",
40+
description: "The knowledge base IDs of the assistant",
41+
optional: true,
42+
propDefinition: [
43+
app,
44+
"knowledgeBaseId",
45+
],
46+
},
47+
rulesetIds: {
48+
type: "string[]",
49+
label: "Ruleset IDs",
50+
description: "The ruleset IDs of the assistant",
51+
optional: true,
52+
propDefinition: [
53+
app,
54+
"rulesetId",
55+
],
56+
},
57+
structureIds: {
58+
type: "string[]",
59+
label: "Structure IDs",
60+
description: "The structure IDs of the assistant",
61+
optional: true,
62+
propDefinition: [
63+
app,
64+
"structureId",
65+
],
66+
},
67+
toolIds: {
68+
type: "string[]",
69+
label: "Tool IDs",
70+
description: "The tool IDs of the assistant",
71+
optional: true,
72+
propDefinition: [
73+
app,
74+
"toolId",
75+
],
76+
},
77+
},
78+
methods: {
79+
updateAssistant({
80+
assistantId, ...args
81+
} = {}) {
82+
return this.app.patch({
83+
path: `/assistants/${assistantId}`,
84+
...args,
85+
});
86+
},
87+
},
88+
async run({ $ }) {
89+
const {
90+
updateAssistant,
91+
assistantId,
92+
name,
93+
description,
94+
input,
95+
knowledgeBaseIds,
96+
rulesetIds,
97+
structureIds,
98+
toolIds,
99+
} = this;
100+
101+
const response = await updateAssistant({
102+
$,
103+
assistantId,
104+
data: {
105+
name,
106+
description,
107+
input,
108+
knowledge_base_ids: knowledgeBaseIds,
109+
ruleset_ids: rulesetIds,
110+
structure_ids: structureIds,
111+
tool_ids: toolIds,
112+
},
113+
});
114+
$.export("$summary", `Successfully updated assistant with ID \`${response.assistant_id}\`.`);
115+
return response;
116+
},
117+
};

0 commit comments

Comments
 (0)