Skip to content

Commit 3640154

Browse files
committed
[Components] rumi_ai - new components
1 parent 163ad45 commit 3640154

File tree

15 files changed

+665
-17
lines changed

15 files changed

+665
-17
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ components/**/package-lock.json
2020
/packages/sdk/examples/.next/
2121

2222
**/.claude/settings.local.json
23+
24+
.cursor
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import app from "../../rumi_ai.app.mjs";
2+
3+
export default {
4+
key: "rumi_ai-add-session-access",
5+
name: "Add Session Access",
6+
description: "Add access to a session for specific email addresses or domains. [See the documentation](https://rumiai.notion.site/Rumi-Public-API-Authentication-02055b7286874bd7b355862f1abe48d9)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
sessionId: {
12+
propDefinition: [
13+
app,
14+
"sessionId",
15+
],
16+
},
17+
sessionRecurrenceId: {
18+
propDefinition: [
19+
app,
20+
"sessionRecurrenceId",
21+
],
22+
},
23+
emails: {
24+
propDefinition: [
25+
app,
26+
"emails",
27+
],
28+
},
29+
domains: {
30+
propDefinition: [
31+
app,
32+
"domains",
33+
],
34+
},
35+
message: {
36+
propDefinition: [
37+
app,
38+
"message",
39+
],
40+
},
41+
},
42+
async run({ $ }) {
43+
const {
44+
app,
45+
sessionId,
46+
sessionRecurrenceId,
47+
emails,
48+
domains,
49+
message,
50+
} = this;
51+
52+
const response = await app.addSessionAccess({
53+
$,
54+
data: {
55+
sessionID: sessionId,
56+
sessionRecurrenceID: sessionRecurrenceId,
57+
emails,
58+
domains,
59+
message,
60+
},
61+
});
62+
63+
$.export("$summary", `Successfully added access to session \`${sessionId}\``);
64+
return response;
65+
},
66+
};
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import app from "../../rumi_ai.app.mjs";
2+
3+
export default {
4+
key: "rumi_ai-ai-stream-query",
5+
name: "AI Stream Query",
6+
description: "Stream an AI query against session memories. [See the documentation](https://rumiai.notion.site/Rumi-Public-API-Authentication-02055b7286874bd7b355862f1abe48d9)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
query: {
12+
propDefinition: [
13+
app,
14+
"query",
15+
],
16+
},
17+
requestId: {
18+
propDefinition: [
19+
app,
20+
"requestId",
21+
],
22+
},
23+
tz: {
24+
propDefinition: [
25+
app,
26+
"tz",
27+
],
28+
},
29+
},
30+
async run({ $ }) {
31+
const {
32+
app,
33+
query,
34+
requestId,
35+
tz,
36+
} = this;
37+
38+
const response = await app.streamAiQuery({
39+
$,
40+
data: {
41+
query,
42+
requestId,
43+
tz,
44+
},
45+
});
46+
47+
$.export("$summary", "Successfully executed AI stream query");
48+
return response;
49+
},
50+
};
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
import { ConfigurationError } from "@pipedream/platform";
2+
import app from "../../rumi_ai.app.mjs";
3+
4+
export default {
5+
key: "rumi_ai-create-session",
6+
name: "Create Session",
7+
description: "Create a new session/meeting. [See the documentation](https://rumiai.notion.site/Rumi-Public-API-Authentication-02055b7286874bd7b355862f1abe48d9)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
app,
12+
sessionTitle: {
13+
propDefinition: [
14+
app,
15+
"sessionTitle",
16+
],
17+
},
18+
about: {
19+
description: "A brief description of the session.",
20+
propDefinition: [
21+
app,
22+
"about",
23+
],
24+
},
25+
startDateTime: {
26+
propDefinition: [
27+
app,
28+
"startDateTime",
29+
],
30+
},
31+
endDateTime: {
32+
propDefinition: [
33+
app,
34+
"endDateTime",
35+
],
36+
},
37+
enableRecording: {
38+
propDefinition: [
39+
app,
40+
"enableRecording",
41+
],
42+
},
43+
summaAI: {
44+
propDefinition: [
45+
app,
46+
"summaAI",
47+
],
48+
},
49+
},
50+
async run({ $ }) {
51+
const {
52+
app,
53+
sessionTitle,
54+
about,
55+
startDateTime,
56+
endDateTime,
57+
enableRecording,
58+
summaAI,
59+
} = this;
60+
61+
const startDateTimeObj = new Date(startDateTime);
62+
const endDateTimeObj = new Date(endDateTime);
63+
64+
if (isNaN(startDateTimeObj.getTime())) {
65+
throw new ConfigurationError("Invalid **Start Date Time** provided");
66+
}
67+
if (isNaN(endDateTimeObj.getTime())) {
68+
throw new ConfigurationError("Invalid **End Date Time** provided");
69+
}
70+
if (endDateTimeObj <= startDateTimeObj) {
71+
throw new ConfigurationError("**End Date Time** must be after **Start Date Time**");
72+
}
73+
74+
const startTimestamp = Math.floor(startDateTimeObj.getTime() / 1000);
75+
const endTimestamp = Math.floor(endDateTimeObj.getTime() / 1000);
76+
77+
const response = await app.createSession({
78+
$,
79+
data: {
80+
sessionTitle,
81+
about,
82+
dataVisibility: "team-visible",
83+
accessStatus: "unlocked",
84+
startTimestamp,
85+
endTimestamp,
86+
sessionSettings: {
87+
enableRecording,
88+
summaAI,
89+
preferredLanguages: [
90+
"en-US",
91+
],
92+
recurring: 0,
93+
postSessionSummaries: {
94+
recipients: {
95+
email: "everyone",
96+
},
97+
},
98+
},
99+
},
100+
});
101+
102+
$.export("$summary", `Successfully created session: ${sessionTitle}`);
103+
return response;
104+
},
105+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../rumi_ai.app.mjs";
2+
3+
export default {
4+
key: "rumi_ai-get-current-user",
5+
name: "Get Current User",
6+
description: "Get information about the current authenticated user. [See the documentation](https://rumiai.notion.site/Rumi-Public-API-Authentication-02055b7286874bd7b355862f1abe48d9)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
},
12+
async run({ $ }) {
13+
const { app } = this;
14+
15+
const response = await app.getCurrentUser({
16+
$,
17+
});
18+
19+
$.export("$summary", "Successfully retrieved current user information");
20+
return response;
21+
},
22+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../rumi_ai.app.mjs";
2+
3+
export default {
4+
key: "rumi_ai-get-future-sessions",
5+
name: "Get Future Sessions",
6+
description: "Retrieve upcoming/future sessions. [See the documentation](https://rumiai.notion.site/Rumi-Public-API-Authentication-02055b7286874bd7b355862f1abe48d9)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
},
12+
async run({ $ }) {
13+
const { app } = this;
14+
15+
const response = await app.getFutureSessions({
16+
$,
17+
});
18+
19+
$.export("$summary", `Successfully retrieved \`${response?.data?.sessions?.length}\` future session(s)`);
20+
return response;
21+
},
22+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../rumi_ai.app.mjs";
2+
3+
export default {
4+
key: "rumi_ai-get-meeting-types",
5+
name: "Get Meeting Types",
6+
description: "Retrieve available meeting types. [See the documentation](https://rumiai.notion.site/Rumi-Public-API-Authentication-02055b7286874bd7b355862f1abe48d9)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
},
12+
async run({ $ }) {
13+
const { app } = this;
14+
15+
const response = await app.getMeetingTypes({
16+
$,
17+
});
18+
19+
$.export("$summary", `Successfully retrieved \`${response?.data?.meetingTypes?.length}\` meeting type(s)`);
20+
return response;
21+
},
22+
};
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import app from "../../rumi_ai.app.mjs";
2+
3+
export default {
4+
key: "rumi_ai-get-memory-threads",
5+
name: "Get Memory Threads",
6+
description: "Retrieve memory threads. [See the documentation](https://rumiai.notion.site/Rumi-Public-API-Authentication-02055b7286874bd7b355862f1abe48d9)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
limit: {
12+
propDefinition: [
13+
app,
14+
"limit",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const {
20+
app,
21+
limit,
22+
} = this;
23+
24+
const response = await app.getMemoryThreads({
25+
$,
26+
params: {
27+
limit,
28+
},
29+
});
30+
31+
$.export("$summary", `Successfully retrieved \`${response?.data?.threads?.length}\` memory thread(s)`);
32+
return response;
33+
},
34+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import app from "../../rumi_ai.app.mjs";
2+
3+
export default {
4+
key: "rumi_ai-get-past-sessions",
5+
name: "Get Past Sessions",
6+
description: "Retrieve past sessions/meetings. [See the documentation](https://rumiai.notion.site/Rumi-Public-API-Authentication-02055b7286874bd7b355862f1abe48d9)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
limit: {
12+
propDefinition: [
13+
app,
14+
"limit",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const {
20+
app, limit,
21+
} = this;
22+
23+
const response = await app.getPastSessions({
24+
$,
25+
params: {
26+
limit,
27+
},
28+
});
29+
30+
$.export("$summary", `Successfully retrieved \`${response?.data?.sessions?.length}\` past session(s)`);
31+
return response;
32+
},
33+
};

0 commit comments

Comments
 (0)