@dereekb/calcom 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.
Files changed (31) hide show
  1. package/index.cjs.js +98 -89
  2. package/index.esm.js +98 -89
  3. package/nestjs/index.cjs.js +79 -74
  4. package/nestjs/index.esm.js +79 -74
  5. package/nestjs/package.json +5 -5
  6. package/nestjs/src/lib/calcom/calcom.api.d.ts +24 -24
  7. package/nestjs/src/lib/calcom/calcom.module.d.ts +4 -4
  8. package/nestjs/src/lib/oauth/oauth.api.d.ts +7 -7
  9. package/nestjs/src/lib/oauth/oauth.config.d.ts +2 -2
  10. package/nestjs/src/lib/oauth/oauth.module.d.ts +2 -2
  11. package/nestjs/src/lib/oauth/oauth.service.d.ts +12 -11
  12. package/nestjs/src/lib/webhook/webhook.calcom.d.ts +2 -2
  13. package/nestjs/src/lib/webhook/webhook.calcom.module.d.ts +4 -4
  14. package/nestjs/src/lib/webhook/webhook.calcom.verify.d.ts +2 -2
  15. package/package.json +4 -4
  16. package/src/lib/calcom/calcom.api.booking.d.ts +10 -9
  17. package/src/lib/calcom/calcom.api.calendar.d.ts +6 -6
  18. package/src/lib/calcom/calcom.api.eventtype.d.ts +15 -14
  19. package/src/lib/calcom/calcom.api.schedule.d.ts +3 -3
  20. package/src/lib/calcom/calcom.api.slot.d.ts +3 -3
  21. package/src/lib/calcom/calcom.api.user.d.ts +6 -6
  22. package/src/lib/calcom/calcom.api.webhook.d.ts +19 -18
  23. package/src/lib/calcom/calcom.error.api.d.ts +5 -5
  24. package/src/lib/calcom/calcom.factory.d.ts +3 -2
  25. package/src/lib/calcom.error.api.d.ts +12 -10
  26. package/src/lib/calcom.limit.d.ts +2 -2
  27. package/src/lib/oauth/oauth.api.d.ts +6 -6
  28. package/src/lib/oauth/oauth.d.ts +3 -2
  29. package/src/lib/oauth/oauth.error.api.d.ts +5 -5
  30. package/src/lib/oauth/oauth.factory.d.ts +8 -6
  31. package/src/lib/shared/calcom.api-version.d.ts +2 -2
package/index.cjs.js CHANGED
@@ -267,8 +267,9 @@ function _ts_generator$5(thisArg, body) {
267
267
  /**
268
268
  * Creates a logCalcomServerErrorFunction that logs the error to console.
269
269
  *
270
- * @param calcomApiNamePrefix Prefix to use when logging. I.E. CalcomError, etc.
271
- * @returns a LogCalcomServerErrorFunction that logs errors with the given prefix
270
+ * @param calcomApiNamePrefix - Prefix to use when logging. I.E. CalcomError, etc.
271
+ * @returns A LogCalcomServerErrorFunction that logs errors with the given prefix.
272
+ *
272
273
  * @__NO_SIDE_EFFECTS__
273
274
  */ function logCalcomServerErrorFunction(calcomApiNamePrefix) {
274
275
  return function(error) {
@@ -291,9 +292,10 @@ function _ts_generator$5(thisArg, body) {
291
292
  /**
292
293
  * Wraps a ConfiguredFetch to support handling errors returned by fetch.
293
294
  *
294
- * @param parseCalcomError - function to parse a FetchResponseError into a CalcomServerError
295
- * @param defaultLogError - default error logging function used when no override is provided
296
- * @returns a factory that wraps any ConfiguredFetch with Cal.com error handling
295
+ * @param parseCalcomError - Function to parse a FetchResponseError into a CalcomServerError.
296
+ * @param defaultLogError - Default error logging function used when no override is provided.
297
+ * @returns A factory that wraps any ConfiguredFetch with Cal.com error handling.
298
+ *
297
299
  * @__NO_SIDE_EFFECTS__
298
300
  */ function handleCalcomErrorFetchFactory(parseCalcomError, defaultLogError) {
299
301
  return function(fetch$1) {
@@ -360,8 +362,8 @@ var DEFAULT_CALCOM_API_RATE_LIMIT_RESET_PERIOD = 60 * util.MS_IN_SECOND;
360
362
  /**
361
363
  * Extracts Cal.com rate limit information from HTTP response headers.
362
364
  *
363
- * @param headers - the HTTP response headers to parse
364
- * @returns parsed rate limit details, or null if no rate limit headers are present
365
+ * @param headers - The HTTP response headers to parse.
366
+ * @returns Parsed rate limit details, or null if no rate limit headers are present.
365
367
  */ function calcomRateLimitHeaderDetails(headers) {
366
368
  var limitHeader = headers.get(CALCOM_RATE_LIMIT_LIMIT_HEADER);
367
369
  var remainingHeader = headers.get(CALCOM_RATE_LIMIT_REMAINING_HEADER);
@@ -398,9 +400,9 @@ var CalcomTooManyRequestsError = /*#__PURE__*/ function(CalcomServerFetchRespons
398
400
  /**
399
401
  * Function that parses/transforms a CalcomServerErrorData into a general CalcomServerError or other known error type.
400
402
  *
401
- * @param calcomServerError - the parsed error data from the Cal.com response body
402
- * @param responseError - the original FetchResponseError containing the HTTP response
403
- * @returns a CalcomServerFetchResponseError (or subclass like CalcomTooManyRequestsError), or undefined if unrecognized
403
+ * @param calcomServerError - The parsed error data from the Cal.com response body.
404
+ * @param responseError - The original FetchResponseError containing the HTTP response.
405
+ * @returns A CalcomServerFetchResponseError (or subclass like CalcomTooManyRequestsError), or undefined if unrecognized.
404
406
  */ function parseCalcomServerErrorData(calcomServerError, responseError) {
405
407
  var result;
406
408
  if (responseError.response.status === CALCOM_TOO_MANY_REQUESTS_HTTP_STATUS_CODE) {
@@ -554,8 +556,8 @@ var logCalcomErrorToConsole = logCalcomServerErrorFunction('Calcom');
554
556
  * Parses a FetchResponseError from a Cal.com API call into a typed CalcomServerError.
555
557
  * Attempts to extract JSON error data from the response body.
556
558
  *
557
- * @param responseError - the fetch response error to parse
558
- * @returns a parsed CalcomServerError, or undefined if the response body cannot be parsed
559
+ * @param responseError - The fetch response error to parse.
560
+ * @returns A parsed CalcomServerError, or undefined if the response body cannot be parsed.
559
561
  */ function parseCalcomApiError(responseError) {
560
562
  return _async_to_generator$4(function() {
561
563
  var data, result;
@@ -585,9 +587,9 @@ var logCalcomErrorToConsole = logCalcomServerErrorFunction('Calcom');
585
587
  * Parses Cal.com API server error response data into a specific error type.
586
588
  * Delegates to {@link parseCalcomServerErrorData} for general error classification.
587
589
  *
588
- * @param calcomServerError - the parsed error data from the Cal.com response body
589
- * @param responseError - the original FetchResponseError containing the HTTP response
590
- * @returns a parsed CalcomServerError, or undefined if the error data is falsy
590
+ * @param calcomServerError - The parsed error data from the Cal.com response body.
591
+ * @param responseError - The original FetchResponseError containing the HTTP response.
592
+ * @returns A parsed CalcomServerError, or undefined if the error data is falsy.
591
593
  */ function parseCalcomApiServerErrorResponseData(calcomServerError, responseError) {
592
594
  var result;
593
595
  if (calcomServerError) {
@@ -840,8 +842,8 @@ var logCalcomOAuthErrorToConsole = logCalcomServerErrorFunction('CalcomOAuth');
840
842
  * Parses a FetchResponseError from a Cal.com OAuth call into a typed error.
841
843
  * Attempts to extract JSON error data from the response body.
842
844
  *
843
- * @param responseError - the fetch response error to parse
844
- * @returns a parsed CalcomServerError or CalcomOAuthAccessTokenError, or undefined if unparseable
845
+ * @param responseError - The fetch response error to parse.
846
+ * @returns A parsed CalcomServerError or CalcomOAuthAccessTokenError, or undefined if unparseable.
845
847
  */ function parseCalcomOAuthError(responseError) {
846
848
  return _async_to_generator$3(function() {
847
849
  var data, result;
@@ -872,9 +874,9 @@ var logCalcomOAuthErrorToConsole = logCalcomServerErrorFunction('CalcomOAuth');
872
874
  * Handles known error codes like `invalid_grant` and delegates unknown errors
873
875
  * to {@link parseCalcomServerErrorData}.
874
876
  *
875
- * @param calcomServerError - the parsed error data from the Cal.com OAuth response body
876
- * @param responseError - the original FetchResponseError containing the HTTP response
877
- * @returns a parsed error instance, or undefined if the error data is falsy
877
+ * @param calcomServerError - The parsed error data from the Cal.com OAuth response body.
878
+ * @param responseError - The original FetchResponseError containing the HTTP response.
879
+ * @returns A parsed error instance, or undefined if the error data is falsy.
878
880
  */ function parseCalcomOAuthServerErrorResponseData(calcomServerError, responseError) {
879
881
  var result;
880
882
  if (calcomServerError) {
@@ -1026,8 +1028,9 @@ function _ts_generator$2(thisArg, body) {
1026
1028
  * Wraps a CalcomAccessTokenFactory to extract just the access token string,
1027
1029
  * throwing a CalcomOAuthAuthFailureError if the token is missing.
1028
1030
  *
1029
- * @param calcomAccessTokenFactory - the factory that produces CalcomAccessToken objects
1030
- * @returns a factory function that returns the access token string
1031
+ * @param calcomAccessTokenFactory - The factory that produces CalcomAccessToken objects.
1032
+ * @returns A factory function that returns the access token string.
1033
+ *
1031
1034
  * @__NO_SIDE_EFFECTS__
1032
1035
  */ function calcomAccessTokenStringFactory(calcomAccessTokenFactory) {
1033
1036
  return function() {
@@ -1062,8 +1065,8 @@ var DEFAULT_CALCOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION = function DEFAUL
1062
1065
  * Creates a rate-limited fetch handler configured for Cal.com API rate limits.
1063
1066
  * Automatically adjusts based on rate limit response headers and retries on 429 responses.
1064
1067
  *
1065
- * @param config - optional rate limiter configuration overrides
1066
- * @returns a CalcomRateLimitedFetchHandler that enforces rate limiting
1068
+ * @param config - Optional rate limiter configuration overrides.
1069
+ * @returns A CalcomRateLimitedFetchHandler that enforces rate limiting.
1067
1070
  */ function calcomRateLimitedFetchHandler(config) {
1068
1071
  var _ref, _ref1, _ref2;
1069
1072
  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_CALCOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION : undefined;
@@ -1259,8 +1262,9 @@ function _ts_generator$1(thisArg, body) {
1259
1262
  * Sets up rate limiting, error handling, OAuth token management, and both server
1260
1263
  * and per-user fetch contexts.
1261
1264
  *
1262
- * @param factoryConfig - configuration including OAuth context, rate limiter, and optional fetch/logging overrides
1263
- * @returns a factory function that accepts a CalcomConfig and produces a Calcom instance
1265
+ * @param factoryConfig - Configuration including OAuth context, rate limiter, and optional fetch/logging overrides.
1266
+ * @returns A factory function that accepts a CalcomConfig and produces a Calcom instance.
1267
+ *
1264
1268
  * @__NO_SIDE_EFFECTS__
1265
1269
  */ function calcomFactory(factoryConfig) {
1266
1270
  var oauthContext = factoryConfig.oauthContext;
@@ -1402,8 +1406,8 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1402
1406
  /**
1403
1407
  * Returns a headers object with the cal-api-version header set.
1404
1408
  *
1405
- * @param version - the Cal.com API version string to include in the header
1406
- * @returns a headers record containing the cal-api-version header
1409
+ * @param version - The Cal.com API version string to include in the header.
1410
+ * @returns A headers record containing the cal-api-version header.
1407
1411
  */ function calcomApiVersionHeaders(version) {
1408
1412
  return _define_property({}, CALCOM_API_VERSION_HEADER, version);
1409
1413
  }
@@ -1411,10 +1415,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1411
1415
  /**
1412
1416
  * Retrieves the profile of the currently authenticated Cal.com user.
1413
1417
  *
1414
- * @see https://cal.com/docs/api-reference/v2/me
1418
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1419
+ * @returns Retrieves the authenticated user's profile.
1415
1420
  *
1416
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1417
- * @returns a function that retrieves the authenticated user's profile
1421
+ * @see https://cal.com/docs/api-reference/v2/me
1418
1422
  *
1419
1423
  * @example
1420
1424
  * ```ts
@@ -1433,10 +1437,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1433
1437
  /**
1434
1438
  * Retrieves all schedules for the authenticated user, including availability rules and overrides.
1435
1439
  *
1436
- * @see https://cal.com/docs/api-reference/v2/schedules/get-all-schedules
1440
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1441
+ * @returns Retrieves all schedules.
1437
1442
  *
1438
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1439
- * @returns a function that retrieves all schedules
1443
+ * @see https://cal.com/docs/api-reference/v2/schedules/get-all-schedules
1440
1444
  *
1441
1445
  * @example
1442
1446
  * ```ts
@@ -1458,10 +1462,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1458
1462
  *
1459
1463
  * Identify the event type by `eventTypeId`, or by `eventTypeSlug` + `username`/`teamSlug`.
1460
1464
  *
1461
- * @see https://cal.com/docs/api-reference/v2/slots/get-available-time-slots-for-an-event-type
1465
+ * @param context - The Cal.com API context (authenticated or public)
1466
+ * @returns Queries available slots for the given input.
1462
1467
  *
1463
- * @param context - the Cal.com API context (authenticated or public)
1464
- * @returns a function that queries available slots for the given input
1468
+ * @see https://cal.com/docs/api-reference/v2/slots/get-available-time-slots-for-an-event-type
1465
1469
  *
1466
1470
  * @example
1467
1471
  * ```ts
@@ -1489,10 +1493,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1489
1493
  * Creates a new booking for the specified event type. The `attendee` represents the person
1490
1494
  * booking (the client), not the host. This endpoint can be called without authentication.
1491
1495
  *
1492
- * @see https://cal.com/docs/api-reference/v2/bookings/create-a-booking
1496
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1497
+ * @returns Creates a booking from the given input.
1493
1498
  *
1494
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1495
- * @returns a function that creates a booking from the given input
1499
+ * @see https://cal.com/docs/api-reference/v2/bookings/create-a-booking
1496
1500
  *
1497
1501
  * @example
1498
1502
  * ```ts
@@ -1503,6 +1507,7 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1503
1507
  * });
1504
1508
  * console.log(response.data.uid);
1505
1509
  * ```
1510
+ *
1506
1511
  * @__NO_SIDE_EFFECTS__
1507
1512
  */ function createBooking(context) {
1508
1513
  return function(input) {
@@ -1516,10 +1521,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1516
1521
  /**
1517
1522
  * Retrieves a booking by its unique UID.
1518
1523
  *
1519
- * @see https://cal.com/docs/api-reference/v2/bookings/get-a-booking
1524
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1525
+ * @returns Retrieves a booking by its UID.
1520
1526
  *
1521
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1522
- * @returns a function that retrieves a booking by its UID
1527
+ * @see https://cal.com/docs/api-reference/v2/bookings/get-a-booking
1523
1528
  *
1524
1529
  * @example
1525
1530
  * ```ts
@@ -1537,10 +1542,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1537
1542
  /**
1538
1543
  * Cancels a booking by its unique UID, with an optional cancellation reason.
1539
1544
  *
1540
- * @see https://cal.com/docs/api-reference/v2/bookings/cancel-a-booking
1545
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1546
+ * @returns Cancels a booking by UID.
1541
1547
  *
1542
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1543
- * @returns a function that cancels a booking by UID
1548
+ * @see https://cal.com/docs/api-reference/v2/bookings/cancel-a-booking
1544
1549
  *
1545
1550
  * @example
1546
1551
  * ```ts
@@ -1563,10 +1568,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1563
1568
  /**
1564
1569
  * Retrieves all event types for the authenticated user.
1565
1570
  *
1566
- * @see https://cal.com/docs/api-reference/v2/event-types/get-all-event-types
1571
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1572
+ * @returns Retrieves all event types.
1567
1573
  *
1568
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1569
- * @returns a function that retrieves all event types
1574
+ * @see https://cal.com/docs/api-reference/v2/event-types/get-all-event-types
1570
1575
  *
1571
1576
  * @example
1572
1577
  * ```ts
@@ -1584,10 +1589,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1584
1589
  /**
1585
1590
  * Creates a new event type for the authenticated user.
1586
1591
  *
1587
- * @see https://cal.com/docs/api-reference/v2/event-types/create-an-event-type
1592
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1593
+ * @returns Creates a new event type from the given input.
1588
1594
  *
1589
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1590
- * @returns a function that creates a new event type from the given input
1595
+ * @see https://cal.com/docs/api-reference/v2/event-types/create-an-event-type
1591
1596
  *
1592
1597
  * @example
1593
1598
  * ```ts
@@ -1598,6 +1603,7 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1598
1603
  * });
1599
1604
  * console.log(response.data.id);
1600
1605
  * ```
1606
+ *
1601
1607
  * @__NO_SIDE_EFFECTS__
1602
1608
  */ function createEventType(context) {
1603
1609
  return function(input) {
@@ -1611,10 +1617,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1611
1617
  /**
1612
1618
  * Updates an existing event type by ID.
1613
1619
  *
1614
- * @see https://cal.com/docs/api-reference/v2/event-types/update-an-event-type
1620
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1621
+ * @returns Updates an event type by ID.
1615
1622
  *
1616
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1617
- * @returns a function that updates an event type by ID
1623
+ * @see https://cal.com/docs/api-reference/v2/event-types/update-an-event-type
1618
1624
  *
1619
1625
  * @example
1620
1626
  * ```ts
@@ -1632,10 +1638,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1632
1638
  /**
1633
1639
  * Deletes an event type by ID.
1634
1640
  *
1635
- * @see https://cal.com/docs/api-reference/v2/event-types/delete-an-event-type
1641
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1642
+ * @returns Deletes an event type by ID.
1636
1643
  *
1637
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1638
- * @returns a function that deletes an event type by ID
1644
+ * @see https://cal.com/docs/api-reference/v2/event-types/delete-an-event-type
1639
1645
  *
1640
1646
  * @example
1641
1647
  * ```ts
@@ -1653,10 +1659,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1653
1659
  /**
1654
1660
  * Retrieves all connected calendars and the destination calendar for the authenticated user.
1655
1661
  *
1656
- * @see https://cal.com/docs/api-reference/v2/calendars/get-all-calendars
1662
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1663
+ * @returns Retrieves all connected calendars.
1657
1664
  *
1658
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1659
- * @returns a function that retrieves all connected calendars
1665
+ * @see https://cal.com/docs/api-reference/v2/calendars/get-all-calendars
1660
1666
  *
1661
1667
  * @example
1662
1668
  * ```ts
@@ -1674,10 +1680,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1674
1680
  /**
1675
1681
  * Retrieves busy time ranges across the user's connected calendars for a given date range.
1676
1682
  *
1677
- * @see https://cal.com/docs/api-reference/v2/calendars/get-busy-times
1683
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1684
+ * @returns Retrieves busy time ranges for a date range.
1678
1685
  *
1679
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1680
- * @returns a function that retrieves busy time ranges for a date range
1686
+ * @see https://cal.com/docs/api-reference/v2/calendars/get-busy-times
1681
1687
  *
1682
1688
  * @example
1683
1689
  * ```ts
@@ -1706,10 +1712,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1706
1712
  * Creates a webhook subscription for the authenticated user. Webhooks notify your app
1707
1713
  * when specified events occur (e.g., bookings created, cancelled, rescheduled).
1708
1714
  *
1709
- * @see https://cal.com/docs/api-reference/v2/webhooks/create-a-webhook
1715
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1716
+ * @returns Creates a webhook subscription from the given input.
1710
1717
  *
1711
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1712
- * @returns a function that creates a webhook subscription from the given input
1718
+ * @see https://cal.com/docs/api-reference/v2/webhooks/create-a-webhook
1713
1719
  *
1714
1720
  * @example
1715
1721
  * ```ts
@@ -1720,6 +1726,7 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1720
1726
  * });
1721
1727
  * console.log(response.data.id);
1722
1728
  * ```
1729
+ *
1723
1730
  * @__NO_SIDE_EFFECTS__
1724
1731
  */ function createWebhook(context) {
1725
1732
  return function(input) {
@@ -1732,10 +1739,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1732
1739
  /**
1733
1740
  * Retrieves all webhooks for the authenticated user.
1734
1741
  *
1735
- * @see https://cal.com/docs/api-reference/v2/webhooks/get-all-webhooks
1742
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1743
+ * @returns Retrieves all webhooks.
1736
1744
  *
1737
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1738
- * @returns a function that retrieves all webhooks
1745
+ * @see https://cal.com/docs/api-reference/v2/webhooks/get-all-webhooks
1739
1746
  *
1740
1747
  * @example
1741
1748
  * ```ts
@@ -1752,10 +1759,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1752
1759
  /**
1753
1760
  * Retrieves a specific webhook by ID.
1754
1761
  *
1755
- * @see https://cal.com/docs/api-reference/v2/webhooks/get-a-webhook
1762
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1763
+ * @returns Retrieves a specific webhook by ID.
1756
1764
  *
1757
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1758
- * @returns a function that retrieves a specific webhook by ID
1765
+ * @see https://cal.com/docs/api-reference/v2/webhooks/get-a-webhook
1759
1766
  *
1760
1767
  * @example
1761
1768
  * ```ts
@@ -1772,10 +1779,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1772
1779
  /**
1773
1780
  * Updates an existing webhook by ID.
1774
1781
  *
1775
- * @see https://cal.com/docs/api-reference/v2/webhooks/update-a-webhook
1782
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1783
+ * @returns Updates an existing webhook by ID.
1776
1784
  *
1777
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1778
- * @returns a function that updates an existing webhook by ID
1785
+ * @see https://cal.com/docs/api-reference/v2/webhooks/update-a-webhook
1779
1786
  *
1780
1787
  * @example
1781
1788
  * ```ts
@@ -1792,10 +1799,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1792
1799
  /**
1793
1800
  * Deletes a webhook by ID.
1794
1801
  *
1795
- * @see https://cal.com/docs/api-reference/v2/webhooks/delete-a-webhook
1802
+ * @param context - The Cal.com API context providing authentication and fetch capabilities.
1803
+ * @returns Deletes a webhook by ID.
1796
1804
  *
1797
- * @param context - the Cal.com API context providing authentication and fetch capabilities
1798
- * @returns a function that deletes a webhook by ID
1805
+ * @see https://cal.com/docs/api-reference/v2/webhooks/delete-a-webhook
1799
1806
  *
1800
1807
  * @example
1801
1808
  * ```ts
@@ -1815,10 +1822,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1815
1822
  *
1816
1823
  * Cal.com uses JSON body (not Basic Auth) for token requests.
1817
1824
  *
1818
- * @see https://cal.com/docs/api-reference/v2/oauth/refresh-an-existing-access-token
1825
+ * @param context - The Cal.com OAuth context providing client credentials and fetch capabilities.
1826
+ * @returns Refreshes an access token using an optional refresh token override.
1819
1827
  *
1820
- * @param context - the Cal.com OAuth context providing client credentials and fetch capabilities
1821
- * @returns a function that refreshes an access token using an optional refresh token override
1828
+ * @see https://cal.com/docs/api-reference/v2/oauth/refresh-an-existing-access-token
1822
1829
  *
1823
1830
  * @example
1824
1831
  * ```ts
@@ -1847,10 +1854,10 @@ var CALCOM_API_VERSION_HEADER = 'cal-api-version';
1847
1854
  *
1848
1855
  * Cal.com uses JSON body (not Basic Auth) for token requests.
1849
1856
  *
1850
- * @see https://cal.com/docs/api-reference/v2/oauth/exchange-an-authorization-code-for-access-tokens
1857
+ * @param context - The Cal.com OAuth context providing client credentials and fetch capabilities.
1858
+ * @returns Exchanges an authorization code for access and refresh tokens.
1851
1859
  *
1852
- * @param context - the Cal.com OAuth context providing client credentials and fetch capabilities
1853
- * @returns a function that exchanges an authorization code for access and refresh tokens
1860
+ * @see https://cal.com/docs/api-reference/v2/oauth/exchange-an-authorization-code-for-access-tokens
1854
1861
  *
1855
1862
  * @example
1856
1863
  * ```ts
@@ -2016,8 +2023,9 @@ function _ts_generator(thisArg, body) {
2016
2023
  * Supports both API key authentication (static token, no refresh) and full OAuth
2017
2024
  * refresh token flow with automatic token rotation.
2018
2025
  *
2019
- * @param factoryConfig - configuration including optional fetch factory and error logging
2020
- * @returns a factory function that accepts a CalcomOAuthConfig and produces a CalcomOAuth instance
2026
+ * @param factoryConfig - Configuration including optional fetch factory and error logging.
2027
+ * @returns A factory function that accepts a CalcomOAuthConfig and produces a CalcomOAuth instance.
2028
+ *
2021
2029
  * @__NO_SIDE_EFFECTS__
2022
2030
  */ function calcomOAuthFactory(factoryConfig) {
2023
2031
  var fetchHandler = calcomRateLimitedFetchHandler();
@@ -2177,8 +2185,9 @@ function _ts_generator(thisArg, body) {
2177
2185
  * Checks the in-memory cache first, then the external cache, and finally refreshes
2178
2186
  * from the token refresher if no valid token is available.
2179
2187
  *
2180
- * @param config - configuration including the token refresher, optional cache, and expiration buffer
2181
- * @returns a CalcomAccessTokenFactory that returns a valid access token on each call
2188
+ * @param config - Configuration including the token refresher, optional cache, and expiration buffer.
2189
+ * @returns A CalcomAccessTokenFactory that returns a valid access token on each call.
2190
+ *
2182
2191
  * @__NO_SIDE_EFFECTS__
2183
2192
  */ function calcomOAuthAccessTokenFactory(config) {
2184
2193
  var tokenRefresher = config.tokenRefresher, accessTokenCache = config.accessTokenCache, inputTokenExpirationBuffer = config.tokenExpirationBuffer;