@dereekb/zoom 13.11.13 → 13.11.15

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 CHANGED
@@ -74,9 +74,10 @@ function _object_spread_props(target, source) {
74
74
  /**
75
75
  * Creates a FetchPageFactory using the input ZoomFetchPageFetchFunction.
76
76
  *
77
- * @param fetch - function that fetches a single page of results from the Zoom API
78
- * @param defaults - optional default pagination configuration
79
- * @returns a configured FetchPageFactory that handles Zoom's cursor-based pagination using `next_page_token`
77
+ * @param fetch - Function that fetches a single page of results from the Zoom API.
78
+ * @param defaults - Optional default pagination configuration.
79
+ * @returns A configured FetchPageFactory that handles Zoom's cursor-based pagination using `next_page_token`
80
+ *
80
81
  * @__NO_SIDE_EFFECTS__
81
82
  */ function zoomFetchPageFactory(fetch$1, defaults) {
82
83
  return fetch.fetchPageFactory(_object_spread_props(_object_spread({}, defaults), {
@@ -363,8 +364,9 @@ function _ts_generator$5(thisArg, body) {
363
364
  /**
364
365
  * Creates a logZoomServerErrorFunction that logs the error to console.
365
366
  *
366
- * @param zoomApiNamePrefix Prefix to use when logging. I.E. ZoomError, etc.
367
+ * @param zoomApiNamePrefix - Prefix to use when logging. I.E. ZoomError, etc.
367
368
  * @returns
369
+ *
368
370
  * @__NO_SIDE_EFFECTS__
369
371
  */ function logZoomServerErrorFunction(zoomApiNamePrefix) {
370
372
  return function(error) {
@@ -387,9 +389,10 @@ function _ts_generator$5(thisArg, body) {
387
389
  /**
388
390
  * Wraps a ConfiguredFetch to support handling errors returned by fetch.
389
391
  *
390
- * @param parseZoomError Function to parse fetch response errors into typed Zoom errors
391
- * @param defaultLogError Default error logging function
392
- * @returns A factory that wraps ConfiguredFetch with error handling
392
+ * @param parseZoomError - Function to parse fetch response errors into typed Zoom errors.
393
+ * @param defaultLogError - Default error logging function.
394
+ * @returns A factory that wraps ConfiguredFetch with error handling.
395
+ *
393
396
  * @__NO_SIDE_EFFECTS__
394
397
  */ function handleZoomErrorFetchFactory(parseZoomError, defaultLogError) {
395
398
  return function(fetch$1) {
@@ -461,8 +464,8 @@ var DEFAULT_ZOOM_API_RATE_LIMIT_RESET_PERIOD = util.MS_IN_SECOND;
461
464
  /**
462
465
  * Parses rate limit header details from a Zoom API response.
463
466
  *
464
- * @param headers The response headers to parse
465
- * @returns Parsed rate limit details, or null if required headers are missing
467
+ * @param headers - The response headers to parse.
468
+ * @returns Parsed rate limit details, or null if required headers are missing.
466
469
  */ function zoomRateLimitHeaderDetails(headers) {
467
470
  var limitHeader = headers.get(ZOOM_RATE_LIMIT_LIMIT_HEADER);
468
471
  var remainingHeader = headers.get(ZOOM_RATE_LIMIT_REMAINING_HEADER);
@@ -507,9 +510,9 @@ var ZoomTooManyRequestsError = /*#__PURE__*/ function(ZoomServerFetchResponseErr
507
510
  /**
508
511
  * Function that parses/transforms a ZoomServerErrorData into a general ZoomServerError or other known error type.
509
512
  *
510
- * @param zoomServerError The error data from the Zoom API
511
- * @param responseError The original fetch response error
512
- * @returns A typed ZoomServerFetchResponseError, or undefined
513
+ * @param zoomServerError - The error data from the Zoom API.
514
+ * @param responseError - The original fetch response error.
515
+ * @returns A typed ZoomServerFetchResponseError, or undefined.
513
516
  */ function parseZoomServerErrorData(zoomServerError, responseError) {
514
517
  var result;
515
518
  if (responseError.response.status === ZOOM_TOO_MANY_REQUESTS_HTTP_STATUS_CODE) {
@@ -533,8 +536,8 @@ var ZoomTooManyRequestsError = /*#__PURE__*/ function(ZoomServerFetchResponseErr
533
536
  *
534
537
  * If other options are input, it merges those two options together and adds silenceError to the omitted keys.
535
538
  *
536
- * @param options Optional additional MakeUrlSearchParamsOptions to merge
537
- * @returns A MakeUrlSearchParamsOptions that omits silenceError
539
+ * @param options - Optional additional MakeUrlSearchParamsOptions to merge.
540
+ * @returns A MakeUrlSearchParamsOptions that omits silenceError.
538
541
  */ function omitSilenceZoomErrorKeys(options) {
539
542
  var omitKeys = [
540
543
  'silenceError'
@@ -560,20 +563,20 @@ function silenceZoomErrorWithCodesFunction(codes, returnFn) {
560
563
  }
561
564
 
562
565
  /**
563
- * https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meeting
566
+ * Https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meeting.
564
567
  *
565
- * @param context The Zoom API context
566
- * @returns A function that retrieves a meeting by ID
568
+ * @param context - The Zoom API context.
569
+ * @returns Retrieves a meeting by ID.
567
570
  */ function getMeeting(context) {
568
571
  return function(input) {
569
572
  return context.fetchJson("/meetings/".concat(input.meetingId), 'GET');
570
573
  };
571
574
  }
572
575
  /**
573
- * https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetings
576
+ * Https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetings.
574
577
  *
575
- * @param context The Zoom API context
576
- * @returns A function that lists meetings for a user
578
+ * @param context - The Zoom API context.
579
+ * @returns Lists meetings for a user.
577
580
  */ function listMeetingsForUser(context) {
578
581
  return function(input) {
579
582
  return context.fetchJson("/users/".concat(input.user, "/meetings"), 'GET').then(mapToZoomPageResult('meetings'));
@@ -582,17 +585,19 @@ function silenceZoomErrorWithCodesFunction(codes, returnFn) {
582
585
  /**
583
586
  * Creates a page factory for listing meetings for a user.
584
587
  *
585
- * @param context The Zoom API context
586
- * @returns A page factory for paginated meeting listing
588
+ * @param context - The Zoom API context.
589
+ * @returns A page factory for paginated meeting listing.
590
+ *
587
591
  * @__NO_SIDE_EFFECTS__
588
592
  */ function listMeetingsForUserPageFactory(context) {
589
593
  return zoomFetchPageFactory(listMeetingsForUser(context));
590
594
  }
591
595
  /**
592
- * https://developers.zoom.us/docs/api/meetings/#tag/meetings/POST/users/{userId}/meetings
596
+ * Https://developers.zoom.us/docs/api/meetings/#tag/meetings/POST/users/{userId}/meetings.
597
+ *
598
+ * @param context - The Zoom API context.
599
+ * @returns Creates a meeting for a user.
593
600
  *
594
- * @param context The Zoom API context
595
- * @returns A function that creates a meeting for a user
596
601
  * @__NO_SIDE_EFFECTS__
597
602
  */ function createMeetingForUser(context) {
598
603
  return function(input) {
@@ -603,10 +608,10 @@ function silenceZoomErrorWithCodesFunction(codes, returnFn) {
603
608
  };
604
609
  }
605
610
  /**
606
- * https://developers.zoom.us/docs/api/meetings/#tag/meetings/PUT/meetings/{meetingId}
611
+ * Https://developers.zoom.us/docs/api/meetings/#tag/meetings/PUT/meetings/{meetingId}
607
612
  *
608
- * @param context The Zoom API context
609
- * @returns A function that updates a meeting
613
+ * @param context - The Zoom API context.
614
+ * @returns Updates a meeting.
610
615
  */ function updateMeeting(context) {
611
616
  return function(input) {
612
617
  return context.fetchJson("/meetings/".concat(input.meetingId, "?").concat(fetch.makeUrlSearchParams({
@@ -619,10 +624,10 @@ function silenceZoomErrorWithCodesFunction(codes, returnFn) {
619
624
  }
620
625
  var DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE = 3001;
621
626
  /**
622
- * https://developers.zoom.us/docs/api/meetings/#tag/meetings/DELETE/meetings/{meetingId}
627
+ * Https://developers.zoom.us/docs/api/meetings/#tag/meetings/DELETE/meetings/{meetingId}
623
628
  *
624
- * @param context The Zoom API context
625
- * @returns A function that deletes a meeting (silences 3001 "not found" errors by default)
629
+ * @param context - The Zoom API context.
630
+ * @returns Deletes a meeting (silences 3001 "not found" errors by default)
626
631
  */ function deleteMeeting(context) {
627
632
  var silenceDoesNotExistError = silenceZoomErrorWithCodesFunction(DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE);
628
633
  return function(input) {
@@ -630,20 +635,20 @@ var DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE = 3001;
630
635
  };
631
636
  }
632
637
  /**
633
- * https://developers.zoom.us/docs/api/meetings/#tag/meetings/GET/past_meetings/{meetingId}
638
+ * Https://developers.zoom.us/docs/api/meetings/#tag/meetings/GET/past_meetings/{meetingId}
634
639
  *
635
- * @param context The Zoom API context
636
- * @returns A function that retrieves a past meeting
640
+ * @param context - The Zoom API context.
641
+ * @returns Retrieves a past meeting.
637
642
  */ function getPastMeeting(context) {
638
643
  return function(input) {
639
644
  return context.fetchJson("/past_meetings/".concat(input.meetingId), 'GET');
640
645
  };
641
646
  }
642
647
  /**
643
- * https://developers.zoom.us/docs/api/meetings/#tag/meetings/GET/past_meetings/{meetingId}/participants
648
+ * Https://developers.zoom.us/docs/api/meetings/#tag/meetings/GET/past_meetings/{meetingId}/participants.
644
649
  *
645
- * @param context The Zoom API context
646
- * @returns A function that retrieves participants from a past meeting
650
+ * @param context - The Zoom API context.
651
+ * @returns Retrieves participants from a past meeting.
647
652
  */ function getPastMeetingParticipants(context) {
648
653
  return function(input) {
649
654
  return context.fetchJson("/past_meetings/".concat(input.meetingId, "/participants"), 'GET').then(mapToZoomPageResult('participants'));
@@ -652,8 +657,9 @@ var DELETE_MEETING_DOES_NOT_EXIST_ERROR_CODE = 3001;
652
657
  /**
653
658
  * Creates a page factory for listing past meeting participants.
654
659
  *
655
- * @param context The Zoom API context
656
- * @returns A page factory for paginated participant listing
660
+ * @param context - The Zoom API context.
661
+ * @returns A page factory for paginated participant listing.
662
+ *
657
663
  * @__NO_SIDE_EFFECTS__
658
664
  */ function getPastMeetingParticipantsPageFactory(context) {
659
665
  return zoomFetchPageFactory(getPastMeetingParticipants(context));
@@ -726,7 +732,7 @@ exports.ZoomRegistrationType = void 0;
726
732
  })(exports.ZoomRegistrationType || (exports.ZoomRegistrationType = {}));
727
733
 
728
734
  /**
729
- * https://developers.zoom.us/docs/api/users/#tag/users/GET/users/{userId}
735
+ * Https://developers.zoom.us/docs/api/users/#tag/users/GET/users/{userId}
730
736
  *
731
737
  * @param context
732
738
  * @returns
@@ -736,7 +742,7 @@ exports.ZoomRegistrationType = void 0;
736
742
  };
737
743
  }
738
744
  /**
739
- * https://developers.zoom.us/docs/api/users/#tag/users/GET/users
745
+ * Https://developers.zoom.us/docs/api/users/#tag/users/GET/users.
740
746
  *
741
747
  * @param context
742
748
  * @returns
@@ -748,8 +754,9 @@ exports.ZoomRegistrationType = void 0;
748
754
  /**
749
755
  * Creates a page factory for listing users.
750
756
  *
751
- * @param context The Zoom API context
752
- * @returns A page factory for paginated user listing
757
+ * @param context - The Zoom API context.
758
+ * @returns A page factory for paginated user listing.
759
+ *
753
760
  * @__NO_SIDE_EFFECTS__
754
761
  */ function listUsersPageFactory(context) {
755
762
  return zoomFetchPageFactory(listUsers(context));
@@ -896,8 +903,8 @@ var logZoomErrorToConsole = logZoomServerErrorFunction('Zoom');
896
903
  /**
897
904
  * Parses a FetchResponseError into a typed Zoom API error.
898
905
  *
899
- * @param responseError The fetch response error to parse
900
- * @returns The parsed error, or undefined if parsing fails
906
+ * @param responseError - The fetch response error to parse.
907
+ * @returns The parsed error, or undefined if parsing fails.
901
908
  */ function parseZoomApiError(responseError) {
902
909
  return _async_to_generator$4(function() {
903
910
  var data, result;
@@ -926,9 +933,9 @@ var logZoomErrorToConsole = logZoomServerErrorFunction('Zoom');
926
933
  /**
927
934
  * Parses a ZoomServerErrorData into a Zoom API-specific error.
928
935
  *
929
- * @param zoomServerError The raw error data from the Zoom API
930
- * @param responseError The original fetch response error
931
- * @returns A parsed error, or undefined if the error is unrecognized
936
+ * @param zoomServerError - The raw error data from the Zoom API.
937
+ * @param responseError - The original fetch response error.
938
+ * @returns A parsed error, or undefined if the error is unrecognized.
932
939
  */ function parseZoomApiServerErrorResponseData(zoomServerError, responseError) {
933
940
  var result;
934
941
  {
@@ -1180,8 +1187,8 @@ var logZoomOAuthErrorToConsole = logZoomServerErrorFunction('ZoomOAuth');
1180
1187
  /**
1181
1188
  * Parses a FetchResponseError into a typed Zoom OAuth error.
1182
1189
  *
1183
- * @param responseError The fetch response error to parse
1184
- * @returns The parsed error, or undefined if parsing fails
1190
+ * @param responseError - The fetch response error to parse.
1191
+ * @returns The parsed error, or undefined if parsing fails.
1185
1192
  */ function parseZoomOAuthError(responseError) {
1186
1193
  return _async_to_generator$3(function() {
1187
1194
  var data, result;
@@ -1210,9 +1217,9 @@ var logZoomOAuthErrorToConsole = logZoomServerErrorFunction('ZoomOAuth');
1210
1217
  /**
1211
1218
  * Parses a ZoomServerErrorData into a Zoom OAuth-specific error.
1212
1219
  *
1213
- * @param zoomServerError The raw error data from the Zoom API
1214
- * @param responseError The original fetch response error
1215
- * @returns A parsed error, or undefined if the error is unrecognized
1220
+ * @param zoomServerError - The raw error data from the Zoom API.
1221
+ * @param responseError - The original fetch response error.
1222
+ * @returns A parsed error, or undefined if the error is unrecognized.
1216
1223
  */ function parseZoomOAuthServerErrorResponseData(zoomServerError, responseError) {
1217
1224
  var result;
1218
1225
  {
@@ -1362,8 +1369,9 @@ function _ts_generator$2(thisArg, body) {
1362
1369
  /**
1363
1370
  * Generates a new ZoomAccessTokenStringFactory from a ZoomAccessTokenFactory.
1364
1371
  *
1365
- * @param zoomAccessTokenFactory The factory to extract the token string from
1366
- * @returns A factory that returns the access token string
1372
+ * @param zoomAccessTokenFactory - The factory to extract the token string from.
1373
+ * @returns A factory that returns the access token string.
1374
+ *
1367
1375
  * @__NO_SIDE_EFFECTS__
1368
1376
  */ function zoomAccessTokenStringFactory(zoomAccessTokenFactory) {
1369
1377
  return function() {
@@ -1397,8 +1405,8 @@ var DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION = function DEFAULT_
1397
1405
  /**
1398
1406
  * Creates a rate-limited fetch handler configured for the Zoom API.
1399
1407
  *
1400
- * @param config Optional configuration for rate limiting behavior
1401
- * @returns A configured rate-limited fetch handler
1408
+ * @param config - Optional configuration for rate limiting behavior.
1409
+ * @returns A configured rate-limited fetch handler.
1402
1410
  */ function zoomRateLimitedFetchHandler(config) {
1403
1411
  var _ref, _ref1, _ref2;
1404
1412
  var onTooManyRequests = (config === null || config === void 0 ? void 0 : config.onTooManyRequests) !== false ? (_ref = config === null || config === void 0 ? void 0 : config.onTooManyRequests) !== null && _ref !== void 0 ? _ref : DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION : undefined;
@@ -1455,6 +1463,7 @@ var DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION = function DEFAULT_
1455
1463
  });
1456
1464
  }
1457
1465
  // MARK: Compat
1466
+ // COMPAT: Deprecated aliases
1458
1467
  /**
1459
1468
  * @deprecated use DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION instead.
1460
1469
  */ var DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION = DEFAULT_ZOOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION;
@@ -1594,8 +1603,9 @@ function _ts_generator$1(thisArg, body) {
1594
1603
  /**
1595
1604
  * Creates a Zoom API factory from the given configuration.
1596
1605
  *
1597
- * @param factoryConfig Configuration including OAuth context, rate limiting, and fetch settings
1598
- * @returns A factory function that creates a configured Zoom API instance
1606
+ * @param factoryConfig - Configuration including OAuth context, rate limiting, and fetch settings.
1607
+ * @returns A factory function that creates a configured Zoom API instance.
1608
+ *
1599
1609
  * @__NO_SIDE_EFFECTS__
1600
1610
  */ function zoomFactory(factoryConfig) {
1601
1611
  var oauthContext = factoryConfig.oauthContext;
@@ -1710,9 +1720,9 @@ function _ts_generator$1(thisArg, body) {
1710
1720
  /**
1711
1721
  * Builds a FetchJsonInput for Zoom OAuth API calls with Basic auth.
1712
1722
  *
1713
- * @param context The Zoom OAuth context
1714
- * @param input Optional override for client credentials
1715
- * @returns A configured FetchJsonInput for the OAuth API call
1723
+ * @param context - The Zoom OAuth context.
1724
+ * @param input - Optional override for client credentials.
1725
+ * @returns A configured FetchJsonInput for the OAuth API call.
1716
1726
  */ function zoomOAuthApiFetchJsonInput(context, input) {
1717
1727
  var _ref, _ref1;
1718
1728
  var _input_client, _input_client1;
@@ -1732,8 +1742,8 @@ function _ts_generator$1(thisArg, body) {
1732
1742
  /**
1733
1743
  * Generates a Basic Authorization header value for Zoom OAuth.
1734
1744
  *
1735
- * @param input The client ID and secret pair
1736
- * @returns The Base64-encoded Basic auth header value
1745
+ * @param input - The client ID and secret pair.
1746
+ * @returns The Base64-encoded Basic auth header value.
1737
1747
  */ function zoomOAuthServerBasicAuthorizationHeaderValue(input) {
1738
1748
  var credentials = input.clientId + ':' + input.clientSecret;
1739
1749
  return "Basic ".concat(Buffer.from(credentials).toString('base64'));
@@ -1874,8 +1884,9 @@ function _ts_generator(thisArg, body) {
1874
1884
  /**
1875
1885
  * Creates a ZoomOAuth instance factory from the given configuration.
1876
1886
  *
1877
- * @param factoryConfig Configuration for the OAuth factory
1878
- * @returns A factory that creates configured ZoomOAuth instances
1887
+ * @param factoryConfig - Configuration for the OAuth factory.
1888
+ * @returns A factory that creates configured ZoomOAuth instances.
1889
+ *
1879
1890
  * @__NO_SIDE_EFFECTS__
1880
1891
  */ function zoomOAuthFactory(factoryConfig) {
1881
1892
  var fetchHandler = zoomRateLimitedFetchHandler();
@@ -1983,10 +1994,11 @@ function _ts_generator(thisArg, body) {
1983
1994
  };
1984
1995
  }
1985
1996
  /**
1986
- * Creates a ZoomOAuthZoomAccessTokenFactoryConfig
1997
+ * Creates a ZoomOAuthZoomAccessTokenFactoryConfig.
1987
1998
  *
1988
1999
  * @param config
1989
2000
  * @returns
2001
+ *
1990
2002
  * @__NO_SIDE_EFFECTS__
1991
2003
  */ function zoomOAuthZoomAccessTokenFactory(config) {
1992
2004
  var tokenRefresher = config.tokenRefresher, accessTokenCache = config.accessTokenCache, inputTokenExpirationBuffer = config.tokenExpirationBuffer;