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