Skip to content

[Components] zoom_admin - new components #16967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 17, 2025
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,70 @@
import { paginate } from "../../common/pagination.mjs";
import consts from "../../consts.mjs";
import zoomAdmin from "../../zoom_admin.app.mjs";

export default {
name: "List User Cloud Recordings",
description: "Search cloud recordings from a user. [See the documentation](https://developers.zoom.us/docs/api/users/#tag/users/GET/users/{userId}/recordings)",
key: "zoom_admin-list-user-cloud-recordings",
version: "0.0.1",
type: "action",
props: {
zoomAdmin,
userId: {
type: "string",
label: "User ID",
description: "The user ID to get recordings for",
},
mc: {
type: "string",
label: "MC",
description: "Query Metadata of Recording if an On-Premise Meeting Connector was used for the meeting.",
optional: true,
},
trash: {
type: "boolean",
label: "Trash",
description: "If `true`, list recordings from trash",
optional: true,
},
trashType: {
type: "string",
label: "Trash Type",
description: "Should be used together with `Trash`. The type of Cloud recording that you would like to retrieve from trash",
optional: true,
options: consts.CLOUD_RECORD_TRASH_TYPE_OPTIONS,
},
from: {
type: "string",
label: "From",
description: "The start date in `yyyy-mm-dd` UTC format for the date range for which you would like to retrieve recordings. The maximum range can be a month. If no value is provided for this field, the default will be current date.",
optional: true,
},
to: {
type: "string",
label: "To",
description: "End date in `yyyy-mm-dd` UTC format.",
optional: true,
},
},
async run({ $ }) {
const params = {
mc: this.mc,
trash: this.trash,
trash_type: this.trashType,
from: this.from,
to: this.to,
};

const data = await paginate(
this.zoomAdmin.listUserCloudRecordings,
"meetings",
this.userId,
params,
);

$.export("$summary", `${data.length} Cloud record(s) successfully fetched`);

return data;
},
};
114 changes: 114 additions & 0 deletions components/zoom_admin/actions/list-users/list-users.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import { paginate } from "../../common/pagination.mjs";
import zoomAdmin from "../../zoom_admin.app.mjs";

export default {
name: "List users",
description: "List all users. [See the documentation](https://developers.zoom.us/docs/api/users/#tag/users/GET/users)",
key: "zoom_admin-list-users",
version: "0.0.1",
type: "action",
props: {
zoomAdmin,
status: {
type: "string",
label: "Status",
description: "The user's status",
optional: true,
default: "active",
options: [
{
label: "Active",
value: "active",
},
{
label: "Inactive",
value: "inactive",
},
{
label: "Pending",
value: "pending",
},
],
},
pageSize: {
type: "integer",
label: "Page Size",
description: "The number of records returned within a single API call",
optional: true,
default: 30,
min: 1,
max: 2000,
},
roleId: {
type: "string",
label: "Role ID",
description: "The role's unique ID to filter users by a specific role",
optional: true,
},
pageNumber: {
type: "string",
label: "Page Number",
description: "The page number of the current page in the returned records",
optional: true,
},
includeFields: {
type: "string",
label: "Include Fields",
description: "Additional fields to include in the response",
optional: true,
options: [
{
label: "Custom Attributes",
value: "custom_attributes",
},
{
label: "Host Key",
value: "host_key",
},
],
},
nextPageToken: {
type: "string",
label: "Next Page Token",
description: "Token for paginating through large result sets (expires in 15 minutes)",
optional: true,
},
license: {
type: "string",
label: "License",
description: "Filter users by specific license",
optional: true,
options: [
{
label: "Zoom Workforce Management",
value: "zoom_workforce_management",
},
{
label: "Zoom Compliance Management",
value: "zoom_compliance_management",
},
],
},
},
async run({ $ }) {
const params = {
status: this.status,
page_size: this.pageSize,
role_id: this.roleId,
page_number: this.pageNumber,
include_fields: this.includeFields,
next_page_token: this.nextPageToken,
license: this.license,
};

const data = await paginate(
this.zoomAdmin.listUsers,
"users",
params,
);

$.export("$summary", `Successfully fetched ${data.length} user(s)`);

return data;
},
};
2 changes: 1 addition & 1 deletion 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.9.0",
"version": "0.10.0",
"description": "Pipedream Zoom_admin Components",
"main": "zoom_admin.app.mjs",
"keywords": [
Expand Down
21 changes: 21 additions & 0 deletions components/zoom_admin/zoom_admin.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,16 @@ export default {
});
return data;
},
async listUserCloudRecordings(userId, params) {
const { data } = await this._makeRequest({
path: `/users/${userId}/recordings`,
params: {
page_size: 100,
...params,
},
});
return data;
},
async listMeetingRegistrants(meetingId, params, nextPageToken) {
const { data } = await this._makeRequest({
path: `/meetings/${meetingId}/registrants`,
Expand Down Expand Up @@ -391,6 +401,17 @@ export default {
});
return data;
},
async listUsers(params, nextPageToken) {
const { data } = await this._makeRequest({
path: "/users",
params: {
page_size: 100,
next_page_token: nextPageToken,
...params,
},
});
return data;
},
async listPastMeetingParticipants(meetingId, nextPageToken) {
const { data } = await this._makeRequest({
path: `/past_meetings/${meetingId}/participants`,
Expand Down
Loading