Skip to content

Commit f584d10

Browse files
committed
meetstream_ai init
1 parent d2cce1d commit f584d10

File tree

7 files changed

+280
-6
lines changed

7 files changed

+280
-6
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import meetstream_ai from "../../meetstream_ai.app.mjs";
2+
import { axios } from "@pipedream/platform";
3+
4+
export default {
5+
key: "meetstream_ai-create-bot",
6+
name: "Create Bot",
7+
description: "Creates a new bot instance to join a meeting. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)",
8+
version: "0.0.{{ts}}",
9+
type: "action",
10+
props: {
11+
meetstream_ai,
12+
meetingLink: {
13+
propDefinition: [
14+
meetstream_ai,
15+
"meetingLink",
16+
],
17+
},
18+
botName: {
19+
propDefinition: [
20+
meetstream_ai,
21+
"botName",
22+
],
23+
optional: true,
24+
},
25+
audioRequired: {
26+
propDefinition: [
27+
meetstream_ai,
28+
"audioRequired",
29+
],
30+
optional: true,
31+
},
32+
videoRequired: {
33+
propDefinition: [
34+
meetstream_ai,
35+
"videoRequired",
36+
],
37+
optional: true,
38+
},
39+
liveAudioRequired: {
40+
propDefinition: [
41+
meetstream_ai,
42+
"liveAudioRequired",
43+
],
44+
optional: true,
45+
},
46+
liveTranscriptionRequired: {
47+
propDefinition: [
48+
meetstream_ai,
49+
"liveTranscriptionRequired",
50+
],
51+
optional: true,
52+
},
53+
},
54+
async run({ $ }) {
55+
const response = await this.meetstream_ai.createBotInstance({
56+
meetingLink: this.meetingLink,
57+
botName: this.botName,
58+
audioRequired: this.audioRequired,
59+
videoRequired: this.videoRequired,
60+
liveAudioRequired: this.liveAudioRequired,
61+
liveTranscriptionRequired: this.liveTranscriptionRequired,
62+
});
63+
64+
$.export("$summary", `Successfully created bot instance for meeting link ${this.meetingLink}`);
65+
return response;
66+
},
67+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import meetstream_ai from "../../meetstream_ai.app.mjs";
2+
3+
export default {
4+
key: "meetstream_ai-get-audio",
5+
name: "Get Recorded Audio",
6+
description: "Retrieves the recorded audio file for a specific bot, if available. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)",
7+
version: "0.0.{{ts}}",
8+
type: "action",
9+
props: {
10+
meetstream_ai,
11+
botId: {
12+
propDefinition: [
13+
meetstream_ai,
14+
"botId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.meetstream_ai.getRecordedAudio({
20+
botId: this.botId,
21+
});
22+
23+
$.export("$summary", `Successfully retrieved recorded audio for bot ID ${this.botId}`);
24+
return response;
25+
},
26+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import meetstream_ai from "../../meetstream_ai.app.mjs";
2+
import { axios } from "@pipedream/platform";
3+
4+
export default {
5+
key: "meetstream_ai-get-bot-status",
6+
name: "Get Bot Status",
7+
description: "Retrieves the current status of a specific bot. [See the documentation]()",
8+
version: "0.0.{{ts}}",
9+
type: "action",
10+
props: {
11+
meetstream_ai,
12+
botId: {
13+
propDefinition: [
14+
meetstream_ai,
15+
"botId",
16+
],
17+
},
18+
},
19+
async run({ $ }) {
20+
const response = await this.meetstream_ai.getBotStatus({
21+
botId: this.botId,
22+
});
23+
$.export("$summary", `Successfully retrieved status for Bot ID ${this.botId}`);
24+
return response;
25+
},
26+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import meetstream_ai from "../../meetstream_ai.app.mjs";
2+
3+
export default {
4+
key: "meetstream_ai-get-transcription",
5+
name: "Get Transcription",
6+
description: "Retrieves the transcript file for a specific bot, if available. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)",
7+
version: "0.0.{{ts}}",
8+
type: "action",
9+
props: {
10+
meetstream_ai,
11+
botId: {
12+
propDefinition: [
13+
meetstream_ai,
14+
"botId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.meetstream_ai.getTranscript({
20+
botId: this.botId,
21+
});
22+
$.export("$summary", `Successfully retrieved transcription for bot ID: ${this.botId}`);
23+
return response;
24+
},
25+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import meetstream_ai from "../../meetstream_ai.app.mjs";
2+
import { axios } from "@pipedream/platform";
3+
4+
export default {
5+
key: "meetstream_ai-remove-bot",
6+
name: "Remove Bot",
7+
description: "Removes a bot from its meeting and deletes its associated data. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)",
8+
version: "0.0.{{ts}}",
9+
type: "action",
10+
props: {
11+
meetstream_ai,
12+
botId: {
13+
propDefinition: [
14+
meetstream_ai,
15+
"botId",
16+
],
17+
},
18+
},
19+
async run({ $ }) {
20+
const response = await this.meetstream_ai.removeBotInstance({
21+
botId: this.botId,
22+
});
23+
24+
$.export("$summary", `Successfully removed bot with ID ${this.botId}`);
25+
return response;
26+
},
27+
};
Lines changed: 108 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,114 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "meetstream_ai",
4-
propDefinitions: {},
6+
propDefinitions: {
7+
meetingLink: {
8+
type: "string",
9+
label: "Meeting Link",
10+
description: "The link to the meeting where the bot should join",
11+
},
12+
botId: {
13+
type: "string",
14+
label: "Bot ID",
15+
description: "The ID of the bot",
16+
},
17+
botName: {
18+
type: "string",
19+
label: "Bot Name",
20+
description: "The name of the bot",
21+
optional: true,
22+
},
23+
audioRequired: {
24+
type: "boolean",
25+
label: "Audio Required",
26+
description: "Whether audio is required",
27+
optional: true,
28+
},
29+
videoRequired: {
30+
type: "boolean",
31+
label: "Video Required",
32+
description: "Whether video is required",
33+
optional: true,
34+
},
35+
liveAudioRequired: {
36+
type: "boolean",
37+
label: "Live Audio Required",
38+
description: "Whether live audio is required",
39+
optional: true,
40+
},
41+
liveTranscriptionRequired: {
42+
type: "boolean",
43+
label: "Live Transcription Required",
44+
description: "Whether live transcription is required",
45+
optional: true,
46+
},
47+
},
548
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
49+
_baseUrl() {
50+
return "https://api.meetstream.ai";
51+
},
52+
async _makeRequest(opts = {}) {
53+
const {
54+
$ = this, method = "GET", path = "/", headers, ...otherOpts
55+
} = opts;
56+
return axios($, {
57+
...otherOpts,
58+
method,
59+
url: this._baseUrl() + path,
60+
headers: {
61+
...headers,
62+
Authorization: `Bearer ${this.$auth.oauth_access_token}`,
63+
},
64+
});
65+
},
66+
async createBotInstance(opts = {}) {
67+
const {
68+
meetingLink,
69+
botName,
70+
audioRequired,
71+
videoRequired,
72+
liveAudioRequired,
73+
liveTranscriptionRequired,
74+
} = opts;
75+
return this._makeRequest({
76+
method: "POST",
77+
path: "/bots",
78+
data: {
79+
meeting_link: meetingLink,
80+
bot_name: botName,
81+
audio_required: audioRequired,
82+
video_required: videoRequired,
83+
live_audio_required: liveAudioRequired,
84+
live_transcription_required: liveTranscriptionRequired,
85+
},
86+
});
87+
},
88+
async getBotStatus(opts = {}) {
89+
const { botId } = opts;
90+
return this._makeRequest({
91+
path: `/bots/${botId}/status`,
92+
});
93+
},
94+
async getRecordedAudio(opts = {}) {
95+
const { botId } = opts;
96+
return this._makeRequest({
97+
path: `/bots/${botId}/audio`,
98+
});
99+
},
100+
async getTranscript(opts = {}) {
101+
const { botId } = opts;
102+
return this._makeRequest({
103+
path: `/bots/${botId}/transcript`,
104+
});
105+
},
106+
async removeBotInstance(opts = {}) {
107+
const { botId } = opts;
108+
return this._makeRequest({
109+
method: "DELETE",
110+
path: `/bots/${botId}`,
111+
});
9112
},
10113
},
11-
};
114+
};

components/meetstream_ai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"publishConfig": {
1313
"access": "public"
1414
}
15-
}
15+
}

0 commit comments

Comments
 (0)