@pipedream/zoom 0.3.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +1,33 @@
1
1
  import common from "../common/common.mjs";
2
+ import constants from "../common/constants.mjs";
2
3
 
3
4
  export default {
4
5
  ...common,
5
6
  key: "zoom-meeting-updated",
6
7
  name: "Meeting Updated (Instant)",
7
8
  description: "Emit new event each time a meeting is updated where you're the host",
8
- version: "0.0.4",
9
+ version: "0.1.0",
9
10
  type: "source",
10
- dedupe: "unique", // dedupe on the meeting ID + timestamp
11
+ dedupe: "unique",
11
12
  props: {
12
13
  ...common.props,
13
- zoomApphook: {
14
+ // eslint-disable-next-line pipedream/props-label, pipedream/props-description
15
+ apphook: {
14
16
  type: "$.interface.apphook",
15
- appProp: "zoom",
16
- eventNames: [
17
- "meeting.updated",
18
- ],
17
+ appProp: "app",
18
+ eventNames() {
19
+ return [
20
+ constants.CUSTOM_EVENT_TYPES.MEETING_UPDATED,
21
+ ];
22
+ },
19
23
  },
20
24
  },
21
25
  hooks: {
22
26
  async deploy() {
23
- const { meetings } = await this.zoom.listMeetings({
24
- page_size: 25,
27
+ const { meetings } = await this.app.listMeetings({
28
+ params: {
29
+ page_size: 25,
30
+ },
25
31
  });
26
32
  if (!meetings || meetings.length === 0) {
27
33
  return;
@@ -40,7 +46,7 @@ export default {
40
46
  emitEvent(payload, object) {
41
47
  const meta = this.generateMeta(payload, object);
42
48
  this.$emit({
43
- event: "meeting.updated",
49
+ event: constants.CUSTOM_EVENT_TYPES.MEETING_UPDATED,
44
50
  payload,
45
51
  }, meta);
46
52
  },
@@ -1,29 +1,31 @@
1
- import zoom from "../../zoom.app.mjs";
1
+ import common from "../common/common.mjs";
2
2
  import constants from "../common/constants.mjs";
3
3
 
4
4
  export default {
5
+ ...common,
5
6
  key: "zoom-phone-event",
6
7
  name: "Zoom Phone Events (Instant)",
7
- description: "Listen for any Zoom Phone events tied to your Zoom user or resources you own",
8
- version: "0.0.2",
8
+ description: "Emit new Zoom Phone event tied to your Zoom user or resources you own",
9
+ version: "0.1.0",
9
10
  type: "source",
10
11
  props: {
11
- zoom,
12
+ ...common.props,
12
13
  eventNameOptions: {
13
- label: "Zoom Events",
14
14
  type: "string[]",
15
- options: constants.PHONE_EVENT_TYPES,
15
+ label: "Zoom Events",
16
+ description: "Select the events you want to listen for",
17
+ options: Object.values(constants.PHONE_EVENT_TYPES),
16
18
  },
17
- zoomApphook: {
19
+ // eslint-disable-next-line pipedream/props-label, pipedream/props-description
20
+ apphook: {
18
21
  type: "$.interface.apphook",
19
- appProp: "zoom",
20
- async eventNames() {
22
+ appProp: "app",
23
+ eventNames() {
21
24
  return this.eventNameOptions;
22
25
  },
23
26
  },
24
27
  },
25
28
  async run(event) {
26
- console.log(event);
27
29
  this.$emit(event, {
28
30
  id: event.payload?.object?.id,
29
31
  summary: event.event,
@@ -1,48 +1,57 @@
1
- import zoom from "../../zoom.app.mjs";
2
1
  import common from "../common/common.mjs";
2
+ import constants from "../common/constants.mjs";
3
3
 
4
4
  export default {
5
+ ...common,
5
6
  key: "zoom-recording-completed",
6
7
  name: "Recording Completed (Instant)",
7
8
  description: "Emit new event each time a new recording completes for a meeting or webinar where you're the host",
8
- version: "0.0.6",
9
+ version: "0.1.0",
9
10
  type: "source",
10
11
  dedupe: "unique",
11
12
  props: {
12
13
  ...common.props,
13
- zoomApphook: {
14
- type: "$.interface.apphook",
15
- appProp: "zoom",
16
- eventNames: [
17
- "recording.completed",
18
- ],
19
- },
20
14
  meetingIds: {
15
+ type: "integer[]",
16
+ label: "Meeting Filter",
17
+ description: "Optionally filter for events for one or more meetings",
21
18
  propDefinition: [
22
- zoom,
23
- "meetingIds",
19
+ common.props.app,
20
+ "meetingId",
24
21
  ],
25
22
  },
26
23
  includeAudioRecordings: {
27
24
  propDefinition: [
28
- zoom,
25
+ common.props.app,
29
26
  "includeAudioRecordings",
30
27
  ],
31
28
  },
32
29
  includeChatTranscripts: {
33
30
  propDefinition: [
34
- zoom,
31
+ common.props.app,
35
32
  "includeChatTranscripts",
36
33
  ],
37
34
  },
35
+ // eslint-disable-next-line pipedream/props-label, pipedream/props-description
36
+ apphook: {
37
+ type: "$.interface.apphook",
38
+ appProp: "app",
39
+ eventNames() {
40
+ return [
41
+ constants.CUSTOM_EVENT_TYPES.RECORDING_COMPLETED,
42
+ ];
43
+ },
44
+ },
38
45
  },
39
46
  hooks: {
40
47
  async deploy() {
41
- const { meetings } = await this.zoom.listRecordings({
42
- from: this.monthAgo(),
43
- to: new Date().toISOString()
44
- .slice(0, 10),
45
- page_size: 25,
48
+ const { meetings } = await this.app.listRecordings({
49
+ params: {
50
+ from: this.monthAgo(),
51
+ to: new Date().toISOString()
52
+ .slice(0, 10),
53
+ page_size: 25,
54
+ },
46
55
  });
47
56
  if (!meetings || meetings.length === 0) {
48
57
  return;
@@ -103,7 +112,7 @@ export default {
103
112
  },
104
113
  },
105
114
  async run(event) {
106
- if (event.event !== "recording.completed") {
115
+ if (event.event !== constants.CUSTOM_EVENT_TYPES.RECORDING_COMPLETED) {
107
116
  console.log("Not a recording.completed event. Exiting");
108
117
  return;
109
118
  }
@@ -1,28 +1,34 @@
1
1
  import common from "../common/common.mjs";
2
+ import constants from "../common/constants.mjs";
2
3
 
3
4
  export default {
4
5
  ...common,
5
6
  key: "zoom-webinar-created",
6
7
  name: "Webinar Created (Instant)",
7
8
  description: "Emit new event each time a webinar is created where you're the host",
8
- version: "0.0.4",
9
+ version: "0.1.0",
9
10
  type: "source",
10
- dedupe: "unique", // Dedupe based on webinar ID
11
+ dedupe: "unique",
11
12
  props: {
12
13
  ...common.props,
13
- zoomApphook: {
14
+ // eslint-disable-next-line pipedream/props-label, pipedream/props-description
15
+ apphook: {
14
16
  type: "$.interface.apphook",
15
- appProp: "zoom",
16
- eventNames: [
17
- "webinar.created.by_me",
18
- "webinar.created.for_me",
19
- ],
17
+ appProp: "app",
18
+ eventNames() {
19
+ return [
20
+ constants.CUSTOM_EVENT_TYPES.WEBINAR_CREATED_BY_ME,
21
+ constants.CUSTOM_EVENT_TYPES.WEBINAR_CREATED_FOR_ME,
22
+ ];
23
+ },
20
24
  },
21
25
  },
22
26
  hooks: {
23
27
  async deploy() {
24
- const { webinars } = await this.zoom.listWebinars({
25
- page_size: 25,
28
+ const { webinars } = await this.app.listWebinars({
29
+ params: {
30
+ page_size: 25,
31
+ },
26
32
  });
27
33
  if (!webinars || webinars.length === 0) {
28
34
  return;
@@ -1,25 +1,30 @@
1
1
  import common from "../common/common.mjs";
2
+ import constants from "../common/constants.mjs";
2
3
 
3
4
  export default {
4
5
  ...common,
5
6
  key: "zoom-webinar-deleted",
6
- name: "Webinar Deleted",
7
+ name: "Webinar Deleted (Instant)",
7
8
  description: "Emit new event each time a webinar is deleted where you're the host",
8
- version: "0.0.4",
9
+ version: "0.1.0",
9
10
  type: "source",
10
- dedupe: "unique", // Dedupe based on webinar ID
11
+ dedupe: "unique",
11
12
  props: {
12
13
  ...common.props,
13
- zoomApphook: {
14
+ // eslint-disable-next-line pipedream/props-label, pipedream/props-description
15
+ apphook: {
14
16
  type: "$.interface.apphook",
15
- appProp: "zoom",
16
- eventNames: [
17
- "webinar.deleted.by_me",
18
- "webinar.deleted.for_me",
19
- ],
17
+ appProp: "app",
18
+ eventNames() {
19
+ return [
20
+ constants.CUSTOM_EVENT_TYPES.WEBINAR_DELETED_BY_ME,
21
+ constants.CUSTOM_EVENT_TYPES.WEBINAR_DELETED_FOR_ME,
22
+ ];
23
+ },
20
24
  },
21
25
  },
22
26
  methods: {
27
+ ...common.methods,
23
28
  emitEvent(payload, object) {
24
29
  const meta = this.generateMeta(object);
25
30
  this.$emit({
@@ -1,30 +1,36 @@
1
1
  import common from "../common/common.mjs";
2
+ import constants from "../common/constants.mjs";
2
3
 
3
4
  export default {
4
5
  ...common,
5
6
  key: "zoom-webinar-ended",
6
7
  name: "Webinar Ended (Instant)",
7
8
  description: "Emit new event each time a webinar ends where you're the host",
8
- version: "0.0.4",
9
+ version: "0.1.0",
9
10
  type: "source",
10
- dedupe: "unique", // Dedupe based on webinar ID
11
+ dedupe: "unique",
11
12
  props: {
12
13
  ...common.props,
13
- zoomApphook: {
14
+ // eslint-disable-next-line pipedream/props-label, pipedream/props-description
15
+ apphook: {
14
16
  type: "$.interface.apphook",
15
- appProp: "zoom",
16
- eventNames: [
17
- "webinar.ended",
18
- ],
17
+ appProp: "app",
18
+ eventNames() {
19
+ return [
20
+ constants.CUSTOM_EVENT_TYPES.WEBINAR_ENDED,
21
+ ];
22
+ },
19
23
  },
20
24
  },
21
25
  hooks: {
22
26
  async deploy() {
23
- const { webinars } = await this.zoom.listWebinarMetrics({
24
- from: this.monthAgo(),
25
- to: new Date().toISOString()
26
- .slice(0, 10),
27
- page_size: 25,
27
+ const { webinars } = await this.app.listWebinarMetrics({
28
+ params: {
29
+ from: this.monthAgo(),
30
+ to: new Date().toISOString()
31
+ .slice(0, 10),
32
+ page_size: 25,
33
+ },
28
34
  });
29
35
  if (!webinars || webinars.length === 0) {
30
36
  return;
@@ -45,7 +51,7 @@ export default {
45
51
  emitEvent(payload, object) {
46
52
  const meta = this.generateMeta(object);
47
53
  this.$emit({
48
- event: "webinar.ended",
54
+ event: constants.CUSTOM_EVENT_TYPES.WEBINAR_ENDED,
49
55
  payload,
50
56
  }, meta);
51
57
  },
@@ -1,27 +1,33 @@
1
1
  import common from "../common/common.mjs";
2
+ import constants from "../common/constants.mjs";
2
3
 
3
4
  export default {
4
5
  ...common,
5
6
  key: "zoom-webinar-started",
6
7
  name: "Webinar Started (Instant)",
7
8
  description: "Emit new event each time a webinar starts where you're the host",
8
- version: "0.0.4",
9
+ version: "0.1.0",
9
10
  type: "source",
10
- dedupe: "unique", // Dedupe based on webinar ID
11
+ dedupe: "unique",
11
12
  props: {
12
13
  ...common.props,
13
- zoomApphook: {
14
+ // eslint-disable-next-line pipedream/props-label, pipedream/props-description
15
+ apphook: {
14
16
  type: "$.interface.apphook",
15
- appProp: "zoom",
16
- eventNames: [
17
- "webinar.started",
18
- ],
17
+ appProp: "app",
18
+ eventNames() {
19
+ return [
20
+ constants.CUSTOM_EVENT_TYPES.WEBINAR_STARTED,
21
+ ];
22
+ },
19
23
  },
20
24
  },
21
25
  hooks: {
22
26
  async deploy() {
23
- const { webinars } = await this.zoom.listWebinars({
24
- page_size: 25,
27
+ const { webinars } = await this.app.listWebinars({
28
+ params: {
29
+ page_size: 25,
30
+ },
25
31
  });
26
32
  if (!webinars || webinars.length === 0) {
27
33
  return;
@@ -43,7 +49,7 @@ export default {
43
49
  emitEvent(payload, object) {
44
50
  const meta = this.generateMeta(object);
45
51
  this.$emit({
46
- event: "webinar.started",
52
+ event: constants.CUSTOM_EVENT_TYPES.WEBINAR_STARTED,
47
53
  payload,
48
54
  }, meta);
49
55
  },
@@ -1,27 +1,33 @@
1
1
  import common from "../common/common.mjs";
2
+ import constants from "../common/constants.mjs";
2
3
 
3
4
  export default {
4
5
  ...common,
5
6
  key: "zoom-webinar-updated",
6
7
  name: "Webinar Updated (Instant)",
7
8
  description: "Emit new event each time a webinar is updated where you're the host",
8
- version: "0.0.4",
9
+ version: "0.1.0",
9
10
  type: "source",
10
- dedupe: "unique", // Dedupe based on webinar ID & timestamp
11
+ dedupe: "unique",
11
12
  props: {
12
13
  ...common.props,
13
- zoomApphook: {
14
+ // eslint-disable-next-line pipedream/props-label, pipedream/props-description
15
+ apphook: {
14
16
  type: "$.interface.apphook",
15
- appProp: "zoom",
16
- eventNames: [
17
- "webinar.updated",
18
- ],
17
+ appProp: "app",
18
+ eventNames() {
19
+ return [
20
+ constants.CUSTOM_EVENT_TYPES.WEBINAR_UPDATED,
21
+ ];
22
+ },
19
23
  },
20
24
  },
21
25
  hooks: {
22
26
  async deploy() {
23
- const { webinars } = await this.zoom.listWebinars({
24
- page_size: 25,
27
+ const { webinars } = await this.app.listWebinars({
28
+ params: {
29
+ page_size: 25,
30
+ },
25
31
  });
26
32
  if (!webinars || webinars.length === 0) {
27
33
  return;
@@ -40,7 +46,7 @@ export default {
40
46
  emitEvent(payload, object) {
41
47
  const meta = this.generateMeta(payload, object);
42
48
  this.$emit({
43
- event: "webinar.updated",
49
+ event: constants.CUSTOM_EVENT_TYPES.WEBINAR_UPDATED,
44
50
  payload,
45
51
  }, meta);
46
52
  },