@dereekb/nestjs 13.43.0 → 14.0.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.
@@ -5,9 +5,7 @@ import { ConfigService, ConfigModule } from '@nestjs/config';
5
5
  import { RawBody } from '@dereekb/nestjs';
6
6
 
7
7
  function _class_call_check$e(instance, Constructor) {
8
- if (!(instance instanceof Constructor)) {
9
- throw new TypeError("Cannot call a class as a function");
10
- }
8
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
11
9
  }
12
10
  function _defineProperties$8(target, props) {
13
11
  for(var i = 0; i < props.length; i++){
@@ -30,9 +28,7 @@ function _define_property$b(obj, key, value) {
30
28
  configurable: true,
31
29
  writable: true
32
30
  });
33
- } else {
34
- obj[key] = value;
35
- }
31
+ } else obj[key] = value;
36
32
  return obj;
37
33
  }
38
34
  var TWILIO_ACCOUNT_SID_ENV_VAR = 'TWILIO_ACCOUNT_SID';
@@ -98,26 +94,11 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
98
94
  };
99
95
 
100
96
  var _twilioModule_default;
101
- /**
102
- * `twilio` is published as pure CommonJS — no `exports` map, no `module` field, just
103
- * `main: "./lib"`. Node therefore synthesizes its ESM namespace with `cjs-module-lexer`, which
104
- * finds no named exports on that entry, so the namespace is only `{ default, module.exports }`
105
- * and a named `import { Twilio } from 'twilio'` cannot bind. Any plain-Node consumer of this
106
- * package's ESM build dies at load time with
107
- * `SyntaxError: Named export 'Twilio' not found`.
108
- *
109
- * Unlike `rrule`, there is no separate ESM build here, so bundlers resolve the same CommonJS
110
- * entry and their own interop supplies the identical `default`. Unwrapping `default` when
111
- * present is correct in both worlds.
112
- *
113
- * Guarded by `tools/scripts/check-esm-named-imports.mjs`.
114
- */ var twilio = (_twilioModule_default = twilioModule.default) !== null && _twilioModule_default !== void 0 ? _twilioModule_default : twilioModule;
97
+ var twilio = (_twilioModule_default = twilioModule.default) !== null && _twilioModule_default !== void 0 ? _twilioModule_default : twilioModule;
115
98
  var Twilio = twilio.Twilio, validateRequest = twilio.validateRequest;
116
99
 
117
100
  function _class_call_check$d(instance, Constructor) {
118
- if (!(instance instanceof Constructor)) {
119
- throw new TypeError("Cannot call a class as a function");
120
- }
101
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
121
102
  }
122
103
  function _define_property$a(obj, key, value) {
123
104
  if (key in obj) {
@@ -127,9 +108,7 @@ function _define_property$a(obj, key, value) {
127
108
  configurable: true,
128
109
  writable: true
129
110
  });
130
- } else {
131
- obj[key] = value;
132
- }
111
+ } else obj[key] = value;
133
112
  return obj;
134
113
  }
135
114
  var TwilioApi = function TwilioApi(config) {
@@ -169,11 +148,8 @@ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
169
148
  reject(error);
170
149
  return;
171
150
  }
172
- if (info.done) {
173
- resolve(value);
174
- } else {
175
- Promise.resolve(value).then(_next, _throw);
176
- }
151
+ if (info.done) resolve(value);
152
+ else Promise.resolve(value).then(_next, _throw);
177
153
  }
178
154
  function _async_to_generator$4(fn) {
179
155
  return function() {
@@ -191,9 +167,7 @@ function _async_to_generator$4(fn) {
191
167
  };
192
168
  }
193
169
  function _class_call_check$c(instance, Constructor) {
194
- if (!(instance instanceof Constructor)) {
195
- throw new TypeError("Cannot call a class as a function");
196
- }
170
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
197
171
  }
198
172
  function _defineProperties$7(target, props) {
199
173
  for(var i = 0; i < props.length; i++){
@@ -216,18 +190,14 @@ function _define_property$9(obj, key, value) {
216
190
  configurable: true,
217
191
  writable: true
218
192
  });
219
- } else {
220
- obj[key] = value;
221
- }
193
+ } else obj[key] = value;
222
194
  return obj;
223
195
  }
224
196
  function _instanceof$1(left, right) {
225
197
  "@swc/helpers - instanceof";
226
198
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
227
199
  return !!right[Symbol.hasInstance](left);
228
- } else {
229
- return left instanceof right;
230
- }
200
+ } else return left instanceof right;
231
201
  }
232
202
  function _iterable_to_array_limit(arr, i) {
233
203
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
@@ -254,7 +224,7 @@ function _iterable_to_array_limit(arr, i) {
254
224
  return _arr;
255
225
  }
256
226
  function _non_iterable_rest() {
257
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
227
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
258
228
  }
259
229
  function _object_spread$2(target) {
260
230
  for(var i = 1; i < arguments.length; i++){
@@ -274,14 +244,6 @@ function _object_spread$2(target) {
274
244
  function _sliced_to_array(arr, i) {
275
245
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
276
246
  }
277
- function _unsupported_iterable_to_array(o, minLen) {
278
- if (!o) return;
279
- if (typeof o === "string") return _array_like_to_array(o, minLen);
280
- var n = Object.prototype.toString.call(o).slice(8, -1);
281
- if (n === "Object" && o.constructor) n = o.constructor.name;
282
- if (n === "Map" || n === "Set") return Array.from(n);
283
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
284
- }
285
247
  function _ts_generator$4(thisArg, body) {
286
248
  var f, y, t, _ = {
287
249
  label: 0,
@@ -381,6 +343,14 @@ function _ts_generator$4(thisArg, body) {
381
343
  };
382
344
  }
383
345
  }
346
+ function _unsupported_iterable_to_array(o, minLen) {
347
+ if (!o) return;
348
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
349
+ var n = Object.prototype.toString.call(o).slice(8, -1);
350
+ if (n === "Object" && o.constructor) n = o.constructor.name;
351
+ if (n === "Map" || n === "Set") return Array.from(n);
352
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
353
+ }
384
354
  /**
385
355
  * Maximum number of concurrent SMS send requests issued by {@link TwilioService.sendBulkSms}.
386
356
  */ var DEFAULT_TWILIO_SEND_SMS_MAX_PARALLEL_TASKS = 5;
@@ -541,9 +511,7 @@ TwilioService = __decorate([
541
511
  ], TwilioService);
542
512
 
543
513
  function _class_call_check$b(instance, Constructor) {
544
- if (!(instance instanceof Constructor)) {
545
- throw new TypeError("Cannot call a class as a function");
546
- }
514
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
547
515
  }
548
516
  /**
549
517
  * Factory that creates a {@link TwilioServiceConfig} from environment variables.
@@ -600,9 +568,7 @@ TwilioModule = __decorate([
600
568
  ], TwilioModule);
601
569
 
602
570
  function _class_call_check$a(instance, Constructor) {
603
- if (!(instance instanceof Constructor)) {
604
- throw new TypeError("Cannot call a class as a function");
605
- }
571
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
606
572
  }
607
573
  function _defineProperties$6(target, props) {
608
574
  for(var i = 0; i < props.length; i++){
@@ -625,9 +591,7 @@ function _define_property$8(obj, key, value) {
625
591
  configurable: true,
626
592
  writable: true
627
593
  });
628
- } else {
629
- obj[key] = value;
630
- }
594
+ } else obj[key] = value;
631
595
  return obj;
632
596
  }
633
597
  var TwilioLookupApi = /*#__PURE__*/ function() {
@@ -665,11 +629,8 @@ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
665
629
  reject(error);
666
630
  return;
667
631
  }
668
- if (info.done) {
669
- resolve(value);
670
- } else {
671
- Promise.resolve(value).then(_next, _throw);
672
- }
632
+ if (info.done) resolve(value);
633
+ else Promise.resolve(value).then(_next, _throw);
673
634
  }
674
635
  function _async_to_generator$3(fn) {
675
636
  return function() {
@@ -687,9 +648,7 @@ function _async_to_generator$3(fn) {
687
648
  };
688
649
  }
689
650
  function _class_call_check$9(instance, Constructor) {
690
- if (!(instance instanceof Constructor)) {
691
- throw new TypeError("Cannot call a class as a function");
692
- }
651
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
693
652
  }
694
653
  function _defineProperties$5(target, props) {
695
654
  for(var i = 0; i < props.length; i++){
@@ -712,18 +671,14 @@ function _define_property$7(obj, key, value) {
712
671
  configurable: true,
713
672
  writable: true
714
673
  });
715
- } else {
716
- obj[key] = value;
717
- }
674
+ } else obj[key] = value;
718
675
  return obj;
719
676
  }
720
677
  function _instanceof(left, right) {
721
678
  "@swc/helpers - instanceof";
722
679
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
723
680
  return !!right[Symbol.hasInstance](left);
724
- } else {
725
- return left instanceof right;
726
- }
681
+ } else return left instanceof right;
727
682
  }
728
683
  function _ts_generator$3(thisArg, body) {
729
684
  var f, y, t, _ = {
@@ -924,9 +879,7 @@ TwilioLookupService = __decorate([
924
879
  ], TwilioLookupService);
925
880
 
926
881
  function _class_call_check$8(instance, Constructor) {
927
- if (!(instance instanceof Constructor)) {
928
- throw new TypeError("Cannot call a class as a function");
929
- }
882
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
930
883
  }
931
884
  /**
932
885
  * NestJS module that exposes Twilio Lookup v2 (phone validation, carrier info).
@@ -952,9 +905,7 @@ TwilioLookupModule = __decorate([
952
905
  ], TwilioLookupModule);
953
906
 
954
907
  function _class_call_check$7(instance, Constructor) {
955
- if (!(instance instanceof Constructor)) {
956
- throw new TypeError("Cannot call a class as a function");
957
- }
908
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
958
909
  }
959
910
  function _defineProperties$4(target, props) {
960
911
  for(var i = 0; i < props.length; i++){
@@ -977,9 +928,7 @@ function _define_property$6(obj, key, value) {
977
928
  configurable: true,
978
929
  writable: true
979
930
  });
980
- } else {
981
- obj[key] = value;
982
- }
931
+ } else obj[key] = value;
983
932
  return obj;
984
933
  }
985
934
  var TWILIO_VERIFY_SERVICE_SID_ENV_VAR = 'TWILIO_VERIFY_SERVICE_SID';
@@ -1005,9 +954,7 @@ var TWILIO_VERIFY_SERVICE_SID_ENV_VAR = 'TWILIO_VERIFY_SERVICE_SID';
1005
954
  ();
1006
955
 
1007
956
  function _class_call_check$6(instance, Constructor) {
1008
- if (!(instance instanceof Constructor)) {
1009
- throw new TypeError("Cannot call a class as a function");
1010
- }
957
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1011
958
  }
1012
959
  function _defineProperties$3(target, props) {
1013
960
  for(var i = 0; i < props.length; i++){
@@ -1030,9 +977,7 @@ function _define_property$5(obj, key, value) {
1030
977
  configurable: true,
1031
978
  writable: true
1032
979
  });
1033
- } else {
1034
- obj[key] = value;
1035
- }
980
+ } else obj[key] = value;
1036
981
  return obj;
1037
982
  }
1038
983
  var TwilioVerifyApi = /*#__PURE__*/ function() {
@@ -1079,11 +1024,8 @@ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
1079
1024
  reject(error);
1080
1025
  return;
1081
1026
  }
1082
- if (info.done) {
1083
- resolve(value);
1084
- } else {
1085
- Promise.resolve(value).then(_next, _throw);
1086
- }
1027
+ if (info.done) resolve(value);
1028
+ else Promise.resolve(value).then(_next, _throw);
1087
1029
  }
1088
1030
  function _async_to_generator$2(fn) {
1089
1031
  return function() {
@@ -1101,9 +1043,7 @@ function _async_to_generator$2(fn) {
1101
1043
  };
1102
1044
  }
1103
1045
  function _class_call_check$5(instance, Constructor) {
1104
- if (!(instance instanceof Constructor)) {
1105
- throw new TypeError("Cannot call a class as a function");
1106
- }
1046
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1107
1047
  }
1108
1048
  function _defineProperties$2(target, props) {
1109
1049
  for(var i = 0; i < props.length; i++){
@@ -1126,9 +1066,7 @@ function _define_property$4(obj, key, value) {
1126
1066
  configurable: true,
1127
1067
  writable: true
1128
1068
  });
1129
- } else {
1130
- obj[key] = value;
1131
- }
1069
+ } else obj[key] = value;
1132
1070
  return obj;
1133
1071
  }
1134
1072
  function _object_spread$1(target) {
@@ -1350,9 +1288,7 @@ TwilioVerifyService = __decorate([
1350
1288
  ], TwilioVerifyService);
1351
1289
 
1352
1290
  function _class_call_check$4(instance, Constructor) {
1353
- if (!(instance instanceof Constructor)) {
1354
- throw new TypeError("Cannot call a class as a function");
1355
- }
1291
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1356
1292
  }
1357
1293
  /**
1358
1294
  * Factory that creates a {@link TwilioVerifyServiceConfig} from environment variables.
@@ -1408,9 +1344,7 @@ function _define_property$3(obj, key, value) {
1408
1344
  configurable: true,
1409
1345
  writable: true
1410
1346
  });
1411
- } else {
1412
- obj[key] = value;
1413
- }
1347
+ } else obj[key] = value;
1414
1348
  return obj;
1415
1349
  }
1416
1350
  function _object_spread(target) {
@@ -1438,9 +1372,8 @@ function ownKeys(object, enumerableOnly) {
1438
1372
  }
1439
1373
  function _object_spread_props(target, source) {
1440
1374
  source = source != null ? source : {};
1441
- if (Object.getOwnPropertyDescriptors) {
1442
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1443
- } else {
1375
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1376
+ else {
1444
1377
  ownKeys(Object(source)).forEach(function(key) {
1445
1378
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1446
1379
  });
@@ -1468,9 +1401,7 @@ var twilioWebhookEventHandlerConfigurerFactory = handlerConfigurerFactory({
1468
1401
  });
1469
1402
 
1470
1403
  function _class_call_check$3(instance, Constructor) {
1471
- if (!(instance instanceof Constructor)) {
1472
- throw new TypeError("Cannot call a class as a function");
1473
- }
1404
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1474
1405
  }
1475
1406
  function _define_property$2(obj, key, value) {
1476
1407
  if (key in obj) {
@@ -1480,9 +1411,7 @@ function _define_property$2(obj, key, value) {
1480
1411
  configurable: true,
1481
1412
  writable: true
1482
1413
  });
1483
- } else {
1484
- obj[key] = value;
1485
- }
1414
+ } else obj[key] = value;
1486
1415
  return obj;
1487
1416
  }
1488
1417
  var TWILIO_WEBHOOK_AUTH_TOKEN_ENV_VAR = 'TWILIO_WEBHOOK_AUTH_TOKEN';
@@ -1568,11 +1497,8 @@ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
1568
1497
  reject(error);
1569
1498
  return;
1570
1499
  }
1571
- if (info.done) {
1572
- resolve(value);
1573
- } else {
1574
- Promise.resolve(value).then(_next, _throw);
1575
- }
1500
+ if (info.done) resolve(value);
1501
+ else Promise.resolve(value).then(_next, _throw);
1576
1502
  }
1577
1503
  function _async_to_generator$1(fn) {
1578
1504
  return function() {
@@ -1590,9 +1516,7 @@ function _async_to_generator$1(fn) {
1590
1516
  };
1591
1517
  }
1592
1518
  function _class_call_check$2(instance, Constructor) {
1593
- if (!(instance instanceof Constructor)) {
1594
- throw new TypeError("Cannot call a class as a function");
1595
- }
1519
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1596
1520
  }
1597
1521
  function _defineProperties$1(target, props) {
1598
1522
  for(var i = 0; i < props.length; i++){
@@ -1615,9 +1539,7 @@ function _define_property$1(obj, key, value) {
1615
1539
  configurable: true,
1616
1540
  writable: true
1617
1541
  });
1618
- } else {
1619
- obj[key] = value;
1620
- }
1542
+ } else obj[key] = value;
1621
1543
  return obj;
1622
1544
  }
1623
1545
  function _ts_generator$1(thisArg, body) {
@@ -1891,11 +1813,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1891
1813
  reject(error);
1892
1814
  return;
1893
1815
  }
1894
- if (info.done) {
1895
- resolve(value);
1896
- } else {
1897
- Promise.resolve(value).then(_next, _throw);
1898
- }
1816
+ if (info.done) resolve(value);
1817
+ else Promise.resolve(value).then(_next, _throw);
1899
1818
  }
1900
1819
  function _async_to_generator(fn) {
1901
1820
  return function() {
@@ -1913,9 +1832,7 @@ function _async_to_generator(fn) {
1913
1832
  };
1914
1833
  }
1915
1834
  function _class_call_check$1(instance, Constructor) {
1916
- if (!(instance instanceof Constructor)) {
1917
- throw new TypeError("Cannot call a class as a function");
1918
- }
1835
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1919
1836
  }
1920
1837
  function _defineProperties(target, props) {
1921
1838
  for(var i = 0; i < props.length; i++){
@@ -1938,9 +1855,7 @@ function _define_property(obj, key, value) {
1938
1855
  configurable: true,
1939
1856
  writable: true
1940
1857
  });
1941
- } else {
1942
- obj[key] = value;
1943
- }
1858
+ } else obj[key] = value;
1944
1859
  return obj;
1945
1860
  }
1946
1861
  function _ts_generator(thisArg, body) {
@@ -2116,9 +2031,7 @@ TwilioWebhookController = __decorate([
2116
2031
  ], TwilioWebhookController);
2117
2032
 
2118
2033
  function _class_call_check(instance, Constructor) {
2119
- if (!(instance instanceof Constructor)) {
2120
- throw new TypeError("Cannot call a class as a function");
2121
- }
2034
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
2122
2035
  }
2123
2036
  /**
2124
2037
  * Factory that creates a {@link TwilioWebhookServiceConfig} from environment variables.
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs/twilio",
3
- "version": "13.43.0",
3
+ "version": "14.0.0",
4
4
  "type": "module",
5
5
  "peerDependencies": {
6
- "@dereekb/date": "13.43.0",
7
- "@dereekb/model": "13.43.0",
8
- "@dereekb/nestjs": "13.43.0",
9
- "@dereekb/rxjs": "13.43.0",
10
- "@dereekb/util": "13.43.0",
11
- "@nestjs/common": "^11.1.19",
12
- "@nestjs/config": "^4.0.4",
6
+ "@dereekb/date": "14.0.0",
7
+ "@dereekb/model": "14.0.0",
8
+ "@dereekb/nestjs": "14.0.0",
9
+ "@dereekb/rxjs": "14.0.0",
10
+ "@dereekb/util": "14.0.0",
11
+ "@nestjs/common": "^12.0.1",
12
+ "@nestjs/config": "^12.0.0",
13
13
  "express": "^5.2.1",
14
14
  "twilio": "^6.0.2"
15
15
  },
@@ -13,9 +13,7 @@ function _define_property$6(obj, key, value) {
13
13
  configurable: true,
14
14
  writable: true
15
15
  });
16
- } else {
17
- obj[key] = value;
18
- }
16
+ } else obj[key] = value;
19
17
  return obj;
20
18
  }
21
19
  function _object_spread$1(target) {
@@ -43,9 +41,8 @@ function ownKeys$1(object, enumerableOnly) {
43
41
  }
44
42
  function _object_spread_props$1(target, source) {
45
43
  source = source != null ? source : {};
46
- if (Object.getOwnPropertyDescriptors) {
47
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
48
- } else {
44
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
45
+ else {
49
46
  ownKeys$1(Object(source)).forEach(function(key) {
50
47
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
51
48
  });
@@ -74,9 +71,7 @@ var typeformEventHandlerConfigurerFactory = handlerConfigurerFactory({
74
71
  });
75
72
 
76
73
  function _class_call_check$6(instance, Constructor) {
77
- if (!(instance instanceof Constructor)) {
78
- throw new TypeError("Cannot call a class as a function");
79
- }
74
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
80
75
  }
81
76
  function _defineProperties$3(target, props) {
82
77
  for(var i = 0; i < props.length; i++){
@@ -99,9 +94,7 @@ function _define_property$5(obj, key, value) {
99
94
  configurable: true,
100
95
  writable: true
101
96
  });
102
- } else {
103
- obj[key] = value;
104
- }
97
+ } else obj[key] = value;
105
98
  return obj;
106
99
  }
107
100
  var TYPEFORM_WEBHOOK_SECRET_TOKEN_ENV_VAR = 'TYPEFORM_WEBHOOK_SECRET_TOKEN';
@@ -154,11 +147,8 @@ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
154
147
  reject(error);
155
148
  return;
156
149
  }
157
- if (info.done) {
158
- resolve(value);
159
- } else {
160
- Promise.resolve(value).then(_next, _throw);
161
- }
150
+ if (info.done) resolve(value);
151
+ else Promise.resolve(value).then(_next, _throw);
162
152
  }
163
153
  function _async_to_generator$2(fn) {
164
154
  return function() {
@@ -313,11 +303,8 @@ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
313
303
  reject(error);
314
304
  return;
315
305
  }
316
- if (info.done) {
317
- resolve(value);
318
- } else {
319
- Promise.resolve(value).then(_next, _throw);
320
- }
306
+ if (info.done) resolve(value);
307
+ else Promise.resolve(value).then(_next, _throw);
321
308
  }
322
309
  function _async_to_generator$1(fn) {
323
310
  return function() {
@@ -335,9 +322,7 @@ function _async_to_generator$1(fn) {
335
322
  };
336
323
  }
337
324
  function _class_call_check$5(instance, Constructor) {
338
- if (!(instance instanceof Constructor)) {
339
- throw new TypeError("Cannot call a class as a function");
340
- }
325
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
341
326
  }
342
327
  function _defineProperties$2(target, props) {
343
328
  for(var i = 0; i < props.length; i++){
@@ -360,9 +345,7 @@ function _define_property$4(obj, key, value) {
360
345
  configurable: true,
361
346
  writable: true
362
347
  });
363
- } else {
364
- obj[key] = value;
365
- }
348
+ } else obj[key] = value;
366
349
  return obj;
367
350
  }
368
351
  function _ts_generator$1(thisArg, body) {
@@ -560,11 +543,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
560
543
  reject(error);
561
544
  return;
562
545
  }
563
- if (info.done) {
564
- resolve(value);
565
- } else {
566
- Promise.resolve(value).then(_next, _throw);
567
- }
546
+ if (info.done) resolve(value);
547
+ else Promise.resolve(value).then(_next, _throw);
568
548
  }
569
549
  function _async_to_generator(fn) {
570
550
  return function() {
@@ -582,9 +562,7 @@ function _async_to_generator(fn) {
582
562
  };
583
563
  }
584
564
  function _class_call_check$4(instance, Constructor) {
585
- if (!(instance instanceof Constructor)) {
586
- throw new TypeError("Cannot call a class as a function");
587
- }
565
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
588
566
  }
589
567
  function _defineProperties$1(target, props) {
590
568
  for(var i = 0; i < props.length; i++){
@@ -607,9 +585,7 @@ function _define_property$3(obj, key, value) {
607
585
  configurable: true,
608
586
  writable: true
609
587
  });
610
- } else {
611
- obj[key] = value;
612
- }
588
+ } else obj[key] = value;
613
589
  return obj;
614
590
  }
615
591
  function _ts_generator(thisArg, body) {
@@ -753,9 +729,7 @@ TypeformWebhookController = __decorate([
753
729
  ], TypeformWebhookController);
754
730
 
755
731
  function _class_call_check$3(instance, Constructor) {
756
- if (!(instance instanceof Constructor)) {
757
- throw new TypeError("Cannot call a class as a function");
758
- }
732
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
759
733
  }
760
734
  /**
761
735
  * Factory that creates a TypeformWebhookServiceConfig from environment variables.
@@ -858,9 +832,7 @@ function _define_property$2(obj, key, value) {
858
832
  configurable: true,
859
833
  writable: true
860
834
  });
861
- } else {
862
- obj[key] = value;
863
- }
835
+ } else obj[key] = value;
864
836
  return obj;
865
837
  }
866
838
  function _object_spread(target) {
@@ -888,9 +860,8 @@ function ownKeys(object, enumerableOnly) {
888
860
  }
889
861
  function _object_spread_props(target, source) {
890
862
  source = source != null ? source : {};
891
- if (Object.getOwnPropertyDescriptors) {
892
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
893
- } else {
863
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
864
+ else {
894
865
  ownKeys(Object(source)).forEach(function(key) {
895
866
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
896
867
  });
@@ -1026,9 +997,7 @@ function _object_spread_props(target, source) {
1026
997
  }
1027
998
 
1028
999
  function _class_call_check$2(instance, Constructor) {
1029
- if (!(instance instanceof Constructor)) {
1030
- throw new TypeError("Cannot call a class as a function");
1031
- }
1000
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1032
1001
  }
1033
1002
  function _defineProperties(target, props) {
1034
1003
  for(var i = 0; i < props.length; i++){
@@ -1051,9 +1020,7 @@ function _define_property$1(obj, key, value) {
1051
1020
  configurable: true,
1052
1021
  writable: true
1053
1022
  });
1054
- } else {
1055
- obj[key] = value;
1056
- }
1023
+ } else obj[key] = value;
1057
1024
  return obj;
1058
1025
  }
1059
1026
  /**
@@ -1082,9 +1049,7 @@ var TYPEFORM_BASE_URL_ENV_VAR = 'TYPEFORM_BASE_URL';
1082
1049
  ();
1083
1050
 
1084
1051
  function _class_call_check$1(instance, Constructor) {
1085
- if (!(instance instanceof Constructor)) {
1086
- throw new TypeError("Cannot call a class as a function");
1087
- }
1052
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1088
1053
  }
1089
1054
  function _define_property(obj, key, value) {
1090
1055
  if (key in obj) {
@@ -1094,9 +1059,7 @@ function _define_property(obj, key, value) {
1094
1059
  configurable: true,
1095
1060
  writable: true
1096
1061
  });
1097
- } else {
1098
- obj[key] = value;
1099
- }
1062
+ } else obj[key] = value;
1100
1063
  return obj;
1101
1064
  }
1102
1065
  var TypeformApi = function TypeformApi(config) {
@@ -1112,9 +1075,7 @@ TypeformApi = __decorate([
1112
1075
  ], TypeformApi);
1113
1076
 
1114
1077
  function _class_call_check(instance, Constructor) {
1115
- if (!(instance instanceof Constructor)) {
1116
- throw new TypeError("Cannot call a class as a function");
1117
- }
1078
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1118
1079
  }
1119
1080
  /**
1120
1081
  * Factory that creates a TypeformServiceConfig from environment variables.