Skip to content

Commit 85748a4

Browse files
committed
Merge remote-tracking branch 'origin/master' into sdk/connect-workflow-invocation
2 parents 5e85ef5 + f004dcb commit 85748a4

File tree

25 files changed

+513
-16
lines changed

25 files changed

+513
-16
lines changed
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
import app from "../../flash_by_velora_ai.app.mjs";
2+
3+
export default {
4+
key: "flash_by_velora_ai-add-feedback",
5+
name: "Add Feedback",
6+
description: "Adds customer feedback.",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
feedback: {
12+
type: "string",
13+
label: "Feedback",
14+
description: "Actual text customer feedback.",
15+
},
16+
title: {
17+
type: "string",
18+
label: "Title",
19+
description: "Title of the customer feedback, if any.",
20+
optional: true,
21+
},
22+
source: {
23+
type: "string",
24+
label: "Source",
25+
description: "Source where the feedback was received, for example, `GitHub`, `Slack`, etc.",
26+
optional: true,
27+
},
28+
upvote: {
29+
type: "integer",
30+
label: "Upvote",
31+
description: "Count of upvotes for the feedback.",
32+
optional: true,
33+
},
34+
downvote: {
35+
type: "integer",
36+
label: "Downvote",
37+
description: "Count of downvotes for the feedback.",
38+
optional: true,
39+
},
40+
contactName: {
41+
type: "string",
42+
label: "Contact Name",
43+
description: "Name of the customer contact who provided the feedback.",
44+
optional: true,
45+
},
46+
contactEmail: {
47+
type: "string",
48+
label: "Contact Email",
49+
description: "Email of the customer contact who provided the feedback.",
50+
optional: true,
51+
},
52+
handle: {
53+
type: "string",
54+
label: "Handle",
55+
description: "Platform specific customer contact handle. Eg. `@pipedream`.",
56+
optional: true,
57+
},
58+
handleType: {
59+
type: "string",
60+
label: "Handle Type",
61+
description: "Platform which the contact handle belongs to. Eg. `Twitter`, `GitHub`, etc.",
62+
optional: true,
63+
},
64+
companyName: {
65+
type: "string",
66+
label: "Company Name",
67+
description: "Name of customer company to which the customer contact who provided feedback belongs.",
68+
optional: true,
69+
},
70+
companyDomain: {
71+
type: "string",
72+
label: "Company Domain",
73+
description: "Email domain of customer company to which the customer contact who provided feedback belongs. Eg. `pipedream.com`.",
74+
optional: true,
75+
},
76+
feedbackAt: {
77+
type: "string",
78+
label: "Feedback At",
79+
description: "Date and time, when the feedback was received. Eg. `2021-01-01T00:00:00`.",
80+
optional: true,
81+
},
82+
},
83+
methods: {
84+
addFeedback(args = {}) {
85+
return this.app.post({
86+
path: "/add-feedback",
87+
...args,
88+
});
89+
},
90+
},
91+
async run({ $ }) {
92+
const {
93+
addFeedback,
94+
feedback,
95+
title,
96+
source,
97+
upvote,
98+
downvote,
99+
contactName,
100+
contactEmail,
101+
handle,
102+
handleType,
103+
companyName,
104+
companyDomain,
105+
feedbackAt,
106+
} = this;
107+
108+
const response = await addFeedback({
109+
$,
110+
data: {
111+
feedback,
112+
title,
113+
source,
114+
upvote,
115+
downvote,
116+
contact_name: contactName,
117+
contact_email: contactEmail,
118+
handle,
119+
handle_type: handleType,
120+
company_name: companyName,
121+
company_domain: companyDomain,
122+
feedback_at: feedbackAt,
123+
},
124+
});
125+
$.export("$summary", "Successfully added feedback.");
126+
return response;
127+
},
128+
};
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import app from "../../flash_by_velora_ai.app.mjs";
2+
3+
export default {
4+
key: "flash_by_velora_ai-upload-transcript",
5+
name: "Upload Transcript",
6+
description: "Upload a meeting transcript.",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
title: {
12+
type: "string",
13+
label: "Meeting Title",
14+
description: "Title of the meeting.",
15+
},
16+
fileUrl: {
17+
type: "string",
18+
label: "File URL",
19+
description: "Transcript file (supported types: **text/plain**, **pdf**, **vtt**) or transcript text.",
20+
},
21+
sourceType: {
22+
type: "string",
23+
label: "Source Type",
24+
description: "Type of the source system of the file, for example, `Google Drive`, `Fireflies.ai`, etc.",
25+
},
26+
},
27+
methods: {
28+
uploadTranscript(args = {}) {
29+
return this.app.post({
30+
path: "/upload-transcript",
31+
...args,
32+
});
33+
},
34+
},
35+
async run({ $ }) {
36+
const {
37+
uploadTranscript,
38+
title,
39+
fileUrl,
40+
sourceType,
41+
} = this;
42+
43+
const response = await uploadTranscript({
44+
$,
45+
data: {
46+
title,
47+
file_url: fileUrl,
48+
source_type: sourceType,
49+
},
50+
});
51+
52+
$.export("$summary", "Successfully uploaded transcript.");
53+
return response;
54+
},
55+
};
Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "flash_by_velora_ai",
4-
propDefinitions: {},
56
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
7+
getUrl(path) {
8+
return `https://flash-api.velora.ai/v1/api${path}`;
9+
},
10+
getHeaders(headers) {
11+
return {
12+
...headers,
13+
"Content-Type": "application/json",
14+
"Accept": "application/json",
15+
"x-api-key": this.$auth.api_key,
16+
};
17+
},
18+
_makeRequest({
19+
$ = this, path, headers, ...args
20+
} = {}) {
21+
return axios($, {
22+
...args,
23+
url: this.getUrl(path),
24+
headers: this.getHeaders(headers),
25+
});
26+
},
27+
post(args = {}) {
28+
return this._makeRequest({
29+
method: "POST",
30+
...args,
31+
});
932
},
1033
},
11-
};
34+
};

components/flash_by_velora_ai/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/flash_by_velora_ai",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Flash (by Velora AI) Components",
55
"main": "flash_by_velora_ai.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "3.0.3"
1417
}
15-
}
18+
}

components/parallel/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/parallel",
3+
"version": "0.0.1",
4+
"description": "Pipedream Parallel Components",
5+
"main": "parallel.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"parallel"
9+
],
10+
"homepage": "https://pipedream.com/apps/parallel",
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: "parallel",
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: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import rapidUrlIndexer from "../../rapid_url_indexer.app.mjs";
2+
import fs from "fs";
3+
4+
export default {
5+
key: "rapid_url_indexer-download-project-report",
6+
name: "Download Project Report",
7+
description: "Download the report for a specific project. [See the documentation](https://rapidurlindexer.com/indexing-api/).",
8+
type: "action",
9+
version: "0.0.1",
10+
props: {
11+
rapidUrlIndexer,
12+
projectId: {
13+
propDefinition: [
14+
rapidUrlIndexer,
15+
"projectId",
16+
],
17+
},
18+
filename: {
19+
type: "string",
20+
label: "Filename",
21+
description: "A filename to save the report as in the `/tmp` directory. Include the `.csv` extension",
22+
},
23+
},
24+
async run({ $ }) {
25+
const response = await this.rapidUrlIndexer.downloadProjectReport({
26+
$,
27+
projectId: this.projectId,
28+
});
29+
30+
const filepath = this.filename.includes("/tmp")
31+
? this.filename
32+
: `/tmp/${this.filename}`;
33+
34+
fs.writeFileSync(filepath, response);
35+
36+
$.export("$summary", `Successfully downloaded report for Project with ID ${this.projectId}`);
37+
return filepath;
38+
},
39+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import rapidUrlIndexer from "../../rapid_url_indexer.app.mjs";
2+
3+
export default {
4+
key: "rapid_url_indexer-get-project-status",
5+
name: "Get Project Status",
6+
description: "Get the status of a specific project. [See the documentation](https://rapidurlindexer.com/indexing-api/).",
7+
type: "action",
8+
version: "0.0.1",
9+
props: {
10+
rapidUrlIndexer,
11+
projectId: {
12+
propDefinition: [
13+
rapidUrlIndexer,
14+
"projectId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.rapidUrlIndexer.getProjectStatus({
20+
$,
21+
projectId: this.projectId,
22+
});
23+
if (response.id) {
24+
$.export("$summary", `Successfully retrieved status for Project with ID ${response.id}`);
25+
}
26+
return response;
27+
},
28+
};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import rapidUrlIndexer from "../../rapid_url_indexer.app.mjs";
2+
3+
export default {
4+
key: "rapid_url_indexer-submit-project",
5+
name: "Submit Project",
6+
description: "Submit a new project for indexing. [See the documentation](https://rapidurlindexer.com/indexing-api/).",
7+
type: "action",
8+
version: "0.0.1",
9+
props: {
10+
rapidUrlIndexer,
11+
name: {
12+
type: "string",
13+
label: "Project Name",
14+
description: "The name of the project",
15+
},
16+
urls: {
17+
type: "string[]",
18+
label: "URLs",
19+
description: "An array of URLs to index. URLs must start with either “http://” or “https://”.",
20+
},
21+
notifyOnStatusChange: {
22+
type: "boolean",
23+
label: "Notify on Status Change",
24+
description: "If set to `true`, you will receive email notifications when the project status changes",
25+
optional: true,
26+
},
27+
},
28+
async run({ $ }) {
29+
const response = await this.rapidUrlIndexer.submitProject({
30+
$,
31+
data: {
32+
project_name: this.name,
33+
urls: this.urls,
34+
notify_on_status_change: this.notifyOnStatusChange,
35+
},
36+
});
37+
$.export("$summary", `${response.message}`);
38+
return response;
39+
},
40+
};

0 commit comments

Comments
 (0)