@dereekb/zoho 13.4.0 → 13.4.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.
Files changed (40) hide show
  1. package/index.cjs.js +292 -95
  2. package/index.esm.js +292 -96
  3. package/nestjs/index.cjs.js +407 -89
  4. package/nestjs/index.esm.js +407 -89
  5. package/nestjs/package.json +4 -4
  6. package/nestjs/src/lib/accounts/accounts.service.d.ts +14 -2
  7. package/nestjs/src/lib/crm/crm.api.d.ts +142 -27
  8. package/nestjs/src/lib/crm/crm.config.d.ts +2 -0
  9. package/nestjs/src/lib/recruit/recruit.api.d.ts +162 -31
  10. package/nestjs/src/lib/recruit/recruit.config.d.ts +2 -0
  11. package/nestjs/src/lib/sign/sign.api.d.ts +67 -12
  12. package/nestjs/src/lib/sign/webhook/webhook.zoho.sign.d.ts +3 -0
  13. package/nestjs/src/lib/zoho.config.d.ts +26 -2
  14. package/package.json +3 -3
  15. package/src/lib/accounts/accounts.api.d.ts +9 -5
  16. package/src/lib/accounts/accounts.config.d.ts +12 -2
  17. package/src/lib/accounts/accounts.d.ts +6 -3
  18. package/src/lib/accounts/accounts.error.api.d.ts +13 -0
  19. package/src/lib/accounts/accounts.factory.d.ts +2 -2
  20. package/src/lib/crm/crm.api.d.ts +13 -0
  21. package/src/lib/crm/crm.api.notes.d.ts +15 -0
  22. package/src/lib/crm/crm.api.tags.d.ts +17 -8
  23. package/src/lib/crm/crm.config.d.ts +9 -2
  24. package/src/lib/crm/crm.d.ts +12 -12
  25. package/src/lib/crm/crm.error.api.d.ts +14 -0
  26. package/src/lib/crm/crm.factory.d.ts +3 -3
  27. package/src/lib/crm/crm.notes.d.ts +23 -23
  28. package/src/lib/crm/crm.tags.d.ts +3 -3
  29. package/src/lib/recruit/recruit.api.candidates.d.ts +19 -0
  30. package/src/lib/recruit/recruit.api.d.ts +10 -0
  31. package/src/lib/recruit/recruit.config.d.ts +9 -2
  32. package/src/lib/recruit/recruit.d.ts +12 -12
  33. package/src/lib/recruit/recruit.error.api.d.ts +14 -0
  34. package/src/lib/recruit/recruit.factory.d.ts +3 -3
  35. package/src/lib/sign/sign.config.d.ts +12 -2
  36. package/src/lib/sign/sign.d.ts +14 -14
  37. package/src/lib/sign/sign.error.api.d.ts +13 -0
  38. package/src/lib/sign/sign.factory.d.ts +3 -3
  39. package/src/lib/zoho.error.api.d.ts +25 -8
  40. package/src/lib/zoho.limit.d.ts +8 -1
package/index.esm.js CHANGED
@@ -86,13 +86,15 @@ function _object_spread_props$c(target, source) {
86
86
  * const secondPage = await firstPage.fetchNext();
87
87
  * }
88
88
  * ```
89
- */ function zohoFetchPageFactory(fetch, defaults) {
89
+ */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic constraint requires any
90
+ function zohoFetchPageFactory(fetch, defaults) {
90
91
  return fetchPageFactory(_object_spread_props$c(_object_spread$d({}, defaults), {
91
92
  fetch: fetch,
92
93
  readFetchPageResultInfo: function readFetchPageResultInfo(result) {
93
94
  var _ref;
94
95
  var _result_info;
95
96
  return {
97
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- info may be missing in malformed responses
96
98
  hasNext: (_ref = (_result_info = result.info) === null || _result_info === void 0 ? void 0 : _result_info.more_records) !== null && _ref !== void 0 ? _ref : false // if no info is returned, assume something wrong and there are no more records
97
99
  };
98
100
  },
@@ -111,6 +113,9 @@ function _object_spread_props$c(target, source) {
111
113
  */ var ZOHO_RECRUIT_SERVICE_NAME = 'recruit';
112
114
  /**
113
115
  * Resolves an environment key or passthrough URL to the full Zoho Recruit API URL.
116
+ *
117
+ * @param input - An environment key ('sandbox' or 'production') or a full API URL
118
+ * @returns The resolved Zoho Recruit API URL
114
119
  */ function zohoRecruitConfigApiUrl(input) {
115
120
  switch(input){
116
121
  case 'sandbox':
@@ -185,23 +190,26 @@ function _type_of$6(obj) {
185
190
  */ function zohoSearchRecordsCriteriaString(input) {
186
191
  var result;
187
192
  if (input != null) {
193
+ // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check -- only string and object are valid for criteria input
188
194
  switch(typeof input === "undefined" ? "undefined" : _type_of$6(input)){
189
195
  case 'string':
190
196
  result = input;
191
197
  break;
192
198
  case 'object':
193
- var tree;
194
- if (Array.isArray(input)) {
195
- tree = {
196
- and: [
197
- input
198
- ]
199
- };
200
- } else {
201
- tree = input;
199
+ {
200
+ var tree;
201
+ if (Array.isArray(input)) {
202
+ tree = {
203
+ and: [
204
+ input
205
+ ]
206
+ };
207
+ } else {
208
+ tree = input;
209
+ }
210
+ result = zohoSearchRecordsCriteriaStringForTree(tree);
211
+ break;
202
212
  }
203
- result = zohoSearchRecordsCriteriaStringForTree(tree);
204
- break;
205
213
  }
206
214
  }
207
215
  return result;
@@ -541,6 +549,7 @@ function _ts_generator$9(thisArg, body) {
541
549
  * @param value
542
550
  * @returns
543
551
  */ function isZohoServerErrorResponseDataArrayRef(value) {
552
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- value is unknown at runtime, optional chain needed for safety
544
553
  return Array.isArray(value === null || value === void 0 ? void 0 : value.data);
545
554
  }
546
555
  /**
@@ -552,7 +561,12 @@ function _ts_generator$9(thisArg, body) {
552
561
  /**
553
562
  * Set in the status field
554
563
  */ var ZOHO_ERROR_STATUS = 'error';
555
- function zohoServerErrorData(error) {
564
+ /**
565
+ * Normalizes a Zoho error response entry into a consistent {@link ZohoServerErrorData} shape, handling both object and string error formats.
566
+ *
567
+ * @param error - The raw error entry, either a structured object or a plain error code string
568
+ * @returns Normalized error data with code and message fields
569
+ */ function zohoServerErrorData(error) {
556
570
  var errorType = typeof error === "undefined" ? "undefined" : _type_of$5(error);
557
571
  var errorData;
558
572
  if (errorType === 'object') {
@@ -636,8 +650,9 @@ function zohoServerErrorData(error) {
636
650
  /**
637
651
  * Creates a logZohoServerErrorFunction that logs the error to console.
638
652
  *
639
- * @param zohoApiNamePrefix Prefix to use when logging. I.E. ZohoRecruitError, etc.
640
- * @returns
653
+ * @param zohoApiNamePrefix - Prefix to use when logging (e.g. 'ZohoRecruit', 'ZohoSign')
654
+ * @param options - Optional configuration for controlling which error types are logged
655
+ * @returns A function that logs Zoho server errors to the console
641
656
  */ function logZohoServerErrorFunction(zohoApiNamePrefix, options) {
642
657
  var _ref = options !== null && options !== void 0 ? options : {}, _ref_logDataArrayErrors = _ref.logDataArrayErrors, logDataArrayErrors = _ref_logDataArrayErrors === void 0 ? false : _ref_logDataArrayErrors;
643
658
  return function(error) {
@@ -660,8 +675,9 @@ function zohoServerErrorData(error) {
660
675
  /**
661
676
  * Wraps a ConfiguredFetch to support handling errors returned by fetch.
662
677
  *
663
- * @param fetch
664
- * @returns
678
+ * @param parseZohoError - Function that parses a fetch response error into a Zoho-specific error
679
+ * @param defaultLogError - Default error logging function used when no custom logger is provided
680
+ * @returns Factory that wraps a ConfiguredFetch with Zoho error handling
665
681
  */ function handleZohoErrorFetchFactory(parseZohoError, defaultLogError) {
666
682
  return function(fetch) {
667
683
  var logError = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultLogError, onError = arguments.length > 2 ? arguments[2] : void 0;
@@ -718,16 +734,19 @@ function zohoServerErrorData(error) {
718
734
  }
719
735
  /**
720
736
  * FetchJsonInterceptJsonResponseFunction that intercepts a 200 response that actually contains a ZohoServerError and throws a ZohoServerError for the error handling to catch.
737
+ *
738
+ * @param parseZohoServerErrorResponseData - Function that parses raw error response data into a structured error
739
+ * @returns Interceptor function that detects and throws hidden errors in 200 responses
721
740
  */ function interceptZohoErrorResponseFactory(parseZohoServerErrorResponseData) {
722
741
  return function(json, response) {
742
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- json is typed as unknown union, optional chain needed for runtime safety
723
743
  var error = json === null || json === void 0 ? void 0 : json.error;
744
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- error may be undefined at runtime despite cast
724
745
  if (error != null) {
725
746
  var responseError = new FetchResponseError(response);
726
- if (responseError) {
727
- var parsedError = parseZohoServerErrorResponseData(json, responseError);
728
- if (parsedError) {
729
- throw parsedError;
730
- }
747
+ var parsedError = parseZohoServerErrorResponseData(json, responseError);
748
+ if (parsedError) {
749
+ throw parsedError;
731
750
  }
732
751
  }
733
752
  return json;
@@ -817,7 +836,12 @@ var ZOHO_RATE_LIMIT_REMAINING_HEADER = 'X-RATELIMIT-REMAINING';
817
836
  var ZOHO_RATE_LIMIT_RESET_HEADER = 'X-RATELIMIT-RESET';
818
837
  var DEFAULT_ZOHO_API_RATE_LIMIT = 100;
819
838
  var DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD = MS_IN_MINUTE;
820
- function zohoRateLimitHeaderDetails(headers) {
839
+ /**
840
+ * Extracts rate limit details from Zoho API response headers, returning null if the headers are absent.
841
+ *
842
+ * @param headers - HTTP response headers from a Zoho API call
843
+ * @returns Parsed rate limit details, or null if rate limit headers are missing
844
+ */ function zohoRateLimitHeaderDetails(headers) {
821
845
  var limitHeader = headers.get(ZOHO_RATE_LIMIT_LIMIT_HEADER);
822
846
  var remainingHeader = headers.get(ZOHO_RATE_LIMIT_REMAINING_HEADER);
823
847
  var resetHeader = headers.get(ZOHO_RATE_LIMIT_RESET_HEADER);
@@ -855,9 +879,9 @@ var ZohoTooManyRequestsError = /*#__PURE__*/ function(ZohoServerFetchResponseErr
855
879
  /**
856
880
  * Function that parses/transforms a ZohoServerErrorResponseData into a general ZohoServerError or other known error type.
857
881
  *
858
- * @param errorResponseData
859
- * @param responseError
860
- * @returns
882
+ * @param errorResponseData - Raw error response data from the Zoho API
883
+ * @param responseError - The underlying fetch response error
884
+ * @returns A typed Zoho server error, or undefined if no error is found
861
885
  */ function parseZohoServerErrorResponseData(errorResponseData, responseError) {
862
886
  var result;
863
887
  if (isZohoServerErrorResponseDataArrayRef(errorResponseData)) {
@@ -902,8 +926,8 @@ var ZohoTooManyRequestsError = /*#__PURE__*/ function(ZohoServerFetchResponseErr
902
926
  */ function tryFindZohoServerErrorData(errorResponseData, responseError) {
903
927
  var _ref, _errorResponseData_error;
904
928
  var _errorResponseData_data;
905
- var error = (_ref = (_errorResponseData_error = errorResponseData.error) !== null && _errorResponseData_error !== void 0 ? _errorResponseData_error : (_errorResponseData_data = errorResponseData.data) === null || _errorResponseData_data === void 0 ? void 0 : _errorResponseData_data[0]) !== null && _ref !== void 0 ? _ref : !responseError.response.ok ? errorResponseData : undefined;
906
- return error;
929
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- errorResponseData shape is unknown at runtime, fallthrough chain needed
930
+ return (_ref = (_errorResponseData_error = errorResponseData.error) !== null && _errorResponseData_error !== void 0 ? _errorResponseData_error : (_errorResponseData_data = errorResponseData.data) === null || _errorResponseData_data === void 0 ? void 0 : _errorResponseData_data[0]) !== null && _ref !== void 0 ? _ref : !responseError.response.ok ? errorResponseData : undefined;
907
931
  }
908
932
 
909
933
  function _assert_this_initialized$4(self) {
@@ -1200,17 +1224,22 @@ function _ts_generator$8(thisArg, body) {
1200
1224
  }(ZohoRecruitRecordCrudInvalidDataError);
1201
1225
  /**
1202
1226
  * Creates a typed CRUD error subclass based on the error code returned by the Zoho Recruit API, enabling callers to catch specific failure modes.
1227
+ *
1228
+ * @param error - Structured error data from the Zoho Recruit API response
1229
+ * @returns A specific CRUD error subclass matching the error code
1203
1230
  */ function zohoRecruitRecordCrudError(error) {
1204
1231
  var result;
1205
1232
  switch(error.code){
1206
1233
  case ZOHO_INVALID_DATA_ERROR_CODE:
1207
- var invalidDataError = new ZohoRecruitRecordCrudInvalidDataError(error);
1208
- if (invalidDataError.invalidFieldDetails['id']) {
1209
- result = new ZohoRecruitRecordCrudNoMatchingRecordError(error);
1210
- } else {
1211
- result = invalidDataError;
1234
+ {
1235
+ var invalidDataError = new ZohoRecruitRecordCrudInvalidDataError(error);
1236
+ if (invalidDataError.invalidFieldDetails['id']) {
1237
+ result = new ZohoRecruitRecordCrudNoMatchingRecordError(error);
1238
+ } else {
1239
+ result = invalidDataError;
1240
+ }
1241
+ break;
1212
1242
  }
1213
- break;
1214
1243
  case ZOHO_MANDATORY_NOT_FOUND_ERROR_CODE:
1215
1244
  result = new ZohoRecruitRecordCrudMandatoryFieldNotFoundError(error);
1216
1245
  break;
@@ -1225,9 +1254,14 @@ function _ts_generator$8(thisArg, body) {
1225
1254
  }
1226
1255
  /**
1227
1256
  * Returns an assertion function that throws {@link ZohoRecruitRecordNoContentError} when the data array result is empty or null, indicating the requested record does not exist.
1257
+ *
1258
+ * @param moduleName - Optional module name for the error context
1259
+ * @param recordId - Optional record ID for the error context
1260
+ * @returns Assertion function that validates the data array is non-empty
1228
1261
  */ function assertZohoRecruitRecordDataArrayResultHasContent(moduleName, recordId) {
1229
1262
  return function(x) {
1230
1263
  var _x_data;
1264
+ // eslint-disable-next-line eqeqeq -- fetchJson may return null for empty results despite type
1231
1265
  if (x == null || !((_x_data = x.data) === null || _x_data === void 0 ? void 0 : _x_data.length)) {
1232
1266
  throw new ZohoRecruitRecordNoContentError(moduleName, recordId);
1233
1267
  } else {
@@ -1240,6 +1274,9 @@ function _ts_generator$8(thisArg, body) {
1240
1274
  */ var logZohoRecruitErrorToConsole = logZohoServerErrorFunction('ZohoRecruit');
1241
1275
  /**
1242
1276
  * Parses the JSON body of a failed Zoho Recruit fetch response into a structured error, returning undefined if the body cannot be parsed.
1277
+ *
1278
+ * @param responseError - The fetch response error to parse
1279
+ * @returns Parsed Zoho server error, or undefined if parsing fails
1243
1280
  */ function parseZohoRecruitError(responseError) {
1244
1281
  return _async_to_generator$8(function() {
1245
1282
  var data, result;
@@ -1248,7 +1285,7 @@ function _ts_generator$8(thisArg, body) {
1248
1285
  case 0:
1249
1286
  return [
1250
1287
  4,
1251
- responseError.response.json().catch(function(x) {
1288
+ responseError.response.json().catch(function() {
1252
1289
  return undefined;
1253
1290
  })
1254
1291
  ];
@@ -1267,6 +1304,10 @@ function _ts_generator$8(thisArg, body) {
1267
1304
  }
1268
1305
  /**
1269
1306
  * Converts raw Zoho Recruit error response data into a parsed error, delegating to Recruit-specific handlers for known error codes and falling back to the shared Zoho parser.
1307
+ *
1308
+ * @param errorResponseData - Raw error response data from the Zoho Recruit API
1309
+ * @param responseError - The underlying fetch response error
1310
+ * @returns Parsed Zoho server error, or undefined if the data contains no recognizable error
1270
1311
  */ function parseZohoRecruitServerErrorResponseData(errorResponseData, responseError) {
1271
1312
  var result;
1272
1313
  var error = tryFindZohoServerErrorData(errorResponseData, responseError);
@@ -1409,6 +1450,11 @@ function _is_native_reflect_construct$3() {
1409
1450
  *
1410
1451
  * When a single record is provided, the function returns the change details directly or throws on error.
1411
1452
  * When multiple records are provided, it returns a paired success/error result.
1453
+ *
1454
+ * @param context - Zoho Recruit API context providing fetch and authentication
1455
+ * @param fetchUrlPrefix - URL path suffix for the endpoint (empty for insert/update, '/upsert' for upsert)
1456
+ * @param fetchMethod - HTTP method to use for the request
1457
+ * @returns Factory function that inserts, updates, or upserts records
1412
1458
  */ function updateRecordLikeFunction$1(context, fetchUrlPrefix, fetchMethod) {
1413
1459
  return function(param) {
1414
1460
  var data = param.data, module = param.module;
@@ -1421,6 +1467,7 @@ function _is_native_reflect_construct$3() {
1421
1467
  return result;
1422
1468
  } else {
1423
1469
  var successItems = result.successItems, errorItems = result.errorItems;
1470
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- array may be empty at runtime
1424
1471
  if (errorItems[0] != null) {
1425
1472
  throw zohoRecruitRecordCrudError(errorItems[0].result);
1426
1473
  } else {
@@ -1669,12 +1716,13 @@ function _is_native_reflect_construct$3() {
1669
1716
  var criteriaString = zohoRecruitSearchRecordsCriteriaString(input.criteria);
1670
1717
  baseInput.criteria = criteriaString;
1671
1718
  }
1719
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- Zoho API migration pending
1672
1720
  if (!baseInput.word && !input.criteria && !input.email && !input.phone) {
1673
1721
  throw new Error('At least one of word, criteria, email, or phone must be provided');
1674
1722
  }
1675
- var urlParams = zohoRecruitUrlSearchParamsMinusModule(baseInput);
1676
- return urlParams;
1723
+ return zohoRecruitUrlSearchParamsMinusModule(baseInput);
1677
1724
  }
1725
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- fetchJson may return null for empty results
1678
1726
  return function(input) {
1679
1727
  return context.fetchJson("/v2/".concat(input.module, "/search?").concat(searchRecordsUrlSearchParams(input).toString()), zohoRecruitApiFetchJsonInput('GET')).then(function(x) {
1680
1728
  return x !== null && x !== void 0 ? x : {
@@ -1742,11 +1790,12 @@ function _is_native_reflect_construct$3() {
1742
1790
  */ function zohoRecruitGetRelatedRecordsFunctionFactory(context) {
1743
1791
  return function(config) {
1744
1792
  var targetModule = config.targetModule, _config_returnEmptyRecordsInsteadOfNull = config.returnEmptyRecordsInsteadOfNull, returnEmptyRecordsInsteadOfNull = _config_returnEmptyRecordsInsteadOfNull === void 0 ? true : _config_returnEmptyRecordsInsteadOfNull;
1793
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- Zoho API migration pending
1745
1794
  return function(input) {
1746
1795
  return context.fetchJson("/v2/".concat(input.module, "/").concat(input.id, "/").concat(targetModule, "?").concat(zohoRecruitUrlSearchParamsMinusIdAndModule(input, input.filter).toString()), zohoRecruitApiFetchJsonInput('GET')).then(function(x) {
1747
1796
  return x !== null && x !== void 0 ? x : returnEmptyRecordsInsteadOfNull !== false ? emptyZohoPageResult() : x;
1748
1797
  });
1749
- };
1798
+ }; // eslint-disable-line @typescript-eslint/no-unnecessary-condition -- fetchJson may return null for empty results
1750
1799
  };
1751
1800
  }
1752
1801
  /**
@@ -2074,6 +2123,9 @@ function _is_native_reflect_construct$3() {
2074
2123
  // MARK: Util
2075
2124
  /**
2076
2125
  * Builds URL search params from input objects, omitting the `module` key since it is used in the URL path rather than query string.
2126
+ *
2127
+ * @param input - One or more objects whose key-value pairs become query parameters
2128
+ * @returns URLSearchParams with the `module` key excluded
2077
2129
  */ function zohoRecruitUrlSearchParamsMinusModule() {
2078
2130
  for(var _len = arguments.length, input = new Array(_len), _key = 0; _key < _len; _key++){
2079
2131
  input[_key] = arguments[_key];
@@ -2084,6 +2136,9 @@ function _is_native_reflect_construct$3() {
2084
2136
  }
2085
2137
  /**
2086
2138
  * Builds URL search params from input objects, omitting both `id` and `module` keys since they are used in the URL path.
2139
+ *
2140
+ * @param input - One or more objects whose key-value pairs become query parameters
2141
+ * @returns URLSearchParams with `id` and `module` keys excluded
2087
2142
  */ function zohoRecruitUrlSearchParamsMinusIdAndModule() {
2088
2143
  for(var _len = arguments.length, input = new Array(_len), _key = 0; _key < _len; _key++){
2089
2144
  input[_key] = arguments[_key];
@@ -2100,12 +2155,15 @@ function _is_native_reflect_construct$3() {
2100
2155
  */ var zohoRecruitUrlSearchParams = makeUrlSearchParams;
2101
2156
  /**
2102
2157
  * Constructs a standard {@link FetchJsonInput} for Zoho Recruit API calls with the given HTTP method and optional body.
2158
+ *
2159
+ * @param method - HTTP method for the request
2160
+ * @param body - Optional JSON body to include in the request
2161
+ * @returns Configured fetch JSON input
2103
2162
  */ function zohoRecruitApiFetchJsonInput(method, body) {
2104
- var result = {
2163
+ return {
2105
2164
  method: method,
2106
2165
  body: body !== null && body !== void 0 ? body : undefined
2107
2166
  };
2108
- return result;
2109
2167
  }
2110
2168
  /**
2111
2169
  * Separates a change response's entries into success and error arrays based on their status.
@@ -2285,6 +2343,9 @@ function _object_spread_props$a(target, source) {
2285
2343
  *
2286
2344
  * The result separates "already associated" errors from other errors, allowing callers to treat duplicate associations as non-fatal.
2287
2345
  *
2346
+ * @param context - Zoho Recruit API context providing fetch and authentication
2347
+ * @returns Factory function that associates candidates with job openings
2348
+ *
2288
2349
  * https://www.zoho.com/recruit/developer-guide/apiv2/associate-candidate.html
2289
2350
  */ function zohoRecruitAssociateCandidateRecordsWithJobOpenings(context) {
2290
2351
  return function(input) {
@@ -2308,6 +2369,9 @@ function _object_spread_props$a(target, source) {
2308
2369
  }
2309
2370
  /**
2310
2371
  * Searches for records associated with a given candidate or job opening. Returns an empty page result when no records are found.
2372
+ *
2373
+ * @param context - Zoho Recruit API context providing fetch and authentication
2374
+ * @returns Factory function that searches for associated records
2311
2375
  */ function zohoRecruitSearchAssociatedRecords(context) {
2312
2376
  return function(input) {
2313
2377
  return context.fetchJson("/v2/".concat(input.module, "/").concat(input.id, "/associate?").concat(zohoRecruitUrlSearchParamsMinusIdAndModule(input).toString()), zohoRecruitApiFetchJsonInput('GET')).then(function(x) {
@@ -2318,6 +2382,9 @@ function _object_spread_props$a(target, source) {
2318
2382
  }
2319
2383
  /**
2320
2384
  * Searches for job openings associated with a specific candidate.
2385
+ *
2386
+ * @param context - Zoho Recruit API context providing fetch and authentication
2387
+ * @returns Factory function that searches for job openings associated with a candidate
2321
2388
  */ function zohoRecruitSearchCandidateAssociatedJobOpeningRecords(context) {
2322
2389
  var searchAssociatedRecordsFactory = zohoRecruitSearchAssociatedRecords(context);
2323
2390
  return function(input) {
@@ -2328,11 +2395,18 @@ function _object_spread_props$a(target, source) {
2328
2395
  }
2329
2396
  /**
2330
2397
  * Creates a page factory for paginating over job openings associated with a candidate.
2398
+ *
2399
+ * @param context - Zoho Recruit API context providing fetch and authentication
2400
+ * @returns Page factory for iterating through associated job openings
2331
2401
  */ function zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory(context) {
2332
2402
  return zohoFetchPageFactory(zohoRecruitSearchCandidateAssociatedJobOpeningRecords(context));
2333
2403
  }
2334
2404
  /**
2335
2405
  * Searches for candidates associated with a specific job opening.
2406
+ *
2407
+ * @param context - Zoho Recruit API context providing fetch and authentication
2408
+ * @param jobOpeningModuleName - Module name for job openings, defaults to the standard module
2409
+ * @returns Factory function that searches for candidates associated with a job opening
2336
2410
  */ function zohoRecruitSearchJobOpeningAssociatedCandidateRecords(context) {
2337
2411
  var jobOpeningModuleName = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ZOHO_RECRUIT_JOB_OPENINGS_MODULE;
2338
2412
  var searchAssociatedRecordsFactory = zohoRecruitSearchAssociatedRecords(context);
@@ -2344,6 +2418,9 @@ function _object_spread_props$a(target, source) {
2344
2418
  }
2345
2419
  /**
2346
2420
  * Creates a page factory for paginating over candidates associated with a job opening.
2421
+ *
2422
+ * @param context - Zoho Recruit API context providing fetch and authentication
2423
+ * @returns Page factory for iterating through associated candidates
2347
2424
  */ function zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory(context) {
2348
2425
  return zohoFetchPageFactory(zohoRecruitSearchJobOpeningAssociatedCandidateRecords(context));
2349
2426
  }
@@ -3012,7 +3089,12 @@ var ZOHO_ACCOUNTS_INVALID_CLIENT_ERROR_CODE = 'invalid_client';
3012
3089
  return ZohoAccountsAuthFailureError;
3013
3090
  }(FetchRequestFactoryError);
3014
3091
  var logZohoAccountsErrorToConsole = logZohoServerErrorFunction('ZohoAccounts');
3015
- function parseZohoAccountsError(responseError) {
3092
+ /**
3093
+ * Parses a fetch response error into a typed Zoho Accounts server error by extracting and interpreting the JSON error body.
3094
+ *
3095
+ * @param responseError - The fetch response error to parse
3096
+ * @returns The parsed Zoho server error, or undefined if the response could not be parsed
3097
+ */ function parseZohoAccountsError(responseError) {
3016
3098
  return _async_to_generator$7(function() {
3017
3099
  var data, result;
3018
3100
  return _ts_generator$7(this, function(_state) {
@@ -3020,7 +3102,7 @@ function parseZohoAccountsError(responseError) {
3020
3102
  case 0:
3021
3103
  return [
3022
3104
  4,
3023
- responseError.response.json().catch(function(x) {
3105
+ responseError.response.json().catch(function() {
3024
3106
  return undefined;
3025
3107
  })
3026
3108
  ];
@@ -3037,7 +3119,13 @@ function parseZohoAccountsError(responseError) {
3037
3119
  });
3038
3120
  })();
3039
3121
  }
3040
- function parseZohoAccountsServerErrorResponseData(errorResponseData, responseError) {
3122
+ /**
3123
+ * Parses a Zoho Accounts error response body into a typed error. Handles account-specific error codes before falling back to the generic Zoho error parser.
3124
+ *
3125
+ * @param errorResponseData - The raw error response data from the Zoho Accounts API
3126
+ * @param responseError - The original fetch response error for context
3127
+ * @returns The parsed Zoho server error, or undefined if the error could not be classified
3128
+ */ function parseZohoAccountsServerErrorResponseData(errorResponseData, responseError) {
3041
3129
  var result;
3042
3130
  var error = errorResponseData.error;
3043
3131
  if (error) {
@@ -3187,6 +3275,9 @@ function _ts_generator$6(thisArg, body) {
3187
3275
  }
3188
3276
  /**
3189
3277
  * Generates a new ZohoAccessTokenStringFactory.
3278
+ *
3279
+ * @param zohoAccessTokenFactory - Factory that produces ZohoAccessToken instances
3280
+ * @returns A factory function that resolves to the access token string
3190
3281
  */ function zohoAccessTokenStringFactory(zohoAccessTokenFactory) {
3191
3282
  return function() {
3192
3283
  return _async_to_generator$6(function() {
@@ -3200,7 +3291,7 @@ function _ts_generator$6(thisArg, body) {
3200
3291
  ];
3201
3292
  case 1:
3202
3293
  token = _state.sent();
3203
- if (!(token === null || token === void 0 ? void 0 : token.accessToken)) {
3294
+ if (!token.accessToken) {
3204
3295
  throw new ZohoAccountsAuthFailureError();
3205
3296
  }
3206
3297
  return [
@@ -3215,7 +3306,9 @@ function _ts_generator$6(thisArg, body) {
3215
3306
 
3216
3307
  /**
3217
3308
  * Default handler that logs a warning to the console when the Zoho API rate limit is exceeded.
3218
- */ var DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION = function DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION(headers) {
3309
+ *
3310
+ * @param headers - Rate limit details extracted from the Zoho API response headers
3311
+ */ var DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION = function DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION(headers) {
3219
3312
  console.warn("zohoRateLimitedFetchHandler(): Too many requests made. The limit is ".concat(headers.limit, " requests per reset period. Will be reset at ").concat(headers.resetAt, "."));
3220
3313
  };
3221
3314
  /**
@@ -3234,13 +3327,17 @@ function _ts_generator$6(thisArg, body) {
3234
3327
  * @returns A rate-limited fetch handler with the underlying rate limiter accessible via `_rateLimiter`
3235
3328
  */ function zohoRateLimitedFetchHandler(config) {
3236
3329
  var _ref, _ref1, _ref2;
3237
- var onTooManyRequests = (config === null || config === void 0 ? void 0 : config.onTooManyRequests) !== false ? (_ref = config === null || config === void 0 ? void 0 : config.onTooManyRequests) !== null && _ref !== void 0 ? _ref : DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION : undefined;
3330
+ var onTooManyRequests = (config === null || config === void 0 ? void 0 : config.onTooManyRequests) !== false ? (_ref = config === null || config === void 0 ? void 0 : config.onTooManyRequests) !== null && _ref !== void 0 ? _ref : DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION : undefined;
3238
3331
  var defaultLimit = (_ref1 = config === null || config === void 0 ? void 0 : config.maxRateLimit) !== null && _ref1 !== void 0 ? _ref1 : DEFAULT_ZOHO_API_RATE_LIMIT;
3239
3332
  var defaultResetPeriod = (_ref2 = config === null || config === void 0 ? void 0 : config.resetPeriod) !== null && _ref2 !== void 0 ? _ref2 : DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD;
3240
3333
  /**
3241
3334
  * Builds a rate limiter config derived from the given limit.
3242
3335
  * Called once at initialization with `defaultLimit`, and again dynamically
3243
3336
  * when the API's `X-RATELIMIT-LIMIT` header reports a different value.
3337
+ *
3338
+ * @param limit - Maximum number of requests allowed per reset period
3339
+ * @param resetAt - Optional date when the rate limit window resets
3340
+ * @returns Rate limiter configuration scaled to the given limit
3244
3341
  */ function configForLimit(limit, resetAt) {
3245
3342
  return {
3246
3343
  limit: limit,
@@ -3259,6 +3356,10 @@ function _ts_generator$6(thisArg, body) {
3259
3356
  /**
3260
3357
  * Inspects each response for Zoho rate limit headers and updates the limiter accordingly.
3261
3358
  * Returns `true` to signal a retry when a 429 status is received.
3359
+ *
3360
+ * @param response - The HTTP response to inspect for rate limit headers
3361
+ * @param fetchResponseError - Optional fetch error if the response was an error
3362
+ * @returns Whether the request should be retried
3262
3363
  */ updateWithResponse: function updateWithResponse(response, fetchResponseError) {
3263
3364
  var hasLimitHeader = response.headers.has(ZOHO_RATE_LIMIT_REMAINING_HEADER);
3264
3365
  var shouldRetry = false;
@@ -3278,8 +3379,9 @@ function _ts_generator$6(thisArg, body) {
3278
3379
  if (response.status === ZOHO_TOO_MANY_REQUESTS_HTTP_STATUS_CODE) {
3279
3380
  shouldRetry = true;
3280
3381
  try {
3281
- onTooManyRequests === null || onTooManyRequests === void 0 ? void 0 : onTooManyRequests(headerDetails, response, fetchResponseError);
3282
- } catch (e) {}
3382
+ void (onTooManyRequests === null || onTooManyRequests === void 0 ? void 0 : onTooManyRequests(headerDetails, response, fetchResponseError));
3383
+ } catch (unused) {
3384
+ /* ignored */ }
3283
3385
  }
3284
3386
  }
3285
3387
  }
@@ -3288,6 +3390,10 @@ function _ts_generator$6(thisArg, body) {
3288
3390
  }
3289
3391
  });
3290
3392
  }
3393
+ // MARK: Compat
3394
+ /**
3395
+ * @deprecated use DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION instead.
3396
+ */ var DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION = DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION;
3291
3397
 
3292
3398
  function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
3293
3399
  try {
@@ -3544,7 +3650,7 @@ function _ts_generator$5(thisArg, body) {
3544
3650
  });
3545
3651
  var fetch = handleZohoRecruitErrorFetch(baseFetch, logZohoServerErrorFunction, function(x) {
3546
3652
  if (_instanceof$4(x, ZohoInvalidTokenError)) {
3547
- accountsContext.loadAccessToken.resetAccessToken();
3653
+ void accountsContext.loadAccessToken.resetAccessToken();
3548
3654
  }
3549
3655
  });
3550
3656
  var fetchJson = fetchJsonFunction(fetch, {
@@ -3576,6 +3682,9 @@ function _ts_generator$5(thisArg, body) {
3576
3682
  */ var ZOHO_CRM_SERVICE_NAME = 'crm';
3577
3683
  /**
3578
3684
  * Resolves a CRM API URL input to its full base URL. Well-known keys ('sandbox', 'production') map to their respective Zoho CRM endpoints; custom URLs pass through unchanged.
3685
+ *
3686
+ * @param input - A well-known environment key or a custom CRM API URL
3687
+ * @returns The resolved full Zoho CRM API base URL
3579
3688
  */ function zohoCrmConfigApiUrl(input) {
3580
3689
  switch(input){
3581
3690
  case 'sandbox':
@@ -3937,17 +4046,22 @@ function _ts_generator$4(thisArg, body) {
3937
4046
  }(ZohoCrmRecordCrudInvalidDataError);
3938
4047
  /**
3939
4048
  * Maps a Zoho CRM server error to the appropriate typed {@link ZohoCrmRecordCrudError} subclass based on the error code and affected field.
4049
+ *
4050
+ * @param error - The server error data containing the error code and field details
4051
+ * @returns The appropriate typed CRM CRUD error instance
3940
4052
  */ function zohoCrmRecordCrudError(error) {
3941
4053
  var result;
3942
4054
  switch(error.code){
3943
4055
  case ZOHO_INVALID_DATA_ERROR_CODE:
3944
- var invalidDataError = new ZohoCrmRecordCrudInvalidDataError(error);
3945
- if (invalidDataError.invalidFieldDetails.api_name === 'id') {
3946
- result = new ZohoCrmRecordCrudNoMatchingRecordError(error);
3947
- } else {
3948
- result = invalidDataError;
4056
+ {
4057
+ var invalidDataError = new ZohoCrmRecordCrudInvalidDataError(error);
4058
+ if (invalidDataError.invalidFieldDetails.api_name === 'id') {
4059
+ result = new ZohoCrmRecordCrudNoMatchingRecordError(error);
4060
+ } else {
4061
+ result = invalidDataError;
4062
+ }
4063
+ break;
3949
4064
  }
3950
- break;
3951
4065
  case ZOHO_MANDATORY_NOT_FOUND_ERROR_CODE:
3952
4066
  result = new ZohoCrmRecordCrudMandatoryFieldNotFoundError(error);
3953
4067
  break;
@@ -3962,9 +4076,14 @@ function _ts_generator$4(thisArg, body) {
3962
4076
  }
3963
4077
  /**
3964
4078
  * Returns an assertion function that throws {@link ZohoCrmRecordNoContentError} when a data array result is empty or null, typically indicating a missing record.
4079
+ *
4080
+ * @param moduleName - Optional CRM module name for the error context
4081
+ * @param recordId - Optional record ID for the error context
4082
+ * @returns Assertion function that throws if the data array is empty
3965
4083
  */ function assertZohoCrmRecordDataArrayResultHasContent(moduleName, recordId) {
3966
4084
  return function(x) {
3967
4085
  var _x_data;
4086
+ // eslint-disable-next-line eqeqeq -- fetchJson may return null for empty results despite type
3968
4087
  if (x == null || !((_x_data = x.data) === null || _x_data === void 0 ? void 0 : _x_data.length)) {
3969
4088
  throw new ZohoCrmRecordNoContentError(moduleName, recordId);
3970
4089
  } else {
@@ -3979,6 +4098,9 @@ function _ts_generator$4(thisArg, body) {
3979
4098
  });
3980
4099
  /**
3981
4100
  * Parses a fetch response error into a typed Zoho CRM server error by extracting and interpreting the JSON error body.
4101
+ *
4102
+ * @param responseError - The fetch response error to parse
4103
+ * @returns The parsed Zoho server error, or undefined if the response could not be parsed
3982
4104
  */ function parseZohoCrmError(responseError) {
3983
4105
  return _async_to_generator$4(function() {
3984
4106
  var data, result;
@@ -3987,7 +4109,7 @@ function _ts_generator$4(thisArg, body) {
3987
4109
  case 0:
3988
4110
  return [
3989
4111
  4,
3990
- responseError.response.json().catch(function(x) {
4112
+ responseError.response.json().catch(function() {
3991
4113
  return undefined;
3992
4114
  })
3993
4115
  ];
@@ -4006,6 +4128,10 @@ function _ts_generator$4(thisArg, body) {
4006
4128
  }
4007
4129
  /**
4008
4130
  * Parses a Zoho CRM error response body into a typed error. Delegates to CRM-specific error code handling before falling back to the generic Zoho error parser.
4131
+ *
4132
+ * @param errorResponseData - The raw error response data from the Zoho CRM API
4133
+ * @param responseError - The original fetch response error for context
4134
+ * @returns The parsed Zoho server error, or undefined if the error could not be classified
4009
4135
  */ function parseZohoCrmServerErrorResponseData(errorResponseData, responseError) {
4010
4136
  var result;
4011
4137
  var error = tryFindZohoServerErrorData(errorResponseData, responseError);
@@ -4151,6 +4277,11 @@ function _is_native_reflect_construct() {
4151
4277
  *
4152
4278
  * When a single record is provided, the function returns the change details directly or throws on error.
4153
4279
  * When multiple records are provided, it returns a paired success/error result.
4280
+ *
4281
+ * @param context - Authenticated Zoho CRM context for making API calls
4282
+ * @param fetchUrlPrefix - URL path segment appended after the module name (empty string for insert/update, '/upsert' for upsert)
4283
+ * @param fetchMethod - HTTP method to use for the request (POST for insert/upsert, PUT for update)
4284
+ * @returns Overloaded function handling both single and multi-record operations
4154
4285
  */ function updateRecordLikeFunction(context, fetchUrlPrefix, fetchMethod) {
4155
4286
  return function(param) {
4156
4287
  var data = param.data, module = param.module;
@@ -4163,6 +4294,7 @@ function _is_native_reflect_construct() {
4163
4294
  return result;
4164
4295
  } else {
4165
4296
  var successItems = result.successItems, errorItems = result.errorItems;
4297
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- array may be empty at runtime
4166
4298
  if (errorItems[0] != null) {
4167
4299
  throw zohoCrmRecordCrudError(errorItems[0].result);
4168
4300
  } else {
@@ -4415,9 +4547,9 @@ function _is_native_reflect_construct() {
4415
4547
  if (!baseInput.word && !input.cvid && !input.criteria && !input.email && !input.phone) {
4416
4548
  throw new Error('At least one of word, cvid, criteria, email, or phone must be provided');
4417
4549
  }
4418
- var urlParams = zohoCrmUrlSearchParamsMinusModule(baseInput);
4419
- return urlParams;
4550
+ return zohoCrmUrlSearchParamsMinusModule(baseInput);
4420
4551
  }
4552
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- fetchJson may return null for empty results
4421
4553
  return function(input) {
4422
4554
  return context.fetchJson("/v8/".concat(input.module, "/search?").concat(searchRecordsUrlSearchParams(input).toString()), zohoCrmApiFetchJsonInput('GET')).then(function(x) {
4423
4555
  return x !== null && x !== void 0 ? x : {
@@ -4485,11 +4617,12 @@ function _is_native_reflect_construct() {
4485
4617
  */ function zohoCrmGetRelatedRecordsFunctionFactory(context) {
4486
4618
  return function(config) {
4487
4619
  var targetModule = config.targetModule, _config_returnEmptyRecordsInsteadOfNull = config.returnEmptyRecordsInsteadOfNull, returnEmptyRecordsInsteadOfNull = _config_returnEmptyRecordsInsteadOfNull === void 0 ? true : _config_returnEmptyRecordsInsteadOfNull;
4620
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- Zoho API migration pending
4488
4621
  return function(input) {
4489
4622
  return context.fetchJson("/v8/".concat(input.module, "/").concat(input.id, "/").concat(targetModule, "?").concat(zohoCrmUrlSearchParamsMinusIdAndModule(input, input.filter).toString()), zohoCrmApiFetchJsonInput('GET')).then(function(x) {
4490
4623
  return x !== null && x !== void 0 ? x : returnEmptyRecordsInsteadOfNull !== false ? emptyZohoPageResult() : x;
4491
4624
  });
4492
- };
4625
+ }; // eslint-disable-line @typescript-eslint/no-unnecessary-condition -- fetchJson may return null for empty results
4493
4626
  };
4494
4627
  }
4495
4628
  /**
@@ -4521,6 +4654,7 @@ function _is_native_reflect_construct() {
4521
4654
  return function(input) {
4522
4655
  return getEmailsFactory(input).then(function(x) {
4523
4656
  var _x_data;
4657
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Zoho API may return Emails instead of data
4524
4658
  var data = (_x_data = x.data) !== null && _x_data !== void 0 ? _x_data : x.Emails;
4525
4659
  return _object_spread_props$6(_object_spread$7({}, x), {
4526
4660
  data: data
@@ -4802,6 +4936,9 @@ function _is_native_reflect_construct() {
4802
4936
  // MARK: Util
4803
4937
  /**
4804
4938
  * Builds URL search params from the input objects, omitting the `module` key since it is used in the URL path rather than as a query parameter.
4939
+ *
4940
+ * @param input - One or more objects to convert into URL search parameters
4941
+ * @returns URL search params string with the `module` key excluded
4805
4942
  */ function zohoCrmUrlSearchParamsMinusModule() {
4806
4943
  for(var _len = arguments.length, input = new Array(_len), _key = 0; _key < _len; _key++){
4807
4944
  input[_key] = arguments[_key];
@@ -4812,6 +4949,9 @@ function _is_native_reflect_construct() {
4812
4949
  }
4813
4950
  /**
4814
4951
  * Builds URL search params from the input objects, omitting both `id` and `module` keys since they are used in the URL path.
4952
+ *
4953
+ * @param input - One or more objects to convert into URL search parameters
4954
+ * @returns URL search params string with `id` and `module` keys excluded
4815
4955
  */ function zohoCrmUrlSearchParamsMinusIdAndModule() {
4816
4956
  for(var _len = arguments.length, input = new Array(_len), _key = 0; _key < _len; _key++){
4817
4957
  input[_key] = arguments[_key];
@@ -4828,19 +4968,26 @@ function _is_native_reflect_construct() {
4828
4968
  */ var zohoCrmUrlSearchParams = makeUrlSearchParams;
4829
4969
  /**
4830
4970
  * Constructs the standard FetchJsonInput used by CRM API calls, pairing the HTTP method with an optional body.
4971
+ *
4972
+ * @param method - HTTP method to use for the request
4973
+ * @param body - Optional request body to include
4974
+ * @returns Configured fetch input for the Zoho CRM API call
4831
4975
  */ function zohoCrmApiFetchJsonInput(method, body) {
4832
- var result = {
4976
+ return {
4833
4977
  method: method,
4834
4978
  body: body !== null && body !== void 0 ? body : undefined
4835
4979
  };
4836
- return result;
4837
4980
  }
4838
4981
  // MARK: Results
4839
4982
  /**
4840
4983
  * Catches ZohoServerFetchResponseDataArrayError and returns the error data array as the response data, as each data element will have the error details.
4841
4984
  *
4842
4985
  * Use to catch errors from functions that return ZohoCrmChangeObjectLikeResponse and pass the result to zohoCrmChangeObjectLikeResponseSuccessAndErrorPairs.
4843
- */ function zohoCrmCatchZohoCrmChangeObjectLikeResponseError(e) {
4986
+ *
4987
+ * @param e - The error to catch and potentially convert
4988
+ * @returns The error data array wrapped as a change object response
4989
+ */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic constraint requires any
4990
+ function zohoCrmCatchZohoCrmChangeObjectLikeResponseError(e) {
4844
4991
  var result;
4845
4992
  if (_instanceof$3(e, ZohoServerFetchResponseDataArrayError)) {
4846
4993
  result = {
@@ -4977,6 +5124,9 @@ function _object_spread_props$5(target, source) {
4977
5124
  * Creates notes directly in the CRM Notes module. Each note must include the parent record reference and module name.
4978
5125
  *
4979
5126
  * For creating notes associated with a specific record, prefer {@link zohoCrmCreateNotesForRecord} which handles parent binding automatically.
5127
+ *
5128
+ * @param context - Authenticated Zoho CRM context for making API calls
5129
+ * @returns Function that creates notes in the CRM Notes module
4980
5130
  */ function zohoCrmCreateNotes(context) {
4981
5131
  return function(input) {
4982
5132
  return context.fetchJson("/v2/".concat(ZOHO_CRM_NOTES_MODULE), zohoCrmApiFetchJsonInput('POST', {
@@ -4988,6 +5138,9 @@ function _object_spread_props$5(target, source) {
4988
5138
  }
4989
5139
  /**
4990
5140
  * Deletes one or more notes from the CRM Notes module by their IDs.
5141
+ *
5142
+ * @param context - Authenticated Zoho CRM context for making API calls
5143
+ * @returns Function that deletes notes by their IDs
4991
5144
  */ function zohoCrmDeleteNotes(context) {
4992
5145
  return function(input) {
4993
5146
  return context.fetchJson("/v2/".concat(ZOHO_CRM_NOTES_MODULE, "?").concat(makeUrlSearchParams({
@@ -4999,6 +5152,9 @@ function _object_spread_props$5(target, source) {
4999
5152
  }
5000
5153
  /**
5001
5154
  * Retrieves paginated notes associated with a specific CRM record using the related records API.
5155
+ *
5156
+ * @param context - Authenticated Zoho CRM context for making API calls
5157
+ * @returns Function that retrieves notes for a specific record
5002
5158
  */ function zohoCrmGetNotesForRecord(context) {
5003
5159
  return zohoCrmGetRelatedRecordsFunctionFactory(context)({
5004
5160
  targetModule: ZOHO_CRM_NOTES_MODULE
@@ -5006,6 +5162,9 @@ function _object_spread_props$5(target, source) {
5006
5162
  }
5007
5163
  /**
5008
5164
  * Creates a page factory for iterating through all notes for a record across multiple pages.
5165
+ *
5166
+ * @param context - Authenticated Zoho CRM context for making API calls
5167
+ * @returns Page factory for paginating through notes for a record
5009
5168
  */ function zohoCrmGetNotesForRecordPageFactory(context) {
5010
5169
  return zohoFetchPageFactory(zohoCrmGetNotesForRecord(context));
5011
5170
  }
@@ -5013,6 +5172,9 @@ function _object_spread_props$5(target, source) {
5013
5172
  * Creates notes for a specific record, automatically binding the parent module and record ID to each note entry.
5014
5173
  *
5015
5174
  * https://www.zoho.com/crm/developer/docs/api/v8/create-notes.html
5175
+ *
5176
+ * @param context - Authenticated Zoho CRM context for making API calls
5177
+ * @returns Function that creates notes bound to a specific record
5016
5178
  */ function zohoCrmCreateNotesForRecord(context) {
5017
5179
  var createNotesInstance = zohoCrmCreateNotes(context);
5018
5180
  return function(input) {
@@ -5110,6 +5272,9 @@ function _unsupported_iterable_to_array(o, minLen) {
5110
5272
  }
5111
5273
  /**
5112
5274
  * Creates one or more tags for a CRM module. Duplicate tag errors are separated from other errors in the result to simplify idempotent workflows.
5275
+ *
5276
+ * @param context - Authenticated Zoho CRM context for making API calls
5277
+ * @returns Function that creates tags for a module
5113
5278
  */ function zohoCrmCreateTagsForModule(context) {
5114
5279
  return function(input) {
5115
5280
  return context.fetchJson("/v8/settings/tags?".concat(makeUrlSearchParams({
@@ -5151,8 +5316,8 @@ function _unsupported_iterable_to_array(o, minLen) {
5151
5316
  *
5152
5317
  * https://www.zoho.com/crm/developer/docs/api/v8/delete-tag.html
5153
5318
  *
5154
- * @param context
5155
- * @returns
5319
+ * @param context - Authenticated Zoho CRM context for making API calls
5320
+ * @returns Function that deletes a tag by ID
5156
5321
  */ function zohoCrmDeleteTag(context) {
5157
5322
  return function(input) {
5158
5323
  return context.fetchJson("/v8/settings/tags/".concat(input.id), zohoCrmApiFetchJsonInput('DELETE')).then(function(x) {
@@ -5165,8 +5330,8 @@ function _unsupported_iterable_to_array(o, minLen) {
5165
5330
  *
5166
5331
  * https://www.zoho.com/crm/developer-guide/apiv2/get-tag-list.html
5167
5332
  *
5168
- * @param context
5169
- * @returns
5333
+ * @param context - Authenticated Zoho CRM context for making API calls
5334
+ * @returns Function that retrieves tags for a module
5170
5335
  */ function zohoCrmGetTagsForModule(context) {
5171
5336
  return function(input) {
5172
5337
  return context.fetchJson("/v8/settings/tags?".concat(makeUrlSearchParams({
@@ -5182,6 +5347,9 @@ function _unsupported_iterable_to_array(o, minLen) {
5182
5347
  }
5183
5348
  /**
5184
5349
  * Creates a page factory for iterating through all tags in a module across multiple pages.
5350
+ *
5351
+ * @param context - Authenticated Zoho CRM context for making API calls
5352
+ * @returns Page factory for paginating through tags in a module
5185
5353
  */ function zohoCrmGetTagsForModulePageFactory(context) {
5186
5354
  return zohoFetchPageFactory(zohoCrmGetTagsForModule(context));
5187
5355
  }
@@ -5194,8 +5362,8 @@ function _unsupported_iterable_to_array(o, minLen) {
5194
5362
  *
5195
5363
  * https://www.zoho.com/crm/developer-guide/apiv2/add-tags.html
5196
5364
  *
5197
- * @param context
5198
- * @returns
5365
+ * @param context - Authenticated Zoho CRM context for making API calls
5366
+ * @returns Function that adds tags to records
5199
5367
  */ function zohoCrmAddTagsToRecords(context) {
5200
5368
  return function(input) {
5201
5369
  return context.fetchJson("/v8/".concat(input.module, "/actions/add_tags"), zohoCrmApiFetchJsonInput('POST', zohoCrmAddTagsToRecordsRequestBody(input))).then(function(x) {
@@ -5208,6 +5376,9 @@ function _unsupported_iterable_to_array(o, minLen) {
5208
5376
  }
5209
5377
  /**
5210
5378
  * Builds the request body for the add/remove tags endpoints, merging `tag_names` into `tags` and enforcing the max ID limit.
5379
+ *
5380
+ * @param input - The add/remove tags request containing tag names, tag objects, and record IDs
5381
+ * @returns The formatted request body with merged tags and record IDs
5211
5382
  */ function zohoCrmAddTagsToRecordsRequestBody(input) {
5212
5383
  if (Array.isArray(input.ids) && input.ids.length > ZOHO_CRM_ADD_TAGS_TO_RECORDS_MAX_IDS_ALLOWED) {
5213
5384
  throw new Error("Cannot add/remove tags from more than ".concat(ZOHO_CRM_ADD_TAGS_TO_RECORDS_MAX_IDS_ALLOWED, " records at once."));
@@ -5240,8 +5411,8 @@ function _unsupported_iterable_to_array(o, minLen) {
5240
5411
  *
5241
5412
  * https://www.zoho.com/crm/developer-guide/apiv2/remove-tags.html
5242
5413
  *
5243
- * @param context
5244
- * @returns
5414
+ * @param context - Authenticated Zoho CRM context for making API calls
5415
+ * @returns Function that removes tags from records
5245
5416
  */ function zohoCrmRemoveTagsFromRecords(context) {
5246
5417
  return function(input) {
5247
5418
  return context.fetchJson("/v8/".concat(input.module, "/actions/remove_tags"), zohoCrmApiFetchJsonInput('POST', zohoCrmAddTagsToRecordsRequestBody(input))).then(function(x) {
@@ -5508,7 +5679,7 @@ function _ts_generator$3(thisArg, body) {
5508
5679
  });
5509
5680
  var fetch = handleZohoCrmErrorFetch(baseFetch, logZohoServerErrorFunction, function(x) {
5510
5681
  if (_instanceof$1(x, ZohoInvalidTokenError)) {
5511
- accountsContext.loadAccessToken.resetAccessToken();
5682
+ void accountsContext.loadAccessToken.resetAccessToken();
5512
5683
  }
5513
5684
  });
5514
5685
  var fetchJson = fetchJsonFunction(fetch, {
@@ -5603,13 +5774,15 @@ function _object_spread_props$2(target, source) {
5603
5774
  * const secondPage = await firstPage.fetchNext();
5604
5775
  * }
5605
5776
  * ```
5606
- */ function zohoSignFetchPageFactory(fetch, defaults) {
5777
+ */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic constraint requires any
5778
+ function zohoSignFetchPageFactory(fetch, defaults) {
5607
5779
  return fetchPageFactory(_object_spread_props$2(_object_spread$3({}, defaults), {
5608
5780
  fetch: fetch,
5609
5781
  readFetchPageResultInfo: function readFetchPageResultInfo(result) {
5610
5782
  var _ref;
5611
5783
  var _result_page_context;
5612
5784
  return {
5785
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- page_context may be missing in malformed responses
5613
5786
  hasNext: (_ref = (_result_page_context = result.page_context) === null || _result_page_context === void 0 ? void 0 : _result_page_context.has_more_rows) !== null && _ref !== void 0 ? _ref : false
5614
5787
  };
5615
5788
  },
@@ -5694,6 +5867,10 @@ function _object_without_properties_loose(source, excluded) {
5694
5867
  // MARK: Utility
5695
5868
  /**
5696
5869
  * Builds a {@link FetchJsonInput} for Zoho Sign API calls.
5870
+ *
5871
+ * @param method - HTTP method for the request
5872
+ * @param body - Optional JSON body to include in the request
5873
+ * @returns Configured fetch JSON input
5697
5874
  */ function zohoSignApiFetchJsonInput(method, body) {
5698
5875
  return {
5699
5876
  method: method,
@@ -5859,7 +6036,8 @@ function _object_without_properties_loose(source, excluded) {
5859
6036
  ]);
5860
6037
  var searchParams = makeUrlSearchParams(params);
5861
6038
  var queryString = searchParams.toString();
5862
- var url = "/requests/".concat(requestId, "/pdf").concat(queryString ? "?".concat(queryString) : '');
6039
+ var suffix = queryString ? "?".concat(queryString) : '';
6040
+ var url = "/requests/".concat(requestId, "/pdf").concat(suffix);
5863
6041
  return context.fetch(url, {
5864
6042
  method: 'GET'
5865
6043
  });
@@ -6089,7 +6267,12 @@ function _object_without_properties_loose(source, excluded) {
6089
6267
  }
6090
6268
 
6091
6269
  var ZOHO_SIGN_SERVICE_NAME = 'sign';
6092
- function zohoSignConfigApiUrl(input) {
6270
+ /**
6271
+ * Resolves an environment key or passthrough URL to the full Zoho Sign API URL.
6272
+ *
6273
+ * @param input - An environment key ('sandbox' or 'production') or a full API URL
6274
+ * @returns The resolved Zoho Sign API URL
6275
+ */ function zohoSignConfigApiUrl(input) {
6093
6276
  switch(input){
6094
6277
  case 'sandbox':
6095
6278
  return 'https://signsandbox.zoho.com/api/v1';
@@ -6231,7 +6414,12 @@ function _ts_generator$2(thisArg, body) {
6231
6414
  var logZohoSignErrorToConsole = logZohoServerErrorFunction('ZohoSign', {
6232
6415
  logDataArrayErrors: false
6233
6416
  });
6234
- function parseZohoSignError(responseError) {
6417
+ /**
6418
+ * Parses the JSON body of a failed Zoho Sign fetch response into a structured error, returning undefined if the body cannot be parsed.
6419
+ *
6420
+ * @param responseError - The fetch response error to parse
6421
+ * @returns Parsed Zoho server error, or undefined if parsing fails
6422
+ */ function parseZohoSignError(responseError) {
6235
6423
  return _async_to_generator$2(function() {
6236
6424
  var data, result;
6237
6425
  return _ts_generator$2(this, function(_state) {
@@ -6256,7 +6444,13 @@ function parseZohoSignError(responseError) {
6256
6444
  });
6257
6445
  })();
6258
6446
  }
6259
- function parseZohoSignServerErrorResponseData(errorResponseData, responseError) {
6447
+ /**
6448
+ * Converts raw Zoho Sign error response data into a parsed error, delegating to Sign-specific handlers for known error codes and falling back to the shared Zoho parser.
6449
+ *
6450
+ * @param errorResponseData - Raw error response data from the Zoho Sign API
6451
+ * @param responseError - The underlying fetch response error
6452
+ * @returns Parsed Zoho server error, or undefined if the data contains no recognizable error
6453
+ */ function parseZohoSignServerErrorResponseData(errorResponseData, responseError) {
6260
6454
  var result;
6261
6455
  var error = tryFindZohoServerErrorData(errorResponseData, responseError);
6262
6456
  if (error) {
@@ -6528,7 +6722,7 @@ function _ts_generator$1(thisArg, body) {
6528
6722
  });
6529
6723
  var fetch = handleZohoSignErrorFetch(baseFetch, logZohoServerErrorFunction, function(x) {
6530
6724
  if (_instanceof(x, ZohoInvalidTokenError)) {
6531
- accountsContext.loadAccessToken.resetAccessToken();
6725
+ void accountsContext.loadAccessToken.resetAccessToken();
6532
6726
  }
6533
6727
  });
6534
6728
  var fetchJson = fetchJsonFunction(fetch, {
@@ -6639,18 +6833,26 @@ function _ts_generator$1(thisArg, body) {
6639
6833
  }
6640
6834
  /**
6641
6835
  * Constructs a standard {@link FetchJsonInput} for Zoho Accounts API calls with the given HTTP method and optional body.
6836
+ *
6837
+ * @param method - HTTP method to use for the request
6838
+ * @param body - Optional request body to include
6839
+ * @returns Configured fetch input for the Zoho Accounts API call
6642
6840
  */ function zohoAccountsApiFetchJsonInput(method, body) {
6643
- var result = {
6841
+ return {
6644
6842
  method: method,
6645
6843
  body: body
6646
6844
  };
6647
- return result;
6648
6845
  }
6649
6846
 
6650
6847
  /**
6651
6848
  * The Zoho Accounts API URL for the US datacenter.
6652
6849
  */ var ZOHO_ACCOUNTS_US_API_URL = 'https://accounts.zoho.com';
6653
- function zohoAccountsConfigApiUrl(input) {
6850
+ /**
6851
+ * Resolves a Zoho Accounts API URL input to the full base URL. The 'us' key maps to the US datacenter; custom URLs pass through unchanged.
6852
+ *
6853
+ * @param input - A well-known datacenter key or a custom Zoho Accounts API URL
6854
+ * @returns The resolved full Zoho Accounts API base URL
6855
+ */ function zohoAccountsConfigApiUrl(input) {
6654
6856
  switch(input){
6655
6857
  case 'us':
6656
6858
  return ZOHO_ACCOUNTS_US_API_URL;
@@ -7017,7 +7219,7 @@ function _ts_generator(thisArg, body) {
7017
7219
  }
7018
7220
  if (!!currentToken) return [
7019
7221
  3,
7020
- 10
7222
+ 9
7021
7223
  ];
7022
7224
  _state.label = 3;
7023
7225
  case 3:
@@ -7042,35 +7244,29 @@ function _ts_generator(thisArg, body) {
7042
7244
  console.error("zohoAccountsZohoAccessTokenFactory(): Failed retrieving new token from tokenRefresher: ", e);
7043
7245
  throw new ZohoAccountsAuthFailureError('Token Refresh Failed');
7044
7246
  case 6:
7045
- if (!currentToken) return [
7046
- 3,
7047
- 10
7048
- ];
7049
- _state.label = 7;
7050
- case 7:
7051
7247
  _state.trys.push([
7052
- 7,
7053
- 9,
7248
+ 6,
7249
+ 8,
7054
7250
  ,
7055
- 10
7251
+ 9
7056
7252
  ]);
7057
7253
  return [
7058
7254
  4,
7059
7255
  accessTokenCache === null || accessTokenCache === void 0 ? void 0 : accessTokenCache.updateCachedToken(currentToken)
7060
7256
  ];
7061
- case 8:
7257
+ case 7:
7062
7258
  _state.sent();
7063
7259
  return [
7064
7260
  3,
7065
- 10
7261
+ 9
7066
7262
  ];
7067
- case 9:
7263
+ case 8:
7068
7264
  _state.sent();
7069
7265
  return [
7070
7266
  3,
7071
- 10
7267
+ 9
7072
7268
  ];
7073
- case 10:
7269
+ case 9:
7074
7270
  return [
7075
7271
  2,
7076
7272
  currentToken
@@ -7103,4 +7299,4 @@ function safeZohoDateTimeString(date) {
7103
7299
  return isoDate.substring(0, isoDate.length - 5) + 'Z';
7104
7300
  }
7105
7301
 
7106
- export { DEFAULT_ZOHO_API_RATE_LIMIT, DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD, DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION, MAX_ZOHO_CRM_SEARCH_MODULE_RECORDS_CRITERIA, MAX_ZOHO_RECRUIT_SEARCH_MODULE_RECORDS_CRITERIA, ZOHO_ACCOUNTS_INVALID_CLIENT_ERROR_CODE, ZOHO_ACCOUNTS_INVALID_CODE_ERROR_CODE, ZOHO_ACCOUNTS_US_API_URL, ZOHO_CRM_ADD_TAGS_TO_RECORDS_MAX_IDS_ALLOWED, ZOHO_CRM_ALREADY_ASSOCIATED_ERROR_CODE, ZOHO_CRM_ATTACHMENTS_MODULE, ZOHO_CRM_ATTACHMENT_MAX_SIZE, ZOHO_CRM_CONTACTS_MODULE, ZOHO_CRM_CRUD_FUNCTION_MAX_RECORDS_LIMIT, ZOHO_CRM_EMAILS_MODULE, ZOHO_CRM_LEADS_MODULE, ZOHO_CRM_NOTES_MODULE, ZOHO_CRM_RECORD_ATTACHMENT_METADATA_ATTACH_TYPE_RESUME, ZOHO_CRM_REMOVE_TAGS_FROM_RECORDS_MAX_IDS_ALLOWED, ZOHO_CRM_SERVICE_NAME, ZOHO_CRM_TAG_NAME_MAX_LENGTH, ZOHO_CRM_TASKS_MODULE, ZOHO_DATA_ARRAY_BLANK_ERROR_CODE, ZOHO_DUPLICATE_DATA_ERROR_CODE, ZOHO_ERROR_STATUS, ZOHO_FAILURE_ERROR_CODE, ZOHO_INTERNAL_ERROR_CODE, ZOHO_INVALID_AUTHORIZATION_ERROR_CODE, ZOHO_INVALID_DATA_ERROR_CODE, ZOHO_INVALID_QUERY_ERROR_CODE, ZOHO_INVALID_TOKEN_ERROR_CODE, ZOHO_MANDATORY_NOT_FOUND_ERROR_CODE, ZOHO_RATE_LIMIT_LIMIT_HEADER, ZOHO_RATE_LIMIT_REMAINING_HEADER, ZOHO_RATE_LIMIT_RESET_HEADER, ZOHO_RECRUIT_ADD_TAGS_TO_RECORDS_MAX_IDS_ALLOWED, ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE, ZOHO_RECRUIT_ATTACHMENTS_MODULE, ZOHO_RECRUIT_ATTACHMENT_MAX_SIZE, ZOHO_RECRUIT_CANDIDATES_MODULE, ZOHO_RECRUIT_CRUD_FUNCTION_MAX_RECORDS_LIMIT, ZOHO_RECRUIT_EMAILS_MODULE, ZOHO_RECRUIT_JOB_OPENINGS_MODULE, ZOHO_RECRUIT_NOTES_MODULE, ZOHO_RECRUIT_RECORD_ATTACHMENT_METADATA_ATTACH_TYPE_RESUME, ZOHO_RECRUIT_REMOVE_TAGS_FROM_RECORDS_MAX_IDS_ALLOWED, ZOHO_RECRUIT_SERVICE_NAME, ZOHO_RECRUIT_TAG_NAME_MAX_LENGTH, ZOHO_SIGN_SERVICE_NAME, ZOHO_SUCCESS_CODE, ZOHO_SUCCESS_STATUS, ZOHO_TOO_MANY_REQUESTS_ERROR_CODE, ZOHO_TOO_MANY_REQUESTS_HTTP_STATUS_CODE, ZohoAccountsAccessTokenError, ZohoAccountsAuthFailureError, ZohoCrmExecuteRestApiFunctionError, ZohoCrmRecordCrudDuplicateDataError, ZohoCrmRecordCrudError, ZohoCrmRecordCrudInvalidDataError, ZohoCrmRecordCrudMandatoryFieldNotFoundError, ZohoCrmRecordCrudNoMatchingRecordError, ZohoCrmRecordNoContentError, ZohoInternalError, ZohoInvalidAuthorizationError, ZohoInvalidQueryError, ZohoInvalidTokenError, ZohoRecruitExecuteRestApiFunctionError, ZohoRecruitRecordCrudDuplicateDataError, ZohoRecruitRecordCrudError, ZohoRecruitRecordCrudInvalidDataError, ZohoRecruitRecordCrudMandatoryFieldNotFoundError, ZohoRecruitRecordCrudNoMatchingRecordError, ZohoRecruitRecordNoContentError, ZohoServerError, ZohoServerFetchResponseDataArrayError, ZohoServerFetchResponseError, ZohoTooManyRequestsError, addTagsToRecords, assertRecordDataArrayResultHasContent, assertZohoCrmRecordDataArrayResultHasContent, assertZohoRecruitRecordDataArrayResultHasContent, createNotes, createNotesForRecord, createTagsForModule, deleteAttachmentFromRecord, deleteNotes, deleteRecord, downloadAttachmentForRecord, emptyZohoPageResult, escapeZohoCrmFieldValueForCriteriaString, executeRestApiFunction, getAttachmentsForRecord, getAttachmentsForRecordPageFactory, getEmailsForRecord, getEmailsForRecordPageFactory, getNotesForRecord, getNotesForRecordPageFactory, getRecordById, getRecords, getRelatedRecordsFunctionFactory, getTagsForModule, getTagsForModulePageFactory, handleZohoAccountsErrorFetch, handleZohoCrmErrorFetch, handleZohoErrorFetchFactory, handleZohoRecruitErrorFetch, handleZohoSignErrorFetch, insertRecord, interceptZohoAccounts200StatusWithErrorResponse, interceptZohoCrm200StatusWithErrorResponse, interceptZohoErrorResponseFactory, interceptZohoRecruit200StatusWithErrorResponse, interceptZohoSign200StatusWithErrorResponse, isZohoCrmValidUrl, isZohoRecruitValidUrl, isZohoServerErrorResponseDataArrayRef, logZohoAccountsErrorToConsole, logZohoCrmErrorToConsole, logZohoRecruitErrorToConsole, logZohoServerErrorFunction, logZohoSignErrorToConsole, parseZohoAccountsError, parseZohoAccountsServerErrorResponseData, parseZohoCrmError, parseZohoCrmServerErrorResponseData, parseZohoRecruitError, parseZohoRecruitServerErrorResponseData, parseZohoServerErrorResponseData, parseZohoSignError, parseZohoSignServerErrorResponseData, removeTagsFromRecords, safeZohoDateTimeString, searchRecords, searchRecordsPageFactory, tryFindZohoServerErrorData, updateRecord, uploadAttachmentForRecord, upsertRecord, zohoAccessTokenStringFactory, zohoAccountsAccessToken, zohoAccountsApiFetchJsonInput, zohoAccountsConfigApiUrl, zohoAccountsFactory, zohoAccountsRefreshTokenFromAuthorizationCode, zohoAccountsZohoAccessTokenFactory, zohoCrmAddTagsToRecords, zohoCrmAddTagsToRecordsRequestBody, zohoCrmApiFetchJsonInput, zohoCrmCatchZohoCrmChangeObjectLikeResponseError, zohoCrmChangeObjectLikeResponseSuccessAndErrorPairs, zohoCrmConfigApiUrl, zohoCrmCreateNotes, zohoCrmCreateNotesForRecord, zohoCrmCreateTagsForModule, zohoCrmDeleteAttachmentFromRecord, zohoCrmDeleteNotes, zohoCrmDeleteRecord, zohoCrmDeleteTag, zohoCrmDownloadAttachmentForRecord, zohoCrmExecuteRestApiFunction, zohoCrmFactory, zohoCrmGetAttachmentsForRecord, zohoCrmGetAttachmentsForRecordPageFactory, zohoCrmGetEmailsForRecord, zohoCrmGetEmailsForRecordPageFactory, zohoCrmGetNotesForRecord, zohoCrmGetNotesForRecordPageFactory, zohoCrmGetRecordById, zohoCrmGetRecords, zohoCrmGetRelatedRecordsFunctionFactory, zohoCrmGetTagsForModule, zohoCrmGetTagsForModulePageFactory, zohoCrmInsertRecord, zohoCrmMultiRecordResult, zohoCrmRecordCrudError, zohoCrmRemoveTagsFromRecords, zohoCrmSearchRecords, zohoCrmSearchRecordsCriteriaEntryToCriteriaString, zohoCrmSearchRecordsCriteriaString, zohoCrmSearchRecordsCriteriaStringForTree, zohoCrmSearchRecordsPageFactory, zohoCrmUpdateRecord, zohoCrmUploadAttachmentForRecord, zohoCrmUpsertRecord, zohoCrmUrlSearchParams, zohoCrmUrlSearchParamsMinusIdAndModule, zohoCrmUrlSearchParamsMinusModule, zohoDateTimeString, zohoFetchPageFactory, zohoRateLimitHeaderDetails, zohoRateLimitedFetchHandler, zohoRecruitAddTagsToRecords, zohoRecruitApiFetchJsonInput, zohoRecruitAssociateCandidateRecordsWithJobOpenings, zohoRecruitChangeObjectLikeResponseSuccessAndErrorPairs, zohoRecruitConfigApiUrl, zohoRecruitCreateNotes, zohoRecruitCreateNotesForRecord, zohoRecruitCreateTagsForModule, zohoRecruitDeleteAttachmentFromRecord, zohoRecruitDeleteNotes, zohoRecruitDeleteRecord, zohoRecruitDownloadAttachmentForRecord, zohoRecruitExecuteRestApiFunction, zohoRecruitFactory, zohoRecruitGetAttachmentsForRecord, zohoRecruitGetAttachmentsForRecordPageFactory, zohoRecruitGetEmailsForRecord, zohoRecruitGetEmailsForRecordPageFactory, zohoRecruitGetNotesForRecord, zohoRecruitGetNotesForRecordPageFactory, zohoRecruitGetRecordById, zohoRecruitGetRecords, zohoRecruitGetRelatedRecordsFunctionFactory, zohoRecruitGetTagsForModule, zohoRecruitGetTagsForModulePageFactory, zohoRecruitInsertRecord, zohoRecruitMultiRecordResult, zohoRecruitRecordCrudError, zohoRecruitRemoveTagsFromRecords, zohoRecruitSearchAssociatedRecords, zohoRecruitSearchCandidateAssociatedJobOpeningRecords, zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory, zohoRecruitSearchJobOpeningAssociatedCandidateRecords, zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory, zohoRecruitSearchRecords, zohoRecruitSearchRecordsCriteriaEntryToCriteriaString, zohoRecruitSearchRecordsCriteriaString, zohoRecruitSearchRecordsCriteriaStringForTree, zohoRecruitSearchRecordsPageFactory, zohoRecruitUpdateRecord, zohoRecruitUploadAttachmentForRecord, zohoRecruitUpsertRecord, zohoRecruitUrlSearchParams, zohoRecruitUrlSearchParamsMinusIdAndModule, zohoRecruitUrlSearchParamsMinusModule, zohoServerErrorData, zohoSignConfigApiUrl, zohoSignCreateDocument, zohoSignDeleteDocument, zohoSignDownloadCompletionCertificate, zohoSignDownloadPdf, zohoSignExtendDocument, zohoSignFactory, zohoSignFetchPageFactory, zohoSignGetDocument, zohoSignGetDocumentFormData, zohoSignGetDocuments, zohoSignGetDocumentsPageFactory, zohoSignRetrieveFieldTypes, zohoSignSendDocumentForSignature, zohoSignUpdateDocument };
7302
+ export { DEFAULT_ZOHO_API_RATE_LIMIT, DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD, DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION, DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION, MAX_ZOHO_CRM_SEARCH_MODULE_RECORDS_CRITERIA, MAX_ZOHO_RECRUIT_SEARCH_MODULE_RECORDS_CRITERIA, ZOHO_ACCOUNTS_INVALID_CLIENT_ERROR_CODE, ZOHO_ACCOUNTS_INVALID_CODE_ERROR_CODE, ZOHO_ACCOUNTS_US_API_URL, ZOHO_CRM_ADD_TAGS_TO_RECORDS_MAX_IDS_ALLOWED, ZOHO_CRM_ALREADY_ASSOCIATED_ERROR_CODE, ZOHO_CRM_ATTACHMENTS_MODULE, ZOHO_CRM_ATTACHMENT_MAX_SIZE, ZOHO_CRM_CONTACTS_MODULE, ZOHO_CRM_CRUD_FUNCTION_MAX_RECORDS_LIMIT, ZOHO_CRM_EMAILS_MODULE, ZOHO_CRM_LEADS_MODULE, ZOHO_CRM_NOTES_MODULE, ZOHO_CRM_RECORD_ATTACHMENT_METADATA_ATTACH_TYPE_RESUME, ZOHO_CRM_REMOVE_TAGS_FROM_RECORDS_MAX_IDS_ALLOWED, ZOHO_CRM_SERVICE_NAME, ZOHO_CRM_TAG_NAME_MAX_LENGTH, ZOHO_CRM_TASKS_MODULE, ZOHO_DATA_ARRAY_BLANK_ERROR_CODE, ZOHO_DUPLICATE_DATA_ERROR_CODE, ZOHO_ERROR_STATUS, ZOHO_FAILURE_ERROR_CODE, ZOHO_INTERNAL_ERROR_CODE, ZOHO_INVALID_AUTHORIZATION_ERROR_CODE, ZOHO_INVALID_DATA_ERROR_CODE, ZOHO_INVALID_QUERY_ERROR_CODE, ZOHO_INVALID_TOKEN_ERROR_CODE, ZOHO_MANDATORY_NOT_FOUND_ERROR_CODE, ZOHO_RATE_LIMIT_LIMIT_HEADER, ZOHO_RATE_LIMIT_REMAINING_HEADER, ZOHO_RATE_LIMIT_RESET_HEADER, ZOHO_RECRUIT_ADD_TAGS_TO_RECORDS_MAX_IDS_ALLOWED, ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE, ZOHO_RECRUIT_ATTACHMENTS_MODULE, ZOHO_RECRUIT_ATTACHMENT_MAX_SIZE, ZOHO_RECRUIT_CANDIDATES_MODULE, ZOHO_RECRUIT_CRUD_FUNCTION_MAX_RECORDS_LIMIT, ZOHO_RECRUIT_EMAILS_MODULE, ZOHO_RECRUIT_JOB_OPENINGS_MODULE, ZOHO_RECRUIT_NOTES_MODULE, ZOHO_RECRUIT_RECORD_ATTACHMENT_METADATA_ATTACH_TYPE_RESUME, ZOHO_RECRUIT_REMOVE_TAGS_FROM_RECORDS_MAX_IDS_ALLOWED, ZOHO_RECRUIT_SERVICE_NAME, ZOHO_RECRUIT_TAG_NAME_MAX_LENGTH, ZOHO_SIGN_SERVICE_NAME, ZOHO_SUCCESS_CODE, ZOHO_SUCCESS_STATUS, ZOHO_TOO_MANY_REQUESTS_ERROR_CODE, ZOHO_TOO_MANY_REQUESTS_HTTP_STATUS_CODE, ZohoAccountsAccessTokenError, ZohoAccountsAuthFailureError, ZohoCrmExecuteRestApiFunctionError, ZohoCrmRecordCrudDuplicateDataError, ZohoCrmRecordCrudError, ZohoCrmRecordCrudInvalidDataError, ZohoCrmRecordCrudMandatoryFieldNotFoundError, ZohoCrmRecordCrudNoMatchingRecordError, ZohoCrmRecordNoContentError, ZohoInternalError, ZohoInvalidAuthorizationError, ZohoInvalidQueryError, ZohoInvalidTokenError, ZohoRecruitExecuteRestApiFunctionError, ZohoRecruitRecordCrudDuplicateDataError, ZohoRecruitRecordCrudError, ZohoRecruitRecordCrudInvalidDataError, ZohoRecruitRecordCrudMandatoryFieldNotFoundError, ZohoRecruitRecordCrudNoMatchingRecordError, ZohoRecruitRecordNoContentError, ZohoServerError, ZohoServerFetchResponseDataArrayError, ZohoServerFetchResponseError, ZohoTooManyRequestsError, addTagsToRecords, assertRecordDataArrayResultHasContent, assertZohoCrmRecordDataArrayResultHasContent, assertZohoRecruitRecordDataArrayResultHasContent, createNotes, createNotesForRecord, createTagsForModule, deleteAttachmentFromRecord, deleteNotes, deleteRecord, downloadAttachmentForRecord, emptyZohoPageResult, escapeZohoCrmFieldValueForCriteriaString, executeRestApiFunction, getAttachmentsForRecord, getAttachmentsForRecordPageFactory, getEmailsForRecord, getEmailsForRecordPageFactory, getNotesForRecord, getNotesForRecordPageFactory, getRecordById, getRecords, getRelatedRecordsFunctionFactory, getTagsForModule, getTagsForModulePageFactory, handleZohoAccountsErrorFetch, handleZohoCrmErrorFetch, handleZohoErrorFetchFactory, handleZohoRecruitErrorFetch, handleZohoSignErrorFetch, insertRecord, interceptZohoAccounts200StatusWithErrorResponse, interceptZohoCrm200StatusWithErrorResponse, interceptZohoErrorResponseFactory, interceptZohoRecruit200StatusWithErrorResponse, interceptZohoSign200StatusWithErrorResponse, isZohoCrmValidUrl, isZohoRecruitValidUrl, isZohoServerErrorResponseDataArrayRef, logZohoAccountsErrorToConsole, logZohoCrmErrorToConsole, logZohoRecruitErrorToConsole, logZohoServerErrorFunction, logZohoSignErrorToConsole, parseZohoAccountsError, parseZohoAccountsServerErrorResponseData, parseZohoCrmError, parseZohoCrmServerErrorResponseData, parseZohoRecruitError, parseZohoRecruitServerErrorResponseData, parseZohoServerErrorResponseData, parseZohoSignError, parseZohoSignServerErrorResponseData, removeTagsFromRecords, safeZohoDateTimeString, searchRecords, searchRecordsPageFactory, tryFindZohoServerErrorData, updateRecord, uploadAttachmentForRecord, upsertRecord, zohoAccessTokenStringFactory, zohoAccountsAccessToken, zohoAccountsApiFetchJsonInput, zohoAccountsConfigApiUrl, zohoAccountsFactory, zohoAccountsRefreshTokenFromAuthorizationCode, zohoAccountsZohoAccessTokenFactory, zohoCrmAddTagsToRecords, zohoCrmAddTagsToRecordsRequestBody, zohoCrmApiFetchJsonInput, zohoCrmCatchZohoCrmChangeObjectLikeResponseError, zohoCrmChangeObjectLikeResponseSuccessAndErrorPairs, zohoCrmConfigApiUrl, zohoCrmCreateNotes, zohoCrmCreateNotesForRecord, zohoCrmCreateTagsForModule, zohoCrmDeleteAttachmentFromRecord, zohoCrmDeleteNotes, zohoCrmDeleteRecord, zohoCrmDeleteTag, zohoCrmDownloadAttachmentForRecord, zohoCrmExecuteRestApiFunction, zohoCrmFactory, zohoCrmGetAttachmentsForRecord, zohoCrmGetAttachmentsForRecordPageFactory, zohoCrmGetEmailsForRecord, zohoCrmGetEmailsForRecordPageFactory, zohoCrmGetNotesForRecord, zohoCrmGetNotesForRecordPageFactory, zohoCrmGetRecordById, zohoCrmGetRecords, zohoCrmGetRelatedRecordsFunctionFactory, zohoCrmGetTagsForModule, zohoCrmGetTagsForModulePageFactory, zohoCrmInsertRecord, zohoCrmMultiRecordResult, zohoCrmRecordCrudError, zohoCrmRemoveTagsFromRecords, zohoCrmSearchRecords, zohoCrmSearchRecordsCriteriaEntryToCriteriaString, zohoCrmSearchRecordsCriteriaString, zohoCrmSearchRecordsCriteriaStringForTree, zohoCrmSearchRecordsPageFactory, zohoCrmUpdateRecord, zohoCrmUploadAttachmentForRecord, zohoCrmUpsertRecord, zohoCrmUrlSearchParams, zohoCrmUrlSearchParamsMinusIdAndModule, zohoCrmUrlSearchParamsMinusModule, zohoDateTimeString, zohoFetchPageFactory, zohoRateLimitHeaderDetails, zohoRateLimitedFetchHandler, zohoRecruitAddTagsToRecords, zohoRecruitApiFetchJsonInput, zohoRecruitAssociateCandidateRecordsWithJobOpenings, zohoRecruitChangeObjectLikeResponseSuccessAndErrorPairs, zohoRecruitConfigApiUrl, zohoRecruitCreateNotes, zohoRecruitCreateNotesForRecord, zohoRecruitCreateTagsForModule, zohoRecruitDeleteAttachmentFromRecord, zohoRecruitDeleteNotes, zohoRecruitDeleteRecord, zohoRecruitDownloadAttachmentForRecord, zohoRecruitExecuteRestApiFunction, zohoRecruitFactory, zohoRecruitGetAttachmentsForRecord, zohoRecruitGetAttachmentsForRecordPageFactory, zohoRecruitGetEmailsForRecord, zohoRecruitGetEmailsForRecordPageFactory, zohoRecruitGetNotesForRecord, zohoRecruitGetNotesForRecordPageFactory, zohoRecruitGetRecordById, zohoRecruitGetRecords, zohoRecruitGetRelatedRecordsFunctionFactory, zohoRecruitGetTagsForModule, zohoRecruitGetTagsForModulePageFactory, zohoRecruitInsertRecord, zohoRecruitMultiRecordResult, zohoRecruitRecordCrudError, zohoRecruitRemoveTagsFromRecords, zohoRecruitSearchAssociatedRecords, zohoRecruitSearchCandidateAssociatedJobOpeningRecords, zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory, zohoRecruitSearchJobOpeningAssociatedCandidateRecords, zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory, zohoRecruitSearchRecords, zohoRecruitSearchRecordsCriteriaEntryToCriteriaString, zohoRecruitSearchRecordsCriteriaString, zohoRecruitSearchRecordsCriteriaStringForTree, zohoRecruitSearchRecordsPageFactory, zohoRecruitUpdateRecord, zohoRecruitUploadAttachmentForRecord, zohoRecruitUpsertRecord, zohoRecruitUrlSearchParams, zohoRecruitUrlSearchParamsMinusIdAndModule, zohoRecruitUrlSearchParamsMinusModule, zohoServerErrorData, zohoSignConfigApiUrl, zohoSignCreateDocument, zohoSignDeleteDocument, zohoSignDownloadCompletionCertificate, zohoSignDownloadPdf, zohoSignExtendDocument, zohoSignFactory, zohoSignFetchPageFactory, zohoSignGetDocument, zohoSignGetDocumentFormData, zohoSignGetDocuments, zohoSignGetDocumentsPageFactory, zohoSignRetrieveFieldTypes, zohoSignSendDocumentForSignature, zohoSignUpdateDocument };