@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,143 +1,192 @@
1
- // legacy_hash_id: a_zNiweO
2
- import { axios } from "@pipedream/platform";
1
+ import app from "../../zoom.app.mjs";
3
2
 
4
3
  export default {
5
4
  key: "zoom-add-meeting-registrant",
6
5
  name: "Add Meeting Registrant",
7
- description: "Registers a participant for a meeting.",
8
- version: "0.2.1",
6
+ description: "Registers a participant for a meeting. [See the docs here](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetingRegistrantCreate)",
7
+ version: "0.3.0",
9
8
  type: "action",
10
9
  props: {
11
- zoom: {
12
- type: "app",
13
- app: "zoom",
14
- },
15
- meeting_id: {
16
- type: "string",
17
- description: "The meeting ID.",
18
- },
19
- occurrence_ids: {
20
- type: "string",
21
- description: "Occurrence IDs. You can find these with the meeting get API. Multiple values separated by comma.",
22
- optional: true,
10
+ app,
11
+ meetingId: {
12
+ propDefinition: [
13
+ app,
14
+ "meetingId",
15
+ ],
16
+ },
17
+ occurrenceIds: {
18
+ propDefinition: [
19
+ app,
20
+ "occurrenceIds",
21
+ ],
23
22
  },
24
23
  email: {
25
- type: "string",
26
- description: "A valid email address of the registrant.",
27
- },
28
- first_name: {
29
- type: "string",
30
- description: "Registrant's first name.",
31
- },
32
- last_name: {
33
- type: "string",
34
- description: "Registrant's last name.",
24
+ propDefinition: [
25
+ app,
26
+ "email",
27
+ ],
28
+ },
29
+ firstName: {
30
+ propDefinition: [
31
+ app,
32
+ "firstName",
33
+ ],
34
+ },
35
+ lastName: {
36
+ propDefinition: [
37
+ app,
38
+ "lastName",
39
+ ],
35
40
  },
36
41
  address: {
37
- type: "string",
38
- description: "Registrant's address.",
39
- optional: true,
42
+ propDefinition: [
43
+ app,
44
+ "address",
45
+ ],
40
46
  },
41
47
  city: {
42
- type: "string",
43
- description: "Registrant's city.",
44
- optional: true,
48
+ propDefinition: [
49
+ app,
50
+ "city",
51
+ ],
45
52
  },
46
53
  country: {
47
- type: "string",
48
- description: "Registrant's country.",
49
- optional: true,
54
+ propDefinition: [
55
+ app,
56
+ "country",
57
+ ],
50
58
  },
51
59
  zip: {
52
- type: "string",
53
- description: "Registrant's Zip/Postal code.",
54
- optional: true,
60
+ propDefinition: [
61
+ app,
62
+ "zip",
63
+ ],
55
64
  },
56
65
  state: {
57
- type: "string",
58
- description: "Registrant's State/Province.",
59
- optional: true,
66
+ propDefinition: [
67
+ app,
68
+ "state",
69
+ ],
60
70
  },
61
71
  phone: {
62
- type: "string",
63
- description: "Registrant's Phone number.",
64
- optional: true,
72
+ propDefinition: [
73
+ app,
74
+ "phone",
75
+ ],
65
76
  },
66
77
  industry: {
67
- type: "string",
68
- description: "Registrant's industry.",
69
- optional: true,
78
+ propDefinition: [
79
+ app,
80
+ "industry",
81
+ ],
70
82
  },
71
83
  org: {
72
- type: "string",
73
- description: "Registrant's Organization.",
74
- optional: true,
75
- },
76
- job_title: {
77
- type: "string",
78
- description: "Registrant's job title.",
79
- optional: true,
80
- },
81
- purchasing_time_frame: {
82
- type: "string",
83
- description: "This field can be included to gauge interest of webinar attendees towards buying your product or service.",
84
- optional: true,
85
- },
86
- role_in_purchase_process: {
87
- type: "string",
88
- description: "Role in Purchase Process.",
89
- optional: true,
90
- },
91
- no_of_employees: {
92
- type: "string",
93
- description: "Number of Employees.",
94
- optional: true,
84
+ propDefinition: [
85
+ app,
86
+ "org",
87
+ ],
88
+ },
89
+ jobTitle: {
90
+ propDefinition: [
91
+ app,
92
+ "jobTitle",
93
+ ],
94
+ },
95
+ purchasingTimeFrame: {
96
+ propDefinition: [
97
+ app,
98
+ "purchasingTimeFrame",
99
+ ],
100
+ },
101
+ roleInPurchaseProcess: {
102
+ propDefinition: [
103
+ app,
104
+ "roleInPurchaseProcess",
105
+ ],
106
+ },
107
+ noOfEmployees: {
108
+ propDefinition: [
109
+ app,
110
+ "noOfEmployees",
111
+ ],
95
112
  },
96
113
  comments: {
97
- type: "string",
98
- description: "A field that allows registrants to provide any questions or comments that they might have.",
99
- optional: true,
114
+ propDefinition: [
115
+ app,
116
+ "comments",
117
+ ],
118
+ },
119
+ customQuestions: {
120
+ propDefinition: [
121
+ app,
122
+ "customQuestions",
123
+ ],
100
124
  },
101
- custom_questions: {
102
- type: "any",
103
- description: "Custom questions.",
104
- optional: true,
125
+ },
126
+ methods: {
127
+ addMeetingRegistrant({
128
+ meetingId, ...args
129
+ } = {}) {
130
+ return this.app.create({
131
+ path: `/meetings/${meetingId}/registrants`,
132
+ ...args,
133
+ });
105
134
  },
106
135
  },
107
- async run({ $ }) {
108
- //See the API docs here: https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingregistrantcreate
109
- const config = {
110
- method: "post",
111
- url: `https://api.zoom.us/v2/meetings/${this.meeting_id}/registrants`,
136
+ async run({ $: step }) {
137
+ const {
138
+ meetingId,
139
+ occurrenceIds,
140
+ email,
141
+ firstName,
142
+ lastName,
143
+ address,
144
+ city,
145
+ country,
146
+ zip,
147
+ state,
148
+ phone,
149
+ industry,
150
+ org,
151
+ jobTitle,
152
+ purchasingTimeFrame,
153
+ roleInPurchaseProcess,
154
+ noOfEmployees,
155
+ comments,
156
+ customQuestions,
157
+ } = this;
158
+
159
+ const response = await this.addMeetingRegistrant({
160
+ step,
161
+ meetingId,
112
162
  params: {
113
- occurrence_ids: this.occurrence_ids,
163
+ occurrence_ids: occurrenceIds,
114
164
  },
115
165
  data: {
116
- email: this.email,
117
- first_name: this.first_name,
118
- last_name: this.last_name,
119
- address: this.address,
120
- city: this.city,
121
- country: this.country,
122
- zip: this.zip,
123
- state: this.state,
124
- phone: this.phone,
125
- industry: this.industry,
126
- org: this.org,
127
- job_title: this.job_title,
128
- purchasing_time_frame: this.purchasing_time_frame,
129
- role_in_purchase_process: this.role_in_purchase_process,
130
- no_of_employees: this.no_of_employees,
131
- comments: this.comments,
132
- custom_questions: typeof this.custom_questions == "undefined"
133
- ? this.custom_questions
134
- : JSON.parse(this.custom_questions),
135
- },
136
- headers: {
137
- "Authorization": `Bearer ${this.zoom.$auth.oauth_access_token}`,
138
- "Content-Type": "application/json",
166
+ email,
167
+ first_name: firstName,
168
+ last_name: lastName,
169
+ address,
170
+ city,
171
+ country,
172
+ zip,
173
+ state,
174
+ phone,
175
+ industry,
176
+ org,
177
+ job_title: jobTitle,
178
+ purchasing_time_frame: purchasingTimeFrame,
179
+ role_in_purchase_process: roleInPurchaseProcess,
180
+ no_of_employees: noOfEmployees,
181
+ comments,
182
+ custom_questions: typeof(customQuestions) === "undefined"
183
+ ? customQuestions
184
+ : JSON.parse(customQuestions),
139
185
  },
140
- };
141
- return await axios($, config);
186
+ });
187
+
188
+ step.export("$summary", `Successfully added registrant to meeting with ID \`${response.id}\``);
189
+
190
+ return response;
142
191
  },
143
192
  };
@@ -1,143 +1,192 @@
1
- // legacy_hash_id: a_YEiPgP
2
- import { axios } from "@pipedream/platform";
1
+ import app from "../../zoom.app.mjs";
3
2
 
4
3
  export default {
5
4
  key: "zoom-add-webinar-registrant",
6
5
  name: "Add Webinar Registrant",
7
- description: "Registers a participant for a webinar.",
8
- version: "0.2.1",
6
+ description: "Registers a participant for a webinar. [See the docs here](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarregistrantcreate).",
7
+ version: "0.3.0",
9
8
  type: "action",
10
9
  props: {
11
- zoom: {
12
- type: "app",
13
- app: "zoom",
14
- },
15
- webinar_id: {
16
- type: "string",
17
- description: "The webinar ID.",
18
- },
19
- occurrence_ids: {
20
- type: "string",
21
- description: "Occurrence IDs. You can find these with the meeting get API. Multiple values separated by comma.",
22
- optional: true,
10
+ app,
11
+ webinarId: {
12
+ propDefinition: [
13
+ app,
14
+ "webinarId",
15
+ ],
16
+ },
17
+ occurrenceIds: {
18
+ propDefinition: [
19
+ app,
20
+ "occurrenceIds",
21
+ ],
23
22
  },
24
23
  email: {
25
- type: "string",
26
- description: "A valid email address of the registrant.",
27
- },
28
- first_name: {
29
- type: "string",
30
- description: "Registrant's first name.",
31
- },
32
- last_name: {
33
- type: "string",
34
- description: "Registrant's last name.",
24
+ propDefinition: [
25
+ app,
26
+ "email",
27
+ ],
28
+ },
29
+ firstName: {
30
+ propDefinition: [
31
+ app,
32
+ "firstName",
33
+ ],
34
+ },
35
+ lastName: {
36
+ propDefinition: [
37
+ app,
38
+ "lastName",
39
+ ],
35
40
  },
36
41
  address: {
37
- type: "string",
38
- description: "Registrant's address.",
39
- optional: true,
42
+ propDefinition: [
43
+ app,
44
+ "address",
45
+ ],
40
46
  },
41
47
  city: {
42
- type: "string",
43
- description: "Registrant's city.",
44
- optional: true,
48
+ propDefinition: [
49
+ app,
50
+ "city",
51
+ ],
45
52
  },
46
53
  country: {
47
- type: "string",
48
- description: "Registrant's country.",
49
- optional: true,
54
+ propDefinition: [
55
+ app,
56
+ "country",
57
+ ],
50
58
  },
51
59
  zip: {
52
- type: "string",
53
- description: "Registrant's Zip/Postal code.",
54
- optional: true,
60
+ propDefinition: [
61
+ app,
62
+ "zip",
63
+ ],
55
64
  },
56
65
  state: {
57
- type: "string",
58
- description: "Registrant's State/Province.",
59
- optional: true,
66
+ propDefinition: [
67
+ app,
68
+ "state",
69
+ ],
60
70
  },
61
71
  phone: {
62
- type: "string",
63
- description: "Registrant's Phone number.",
64
- optional: true,
72
+ propDefinition: [
73
+ app,
74
+ "phone",
75
+ ],
65
76
  },
66
77
  industry: {
67
- type: "string",
68
- description: "Registrant's industry.",
69
- optional: true,
78
+ propDefinition: [
79
+ app,
80
+ "industry",
81
+ ],
70
82
  },
71
83
  org: {
72
- type: "string",
73
- description: "Registrant's Organization.",
74
- optional: true,
75
- },
76
- job_title: {
77
- type: "string",
78
- description: "Registrant's job title.",
79
- optional: true,
80
- },
81
- purchasing_time_frame: {
82
- type: "string",
83
- description: "This field can be included to gauge interest of webinar attendees towards buying your product or service.",
84
- optional: true,
85
- },
86
- role_in_purchase_process: {
87
- type: "string",
88
- description: "Role in Purchase Process.",
89
- optional: true,
90
- },
91
- no_of_employees: {
92
- type: "string",
93
- description: "Number of Employees.",
94
- optional: true,
84
+ propDefinition: [
85
+ app,
86
+ "org",
87
+ ],
88
+ },
89
+ jobTitle: {
90
+ propDefinition: [
91
+ app,
92
+ "jobTitle",
93
+ ],
94
+ },
95
+ purchasingTimeFrame: {
96
+ propDefinition: [
97
+ app,
98
+ "purchasingTimeFrame",
99
+ ],
100
+ },
101
+ roleInPurchaseProcess: {
102
+ propDefinition: [
103
+ app,
104
+ "roleInPurchaseProcess",
105
+ ],
106
+ },
107
+ noOfEmployees: {
108
+ propDefinition: [
109
+ app,
110
+ "noOfEmployees",
111
+ ],
95
112
  },
96
113
  comments: {
97
- type: "string",
98
- description: "A field that allows registrants to provide any questions or comments that they might have.",
99
- optional: true,
114
+ propDefinition: [
115
+ app,
116
+ "comments",
117
+ ],
118
+ },
119
+ customQuestions: {
120
+ propDefinition: [
121
+ app,
122
+ "customQuestions",
123
+ ],
100
124
  },
101
- custom_questions: {
102
- type: "any",
103
- description: "Custom questions.",
104
- optional: true,
125
+ },
126
+ methods: {
127
+ addWebinarRegistrant({
128
+ webinarId, ...args
129
+ } = {}) {
130
+ return this.app.create({
131
+ path: `/webinars/${webinarId}/registrants`,
132
+ ...args,
133
+ });
105
134
  },
106
135
  },
107
- async run({ $ }) {
108
- //See the API docs here: https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarregistrantcreate
109
- const config = {
110
- method: "post",
111
- url: `https://api.zoom.us/v2/webinars/${this.webinar_id}/registrants`,
136
+ async run({ $: step }) {
137
+ const {
138
+ webinarId,
139
+ occurrenceIds,
140
+ email,
141
+ firstName,
142
+ lastName,
143
+ address,
144
+ city,
145
+ country,
146
+ zip,
147
+ state,
148
+ phone,
149
+ industry,
150
+ org,
151
+ jobTitle,
152
+ purchasingTimeFrame,
153
+ roleInPurchaseProcess,
154
+ noOfEmployees,
155
+ comments,
156
+ customQuestions,
157
+ } = this;
158
+
159
+ const response = await this.addWebinarRegistrant({
160
+ step,
161
+ webinarId,
112
162
  params: {
113
- occurrence_ids: this.occurrence_ids,
163
+ occurrence_ids: occurrenceIds,
114
164
  },
115
165
  data: {
116
- email: this.email,
117
- first_name: this.first_name,
118
- last_name: this.last_name,
119
- address: this.address,
120
- city: this.city,
121
- country: this.country,
122
- zip: this.zip,
123
- state: this.state,
124
- phone: this.phone,
125
- industry: this.industry,
126
- org: this.org,
127
- job_title: this.job_title,
128
- purchasing_time_frame: this.purchasing_time_frame,
129
- role_in_purchase_process: this.role_in_purchase_process,
130
- no_of_employees: this.no_of_employees,
131
- comments: this.comments,
132
- custom_questions: typeof this.custom_questions == "undefined"
133
- ? this.custom_questions
134
- : JSON.parse(this.custom_questions),
135
- },
136
- headers: {
137
- "Authorization": `Bearer ${this.zoom.$auth.oauth_access_token}`,
138
- "Content-Type": "application/json",
166
+ email,
167
+ first_name: firstName,
168
+ last_name: lastName,
169
+ address,
170
+ city,
171
+ country,
172
+ zip,
173
+ state,
174
+ phone,
175
+ industry,
176
+ org,
177
+ job_title: jobTitle,
178
+ purchasing_time_frame: purchasingTimeFrame,
179
+ role_in_purchase_process: roleInPurchaseProcess,
180
+ no_of_employees: noOfEmployees,
181
+ comments,
182
+ custom_questions: typeof(customQuestions) === "undefined"
183
+ ? customQuestions
184
+ : JSON.parse(customQuestions),
139
185
  },
140
- };
141
- return await axios($, config);
186
+ });
187
+
188
+ step.export("$summary", `Successfully added registrant to webinar with ID \`${response.id}\``);
189
+
190
+ return response;
142
191
  },
143
192
  };
@@ -1,38 +1,52 @@
1
- // legacy_hash_id: a_WYie0m
2
- import { axios } from "@pipedream/platform";
1
+ import app from "../../zoom.app.mjs";
3
2
 
4
3
  export default {
5
4
  key: "zoom-get-webinar-details",
6
5
  name: "Get Webinar Details",
7
- description: "Gets details of a scheduled webinar.",
8
- version: "0.2.1",
6
+ description: "Gets details of a scheduled webinar. [See the docs here](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/webinar).",
7
+ version: "0.3.0",
9
8
  type: "action",
10
9
  props: {
11
- zoom: {
12
- type: "app",
13
- app: "zoom",
10
+ app,
11
+ webinarId: {
12
+ propDefinition: [
13
+ app,
14
+ "webinarId",
15
+ ],
14
16
  },
15
- webinar_id: {
16
- type: "integer",
17
- description: "The webinar ID.",
18
- },
19
- occurrence_id: {
17
+ occurrenceId: {
20
18
  type: "string",
19
+ label: "Occurrence ID",
21
20
  description: "Unique Identifier that identifies an occurrence of a recurring webinar. Recurring webinars can have a maximum of 50 occurrences.",
22
21
  optional: true,
23
22
  },
24
23
  },
25
- async run({ $ }) {
26
- //See the API docs here: https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinar
27
- const config = {
28
- url: `https://api.zoom.us/v2/webinars/${this.webinar_id}`,
24
+ methods: {
25
+ getWebinarDetails({
26
+ webinarId, ...args
27
+ } = {}) {
28
+ return this.app._makeRequest({
29
+ path: `/webinars/${webinarId}`,
30
+ ...args,
31
+ });
32
+ },
33
+ },
34
+ async run({ $: step }) {
35
+ const {
36
+ webinarId,
37
+ occurrenceId,
38
+ } = this;
39
+
40
+ const response = await this.getWebinarDetails({
41
+ step,
42
+ webinarId,
29
43
  params: {
30
- occurrence_id: this.occurrence_id,
44
+ occurrence_id: occurrenceId,
31
45
  },
32
- headers: {
33
- Authorization: `Bearer ${this.zoom.$auth.oauth_access_token}`,
34
- },
35
- };
36
- return await axios($, config);
46
+ });
47
+
48
+ step.export("$summary", `Successfully retrieved webinar details with ID \`${response.id}\``);
49
+
50
+ return response;
37
51
  },
38
52
  };