@dereekb/zoho 13.7.0 → 13.9.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.
Files changed (38) hide show
  1. package/cli/LICENSE +21 -0
  2. package/cli/index.js +4 -0
  3. package/cli/package.json +20 -0
  4. package/index.cjs.js +2553 -242
  5. package/index.esm.js +2490 -243
  6. package/nestjs/index.cjs.js +864 -203
  7. package/nestjs/index.esm.js +861 -205
  8. package/nestjs/package.json +6 -6
  9. package/nestjs/src/lib/desk/desk.api.d.ts +213 -0
  10. package/nestjs/src/lib/desk/desk.config.d.ts +27 -0
  11. package/nestjs/src/lib/desk/desk.module.d.ts +62 -0
  12. package/nestjs/src/lib/desk/index.d.ts +3 -0
  13. package/nestjs/src/lib/index.d.ts +1 -0
  14. package/package.json +13 -6
  15. package/src/lib/desk/desk.agent.d.ts +45 -0
  16. package/src/lib/desk/desk.api.activities.d.ts +43 -0
  17. package/src/lib/desk/desk.api.agents.d.ts +91 -0
  18. package/src/lib/desk/desk.api.attachments.d.ts +47 -0
  19. package/src/lib/desk/desk.api.comments.d.ts +86 -0
  20. package/src/lib/desk/desk.api.contacts.d.ts +81 -0
  21. package/src/lib/desk/desk.api.departments.d.ts +47 -0
  22. package/src/lib/desk/desk.api.followers.d.ts +57 -0
  23. package/src/lib/desk/desk.api.page.d.ts +72 -0
  24. package/src/lib/desk/desk.api.tags.d.ts +102 -0
  25. package/src/lib/desk/desk.api.threads.d.ts +60 -0
  26. package/src/lib/desk/desk.api.tickets.d.ts +227 -0
  27. package/src/lib/desk/desk.api.time.d.ts +109 -0
  28. package/src/lib/desk/desk.config.d.ts +75 -0
  29. package/src/lib/desk/desk.contact.d.ts +50 -0
  30. package/src/lib/desk/desk.d.ts +44 -0
  31. package/src/lib/desk/desk.department.d.ts +27 -0
  32. package/src/lib/desk/desk.error.api.d.ts +33 -0
  33. package/src/lib/desk/desk.factory.d.ts +47 -0
  34. package/src/lib/desk/desk.limit.d.ts +39 -0
  35. package/src/lib/desk/desk.ticket.d.ts +308 -0
  36. package/src/lib/desk/index.d.ts +21 -0
  37. package/src/lib/index.d.ts +1 -0
  38. package/src/lib/zoho.limit.d.ts +66 -10
@@ -82,12 +82,12 @@ function readZohoConfigFromConfigService(configOrService, servicePrefix) {
82
82
  }
83
83
  }
84
84
 
85
- function _class_call_check$c(instance, Constructor) {
85
+ function _class_call_check$e(instance, Constructor) {
86
86
  if (!(instance instanceof Constructor)) {
87
87
  throw new TypeError("Cannot call a class as a function");
88
88
  }
89
89
  }
90
- function _defineProperties$a(target, props) {
90
+ function _defineProperties$c(target, props) {
91
91
  for(var i = 0; i < props.length; i++){
92
92
  var descriptor = props[i];
93
93
  descriptor.enumerable = descriptor.enumerable || false;
@@ -96,11 +96,11 @@ function _defineProperties$a(target, props) {
96
96
  Object.defineProperty(target, descriptor.key, descriptor);
97
97
  }
98
98
  }
99
- function _create_class$a(Constructor, protoProps, staticProps) {
100
- if (staticProps) _defineProperties$a(Constructor, staticProps);
99
+ function _create_class$c(Constructor, protoProps, staticProps) {
100
+ if (staticProps) _defineProperties$c(Constructor, staticProps);
101
101
  return Constructor;
102
102
  }
103
- function _define_property$c(obj, key, value) {
103
+ function _define_property$e(obj, key, value) {
104
104
  if (key in obj) {
105
105
  Object.defineProperty(obj, key, {
106
106
  value: value,
@@ -117,11 +117,11 @@ function _define_property$c(obj, key, value) {
117
117
  * Configuration for ZohoService
118
118
  */ var ZohoAccountsServiceConfig = /*#__PURE__*/ function() {
119
119
  function ZohoAccountsServiceConfig() {
120
- _class_call_check$c(this, ZohoAccountsServiceConfig);
121
- _define_property$c(this, "zohoAccounts", void 0);
122
- _define_property$c(this, "factoryConfig", void 0);
120
+ _class_call_check$e(this, ZohoAccountsServiceConfig);
121
+ _define_property$e(this, "zohoAccounts", void 0);
122
+ _define_property$e(this, "factoryConfig", void 0);
123
123
  }
124
- _create_class$a(ZohoAccountsServiceConfig, null, [
124
+ _create_class$c(ZohoAccountsServiceConfig, null, [
125
125
  {
126
126
  key: "assertValidConfig",
127
127
  value: function assertValidConfig(config) {
@@ -185,7 +185,7 @@ function _define_property$c(obj, key, value) {
185
185
  return config;
186
186
  }
187
187
 
188
- function _array_like_to_array$3(arr, len) {
188
+ function _array_like_to_array$4(arr, len) {
189
189
  if (len == null || len > arr.length) len = arr.length;
190
190
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
191
191
  return arr2;
@@ -193,8 +193,8 @@ function _array_like_to_array$3(arr, len) {
193
193
  function _array_with_holes(arr) {
194
194
  if (Array.isArray(arr)) return arr;
195
195
  }
196
- function _array_without_holes$3(arr) {
197
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
196
+ function _array_without_holes$4(arr) {
197
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
198
198
  }
199
199
  function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
200
200
  try {
@@ -225,12 +225,12 @@ function _async_to_generator$3(fn) {
225
225
  });
226
226
  };
227
227
  }
228
- function _class_call_check$b(instance, Constructor) {
228
+ function _class_call_check$d(instance, Constructor) {
229
229
  if (!(instance instanceof Constructor)) {
230
230
  throw new TypeError("Cannot call a class as a function");
231
231
  }
232
232
  }
233
- function _define_property$b(obj, key, value) {
233
+ function _define_property$d(obj, key, value) {
234
234
  if (key in obj) {
235
235
  Object.defineProperty(obj, key, {
236
236
  value: value,
@@ -243,7 +243,7 @@ function _define_property$b(obj, key, value) {
243
243
  }
244
244
  return obj;
245
245
  }
246
- function _iterable_to_array$3(iter) {
246
+ function _iterable_to_array$4(iter) {
247
247
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
248
248
  }
249
249
  function _iterable_to_array_limit(arr, i) {
@@ -273,10 +273,10 @@ function _iterable_to_array_limit(arr, i) {
273
273
  function _non_iterable_rest() {
274
274
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
275
275
  }
276
- function _non_iterable_spread$3() {
276
+ function _non_iterable_spread$4() {
277
277
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
278
278
  }
279
- function _object_spread$5(target) {
279
+ function _object_spread$6(target) {
280
280
  for(var i = 1; i < arguments.length; i++){
281
281
  var source = arguments[i] != null ? arguments[i] : {};
282
282
  var ownKeys = Object.keys(source);
@@ -286,24 +286,24 @@ function _object_spread$5(target) {
286
286
  }));
287
287
  }
288
288
  ownKeys.forEach(function(key) {
289
- _define_property$b(target, key, source[key]);
289
+ _define_property$d(target, key, source[key]);
290
290
  });
291
291
  }
292
292
  return target;
293
293
  }
294
294
  function _sliced_to_array(arr, i) {
295
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest();
295
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest();
296
296
  }
297
- function _to_consumable_array$3(arr) {
298
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$3();
297
+ function _to_consumable_array$4(arr) {
298
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$4();
299
299
  }
300
- function _unsupported_iterable_to_array$3(o, minLen) {
300
+ function _unsupported_iterable_to_array$4(o, minLen) {
301
301
  if (!o) return;
302
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
302
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
303
303
  var n = Object.prototype.toString.call(o).slice(8, -1);
304
304
  if (n === "Object" && o.constructor) n = o.constructor.name;
305
305
  if (n === "Map" || n === "Set") return Array.from(n);
306
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
306
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
307
307
  }
308
308
  function _ts_generator$3(thisArg, body) {
309
309
  var f, y, t, _ = {
@@ -407,7 +407,7 @@ function _ts_generator$3(thisArg, body) {
407
407
  /**
408
408
  * Service used for retrieving ZohoAccessTokenCache for Zoho services.
409
409
  */ exports.ZohoAccountsAccessTokenCacheService = function ZohoAccountsAccessTokenCacheService() {
410
- _class_call_check$b(this, ZohoAccountsAccessTokenCacheService);
410
+ _class_call_check$d(this, ZohoAccountsAccessTokenCacheService);
411
411
  };
412
412
  exports.ZohoAccountsAccessTokenCacheService = __decorate([
413
413
  common.Injectable()
@@ -435,7 +435,7 @@ exports.ZohoAccountsAccessTokenCacheService = __decorate([
435
435
  * @param logError - optional error logging toggle or custom logging function
436
436
  * @returns a merged ZohoAccountsAccessTokenCacheService that delegates across all inputs
437
437
  */ function mergeZohoAccountsAccessTokenCacheServices(inputServicesToMerge, logError) {
438
- var services = _to_consumable_array$3(inputServicesToMerge);
438
+ var services = _to_consumable_array$4(inputServicesToMerge);
439
439
  var logErrorFunction = typeof logError === 'function' ? logError : logError !== false ? logMergeZohoAccountsAccessTokenCacheServiceErrorFunction : undefined;
440
440
  if (services.length === 0) {
441
441
  throw new Error('mergeZohoAccountsAccessTokenCacheServices() input cannot be empty.');
@@ -603,31 +603,31 @@ var DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = '.tmp/zoho-acce
603
603
  var loadedTokens = null;
604
604
  function loadTokens() {
605
605
  return _async_to_generator$3(function() {
606
- var _ref;
606
+ var _ref, _tmp;
607
607
  return _ts_generator$3(this, function(_state) {
608
608
  switch(_state.label){
609
609
  case 0:
610
- if (!!loadedTokens) return [
610
+ if (!loadedTokens) return [
611
611
  3,
612
- 2
612
+ 1
613
613
  ];
614
+ _tmp = loadedTokens;
614
615
  return [
615
- 4,
616
- readTokenFile()
616
+ 3,
617
+ 3
617
618
  ];
618
619
  case 1:
619
620
  return [
620
- 2,
621
- (_ref = _state.sent()) !== null && _ref !== void 0 ? _ref : {}
621
+ 4,
622
+ readTokenFile()
622
623
  ];
623
624
  case 2:
624
- return [
625
- 2,
626
- loadedTokens
627
- ];
625
+ _tmp = (_ref = _state.sent()) !== null && _ref !== void 0 ? _ref : {};
626
+ _state.label = 3;
628
627
  case 3:
629
628
  return [
630
- 2
629
+ 2,
630
+ _tmp
631
631
  ];
632
632
  }
633
633
  });
@@ -659,7 +659,7 @@ var DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = '.tmp/zoho-acce
659
659
  }).then(function(x) {
660
660
  // update loaded tokens
661
661
  if (useMemoryCache) {
662
- loadedTokens = _object_spread$5({}, loadedTokens, x);
662
+ loadedTokens = _object_spread$6({}, loadedTokens, x);
663
663
  }
664
664
  return x;
665
665
  });
@@ -819,12 +819,12 @@ var DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = '.tmp/zoho-acce
819
819
  };
820
820
  }
821
821
 
822
- function _class_call_check$a(instance, Constructor) {
822
+ function _class_call_check$c(instance, Constructor) {
823
823
  if (!(instance instanceof Constructor)) {
824
824
  throw new TypeError("Cannot call a class as a function");
825
825
  }
826
826
  }
827
- function _defineProperties$9(target, props) {
827
+ function _defineProperties$b(target, props) {
828
828
  for(var i = 0; i < props.length; i++){
829
829
  var descriptor = props[i];
830
830
  descriptor.enumerable = descriptor.enumerable || false;
@@ -833,11 +833,11 @@ function _defineProperties$9(target, props) {
833
833
  Object.defineProperty(target, descriptor.key, descriptor);
834
834
  }
835
835
  }
836
- function _create_class$9(Constructor, protoProps, staticProps) {
837
- if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
836
+ function _create_class$b(Constructor, protoProps, staticProps) {
837
+ if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
838
838
  return Constructor;
839
839
  }
840
- function _define_property$a(obj, key, value) {
840
+ function _define_property$c(obj, key, value) {
841
841
  if (key in obj) {
842
842
  Object.defineProperty(obj, key, {
843
843
  value: value,
@@ -850,7 +850,7 @@ function _define_property$a(obj, key, value) {
850
850
  }
851
851
  return obj;
852
852
  }
853
- function _object_spread$4(target) {
853
+ function _object_spread$5(target) {
854
854
  for(var i = 1; i < arguments.length; i++){
855
855
  var source = arguments[i] != null ? arguments[i] : {};
856
856
  var ownKeys = Object.keys(source);
@@ -860,26 +860,26 @@ function _object_spread$4(target) {
860
860
  }));
861
861
  }
862
862
  ownKeys.forEach(function(key) {
863
- _define_property$a(target, key, source[key]);
863
+ _define_property$c(target, key, source[key]);
864
864
  });
865
865
  }
866
866
  return target;
867
867
  }
868
868
  exports.ZohoAccountsApi = /*#__PURE__*/ function() {
869
869
  function ZohoAccountsApi(config, cacheService) {
870
- _class_call_check$a(this, ZohoAccountsApi);
870
+ _class_call_check$c(this, ZohoAccountsApi);
871
871
  var _config_zohoAccounts_accessTokenCache, _config_factoryConfig;
872
- _define_property$a(this, "config", void 0);
873
- _define_property$a(this, "cacheService", void 0);
874
- _define_property$a(this, "zohoAccounts", void 0);
872
+ _define_property$c(this, "config", void 0);
873
+ _define_property$c(this, "cacheService", void 0);
874
+ _define_property$c(this, "zohoAccounts", void 0);
875
875
  this.config = config;
876
876
  this.cacheService = cacheService;
877
877
  var accessTokenCache = (_config_zohoAccounts_accessTokenCache = config.zohoAccounts.accessTokenCache) !== null && _config_zohoAccounts_accessTokenCache !== void 0 ? _config_zohoAccounts_accessTokenCache : cacheService.loadZohoAccessTokenCache(config.zohoAccounts.serviceAccessTokenKey);
878
- this.zohoAccounts = zoho.zohoAccountsFactory((_config_factoryConfig = config.factoryConfig) !== null && _config_factoryConfig !== void 0 ? _config_factoryConfig : {})(_object_spread$4({
878
+ this.zohoAccounts = zoho.zohoAccountsFactory((_config_factoryConfig = config.factoryConfig) !== null && _config_factoryConfig !== void 0 ? _config_factoryConfig : {})(_object_spread$5({
879
879
  accessTokenCache: accessTokenCache
880
880
  }, config.zohoAccounts));
881
881
  }
882
- _create_class$9(ZohoAccountsApi, [
882
+ _create_class$b(ZohoAccountsApi, [
883
883
  {
884
884
  key: "accountsContext",
885
885
  get: function get() {
@@ -902,12 +902,12 @@ exports.ZohoAccountsApi = __decorate([
902
902
  __param(1, common.Inject(exports.ZohoAccountsAccessTokenCacheService))
903
903
  ], exports.ZohoAccountsApi);
904
904
 
905
- function _class_call_check$9(instance, Constructor) {
905
+ function _class_call_check$b(instance, Constructor) {
906
906
  if (!(instance instanceof Constructor)) {
907
907
  throw new TypeError("Cannot call a class as a function");
908
908
  }
909
909
  }
910
- function _defineProperties$8(target, props) {
910
+ function _defineProperties$a(target, props) {
911
911
  for(var i = 0; i < props.length; i++){
912
912
  var descriptor = props[i];
913
913
  descriptor.enumerable = descriptor.enumerable || false;
@@ -916,11 +916,11 @@ function _defineProperties$8(target, props) {
916
916
  Object.defineProperty(target, descriptor.key, descriptor);
917
917
  }
918
918
  }
919
- function _create_class$8(Constructor, protoProps, staticProps) {
920
- if (staticProps) _defineProperties$8(Constructor, staticProps);
919
+ function _create_class$a(Constructor, protoProps, staticProps) {
920
+ if (staticProps) _defineProperties$a(Constructor, staticProps);
921
921
  return Constructor;
922
922
  }
923
- function _define_property$9(obj, key, value) {
923
+ function _define_property$b(obj, key, value) {
924
924
  if (key in obj) {
925
925
  Object.defineProperty(obj, key, {
926
926
  value: value,
@@ -940,15 +940,15 @@ function _define_property$9(obj, key, value) {
940
940
  * while keeping the expected shape consistent.
941
941
  */ var ZohoCrmServiceConfig = /*#__PURE__*/ function() {
942
942
  function ZohoCrmServiceConfig() {
943
- _class_call_check$9(this, ZohoCrmServiceConfig);
943
+ _class_call_check$b(this, ZohoCrmServiceConfig);
944
944
  /**
945
945
  * Zoho CRM API connection settings (endpoint URL, etc.).
946
- */ _define_property$9(this, "zohoCrm", void 0);
946
+ */ _define_property$b(this, "zohoCrm", void 0);
947
947
  /**
948
948
  * Optional factory-level overrides applied when creating the underlying CRM client.
949
- */ _define_property$9(this, "factoryConfig", void 0);
949
+ */ _define_property$b(this, "factoryConfig", void 0);
950
950
  }
951
- _create_class$8(ZohoCrmServiceConfig, null, [
951
+ _create_class$a(ZohoCrmServiceConfig, null, [
952
952
  {
953
953
  key: "assertValidConfig",
954
954
  value: /**
@@ -964,12 +964,12 @@ function _define_property$9(obj, key, value) {
964
964
  }
965
965
  ();
966
966
 
967
- function _class_call_check$8(instance, Constructor) {
967
+ function _class_call_check$a(instance, Constructor) {
968
968
  if (!(instance instanceof Constructor)) {
969
969
  throw new TypeError("Cannot call a class as a function");
970
970
  }
971
971
  }
972
- function _defineProperties$7(target, props) {
972
+ function _defineProperties$9(target, props) {
973
973
  for(var i = 0; i < props.length; i++){
974
974
  var descriptor = props[i];
975
975
  descriptor.enumerable = descriptor.enumerable || false;
@@ -978,11 +978,11 @@ function _defineProperties$7(target, props) {
978
978
  Object.defineProperty(target, descriptor.key, descriptor);
979
979
  }
980
980
  }
981
- function _create_class$7(Constructor, protoProps, staticProps) {
982
- if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
981
+ function _create_class$9(Constructor, protoProps, staticProps) {
982
+ if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
983
983
  return Constructor;
984
984
  }
985
- function _define_property$8(obj, key, value) {
985
+ function _define_property$a(obj, key, value) {
986
986
  if (key in obj) {
987
987
  Object.defineProperty(obj, key, {
988
988
  value: value,
@@ -995,7 +995,7 @@ function _define_property$8(obj, key, value) {
995
995
  }
996
996
  return obj;
997
997
  }
998
- function _object_spread$3(target) {
998
+ function _object_spread$4(target) {
999
999
  for(var i = 1; i < arguments.length; i++){
1000
1000
  var source = arguments[i] != null ? arguments[i] : {};
1001
1001
  var ownKeys = Object.keys(source);
@@ -1005,12 +1005,12 @@ function _object_spread$3(target) {
1005
1005
  }));
1006
1006
  }
1007
1007
  ownKeys.forEach(function(key) {
1008
- _define_property$8(target, key, source[key]);
1008
+ _define_property$a(target, key, source[key]);
1009
1009
  });
1010
1010
  }
1011
1011
  return target;
1012
1012
  }
1013
- function ownKeys$3(object, enumerableOnly) {
1013
+ function ownKeys$4(object, enumerableOnly) {
1014
1014
  var keys = Object.keys(object);
1015
1015
  if (Object.getOwnPropertySymbols) {
1016
1016
  var symbols = Object.getOwnPropertySymbols(object);
@@ -1018,12 +1018,12 @@ function ownKeys$3(object, enumerableOnly) {
1018
1018
  }
1019
1019
  return keys;
1020
1020
  }
1021
- function _object_spread_props$3(target, source) {
1021
+ function _object_spread_props$4(target, source) {
1022
1022
  source = source != null ? source : {};
1023
1023
  if (Object.getOwnPropertyDescriptors) {
1024
1024
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1025
1025
  } else {
1026
- ownKeys$3(Object(source)).forEach(function(key) {
1026
+ ownKeys$4(Object(source)).forEach(function(key) {
1027
1027
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1028
1028
  });
1029
1029
  }
@@ -1036,19 +1036,19 @@ function _object_spread_props$3(target, source) {
1036
1036
  * to the authenticated CRM context created during construction.
1037
1037
  */ exports.ZohoCrmApi = /*#__PURE__*/ function() {
1038
1038
  function ZohoCrmApi(config, zohoAccountsApi) {
1039
- _class_call_check$8(this, ZohoCrmApi);
1040
- _define_property$8(this, "config", void 0);
1041
- _define_property$8(this, "zohoAccountsApi", void 0);
1039
+ _class_call_check$a(this, ZohoCrmApi);
1040
+ _define_property$a(this, "config", void 0);
1041
+ _define_property$a(this, "zohoAccountsApi", void 0);
1042
1042
  /**
1043
1043
  * Underlying Zoho CRM client instance, initialized from the injected config and accounts context.
1044
- */ _define_property$8(this, "zohoCrm", void 0);
1044
+ */ _define_property$a(this, "zohoCrm", void 0);
1045
1045
  this.config = config;
1046
1046
  this.zohoAccountsApi = zohoAccountsApi;
1047
- this.zohoCrm = zoho.zohoCrmFactory(_object_spread_props$3(_object_spread$3({}, config.factoryConfig), {
1047
+ this.zohoCrm = zoho.zohoCrmFactory(_object_spread_props$4(_object_spread$4({}, config.factoryConfig), {
1048
1048
  accountsContext: zohoAccountsApi.accountsContext
1049
1049
  }))(config.zohoCrm);
1050
1050
  }
1051
- _create_class$7(ZohoCrmApi, [
1051
+ _create_class$9(ZohoCrmApi, [
1052
1052
  {
1053
1053
  key: "crmContext",
1054
1054
  get: /**
@@ -1349,30 +1349,30 @@ exports.ZohoCrmApi = __decorate([
1349
1349
  __param(1, common.Inject(exports.ZohoAccountsApi))
1350
1350
  ], exports.ZohoCrmApi);
1351
1351
 
1352
- function _array_like_to_array$2(arr, len) {
1352
+ function _array_like_to_array$3(arr, len) {
1353
1353
  if (len == null || len > arr.length) len = arr.length;
1354
1354
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1355
1355
  return arr2;
1356
1356
  }
1357
- function _array_without_holes$2(arr) {
1358
- if (Array.isArray(arr)) return _array_like_to_array$2(arr);
1357
+ function _array_without_holes$3(arr) {
1358
+ if (Array.isArray(arr)) return _array_like_to_array$3(arr);
1359
1359
  }
1360
- function _iterable_to_array$2(iter) {
1360
+ function _iterable_to_array$3(iter) {
1361
1361
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1362
1362
  }
1363
- function _non_iterable_spread$2() {
1363
+ function _non_iterable_spread$3() {
1364
1364
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1365
1365
  }
1366
- function _to_consumable_array$2(arr) {
1367
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
1366
+ function _to_consumable_array$3(arr) {
1367
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$3();
1368
1368
  }
1369
- function _unsupported_iterable_to_array$2(o, minLen) {
1369
+ function _unsupported_iterable_to_array$3(o, minLen) {
1370
1370
  if (!o) return;
1371
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
1371
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
1372
1372
  var n = Object.prototype.toString.call(o).slice(8, -1);
1373
1373
  if (n === "Object" && o.constructor) n = o.constructor.name;
1374
1374
  if (n === "Map" || n === "Set") return Array.from(n);
1375
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
1375
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
1376
1376
  }
1377
1377
  // MARK: Provider Factories
1378
1378
  /**
@@ -1468,10 +1468,10 @@ function _unsupported_iterable_to_array$2(o, minLen) {
1468
1468
  return {
1469
1469
  imports: [
1470
1470
  config.ConfigModule
1471
- ].concat(_to_consumable_array$2(dependencyModuleImport), _to_consumable_array$2(imports !== null && imports !== void 0 ? imports : [])),
1471
+ ].concat(_to_consumable_array$3(dependencyModuleImport), _to_consumable_array$3(imports !== null && imports !== void 0 ? imports : [])),
1472
1472
  exports: [
1473
1473
  exports.ZohoCrmApi
1474
- ].concat(_to_consumable_array$2(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
1474
+ ].concat(_to_consumable_array$3(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
1475
1475
  providers: [
1476
1476
  {
1477
1477
  provide: ZohoCrmServiceConfig,
@@ -1490,16 +1490,16 @@ function _unsupported_iterable_to_array$2(o, minLen) {
1490
1490
  useFactory: zohoCrmAccountServiceConfigFactory
1491
1491
  },
1492
1492
  exports.ZohoAccountsApi
1493
- ].concat(_to_consumable_array$2(providers !== null && providers !== void 0 ? providers : []))
1493
+ ].concat(_to_consumable_array$3(providers !== null && providers !== void 0 ? providers : []))
1494
1494
  };
1495
1495
  }
1496
1496
 
1497
- function _class_call_check$7(instance, Constructor) {
1497
+ function _class_call_check$9(instance, Constructor) {
1498
1498
  if (!(instance instanceof Constructor)) {
1499
1499
  throw new TypeError("Cannot call a class as a function");
1500
1500
  }
1501
1501
  }
1502
- function _defineProperties$6(target, props) {
1502
+ function _defineProperties$8(target, props) {
1503
1503
  for(var i = 0; i < props.length; i++){
1504
1504
  var descriptor = props[i];
1505
1505
  descriptor.enumerable = descriptor.enumerable || false;
@@ -1508,11 +1508,11 @@ function _defineProperties$6(target, props) {
1508
1508
  Object.defineProperty(target, descriptor.key, descriptor);
1509
1509
  }
1510
1510
  }
1511
- function _create_class$6(Constructor, protoProps, staticProps) {
1512
- if (staticProps) _defineProperties$6(Constructor, staticProps);
1511
+ function _create_class$8(Constructor, protoProps, staticProps) {
1512
+ if (staticProps) _defineProperties$8(Constructor, staticProps);
1513
1513
  return Constructor;
1514
1514
  }
1515
- function _define_property$7(obj, key, value) {
1515
+ function _define_property$9(obj, key, value) {
1516
1516
  if (key in obj) {
1517
1517
  Object.defineProperty(obj, key, {
1518
1518
  value: value,
@@ -1532,15 +1532,15 @@ function _define_property$7(obj, key, value) {
1532
1532
  * while keeping the expected shape consistent.
1533
1533
  */ var ZohoRecruitServiceConfig = /*#__PURE__*/ function() {
1534
1534
  function ZohoRecruitServiceConfig() {
1535
- _class_call_check$7(this, ZohoRecruitServiceConfig);
1535
+ _class_call_check$9(this, ZohoRecruitServiceConfig);
1536
1536
  /**
1537
1537
  * Zoho Recruit API connection settings (endpoint URL, etc.).
1538
- */ _define_property$7(this, "zohoRecruit", void 0);
1538
+ */ _define_property$9(this, "zohoRecruit", void 0);
1539
1539
  /**
1540
1540
  * Optional factory-level overrides applied when creating the underlying Recruit client.
1541
- */ _define_property$7(this, "factoryConfig", void 0);
1541
+ */ _define_property$9(this, "factoryConfig", void 0);
1542
1542
  }
1543
- _create_class$6(ZohoRecruitServiceConfig, null, [
1543
+ _create_class$8(ZohoRecruitServiceConfig, null, [
1544
1544
  {
1545
1545
  key: "assertValidConfig",
1546
1546
  value: /**
@@ -1556,12 +1556,12 @@ function _define_property$7(obj, key, value) {
1556
1556
  }
1557
1557
  ();
1558
1558
 
1559
- function _class_call_check$6(instance, Constructor) {
1559
+ function _class_call_check$8(instance, Constructor) {
1560
1560
  if (!(instance instanceof Constructor)) {
1561
1561
  throw new TypeError("Cannot call a class as a function");
1562
1562
  }
1563
1563
  }
1564
- function _defineProperties$5(target, props) {
1564
+ function _defineProperties$7(target, props) {
1565
1565
  for(var i = 0; i < props.length; i++){
1566
1566
  var descriptor = props[i];
1567
1567
  descriptor.enumerable = descriptor.enumerable || false;
@@ -1570,11 +1570,11 @@ function _defineProperties$5(target, props) {
1570
1570
  Object.defineProperty(target, descriptor.key, descriptor);
1571
1571
  }
1572
1572
  }
1573
- function _create_class$5(Constructor, protoProps, staticProps) {
1574
- if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
1573
+ function _create_class$7(Constructor, protoProps, staticProps) {
1574
+ if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
1575
1575
  return Constructor;
1576
1576
  }
1577
- function _define_property$6(obj, key, value) {
1577
+ function _define_property$8(obj, key, value) {
1578
1578
  if (key in obj) {
1579
1579
  Object.defineProperty(obj, key, {
1580
1580
  value: value,
@@ -1587,7 +1587,7 @@ function _define_property$6(obj, key, value) {
1587
1587
  }
1588
1588
  return obj;
1589
1589
  }
1590
- function _object_spread$2(target) {
1590
+ function _object_spread$3(target) {
1591
1591
  for(var i = 1; i < arguments.length; i++){
1592
1592
  var source = arguments[i] != null ? arguments[i] : {};
1593
1593
  var ownKeys = Object.keys(source);
@@ -1597,12 +1597,12 @@ function _object_spread$2(target) {
1597
1597
  }));
1598
1598
  }
1599
1599
  ownKeys.forEach(function(key) {
1600
- _define_property$6(target, key, source[key]);
1600
+ _define_property$8(target, key, source[key]);
1601
1601
  });
1602
1602
  }
1603
1603
  return target;
1604
1604
  }
1605
- function ownKeys$2(object, enumerableOnly) {
1605
+ function ownKeys$3(object, enumerableOnly) {
1606
1606
  var keys = Object.keys(object);
1607
1607
  if (Object.getOwnPropertySymbols) {
1608
1608
  var symbols = Object.getOwnPropertySymbols(object);
@@ -1610,12 +1610,12 @@ function ownKeys$2(object, enumerableOnly) {
1610
1610
  }
1611
1611
  return keys;
1612
1612
  }
1613
- function _object_spread_props$2(target, source) {
1613
+ function _object_spread_props$3(target, source) {
1614
1614
  source = source != null ? source : {};
1615
1615
  if (Object.getOwnPropertyDescriptors) {
1616
1616
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1617
1617
  } else {
1618
- ownKeys$2(Object(source)).forEach(function(key) {
1618
+ ownKeys$3(Object(source)).forEach(function(key) {
1619
1619
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1620
1620
  });
1621
1621
  }
@@ -1628,19 +1628,19 @@ function _object_spread_props$2(target, source) {
1628
1628
  * to the authenticated Recruit context created during construction.
1629
1629
  */ exports.ZohoRecruitApi = /*#__PURE__*/ function() {
1630
1630
  function ZohoRecruitApi(config, zohoAccountsApi) {
1631
- _class_call_check$6(this, ZohoRecruitApi);
1632
- _define_property$6(this, "config", void 0);
1633
- _define_property$6(this, "zohoAccountsApi", void 0);
1631
+ _class_call_check$8(this, ZohoRecruitApi);
1632
+ _define_property$8(this, "config", void 0);
1633
+ _define_property$8(this, "zohoAccountsApi", void 0);
1634
1634
  /**
1635
1635
  * Underlying Zoho Recruit client instance, initialized from the injected config and accounts context.
1636
- */ _define_property$6(this, "zohoRecruit", void 0);
1636
+ */ _define_property$8(this, "zohoRecruit", void 0);
1637
1637
  this.config = config;
1638
1638
  this.zohoAccountsApi = zohoAccountsApi;
1639
- this.zohoRecruit = zoho.zohoRecruitFactory(_object_spread_props$2(_object_spread$2({}, config.factoryConfig), {
1639
+ this.zohoRecruit = zoho.zohoRecruitFactory(_object_spread_props$3(_object_spread$3({}, config.factoryConfig), {
1640
1640
  accountsContext: zohoAccountsApi.accountsContext
1641
1641
  }))(config.zohoRecruit);
1642
1642
  }
1643
- _create_class$5(ZohoRecruitApi, [
1643
+ _create_class$7(ZohoRecruitApi, [
1644
1644
  {
1645
1645
  key: "recruitContext",
1646
1646
  get: /**
@@ -1981,30 +1981,30 @@ exports.ZohoRecruitApi = __decorate([
1981
1981
  __param(1, common.Inject(exports.ZohoAccountsApi))
1982
1982
  ], exports.ZohoRecruitApi);
1983
1983
 
1984
- function _array_like_to_array$1(arr, len) {
1984
+ function _array_like_to_array$2(arr, len) {
1985
1985
  if (len == null || len > arr.length) len = arr.length;
1986
1986
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1987
1987
  return arr2;
1988
1988
  }
1989
- function _array_without_holes$1(arr) {
1990
- if (Array.isArray(arr)) return _array_like_to_array$1(arr);
1989
+ function _array_without_holes$2(arr) {
1990
+ if (Array.isArray(arr)) return _array_like_to_array$2(arr);
1991
1991
  }
1992
- function _iterable_to_array$1(iter) {
1992
+ function _iterable_to_array$2(iter) {
1993
1993
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1994
1994
  }
1995
- function _non_iterable_spread$1() {
1995
+ function _non_iterable_spread$2() {
1996
1996
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1997
1997
  }
1998
- function _to_consumable_array$1(arr) {
1999
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
1998
+ function _to_consumable_array$2(arr) {
1999
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
2000
2000
  }
2001
- function _unsupported_iterable_to_array$1(o, minLen) {
2001
+ function _unsupported_iterable_to_array$2(o, minLen) {
2002
2002
  if (!o) return;
2003
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
2003
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
2004
2004
  var n = Object.prototype.toString.call(o).slice(8, -1);
2005
2005
  if (n === "Object" && o.constructor) n = o.constructor.name;
2006
2006
  if (n === "Map" || n === "Set") return Array.from(n);
2007
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
2007
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
2008
2008
  }
2009
2009
  // MARK: Provider Factories
2010
2010
  /**
@@ -2100,10 +2100,10 @@ function _unsupported_iterable_to_array$1(o, minLen) {
2100
2100
  return {
2101
2101
  imports: [
2102
2102
  config.ConfigModule
2103
- ].concat(_to_consumable_array$1(dependencyModuleImport), _to_consumable_array$1(imports !== null && imports !== void 0 ? imports : [])),
2103
+ ].concat(_to_consumable_array$2(dependencyModuleImport), _to_consumable_array$2(imports !== null && imports !== void 0 ? imports : [])),
2104
2104
  exports: [
2105
2105
  exports.ZohoRecruitApi
2106
- ].concat(_to_consumable_array$1(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
2106
+ ].concat(_to_consumable_array$2(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
2107
2107
  providers: [
2108
2108
  {
2109
2109
  provide: ZohoRecruitServiceConfig,
@@ -2122,16 +2122,16 @@ function _unsupported_iterable_to_array$1(o, minLen) {
2122
2122
  useFactory: zohoRecruitAccountServiceConfigFactory
2123
2123
  },
2124
2124
  exports.ZohoAccountsApi
2125
- ].concat(_to_consumable_array$1(providers !== null && providers !== void 0 ? providers : []))
2125
+ ].concat(_to_consumable_array$2(providers !== null && providers !== void 0 ? providers : []))
2126
2126
  };
2127
2127
  }
2128
2128
 
2129
- function _class_call_check$5(instance, Constructor) {
2129
+ function _class_call_check$7(instance, Constructor) {
2130
2130
  if (!(instance instanceof Constructor)) {
2131
2131
  throw new TypeError("Cannot call a class as a function");
2132
2132
  }
2133
2133
  }
2134
- function _defineProperties$4(target, props) {
2134
+ function _defineProperties$6(target, props) {
2135
2135
  for(var i = 0; i < props.length; i++){
2136
2136
  var descriptor = props[i];
2137
2137
  descriptor.enumerable = descriptor.enumerable || false;
@@ -2140,11 +2140,11 @@ function _defineProperties$4(target, props) {
2140
2140
  Object.defineProperty(target, descriptor.key, descriptor);
2141
2141
  }
2142
2142
  }
2143
- function _create_class$4(Constructor, protoProps, staticProps) {
2144
- if (staticProps) _defineProperties$4(Constructor, staticProps);
2143
+ function _create_class$6(Constructor, protoProps, staticProps) {
2144
+ if (staticProps) _defineProperties$6(Constructor, staticProps);
2145
2145
  return Constructor;
2146
2146
  }
2147
- function _define_property$5(obj, key, value) {
2147
+ function _define_property$7(obj, key, value) {
2148
2148
  if (key in obj) {
2149
2149
  Object.defineProperty(obj, key, {
2150
2150
  value: value,
@@ -2161,11 +2161,11 @@ function _define_property$5(obj, key, value) {
2161
2161
  * Configuration for ZohoSignService
2162
2162
  */ var ZohoSignServiceConfig = /*#__PURE__*/ function() {
2163
2163
  function ZohoSignServiceConfig() {
2164
- _class_call_check$5(this, ZohoSignServiceConfig);
2165
- _define_property$5(this, "zohoSign", void 0);
2166
- _define_property$5(this, "factoryConfig", void 0);
2164
+ _class_call_check$7(this, ZohoSignServiceConfig);
2165
+ _define_property$7(this, "zohoSign", void 0);
2166
+ _define_property$7(this, "factoryConfig", void 0);
2167
2167
  }
2168
- _create_class$4(ZohoSignServiceConfig, null, [
2168
+ _create_class$6(ZohoSignServiceConfig, null, [
2169
2169
  {
2170
2170
  key: "assertValidConfig",
2171
2171
  value: function assertValidConfig(config) {
@@ -2177,12 +2177,12 @@ function _define_property$5(obj, key, value) {
2177
2177
  }
2178
2178
  ();
2179
2179
 
2180
- function _class_call_check$4(instance, Constructor) {
2180
+ function _class_call_check$6(instance, Constructor) {
2181
2181
  if (!(instance instanceof Constructor)) {
2182
2182
  throw new TypeError("Cannot call a class as a function");
2183
2183
  }
2184
2184
  }
2185
- function _defineProperties$3(target, props) {
2185
+ function _defineProperties$5(target, props) {
2186
2186
  for(var i = 0; i < props.length; i++){
2187
2187
  var descriptor = props[i];
2188
2188
  descriptor.enumerable = descriptor.enumerable || false;
@@ -2191,11 +2191,11 @@ function _defineProperties$3(target, props) {
2191
2191
  Object.defineProperty(target, descriptor.key, descriptor);
2192
2192
  }
2193
2193
  }
2194
- function _create_class$3(Constructor, protoProps, staticProps) {
2195
- if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
2194
+ function _create_class$5(Constructor, protoProps, staticProps) {
2195
+ if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
2196
2196
  return Constructor;
2197
2197
  }
2198
- function _define_property$4(obj, key, value) {
2198
+ function _define_property$6(obj, key, value) {
2199
2199
  if (key in obj) {
2200
2200
  Object.defineProperty(obj, key, {
2201
2201
  value: value,
@@ -2208,7 +2208,7 @@ function _define_property$4(obj, key, value) {
2208
2208
  }
2209
2209
  return obj;
2210
2210
  }
2211
- function _object_spread$1(target) {
2211
+ function _object_spread$2(target) {
2212
2212
  for(var i = 1; i < arguments.length; i++){
2213
2213
  var source = arguments[i] != null ? arguments[i] : {};
2214
2214
  var ownKeys = Object.keys(source);
@@ -2218,12 +2218,12 @@ function _object_spread$1(target) {
2218
2218
  }));
2219
2219
  }
2220
2220
  ownKeys.forEach(function(key) {
2221
- _define_property$4(target, key, source[key]);
2221
+ _define_property$6(target, key, source[key]);
2222
2222
  });
2223
2223
  }
2224
2224
  return target;
2225
2225
  }
2226
- function ownKeys$1(object, enumerableOnly) {
2226
+ function ownKeys$2(object, enumerableOnly) {
2227
2227
  var keys = Object.keys(object);
2228
2228
  if (Object.getOwnPropertySymbols) {
2229
2229
  var symbols = Object.getOwnPropertySymbols(object);
@@ -2231,12 +2231,12 @@ function ownKeys$1(object, enumerableOnly) {
2231
2231
  }
2232
2232
  return keys;
2233
2233
  }
2234
- function _object_spread_props$1(target, source) {
2234
+ function _object_spread_props$2(target, source) {
2235
2235
  source = source != null ? source : {};
2236
2236
  if (Object.getOwnPropertyDescriptors) {
2237
2237
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2238
2238
  } else {
2239
- ownKeys$1(Object(source)).forEach(function(key) {
2239
+ ownKeys$2(Object(source)).forEach(function(key) {
2240
2240
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2241
2241
  });
2242
2242
  }
@@ -2249,19 +2249,19 @@ function _object_spread_props$1(target, source) {
2249
2249
  * to the authenticated Sign context created during construction.
2250
2250
  */ exports.ZohoSignApi = /*#__PURE__*/ function() {
2251
2251
  function ZohoSignApi(config, zohoAccountsApi) {
2252
- _class_call_check$4(this, ZohoSignApi);
2253
- _define_property$4(this, "config", void 0);
2254
- _define_property$4(this, "zohoAccountsApi", void 0);
2252
+ _class_call_check$6(this, ZohoSignApi);
2253
+ _define_property$6(this, "config", void 0);
2254
+ _define_property$6(this, "zohoAccountsApi", void 0);
2255
2255
  /**
2256
2256
  * Underlying Zoho Sign client instance, initialized from the injected config and accounts context.
2257
- */ _define_property$4(this, "zohoSign", void 0);
2257
+ */ _define_property$6(this, "zohoSign", void 0);
2258
2258
  this.config = config;
2259
2259
  this.zohoAccountsApi = zohoAccountsApi;
2260
- this.zohoSign = zoho.zohoSignFactory(_object_spread_props$1(_object_spread$1({}, config.factoryConfig), {
2260
+ this.zohoSign = zoho.zohoSignFactory(_object_spread_props$2(_object_spread$2({}, config.factoryConfig), {
2261
2261
  accountsContext: zohoAccountsApi.accountsContext
2262
2262
  }))(config.zohoSign);
2263
2263
  }
2264
- _create_class$3(ZohoSignApi, [
2264
+ _create_class$5(ZohoSignApi, [
2265
2265
  {
2266
2266
  key: "signContext",
2267
2267
  get: /**
@@ -2412,30 +2412,30 @@ exports.ZohoSignApi = __decorate([
2412
2412
  __param(1, common.Inject(exports.ZohoAccountsApi))
2413
2413
  ], exports.ZohoSignApi);
2414
2414
 
2415
- function _array_like_to_array(arr, len) {
2415
+ function _array_like_to_array$1(arr, len) {
2416
2416
  if (len == null || len > arr.length) len = arr.length;
2417
2417
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2418
2418
  return arr2;
2419
2419
  }
2420
- function _array_without_holes(arr) {
2421
- if (Array.isArray(arr)) return _array_like_to_array(arr);
2420
+ function _array_without_holes$1(arr) {
2421
+ if (Array.isArray(arr)) return _array_like_to_array$1(arr);
2422
2422
  }
2423
- function _iterable_to_array(iter) {
2423
+ function _iterable_to_array$1(iter) {
2424
2424
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2425
2425
  }
2426
- function _non_iterable_spread() {
2426
+ function _non_iterable_spread$1() {
2427
2427
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2428
2428
  }
2429
- function _to_consumable_array(arr) {
2430
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
2429
+ function _to_consumable_array$1(arr) {
2430
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
2431
2431
  }
2432
- function _unsupported_iterable_to_array(o, minLen) {
2432
+ function _unsupported_iterable_to_array$1(o, minLen) {
2433
2433
  if (!o) return;
2434
- if (typeof o === "string") return _array_like_to_array(o, minLen);
2434
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
2435
2435
  var n = Object.prototype.toString.call(o).slice(8, -1);
2436
2436
  if (n === "Object" && o.constructor) n = o.constructor.name;
2437
2437
  if (n === "Map" || n === "Set") return Array.from(n);
2438
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
2438
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
2439
2439
  }
2440
2440
  // MARK: Provider Factories
2441
2441
  /**
@@ -2532,10 +2532,10 @@ function _unsupported_iterable_to_array(o, minLen) {
2532
2532
  return {
2533
2533
  imports: [
2534
2534
  config.ConfigModule
2535
- ].concat(_to_consumable_array(dependencyModuleImport), _to_consumable_array(imports !== null && imports !== void 0 ? imports : [])),
2535
+ ].concat(_to_consumable_array$1(dependencyModuleImport), _to_consumable_array$1(imports !== null && imports !== void 0 ? imports : [])),
2536
2536
  exports: [
2537
2537
  exports.ZohoSignApi
2538
- ].concat(_to_consumable_array(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
2538
+ ].concat(_to_consumable_array$1(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
2539
2539
  providers: [
2540
2540
  {
2541
2541
  provide: ZohoSignServiceConfig,
@@ -2554,11 +2554,11 @@ function _unsupported_iterable_to_array(o, minLen) {
2554
2554
  useFactory: zohoSignAccountServiceConfigFactory
2555
2555
  },
2556
2556
  exports.ZohoAccountsApi
2557
- ].concat(_to_consumable_array(providers !== null && providers !== void 0 ? providers : []))
2557
+ ].concat(_to_consumable_array$1(providers !== null && providers !== void 0 ? providers : []))
2558
2558
  };
2559
2559
  }
2560
2560
 
2561
- function _define_property$3(obj, key, value) {
2561
+ function _define_property$5(obj, key, value) {
2562
2562
  if (key in obj) {
2563
2563
  Object.defineProperty(obj, key, {
2564
2564
  value: value,
@@ -2571,7 +2571,7 @@ function _define_property$3(obj, key, value) {
2571
2571
  }
2572
2572
  return obj;
2573
2573
  }
2574
- function _object_spread(target) {
2574
+ function _object_spread$1(target) {
2575
2575
  for(var i = 1; i < arguments.length; i++){
2576
2576
  var source = arguments[i] != null ? arguments[i] : {};
2577
2577
  var ownKeys = Object.keys(source);
@@ -2581,12 +2581,12 @@ function _object_spread(target) {
2581
2581
  }));
2582
2582
  }
2583
2583
  ownKeys.forEach(function(key) {
2584
- _define_property$3(target, key, source[key]);
2584
+ _define_property$5(target, key, source[key]);
2585
2585
  });
2586
2586
  }
2587
2587
  return target;
2588
2588
  }
2589
- function ownKeys(object, enumerableOnly) {
2589
+ function ownKeys$1(object, enumerableOnly) {
2590
2590
  var keys = Object.keys(object);
2591
2591
  if (Object.getOwnPropertySymbols) {
2592
2592
  var symbols = Object.getOwnPropertySymbols(object);
@@ -2594,12 +2594,12 @@ function ownKeys(object, enumerableOnly) {
2594
2594
  }
2595
2595
  return keys;
2596
2596
  }
2597
- function _object_spread_props(target, source) {
2597
+ function _object_spread_props$1(target, source) {
2598
2598
  source = source != null ? source : {};
2599
2599
  if (Object.getOwnPropertyDescriptors) {
2600
2600
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2601
2601
  } else {
2602
- ownKeys(Object(source)).forEach(function(key) {
2602
+ ownKeys$1(Object(source)).forEach(function(key) {
2603
2603
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2604
2604
  });
2605
2605
  }
@@ -2611,7 +2611,7 @@ function _object_spread_props(target, source) {
2611
2611
  * @param payload - the raw Zoho Sign webhook payload to convert
2612
2612
  * @returns a webhook event with the operation type extracted for convenience
2613
2613
  */ function zohoSignWebhookEvent(payload) {
2614
- return _object_spread_props(_object_spread({}, payload), {
2614
+ return _object_spread_props$1(_object_spread$1({}, payload), {
2615
2615
  operationType: payload.notifications.operation_type
2616
2616
  });
2617
2617
  }
@@ -2623,7 +2623,7 @@ var zohoSignEventHandlerConfigurerFactory = util.handlerConfigurerFactory({
2623
2623
  var fnWithKey = util.handlerMappedSetFunctionFactory(accessor, function(x) {
2624
2624
  return x;
2625
2625
  });
2626
- var configurer = _object_spread_props(_object_spread({}, accessor), {
2626
+ var configurer = _object_spread_props$1(_object_spread$1({}, accessor), {
2627
2627
  handleRequestSubmitted: fnWithKey('RequestSubmitted'),
2628
2628
  handleRequestViewed: fnWithKey('RequestViewed'),
2629
2629
  handleRequestSigningSuccess: fnWithKey('RequestSigningSuccess'),
@@ -2637,12 +2637,12 @@ var zohoSignEventHandlerConfigurerFactory = util.handlerConfigurerFactory({
2637
2637
  }
2638
2638
  });
2639
2639
 
2640
- function _class_call_check$3(instance, Constructor) {
2640
+ function _class_call_check$5(instance, Constructor) {
2641
2641
  if (!(instance instanceof Constructor)) {
2642
2642
  throw new TypeError("Cannot call a class as a function");
2643
2643
  }
2644
2644
  }
2645
- function _defineProperties$2(target, props) {
2645
+ function _defineProperties$4(target, props) {
2646
2646
  for(var i = 0; i < props.length; i++){
2647
2647
  var descriptor = props[i];
2648
2648
  descriptor.enumerable = descriptor.enumerable || false;
@@ -2651,11 +2651,11 @@ function _defineProperties$2(target, props) {
2651
2651
  Object.defineProperty(target, descriptor.key, descriptor);
2652
2652
  }
2653
2653
  }
2654
- function _create_class$2(Constructor, protoProps, staticProps) {
2655
- if (staticProps) _defineProperties$2(Constructor, staticProps);
2654
+ function _create_class$4(Constructor, protoProps, staticProps) {
2655
+ if (staticProps) _defineProperties$4(Constructor, staticProps);
2656
2656
  return Constructor;
2657
2657
  }
2658
- function _define_property$2(obj, key, value) {
2658
+ function _define_property$4(obj, key, value) {
2659
2659
  if (key in obj) {
2660
2660
  Object.defineProperty(obj, key, {
2661
2661
  value: value,
@@ -2673,10 +2673,10 @@ var ZOHO_SIGN_WEBHOOK_SECRET_TOKEN_ENV_VAR = 'ZOHO_SIGN_WEBHOOK_SECRET_TOKEN';
2673
2673
  * Configuration for the Zoho Sign webhook service.
2674
2674
  */ var ZohoSignWebhookServiceConfig = /*#__PURE__*/ function() {
2675
2675
  function ZohoSignWebhookServiceConfig() {
2676
- _class_call_check$3(this, ZohoSignWebhookServiceConfig);
2677
- _define_property$2(this, "zohoSignWebhook", void 0);
2676
+ _class_call_check$5(this, ZohoSignWebhookServiceConfig);
2677
+ _define_property$4(this, "zohoSignWebhook", void 0);
2678
2678
  }
2679
- _create_class$2(ZohoSignWebhookServiceConfig, null, [
2679
+ _create_class$4(ZohoSignWebhookServiceConfig, null, [
2680
2680
  {
2681
2681
  key: "assertValidConfig",
2682
2682
  value: function assertValidConfig(config) {
@@ -2926,12 +2926,12 @@ function _async_to_generator$1(fn) {
2926
2926
  });
2927
2927
  };
2928
2928
  }
2929
- function _class_call_check$2(instance, Constructor) {
2929
+ function _class_call_check$4(instance, Constructor) {
2930
2930
  if (!(instance instanceof Constructor)) {
2931
2931
  throw new TypeError("Cannot call a class as a function");
2932
2932
  }
2933
2933
  }
2934
- function _defineProperties$1(target, props) {
2934
+ function _defineProperties$3(target, props) {
2935
2935
  for(var i = 0; i < props.length; i++){
2936
2936
  var descriptor = props[i];
2937
2937
  descriptor.enumerable = descriptor.enumerable || false;
@@ -2940,11 +2940,11 @@ function _defineProperties$1(target, props) {
2940
2940
  Object.defineProperty(target, descriptor.key, descriptor);
2941
2941
  }
2942
2942
  }
2943
- function _create_class$1(Constructor, protoProps, staticProps) {
2944
- if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
2943
+ function _create_class$3(Constructor, protoProps, staticProps) {
2944
+ if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
2945
2945
  return Constructor;
2946
2946
  }
2947
- function _define_property$1(obj, key, value) {
2947
+ function _define_property$3(obj, key, value) {
2948
2948
  if (key in obj) {
2949
2949
  Object.defineProperty(obj, key, {
2950
2950
  value: value,
@@ -3060,17 +3060,17 @@ function _ts_generator$1(thisArg, body) {
3060
3060
  * Service that handles Zoho Sign webhook events.
3061
3061
  */ exports.ZohoSignWebhookService = /*#__PURE__*/ function() {
3062
3062
  function ZohoSignWebhookService(zohoSignWebhookServiceConfig) {
3063
- _class_call_check$2(this, ZohoSignWebhookService);
3064
- _define_property$1(this, "logger", new common.Logger('ZohoSignWebhookService'));
3065
- _define_property$1(this, "_verifier", void 0);
3066
- _define_property$1(this, "handler", zohoSignEventHandlerFactory());
3067
- _define_property$1(this, "configure", zohoSignEventHandlerConfigurerFactory(this.handler));
3063
+ _class_call_check$4(this, ZohoSignWebhookService);
3064
+ _define_property$3(this, "logger", new common.Logger('ZohoSignWebhookService'));
3065
+ _define_property$3(this, "_verifier", void 0);
3066
+ _define_property$3(this, "handler", zohoSignEventHandlerFactory());
3067
+ _define_property$3(this, "configure", zohoSignEventHandlerConfigurerFactory(this.handler));
3068
3068
  var webhookSecret = zohoSignWebhookServiceConfig.zohoSignWebhook.webhookSecret;
3069
3069
  this._verifier = zohoSignWebhookEventVerifier({
3070
3070
  secret: webhookSecret
3071
3071
  });
3072
3072
  }
3073
- _create_class$1(ZohoSignWebhookService, [
3073
+ _create_class$3(ZohoSignWebhookService, [
3074
3074
  {
3075
3075
  key: "updateForWebhook",
3076
3076
  value: function updateForWebhook(req, rawBody) {
@@ -3173,12 +3173,12 @@ function _async_to_generator(fn) {
3173
3173
  });
3174
3174
  };
3175
3175
  }
3176
- function _class_call_check$1(instance, Constructor) {
3176
+ function _class_call_check$3(instance, Constructor) {
3177
3177
  if (!(instance instanceof Constructor)) {
3178
3178
  throw new TypeError("Cannot call a class as a function");
3179
3179
  }
3180
3180
  }
3181
- function _defineProperties(target, props) {
3181
+ function _defineProperties$2(target, props) {
3182
3182
  for(var i = 0; i < props.length; i++){
3183
3183
  var descriptor = props[i];
3184
3184
  descriptor.enumerable = descriptor.enumerable || false;
@@ -3187,11 +3187,11 @@ function _defineProperties(target, props) {
3187
3187
  Object.defineProperty(target, descriptor.key, descriptor);
3188
3188
  }
3189
3189
  }
3190
- function _create_class(Constructor, protoProps, staticProps) {
3191
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
3190
+ function _create_class$2(Constructor, protoProps, staticProps) {
3191
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
3192
3192
  return Constructor;
3193
3193
  }
3194
- function _define_property(obj, key, value) {
3194
+ function _define_property$2(obj, key, value) {
3195
3195
  if (key in obj) {
3196
3196
  Object.defineProperty(obj, key, {
3197
3197
  value: value,
@@ -3305,11 +3305,11 @@ function _ts_generator(thisArg, body) {
3305
3305
  }
3306
3306
  exports.ZohoSignWebhookController = /*#__PURE__*/ function() {
3307
3307
  function ZohoSignWebhookController(zohoSignWebhookService) {
3308
- _class_call_check$1(this, ZohoSignWebhookController);
3309
- _define_property(this, "_zohoSignWebhookService", void 0);
3308
+ _class_call_check$3(this, ZohoSignWebhookController);
3309
+ _define_property$2(this, "_zohoSignWebhookService", void 0);
3310
3310
  this._zohoSignWebhookService = zohoSignWebhookService;
3311
3311
  }
3312
- _create_class(ZohoSignWebhookController, [
3312
+ _create_class$2(ZohoSignWebhookController, [
3313
3313
  {
3314
3314
  key: "handleZohoSignWebhook",
3315
3315
  value: function handleZohoSignWebhook(req, rawBody) {
@@ -3344,7 +3344,7 @@ exports.ZohoSignWebhookController = __decorate([
3344
3344
  __param(0, common.Inject(exports.ZohoSignWebhookService))
3345
3345
  ], exports.ZohoSignWebhookController);
3346
3346
 
3347
- function _class_call_check(instance, Constructor) {
3347
+ function _class_call_check$2(instance, Constructor) {
3348
3348
  if (!(instance instanceof Constructor)) {
3349
3349
  throw new TypeError("Cannot call a class as a function");
3350
3350
  }
@@ -3366,7 +3366,7 @@ function _class_call_check(instance, Constructor) {
3366
3366
  return config;
3367
3367
  }
3368
3368
  exports.ZohoSignWebhookModule = function ZohoSignWebhookModule() {
3369
- _class_call_check(this, ZohoSignWebhookModule);
3369
+ _class_call_check$2(this, ZohoSignWebhookModule);
3370
3370
  };
3371
3371
  exports.ZohoSignWebhookModule = __decorate([
3372
3372
  common.Module({
@@ -3392,16 +3392,675 @@ exports.ZohoSignWebhookModule = __decorate([
3392
3392
  })
3393
3393
  ], exports.ZohoSignWebhookModule);
3394
3394
 
3395
+ function _class_call_check$1(instance, Constructor) {
3396
+ if (!(instance instanceof Constructor)) {
3397
+ throw new TypeError("Cannot call a class as a function");
3398
+ }
3399
+ }
3400
+ function _defineProperties$1(target, props) {
3401
+ for(var i = 0; i < props.length; i++){
3402
+ var descriptor = props[i];
3403
+ descriptor.enumerable = descriptor.enumerable || false;
3404
+ descriptor.configurable = true;
3405
+ if ("value" in descriptor) descriptor.writable = true;
3406
+ Object.defineProperty(target, descriptor.key, descriptor);
3407
+ }
3408
+ }
3409
+ function _create_class$1(Constructor, protoProps, staticProps) {
3410
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
3411
+ return Constructor;
3412
+ }
3413
+ function _define_property$1(obj, key, value) {
3414
+ if (key in obj) {
3415
+ Object.defineProperty(obj, key, {
3416
+ value: value,
3417
+ enumerable: true,
3418
+ configurable: true,
3419
+ writable: true
3420
+ });
3421
+ } else {
3422
+ obj[key] = value;
3423
+ }
3424
+ return obj;
3425
+ }
3426
+ /**
3427
+ * Abstract configuration class for the NestJS Zoho Desk service.
3428
+ *
3429
+ * Used as a DI token so that applications can provide their own config values
3430
+ * while keeping the expected shape consistent.
3431
+ */ var ZohoDeskServiceConfig = /*#__PURE__*/ function() {
3432
+ function ZohoDeskServiceConfig() {
3433
+ _class_call_check$1(this, ZohoDeskServiceConfig);
3434
+ /**
3435
+ * Zoho Desk API connection settings (endpoint URL, org ID, etc.).
3436
+ */ _define_property$1(this, "zohoDesk", void 0);
3437
+ /**
3438
+ * Optional factory-level overrides applied when creating the underlying Desk client.
3439
+ */ _define_property$1(this, "factoryConfig", void 0);
3440
+ }
3441
+ _create_class$1(ZohoDeskServiceConfig, null, [
3442
+ {
3443
+ key: "assertValidConfig",
3444
+ value: /**
3445
+ * Validates that the required Zoho Desk connection fields are present and well-formed.
3446
+ *
3447
+ * @param config - the Desk service config to validate
3448
+ */ function assertValidConfig(config) {
3449
+ assertValidZohoConfig(config.zohoDesk);
3450
+ if (!config.zohoDesk.orgId) {
3451
+ throw new Error('No Zoho Desk orgId specified.');
3452
+ }
3453
+ }
3454
+ }
3455
+ ]);
3456
+ return ZohoDeskServiceConfig;
3457
+ }
3458
+ ();
3459
+
3460
+ function _class_call_check(instance, Constructor) {
3461
+ if (!(instance instanceof Constructor)) {
3462
+ throw new TypeError("Cannot call a class as a function");
3463
+ }
3464
+ }
3465
+ function _defineProperties(target, props) {
3466
+ for(var i = 0; i < props.length; i++){
3467
+ var descriptor = props[i];
3468
+ descriptor.enumerable = descriptor.enumerable || false;
3469
+ descriptor.configurable = true;
3470
+ if ("value" in descriptor) descriptor.writable = true;
3471
+ Object.defineProperty(target, descriptor.key, descriptor);
3472
+ }
3473
+ }
3474
+ function _create_class(Constructor, protoProps, staticProps) {
3475
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
3476
+ return Constructor;
3477
+ }
3478
+ function _define_property(obj, key, value) {
3479
+ if (key in obj) {
3480
+ Object.defineProperty(obj, key, {
3481
+ value: value,
3482
+ enumerable: true,
3483
+ configurable: true,
3484
+ writable: true
3485
+ });
3486
+ } else {
3487
+ obj[key] = value;
3488
+ }
3489
+ return obj;
3490
+ }
3491
+ function _object_spread(target) {
3492
+ for(var i = 1; i < arguments.length; i++){
3493
+ var source = arguments[i] != null ? arguments[i] : {};
3494
+ var ownKeys = Object.keys(source);
3495
+ if (typeof Object.getOwnPropertySymbols === "function") {
3496
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
3497
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
3498
+ }));
3499
+ }
3500
+ ownKeys.forEach(function(key) {
3501
+ _define_property(target, key, source[key]);
3502
+ });
3503
+ }
3504
+ return target;
3505
+ }
3506
+ function ownKeys(object, enumerableOnly) {
3507
+ var keys = Object.keys(object);
3508
+ if (Object.getOwnPropertySymbols) {
3509
+ var symbols = Object.getOwnPropertySymbols(object);
3510
+ keys.push.apply(keys, symbols);
3511
+ }
3512
+ return keys;
3513
+ }
3514
+ function _object_spread_props(target, source) {
3515
+ source = source != null ? source : {};
3516
+ if (Object.getOwnPropertyDescriptors) {
3517
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3518
+ } else {
3519
+ ownKeys(Object(source)).forEach(function(key) {
3520
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3521
+ });
3522
+ }
3523
+ return target;
3524
+ }
3525
+ /**
3526
+ * NestJS injectable service that wraps the Zoho Desk API.
3527
+ *
3528
+ * Provides convenient accessor getters for all Desk operations (tickets, departments, contacts),
3529
+ * each bound to the authenticated Desk context created during construction.
3530
+ */ exports.ZohoDeskApi = /*#__PURE__*/ function() {
3531
+ function ZohoDeskApi(config, zohoAccountsApi) {
3532
+ _class_call_check(this, ZohoDeskApi);
3533
+ _define_property(this, "config", void 0);
3534
+ _define_property(this, "zohoAccountsApi", void 0);
3535
+ /**
3536
+ * Underlying Zoho Desk client instance, initialized from the injected config and accounts context.
3537
+ */ _define_property(this, "zohoDesk", void 0);
3538
+ this.config = config;
3539
+ this.zohoAccountsApi = zohoAccountsApi;
3540
+ this.zohoDesk = zoho.zohoDeskFactory(_object_spread_props(_object_spread({}, config.factoryConfig), {
3541
+ accountsContext: zohoAccountsApi.accountsContext
3542
+ }))(config.zohoDesk);
3543
+ }
3544
+ _create_class(ZohoDeskApi, [
3545
+ {
3546
+ key: "deskContext",
3547
+ get: /**
3548
+ * The authenticated Desk context used by all operation accessors.
3549
+ *
3550
+ * @returns the Desk context from the underlying client
3551
+ */ function get() {
3552
+ return this.zohoDesk.deskContext;
3553
+ }
3554
+ },
3555
+ {
3556
+ key: "zohoRateLimiter",
3557
+ get: /**
3558
+ * Rate limiter shared across all Desk requests to respect Zoho API quotas.
3559
+ *
3560
+ * @returns the shared rate limiter instance
3561
+ */ function get() {
3562
+ return this.zohoDesk.deskContext.zohoRateLimiter;
3563
+ }
3564
+ },
3565
+ {
3566
+ key: "getTickets",
3567
+ get: // MARK: Ticket Accessors
3568
+ /**
3569
+ * Configured pass-through for {@link zohoDeskGetTickets}.
3570
+ */ function get() {
3571
+ return zoho.zohoDeskGetTickets(this.deskContext);
3572
+ }
3573
+ },
3574
+ {
3575
+ key: "getTicketById",
3576
+ get: /**
3577
+ * Configured pass-through for {@link zohoDeskGetTicketById}.
3578
+ */ function get() {
3579
+ return zoho.zohoDeskGetTicketById(this.deskContext);
3580
+ }
3581
+ },
3582
+ {
3583
+ key: "searchTickets",
3584
+ get: /**
3585
+ * Configured pass-through for {@link zohoDeskSearchTickets}.
3586
+ */ function get() {
3587
+ return zoho.zohoDeskSearchTickets(this.deskContext);
3588
+ }
3589
+ },
3590
+ {
3591
+ key: "getTicketsForContact",
3592
+ get: /**
3593
+ * Configured pass-through for {@link zohoDeskGetTicketsForContact}.
3594
+ */ function get() {
3595
+ return zoho.zohoDeskGetTicketsForContact(this.deskContext);
3596
+ }
3597
+ },
3598
+ {
3599
+ key: "getTicketsForProduct",
3600
+ get: /**
3601
+ * Configured pass-through for {@link zohoDeskGetTicketsForProduct}.
3602
+ */ function get() {
3603
+ return zoho.zohoDeskGetTicketsForProduct(this.deskContext);
3604
+ }
3605
+ },
3606
+ {
3607
+ key: "getTicketMetrics",
3608
+ get: /**
3609
+ * Configured pass-through for {@link zohoDeskGetTicketMetrics}.
3610
+ */ function get() {
3611
+ return zoho.zohoDeskGetTicketMetrics(this.deskContext);
3612
+ }
3613
+ },
3614
+ {
3615
+ key: "getAgentsTicketsCount",
3616
+ get: /**
3617
+ * Configured pass-through for {@link zohoDeskGetAgentsTicketsCount}.
3618
+ */ function get() {
3619
+ return zoho.zohoDeskGetAgentsTicketsCount(this.deskContext);
3620
+ }
3621
+ },
3622
+ {
3623
+ key: "getTicketsPageFactory",
3624
+ get: /**
3625
+ * Configured pass-through for {@link zohoDeskGetTicketsPageFactory}.
3626
+ */ function get() {
3627
+ return zoho.zohoDeskGetTicketsPageFactory(this.deskContext);
3628
+ }
3629
+ },
3630
+ {
3631
+ key: "searchTicketsPageFactory",
3632
+ get: /**
3633
+ * Configured pass-through for {@link zohoDeskSearchTicketsPageFactory}.
3634
+ */ function get() {
3635
+ return zoho.zohoDeskSearchTicketsPageFactory(this.deskContext);
3636
+ }
3637
+ },
3638
+ {
3639
+ key: "getDepartments",
3640
+ get: // MARK: Department Accessors
3641
+ /**
3642
+ * Configured pass-through for {@link zohoDeskGetDepartments}.
3643
+ */ function get() {
3644
+ return zoho.zohoDeskGetDepartments(this.deskContext);
3645
+ }
3646
+ },
3647
+ {
3648
+ key: "getDepartmentById",
3649
+ get: /**
3650
+ * Configured pass-through for {@link zohoDeskGetDepartmentById}.
3651
+ */ function get() {
3652
+ return zoho.zohoDeskGetDepartmentById(this.deskContext);
3653
+ }
3654
+ },
3655
+ {
3656
+ key: "getContacts",
3657
+ get: // MARK: Contact Accessors
3658
+ /**
3659
+ * Configured pass-through for {@link zohoDeskGetContacts}.
3660
+ */ function get() {
3661
+ return zoho.zohoDeskGetContacts(this.deskContext);
3662
+ }
3663
+ },
3664
+ {
3665
+ key: "getContactById",
3666
+ get: /**
3667
+ * Configured pass-through for {@link zohoDeskGetContactById}.
3668
+ */ function get() {
3669
+ return zoho.zohoDeskGetContactById(this.deskContext);
3670
+ }
3671
+ },
3672
+ {
3673
+ key: "getContactsByIds",
3674
+ get: /**
3675
+ * Configured pass-through for {@link zohoDeskGetContactsByIds}.
3676
+ */ function get() {
3677
+ return zoho.zohoDeskGetContactsByIds(this.deskContext);
3678
+ }
3679
+ },
3680
+ {
3681
+ key: "getContactsPageFactory",
3682
+ get: /**
3683
+ * Configured pass-through for {@link zohoDeskGetContactsPageFactory}.
3684
+ */ function get() {
3685
+ return zoho.zohoDeskGetContactsPageFactory(this.deskContext);
3686
+ }
3687
+ },
3688
+ {
3689
+ key: "getTicketTags",
3690
+ get: // MARK: Tag Accessors
3691
+ /**
3692
+ * Configured pass-through for {@link zohoDeskGetTicketTags}.
3693
+ */ function get() {
3694
+ return zoho.zohoDeskGetTicketTags(this.deskContext);
3695
+ }
3696
+ },
3697
+ {
3698
+ key: "associateTicketTags",
3699
+ get: /**
3700
+ * Configured pass-through for {@link zohoDeskAssociateTicketTags}.
3701
+ */ function get() {
3702
+ return zoho.zohoDeskAssociateTicketTags(this.deskContext);
3703
+ }
3704
+ },
3705
+ {
3706
+ key: "dissociateTicketTag",
3707
+ get: /**
3708
+ * Configured pass-through for {@link zohoDeskDissociateTicketTag}.
3709
+ */ function get() {
3710
+ return zoho.zohoDeskDissociateTicketTag(this.deskContext);
3711
+ }
3712
+ },
3713
+ {
3714
+ key: "searchTags",
3715
+ get: /**
3716
+ * Configured pass-through for {@link zohoDeskSearchTags}.
3717
+ */ function get() {
3718
+ return zoho.zohoDeskSearchTags(this.deskContext);
3719
+ }
3720
+ },
3721
+ {
3722
+ key: "getAllTags",
3723
+ get: /**
3724
+ * Configured pass-through for {@link zohoDeskGetAllTags}.
3725
+ */ function get() {
3726
+ return zoho.zohoDeskGetAllTags(this.deskContext);
3727
+ }
3728
+ },
3729
+ {
3730
+ key: "getTicketFollowers",
3731
+ get: // MARK: Follower Accessors
3732
+ /**
3733
+ * Configured pass-through for {@link zohoDeskGetTicketFollowers}.
3734
+ */ function get() {
3735
+ return zoho.zohoDeskGetTicketFollowers(this.deskContext);
3736
+ }
3737
+ },
3738
+ {
3739
+ key: "addTicketFollowers",
3740
+ get: /**
3741
+ * Configured pass-through for {@link zohoDeskAddTicketFollowers}.
3742
+ */ function get() {
3743
+ return zoho.zohoDeskAddTicketFollowers(this.deskContext);
3744
+ }
3745
+ },
3746
+ {
3747
+ key: "removeTicketFollowers",
3748
+ get: /**
3749
+ * Configured pass-through for {@link zohoDeskRemoveTicketFollowers}.
3750
+ */ function get() {
3751
+ return zoho.zohoDeskRemoveTicketFollowers(this.deskContext);
3752
+ }
3753
+ },
3754
+ {
3755
+ key: "getTicketAttachments",
3756
+ get: // MARK: Attachment Accessors
3757
+ /**
3758
+ * Configured pass-through for {@link zohoDeskGetTicketAttachments}.
3759
+ */ function get() {
3760
+ return zoho.zohoDeskGetTicketAttachments(this.deskContext);
3761
+ }
3762
+ },
3763
+ {
3764
+ key: "deleteTicketAttachment",
3765
+ get: /**
3766
+ * Configured pass-through for {@link zohoDeskDeleteTicketAttachment}.
3767
+ */ function get() {
3768
+ return zoho.zohoDeskDeleteTicketAttachment(this.deskContext);
3769
+ }
3770
+ },
3771
+ {
3772
+ key: "getTicketComments",
3773
+ get: // MARK: Comment Accessors
3774
+ /**
3775
+ * Configured pass-through for {@link zohoDeskGetTicketComments}.
3776
+ */ function get() {
3777
+ return zoho.zohoDeskGetTicketComments(this.deskContext);
3778
+ }
3779
+ },
3780
+ {
3781
+ key: "getTicketCommentById",
3782
+ get: /**
3783
+ * Configured pass-through for {@link zohoDeskGetTicketCommentById}.
3784
+ */ function get() {
3785
+ return zoho.zohoDeskGetTicketCommentById(this.deskContext);
3786
+ }
3787
+ },
3788
+ {
3789
+ key: "createTicketComment",
3790
+ get: /**
3791
+ * Configured pass-through for {@link zohoDeskCreateTicketComment}.
3792
+ */ function get() {
3793
+ return zoho.zohoDeskCreateTicketComment(this.deskContext);
3794
+ }
3795
+ },
3796
+ {
3797
+ key: "deleteTicketComment",
3798
+ get: /**
3799
+ * Configured pass-through for {@link zohoDeskDeleteTicketComment}.
3800
+ */ function get() {
3801
+ return zoho.zohoDeskDeleteTicketComment(this.deskContext);
3802
+ }
3803
+ },
3804
+ {
3805
+ key: "getTicketTimer",
3806
+ get: // MARK: Time Tracking Accessors
3807
+ /**
3808
+ * Configured pass-through for {@link zohoDeskGetTicketTimer}.
3809
+ */ function get() {
3810
+ return zoho.zohoDeskGetTicketTimer(this.deskContext);
3811
+ }
3812
+ },
3813
+ {
3814
+ key: "performTicketTimerAction",
3815
+ get: /**
3816
+ * Configured pass-through for {@link zohoDeskPerformTicketTimerAction}.
3817
+ */ function get() {
3818
+ return zoho.zohoDeskPerformTicketTimerAction(this.deskContext);
3819
+ }
3820
+ },
3821
+ {
3822
+ key: "getTicketTimeEntries",
3823
+ get: /**
3824
+ * Configured pass-through for {@link zohoDeskGetTicketTimeEntries}.
3825
+ */ function get() {
3826
+ return zoho.zohoDeskGetTicketTimeEntries(this.deskContext);
3827
+ }
3828
+ },
3829
+ {
3830
+ key: "getTicketTimeEntryById",
3831
+ get: /**
3832
+ * Configured pass-through for {@link zohoDeskGetTicketTimeEntryById}.
3833
+ */ function get() {
3834
+ return zoho.zohoDeskGetTicketTimeEntryById(this.deskContext);
3835
+ }
3836
+ },
3837
+ {
3838
+ key: "getTicketTimeEntrySummation",
3839
+ get: /**
3840
+ * Configured pass-through for {@link zohoDeskGetTicketTimeEntrySummation}.
3841
+ */ function get() {
3842
+ return zoho.zohoDeskGetTicketTimeEntrySummation(this.deskContext);
3843
+ }
3844
+ },
3845
+ {
3846
+ key: "getTicketThreads",
3847
+ get: // MARK: Thread Accessors
3848
+ /**
3849
+ * Configured pass-through for {@link zohoDeskGetTicketThreads}.
3850
+ */ function get() {
3851
+ return zoho.zohoDeskGetTicketThreads(this.deskContext);
3852
+ }
3853
+ },
3854
+ {
3855
+ key: "getTicketThreadById",
3856
+ get: /**
3857
+ * Configured pass-through for {@link zohoDeskGetTicketThreadById}.
3858
+ */ function get() {
3859
+ return zoho.zohoDeskGetTicketThreadById(this.deskContext);
3860
+ }
3861
+ },
3862
+ {
3863
+ key: "getTicketThreadsPageFactory",
3864
+ get: /**
3865
+ * Configured pass-through for {@link zohoDeskGetTicketThreadsPageFactory}.
3866
+ */ function get() {
3867
+ return zoho.zohoDeskGetTicketThreadsPageFactory(this.deskContext);
3868
+ }
3869
+ },
3870
+ {
3871
+ key: "getTicketActivities",
3872
+ get: // MARK: Activity Accessors
3873
+ /**
3874
+ * Configured pass-through for {@link zohoDeskGetTicketActivities}.
3875
+ */ function get() {
3876
+ return zoho.zohoDeskGetTicketActivities(this.deskContext);
3877
+ }
3878
+ },
3879
+ {
3880
+ key: "getTicketActivitiesPageFactory",
3881
+ get: /**
3882
+ * Configured pass-through for {@link zohoDeskGetTicketActivitiesPageFactory}.
3883
+ */ function get() {
3884
+ return zoho.zohoDeskGetTicketActivitiesPageFactory(this.deskContext);
3885
+ }
3886
+ },
3887
+ {
3888
+ key: "getAgents",
3889
+ get: // MARK: Agent Accessors
3890
+ /**
3891
+ * Configured pass-through for {@link zohoDeskGetAgents}.
3892
+ */ function get() {
3893
+ return zoho.zohoDeskGetAgents(this.deskContext);
3894
+ }
3895
+ },
3896
+ {
3897
+ key: "getAgentById",
3898
+ get: /**
3899
+ * Configured pass-through for {@link zohoDeskGetAgentById}.
3900
+ */ function get() {
3901
+ return zoho.zohoDeskGetAgentById(this.deskContext);
3902
+ }
3903
+ },
3904
+ {
3905
+ key: "getAgentsByIds",
3906
+ get: /**
3907
+ * Configured pass-through for {@link zohoDeskGetAgentsByIds}.
3908
+ */ function get() {
3909
+ return zoho.zohoDeskGetAgentsByIds(this.deskContext);
3910
+ }
3911
+ },
3912
+ {
3913
+ key: "getMyInfo",
3914
+ get: /**
3915
+ * Configured pass-through for {@link zohoDeskGetMyInfo}.
3916
+ */ function get() {
3917
+ return zoho.zohoDeskGetMyInfo(this.deskContext);
3918
+ }
3919
+ },
3920
+ {
3921
+ key: "getAgentsPageFactory",
3922
+ get: /**
3923
+ * Configured pass-through for {@link zohoDeskGetAgentsPageFactory}.
3924
+ */ function get() {
3925
+ return zoho.zohoDeskGetAgentsPageFactory(this.deskContext);
3926
+ }
3927
+ }
3928
+ ]);
3929
+ return ZohoDeskApi;
3930
+ }();
3931
+ exports.ZohoDeskApi = __decorate([
3932
+ common.Injectable(),
3933
+ __param(0, common.Inject(ZohoDeskServiceConfig)),
3934
+ __param(1, common.Inject(exports.ZohoAccountsApi))
3935
+ ], exports.ZohoDeskApi);
3936
+
3937
+ function _array_like_to_array(arr, len) {
3938
+ if (len == null || len > arr.length) len = arr.length;
3939
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3940
+ return arr2;
3941
+ }
3942
+ function _array_without_holes(arr) {
3943
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
3944
+ }
3945
+ function _iterable_to_array(iter) {
3946
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3947
+ }
3948
+ function _non_iterable_spread() {
3949
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3950
+ }
3951
+ function _to_consumable_array(arr) {
3952
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
3953
+ }
3954
+ function _unsupported_iterable_to_array(o, minLen) {
3955
+ if (!o) return;
3956
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
3957
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3958
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3959
+ if (n === "Map" || n === "Set") return Array.from(n);
3960
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
3961
+ }
3962
+ /**
3963
+ * Config key suffix for the Zoho Desk organization ID.
3964
+ * Resolves to `ZOHO_DESK_ORG_ID` or `ZOHO_ORG_ID`.
3965
+ */ var ZOHO_ORG_ID_CONFIG_KEY = 'ORG_ID';
3966
+ // MARK: Provider Factories
3967
+ /**
3968
+ * Reads Zoho Desk connection settings from the NestJS ConfigService
3969
+ * and returns a validated service config.
3970
+ *
3971
+ * Resolves the API URL via environment variables following the naming convention
3972
+ * `ZOHO_DESK_API_URL` (service-specific) or `ZOHO_API_URL` (shared fallback).
3973
+ * The organization ID is read from `ZOHO_DESK_ORG_ID` or `ZOHO_ORG_ID`.
3974
+ *
3975
+ * @param configService - NestJS config service populated with Zoho environment variables
3976
+ * @returns Validated Zoho Desk service configuration
3977
+ * @throws {Error} If required config values (API URL or orgId) are missing
3978
+ */ function zohoDeskServiceConfigFactory(configService) {
3979
+ var getFromConfigService = zohoConfigServiceReaderFunction(zoho.ZOHO_DESK_SERVICE_NAME, configService);
3980
+ var config = {
3981
+ zohoDesk: {
3982
+ apiUrl: getFromConfigService(ZOHO_API_URL_CONFIG_KEY),
3983
+ orgId: getFromConfigService(ZOHO_ORG_ID_CONFIG_KEY)
3984
+ }
3985
+ };
3986
+ ZohoDeskServiceConfig.assertValidConfig(config);
3987
+ return config;
3988
+ }
3989
+ /**
3990
+ * Reads Zoho Accounts (OAuth) settings scoped to the Desk service from
3991
+ * the NestJS ConfigService and returns an accounts service config.
3992
+ *
3993
+ * @param configService - NestJS config service populated with Zoho OAuth environment variables
3994
+ * @returns Zoho Accounts service config scoped to the Desk service access token
3995
+ */ function zohoDeskAccountServiceConfigFactory(configService) {
3996
+ return zohoAccountsServiceConfigFromConfigService({
3997
+ configService: configService,
3998
+ serviceAccessTokenKey: zoho.ZOHO_DESK_SERVICE_NAME
3999
+ });
4000
+ }
4001
+ /**
4002
+ * Generates NestJS {@link ModuleMetadata} that wires up the full Zoho Desk stack
4003
+ * (config, accounts, and API service) so consuming modules only need a single import.
4004
+ *
4005
+ * The generated module requires the following dependencies in order to initialize properly:
4006
+ * - {@link ZohoAccountsAccessTokenCacheService}
4007
+ *
4008
+ * Use the `dependencyModule` config option to import a module that exports those dependencies.
4009
+ *
4010
+ * The returned metadata registers {@link ZohoDeskServiceConfig}, {@link ZohoDeskApi},
4011
+ * {@link ZohoAccountsServiceConfig}, and {@link ZohoAccountsApi} as providers, and
4012
+ * exports {@link ZohoDeskApi} by default. Additional imports, exports, and providers
4013
+ * from the config are merged in.
4014
+ *
4015
+ * @param config - Module configuration with optional dependency module and extra metadata
4016
+ * @returns Complete NestJS module metadata ready to pass to `@Module()`
4017
+ */ function appZohoDeskModuleMetadata(config$1) {
4018
+ var dependencyModule = config$1.dependencyModule, imports = config$1.imports, exports$1 = config$1.exports, providers = config$1.providers;
4019
+ var dependencyModuleImport = dependencyModule ? [
4020
+ dependencyModule
4021
+ ] : [];
4022
+ return {
4023
+ imports: [
4024
+ config.ConfigModule
4025
+ ].concat(_to_consumable_array(dependencyModuleImport), _to_consumable_array(imports !== null && imports !== void 0 ? imports : [])),
4026
+ exports: [
4027
+ exports.ZohoDeskApi
4028
+ ].concat(_to_consumable_array(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
4029
+ providers: [
4030
+ {
4031
+ provide: ZohoDeskServiceConfig,
4032
+ inject: [
4033
+ config.ConfigService
4034
+ ],
4035
+ useFactory: zohoDeskServiceConfigFactory
4036
+ },
4037
+ exports.ZohoDeskApi,
4038
+ // Accounts
4039
+ {
4040
+ provide: ZohoAccountsServiceConfig,
4041
+ inject: [
4042
+ config.ConfigService
4043
+ ],
4044
+ useFactory: zohoDeskAccountServiceConfigFactory
4045
+ },
4046
+ exports.ZohoAccountsApi
4047
+ ].concat(_to_consumable_array(providers !== null && providers !== void 0 ? providers : []))
4048
+ };
4049
+ }
4050
+
3395
4051
  exports.DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH;
3396
4052
  exports.ZOHO_API_URL_CONFIG_KEY = ZOHO_API_URL_CONFIG_KEY;
4053
+ exports.ZOHO_ORG_ID_CONFIG_KEY = ZOHO_ORG_ID_CONFIG_KEY;
3397
4054
  exports.ZOHO_SIGN_WEBHOOK_SECRET_TOKEN_ENV_VAR = ZOHO_SIGN_WEBHOOK_SECRET_TOKEN_ENV_VAR;
3398
4055
  exports.ZOHO_SIGN_WEBHOOK_SIGNATURE_HEADER = ZOHO_SIGN_WEBHOOK_SIGNATURE_HEADER;
3399
4056
  exports.ZohoAccountsServiceConfig = ZohoAccountsServiceConfig;
3400
4057
  exports.ZohoCrmServiceConfig = ZohoCrmServiceConfig;
4058
+ exports.ZohoDeskServiceConfig = ZohoDeskServiceConfig;
3401
4059
  exports.ZohoRecruitServiceConfig = ZohoRecruitServiceConfig;
3402
4060
  exports.ZohoSignServiceConfig = ZohoSignServiceConfig;
3403
4061
  exports.ZohoSignWebhookServiceConfig = ZohoSignWebhookServiceConfig;
3404
4062
  exports.appZohoCrmModuleMetadata = appZohoCrmModuleMetadata;
4063
+ exports.appZohoDeskModuleMetadata = appZohoDeskModuleMetadata;
3405
4064
  exports.appZohoRecruitModuleMetadata = appZohoRecruitModuleMetadata;
3406
4065
  exports.appZohoSignModuleMetadata = appZohoSignModuleMetadata;
3407
4066
  exports.assertValidZohoConfig = assertValidZohoConfig;
@@ -3414,6 +4073,8 @@ exports.zohoAccountsServiceConfigFromConfigService = zohoAccountsServiceConfigFr
3414
4073
  exports.zohoConfigServiceReaderFunction = zohoConfigServiceReaderFunction;
3415
4074
  exports.zohoCrmAccountServiceConfigFactory = zohoCrmAccountServiceConfigFactory;
3416
4075
  exports.zohoCrmServiceConfigFactory = zohoCrmServiceConfigFactory;
4076
+ exports.zohoDeskAccountServiceConfigFactory = zohoDeskAccountServiceConfigFactory;
4077
+ exports.zohoDeskServiceConfigFactory = zohoDeskServiceConfigFactory;
3417
4078
  exports.zohoRecruitAccountServiceConfigFactory = zohoRecruitAccountServiceConfigFactory;
3418
4079
  exports.zohoRecruitServiceConfigFactory = zohoRecruitServiceConfigFactory;
3419
4080
  exports.zohoSignAccountServiceConfigFactory = zohoSignAccountServiceConfigFactory;