@dereekb/calcom 13.15.0 → 13.17.0

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
@@ -1069,7 +1069,7 @@ var DEFAULT_CALCOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION = function DEFAUL
1069
1069
  * @returns A CalcomRateLimitedFetchHandler that enforces rate limiting.
1070
1070
  */ function calcomRateLimitedFetchHandler(config) {
1071
1071
  var _ref, _ref1, _ref2;
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;
1072
+ var onTooManyRequests = (config === null || config === void 0 ? void 0 : config.onTooManyRequests) === false ? undefined : (_ref = config === null || config === void 0 ? void 0 : config.onTooManyRequests) !== null && _ref !== void 0 ? _ref : DEFAULT_CALCOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION;
1073
1073
  var defaultLimit = (_ref1 = config === null || config === void 0 ? void 0 : config.maxRateLimit) !== null && _ref1 !== void 0 ? _ref1 : DEFAULT_CALCOM_API_RATE_LIMIT;
1074
1074
  var defaultResetPeriod = (_ref2 = config === null || config === void 0 ? void 0 : config.resetPeriod) !== null && _ref2 !== void 0 ? _ref2 : DEFAULT_CALCOM_API_RATE_LIMIT_RESET_PERIOD;
1075
1075
  function configForLimit(limit, resetAt) {
package/index.esm.js CHANGED
@@ -1067,7 +1067,7 @@ var DEFAULT_CALCOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION = function DEFAUL
1067
1067
  * @returns A CalcomRateLimitedFetchHandler that enforces rate limiting.
1068
1068
  */ function calcomRateLimitedFetchHandler(config) {
1069
1069
  var _ref, _ref1, _ref2;
1070
- 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;
1070
+ var onTooManyRequests = (config === null || config === void 0 ? void 0 : config.onTooManyRequests) === false ? undefined : (_ref = config === null || config === void 0 ? void 0 : config.onTooManyRequests) !== null && _ref !== void 0 ? _ref : DEFAULT_CALCOM_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION;
1071
1071
  var defaultLimit = (_ref1 = config === null || config === void 0 ? void 0 : config.maxRateLimit) !== null && _ref1 !== void 0 ? _ref1 : DEFAULT_CALCOM_API_RATE_LIMIT;
1072
1072
  var defaultResetPeriod = (_ref2 = config === null || config === void 0 ? void 0 : config.resetPeriod) !== null && _ref2 !== void 0 ? _ref2 : DEFAULT_CALCOM_API_RATE_LIMIT_RESET_PERIOD;
1073
1073
  function configForLimit(limit, resetAt) {
@@ -463,7 +463,7 @@ function updateCalcomCacheCapturingError(cache, accessToken) {
463
463
  * @throws {Error} When `inputServicesToMerge` is empty.
464
464
  */ function mergeCalcomOAuthAccessTokenCacheServices(inputServicesToMerge, logError) {
465
465
  var allServices = _to_consumable_array$3(inputServicesToMerge);
466
- var logErrorFunction = typeof logError === 'function' ? logError : logError !== false ? logMergeCalcomOAuthAccessTokenCacheServiceErrorFunction : undefined;
466
+ var logErrorFunction = typeof logError === 'function' ? logError : logError === false ? undefined : logMergeCalcomOAuthAccessTokenCacheServiceErrorFunction;
467
467
  if (allServices.length === 0) {
468
468
  throw new Error('mergeCalcomOAuthAccessTokenCacheServices() input cannot be empty.');
469
469
  }
@@ -1764,22 +1764,22 @@ function _ts_generator$1(thisArg, body) {
1764
1764
  headers = req.headers;
1765
1765
  _this__verifier = this._verifier(rawBody, headers), valid = _this__verifier.valid, event = _this__verifier.event;
1766
1766
  handled = false;
1767
- if (!!valid) return [
1767
+ if (!valid) return [
1768
1768
  3,
1769
- 1
1769
+ 2
1770
1770
  ];
1771
- this.logger.warn('Received invalid calcom event: ', event);
1772
1771
  return [
1773
- 3,
1774
- 3
1772
+ 4,
1773
+ this.updateForCalcomEvent(event)
1775
1774
  ];
1776
1775
  case 1:
1776
+ handled = _state.sent();
1777
1777
  return [
1778
- 4,
1779
- this.updateForCalcomEvent(event)
1778
+ 3,
1779
+ 3
1780
1780
  ];
1781
1781
  case 2:
1782
- handled = _state.sent();
1782
+ this.logger.warn('Received invalid calcom event: ', event);
1783
1783
  _state.label = 3;
1784
1784
  case 3:
1785
1785
  result = {
@@ -461,7 +461,7 @@ function updateCalcomCacheCapturingError(cache, accessToken) {
461
461
  * @throws {Error} When `inputServicesToMerge` is empty.
462
462
  */ function mergeCalcomOAuthAccessTokenCacheServices(inputServicesToMerge, logError) {
463
463
  var allServices = _to_consumable_array$3(inputServicesToMerge);
464
- var logErrorFunction = typeof logError === 'function' ? logError : logError !== false ? logMergeCalcomOAuthAccessTokenCacheServiceErrorFunction : undefined;
464
+ var logErrorFunction = typeof logError === 'function' ? logError : logError === false ? undefined : logMergeCalcomOAuthAccessTokenCacheServiceErrorFunction;
465
465
  if (allServices.length === 0) {
466
466
  throw new Error('mergeCalcomOAuthAccessTokenCacheServices() input cannot be empty.');
467
467
  }
@@ -1762,22 +1762,22 @@ function _ts_generator$1(thisArg, body) {
1762
1762
  headers = req.headers;
1763
1763
  _this__verifier = this._verifier(rawBody, headers), valid = _this__verifier.valid, event = _this__verifier.event;
1764
1764
  handled = false;
1765
- if (!!valid) return [
1765
+ if (!valid) return [
1766
1766
  3,
1767
- 1
1767
+ 2
1768
1768
  ];
1769
- this.logger.warn('Received invalid calcom event: ', event);
1770
1769
  return [
1771
- 3,
1772
- 3
1770
+ 4,
1771
+ this.updateForCalcomEvent(event)
1773
1772
  ];
1774
1773
  case 1:
1774
+ handled = _state.sent();
1775
1775
  return [
1776
- 4,
1777
- this.updateForCalcomEvent(event)
1776
+ 3,
1777
+ 3
1778
1778
  ];
1779
1779
  case 2:
1780
- handled = _state.sent();
1780
+ this.logger.warn('Received invalid calcom event: ', event);
1781
1781
  _state.label = 3;
1782
1782
  case 3:
1783
1783
  result = {
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dereekb/calcom/nestjs",
3
- "version": "13.15.0",
3
+ "version": "13.17.0",
4
4
  "peerDependencies": {
5
- "@dereekb/nestjs": "13.15.0",
6
- "@dereekb/rxjs": "13.15.0",
7
- "@dereekb/util": "13.15.0",
8
- "@dereekb/calcom": "13.15.0",
5
+ "@dereekb/nestjs": "13.17.0",
6
+ "@dereekb/rxjs": "13.17.0",
7
+ "@dereekb/util": "13.17.0",
8
+ "@dereekb/calcom": "13.17.0",
9
9
  "@nestjs/common": "^11.1.19",
10
10
  "@nestjs/config": "^4.0.4",
11
11
  "express": "^5.2.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/calcom",
3
- "version": "13.15.0",
3
+ "version": "13.17.0",
4
4
  "exports": {
5
5
  "./nestjs": {
6
6
  "module": "./nestjs/index.esm.js",
@@ -17,9 +17,9 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@dereekb/nestjs": "13.15.0",
21
- "@dereekb/rxjs": "13.15.0",
22
- "@dereekb/util": "13.15.0",
20
+ "@dereekb/nestjs": "13.17.0",
21
+ "@dereekb/rxjs": "13.17.0",
22
+ "@dereekb/util": "13.17.0",
23
23
  "@nestjs/common": "^11.1.19",
24
24
  "@nestjs/config": "^4.0.4",
25
25
  "express": "^5.2.1",