Skip to content

Commit 47e9127

Browse files
committed
Update Zoom component versions and enhance URL encoding
- Bumped versions for multiple Zoom actions and components, including `get-meeting-details`, `list-past-webinar-qa`, `update-meeting`, and others. - Introduced a new utility function `doubleEncode` for improved URL encoding of meeting and webinar IDs. - Updated API request paths to utilize the new encoding function, ensuring proper handling of special characters in IDs. - Enhanced the `zoom` and `zoom_admin` components for better functionality and compliance with API specifications.
1 parent 1c54013 commit 47e9127

File tree

30 files changed

+89
-53
lines changed

30 files changed

+89
-53
lines changed

components/zoom/actions/get-meeting-details/get-meeting-details.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// legacy_hash_id: a_Xzi12a
22
import { axios } from "@pipedream/platform";
3+
import utils from "../../common/utils.mjs";
34

45
export default {
56
key: "zoom-get-meeting-details",
67
name: "Get Meeting Details",
78
description: "Retrieves the details of a meeting.",
8-
version: "0.3.5",
9+
version: "0.3.6",
910
annotations: {
1011
destructiveHint: false,
1112
openWorldHint: true,
@@ -30,7 +31,7 @@ export default {
3031
async run({ $ }) {
3132
//See the API docs here: https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meeting
3233
const config = {
33-
url: `https://api.zoom.us/v2/meetings/${this.meeting_id}`,
34+
url: `https://api.zoom.us/v2/meetings/${utils.doubleEncode(this.meeting_id)}`,
3435
params: {
3536
occurrence_id: this.occurrence_id,
3637
},

components/zoom/actions/list-past-webinar-qa/list-past-webinar-qa.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// legacy_hash_id: a_67iQp1
22
import { axios } from "@pipedream/platform";
3+
import utils from "../../common/utils.mjs";
34

45
export default {
56
key: "zoom-list-past-webinar-qa",
67
name: "List Past Webinar Q&A",
78
description: "The feature for Webinars allows attendees to ask questions during the Webinar and for the panelists, co-hosts and host to answer their questions. Use this API to list Q&A of a specific Webinar.",
8-
version: "0.1.5",
9+
version: "0.1.6",
910
annotations: {
1011
destructiveHint: false,
1112
openWorldHint: true,
@@ -25,7 +26,7 @@ export default {
2526
},
2627
async run({ $ }) {
2728
const config = {
28-
url: `https://api.zoom.us/v2/past_webinars/${this.webinarID}/qa`,
29+
url: `https://api.zoom.us/v2/past_webinars/${utils.doubleEncode(this.webinarID)}/qa`,
2930
headers: {
3031
Authorization: `Bearer ${this.zoom.$auth.oauth_access_token}`,
3132
},

components/zoom/actions/update-meeting/update-meeting.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// legacy_hash_id: a_52iXNQ
22
import { axios } from "@pipedream/platform";
3+
import utils from "../../common/utils.mjs";
34

45
export default {
56
key: "zoom-update-meeting",
67
name: "Update Meeting",
78
description: "Updates an existing Zoom meeting",
8-
version: "0.1.5",
9+
version: "0.1.6",
910
annotations: {
1011
destructiveHint: true,
1112
openWorldHint: true,
@@ -77,7 +78,7 @@ export default {
7778
// API docs: https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingupdate
7879
const config = {
7980
method: "PATCH",
80-
url: `https://api.zoom.us/v2/meetings/${this.meetingId}`,
81+
url: `https://api.zoom.us/v2/meetings/${utils.doubleEncode(this.meetingId)}`,
8182
data: {
8283
topic: this.topic,
8384
type: this.type,

components/zoom/actions/update-webinar/update-webinar.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// legacy_hash_id: a_Q3irlY
22
import { axios } from "@pipedream/platform";
3+
import utils from "../../common/utils.mjs";
34

45
export default {
56
key: "zoom-update-webinar",
67
name: "Update Webinar",
78
description: "Update a webinar's topic, start time, or other settings",
8-
version: "0.1.5",
9+
version: "0.1.6",
910
annotations: {
1011
destructiveHint: true,
1112
openWorldHint: true,
@@ -77,7 +78,7 @@ export default {
7778
// API docs: https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingupdate
7879
const config = {
7980
method: "PATCH",
80-
url: `https://api.zoom.us/v2/webinars/${this.webinarID}`,
81+
url: `https://api.zoom.us/v2/webinars/${utils.doubleEncode(this.webinarID)}`,
8182
data: {
8283
topic: this.topic,
8384
type: this.type,

components/zoom/common/utils.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ function summaryEnd(count, singular, plural) {
1414
return `${count} ${noun}`;
1515
}
1616

17+
function doubleEncode(value) {
18+
if (value.startsWith("/") || value.includes("//")) {
19+
return encodeURIComponent(encodeURIComponent(value));
20+
}
21+
return value;
22+
}
23+
1724
export default {
1825
streamIterator,
1926
summaryEnd,
27+
doubleEncode,
2028
};

components/zoom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/zoom",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "Pipedream Zoom Components",
55
"main": "zoom.app.mjs",
66
"keywords": [

components/zoom/sources/meeting-ended/meeting-ended.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "zoom-meeting-ended",
77
name: "Meeting Ended (Instant)",
88
description: "Emit new event each time a meeting ends where you're the host",
9-
version: "0.1.3",
9+
version: "0.1.4",
1010
type: "source",
1111
dedupe: "unique",
1212
props: {

components/zoom/zoom.app.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { axios } from "@pipedream/platform";
22
import constants from "./common/constants.mjs";
3+
import utils from "./common/utils.mjs";
34

45
export default {
56
type: "app",
@@ -31,7 +32,7 @@ export default {
3132
},
3233
},
3334
meetingId: {
34-
type: "integer",
35+
type: "string",
3536
label: "Meeting ID",
3637
description: "The meeting ID to get details for.",
3738
async options({ prevContext }) {
@@ -246,7 +247,7 @@ export default {
246247
meetingId, ...args
247248
} = {}) {
248249
return this._makeRequest({
249-
path: `/past_meetings/${meetingId}`,
250+
path: `/past_meetings/${utils.doubleEncode(meetingId)}`,
250251
...args,
251252
});
252253
},

components/zoom_admin/actions/add-meeting-registrant/add-meeting-registrant.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { axios } from "@pipedream/platform";
22
import get from "lodash/get.js";
33
import isArray from "lodash/isArray.js";
4+
import { doubleEncode } from "../../utils.mjs";
45
import zoomAdmin from "../../zoom_admin.app.mjs";
56

67
export default {
78
name: "Add meeting registrant",
89
description: "Register a participant for a meeting. [See the documentation](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingregistrantcreate)",
910
key: "zoom_admin-add-meeting-registrant",
10-
version: "0.1.7",
11+
version: "0.1.8",
1112
annotations: {
1213
destructiveHint: false,
1314
openWorldHint: true,
@@ -59,7 +60,7 @@ export default {
5960
async run ({ $ }) {
6061
const res = await axios($, this.zoomAdmin._getAxiosParams({
6162
method: "POST",
62-
path: `/meetings/${get(this.meeting, "value", this.meeting)}/registrants`,
63+
path: `/meetings/${doubleEncode(get(this.meeting, "value", this.meeting))}/registrants`,
6364
params: {
6465
occurrence_ids: isArray(this.occurrence)
6566
? this.occurrence.map((occurrence) => get(occurrence, "value", occurrence)).join(",")

components/zoom_admin/actions/add-webinar-panelist/add-webinar-panelist.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { axios } from "@pipedream/platform";
22
import get from "lodash/get.js";
3+
import { doubleEncode } from "../../utils.mjs";
34
import zoomAdmin from "../../zoom_admin.app.mjs";
45

56
export default {
67
name: "Add webinar panelist",
78
description: "Register a panelist for a webinar. [See the documentation](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarpanelistcreate)",
89
key: "zoom_admin-add-webinar-panelist",
9-
version: "0.1.8",
10+
version: "0.1.9",
1011
annotations: {
1112
destructiveHint: false,
1213
openWorldHint: true,
@@ -35,7 +36,7 @@ export default {
3536
async run ({ $ }) {
3637
const res = await axios($, this.zoomAdmin._getAxiosParams({
3738
method: "POST",
38-
path: `/webinars/${get(this.webinar, "value", this.webinar)}/panelists`,
39+
path: `/webinars/${doubleEncode(get(this.webinar, "value", this.webinar))}/panelists`,
3940
data: {
4041
panelists: [
4142
{

0 commit comments

Comments
 (0)