@dereekb/zoom 13.4.0 → 13.4.2

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.
@@ -2,7 +2,13 @@ import { type ModuleMetadata } from '@nestjs/common';
2
2
  import { ConfigService } from '@nestjs/config';
3
3
  import { ZoomServiceConfig } from './zoom.config';
4
4
  import { type Maybe } from '@dereekb/util';
5
- export declare function zoomServiceConfigFactory(configService: ConfigService): ZoomServiceConfig;
5
+ /**
6
+ * Default factory function for creating ZoomServiceConfig from ConfigService.
7
+ *
8
+ * @param _configService The NestJS ConfigService (unused currently)
9
+ * @returns A validated ZoomServiceConfig
10
+ */
11
+ export declare function zoomServiceConfigFactory(_configService: ConfigService): ZoomServiceConfig;
6
12
  export interface ProvideAppZoomMetadataConfig extends Pick<ModuleMetadata, 'imports' | 'exports' | 'providers'> {
7
13
  /**
8
14
  * The ZoomModule requires the following dependencies in order to initialze properly:
@@ -15,8 +21,7 @@ export interface ProvideAppZoomMetadataConfig extends Pick<ModuleMetadata, 'impo
15
21
  /**
16
22
  * Convenience function used to generate ModuleMetadata for an app's ZoomModule.
17
23
  *
18
- * @param provide
19
- * @param useFactory
20
- * @returns
24
+ * @param config The configuration for the module metadata
25
+ * @returns Module metadata for the Zoom module
21
26
  */
22
27
  export declare function appZoomModuleMetadata(config: ProvideAppZoomMetadataConfig): ModuleMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/zoom",
3
- "version": "13.4.0",
3
+ "version": "13.4.2",
4
4
  "exports": {
5
5
  "./nestjs": {
6
6
  "module": "./nestjs/index.esm.js",
@@ -17,8 +17,8 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@dereekb/nestjs": "13.4.0",
21
- "@dereekb/util": "13.4.0",
20
+ "@dereekb/nestjs": "13.4.2",
21
+ "@dereekb/util": "13.4.2",
22
22
  "@nestjs/common": "^11.1.16",
23
23
  "@nestjs/config": "^4.0.3",
24
24
  "express": "^5.0.0",
@@ -35,5 +35,18 @@ export declare function serverAccessToken(context: ZoomOAuthContext): (input?: Z
35
35
  * @returns
36
36
  */
37
37
  export declare function userAccessToken(context: ZoomOAuthContext): (input: ZoomOAuthUserAccessTokenInput) => Promise<ZoomOAuthAccessTokenResponse>;
38
+ /**
39
+ * Builds a FetchJsonInput for Zoom OAuth API calls with Basic auth.
40
+ *
41
+ * @param context The Zoom OAuth context
42
+ * @param input Optional override for client credentials
43
+ * @returns A configured FetchJsonInput for the OAuth API call
44
+ */
38
45
  export declare function zoomOAuthApiFetchJsonInput(context: ZoomOAuthContext, input?: Maybe<ZoomOAuthServerAccessTokenInput>): FetchJsonInput;
46
+ /**
47
+ * Generates a Basic Authorization header value for Zoom OAuth.
48
+ *
49
+ * @param input The client ID and secret pair
50
+ * @returns The Base64-encoded Basic auth header value
51
+ */
39
52
  export declare function zoomOAuthServerBasicAuthorizationHeaderValue(input: ZoomAuthClientIdAndSecretPair): string;
@@ -21,14 +21,14 @@ export interface ZoomOAuthConfig extends ZoomAuthClientIdAndSecretPair, ZoomAcco
21
21
  */
22
22
  readonly accessTokenCache?: Maybe<ZoomAccessTokenCache>;
23
23
  }
24
- export interface ZoomOAuthFetchFactoryInput {
24
+ export interface ZoomOAuthFetchFactoryParams {
25
25
  }
26
- export type ZoomOAuthFetchFactory = FactoryWithInput<ConfiguredFetch, ZoomOAuthFetchFactoryInput>;
27
- export type ZoomOAuthMakeUserAccessTokenFactoryInput = {
26
+ export type ZoomOAuthFetchFactory = FactoryWithInput<ConfiguredFetch, ZoomOAuthFetchFactoryParams>;
27
+ export type ZoomOAuthMakeUserAccessTokenFactoryParams = {
28
28
  readonly refreshToken: ZoomRefreshToken;
29
29
  readonly userAccessTokenCache?: Maybe<ZoomAccessTokenCache>;
30
30
  };
31
- export type ZoomOAuthMakeUserAccessTokenFactory = FactoryWithRequiredInput<ZoomAccessTokenFactory, ZoomOAuthMakeUserAccessTokenFactoryInput>;
31
+ export type ZoomOAuthMakeUserAccessTokenFactory = FactoryWithRequiredInput<ZoomAccessTokenFactory, ZoomOAuthMakeUserAccessTokenFactoryParams>;
32
32
  /**
33
33
  * Context used for performing fetch() and fetchJson() calls with a configured fetch instance.
34
34
  */
@@ -42,3 +42,11 @@ export interface ZoomOAuthContext {
42
42
  export interface ZoomOAuthContextRef {
43
43
  readonly oauthContext: ZoomOAuthContext;
44
44
  }
45
+ /**
46
+ * @deprecated use ZoomOAuthFetchFactoryParams instead.
47
+ */
48
+ export type ZoomOAuthFetchFactoryInput = ZoomOAuthFetchFactoryParams;
49
+ /**
50
+ * @deprecated use ZoomOAuthMakeUserAccessTokenFactoryParams instead.
51
+ */
52
+ export type ZoomOAuthMakeUserAccessTokenFactoryInput = ZoomOAuthMakeUserAccessTokenFactoryParams;
@@ -1,4 +1,4 @@
1
- import { type Maybe } from '@dereekb/util';
1
+ import { type Maybe, type Seconds } from '@dereekb/util';
2
2
  /**
3
3
  * Access token authorization string generated from a refresh token.
4
4
  */
@@ -26,9 +26,9 @@ export interface ZoomAccessToken {
26
26
  */
27
27
  readonly apiDomain: ZoomAccessTokenApiDomain;
28
28
  /**
29
- * Length of time the token is valid for.
29
+ * Length of time the token is valid for, in seconds.
30
30
  */
31
- readonly expiresIn: number;
31
+ readonly expiresIn: Seconds;
32
32
  /**
33
33
  * Date the token expires at.
34
34
  */
@@ -66,6 +66,9 @@ export type ZoomAccessTokenRefresher = ZoomAccessTokenFactory;
66
66
  */
67
67
  export type ZoomAccessTokenStringFactory = () => Promise<ZoomAccessTokenString>;
68
68
  /**
69
- * Generates a new ZoomAccessTokenStringFactory.
69
+ * Generates a new ZoomAccessTokenStringFactory from a ZoomAccessTokenFactory.
70
+ *
71
+ * @param zoomAccessTokenFactory The factory to extract the token string from
72
+ * @returns A factory that returns the access token string
70
73
  */
71
74
  export declare function zoomAccessTokenStringFactory(zoomAccessTokenFactory: ZoomAccessTokenFactory): ZoomAccessTokenStringFactory;
@@ -25,6 +25,19 @@ export declare class ZoomOAuthAuthFailureError extends FetchRequestFactoryError
25
25
  constructor(reason?: string | undefined);
26
26
  }
27
27
  export declare const logZoomOAuthErrorToConsole: import("..").LogZoomServerErrorFunction;
28
+ /**
29
+ * Parses a FetchResponseError into a typed Zoom OAuth error.
30
+ *
31
+ * @param responseError The fetch response error to parse
32
+ * @returns The parsed error, or undefined if parsing fails
33
+ */
28
34
  export declare function parseZoomOAuthError(responseError: FetchResponseError): Promise<ParsedZoomServerError>;
29
- export declare function parseZoomOAuthServerErrorResponseData(zoomServerError: ZoomServerErrorData, responseError: FetchResponseError): ParsedZoomServerError;
35
+ /**
36
+ * Parses a ZoomServerErrorData into a Zoom OAuth-specific error.
37
+ *
38
+ * @param zoomServerError The raw error data from the Zoom API
39
+ * @param responseError The original fetch response error
40
+ * @returns A parsed error, or undefined if the error is unrecognized
41
+ */
42
+ export declare function parseZoomOAuthServerErrorResponseData(zoomServerError: ZoomServerErrorData, responseError: FetchResponseError): FetchRequestFactoryError | import("..").ZoomServerError<ZoomServerErrorData<unknown>> | undefined;
30
43
  export declare const handleZoomOAuthErrorFetch: import("..").HandleZoomErrorFetchFactory;
@@ -7,13 +7,19 @@ export interface ZoomOAuthFactoryConfig {
7
7
  /**
8
8
  * Creates a new fetch instance to use when making calls.
9
9
  */
10
- fetchFactory?: ZoomOAuthFetchFactory;
10
+ readonly fetchFactory?: ZoomOAuthFetchFactory;
11
11
  /**
12
12
  * Custom log error function.
13
13
  */
14
- logZoomServerErrorFunction?: LogZoomServerErrorFunction;
14
+ readonly logZoomServerErrorFunction?: LogZoomServerErrorFunction;
15
15
  }
16
16
  export type ZoomOAuthFactory = (config: ZoomOAuthConfig) => ZoomOAuth;
17
+ /**
18
+ * Creates a ZoomOAuth instance factory from the given configuration.
19
+ *
20
+ * @param factoryConfig Configuration for the OAuth factory
21
+ * @returns A factory that creates configured ZoomOAuth instances
22
+ */
17
23
  export declare function zoomOAuthFactory(factoryConfig: ZoomOAuthFactoryConfig): ZoomOAuthFactory;
18
24
  export interface ZoomOAuthZoomAccessTokenFactoryConfig {
19
25
  /**
@@ -1,4 +1,4 @@
1
- import { type ISO8601DateString, type Maybe } from '@dereekb/util';
1
+ import { type ISO8601DateString, type Maybe, type TimezoneString } from '@dereekb/util';
2
2
  import { type ZoomMeetingType, type ZoomRecurrenceInfo, type ZoomMeetingSettings, type ZoomMeetingAgenda, type ZoomMeetingDuration, type ZoomMeetingTrackingField, type ZoomMeetingTemplateId, type ZoomMeetingPassword, type ZoomMeeting, type ZoomMeetingId, type PastZoomMeeting, type ZoomMeetingOccurrenceId } from './zoom.api.meeting.type';
3
3
  import { type ZoomContext } from './zoom.config';
4
4
  import { type ZoomPageFilter, type ZoomPageResult } from '../zoom.api.page';
@@ -12,6 +12,9 @@ export type GetMeetingResponse = ZoomMeeting;
12
12
  export type GetMeetingFunction = (input: GetMeetingInput) => Promise<GetMeetingResponse>;
13
13
  /**
14
14
  * https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meeting
15
+ *
16
+ * @param context The Zoom API context
17
+ * @returns A function that retrieves a meeting by ID
15
18
  */
16
19
  export declare function getMeeting(context: ZoomContext): GetMeetingFunction;
17
20
  export interface ListMeetingsForUserInput extends ZoomPageFilter {
@@ -21,9 +24,18 @@ export type ListMeetingsForUserResponse = ZoomPageResult<ZoomMeeting>;
21
24
  export type ListMeetingsForUserFunction = (input: ListMeetingsForUserInput) => Promise<ListMeetingsForUserResponse>;
22
25
  /**
23
26
  * https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetings
27
+ *
28
+ * @param context The Zoom API context
29
+ * @returns A function that lists meetings for a user
24
30
  */
25
31
  export declare function listMeetingsForUser(context: ZoomContext): ListMeetingsForUserFunction;
26
32
  export type ListMeetingsForUserPageFactory = FetchPageFactory<ListMeetingsForUserInput, ListMeetingsForUserResponse>;
33
+ /**
34
+ * Creates a page factory for listing meetings for a user.
35
+ *
36
+ * @param context The Zoom API context
37
+ * @returns A page factory for paginated meeting listing
38
+ */
27
39
  export declare function listMeetingsForUserPageFactory(context: ZoomContext): ListMeetingsForUserPageFactory;
28
40
  /**
29
41
  * https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetingCreate
@@ -31,6 +43,7 @@ export declare function listMeetingsForUserPageFactory(context: ZoomContext): Li
31
43
  export interface CreateMeetingForUserTemplate {
32
44
  /**
33
45
  * The meeting's agenda. This value has a maximum length of 2,000 characters.
46
+ *
34
47
  * @example "My Meeting"
35
48
  */
36
49
  readonly agenda?: ZoomMeetingAgenda;
@@ -38,12 +51,14 @@ export interface CreateMeetingForUserTemplate {
38
51
  * Whether to generate a default passcode using the user's settings. This value defaults to `false`.
39
52
  *
40
53
  * If this value is `true` and the user has the PMI setting enabled with a passcode, then the user's meetings will use the PMI passcode. It will **not** use a default passcode.
54
+ *
41
55
  * @default false
42
56
  * @example false
43
57
  */
44
58
  readonly default_password?: boolean;
45
59
  /**
46
60
  * The meeting's scheduled duration, in minutes. This field is only used for scheduled meetings (`2`).
61
+ *
47
62
  * @example 60
48
63
  */
49
64
  readonly duration?: ZoomMeetingDuration;
@@ -54,6 +69,7 @@ export interface CreateMeetingForUserTemplate {
54
69
  * - If the account owner or administrator has configured [minimum passcode requirement settings](https://support.zoom.us/hc/en-us/articles/360033559832-Meeting-and-webinar-passwords#h_a427384b-e383-4f80-864d-794bf0a37604), the passcode **must** meet those requirements.
55
70
  * - If passcode requirements are enabled, use the [**Get user settings**](/docs/api/users/#tag/users/GET/users/{userId}/settings) API or the [**Get account settings**](/docs/api/accounts/#tag/accounts/GET/accounts/{accountId}/settings) API to get the requirements.
56
71
  * - If the **Require a passcode when scheduling new meetings** account setting is enabled and locked, a passcode will be automatically generated if one is not provided.
72
+ *
57
73
  * @example "123456"
58
74
  */
59
75
  readonly password?: ZoomMeetingPassword;
@@ -61,6 +77,7 @@ export interface CreateMeetingForUserTemplate {
61
77
  * Whether to create a prescheduled meeting via the [GSuite app](https://support.zoom.us/hc/en-us/articles/360020187492-Zoom-for-GSuite-add-on). This **only** supports the meeting `type` value of `2` (scheduled meetings) and `3` (recurring meetings with no fixed time).
62
78
  * - `true` - Create a prescheduled meeting.
63
79
  * - `false` - Create a regular meeting.
80
+ *
64
81
  * @default false
65
82
  * @example false
66
83
  */
@@ -71,6 +88,7 @@ export interface CreateMeetingForUserTemplate {
71
88
  readonly recurrence?: ZoomRecurrenceInfo;
72
89
  /**
73
90
  * The email address or user ID of the user to schedule a meeting for.
91
+ *
74
92
  * @example "jchill@example.com"
75
93
  */
76
94
  readonly schedule_for?: string;
@@ -89,7 +107,7 @@ export interface CreateMeetingForUserTemplate {
89
107
  /**
90
108
  * The time zone to use for the meeting.
91
109
  */
92
- readonly timezone?: string;
110
+ readonly timezone?: TimezoneString;
93
111
  /**
94
112
  * The meeting type.
95
113
  * - `1`: Instant
@@ -114,6 +132,9 @@ export interface CreateMeetingForUserInput {
114
132
  export type CreateMeetingForUserResponse = ZoomMeeting;
115
133
  /**
116
134
  * https://developers.zoom.us/docs/api/meetings/#tag/meetings/POST/users/{userId}/meetings
135
+ *
136
+ * @param context The Zoom API context
137
+ * @returns A function that creates a meeting for a user
117
138
  */
118
139
  export declare function createMeetingForUser(context: ZoomContext): (input: CreateMeetingForUserInput) => Promise<CreateMeetingForUserResponse>;
119
140
  /**
@@ -135,6 +156,9 @@ export type UpdateMeetingResponse = unknown;
135
156
  export type UpdateMeetingFunction = (input: UpdateMeetingInput) => Promise<UpdateMeetingResponse>;
136
157
  /**
137
158
  * https://developers.zoom.us/docs/api/meetings/#tag/meetings/PUT/meetings/{meetingId}
159
+ *
160
+ * @param context The Zoom API context
161
+ * @returns A function that updates a meeting
138
162
  */
139
163
  export declare function updateMeeting(context: ZoomContext): UpdateMeetingFunction;
140
164
  export interface DeleteMeetingInput extends SilenceZoomErrorConfig {
@@ -161,6 +185,9 @@ export type DeleteMeetingFunction = (input: DeleteMeetingInput) => Promise<Delet
161
185
  export declare const DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE = 3001;
162
186
  /**
163
187
  * https://developers.zoom.us/docs/api/meetings/#tag/meetings/DELETE/meetings/{meetingId}
188
+ *
189
+ * @param context The Zoom API context
190
+ * @returns A function that deletes a meeting (silences 3001 "not found" errors by default)
164
191
  */
165
192
  export declare function deleteMeeting(context: ZoomContext): DeleteMeetingFunction;
166
193
  export interface GetPastMeetingInput {
@@ -170,6 +197,9 @@ export type GetPastMeetingResponse = PastZoomMeeting;
170
197
  export type GetPastMeetingFunction = (input: GetPastMeetingInput) => Promise<GetPastMeetingResponse>;
171
198
  /**
172
199
  * https://developers.zoom.us/docs/api/meetings/#tag/meetings/GET/past_meetings/{meetingId}
200
+ *
201
+ * @param context The Zoom API context
202
+ * @returns A function that retrieves a past meeting
173
203
  */
174
204
  export declare function getPastMeeting(context: ZoomContext): GetPastMeetingFunction;
175
205
  export interface GetPastMeetingParticipantsInput extends ZoomPageFilter {
@@ -179,7 +209,16 @@ export type GetPastMeetingParticipantsResponse = ZoomPageResult<PastZoomMeeting>
179
209
  export type GetPastMeetingParticipantsFunction = (input: GetPastMeetingParticipantsInput) => Promise<GetPastMeetingParticipantsResponse>;
180
210
  /**
181
211
  * https://developers.zoom.us/docs/api/meetings/#tag/meetings/GET/past_meetings/{meetingId}/participants
212
+ *
213
+ * @param context The Zoom API context
214
+ * @returns A function that retrieves participants from a past meeting
182
215
  */
183
216
  export declare function getPastMeetingParticipants(context: ZoomContext): GetPastMeetingParticipantsFunction;
184
217
  export type GetPastMeetingParticipantsPageFactory = FetchPageFactory<GetPastMeetingParticipantsInput, GetPastMeetingParticipantsResponse>;
218
+ /**
219
+ * Creates a page factory for listing past meeting participants.
220
+ *
221
+ * @param context The Zoom API context
222
+ * @returns A page factory for paginated participant listing
223
+ */
185
224
  export declare function getPastMeetingParticipantsPageFactory(context: ZoomContext): GetPastMeetingParticipantsPageFactory;
@@ -13,7 +13,7 @@ export type ZoomMeetingTemplateId = string;
13
13
  * The meeting topic.
14
14
  */
15
15
  export type ZoomMeetingTopic = string;
16
- export type ZoomMeetingOccurrenceDuration = number;
16
+ export type ZoomMeetingOccurrenceDuration = Minutes;
17
17
  /**
18
18
  * URL for participants to join the meeting.
19
19
  *
@@ -99,6 +99,7 @@ export interface ZoomMeeting {
99
99
  readonly registration_url?: ZoomRegistrationUrl;
100
100
  /**
101
101
  * The meeting's agenda. This value has a maximum length of 2,000 characters.
102
+ *
102
103
  * @example "My Meeting"
103
104
  */
104
105
  readonly agenda?: ZoomMeetingAgenda;
@@ -247,11 +248,17 @@ export declare enum ZoomMonthlyWeekDay {
247
248
  * Options for Continuous Meeting Chat linking between a meeting and a Zoom Team Chat channel.
248
249
  */
249
250
  export interface ZoomMeetingSettingsContinuousMeetingChat {
250
- /** Enable or disable Continuous Meeting Chat. */
251
+ /**
252
+ * Enable or disable Continuous Meeting Chat.
253
+ */
251
254
  readonly enable?: boolean;
252
- /** Auto-add invited external users to the linked channel. */
255
+ /**
256
+ * Auto-add invited external users to the linked channel.
257
+ */
253
258
  readonly auto_add_invited_external_users?: boolean;
254
- /** Auto-add all meeting participants to the linked channel. */
259
+ /**
260
+ * Auto-add all meeting participants to the linked channel.
261
+ */
255
262
  readonly auto_add_meeting_participants?: boolean;
256
263
  /**
257
264
  * Rule describing which users are auto-added.
@@ -260,37 +267,59 @@ export interface ZoomMeetingSettingsContinuousMeetingChat {
260
267
  * • `org_invitees` – internal invited users only.
261
268
  */
262
269
  readonly who_is_added?: 'all_users' | 'org_invitees_and_participants' | 'org_invitees';
263
- /** Identifier of the chat channel to link. */
270
+ /**
271
+ * Identifier of the chat channel to link.
272
+ */
264
273
  readonly channel_id?: string;
265
274
  }
266
- /** A pre-provisioned whiteboard resource shared at meeting start. */
275
+ /**
276
+ * A pre-provisioned whiteboard resource shared at meeting start.
277
+ */
267
278
  export interface ZoomMeetingSettingsWhiteboardResource {
268
- /** Resource type – currently only `whiteboard`. */
279
+ /**
280
+ * Resource type – currently only `whiteboard`.
281
+ */
269
282
  readonly resource_type: 'whiteboard';
270
- /** Unique whiteboard identifier. */
283
+ /**
284
+ * Unique whiteboard identifier.
285
+ */
271
286
  readonly resource_id: string;
272
- /** Initial permission granted to participants. */
287
+ /**
288
+ * Initial permission granted to participants.
289
+ */
273
290
  readonly permission_level?: 'editor' | 'commenter' | 'viewer';
274
291
  }
275
- /** Additional email invitee outside the standard Zoom invitation. */
292
+ /**
293
+ * Additional email invitee outside the standard Zoom invitation.
294
+ */
276
295
  export interface ZoomMeetingSettingsInvitee {
277
296
  readonly email: EmailAddress;
278
- /** Indicates whether the invitee belongs to the owner’s account. */
297
+ /**
298
+ * Indicates whether the invitee belongs to the owner’s account.
299
+ */
279
300
  readonly internal_user?: boolean;
280
301
  }
281
- /** User allowed to bypass meeting authentication. */
302
+ /**
303
+ * User allowed to bypass meeting authentication.
304
+ */
282
305
  export interface ZoomMeetingSettingsAuthenticationException {
283
306
  readonly email: EmailAddress;
284
307
  readonly name?: string;
285
- /** Unique join link generated for the exception user. */
308
+ /**
309
+ * Unique join link generated for the exception user.
310
+ */
286
311
  readonly join_url?: string;
287
312
  }
288
- /** Custom tracking field key–value pair. */
313
+ /**
314
+ * Custom tracking field key–value pair.
315
+ */
289
316
  export interface ZoomMeetingSettingsCustomKey {
290
317
  readonly key: string;
291
318
  readonly value: string;
292
319
  }
293
- /** International dial-in number exposed in invitations. */
320
+ /**
321
+ * International dial-in number exposed in invitations.
322
+ */
294
323
  export interface ZoomMeetingSettingsGlobalDialInNumber {
295
324
  readonly city?: string;
296
325
  readonly country?: string;
@@ -298,7 +327,9 @@ export interface ZoomMeetingSettingsGlobalDialInNumber {
298
327
  readonly number: string;
299
328
  readonly type: 'toll' | 'tollfree';
300
329
  }
301
- /** Webinar Q&A configuration block. */
330
+ /**
331
+ * Webinar Q&A configuration block.
332
+ */
302
333
  export interface ZoomMeetingSettingsQnA {
303
334
  readonly enable?: boolean;
304
335
  readonly allow_submit_questions?: boolean;
@@ -307,10 +338,14 @@ export interface ZoomMeetingSettingsQnA {
307
338
  readonly attendees_can_comment?: boolean;
308
339
  readonly attendees_can_upvote?: boolean;
309
340
  }
310
- /** Interpreter mapping for language interpretation. */
341
+ /**
342
+ * Interpreter mapping for language interpretation.
343
+ */
311
344
  export interface ZoomMeetingSettingsInterpreter {
312
345
  readonly email: EmailAddress;
313
- /** BCP-47 language list in the form `"<source>-<target>"`, e.g., "en-US:es-ES". */
346
+ /**
347
+ * BCP-47 language list in the form `"<source>-<target>"`, e.g., "en-US:es-ES".
348
+ */
314
349
  readonly languages: string;
315
350
  }
316
351
  export interface ZoomMeetingSettings {
@@ -29,4 +29,10 @@ export type ListUsersFunction = (input?: ListUsersInput) => Promise<ListUsersRes
29
29
  */
30
30
  export declare function listUsers(context: ZoomContext): ListUsersFunction;
31
31
  export type ListUsersPageFactory = FetchPageFactory<ListUsersInput, ListUsersResponse>;
32
+ /**
33
+ * Creates a page factory for listing users.
34
+ *
35
+ * @param context The Zoom API context
36
+ * @returns A page factory for paginated user listing
37
+ */
32
38
  export declare function listUsersPageFactory(context: ZoomContext): ListUsersPageFactory;
@@ -1,4 +1,4 @@
1
- import { type EmailAddress, type ISO8601DateStringUTCFull, type TimezoneString } from '@dereekb/util';
1
+ import { type EmailAddress, type ISO8601DateStringUTCFull, type TimezoneString, type WebsiteUrl } from '@dereekb/util';
2
2
  import { type ZoomClientVersion, type ZoomUserId } from '../zoom.type';
3
3
  /**
4
4
  * Represents a Zoom user, as returned by the Zoom API.
@@ -78,26 +78,31 @@ export interface ZoomUser {
78
78
  readonly last_login_time: ISO8601DateStringUTCFull;
79
79
  /**
80
80
  * Returned if the user is enrolled in the Zoom United plan. See docs for enum values.
81
+ *
81
82
  * @example "1"
82
83
  */
83
84
  readonly plan_united_type?: ZoomUserPlanUnitedType;
84
85
  /**
85
86
  * The user's personal meeting ID (PMI).
87
+ *
86
88
  * @example 6589310093
87
89
  */
88
90
  readonly pmi: ZoomUserPersonalMeetingId;
89
91
  /**
90
92
  * The unique ID of the user's assigned role.
93
+ *
91
94
  * @example "0"
92
95
  */
93
96
  readonly role_id: ZoomUserRoleId;
94
97
  /**
95
98
  * The user's status: 'active', 'inactive', or 'pending'.
99
+ *
96
100
  * @example "active"
97
101
  */
98
102
  readonly status: ZoomUserStatus;
99
103
  /**
100
104
  * The user's timezone.
105
+ *
101
106
  * @example "Asia/Shanghai"
102
107
  */
103
108
  readonly timezone: TimezoneString;
@@ -131,11 +136,11 @@ export interface ZoomUser {
131
136
  /**
132
137
  * The user's personal meeting URL.
133
138
  */
134
- readonly personal_meeting_url: string;
139
+ readonly personal_meeting_url: WebsiteUrl;
135
140
  /**
136
141
  * The user's profile picture URL.
137
142
  */
138
- readonly pic_url: string;
143
+ readonly pic_url: WebsiteUrl;
139
144
  /**
140
145
  * The user's CMS user ID (may be empty).
141
146
  */
@@ -183,7 +188,7 @@ export interface ZoomUser {
183
188
  /**
184
189
  * The user's manager (email address).
185
190
  */
186
- readonly manager?: string;
191
+ readonly manager?: EmailAddress;
187
192
  /**
188
193
  * The user's phone numbers (new format, array of objects).
189
194
  */
@@ -4,10 +4,10 @@ import { type ZoomConfig, type ZoomRefreshToken } from '../zoom.config';
4
4
  import { type ZoomRateLimiterRef } from '../zoom.limit';
5
5
  import { type ZoomAccessTokenCache, type ZoomAccessTokenStringFactory } from '../oauth/oauth';
6
6
  export type ZoomApiKey = ZoomRefreshToken;
7
- export interface ZoomFetchFactoryInput {
7
+ export interface ZoomFetchFactoryParams {
8
8
  readonly zoomAccessTokenStringFactory: ZoomAccessTokenStringFactory;
9
9
  }
10
- export type ZoomFetchFactory = FactoryWithInput<ConfiguredFetch, ZoomFetchFactoryInput>;
10
+ export type ZoomFetchFactory = FactoryWithInput<ConfiguredFetch, ZoomFetchFactoryParams>;
11
11
  /**
12
12
  * Denotes the type of authorization used by the ZoomContext.
13
13
  *
@@ -39,7 +39,7 @@ export interface ZoomServerContext extends ZoomContext {
39
39
  readonly makeUserContext: ZoomUserContextFactory;
40
40
  readonly config: ZoomConfig;
41
41
  }
42
- export interface ZoomUserContextFactoryInput {
42
+ export interface ZoomUserContextFactoryParams {
43
43
  /**
44
44
  * The user's refresh token.
45
45
  */
@@ -54,7 +54,7 @@ export interface ZoomUserContextFactoryInput {
54
54
  /**
55
55
  * Creates a ZoomUserContext from the input.
56
56
  */
57
- export type ZoomUserContextFactory = FactoryWithRequiredInput<ZoomUserContext, ZoomUserContextFactoryInput>;
57
+ export type ZoomUserContextFactory = FactoryWithRequiredInput<ZoomUserContext, ZoomUserContextFactoryParams>;
58
58
  /**
59
59
  * Context used for performing fetch requests for a specific user.
60
60
  */
@@ -67,3 +67,11 @@ export interface ZoomUserContext extends ZoomContext {
67
67
  export interface ZoomServerContextRef {
68
68
  readonly zoomServerContext: ZoomServerContext;
69
69
  }
70
+ /**
71
+ * @deprecated use ZoomFetchFactoryParams instead.
72
+ */
73
+ export type ZoomFetchFactoryInput = ZoomFetchFactoryParams;
74
+ /**
75
+ * @deprecated use ZoomUserContextFactoryParams instead.
76
+ */
77
+ export type ZoomUserContextFactoryInput = ZoomUserContextFactoryParams;
@@ -1,6 +1,19 @@
1
1
  import { type FetchResponseError } from '@dereekb/util/fetch';
2
2
  import { type ZoomServerErrorData, type ParsedZoomServerError } from '../zoom.error.api';
3
3
  export declare const logZoomErrorToConsole: import("..").LogZoomServerErrorFunction;
4
+ /**
5
+ * Parses a FetchResponseError into a typed Zoom API error.
6
+ *
7
+ * @param responseError The fetch response error to parse
8
+ * @returns The parsed error, or undefined if parsing fails
9
+ */
4
10
  export declare function parseZoomApiError(responseError: FetchResponseError): Promise<ParsedZoomServerError>;
5
- export declare function parseZoomApiServerErrorResponseData(zoomServerError: ZoomServerErrorData, responseError: FetchResponseError): ParsedZoomServerError;
11
+ /**
12
+ * Parses a ZoomServerErrorData into a Zoom API-specific error.
13
+ *
14
+ * @param zoomServerError The raw error data from the Zoom API
15
+ * @param responseError The original fetch response error
16
+ * @returns A parsed error, or undefined if the error is unrecognized
17
+ */
18
+ export declare function parseZoomApiServerErrorResponseData(zoomServerError: ZoomServerErrorData, responseError: FetchResponseError): import("@dereekb/util/fetch").FetchRequestFactoryError | import("..").ZoomServerError<ZoomServerErrorData<unknown>> | undefined;
6
19
  export declare const handleZoomErrorFetch: import("..").HandleZoomErrorFetchFactory;
@@ -20,4 +20,10 @@ export interface ZoomFactoryConfig extends ZoomOAuthContextRef {
20
20
  readonly logZoomServerErrorFunction?: LogZoomServerErrorFunction;
21
21
  }
22
22
  export type ZoomFactory = (config: ZoomConfig) => Zoom;
23
+ /**
24
+ * Creates a Zoom API factory from the given configuration.
25
+ *
26
+ * @param factoryConfig Configuration including OAuth context, rate limiting, and fetch settings
27
+ * @returns A factory function that creates a configured Zoom API instance
28
+ */
23
29
  export declare function zoomFactory(factoryConfig: ZoomFactoryConfig): ZoomFactory;
@@ -66,8 +66,8 @@ export type ZoomFetchPageFetchFunction<I extends ZoomPageFilter, R extends ZoomP
66
66
  /**
67
67
  * Creates a FetchPageFactory using the input ZoomFetchPageFetchFunction.
68
68
  *
69
- * @param fetch
70
- * @param defaults
71
- * @returns
69
+ * @param fetch - function that fetches a single page of results from the Zoom API
70
+ * @param defaults - optional default pagination configuration
71
+ * @returns a configured FetchPageFactory that handles Zoom's cursor-based pagination using `next_page_token`
72
72
  */
73
73
  export declare function zoomFetchPageFactory<I extends ZoomPageFilter, R extends ZoomPageResult<any>>(fetch: ZoomFetchPageFetchFunction<I, R>, defaults?: Maybe<FetchPageFactoryConfigDefaults>): import("@dereekb/util/fetch").FetchPageFactory<I, R>;