@dereekb/zoho 13.2.2 → 13.3.1

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.
@@ -7,58 +7,45 @@ var path = require('path');
7
7
  var fs = require('fs');
8
8
  var config = require('@nestjs/config');
9
9
 
10
- /******************************************************************************
11
- Copyright (c) Microsoft Corporation.
12
-
13
- Permission to use, copy, modify, and/or distribute this software for any
14
- purpose with or without fee is hereby granted.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
17
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
19
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
20
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
21
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
- PERFORMANCE OF THIS SOFTWARE.
23
- ***************************************************************************** */
24
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
25
-
26
-
27
- function __decorate(decorators, target, key, desc) {
28
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
29
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
30
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
31
- return c > 3 && r && Object.defineProperty(target, key, r), r;
32
- }
33
-
34
- function __param(paramIndex, decorator) {
35
- return function (target, key) { decorator(target, key, paramIndex); }
36
- }
37
-
38
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
39
- var e = new Error(message);
40
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
10
+ function _type_of(obj) {
11
+ "@swc/helpers - typeof";
12
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
13
+ }
14
+ function __decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ function __param(paramIndex, decorator) {
21
+ return function(target, key) {
22
+ decorator(target, key, paramIndex);
23
+ };
24
+ }
25
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
26
+ var e = new Error(message);
27
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
41
28
  };
42
29
 
43
- const ZOHO_API_URL_CONFIG_KEY = 'API_URL';
30
+ var ZOHO_API_URL_CONFIG_KEY = 'API_URL';
44
31
  function zohoConfigServiceReaderFunction(inputOrKey, inputConfigService) {
45
- let configService;
46
- let serviceAccessTokenKey;
32
+ var configService;
33
+ var serviceAccessTokenKey;
47
34
  if (typeof inputOrKey === 'string') {
48
35
  serviceAccessTokenKey = inputOrKey;
49
36
  configService = inputConfigService;
50
- }
51
- else {
37
+ } else {
52
38
  configService = inputOrKey.configService;
53
39
  serviceAccessTokenKey = inputOrKey.serviceAccessTokenKey;
54
40
  }
55
- const baseServicePrefix = 'ZOHO_';
56
- const servicePrefix = serviceAccessTokenKey.toUpperCase(); // "RECRUIT"
57
- const servicePrefixString = `${baseServicePrefix}${servicePrefix}_`; // "ZOHO_RECRUIT_"
58
- return (key) => {
59
- const baseConfigKey = `${baseServicePrefix}${key}`; // "ZOHO_ACCOUNTS_URL"
60
- const serviceSpecificConfigKey = `${servicePrefixString}${key}`; // "ZOHO_RECRUIT_ACCOUNTS_URL"
61
- return configService.get(serviceSpecificConfigKey) ?? configService.get(baseConfigKey);
41
+ var baseServicePrefix = 'ZOHO_';
42
+ var servicePrefix = serviceAccessTokenKey.toUpperCase(); // "RECRUIT"
43
+ var servicePrefixString = "".concat(baseServicePrefix).concat(servicePrefix, "_"); // "ZOHO_RECRUIT_"
44
+ return function(key) {
45
+ var _configService_get;
46
+ var baseConfigKey = "".concat(baseServicePrefix).concat(key); // "ZOHO_ACCOUNTS_URL"
47
+ var serviceSpecificConfigKey = "".concat(servicePrefixString).concat(key); // "ZOHO_RECRUIT_ACCOUNTS_URL"
48
+ return (_configService_get = configService.get(serviceSpecificConfigKey)) !== null && _configService_get !== void 0 ? _configService_get : configService.get(baseConfigKey);
62
49
  };
63
50
  }
64
51
  /**
@@ -66,53 +53,89 @@ function zohoConfigServiceReaderFunction(inputOrKey, inputConfigService) {
66
53
  *
67
54
  * @param configService
68
55
  * @param prefix
69
- */
70
- function readZohoConfigFromConfigService(configService, servicePrefix, assertValid = true) {
71
- const servicePrefixString = servicePrefix ? `${servicePrefix}_` : '';
72
- const apiUrlConfigKey = `${servicePrefixString}${ZOHO_API_URL_CONFIG_KEY}`;
73
- const config = {
74
- apiUrl: configService.get(apiUrlConfigKey) ?? configService.get(ZOHO_API_URL_CONFIG_KEY)
56
+ */ function readZohoConfigFromConfigService(configService, servicePrefix) {
57
+ var assertValid = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
58
+ var _configService_get;
59
+ var servicePrefixString = servicePrefix ? "".concat(servicePrefix, "_") : '';
60
+ var apiUrlConfigKey = "".concat(servicePrefixString).concat(ZOHO_API_URL_CONFIG_KEY);
61
+ var config = {
62
+ apiUrl: (_configService_get = configService.get(apiUrlConfigKey)) !== null && _configService_get !== void 0 ? _configService_get : configService.get(ZOHO_API_URL_CONFIG_KEY)
75
63
  };
76
64
  if (assertValid) {
77
65
  if (!config.apiUrl) {
78
- throw new Error(`No Zoho API url or type specified for key "${apiUrlConfigKey}".`);
66
+ throw new Error('No Zoho API url or type specified for key "'.concat(apiUrlConfigKey, '".'));
79
67
  }
80
68
  }
81
69
  return config;
82
70
  }
83
71
  function assertValidZohoConfig(config) {
84
72
  if (!config.apiUrl) {
85
- throw new Error(`No Zoho API url or type specified.`);
73
+ throw new Error("No Zoho API url or type specified.");
86
74
  }
87
75
  }
88
76
 
77
+ function _class_call_check$8(instance, Constructor) {
78
+ if (!(instance instanceof Constructor)) {
79
+ throw new TypeError("Cannot call a class as a function");
80
+ }
81
+ }
82
+ function _defineProperties$7(target, props) {
83
+ for(var i = 0; i < props.length; i++){
84
+ var descriptor = props[i];
85
+ descriptor.enumerable = descriptor.enumerable || false;
86
+ descriptor.configurable = true;
87
+ if ("value" in descriptor) descriptor.writable = true;
88
+ Object.defineProperty(target, descriptor.key, descriptor);
89
+ }
90
+ }
91
+ function _create_class$7(Constructor, protoProps, staticProps) {
92
+ if (staticProps) _defineProperties$7(Constructor, staticProps);
93
+ return Constructor;
94
+ }
95
+ function _define_property$8(obj, key, value) {
96
+ if (key in obj) {
97
+ Object.defineProperty(obj, key, {
98
+ value: value,
99
+ enumerable: true,
100
+ configurable: true,
101
+ writable: true
102
+ });
103
+ } else {
104
+ obj[key] = value;
105
+ }
106
+ return obj;
107
+ }
89
108
  /**
90
109
  * Configuration for ZohoService
91
- */
92
- class ZohoAccountsServiceConfig {
93
- zohoAccounts;
94
- factoryConfig;
95
- static assertValidConfig(config) {
96
- const { zohoAccounts } = config;
97
- if (!zohoAccounts) {
98
- throw new Error('ZohoAccountsServiceConfig.zohoAccounts is required');
99
- }
100
- else {
101
- if (!zohoAccounts.serviceAccessTokenKey) {
102
- throw new Error('ZohoAccountsServiceConfig.zohoAccounts.serviceAccessTokenKey is required');
103
- }
104
- else if (!zohoAccounts.refreshToken) {
105
- throw new Error('ZohoAccountsServiceConfig.zohoAccounts.refreshToken is required');
106
- }
107
- else if (!zohoAccounts.apiUrl) {
108
- throw new Error('ZohoAccountsServiceConfig.zohoAccounts.apiUrl is required');
109
- }
110
- else if (!zohoAccounts.clientId) {
111
- throw new Error('ZohoAccountsServiceConfig.zohoAccounts.clientId is required');
110
+ */ var ZohoAccountsServiceConfig = /*#__PURE__*/ function() {
111
+ function ZohoAccountsServiceConfig() {
112
+ _class_call_check$8(this, ZohoAccountsServiceConfig);
113
+ _define_property$8(this, "zohoAccounts", void 0);
114
+ _define_property$8(this, "factoryConfig", void 0);
115
+ }
116
+ _create_class$7(ZohoAccountsServiceConfig, null, [
117
+ {
118
+ key: "assertValidConfig",
119
+ value: function assertValidConfig(config) {
120
+ var zohoAccounts = config.zohoAccounts;
121
+ if (!zohoAccounts) {
122
+ throw new Error('ZohoAccountsServiceConfig.zohoAccounts is required');
123
+ } else {
124
+ if (!zohoAccounts.serviceAccessTokenKey) {
125
+ throw new Error('ZohoAccountsServiceConfig.zohoAccounts.serviceAccessTokenKey is required');
126
+ } else if (!zohoAccounts.refreshToken) {
127
+ throw new Error('ZohoAccountsServiceConfig.zohoAccounts.refreshToken is required');
128
+ } else if (!zohoAccounts.apiUrl) {
129
+ throw new Error('ZohoAccountsServiceConfig.zohoAccounts.apiUrl is required');
130
+ } else if (!zohoAccounts.clientId) {
131
+ throw new Error('ZohoAccountsServiceConfig.zohoAccounts.clientId is required');
132
+ }
133
+ }
112
134
  }
113
135
  }
114
- }
115
- }
136
+ ]);
137
+ return ZohoAccountsServiceConfig;
138
+ }();
116
139
  /**
117
140
  * Builds a {@link ZohoAccountsServiceConfig} by reading Zoho Accounts OAuth credentials
118
141
  * from a NestJS `ConfigService` (typically backed by environment variables).
@@ -137,36 +160,255 @@ class ZohoAccountsServiceConfig {
137
160
  * `ConfigService` and the `serviceAccessTokenKey` for the target Zoho service.
138
161
  * @returns A validated {@link ZohoAccountsServiceConfig} ready for use with `ZohoAccountsApi`.
139
162
  * @throws If any required credential (apiUrl, refreshToken, clientId) is missing.
140
- */
141
- function zohoAccountsServiceConfigFromConfigService(input) {
142
- const { serviceAccessTokenKey } = input;
143
- const getFromConfigService = zohoConfigServiceReaderFunction(input);
144
- const zohoAccounts = {
145
- serviceAccessTokenKey,
146
- apiUrl: getFromConfigService('ACCOUNTS_URL'), // ZOHO_<SERVICE>_ACCOUNTS_URL, ZOHO_ACCOUNTS_URL
147
- refreshToken: getFromConfigService('ACCOUNTS_REFRESH_TOKEN'), // ZOHO_<SERVICE>_ACCOUNTS_REFRESH_TOKEN, ZOHO_ACCOUNTS_REFRESH_TOKEN
148
- clientId: getFromConfigService('ACCOUNTS_CLIENT_ID'), // ZOHO_<SERVICE>_ACCOUNTS_CLIENT_ID, ZOHO_ACCOUNTS_CLIENT_ID
163
+ */ function zohoAccountsServiceConfigFromConfigService(input) {
164
+ var serviceAccessTokenKey = input.serviceAccessTokenKey;
165
+ var getFromConfigService = zohoConfigServiceReaderFunction(input);
166
+ var zohoAccounts = {
167
+ serviceAccessTokenKey: serviceAccessTokenKey,
168
+ apiUrl: getFromConfigService('ACCOUNTS_URL'),
169
+ refreshToken: getFromConfigService('ACCOUNTS_REFRESH_TOKEN'),
170
+ clientId: getFromConfigService('ACCOUNTS_CLIENT_ID'),
149
171
  clientSecret: getFromConfigService('ACCOUNTS_CLIENT_SECRET') // ZOHO_<SERVICE>_ACCOUNTS_CLIENT_SECRET, ZOHO_ACCOUNTS_CLIENT_SECRET
150
172
  };
151
- const config = {
152
- zohoAccounts
173
+ var config = {
174
+ zohoAccounts: zohoAccounts
153
175
  };
154
176
  ZohoAccountsServiceConfig.assertValidConfig(config);
155
177
  return config;
156
178
  }
157
179
 
180
+ function _array_like_to_array$3(arr, len) {
181
+ if (len == null || len > arr.length) len = arr.length;
182
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
183
+ return arr2;
184
+ }
185
+ function _array_with_holes(arr) {
186
+ if (Array.isArray(arr)) return arr;
187
+ }
188
+ function _array_without_holes$3(arr) {
189
+ if (Array.isArray(arr)) return _array_like_to_array$3(arr);
190
+ }
191
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
192
+ try {
193
+ var info = gen[key](arg);
194
+ var value = info.value;
195
+ } catch (error) {
196
+ reject(error);
197
+ return;
198
+ }
199
+ if (info.done) {
200
+ resolve(value);
201
+ } else {
202
+ Promise.resolve(value).then(_next, _throw);
203
+ }
204
+ }
205
+ function _async_to_generator(fn) {
206
+ return function() {
207
+ var self = this, args = arguments;
208
+ return new Promise(function(resolve, reject) {
209
+ var gen = fn.apply(self, args);
210
+ function _next(value) {
211
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
212
+ }
213
+ function _throw(err) {
214
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
215
+ }
216
+ _next(undefined);
217
+ });
218
+ };
219
+ }
220
+ function _class_call_check$7(instance, Constructor) {
221
+ if (!(instance instanceof Constructor)) {
222
+ throw new TypeError("Cannot call a class as a function");
223
+ }
224
+ }
225
+ function _define_property$7(obj, key, value) {
226
+ if (key in obj) {
227
+ Object.defineProperty(obj, key, {
228
+ value: value,
229
+ enumerable: true,
230
+ configurable: true,
231
+ writable: true
232
+ });
233
+ } else {
234
+ obj[key] = value;
235
+ }
236
+ return obj;
237
+ }
238
+ function _iterable_to_array$3(iter) {
239
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
240
+ }
241
+ function _iterable_to_array_limit(arr, i) {
242
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
243
+ if (_i == null) return;
244
+ var _arr = [];
245
+ var _n = true;
246
+ var _d = false;
247
+ var _s, _e;
248
+ try {
249
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
250
+ _arr.push(_s.value);
251
+ if (i && _arr.length === i) break;
252
+ }
253
+ } catch (err) {
254
+ _d = true;
255
+ _e = err;
256
+ } finally{
257
+ try {
258
+ if (!_n && _i["return"] != null) _i["return"]();
259
+ } finally{
260
+ if (_d) throw _e;
261
+ }
262
+ }
263
+ return _arr;
264
+ }
265
+ function _non_iterable_rest() {
266
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
267
+ }
268
+ function _non_iterable_spread$3() {
269
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
270
+ }
271
+ function _object_spread$4(target) {
272
+ for(var i = 1; i < arguments.length; i++){
273
+ var source = arguments[i] != null ? arguments[i] : {};
274
+ var ownKeys = Object.keys(source);
275
+ if (typeof Object.getOwnPropertySymbols === "function") {
276
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
277
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
278
+ }));
279
+ }
280
+ ownKeys.forEach(function(key) {
281
+ _define_property$7(target, key, source[key]);
282
+ });
283
+ }
284
+ return target;
285
+ }
286
+ function _sliced_to_array(arr, i) {
287
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest();
288
+ }
289
+ function _to_consumable_array$3(arr) {
290
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$3();
291
+ }
292
+ function _unsupported_iterable_to_array$3(o, minLen) {
293
+ if (!o) return;
294
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
295
+ var n = Object.prototype.toString.call(o).slice(8, -1);
296
+ if (n === "Object" && o.constructor) n = o.constructor.name;
297
+ if (n === "Map" || n === "Set") return Array.from(n);
298
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
299
+ }
300
+ function _ts_generator(thisArg, body) {
301
+ var f, y, t, _ = {
302
+ label: 0,
303
+ sent: function() {
304
+ if (t[0] & 1) throw t[1];
305
+ return t[1];
306
+ },
307
+ trys: [],
308
+ ops: []
309
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
310
+ return d(g, "next", {
311
+ value: verb(0)
312
+ }), d(g, "throw", {
313
+ value: verb(1)
314
+ }), d(g, "return", {
315
+ value: verb(2)
316
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
317
+ value: function() {
318
+ return this;
319
+ }
320
+ }), g;
321
+ function verb(n) {
322
+ return function(v) {
323
+ return step([
324
+ n,
325
+ v
326
+ ]);
327
+ };
328
+ }
329
+ function step(op) {
330
+ if (f) throw new TypeError("Generator is already executing.");
331
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
332
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
333
+ if (y = 0, t) op = [
334
+ op[0] & 2,
335
+ t.value
336
+ ];
337
+ switch(op[0]){
338
+ case 0:
339
+ case 1:
340
+ t = op;
341
+ break;
342
+ case 4:
343
+ _.label++;
344
+ return {
345
+ value: op[1],
346
+ done: false
347
+ };
348
+ case 5:
349
+ _.label++;
350
+ y = op[1];
351
+ op = [
352
+ 0
353
+ ];
354
+ continue;
355
+ case 7:
356
+ op = _.ops.pop();
357
+ _.trys.pop();
358
+ continue;
359
+ default:
360
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
361
+ _ = 0;
362
+ continue;
363
+ }
364
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
365
+ _.label = op[1];
366
+ break;
367
+ }
368
+ if (op[0] === 6 && _.label < t[1]) {
369
+ _.label = t[1];
370
+ t = op;
371
+ break;
372
+ }
373
+ if (t && _.label < t[2]) {
374
+ _.label = t[2];
375
+ _.ops.push(op);
376
+ break;
377
+ }
378
+ if (t[2]) _.ops.pop();
379
+ _.trys.pop();
380
+ continue;
381
+ }
382
+ op = body.call(thisArg, _);
383
+ } catch (e) {
384
+ op = [
385
+ 6,
386
+ e
387
+ ];
388
+ y = 0;
389
+ } finally{
390
+ f = t = 0;
391
+ }
392
+ if (op[0] & 5) throw op[1];
393
+ return {
394
+ value: op[0] ? op[1] : void 0,
395
+ done: true
396
+ };
397
+ }
398
+ }
158
399
  /**
159
400
  * Service used for retrieving ZohoAccessTokenCache for Zoho services.
160
- */
161
- exports.ZohoAccountsAccessTokenCacheService = class ZohoAccountsAccessTokenCacheService {
401
+ */ exports.ZohoAccountsAccessTokenCacheService = function ZohoAccountsAccessTokenCacheService() {
402
+ _class_call_check$7(this, ZohoAccountsAccessTokenCacheService);
162
403
  };
163
404
  exports.ZohoAccountsAccessTokenCacheService = __decorate([
164
405
  common.Injectable()
165
406
  ], exports.ZohoAccountsAccessTokenCacheService);
166
407
  function logMergeZohoAccountsAccessTokenCacheServiceErrorFunction(failedUpdates) {
167
- console.warn(`mergeZohoAccountsAccessTokenCacheServices(): failed updating ${failedUpdates.length} caches.`);
168
- failedUpdates.forEach(([x, e], i) => {
169
- console.warn(`Cache update failure ${i + 1}: - ${e}`);
408
+ console.warn("mergeZohoAccountsAccessTokenCacheServices(): failed updating ".concat(failedUpdates.length, " caches."));
409
+ failedUpdates.forEach(function(param, i) {
410
+ var _param = _sliced_to_array(param, 2); _param[0]; var e = _param[1];
411
+ console.warn("Cache update failure ".concat(i + 1, ": - ").concat(e));
170
412
  });
171
413
  }
172
414
  /**
@@ -177,52 +419,86 @@ function logMergeZohoAccountsAccessTokenCacheServiceErrorFunction(failedUpdates)
177
419
  * When updating a cached token, it will update the token across all services.
178
420
  *
179
421
  * @param servicesToMerge Must include atleast one service. Empty arrays will throw an error.
180
- */
181
- function mergeZohoAccountsAccessTokenCacheServices(inputServicesToMerge, logError) {
182
- const services = [...inputServicesToMerge];
183
- const logErrorFunction = typeof logError === 'function' ? logError : logError !== false ? logMergeZohoAccountsAccessTokenCacheServiceErrorFunction : undefined;
422
+ */ function mergeZohoAccountsAccessTokenCacheServices(inputServicesToMerge, logError) {
423
+ var services = _to_consumable_array$3(inputServicesToMerge);
424
+ var logErrorFunction = typeof logError === 'function' ? logError : logError !== false ? logMergeZohoAccountsAccessTokenCacheServiceErrorFunction : undefined;
184
425
  if (services.length === 0) {
185
426
  throw new Error('mergeZohoAccountsAccessTokenCacheServices() input cannot be empty.');
186
427
  }
187
- const service = {
188
- loadZohoAccessTokenCache: function (service) {
189
- const accessCachesForServices = services.map((x) => x.loadZohoAccessTokenCache(service));
190
- const loadCachedTokenFromFirstService = util.tryWithPromiseFactoriesFunction({
191
- promiseFactories: accessCachesForServices.map((x) => () => x
192
- .loadCachedToken()
193
- .catch(() => null)
194
- .then((x) => {
195
- let result = undefined;
196
- if (x && !util.isPast(x.expiresAt)) {
197
- result = x; // only return from cache if it is not expired
198
- }
199
- return result;
200
- })),
428
+ var service = {
429
+ loadZohoAccessTokenCache: function loadZohoAccessTokenCache(service) {
430
+ var accessCachesForServices = services.map(function(x) {
431
+ return x.loadZohoAccessTokenCache(service);
432
+ });
433
+ var loadCachedTokenFromFirstService = util.tryWithPromiseFactoriesFunction({
434
+ promiseFactories: accessCachesForServices.map(function(x) {
435
+ return function() {
436
+ return x.loadCachedToken().catch(function() {
437
+ return null;
438
+ }).then(function(x) {
439
+ var result = undefined;
440
+ if (x && !util.isPast(x.expiresAt)) {
441
+ result = x; // only return from cache if it is not expired
442
+ }
443
+ return result;
444
+ });
445
+ };
446
+ }),
201
447
  successOnMaybe: false,
202
448
  throwErrors: false
203
449
  });
204
- const cacheForService = {
205
- loadCachedToken: function () {
450
+ var cacheForService = {
451
+ loadCachedToken: function loadCachedToken() {
206
452
  return loadCachedTokenFromFirstService();
207
453
  },
208
- updateCachedToken: async function (accessToken) {
209
- return Promise.allSettled(accessCachesForServices.map((x) => x
210
- .updateCachedToken(accessToken)
211
- .then(() => null)
212
- .catch((e) => {
213
- return [x, e];
214
- }))).then((x) => {
215
- // only find the failures if we're logging
216
- if (logErrorFunction != null) {
217
- const failedUpdates = util.filterMaybeArrayValues(x.map((y) => y.value));
218
- if (failedUpdates.length) {
219
- logErrorFunction(failedUpdates);
220
- }
221
- }
222
- });
454
+ updateCachedToken: function updateCachedToken(accessToken) {
455
+ return _async_to_generator(function() {
456
+ return _ts_generator(this, function(_state) {
457
+ return [
458
+ 2,
459
+ Promise.allSettled(accessCachesForServices.map(function(x) {
460
+ return x.updateCachedToken(accessToken).then(function() {
461
+ return null;
462
+ }).catch(function(e) {
463
+ return [
464
+ x,
465
+ e
466
+ ];
467
+ });
468
+ })).then(function(x) {
469
+ // only find the failures if we're logging
470
+ if (logErrorFunction != null) {
471
+ var failedUpdates = util.filterMaybeArrayValues(x.map(function(y) {
472
+ return y.value;
473
+ }));
474
+ if (failedUpdates.length) {
475
+ logErrorFunction(failedUpdates);
476
+ }
477
+ }
478
+ })
479
+ ];
480
+ });
481
+ })();
223
482
  },
224
- clearCachedToken: async function () {
225
- await Promise.allSettled(accessCachesForServices.map((x) => x.clearCachedToken()));
483
+ clearCachedToken: function clearCachedToken() {
484
+ return _async_to_generator(function() {
485
+ return _ts_generator(this, function(_state) {
486
+ switch(_state.label){
487
+ case 0:
488
+ return [
489
+ 4,
490
+ Promise.allSettled(accessCachesForServices.map(function(x) {
491
+ return x.clearCachedToken();
492
+ }))
493
+ ];
494
+ case 1:
495
+ _state.sent();
496
+ return [
497
+ 2
498
+ ];
499
+ }
500
+ });
501
+ })();
226
502
  }
227
503
  };
228
504
  return cacheForService;
@@ -235,356 +511,737 @@ function mergeZohoAccountsAccessTokenCacheServices(inputServicesToMerge, logErro
235
511
  * Creates a ZohoAccountsAccessTokenCacheService that uses in-memory storage.
236
512
  *
237
513
  * @returns
238
- */
239
- function memoryZohoAccountsAccessTokenCacheService(existingCache, logAccessToConsole) {
240
- const tokens = existingCache ?? {};
514
+ */ function memoryZohoAccountsAccessTokenCacheService(existingCache, logAccessToConsole) {
515
+ var tokens = existingCache !== null && existingCache !== void 0 ? existingCache : {};
241
516
  function loadZohoAccessTokenCache(service) {
242
- const accessTokenCache = {
243
- loadCachedToken: async function () {
244
- const token = tokens[service];
245
- if (logAccessToConsole) {
246
- console.log('retrieving access token from memory: ', { token, service });
247
- }
248
- return token;
517
+ var accessTokenCache = {
518
+ loadCachedToken: function loadCachedToken() {
519
+ return _async_to_generator(function() {
520
+ var token;
521
+ return _ts_generator(this, function(_state) {
522
+ token = tokens[service];
523
+ if (logAccessToConsole) {
524
+ console.log('retrieving access token from memory: ', {
525
+ token: token,
526
+ service: service
527
+ });
528
+ }
529
+ return [
530
+ 2,
531
+ token
532
+ ];
533
+ });
534
+ })();
249
535
  },
250
- updateCachedToken: async function (accessToken) {
251
- tokens[service] = accessToken;
252
- if (logAccessToConsole) {
253
- console.log('updating access token in memory: ', { accessToken, service });
254
- }
536
+ updateCachedToken: function updateCachedToken(accessToken) {
537
+ return _async_to_generator(function() {
538
+ return _ts_generator(this, function(_state) {
539
+ tokens[service] = accessToken;
540
+ if (logAccessToConsole) {
541
+ console.log('updating access token in memory: ', {
542
+ accessToken: accessToken,
543
+ service: service
544
+ });
545
+ }
546
+ return [
547
+ 2
548
+ ];
549
+ });
550
+ })();
255
551
  },
256
- clearCachedToken: async function () {
257
- delete tokens[service];
258
- if (logAccessToConsole) {
259
- console.log('clearing access token in memory: ', { service });
260
- }
552
+ clearCachedToken: function clearCachedToken() {
553
+ return _async_to_generator(function() {
554
+ return _ts_generator(this, function(_state) {
555
+ delete tokens[service];
556
+ if (logAccessToConsole) {
557
+ console.log('clearing access token in memory: ', {
558
+ service: service
559
+ });
560
+ }
561
+ return [
562
+ 2
563
+ ];
564
+ });
565
+ })();
261
566
  }
262
567
  };
263
568
  return accessTokenCache;
264
569
  }
265
570
  return {
266
- loadZohoAccessTokenCache
571
+ loadZohoAccessTokenCache: loadZohoAccessTokenCache
267
572
  };
268
573
  }
269
574
  // MARK: File System Access Token Cache
270
- const DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = '.tmp/zoho-access-tokens.json';
575
+ var DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = '.tmp/zoho-access-tokens.json';
271
576
  /**
272
577
  * Creates a ZohoAccountsAccessTokenCacheService that reads and writes the access token to the file system.
273
578
  *
274
579
  * Useful for testing.
275
580
  *
276
581
  * @returns
277
- */
278
- function fileZohoAccountsAccessTokenCacheService(filename = DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH, useMemoryCache = true) {
279
- let loadedTokens = null;
280
- async function loadTokens() {
281
- if (!loadedTokens) {
282
- return (await readTokenFile()) ?? {};
283
- }
284
- else {
285
- return loadedTokens;
286
- }
582
+ */ function fileZohoAccountsAccessTokenCacheService() {
583
+ var filename = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH, useMemoryCache = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
584
+ var loadedTokens = null;
585
+ function loadTokens() {
586
+ return _async_to_generator(function() {
587
+ var _ref;
588
+ return _ts_generator(this, function(_state) {
589
+ switch(_state.label){
590
+ case 0:
591
+ if (!!loadedTokens) return [
592
+ 3,
593
+ 2
594
+ ];
595
+ return [
596
+ 4,
597
+ readTokenFile()
598
+ ];
599
+ case 1:
600
+ return [
601
+ 2,
602
+ (_ref = _state.sent()) !== null && _ref !== void 0 ? _ref : {}
603
+ ];
604
+ case 2:
605
+ return [
606
+ 2,
607
+ loadedTokens
608
+ ];
609
+ case 3:
610
+ return [
611
+ 2
612
+ ];
613
+ }
614
+ });
615
+ })();
287
616
  }
288
617
  function readTokenFile() {
289
- return new Promise((resolve) => {
290
- fs.mkdirSync(path.dirname(filename), { recursive: true }); // make the directory first
291
- fs.readFile(filename, {}, (x, data) => {
292
- let result = undefined;
618
+ return new Promise(function(resolve) {
619
+ fs.mkdirSync(path.dirname(filename), {
620
+ recursive: true
621
+ }); // make the directory first
622
+ fs.readFile(filename, {}, function(x, data) {
623
+ var result = undefined;
293
624
  if (!x) {
294
625
  try {
295
626
  result = JSON.parse(data.toString());
296
627
  util.forEachKeyValue(result, {
297
- forEach: (x) => {
628
+ forEach: function forEach(x) {
298
629
  if (x[1]) {
299
630
  x[1].expiresAt = new Date(x[1].expiresAt);
300
631
  }
301
632
  }
302
633
  });
303
- }
304
- catch (e) {
634
+ } catch (e) {
305
635
  console.error('Failed reading token file: ', e);
306
636
  }
307
637
  }
308
638
  resolve(result);
309
639
  });
310
- }).then((x) => {
640
+ }).then(function(x) {
311
641
  // update loaded tokens
312
642
  if (useMemoryCache) {
313
- loadedTokens = {
314
- ...loadedTokens,
315
- ...x
316
- };
643
+ loadedTokens = _object_spread$4({}, loadedTokens, x);
317
644
  }
318
645
  return x;
319
646
  });
320
647
  }
321
- async function writeTokenFile(tokens) {
322
- return new Promise((resolve, reject) => {
323
- fs.writeFile(filename, JSON.stringify(tokens), {}, (x) => {
324
- if (!x) {
325
- resolve();
326
- }
327
- else {
328
- reject(x);
329
- }
648
+ function writeTokenFile(tokens) {
649
+ return _async_to_generator(function() {
650
+ return _ts_generator(this, function(_state) {
651
+ return [
652
+ 2,
653
+ new Promise(function(resolve, reject) {
654
+ fs.writeFile(filename, JSON.stringify(tokens), {}, function(x) {
655
+ if (!x) {
656
+ resolve();
657
+ } else {
658
+ reject(x);
659
+ }
660
+ });
661
+ })
662
+ ];
330
663
  });
331
- });
332
- }
333
- async function deleteTokenFile() {
334
- return new Promise((resolve, reject) => {
335
- fs.rm(filename, (x) => {
336
- if (!x) {
337
- resolve();
338
- }
339
- else {
340
- reject(x);
341
- }
664
+ })();
665
+ }
666
+ function deleteTokenFile() {
667
+ return _async_to_generator(function() {
668
+ return _ts_generator(this, function(_state) {
669
+ return [
670
+ 2,
671
+ new Promise(function(resolve, reject) {
672
+ fs.rm(filename, function(x) {
673
+ if (!x) {
674
+ resolve();
675
+ } else {
676
+ reject(x);
677
+ }
678
+ });
679
+ })
680
+ ];
342
681
  });
343
- });
682
+ })();
344
683
  }
345
684
  function loadZohoAccessTokenCache(service) {
346
- const accessTokenCache = {
347
- loadCachedToken: async function () {
348
- const tokens = await loadTokens();
349
- const token = tokens[service];
350
- // console.log('retrieving access token from file: ', { token, service });
351
- return token;
685
+ var accessTokenCache = {
686
+ loadCachedToken: function loadCachedToken() {
687
+ return _async_to_generator(function() {
688
+ var tokens, token;
689
+ return _ts_generator(this, function(_state) {
690
+ switch(_state.label){
691
+ case 0:
692
+ return [
693
+ 4,
694
+ loadTokens()
695
+ ];
696
+ case 1:
697
+ tokens = _state.sent();
698
+ token = tokens[service];
699
+ // console.log('retrieving access token from file: ', { token, service });
700
+ return [
701
+ 2,
702
+ token
703
+ ];
704
+ }
705
+ });
706
+ })();
352
707
  },
353
- updateCachedToken: async function (accessToken) {
354
- const tokens = await loadTokens();
355
- if (tokens) {
356
- tokens[service] = accessToken;
357
- }
358
- // console.log('updating access token in file: ', { accessToken, service });
359
- try {
360
- await writeTokenFile(tokens);
361
- }
362
- catch (e) {
363
- console.error('Failed updating access token in file: ', e);
364
- }
708
+ updateCachedToken: function updateCachedToken(accessToken) {
709
+ return _async_to_generator(function() {
710
+ var tokens, e;
711
+ return _ts_generator(this, function(_state) {
712
+ switch(_state.label){
713
+ case 0:
714
+ return [
715
+ 4,
716
+ loadTokens()
717
+ ];
718
+ case 1:
719
+ tokens = _state.sent();
720
+ if (tokens) {
721
+ tokens[service] = accessToken;
722
+ }
723
+ _state.label = 2;
724
+ case 2:
725
+ _state.trys.push([
726
+ 2,
727
+ 4,
728
+ ,
729
+ 5
730
+ ]);
731
+ return [
732
+ 4,
733
+ writeTokenFile(tokens)
734
+ ];
735
+ case 3:
736
+ _state.sent();
737
+ return [
738
+ 3,
739
+ 5
740
+ ];
741
+ case 4:
742
+ e = _state.sent();
743
+ console.error('Failed updating access token in file: ', e);
744
+ return [
745
+ 3,
746
+ 5
747
+ ];
748
+ case 5:
749
+ return [
750
+ 2
751
+ ];
752
+ }
753
+ });
754
+ })();
365
755
  },
366
- clearCachedToken: async function () {
367
- try {
368
- await writeTokenFile({});
369
- }
370
- catch (e) {
371
- console.error('Failed clearing access token in file: ', e);
372
- }
756
+ clearCachedToken: function clearCachedToken() {
757
+ return _async_to_generator(function() {
758
+ var e;
759
+ return _ts_generator(this, function(_state) {
760
+ switch(_state.label){
761
+ case 0:
762
+ _state.trys.push([
763
+ 0,
764
+ 2,
765
+ ,
766
+ 3
767
+ ]);
768
+ return [
769
+ 4,
770
+ writeTokenFile({})
771
+ ];
772
+ case 1:
773
+ _state.sent();
774
+ return [
775
+ 3,
776
+ 3
777
+ ];
778
+ case 2:
779
+ e = _state.sent();
780
+ console.error('Failed clearing access token in file: ', e);
781
+ return [
782
+ 3,
783
+ 3
784
+ ];
785
+ case 3:
786
+ return [
787
+ 2
788
+ ];
789
+ }
790
+ });
791
+ })();
373
792
  }
374
793
  };
375
794
  return accessTokenCache;
376
795
  }
377
796
  return {
378
- loadZohoAccessTokenCache,
379
- readTokenFile,
380
- writeTokenFile,
381
- deleteTokenFile
797
+ loadZohoAccessTokenCache: loadZohoAccessTokenCache,
798
+ readTokenFile: readTokenFile,
799
+ writeTokenFile: writeTokenFile,
800
+ deleteTokenFile: deleteTokenFile
382
801
  };
383
802
  }
384
803
 
385
- exports.ZohoAccountsApi = class ZohoAccountsApi {
386
- config;
387
- cacheService;
388
- zohoAccounts;
389
- get accountsContext() {
390
- return this.zohoAccounts.accountsContext;
804
+ function _class_call_check$6(instance, Constructor) {
805
+ if (!(instance instanceof Constructor)) {
806
+ throw new TypeError("Cannot call a class as a function");
391
807
  }
392
- constructor(config, cacheService) {
393
- this.config = config;
394
- this.cacheService = cacheService;
395
- const accessTokenCache = config.zohoAccounts.accessTokenCache ? config.zohoAccounts.accessTokenCache : cacheService.loadZohoAccessTokenCache(config.zohoAccounts.serviceAccessTokenKey);
396
- this.zohoAccounts = zoho.zohoAccountsFactory(config.factoryConfig ?? {})({
397
- accessTokenCache,
398
- ...config.zohoAccounts
808
+ }
809
+ function _defineProperties$6(target, props) {
810
+ for(var i = 0; i < props.length; i++){
811
+ var descriptor = props[i];
812
+ descriptor.enumerable = descriptor.enumerable || false;
813
+ descriptor.configurable = true;
814
+ if ("value" in descriptor) descriptor.writable = true;
815
+ Object.defineProperty(target, descriptor.key, descriptor);
816
+ }
817
+ }
818
+ function _create_class$6(Constructor, protoProps, staticProps) {
819
+ if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
820
+ return Constructor;
821
+ }
822
+ function _define_property$6(obj, key, value) {
823
+ if (key in obj) {
824
+ Object.defineProperty(obj, key, {
825
+ value: value,
826
+ enumerable: true,
827
+ configurable: true,
828
+ writable: true
399
829
  });
830
+ } else {
831
+ obj[key] = value;
400
832
  }
401
- // MARK: Accessors
402
- get accessToken() {
403
- return zoho.zohoAccountsAccessToken(this.accountsContext);
833
+ return obj;
834
+ }
835
+ function _object_spread$3(target) {
836
+ for(var i = 1; i < arguments.length; i++){
837
+ var source = arguments[i] != null ? arguments[i] : {};
838
+ var ownKeys = Object.keys(source);
839
+ if (typeof Object.getOwnPropertySymbols === "function") {
840
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
841
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
842
+ }));
843
+ }
844
+ ownKeys.forEach(function(key) {
845
+ _define_property$6(target, key, source[key]);
846
+ });
404
847
  }
405
- };
848
+ return target;
849
+ }
850
+ exports.ZohoAccountsApi = /*#__PURE__*/ function() {
851
+ function ZohoAccountsApi(config, cacheService) {
852
+ _class_call_check$6(this, ZohoAccountsApi);
853
+ var _config_factoryConfig;
854
+ _define_property$6(this, "config", void 0);
855
+ _define_property$6(this, "cacheService", void 0);
856
+ _define_property$6(this, "zohoAccounts", void 0);
857
+ this.config = config;
858
+ this.cacheService = cacheService;
859
+ var accessTokenCache = config.zohoAccounts.accessTokenCache ? config.zohoAccounts.accessTokenCache : cacheService.loadZohoAccessTokenCache(config.zohoAccounts.serviceAccessTokenKey);
860
+ this.zohoAccounts = zoho.zohoAccountsFactory((_config_factoryConfig = config.factoryConfig) !== null && _config_factoryConfig !== void 0 ? _config_factoryConfig : {})(_object_spread$3({
861
+ accessTokenCache: accessTokenCache
862
+ }, config.zohoAccounts));
863
+ }
864
+ _create_class$6(ZohoAccountsApi, [
865
+ {
866
+ key: "accountsContext",
867
+ get: function get() {
868
+ return this.zohoAccounts.accountsContext;
869
+ }
870
+ },
871
+ {
872
+ key: "accessToken",
873
+ get: // MARK: Accessors
874
+ function get() {
875
+ return zoho.zohoAccountsAccessToken(this.accountsContext);
876
+ }
877
+ }
878
+ ]);
879
+ return ZohoAccountsApi;
880
+ }();
406
881
  exports.ZohoAccountsApi = __decorate([
407
882
  common.Injectable(),
408
883
  __param(0, common.Inject(ZohoAccountsServiceConfig)),
409
884
  __param(1, common.Inject(exports.ZohoAccountsAccessTokenCacheService))
410
885
  ], exports.ZohoAccountsApi);
411
886
 
887
+ function _class_call_check$5(instance, Constructor) {
888
+ if (!(instance instanceof Constructor)) {
889
+ throw new TypeError("Cannot call a class as a function");
890
+ }
891
+ }
892
+ function _defineProperties$5(target, props) {
893
+ for(var i = 0; i < props.length; i++){
894
+ var descriptor = props[i];
895
+ descriptor.enumerable = descriptor.enumerable || false;
896
+ descriptor.configurable = true;
897
+ if ("value" in descriptor) descriptor.writable = true;
898
+ Object.defineProperty(target, descriptor.key, descriptor);
899
+ }
900
+ }
901
+ function _create_class$5(Constructor, protoProps, staticProps) {
902
+ if (staticProps) _defineProperties$5(Constructor, staticProps);
903
+ return Constructor;
904
+ }
905
+ function _define_property$5(obj, key, value) {
906
+ if (key in obj) {
907
+ Object.defineProperty(obj, key, {
908
+ value: value,
909
+ enumerable: true,
910
+ configurable: true,
911
+ writable: true
912
+ });
913
+ } else {
914
+ obj[key] = value;
915
+ }
916
+ return obj;
917
+ }
412
918
  /**
413
919
  * Abstract configuration class for the NestJS Zoho CRM service.
414
920
  *
415
921
  * Used as a DI token so that applications can provide their own config values
416
922
  * while keeping the expected shape consistent.
417
- */
418
- class ZohoCrmServiceConfig {
419
- /**
923
+ */ var ZohoCrmServiceConfig = /*#__PURE__*/ function() {
924
+ function ZohoCrmServiceConfig() {
925
+ _class_call_check$5(this, ZohoCrmServiceConfig);
926
+ /**
420
927
  * Zoho CRM API connection settings (endpoint URL, etc.).
421
- */
422
- zohoCrm;
423
- /**
928
+ */ _define_property$5(this, "zohoCrm", void 0);
929
+ /**
424
930
  * Optional factory-level overrides applied when creating the underlying CRM client.
425
- */
426
- factoryConfig;
427
- /**
931
+ */ _define_property$5(this, "factoryConfig", void 0);
932
+ }
933
+ _create_class$5(ZohoCrmServiceConfig, null, [
934
+ {
935
+ key: "assertValidConfig",
936
+ value: /**
428
937
  * Validates that the required Zoho CRM connection fields are present and well-formed.
429
- */
430
- static assertValidConfig(config) {
431
- assertValidZohoConfig(config.zohoCrm);
938
+ */ function assertValidConfig(config) {
939
+ assertValidZohoConfig(config.zohoCrm);
940
+ }
941
+ }
942
+ ]);
943
+ return ZohoCrmServiceConfig;
944
+ }
945
+ ();
946
+
947
+ function _class_call_check$4(instance, Constructor) {
948
+ if (!(instance instanceof Constructor)) {
949
+ throw new TypeError("Cannot call a class as a function");
432
950
  }
433
951
  }
434
-
952
+ function _defineProperties$4(target, props) {
953
+ for(var i = 0; i < props.length; i++){
954
+ var descriptor = props[i];
955
+ descriptor.enumerable = descriptor.enumerable || false;
956
+ descriptor.configurable = true;
957
+ if ("value" in descriptor) descriptor.writable = true;
958
+ Object.defineProperty(target, descriptor.key, descriptor);
959
+ }
960
+ }
961
+ function _create_class$4(Constructor, protoProps, staticProps) {
962
+ if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
963
+ return Constructor;
964
+ }
965
+ function _define_property$4(obj, key, value) {
966
+ if (key in obj) {
967
+ Object.defineProperty(obj, key, {
968
+ value: value,
969
+ enumerable: true,
970
+ configurable: true,
971
+ writable: true
972
+ });
973
+ } else {
974
+ obj[key] = value;
975
+ }
976
+ return obj;
977
+ }
978
+ function _object_spread$2(target) {
979
+ for(var i = 1; i < arguments.length; i++){
980
+ var source = arguments[i] != null ? arguments[i] : {};
981
+ var ownKeys = Object.keys(source);
982
+ if (typeof Object.getOwnPropertySymbols === "function") {
983
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
984
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
985
+ }));
986
+ }
987
+ ownKeys.forEach(function(key) {
988
+ _define_property$4(target, key, source[key]);
989
+ });
990
+ }
991
+ return target;
992
+ }
993
+ function ownKeys$2(object, enumerableOnly) {
994
+ var keys = Object.keys(object);
995
+ if (Object.getOwnPropertySymbols) {
996
+ var symbols = Object.getOwnPropertySymbols(object);
997
+ keys.push.apply(keys, symbols);
998
+ }
999
+ return keys;
1000
+ }
1001
+ function _object_spread_props$2(target, source) {
1002
+ source = source != null ? source : {};
1003
+ if (Object.getOwnPropertyDescriptors) {
1004
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1005
+ } else {
1006
+ ownKeys$2(Object(source)).forEach(function(key) {
1007
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1008
+ });
1009
+ }
1010
+ return target;
1011
+ }
435
1012
  /**
436
1013
  * NestJS injectable service that wraps the Zoho CRM API.
437
1014
  *
438
1015
  * Provides convenient accessor getters for all CRM operations, each bound
439
1016
  * to the authenticated CRM context created during construction.
440
- */
441
- exports.ZohoCrmApi = class ZohoCrmApi {
442
- config;
443
- zohoAccountsApi;
444
- /**
1017
+ */ exports.ZohoCrmApi = /*#__PURE__*/ function() {
1018
+ function ZohoCrmApi(config, zohoAccountsApi) {
1019
+ _class_call_check$4(this, ZohoCrmApi);
1020
+ _define_property$4(this, "config", void 0);
1021
+ _define_property$4(this, "zohoAccountsApi", void 0);
1022
+ /**
445
1023
  * Underlying Zoho CRM client instance, initialized from the injected config and accounts context.
446
- */
447
- zohoCrm;
448
- /**
449
- * The authenticated CRM context used by all operation accessors.
450
- */
451
- get crmContext() {
452
- return this.zohoCrm.crmContext;
453
- }
454
- /**
455
- * Rate limiter shared across all CRM requests to respect Zoho API quotas.
456
- */
457
- get zohoRateLimiter() {
458
- return this.zohoCrm.crmContext.zohoRateLimiter;
459
- }
460
- /**
461
- * Initializes the CRM client by combining the service config with the
462
- * accounts context for OAuth token management.
463
- */
464
- constructor(config, zohoAccountsApi) {
1024
+ */ _define_property$4(this, "zohoCrm", void 0);
465
1025
  this.config = config;
466
1026
  this.zohoAccountsApi = zohoAccountsApi;
467
- this.zohoCrm = zoho.zohoCrmFactory({
468
- ...config.factoryConfig,
1027
+ this.zohoCrm = zoho.zohoCrmFactory(_object_spread_props$2(_object_spread$2({}, config.factoryConfig), {
469
1028
  accountsContext: zohoAccountsApi.accountsContext
470
- })(config.zohoCrm);
471
- }
472
- // MARK: Accessors
473
- /** Configured pass-through for {@link zohoCrmInsertRecord}. */
474
- get insertRecord() {
475
- return zoho.zohoCrmInsertRecord(this.crmContext);
476
- }
477
- /** Configured pass-through for {@link zohoCrmUpsertRecord}. */
478
- get upsertRecord() {
479
- return zoho.zohoCrmUpsertRecord(this.crmContext);
480
- }
481
- /** Configured pass-through for {@link zohoCrmUpdateRecord}. */
482
- get updateRecord() {
483
- return zoho.zohoCrmUpdateRecord(this.crmContext);
484
- }
485
- /** Configured pass-through for {@link zohoCrmDeleteRecord}. */
486
- get deleteRecord() {
487
- return zoho.zohoCrmDeleteRecord(this.crmContext);
488
- }
489
- /** Configured pass-through for {@link zohoCrmGetRecordById}. */
490
- get getRecordById() {
491
- return zoho.zohoCrmGetRecordById(this.crmContext);
492
- }
493
- /** Configured pass-through for {@link zohoCrmGetRecords}. */
494
- get getRecords() {
495
- return zoho.zohoCrmGetRecords(this.crmContext);
496
- }
497
- /** Configured pass-through for {@link zohoCrmSearchRecords}. */
498
- get searchRecords() {
499
- return zoho.zohoCrmSearchRecords(this.crmContext);
500
- }
501
- /** Configured pass-through for {@link zohoCrmSearchRecordsPageFactory}. */
502
- get searchRecordsPageFactory() {
503
- return zoho.zohoCrmSearchRecordsPageFactory(this.crmContext);
504
- }
505
- /** Configured pass-through for {@link zohoCrmGetRelatedRecordsFunctionFactory}. */
506
- get getRelatedRecordsFunctionFactory() {
507
- return zoho.zohoCrmGetRelatedRecordsFunctionFactory(this.crmContext);
508
- }
509
- /** Configured pass-through for {@link zohoCrmGetEmailsForRecord}. */
510
- get getEmailsForRecord() {
511
- return zoho.zohoCrmGetEmailsForRecord(this.crmContext);
512
- }
513
- /** Configured pass-through for {@link zohoCrmGetEmailsForRecordPageFactory}. */
514
- get getEmailsForRecordPageFactory() {
515
- return zoho.zohoCrmGetEmailsForRecordPageFactory(this.crmContext);
516
- }
517
- /** Configured pass-through for {@link zohoCrmGetAttachmentsForRecord}. */
518
- get getAttachmentsForRecord() {
519
- return zoho.zohoCrmGetAttachmentsForRecord(this.crmContext);
520
- }
521
- /** Configured pass-through for {@link zohoCrmGetAttachmentsForRecordPageFactory}. */
522
- get getAttachmentsForRecordPageFactory() {
523
- return zoho.zohoCrmGetAttachmentsForRecordPageFactory(this.crmContext);
524
- }
525
- /** Configured pass-through for {@link zohoCrmUploadAttachmentForRecord}. */
526
- get uploadAttachmentForRecord() {
527
- return zoho.zohoCrmUploadAttachmentForRecord(this.crmContext);
528
- }
529
- /** Configured pass-through for {@link zohoCrmDownloadAttachmentForRecord}. */
530
- get downloadAttachmentForRecord() {
531
- return zoho.zohoCrmDownloadAttachmentForRecord(this.crmContext);
532
- }
533
- /** Configured pass-through for {@link zohoCrmDeleteAttachmentFromRecord}. */
534
- get deleteAttachmentFromRecord() {
535
- return zoho.zohoCrmDeleteAttachmentFromRecord(this.crmContext);
1029
+ }))(config.zohoCrm);
536
1030
  }
537
- /** Configured pass-through for {@link zohoCrmCreateNotes}. */
538
- get createNotes() {
539
- return zoho.zohoCrmCreateNotes(this.crmContext);
540
- }
541
- /** Configured pass-through for {@link zohoCrmDeleteNotes}. */
542
- get deleteNotes() {
543
- return zoho.zohoCrmDeleteNotes(this.crmContext);
544
- }
545
- /** Configured pass-through for {@link zohoCrmCreateNotesForRecord}. */
546
- get createNotesForRecord() {
547
- return zoho.zohoCrmCreateNotesForRecord(this.crmContext);
548
- }
549
- /** Configured pass-through for {@link zohoCrmGetNotesForRecord}. */
550
- get getNotesForRecord() {
551
- return zoho.zohoCrmGetNotesForRecord(this.crmContext);
552
- }
553
- /** Configured pass-through for {@link zohoCrmGetNotesForRecordPageFactory}. */
554
- get getNotesForRecordPageFactory() {
555
- return zoho.zohoCrmGetNotesForRecordPageFactory(this.crmContext);
556
- }
557
- /** Configured pass-through for {@link zohoCrmExecuteRestApiFunction}. */
558
- get executeRestApiFunction() {
559
- return zoho.zohoCrmExecuteRestApiFunction(this.crmContext);
560
- }
561
- /** Configured pass-through for {@link zohoCrmCreateTagsForModule}. */
562
- get createTagsForModule() {
563
- return zoho.zohoCrmCreateTagsForModule(this.crmContext);
564
- }
565
- /** Configured pass-through for {@link zohoCrmDeleteTag}. */
566
- get deleteTag() {
567
- return zoho.zohoCrmDeleteTag(this.crmContext);
568
- }
569
- /** Configured pass-through for {@link zohoCrmGetTagsForModule}. */
570
- get getTagsForModule() {
571
- return zoho.zohoCrmGetTagsForModule(this.crmContext);
572
- }
573
- /** Configured pass-through for {@link zohoCrmAddTagsToRecords}. */
574
- get addTagsToRecords() {
575
- return zoho.zohoCrmAddTagsToRecords(this.crmContext);
576
- }
577
- /** Configured pass-through for {@link zohoCrmRemoveTagsFromRecords}. */
578
- get removeTagsFromRecords() {
579
- return zoho.zohoCrmRemoveTagsFromRecords(this.crmContext);
580
- }
581
- };
1031
+ _create_class$4(ZohoCrmApi, [
1032
+ {
1033
+ key: "crmContext",
1034
+ get: /**
1035
+ * The authenticated CRM context used by all operation accessors.
1036
+ */ function get() {
1037
+ return this.zohoCrm.crmContext;
1038
+ }
1039
+ },
1040
+ {
1041
+ key: "zohoRateLimiter",
1042
+ get: /**
1043
+ * Rate limiter shared across all CRM requests to respect Zoho API quotas.
1044
+ */ function get() {
1045
+ return this.zohoCrm.crmContext.zohoRateLimiter;
1046
+ }
1047
+ },
1048
+ {
1049
+ key: "insertRecord",
1050
+ get: // MARK: Accessors
1051
+ /** Configured pass-through for {@link zohoCrmInsertRecord}. */ function get() {
1052
+ return zoho.zohoCrmInsertRecord(this.crmContext);
1053
+ }
1054
+ },
1055
+ {
1056
+ key: "upsertRecord",
1057
+ get: /** Configured pass-through for {@link zohoCrmUpsertRecord}. */ function get() {
1058
+ return zoho.zohoCrmUpsertRecord(this.crmContext);
1059
+ }
1060
+ },
1061
+ {
1062
+ key: "updateRecord",
1063
+ get: /** Configured pass-through for {@link zohoCrmUpdateRecord}. */ function get() {
1064
+ return zoho.zohoCrmUpdateRecord(this.crmContext);
1065
+ }
1066
+ },
1067
+ {
1068
+ key: "deleteRecord",
1069
+ get: /** Configured pass-through for {@link zohoCrmDeleteRecord}. */ function get() {
1070
+ return zoho.zohoCrmDeleteRecord(this.crmContext);
1071
+ }
1072
+ },
1073
+ {
1074
+ key: "getRecordById",
1075
+ get: /** Configured pass-through for {@link zohoCrmGetRecordById}. */ function get() {
1076
+ return zoho.zohoCrmGetRecordById(this.crmContext);
1077
+ }
1078
+ },
1079
+ {
1080
+ key: "getRecords",
1081
+ get: /** Configured pass-through for {@link zohoCrmGetRecords}. */ function get() {
1082
+ return zoho.zohoCrmGetRecords(this.crmContext);
1083
+ }
1084
+ },
1085
+ {
1086
+ key: "searchRecords",
1087
+ get: /** Configured pass-through for {@link zohoCrmSearchRecords}. */ function get() {
1088
+ return zoho.zohoCrmSearchRecords(this.crmContext);
1089
+ }
1090
+ },
1091
+ {
1092
+ key: "searchRecordsPageFactory",
1093
+ get: /** Configured pass-through for {@link zohoCrmSearchRecordsPageFactory}. */ function get() {
1094
+ return zoho.zohoCrmSearchRecordsPageFactory(this.crmContext);
1095
+ }
1096
+ },
1097
+ {
1098
+ key: "getRelatedRecordsFunctionFactory",
1099
+ get: /** Configured pass-through for {@link zohoCrmGetRelatedRecordsFunctionFactory}. */ function get() {
1100
+ return zoho.zohoCrmGetRelatedRecordsFunctionFactory(this.crmContext);
1101
+ }
1102
+ },
1103
+ {
1104
+ key: "getEmailsForRecord",
1105
+ get: /** Configured pass-through for {@link zohoCrmGetEmailsForRecord}. */ function get() {
1106
+ return zoho.zohoCrmGetEmailsForRecord(this.crmContext);
1107
+ }
1108
+ },
1109
+ {
1110
+ key: "getEmailsForRecordPageFactory",
1111
+ get: /** Configured pass-through for {@link zohoCrmGetEmailsForRecordPageFactory}. */ function get() {
1112
+ return zoho.zohoCrmGetEmailsForRecordPageFactory(this.crmContext);
1113
+ }
1114
+ },
1115
+ {
1116
+ key: "getAttachmentsForRecord",
1117
+ get: /** Configured pass-through for {@link zohoCrmGetAttachmentsForRecord}. */ function get() {
1118
+ return zoho.zohoCrmGetAttachmentsForRecord(this.crmContext);
1119
+ }
1120
+ },
1121
+ {
1122
+ key: "getAttachmentsForRecordPageFactory",
1123
+ get: /** Configured pass-through for {@link zohoCrmGetAttachmentsForRecordPageFactory}. */ function get() {
1124
+ return zoho.zohoCrmGetAttachmentsForRecordPageFactory(this.crmContext);
1125
+ }
1126
+ },
1127
+ {
1128
+ key: "uploadAttachmentForRecord",
1129
+ get: /** Configured pass-through for {@link zohoCrmUploadAttachmentForRecord}. */ function get() {
1130
+ return zoho.zohoCrmUploadAttachmentForRecord(this.crmContext);
1131
+ }
1132
+ },
1133
+ {
1134
+ key: "downloadAttachmentForRecord",
1135
+ get: /** Configured pass-through for {@link zohoCrmDownloadAttachmentForRecord}. */ function get() {
1136
+ return zoho.zohoCrmDownloadAttachmentForRecord(this.crmContext);
1137
+ }
1138
+ },
1139
+ {
1140
+ key: "deleteAttachmentFromRecord",
1141
+ get: /** Configured pass-through for {@link zohoCrmDeleteAttachmentFromRecord}. */ function get() {
1142
+ return zoho.zohoCrmDeleteAttachmentFromRecord(this.crmContext);
1143
+ }
1144
+ },
1145
+ {
1146
+ key: "createNotes",
1147
+ get: /** Configured pass-through for {@link zohoCrmCreateNotes}. */ function get() {
1148
+ return zoho.zohoCrmCreateNotes(this.crmContext);
1149
+ }
1150
+ },
1151
+ {
1152
+ key: "deleteNotes",
1153
+ get: /** Configured pass-through for {@link zohoCrmDeleteNotes}. */ function get() {
1154
+ return zoho.zohoCrmDeleteNotes(this.crmContext);
1155
+ }
1156
+ },
1157
+ {
1158
+ key: "createNotesForRecord",
1159
+ get: /** Configured pass-through for {@link zohoCrmCreateNotesForRecord}. */ function get() {
1160
+ return zoho.zohoCrmCreateNotesForRecord(this.crmContext);
1161
+ }
1162
+ },
1163
+ {
1164
+ key: "getNotesForRecord",
1165
+ get: /** Configured pass-through for {@link zohoCrmGetNotesForRecord}. */ function get() {
1166
+ return zoho.zohoCrmGetNotesForRecord(this.crmContext);
1167
+ }
1168
+ },
1169
+ {
1170
+ key: "getNotesForRecordPageFactory",
1171
+ get: /** Configured pass-through for {@link zohoCrmGetNotesForRecordPageFactory}. */ function get() {
1172
+ return zoho.zohoCrmGetNotesForRecordPageFactory(this.crmContext);
1173
+ }
1174
+ },
1175
+ {
1176
+ key: "executeRestApiFunction",
1177
+ get: /** Configured pass-through for {@link zohoCrmExecuteRestApiFunction}. */ function get() {
1178
+ return zoho.zohoCrmExecuteRestApiFunction(this.crmContext);
1179
+ }
1180
+ },
1181
+ {
1182
+ key: "createTagsForModule",
1183
+ get: /** Configured pass-through for {@link zohoCrmCreateTagsForModule}. */ function get() {
1184
+ return zoho.zohoCrmCreateTagsForModule(this.crmContext);
1185
+ }
1186
+ },
1187
+ {
1188
+ key: "deleteTag",
1189
+ get: /** Configured pass-through for {@link zohoCrmDeleteTag}. */ function get() {
1190
+ return zoho.zohoCrmDeleteTag(this.crmContext);
1191
+ }
1192
+ },
1193
+ {
1194
+ key: "getTagsForModule",
1195
+ get: /** Configured pass-through for {@link zohoCrmGetTagsForModule}. */ function get() {
1196
+ return zoho.zohoCrmGetTagsForModule(this.crmContext);
1197
+ }
1198
+ },
1199
+ {
1200
+ key: "addTagsToRecords",
1201
+ get: /** Configured pass-through for {@link zohoCrmAddTagsToRecords}. */ function get() {
1202
+ return zoho.zohoCrmAddTagsToRecords(this.crmContext);
1203
+ }
1204
+ },
1205
+ {
1206
+ key: "removeTagsFromRecords",
1207
+ get: /** Configured pass-through for {@link zohoCrmRemoveTagsFromRecords}. */ function get() {
1208
+ return zoho.zohoCrmRemoveTagsFromRecords(this.crmContext);
1209
+ }
1210
+ }
1211
+ ]);
1212
+ return ZohoCrmApi;
1213
+ }();
582
1214
  exports.ZohoCrmApi = __decorate([
583
1215
  common.Injectable(),
584
1216
  __param(0, common.Inject(ZohoCrmServiceConfig)),
585
1217
  __param(1, common.Inject(exports.ZohoAccountsApi))
586
1218
  ], exports.ZohoCrmApi);
587
1219
 
1220
+ function _array_like_to_array$2(arr, len) {
1221
+ if (len == null || len > arr.length) len = arr.length;
1222
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1223
+ return arr2;
1224
+ }
1225
+ function _array_without_holes$2(arr) {
1226
+ if (Array.isArray(arr)) return _array_like_to_array$2(arr);
1227
+ }
1228
+ function _iterable_to_array$2(iter) {
1229
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1230
+ }
1231
+ function _non_iterable_spread$2() {
1232
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1233
+ }
1234
+ function _to_consumable_array$2(arr) {
1235
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
1236
+ }
1237
+ function _unsupported_iterable_to_array$2(o, minLen) {
1238
+ if (!o) return;
1239
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
1240
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1241
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1242
+ if (n === "Map" || n === "Set") return Array.from(n);
1243
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
1244
+ }
588
1245
  // MARK: Provider Factories
589
1246
  /**
590
1247
  * Reads Zoho CRM connection settings from the NestJS ConfigService
@@ -605,10 +1262,9 @@ exports.ZohoCrmApi = __decorate([
605
1262
  * useFactory: zohoCrmServiceConfigFactory
606
1263
  * }
607
1264
  * ```
608
- */
609
- function zohoCrmServiceConfigFactory(configService) {
610
- const getFromConfigService = zohoConfigServiceReaderFunction(zoho.ZOHO_CRM_SERVICE_NAME, configService);
611
- const config = {
1265
+ */ function zohoCrmServiceConfigFactory(configService) {
1266
+ var getFromConfigService = zohoConfigServiceReaderFunction(zoho.ZOHO_CRM_SERVICE_NAME, configService);
1267
+ var config = {
612
1268
  zohoCrm: {
613
1269
  apiUrl: getFromConfigService(ZOHO_API_URL_CONFIG_KEY)
614
1270
  }
@@ -631,10 +1287,9 @@ function zohoCrmServiceConfigFactory(configService) {
631
1287
  * useFactory: zohoCrmAccountServiceConfigFactory
632
1288
  * }
633
1289
  * ```
634
- */
635
- function zohoCrmAccountServiceConfigFactory(configService) {
1290
+ */ function zohoCrmAccountServiceConfigFactory(configService) {
636
1291
  return zohoAccountsServiceConfigFromConfigService({
637
- configService,
1292
+ configService: configService,
638
1293
  serviceAccessTokenKey: zoho.ZOHO_CRM_SERVICE_NAME
639
1294
  });
640
1295
  }
@@ -673,224 +1328,422 @@ function zohoCrmAccountServiceConfigFactory(configService) {
673
1328
  * @Module(appZohoCrmModuleMetadata({ dependencyModule: ZohoCrmDependencyModule }))
674
1329
  * export class AppZohoCrmModule {}
675
1330
  * ```
676
- */
677
- function appZohoCrmModuleMetadata(config$1) {
678
- const { dependencyModule, imports, exports: exports$1, providers } = config$1;
679
- const dependencyModuleImport = dependencyModule ? [dependencyModule] : [];
1331
+ */ function appZohoCrmModuleMetadata(config$1) {
1332
+ var dependencyModule = config$1.dependencyModule, imports = config$1.imports, exports$1 = config$1.exports, providers = config$1.providers;
1333
+ var dependencyModuleImport = dependencyModule ? [
1334
+ dependencyModule
1335
+ ] : [];
680
1336
  return {
681
- imports: [config.ConfigModule, ...dependencyModuleImport, ...(imports ?? [])],
682
- exports: [exports.ZohoCrmApi, ...(exports$1 ?? [])],
1337
+ imports: [
1338
+ config.ConfigModule
1339
+ ].concat(_to_consumable_array$2(dependencyModuleImport), _to_consumable_array$2(imports !== null && imports !== void 0 ? imports : [])),
1340
+ exports: [
1341
+ exports.ZohoCrmApi
1342
+ ].concat(_to_consumable_array$2(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
683
1343
  providers: [
684
1344
  {
685
1345
  provide: ZohoCrmServiceConfig,
686
- inject: [config.ConfigService],
1346
+ inject: [
1347
+ config.ConfigService
1348
+ ],
687
1349
  useFactory: zohoCrmServiceConfigFactory
688
1350
  },
689
1351
  exports.ZohoCrmApi,
690
1352
  // Accounts
691
1353
  {
692
1354
  provide: ZohoAccountsServiceConfig,
693
- inject: [config.ConfigService],
1355
+ inject: [
1356
+ config.ConfigService
1357
+ ],
694
1358
  useFactory: zohoCrmAccountServiceConfigFactory
695
1359
  },
696
- exports.ZohoAccountsApi,
697
- ...(providers ?? [])
698
- ]
1360
+ exports.ZohoAccountsApi
1361
+ ].concat(_to_consumable_array$2(providers !== null && providers !== void 0 ? providers : []))
699
1362
  };
700
1363
  }
701
1364
 
1365
+ function _class_call_check$3(instance, Constructor) {
1366
+ if (!(instance instanceof Constructor)) {
1367
+ throw new TypeError("Cannot call a class as a function");
1368
+ }
1369
+ }
1370
+ function _defineProperties$3(target, props) {
1371
+ for(var i = 0; i < props.length; i++){
1372
+ var descriptor = props[i];
1373
+ descriptor.enumerable = descriptor.enumerable || false;
1374
+ descriptor.configurable = true;
1375
+ if ("value" in descriptor) descriptor.writable = true;
1376
+ Object.defineProperty(target, descriptor.key, descriptor);
1377
+ }
1378
+ }
1379
+ function _create_class$3(Constructor, protoProps, staticProps) {
1380
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
1381
+ return Constructor;
1382
+ }
1383
+ function _define_property$3(obj, key, value) {
1384
+ if (key in obj) {
1385
+ Object.defineProperty(obj, key, {
1386
+ value: value,
1387
+ enumerable: true,
1388
+ configurable: true,
1389
+ writable: true
1390
+ });
1391
+ } else {
1392
+ obj[key] = value;
1393
+ }
1394
+ return obj;
1395
+ }
702
1396
  /**
703
1397
  * Abstract configuration class for the NestJS Zoho Recruit service.
704
1398
  *
705
1399
  * Used as a DI token so that applications can provide their own config values
706
1400
  * while keeping the expected shape consistent.
707
- */
708
- class ZohoRecruitServiceConfig {
709
- /**
1401
+ */ var ZohoRecruitServiceConfig = /*#__PURE__*/ function() {
1402
+ function ZohoRecruitServiceConfig() {
1403
+ _class_call_check$3(this, ZohoRecruitServiceConfig);
1404
+ /**
710
1405
  * Zoho Recruit API connection settings (endpoint URL, etc.).
711
- */
712
- zohoRecruit;
713
- /**
1406
+ */ _define_property$3(this, "zohoRecruit", void 0);
1407
+ /**
714
1408
  * Optional factory-level overrides applied when creating the underlying Recruit client.
715
- */
716
- factoryConfig;
717
- /**
1409
+ */ _define_property$3(this, "factoryConfig", void 0);
1410
+ }
1411
+ _create_class$3(ZohoRecruitServiceConfig, null, [
1412
+ {
1413
+ key: "assertValidConfig",
1414
+ value: /**
718
1415
  * Validates that the required Zoho Recruit connection fields are present and well-formed.
719
- */
720
- static assertValidConfig(config) {
721
- assertValidZohoConfig(config.zohoRecruit);
1416
+ */ function assertValidConfig(config) {
1417
+ assertValidZohoConfig(config.zohoRecruit);
1418
+ }
1419
+ }
1420
+ ]);
1421
+ return ZohoRecruitServiceConfig;
1422
+ }
1423
+ ();
1424
+
1425
+ function _class_call_check$2(instance, Constructor) {
1426
+ if (!(instance instanceof Constructor)) {
1427
+ throw new TypeError("Cannot call a class as a function");
722
1428
  }
723
1429
  }
724
-
1430
+ function _defineProperties$2(target, props) {
1431
+ for(var i = 0; i < props.length; i++){
1432
+ var descriptor = props[i];
1433
+ descriptor.enumerable = descriptor.enumerable || false;
1434
+ descriptor.configurable = true;
1435
+ if ("value" in descriptor) descriptor.writable = true;
1436
+ Object.defineProperty(target, descriptor.key, descriptor);
1437
+ }
1438
+ }
1439
+ function _create_class$2(Constructor, protoProps, staticProps) {
1440
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
1441
+ return Constructor;
1442
+ }
1443
+ function _define_property$2(obj, key, value) {
1444
+ if (key in obj) {
1445
+ Object.defineProperty(obj, key, {
1446
+ value: value,
1447
+ enumerable: true,
1448
+ configurable: true,
1449
+ writable: true
1450
+ });
1451
+ } else {
1452
+ obj[key] = value;
1453
+ }
1454
+ return obj;
1455
+ }
1456
+ function _object_spread$1(target) {
1457
+ for(var i = 1; i < arguments.length; i++){
1458
+ var source = arguments[i] != null ? arguments[i] : {};
1459
+ var ownKeys = Object.keys(source);
1460
+ if (typeof Object.getOwnPropertySymbols === "function") {
1461
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1462
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1463
+ }));
1464
+ }
1465
+ ownKeys.forEach(function(key) {
1466
+ _define_property$2(target, key, source[key]);
1467
+ });
1468
+ }
1469
+ return target;
1470
+ }
1471
+ function ownKeys$1(object, enumerableOnly) {
1472
+ var keys = Object.keys(object);
1473
+ if (Object.getOwnPropertySymbols) {
1474
+ var symbols = Object.getOwnPropertySymbols(object);
1475
+ keys.push.apply(keys, symbols);
1476
+ }
1477
+ return keys;
1478
+ }
1479
+ function _object_spread_props$1(target, source) {
1480
+ source = source != null ? source : {};
1481
+ if (Object.getOwnPropertyDescriptors) {
1482
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1483
+ } else {
1484
+ ownKeys$1(Object(source)).forEach(function(key) {
1485
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1486
+ });
1487
+ }
1488
+ return target;
1489
+ }
725
1490
  /**
726
1491
  * NestJS injectable service that wraps the Zoho Recruit API.
727
1492
  *
728
1493
  * Provides convenient accessor getters for all Recruit operations, each bound
729
1494
  * to the authenticated Recruit context created during construction.
730
- */
731
- exports.ZohoRecruitApi = class ZohoRecruitApi {
732
- config;
733
- zohoAccountsApi;
734
- /**
1495
+ */ exports.ZohoRecruitApi = /*#__PURE__*/ function() {
1496
+ function ZohoRecruitApi(config, zohoAccountsApi) {
1497
+ _class_call_check$2(this, ZohoRecruitApi);
1498
+ _define_property$2(this, "config", void 0);
1499
+ _define_property$2(this, "zohoAccountsApi", void 0);
1500
+ /**
735
1501
  * Underlying Zoho Recruit client instance, initialized from the injected config and accounts context.
736
- */
737
- zohoRecruit;
738
- /**
739
- * The authenticated Recruit context used by all operation accessors.
740
- */
741
- get recruitContext() {
742
- return this.zohoRecruit.recruitContext;
743
- }
744
- /**
745
- * Rate limiter shared across all Recruit requests to respect Zoho API quotas.
746
- */
747
- get zohoRateLimiter() {
748
- return this.zohoRecruit.recruitContext.zohoRateLimiter;
749
- }
750
- /**
751
- * Initializes the Recruit client by combining the service config with the
752
- * accounts context for OAuth token management.
753
- */
754
- constructor(config, zohoAccountsApi) {
1502
+ */ _define_property$2(this, "zohoRecruit", void 0);
755
1503
  this.config = config;
756
1504
  this.zohoAccountsApi = zohoAccountsApi;
757
- this.zohoRecruit = zoho.zohoRecruitFactory({
758
- ...config.factoryConfig,
1505
+ this.zohoRecruit = zoho.zohoRecruitFactory(_object_spread_props$1(_object_spread$1({}, config.factoryConfig), {
759
1506
  accountsContext: zohoAccountsApi.accountsContext
760
- })(config.zohoRecruit);
761
- }
762
- // MARK: Accessors
763
- /** Configured pass-through for {@link zohoRecruitInsertRecord}. */
764
- get insertRecord() {
765
- return zoho.zohoRecruitInsertRecord(this.recruitContext);
766
- }
767
- /** Configured pass-through for {@link zohoRecruitUpsertRecord}. */
768
- get upsertRecord() {
769
- return zoho.zohoRecruitUpsertRecord(this.recruitContext);
770
- }
771
- /** Configured pass-through for {@link zohoRecruitUpdateRecord}. */
772
- get updateRecord() {
773
- return zoho.zohoRecruitUpdateRecord(this.recruitContext);
774
- }
775
- /** Configured pass-through for {@link zohoRecruitDeleteRecord}. */
776
- get deleteRecord() {
777
- return zoho.zohoRecruitDeleteRecord(this.recruitContext);
778
- }
779
- /** Configured pass-through for {@link zohoRecruitGetRecordById}. */
780
- get getRecordById() {
781
- return zoho.zohoRecruitGetRecordById(this.recruitContext);
782
- }
783
- /** Configured pass-through for {@link zohoRecruitGetRecords}. */
784
- get getRecords() {
785
- return zoho.zohoRecruitGetRecords(this.recruitContext);
786
- }
787
- /** Configured pass-through for {@link zohoRecruitSearchRecords}. */
788
- get searchRecords() {
789
- return zoho.zohoRecruitSearchRecords(this.recruitContext);
790
- }
791
- /** Configured pass-through for {@link zohoRecruitSearchRecordsPageFactory}. */
792
- get searchRecordsPageFactory() {
793
- return zoho.zohoRecruitSearchRecordsPageFactory(this.recruitContext);
794
- }
795
- /** Configured pass-through for {@link zohoRecruitGetRelatedRecordsFunctionFactory}. */
796
- get getRelatedRecordsFunctionFactory() {
797
- return zoho.zohoRecruitGetRelatedRecordsFunctionFactory(this.recruitContext);
798
- }
799
- /** Configured pass-through for {@link zohoRecruitGetEmailsForRecord}. */
800
- get getEmailsForRecord() {
801
- return zoho.zohoRecruitGetEmailsForRecord(this.recruitContext);
802
- }
803
- /** Configured pass-through for {@link zohoRecruitGetEmailsForRecordPageFactory}. */
804
- get getEmailsForRecordPageFactory() {
805
- return zoho.zohoRecruitGetEmailsForRecordPageFactory(this.recruitContext);
806
- }
807
- /** Configured pass-through for {@link zohoRecruitGetAttachmentsForRecord}. */
808
- get getAttachmentsForRecord() {
809
- return zoho.zohoRecruitGetAttachmentsForRecord(this.recruitContext);
810
- }
811
- /** Configured pass-through for {@link zohoRecruitGetAttachmentsForRecordPageFactory}. */
812
- get getAttachmentsForRecordPageFactory() {
813
- return zoho.zohoRecruitGetAttachmentsForRecordPageFactory(this.recruitContext);
814
- }
815
- /** Configured pass-through for {@link zohoRecruitUploadAttachmentForRecord}. */
816
- get uploadAttachmentForRecord() {
817
- return zoho.zohoRecruitUploadAttachmentForRecord(this.recruitContext);
818
- }
819
- /** Configured pass-through for {@link zohoRecruitDownloadAttachmentForRecord}. */
820
- get downloadAttachmentForRecord() {
821
- return zoho.zohoRecruitDownloadAttachmentForRecord(this.recruitContext);
822
- }
823
- /** Configured pass-through for {@link zohoRecruitDeleteAttachmentFromRecord}. */
824
- get deleteAttachmentFromRecord() {
825
- return zoho.zohoRecruitDeleteAttachmentFromRecord(this.recruitContext);
826
- }
827
- /** Configured pass-through for {@link zohoRecruitCreateNotes}. */
828
- get createNotes() {
829
- return zoho.zohoRecruitCreateNotes(this.recruitContext);
1507
+ }))(config.zohoRecruit);
830
1508
  }
831
- /** Configured pass-through for {@link zohoRecruitDeleteNotes}. */
832
- get deleteNotes() {
833
- return zoho.zohoRecruitDeleteNotes(this.recruitContext);
834
- }
835
- /** Configured pass-through for {@link zohoRecruitCreateNotesForRecord}. */
836
- get createNotesForRecord() {
837
- return zoho.zohoRecruitCreateNotesForRecord(this.recruitContext);
838
- }
839
- /** Configured pass-through for {@link zohoRecruitGetNotesForRecord}. */
840
- get getNotesForRecord() {
841
- return zoho.zohoRecruitGetNotesForRecord(this.recruitContext);
842
- }
843
- /** Configured pass-through for {@link zohoRecruitGetNotesForRecordPageFactory}. */
844
- get getNotesForRecordPageFactory() {
845
- return zoho.zohoRecruitGetNotesForRecordPageFactory(this.recruitContext);
846
- }
847
- /** Configured pass-through for {@link zohoRecruitExecuteRestApiFunction}. */
848
- get executeRestApiFunction() {
849
- return zoho.zohoRecruitExecuteRestApiFunction(this.recruitContext);
850
- }
851
- /** Configured pass-through for {@link zohoRecruitAssociateCandidateRecordsWithJobOpenings}. */
852
- get associateCandidateRecordsWithJobOpenings() {
853
- return zoho.zohoRecruitAssociateCandidateRecordsWithJobOpenings(this.recruitContext);
854
- }
855
- /** Configured pass-through for {@link zohoRecruitSearchCandidateAssociatedJobOpeningRecords}. */
856
- get searchCandidateAssociatedJobOpeningRecords() {
857
- return zoho.zohoRecruitSearchCandidateAssociatedJobOpeningRecords(this.recruitContext);
858
- }
859
- /** Configured pass-through for {@link zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory}. */
860
- get searchCandidateAssociatedJobOpeningRecordsPageFactory() {
861
- return zoho.zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory(this.recruitContext);
862
- }
863
- /** Configured pass-through for {@link zohoRecruitSearchJobOpeningAssociatedCandidateRecords}. */
864
- get searchJobOpeningAssociatedCandidateRecords() {
865
- return zoho.zohoRecruitSearchJobOpeningAssociatedCandidateRecords(this.recruitContext);
866
- }
867
- /** Configured pass-through for {@link zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory}. */
868
- get searchJobOpeningAssociatedCandidateRecordsPageFactory() {
869
- return zoho.zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory(this.recruitContext);
870
- }
871
- /** Configured pass-through for {@link zohoRecruitCreateTagsForModule}. */
872
- get createTagsForModule() {
873
- return zoho.zohoRecruitCreateTagsForModule(this.recruitContext);
874
- }
875
- /** Configured pass-through for {@link zohoRecruitGetTagsForModule}. */
876
- get getTagsForModule() {
877
- return zoho.zohoRecruitGetTagsForModule(this.recruitContext);
878
- }
879
- /** Configured pass-through for {@link zohoRecruitAddTagsToRecords}. */
880
- get addTagsToRecords() {
881
- return zoho.zohoRecruitAddTagsToRecords(this.recruitContext);
882
- }
883
- /** Configured pass-through for {@link zohoRecruitRemoveTagsFromRecords}. */
884
- get removeTagsFromRecords() {
885
- return zoho.zohoRecruitRemoveTagsFromRecords(this.recruitContext);
886
- }
887
- };
1509
+ _create_class$2(ZohoRecruitApi, [
1510
+ {
1511
+ key: "recruitContext",
1512
+ get: /**
1513
+ * The authenticated Recruit context used by all operation accessors.
1514
+ */ function get() {
1515
+ return this.zohoRecruit.recruitContext;
1516
+ }
1517
+ },
1518
+ {
1519
+ key: "zohoRateLimiter",
1520
+ get: /**
1521
+ * Rate limiter shared across all Recruit requests to respect Zoho API quotas.
1522
+ */ function get() {
1523
+ return this.zohoRecruit.recruitContext.zohoRateLimiter;
1524
+ }
1525
+ },
1526
+ {
1527
+ key: "insertRecord",
1528
+ get: // MARK: Accessors
1529
+ /** Configured pass-through for {@link zohoRecruitInsertRecord}. */ function get() {
1530
+ return zoho.zohoRecruitInsertRecord(this.recruitContext);
1531
+ }
1532
+ },
1533
+ {
1534
+ key: "upsertRecord",
1535
+ get: /** Configured pass-through for {@link zohoRecruitUpsertRecord}. */ function get() {
1536
+ return zoho.zohoRecruitUpsertRecord(this.recruitContext);
1537
+ }
1538
+ },
1539
+ {
1540
+ key: "updateRecord",
1541
+ get: /** Configured pass-through for {@link zohoRecruitUpdateRecord}. */ function get() {
1542
+ return zoho.zohoRecruitUpdateRecord(this.recruitContext);
1543
+ }
1544
+ },
1545
+ {
1546
+ key: "deleteRecord",
1547
+ get: /** Configured pass-through for {@link zohoRecruitDeleteRecord}. */ function get() {
1548
+ return zoho.zohoRecruitDeleteRecord(this.recruitContext);
1549
+ }
1550
+ },
1551
+ {
1552
+ key: "getRecordById",
1553
+ get: /** Configured pass-through for {@link zohoRecruitGetRecordById}. */ function get() {
1554
+ return zoho.zohoRecruitGetRecordById(this.recruitContext);
1555
+ }
1556
+ },
1557
+ {
1558
+ key: "getRecords",
1559
+ get: /** Configured pass-through for {@link zohoRecruitGetRecords}. */ function get() {
1560
+ return zoho.zohoRecruitGetRecords(this.recruitContext);
1561
+ }
1562
+ },
1563
+ {
1564
+ key: "searchRecords",
1565
+ get: /** Configured pass-through for {@link zohoRecruitSearchRecords}. */ function get() {
1566
+ return zoho.zohoRecruitSearchRecords(this.recruitContext);
1567
+ }
1568
+ },
1569
+ {
1570
+ key: "searchRecordsPageFactory",
1571
+ get: /** Configured pass-through for {@link zohoRecruitSearchRecordsPageFactory}. */ function get() {
1572
+ return zoho.zohoRecruitSearchRecordsPageFactory(this.recruitContext);
1573
+ }
1574
+ },
1575
+ {
1576
+ key: "getRelatedRecordsFunctionFactory",
1577
+ get: /** Configured pass-through for {@link zohoRecruitGetRelatedRecordsFunctionFactory}. */ function get() {
1578
+ return zoho.zohoRecruitGetRelatedRecordsFunctionFactory(this.recruitContext);
1579
+ }
1580
+ },
1581
+ {
1582
+ key: "getEmailsForRecord",
1583
+ get: /** Configured pass-through for {@link zohoRecruitGetEmailsForRecord}. */ function get() {
1584
+ return zoho.zohoRecruitGetEmailsForRecord(this.recruitContext);
1585
+ }
1586
+ },
1587
+ {
1588
+ key: "getEmailsForRecordPageFactory",
1589
+ get: /** Configured pass-through for {@link zohoRecruitGetEmailsForRecordPageFactory}. */ function get() {
1590
+ return zoho.zohoRecruitGetEmailsForRecordPageFactory(this.recruitContext);
1591
+ }
1592
+ },
1593
+ {
1594
+ key: "getAttachmentsForRecord",
1595
+ get: /** Configured pass-through for {@link zohoRecruitGetAttachmentsForRecord}. */ function get() {
1596
+ return zoho.zohoRecruitGetAttachmentsForRecord(this.recruitContext);
1597
+ }
1598
+ },
1599
+ {
1600
+ key: "getAttachmentsForRecordPageFactory",
1601
+ get: /** Configured pass-through for {@link zohoRecruitGetAttachmentsForRecordPageFactory}. */ function get() {
1602
+ return zoho.zohoRecruitGetAttachmentsForRecordPageFactory(this.recruitContext);
1603
+ }
1604
+ },
1605
+ {
1606
+ key: "uploadAttachmentForRecord",
1607
+ get: /** Configured pass-through for {@link zohoRecruitUploadAttachmentForRecord}. */ function get() {
1608
+ return zoho.zohoRecruitUploadAttachmentForRecord(this.recruitContext);
1609
+ }
1610
+ },
1611
+ {
1612
+ key: "downloadAttachmentForRecord",
1613
+ get: /** Configured pass-through for {@link zohoRecruitDownloadAttachmentForRecord}. */ function get() {
1614
+ return zoho.zohoRecruitDownloadAttachmentForRecord(this.recruitContext);
1615
+ }
1616
+ },
1617
+ {
1618
+ key: "deleteAttachmentFromRecord",
1619
+ get: /** Configured pass-through for {@link zohoRecruitDeleteAttachmentFromRecord}. */ function get() {
1620
+ return zoho.zohoRecruitDeleteAttachmentFromRecord(this.recruitContext);
1621
+ }
1622
+ },
1623
+ {
1624
+ key: "createNotes",
1625
+ get: /** Configured pass-through for {@link zohoRecruitCreateNotes}. */ function get() {
1626
+ return zoho.zohoRecruitCreateNotes(this.recruitContext);
1627
+ }
1628
+ },
1629
+ {
1630
+ key: "deleteNotes",
1631
+ get: /** Configured pass-through for {@link zohoRecruitDeleteNotes}. */ function get() {
1632
+ return zoho.zohoRecruitDeleteNotes(this.recruitContext);
1633
+ }
1634
+ },
1635
+ {
1636
+ key: "createNotesForRecord",
1637
+ get: /** Configured pass-through for {@link zohoRecruitCreateNotesForRecord}. */ function get() {
1638
+ return zoho.zohoRecruitCreateNotesForRecord(this.recruitContext);
1639
+ }
1640
+ },
1641
+ {
1642
+ key: "getNotesForRecord",
1643
+ get: /** Configured pass-through for {@link zohoRecruitGetNotesForRecord}. */ function get() {
1644
+ return zoho.zohoRecruitGetNotesForRecord(this.recruitContext);
1645
+ }
1646
+ },
1647
+ {
1648
+ key: "getNotesForRecordPageFactory",
1649
+ get: /** Configured pass-through for {@link zohoRecruitGetNotesForRecordPageFactory}. */ function get() {
1650
+ return zoho.zohoRecruitGetNotesForRecordPageFactory(this.recruitContext);
1651
+ }
1652
+ },
1653
+ {
1654
+ key: "executeRestApiFunction",
1655
+ get: /** Configured pass-through for {@link zohoRecruitExecuteRestApiFunction}. */ function get() {
1656
+ return zoho.zohoRecruitExecuteRestApiFunction(this.recruitContext);
1657
+ }
1658
+ },
1659
+ {
1660
+ key: "associateCandidateRecordsWithJobOpenings",
1661
+ get: /** Configured pass-through for {@link zohoRecruitAssociateCandidateRecordsWithJobOpenings}. */ function get() {
1662
+ return zoho.zohoRecruitAssociateCandidateRecordsWithJobOpenings(this.recruitContext);
1663
+ }
1664
+ },
1665
+ {
1666
+ key: "searchCandidateAssociatedJobOpeningRecords",
1667
+ get: /** Configured pass-through for {@link zohoRecruitSearchCandidateAssociatedJobOpeningRecords}. */ function get() {
1668
+ return zoho.zohoRecruitSearchCandidateAssociatedJobOpeningRecords(this.recruitContext);
1669
+ }
1670
+ },
1671
+ {
1672
+ key: "searchCandidateAssociatedJobOpeningRecordsPageFactory",
1673
+ get: /** Configured pass-through for {@link zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory}. */ function get() {
1674
+ return zoho.zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory(this.recruitContext);
1675
+ }
1676
+ },
1677
+ {
1678
+ key: "searchJobOpeningAssociatedCandidateRecords",
1679
+ get: /** Configured pass-through for {@link zohoRecruitSearchJobOpeningAssociatedCandidateRecords}. */ function get() {
1680
+ return zoho.zohoRecruitSearchJobOpeningAssociatedCandidateRecords(this.recruitContext);
1681
+ }
1682
+ },
1683
+ {
1684
+ key: "searchJobOpeningAssociatedCandidateRecordsPageFactory",
1685
+ get: /** Configured pass-through for {@link zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory}. */ function get() {
1686
+ return zoho.zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory(this.recruitContext);
1687
+ }
1688
+ },
1689
+ {
1690
+ key: "createTagsForModule",
1691
+ get: /** Configured pass-through for {@link zohoRecruitCreateTagsForModule}. */ function get() {
1692
+ return zoho.zohoRecruitCreateTagsForModule(this.recruitContext);
1693
+ }
1694
+ },
1695
+ {
1696
+ key: "getTagsForModule",
1697
+ get: /** Configured pass-through for {@link zohoRecruitGetTagsForModule}. */ function get() {
1698
+ return zoho.zohoRecruitGetTagsForModule(this.recruitContext);
1699
+ }
1700
+ },
1701
+ {
1702
+ key: "addTagsToRecords",
1703
+ get: /** Configured pass-through for {@link zohoRecruitAddTagsToRecords}. */ function get() {
1704
+ return zoho.zohoRecruitAddTagsToRecords(this.recruitContext);
1705
+ }
1706
+ },
1707
+ {
1708
+ key: "removeTagsFromRecords",
1709
+ get: /** Configured pass-through for {@link zohoRecruitRemoveTagsFromRecords}. */ function get() {
1710
+ return zoho.zohoRecruitRemoveTagsFromRecords(this.recruitContext);
1711
+ }
1712
+ }
1713
+ ]);
1714
+ return ZohoRecruitApi;
1715
+ }();
888
1716
  exports.ZohoRecruitApi = __decorate([
889
1717
  common.Injectable(),
890
1718
  __param(0, common.Inject(ZohoRecruitServiceConfig)),
891
1719
  __param(1, common.Inject(exports.ZohoAccountsApi))
892
1720
  ], exports.ZohoRecruitApi);
893
1721
 
1722
+ function _array_like_to_array$1(arr, len) {
1723
+ if (len == null || len > arr.length) len = arr.length;
1724
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1725
+ return arr2;
1726
+ }
1727
+ function _array_without_holes$1(arr) {
1728
+ if (Array.isArray(arr)) return _array_like_to_array$1(arr);
1729
+ }
1730
+ function _iterable_to_array$1(iter) {
1731
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1732
+ }
1733
+ function _non_iterable_spread$1() {
1734
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1735
+ }
1736
+ function _to_consumable_array$1(arr) {
1737
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
1738
+ }
1739
+ function _unsupported_iterable_to_array$1(o, minLen) {
1740
+ if (!o) return;
1741
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
1742
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1743
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1744
+ if (n === "Map" || n === "Set") return Array.from(n);
1745
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
1746
+ }
894
1747
  // MARK: Provider Factories
895
1748
  /**
896
1749
  * Reads Zoho Recruit connection settings from the NestJS ConfigService
@@ -911,10 +1764,9 @@ exports.ZohoRecruitApi = __decorate([
911
1764
  * useFactory: zohoRecruitServiceConfigFactory
912
1765
  * }
913
1766
  * ```
914
- */
915
- function zohoRecruitServiceConfigFactory(configService) {
916
- const getFromConfigService = zohoConfigServiceReaderFunction(zoho.ZOHO_RECRUIT_SERVICE_NAME, configService);
917
- const config = {
1767
+ */ function zohoRecruitServiceConfigFactory(configService) {
1768
+ var getFromConfigService = zohoConfigServiceReaderFunction(zoho.ZOHO_RECRUIT_SERVICE_NAME, configService);
1769
+ var config = {
918
1770
  zohoRecruit: {
919
1771
  apiUrl: getFromConfigService(ZOHO_API_URL_CONFIG_KEY)
920
1772
  }
@@ -937,10 +1789,9 @@ function zohoRecruitServiceConfigFactory(configService) {
937
1789
  * useFactory: zohoRecruitAccountServiceConfigFactory
938
1790
  * }
939
1791
  * ```
940
- */
941
- function zohoRecruitAccountServiceConfigFactory(configService) {
1792
+ */ function zohoRecruitAccountServiceConfigFactory(configService) {
942
1793
  return zohoAccountsServiceConfigFromConfigService({
943
- configService,
1794
+ configService: configService,
944
1795
  serviceAccessTokenKey: zoho.ZOHO_RECRUIT_SERVICE_NAME
945
1796
  });
946
1797
  }
@@ -979,136 +1830,299 @@ function zohoRecruitAccountServiceConfigFactory(configService) {
979
1830
  * @Module(appZohoRecruitModuleMetadata({ dependencyModule: ZohoRecruitDependencyModule }))
980
1831
  * export class AppZohoRecruitModule {}
981
1832
  * ```
982
- */
983
- function appZohoRecruitModuleMetadata(config$1) {
984
- const { dependencyModule, imports, exports: exports$1, providers } = config$1;
985
- const dependencyModuleImport = dependencyModule ? [dependencyModule] : [];
1833
+ */ function appZohoRecruitModuleMetadata(config$1) {
1834
+ var dependencyModule = config$1.dependencyModule, imports = config$1.imports, exports$1 = config$1.exports, providers = config$1.providers;
1835
+ var dependencyModuleImport = dependencyModule ? [
1836
+ dependencyModule
1837
+ ] : [];
986
1838
  return {
987
- imports: [config.ConfigModule, ...dependencyModuleImport, ...(imports ?? [])],
988
- exports: [exports.ZohoRecruitApi, ...(exports$1 ?? [])],
1839
+ imports: [
1840
+ config.ConfigModule
1841
+ ].concat(_to_consumable_array$1(dependencyModuleImport), _to_consumable_array$1(imports !== null && imports !== void 0 ? imports : [])),
1842
+ exports: [
1843
+ exports.ZohoRecruitApi
1844
+ ].concat(_to_consumable_array$1(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
989
1845
  providers: [
990
1846
  {
991
1847
  provide: ZohoRecruitServiceConfig,
992
- inject: [config.ConfigService],
1848
+ inject: [
1849
+ config.ConfigService
1850
+ ],
993
1851
  useFactory: zohoRecruitServiceConfigFactory
994
1852
  },
995
1853
  exports.ZohoRecruitApi,
996
1854
  // Accounts
997
1855
  {
998
1856
  provide: ZohoAccountsServiceConfig,
999
- inject: [config.ConfigService],
1857
+ inject: [
1858
+ config.ConfigService
1859
+ ],
1000
1860
  useFactory: zohoRecruitAccountServiceConfigFactory
1001
1861
  },
1002
- exports.ZohoAccountsApi,
1003
- ...(providers ?? [])
1004
- ]
1862
+ exports.ZohoAccountsApi
1863
+ ].concat(_to_consumable_array$1(providers !== null && providers !== void 0 ? providers : []))
1005
1864
  };
1006
1865
  }
1007
1866
 
1867
+ function _class_call_check$1(instance, Constructor) {
1868
+ if (!(instance instanceof Constructor)) {
1869
+ throw new TypeError("Cannot call a class as a function");
1870
+ }
1871
+ }
1872
+ function _defineProperties$1(target, props) {
1873
+ for(var i = 0; i < props.length; i++){
1874
+ var descriptor = props[i];
1875
+ descriptor.enumerable = descriptor.enumerable || false;
1876
+ descriptor.configurable = true;
1877
+ if ("value" in descriptor) descriptor.writable = true;
1878
+ Object.defineProperty(target, descriptor.key, descriptor);
1879
+ }
1880
+ }
1881
+ function _create_class$1(Constructor, protoProps, staticProps) {
1882
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
1883
+ return Constructor;
1884
+ }
1885
+ function _define_property$1(obj, key, value) {
1886
+ if (key in obj) {
1887
+ Object.defineProperty(obj, key, {
1888
+ value: value,
1889
+ enumerable: true,
1890
+ configurable: true,
1891
+ writable: true
1892
+ });
1893
+ } else {
1894
+ obj[key] = value;
1895
+ }
1896
+ return obj;
1897
+ }
1008
1898
  /**
1009
1899
  * Configuration for ZohoSignService
1010
- */
1011
- class ZohoSignServiceConfig {
1012
- zohoSign;
1013
- factoryConfig;
1014
- static assertValidConfig(config) {
1015
- assertValidZohoConfig(config.zohoSign);
1900
+ */ var ZohoSignServiceConfig = /*#__PURE__*/ function() {
1901
+ function ZohoSignServiceConfig() {
1902
+ _class_call_check$1(this, ZohoSignServiceConfig);
1903
+ _define_property$1(this, "zohoSign", void 0);
1904
+ _define_property$1(this, "factoryConfig", void 0);
1905
+ }
1906
+ _create_class$1(ZohoSignServiceConfig, null, [
1907
+ {
1908
+ key: "assertValidConfig",
1909
+ value: function assertValidConfig(config) {
1910
+ assertValidZohoConfig(config.zohoSign);
1911
+ }
1912
+ }
1913
+ ]);
1914
+ return ZohoSignServiceConfig;
1915
+ }
1916
+ ();
1917
+
1918
+ function _class_call_check(instance, Constructor) {
1919
+ if (!(instance instanceof Constructor)) {
1920
+ throw new TypeError("Cannot call a class as a function");
1016
1921
  }
1017
1922
  }
1018
-
1923
+ function _defineProperties(target, props) {
1924
+ for(var i = 0; i < props.length; i++){
1925
+ var descriptor = props[i];
1926
+ descriptor.enumerable = descriptor.enumerable || false;
1927
+ descriptor.configurable = true;
1928
+ if ("value" in descriptor) descriptor.writable = true;
1929
+ Object.defineProperty(target, descriptor.key, descriptor);
1930
+ }
1931
+ }
1932
+ function _create_class(Constructor, protoProps, staticProps) {
1933
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1934
+ return Constructor;
1935
+ }
1936
+ function _define_property(obj, key, value) {
1937
+ if (key in obj) {
1938
+ Object.defineProperty(obj, key, {
1939
+ value: value,
1940
+ enumerable: true,
1941
+ configurable: true,
1942
+ writable: true
1943
+ });
1944
+ } else {
1945
+ obj[key] = value;
1946
+ }
1947
+ return obj;
1948
+ }
1949
+ function _object_spread(target) {
1950
+ for(var i = 1; i < arguments.length; i++){
1951
+ var source = arguments[i] != null ? arguments[i] : {};
1952
+ var ownKeys = Object.keys(source);
1953
+ if (typeof Object.getOwnPropertySymbols === "function") {
1954
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1955
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1956
+ }));
1957
+ }
1958
+ ownKeys.forEach(function(key) {
1959
+ _define_property(target, key, source[key]);
1960
+ });
1961
+ }
1962
+ return target;
1963
+ }
1964
+ function ownKeys(object, enumerableOnly) {
1965
+ var keys = Object.keys(object);
1966
+ if (Object.getOwnPropertySymbols) {
1967
+ var symbols = Object.getOwnPropertySymbols(object);
1968
+ keys.push.apply(keys, symbols);
1969
+ }
1970
+ return keys;
1971
+ }
1972
+ function _object_spread_props(target, source) {
1973
+ source = source != null ? source : {};
1974
+ if (Object.getOwnPropertyDescriptors) {
1975
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1976
+ } else {
1977
+ ownKeys(Object(source)).forEach(function(key) {
1978
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1979
+ });
1980
+ }
1981
+ return target;
1982
+ }
1019
1983
  /**
1020
1984
  * NestJS injectable service that wraps the Zoho Sign API.
1021
1985
  *
1022
1986
  * Provides convenient accessor getters for all Sign operations, each bound
1023
1987
  * to the authenticated Sign context created during construction.
1024
- */
1025
- exports.ZohoSignApi = class ZohoSignApi {
1026
- config;
1027
- zohoAccountsApi;
1028
- /**
1988
+ */ exports.ZohoSignApi = /*#__PURE__*/ function() {
1989
+ function ZohoSignApi(config, zohoAccountsApi) {
1990
+ _class_call_check(this, ZohoSignApi);
1991
+ _define_property(this, "config", void 0);
1992
+ _define_property(this, "zohoAccountsApi", void 0);
1993
+ /**
1029
1994
  * Underlying Zoho Sign client instance, initialized from the injected config and accounts context.
1030
- */
1031
- zohoSign;
1032
- /**
1033
- * The authenticated Sign context used by all operation accessors.
1034
- */
1035
- get signContext() {
1036
- return this.zohoSign.signContext;
1037
- }
1038
- /**
1039
- * Rate limiter shared across all Sign requests to respect Zoho API quotas.
1040
- */
1041
- get zohoRateLimiter() {
1042
- return this.zohoSign.signContext.zohoRateLimiter;
1043
- }
1044
- /**
1045
- * Initializes the Sign client by combining the service config with the
1046
- * accounts context for OAuth token management.
1047
- */
1048
- constructor(config, zohoAccountsApi) {
1995
+ */ _define_property(this, "zohoSign", void 0);
1049
1996
  this.config = config;
1050
1997
  this.zohoAccountsApi = zohoAccountsApi;
1051
- this.zohoSign = zoho.zohoSignFactory({
1052
- ...config.factoryConfig,
1998
+ this.zohoSign = zoho.zohoSignFactory(_object_spread_props(_object_spread({}, config.factoryConfig), {
1053
1999
  accountsContext: zohoAccountsApi.accountsContext
1054
- })(config.zohoSign);
1055
- }
1056
- // MARK: Accessors
1057
- /** Configured pass-through for {@link zohoSignGetDocument}. */
1058
- get getDocument() {
1059
- return zoho.zohoSignGetDocument(this.signContext);
1060
- }
1061
- /** Configured pass-through for {@link zohoSignGetDocuments}. */
1062
- get getDocuments() {
1063
- return zoho.zohoSignGetDocuments(this.signContext);
1064
- }
1065
- /** Configured pass-through for {@link zohoSignGetDocumentsPageFactory}. */
1066
- get getDocumentsPageFactory() {
1067
- return zoho.zohoSignGetDocumentsPageFactory(this.signContext);
1068
- }
1069
- /** Configured pass-through for {@link zohoSignGetDocumentFormData}. */
1070
- get getDocumentFormData() {
1071
- return zoho.zohoSignGetDocumentFormData(this.signContext);
1072
- }
1073
- /** Configured pass-through for {@link zohoSignRetrieveFieldTypes}. */
1074
- get retrieveFieldTypes() {
1075
- return zoho.zohoSignRetrieveFieldTypes(this.signContext);
1076
- }
1077
- /** Configured pass-through for {@link zohoSignDownloadPdf}. */
1078
- get downloadPdf() {
1079
- return zoho.zohoSignDownloadPdf(this.signContext);
1080
- }
1081
- /** Configured pass-through for {@link zohoSignDownloadCompletionCertificate}. */
1082
- get downloadCompletionCertificate() {
1083
- return zoho.zohoSignDownloadCompletionCertificate(this.signContext);
1084
- }
1085
- /** Configured pass-through for {@link zohoSignCreateDocument}. */
1086
- get createDocument() {
1087
- return zoho.zohoSignCreateDocument(this.signContext);
1088
- }
1089
- /** Configured pass-through for {@link zohoSignUpdateDocument}. */
1090
- get updateDocument() {
1091
- return zoho.zohoSignUpdateDocument(this.signContext);
1092
- }
1093
- /** Configured pass-through for {@link zohoSignSendDocumentForSignature}. */
1094
- get sendDocumentForSignature() {
1095
- return zoho.zohoSignSendDocumentForSignature(this.signContext);
1096
- }
1097
- /** Configured pass-through for {@link zohoSignExtendDocument}. */
1098
- get extendDocument() {
1099
- return zoho.zohoSignExtendDocument(this.signContext);
1100
- }
1101
- /** Configured pass-through for {@link zohoSignDeleteDocument}. */
1102
- get deleteDocument() {
1103
- return zoho.zohoSignDeleteDocument(this.signContext);
2000
+ }))(config.zohoSign);
1104
2001
  }
1105
- };
2002
+ _create_class(ZohoSignApi, [
2003
+ {
2004
+ key: "signContext",
2005
+ get: /**
2006
+ * The authenticated Sign context used by all operation accessors.
2007
+ */ function get() {
2008
+ return this.zohoSign.signContext;
2009
+ }
2010
+ },
2011
+ {
2012
+ key: "zohoRateLimiter",
2013
+ get: /**
2014
+ * Rate limiter shared across all Sign requests to respect Zoho API quotas.
2015
+ */ function get() {
2016
+ return this.zohoSign.signContext.zohoRateLimiter;
2017
+ }
2018
+ },
2019
+ {
2020
+ key: "getDocument",
2021
+ get: // MARK: Accessors
2022
+ /** Configured pass-through for {@link zohoSignGetDocument}. */ function get() {
2023
+ return zoho.zohoSignGetDocument(this.signContext);
2024
+ }
2025
+ },
2026
+ {
2027
+ key: "getDocuments",
2028
+ get: /** Configured pass-through for {@link zohoSignGetDocuments}. */ function get() {
2029
+ return zoho.zohoSignGetDocuments(this.signContext);
2030
+ }
2031
+ },
2032
+ {
2033
+ key: "getDocumentsPageFactory",
2034
+ get: /** Configured pass-through for {@link zohoSignGetDocumentsPageFactory}. */ function get() {
2035
+ return zoho.zohoSignGetDocumentsPageFactory(this.signContext);
2036
+ }
2037
+ },
2038
+ {
2039
+ key: "getDocumentFormData",
2040
+ get: /** Configured pass-through for {@link zohoSignGetDocumentFormData}. */ function get() {
2041
+ return zoho.zohoSignGetDocumentFormData(this.signContext);
2042
+ }
2043
+ },
2044
+ {
2045
+ key: "retrieveFieldTypes",
2046
+ get: /** Configured pass-through for {@link zohoSignRetrieveFieldTypes}. */ function get() {
2047
+ return zoho.zohoSignRetrieveFieldTypes(this.signContext);
2048
+ }
2049
+ },
2050
+ {
2051
+ key: "downloadPdf",
2052
+ get: /** Configured pass-through for {@link zohoSignDownloadPdf}. */ function get() {
2053
+ return zoho.zohoSignDownloadPdf(this.signContext);
2054
+ }
2055
+ },
2056
+ {
2057
+ key: "downloadCompletionCertificate",
2058
+ get: /** Configured pass-through for {@link zohoSignDownloadCompletionCertificate}. */ function get() {
2059
+ return zoho.zohoSignDownloadCompletionCertificate(this.signContext);
2060
+ }
2061
+ },
2062
+ {
2063
+ key: "createDocument",
2064
+ get: /** Configured pass-through for {@link zohoSignCreateDocument}. */ function get() {
2065
+ return zoho.zohoSignCreateDocument(this.signContext);
2066
+ }
2067
+ },
2068
+ {
2069
+ key: "updateDocument",
2070
+ get: /** Configured pass-through for {@link zohoSignUpdateDocument}. */ function get() {
2071
+ return zoho.zohoSignUpdateDocument(this.signContext);
2072
+ }
2073
+ },
2074
+ {
2075
+ key: "sendDocumentForSignature",
2076
+ get: /** Configured pass-through for {@link zohoSignSendDocumentForSignature}. */ function get() {
2077
+ return zoho.zohoSignSendDocumentForSignature(this.signContext);
2078
+ }
2079
+ },
2080
+ {
2081
+ key: "extendDocument",
2082
+ get: /** Configured pass-through for {@link zohoSignExtendDocument}. */ function get() {
2083
+ return zoho.zohoSignExtendDocument(this.signContext);
2084
+ }
2085
+ },
2086
+ {
2087
+ key: "deleteDocument",
2088
+ get: /** Configured pass-through for {@link zohoSignDeleteDocument}. */ function get() {
2089
+ return zoho.zohoSignDeleteDocument(this.signContext);
2090
+ }
2091
+ }
2092
+ ]);
2093
+ return ZohoSignApi;
2094
+ }();
1106
2095
  exports.ZohoSignApi = __decorate([
1107
2096
  common.Injectable(),
1108
2097
  __param(0, common.Inject(ZohoSignServiceConfig)),
1109
2098
  __param(1, common.Inject(exports.ZohoAccountsApi))
1110
2099
  ], exports.ZohoSignApi);
1111
2100
 
2101
+ function _array_like_to_array(arr, len) {
2102
+ if (len == null || len > arr.length) len = arr.length;
2103
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2104
+ return arr2;
2105
+ }
2106
+ function _array_without_holes(arr) {
2107
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
2108
+ }
2109
+ function _iterable_to_array(iter) {
2110
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2111
+ }
2112
+ function _non_iterable_spread() {
2113
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2114
+ }
2115
+ function _to_consumable_array(arr) {
2116
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
2117
+ }
2118
+ function _unsupported_iterable_to_array(o, minLen) {
2119
+ if (!o) return;
2120
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
2121
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2122
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2123
+ if (n === "Map" || n === "Set") return Array.from(n);
2124
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
2125
+ }
1112
2126
  // MARK: Provider Factories
1113
2127
  /**
1114
2128
  * Reads Zoho Sign connection settings from the NestJS ConfigService
@@ -1130,10 +2144,9 @@ exports.ZohoSignApi = __decorate([
1130
2144
  * useFactory: zohoSignServiceConfigFactory
1131
2145
  * }
1132
2146
  * ```
1133
- */
1134
- function zohoSignServiceConfigFactory(configService) {
1135
- const getFromConfigService = zohoConfigServiceReaderFunction(zoho.ZOHO_SIGN_SERVICE_NAME, configService);
1136
- const config = {
2147
+ */ function zohoSignServiceConfigFactory(configService) {
2148
+ var getFromConfigService = zohoConfigServiceReaderFunction(zoho.ZOHO_SIGN_SERVICE_NAME, configService);
2149
+ var config = {
1137
2150
  zohoSign: {
1138
2151
  apiUrl: getFromConfigService(ZOHO_API_URL_CONFIG_KEY)
1139
2152
  }
@@ -1156,10 +2169,9 @@ function zohoSignServiceConfigFactory(configService) {
1156
2169
  * useFactory: zohoSignAccountServiceConfigFactory
1157
2170
  * }
1158
2171
  * ```
1159
- */
1160
- function zohoSignAccountServiceConfigFactory(configService) {
2172
+ */ function zohoSignAccountServiceConfigFactory(configService) {
1161
2173
  return zohoAccountsServiceConfigFromConfigService({
1162
- configService,
2174
+ configService: configService,
1163
2175
  serviceAccessTokenKey: zoho.ZOHO_SIGN_SERVICE_NAME
1164
2176
  });
1165
2177
  }
@@ -1198,29 +2210,37 @@ function zohoSignAccountServiceConfigFactory(configService) {
1198
2210
  * @Module(appZohoSignModuleMetadata({ dependencyModule: ZohoSignDependencyModule }))
1199
2211
  * export class AppZohoSignModule {}
1200
2212
  * ```
1201
- */
1202
- function appZohoSignModuleMetadata(config$1) {
1203
- const { dependencyModule, imports, exports: exports$1, providers } = config$1;
1204
- const dependencyModuleImport = dependencyModule ? [dependencyModule] : [];
2213
+ */ function appZohoSignModuleMetadata(config$1) {
2214
+ var dependencyModule = config$1.dependencyModule, imports = config$1.imports, exports$1 = config$1.exports, providers = config$1.providers;
2215
+ var dependencyModuleImport = dependencyModule ? [
2216
+ dependencyModule
2217
+ ] : [];
1205
2218
  return {
1206
- imports: [config.ConfigModule, ...dependencyModuleImport, ...(imports ?? [])],
1207
- exports: [exports.ZohoSignApi, ...(exports$1 ?? [])],
2219
+ imports: [
2220
+ config.ConfigModule
2221
+ ].concat(_to_consumable_array(dependencyModuleImport), _to_consumable_array(imports !== null && imports !== void 0 ? imports : [])),
2222
+ exports: [
2223
+ exports.ZohoSignApi
2224
+ ].concat(_to_consumable_array(exports$1 !== null && exports$1 !== void 0 ? exports$1 : [])),
1208
2225
  providers: [
1209
2226
  {
1210
2227
  provide: ZohoSignServiceConfig,
1211
- inject: [config.ConfigService],
2228
+ inject: [
2229
+ config.ConfigService
2230
+ ],
1212
2231
  useFactory: zohoSignServiceConfigFactory
1213
2232
  },
1214
2233
  exports.ZohoSignApi,
1215
2234
  // Accounts
1216
2235
  {
1217
2236
  provide: ZohoAccountsServiceConfig,
1218
- inject: [config.ConfigService],
2237
+ inject: [
2238
+ config.ConfigService
2239
+ ],
1219
2240
  useFactory: zohoSignAccountServiceConfigFactory
1220
2241
  },
1221
- exports.ZohoAccountsApi,
1222
- ...(providers ?? [])
1223
- ]
2242
+ exports.ZohoAccountsApi
2243
+ ].concat(_to_consumable_array(providers !== null && providers !== void 0 ? providers : []))
1224
2244
  };
1225
2245
  }
1226
2246