Skip to content

Commit 4703afa

Browse files
committed
new components
1 parent fd29b3a commit 4703afa

File tree

7 files changed

+117
-179
lines changed

7 files changed

+117
-179
lines changed

components/flash-by-veloraai/actions/add-feedback/add-feedback.mjs

Lines changed: 0 additions & 40 deletions
This file was deleted.

components/flash-by-veloraai/actions/upload-transcript/upload-transcript.mjs

Lines changed: 0 additions & 43 deletions
This file was deleted.

components/flash-by-veloraai/flash-by-veloraai.app.mjs

Lines changed: 0 additions & 89 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import flashByVeloraAi 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: "Send customer-related feedback to Flash System for comprehensive analysis.",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
flashByVeloraAi,
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+
},
29+
async run({ $ }) {
30+
const response = await this.flashByVeloraAi.sendFeedback({
31+
$,
32+
data: {
33+
feedback: this.feedback,
34+
title: this.title,
35+
source: this.source,
36+
},
37+
});
38+
$.export("$summary", "Successfully sent feedback");
39+
return response;
40+
},
41+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import flashByVeloraAi 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: "Transfers a contact call transcript to the flash system for thorough analysis. [See the documentation](https://flash.velora.ai/developers/documentation/api)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
flashByVeloraAi,
11+
title: {
12+
type: "string",
13+
label: "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+
async run({ $ }) {
28+
const response = await this.flashByVeloraAi.sendTranscript({
29+
$,
30+
data: {
31+
title: this.title,
32+
file_url: this.fileUrl,
33+
source_type: this.sourceType,
34+
},
35+
});
36+
$.export("$summary", "Transcript uploaded successfully");
37+
return response;
38+
},
39+
};
Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,38 @@
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+
_baseUrl() {
8+
return "https://flash-api.velora.ai/v1/api";
9+
},
10+
_makeRequest(opts = {}) {
11+
const {
12+
$ = this,
13+
path,
14+
...otherOpts
15+
} = opts;
16+
return axios($, {
17+
...otherOpts,
18+
method: "POST",
19+
url: `${this._baseUrl()}${path}`,
20+
headers: {
21+
"x-api-key": `${this.$auth.api_key}`,
22+
},
23+
});
24+
},
25+
sendFeedback(opts = {}) {
26+
return this._makeRequest({
27+
path: "/add-feedback",
28+
...opts,
29+
});
30+
},
31+
sendTranscript(opts = {}) {
32+
return this._makeRequest({
33+
path: "/upload-transcript",
34+
...opts,
35+
});
936
},
1037
},
11-
};
38+
};

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+
}

0 commit comments

Comments
 (0)