@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.
- package/index.cjs.js +152 -58
- package/index.esm.js +152 -59
- package/nestjs/index.cjs.js +60 -35
- package/nestjs/index.esm.js +60 -35
- package/nestjs/package.json +4 -4
- package/nestjs/src/lib/oauth/oauth.config.d.ts +7 -0
- package/nestjs/src/lib/oauth/oauth.module.d.ts +8 -3
- package/nestjs/src/lib/oauth/oauth.service.d.ts +14 -3
- package/nestjs/src/lib/webhook/webhook.zoom.module.d.ts +6 -0
- package/nestjs/src/lib/webhook/webhook.zoom.type.common.d.ts +1 -1
- package/nestjs/src/lib/webhook/webhook.zoom.verify.d.ts +1 -1
- package/nestjs/src/lib/zoom/zoom.api.d.ts +1 -1
- package/nestjs/src/lib/zoom/zoom.config.d.ts +1 -1
- package/nestjs/src/lib/zoom/zoom.module.d.ts +9 -4
- package/package.json +3 -3
- package/src/lib/oauth/oauth.api.d.ts +13 -0
- package/src/lib/oauth/oauth.config.d.ts +12 -4
- package/src/lib/oauth/oauth.d.ts +7 -4
- package/src/lib/oauth/oauth.error.api.d.ts +14 -1
- package/src/lib/oauth/oauth.factory.d.ts +8 -2
- package/src/lib/zoom/zoom.api.meeting.d.ts +41 -2
- package/src/lib/zoom/zoom.api.meeting.type.d.ts +53 -18
- package/src/lib/zoom/zoom.api.user.d.ts +6 -0
- package/src/lib/zoom/zoom.api.user.type.d.ts +9 -4
- package/src/lib/zoom/zoom.config.d.ts +12 -4
- package/src/lib/zoom/zoom.error.api.d.ts +14 -1
- package/src/lib/zoom/zoom.factory.d.ts +6 -0
- package/src/lib/zoom.api.page.d.ts +3 -3
- package/src/lib/zoom.error.api.d.ts +22 -6
- package/src/lib/zoom.limit.d.ts +15 -1
|
@@ -63,13 +63,14 @@ export declare function logZoomServerErrorFunction(zoomApiNamePrefix: string): L
|
|
|
63
63
|
* @returns
|
|
64
64
|
*/
|
|
65
65
|
export type HandleZoomErrorFetchFactory = (fetch: ConfiguredFetch, logError?: LogZoomServerErrorFunction) => ConfiguredFetch;
|
|
66
|
-
export type ParsedZoomServerError = FetchRequestFactoryError | ZoomServerError
|
|
66
|
+
export type ParsedZoomServerError = Maybe<FetchRequestFactoryError | ZoomServerError>;
|
|
67
67
|
export type ParseZoomFetchResponseErrorFunction = (responseError: FetchResponseError) => Promise<ParsedZoomServerError>;
|
|
68
68
|
/**
|
|
69
69
|
* Wraps a ConfiguredFetch to support handling errors returned by fetch.
|
|
70
70
|
*
|
|
71
|
-
* @param fetch
|
|
72
|
-
* @
|
|
71
|
+
* @param parseZoomError Function to parse fetch response errors into typed Zoom errors
|
|
72
|
+
* @param defaultLogError Default error logging function
|
|
73
|
+
* @returns A factory that wraps ConfiguredFetch with error handling
|
|
73
74
|
*/
|
|
74
75
|
export declare function handleZoomErrorFetchFactory(parseZoomError: ParseZoomFetchResponseErrorFunction, defaultLogError: LogZoomServerErrorFunction): HandleZoomErrorFetchFactory;
|
|
75
76
|
/**
|
|
@@ -118,6 +119,12 @@ export interface ZoomRateLimitHeaderDetails {
|
|
|
118
119
|
*/
|
|
119
120
|
readonly retryAfterAt?: Date;
|
|
120
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Parses rate limit header details from a Zoom API response.
|
|
124
|
+
*
|
|
125
|
+
* @param headers The response headers to parse
|
|
126
|
+
* @returns Parsed rate limit details, or null if required headers are missing
|
|
127
|
+
*/
|
|
121
128
|
export declare function zoomRateLimitHeaderDetails(headers: Headers): Maybe<ZoomRateLimitHeaderDetails>;
|
|
122
129
|
export declare class ZoomTooManyRequestsError extends ZoomServerFetchResponseError {
|
|
123
130
|
get headerDetails(): Maybe<ZoomRateLimitHeaderDetails>;
|
|
@@ -125,9 +132,9 @@ export declare class ZoomTooManyRequestsError extends ZoomServerFetchResponseErr
|
|
|
125
132
|
/**
|
|
126
133
|
* Function that parses/transforms a ZoomServerErrorData into a general ZoomServerError or other known error type.
|
|
127
134
|
*
|
|
128
|
-
* @param
|
|
129
|
-
* @param responseError
|
|
130
|
-
* @returns
|
|
135
|
+
* @param zoomServerError The error data from the Zoom API
|
|
136
|
+
* @param responseError The original fetch response error
|
|
137
|
+
* @returns A typed ZoomServerFetchResponseError, or undefined
|
|
131
138
|
*/
|
|
132
139
|
export declare function parseZoomServerErrorData(zoomServerError: ZoomServerErrorData, responseError: FetchResponseError): ZoomServerFetchResponseError | undefined;
|
|
133
140
|
export interface SilenceZoomErrorConfig {
|
|
@@ -140,6 +147,9 @@ export interface SilenceZoomErrorConfig {
|
|
|
140
147
|
* Returns a pre-configured MakeUrlSearchParamsOptions that omits the silenceError key.
|
|
141
148
|
*
|
|
142
149
|
* If other options are input, it merges those two options together and adds silenceError to the omitted keys.
|
|
150
|
+
*
|
|
151
|
+
* @param options Optional additional MakeUrlSearchParamsOptions to merge
|
|
152
|
+
* @returns A MakeUrlSearchParamsOptions that omits silenceError
|
|
143
153
|
*/
|
|
144
154
|
export declare function omitSilenceZoomErrorKeys(options?: MakeUrlSearchParamsOptions): MakeUrlSearchParamsOptions;
|
|
145
155
|
export type SilenceZoomErrorWithCodesFunction<T> = (silence?: boolean) => (reason: unknown) => T;
|
|
@@ -148,5 +158,11 @@ export type SilenceZoomErrorWithCodesFunction<T> = (silence?: boolean) => (reaso
|
|
|
148
158
|
*
|
|
149
159
|
* For example, when deleting a meeting that does not exist, the error code is 3001. This function can be used to silence that error.
|
|
150
160
|
*/
|
|
161
|
+
/**
|
|
162
|
+
* Creates a function that silences Zoom errors with specific error codes.
|
|
163
|
+
*
|
|
164
|
+
* @param codes The error code(s) to silence
|
|
165
|
+
* @returns A function that creates catch handlers for silencing specified errors
|
|
166
|
+
*/
|
|
151
167
|
export declare function silenceZoomErrorWithCodesFunction<T>(codes: ArrayOrValue<ZoomServerErrorCode>): SilenceZoomErrorWithCodesFunction<void>;
|
|
152
168
|
export declare function silenceZoomErrorWithCodesFunction<T>(codes: ArrayOrValue<ZoomServerErrorCode>, returnFn: (error: ZoomServerFetchResponseError) => T): SilenceZoomErrorWithCodesFunction<T>;
|
package/src/lib/zoom.limit.d.ts
CHANGED
|
@@ -8,9 +8,13 @@ export interface ZoomRateLimiterRef {
|
|
|
8
8
|
* Function to execute when too many requests is reached.
|
|
9
9
|
*
|
|
10
10
|
* Typically used for logging of some sort. Thrown errors are ignored.
|
|
11
|
+
*
|
|
12
|
+
* @param headers The parsed rate limit header details from the response
|
|
13
|
+
* @param response The raw HTTP response
|
|
14
|
+
* @param fetchResponseError Optional fetch response error, if available
|
|
11
15
|
*/
|
|
12
16
|
export type ZoomRateLimitedTooManyRequestsLogFunction = (headers: ZoomRateLimitHeaderDetails, response: Response, fetchResponseError?: FetchResponseError) => PromiseOrValue<void>;
|
|
13
|
-
export declare const
|
|
17
|
+
export declare const DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION: (headers: ZoomRateLimitHeaderDetails) => void;
|
|
14
18
|
export interface ZoomRateLimitedFetchHandlerConfig {
|
|
15
19
|
/**
|
|
16
20
|
* Custom max rate limit.
|
|
@@ -32,4 +36,14 @@ export interface ZoomRateLimitedFetchHandlerConfig {
|
|
|
32
36
|
readonly onTooManyRequests?: ZoomRateLimitedTooManyRequestsLogFunction | false;
|
|
33
37
|
}
|
|
34
38
|
export type ZoomRateLimitedFetchHandler = RateLimitedFetchHandler<ResetPeriodPromiseRateLimiter>;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a rate-limited fetch handler configured for the Zoom API.
|
|
41
|
+
*
|
|
42
|
+
* @param config Optional configuration for rate limiting behavior
|
|
43
|
+
* @returns A configured rate-limited fetch handler
|
|
44
|
+
*/
|
|
35
45
|
export declare function zoomRateLimitedFetchHandler(config?: Maybe<ZoomRateLimitedFetchHandlerConfig>): ZoomRateLimitedFetchHandler;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated use DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION instead.
|
|
48
|
+
*/
|
|
49
|
+
export declare const DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION: (headers: ZoomRateLimitHeaderDetails) => void;
|