Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import zoom from "../../zoom.app.mjs";

export default {
key: "zoom-get-meeting-transcript",
name: "Get Meeting Transcript",
description: "Get the transcript of a meeting. [See the documentation](https://developers.zoom.us/docs/api/meetings/#tag/cloud-recording/get/meetings/{meetingId}/transcript)",
version: "0.0.1",
type: "action",
props: {
zoom,
meetingId: {
propDefinition: [
zoom,
"meetingId",
],
description: "The meeting ID to get the transcript for",
optional: false,
},
},
methods: {
getMeetingTranscript({
meetingId, ...opts
}) {
return this.zoom._makeRequest({
path: `/meetings/${meetingId}/transcript`,
...opts,
});
},
},
async run({ $: step }) {
const transcript = await this.getMeetingTranscript({
step,
meetingId: this.meetingId,
});

step.export("$summary", `Retrieved transcript for meeting ${this.meetingId}`);
return transcript;
},
};
4 changes: 2 additions & 2 deletions components/zoom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/zoom",
"version": "0.6.0",
"version": "0.7.0",
"description": "Pipedream Zoom Components",
"main": "zoom.app.mjs",
"keywords": [
Expand All @@ -14,6 +14,6 @@
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^1.3.0"
"@pipedream/platform": "^3.1.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import common from "../common/common.mjs";
import constants from "../common/constants.mjs";

export default {
...common,
key: "zoom-new-recording-transcript-completed",
name: "New Recording Transcript Completed (Instant)",
description: "Emit new event each time a recording transcript is completed",
version: "0.0.1",
type: "source",
dedupe: "unique",
props: {
...common.props,
// eslint-disable-next-line pipedream/props-label, pipedream/props-description
apphook: {
type: "$.interface.apphook",
appProp: "app",
eventNames() {
return [
constants.CUSTOM_EVENT_TYPES.RECORDING_TRANSCRIPT_COMPLETED,
];
},
},
},
hooks: {
async deploy() {
const { meetings } = await this.app.listMeetings({
params: {
from: this.monthAgo(),
to: new Date().toISOString()
.slice(0, 10),
page_size: 25,
},
});
if (!meetings || meetings.length === 0) {
return;
}
for (const meeting of meetings) {
if (!this.isMeetingRelevant(meeting)) {
continue;
}
for (const file of meeting.recording_files) {
if (!this.isFileRelevant(file)) {
continue;
}
this.emitEvent(file, meeting);
}
}
},
},
methods: {
...common.methods,
isMeetingRelevant(meeting) {
return meeting.recording_files && meeting.recording_files.length > 0;
},
isFileRelevant(file) {
return file.file_type === "TRANSCRIPT" && file.status === "completed";
},
emitEvent(file, meeting) {
this.$emit({
meeting,
file,
}, this.generateMeta(file, meeting));
},
generateMeta(file, meeting) {
return {
id: file.id,
summary: `Transcript completed for ${meeting.topic}`,
ts: +new Date(file.recording_end),
};
},
},
async run(event) {
if (event.event !== constants.CUSTOM_EVENT_TYPES.RECORDING_TRANSCRIPT_COMPLETED) {
console.log("Not a recording.transcript.completed event. Exiting");
return;
}
const { payload } = event;
const { object } = payload;
const { recording_files: recordingFiles } = object;

if (!this.isMeetingRelevant(object)) {
return;
}

for (const file of recordingFiles) {
if (!this.isFileRelevant(file)) {
continue;
}

this.emitEvent(file, object);
}
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import zoomAdmin from "../../zoom_admin.app.mjs";

export default {
key: "zoom_admin-get-meeting-transcript",
name: "Get Meeting Transcript",
description: "Get the transcript of a meeting. [See the documentation](https://developers.zoom.us/docs/api/meetings/#tag/cloud-recording/get/meetings/{meetingId}/transcript)",
version: "0.0.1",
type: "action",
props: {
zoomAdmin,
meetingId: {
propDefinition: [
zoomAdmin,
"meeting",
],
description: "The meeting ID to get the transcript for",
},
},
methods: {
getMeetingTranscript({
meetingId, ...opts
}) {
return this.zoomAdmin._makeRequest({
path: `/meetings/${meetingId}/transcript`,
...opts,
});
},
},
async run({ $ }) {
const meetingId = this.meetingId.value || this.meetingId;
const { data: transcript } = await this.getMeetingTranscript({
$,
meetingId,
});

$.export("$summary", `Retrieved transcript for meeting ${meetingId}`);
return transcript;
},
};
4 changes: 2 additions & 2 deletions components/zoom_admin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/zoom_admin",
"version": "0.10.0",
"version": "0.11.0",
"description": "Pipedream Zoom_admin Components",
"main": "zoom_admin.app.mjs",
"keywords": [
Expand All @@ -14,7 +14,7 @@
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^1.4.0",
"@pipedream/platform": "^3.1.0",
"lodash": "^4.17.21",
"uuid": "^8.3.2"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import zoomAdmin from "../../zoom_admin.app.mjs";

export default {
key: "zoom_admin-new-recording-transcript-completed",
name: "New Recording Transcript Completed (Instant)",
description: "Emit new event each time a recording transcript is completed",
version: "0.0.1",
type: "source",
dedupe: "unique",
props: {
zoomAdmin,
zoomApphook: {

Check warning on line 12 in components/zoom_admin/sources/new-recording-transcript-completed/new-recording-transcript-completed.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop zoomApphook must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 12 in components/zoom_admin/sources/new-recording-transcript-completed/new-recording-transcript-completed.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop zoomApphook must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "$.interface.apphook",
appProp: "zoomAdmin",
eventNames: [
"recording.transcript_completed",
],
},
},
hooks: {
async deploy() {
const { meetings } = await this.zoomAdmin.listMeetings({
params: {
from: this.monthAgo(),
to: new Date().toISOString()
.slice(0, 10),
page_size: 25,
},
});
if (!meetings || meetings.length === 0) {
return;
}
for (const meeting of meetings) {
if (!this.isMeetingRelevant(meeting)) {
continue;
}
for (const file of meeting.recording_files) {
if (!this.isFileRelevant(file)) {
continue;
}
this.emitEvent(file, meeting);
}
}
},
},
methods: {
monthAgo() {
const now = new Date();
const monthAgo = new Date(now.getTime());
monthAgo.setMonth(monthAgo.getMonth() - 1);
return monthAgo.toISOString().slice(0, 10);
},
isMeetingRelevant(meeting) {
return meeting.recording_files && meeting.recording_files.length > 0;
},
isFileRelevant(file) {
return file.file_type === "TRANSCRIPT" && file.status === "completed";
},
emitEvent(file, meeting) {
this.$emit({
meeting,
file,
}, this.generateMeta(file, meeting));
},
generateMeta(file, meeting) {
return {
id: file.id,
summary: `Transcript completed for ${meeting.topic}`,
ts: +new Date(file.recording_end),
};
},
},
async run(event) {
if (event.event !== "recording.transcript_completed") {
console.log("Not a recording.transcript_completed event. Exiting");
return;
}
const { payload } = event;
const { object } = payload;
const { recording_files: recordingFiles } = object;

if (!this.isMeetingRelevant(object)) {
return;
}

for (const file of recordingFiles) {
if (!this.isFileRelevant(file)) {
continue;
}

this.emitEvent(file, object);
}
},
};
13 changes: 7 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading