@dereekb/zoho 13.4.0 → 13.4.2

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 +272 -92
  2. package/index.esm.js +272 -93
  3. package/nestjs/index.cjs.js +404 -90
  4. package/nestjs/index.esm.js +404 -90
  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
@@ -111,6 +111,9 @@ function _object_spread_props$c(target, source) {
111
111
  */ var ZOHO_RECRUIT_SERVICE_NAME = 'recruit';
112
112
  /**
113
113
  * Resolves an environment key or passthrough URL to the full Zoho Recruit API URL.
114
+ *
115
+ * @param input - An environment key ('sandbox' or 'production') or a full API URL
116
+ * @returns The resolved Zoho Recruit API URL
114
117
  */ function zohoRecruitConfigApiUrl(input) {
115
118
  switch(input){
116
119
  case 'sandbox':
@@ -190,18 +193,20 @@ function _type_of$6(obj) {
190
193
  result = input;
191
194
  break;
192
195
  case 'object':
193
- var tree;
194
- if (Array.isArray(input)) {
195
- tree = {
196
- and: [
197
- input
198
- ]
199
- };
200
- } else {
201
- tree = input;
196
+ {
197
+ var tree;
198
+ if (Array.isArray(input)) {
199
+ tree = {
200
+ and: [
201
+ input
202
+ ]
203
+ };
204
+ } else {
205
+ tree = input;
206
+ }
207
+ result = zohoSearchRecordsCriteriaStringForTree(tree);
208
+ break;
202
209
  }
203
- result = zohoSearchRecordsCriteriaStringForTree(tree);
204
- break;
205
210
  }
206
211
  }
207
212
  return result;
@@ -552,7 +557,12 @@ function _ts_generator$9(thisArg, body) {
552
557
  /**
553
558
  * Set in the status field
554
559
  */ var ZOHO_ERROR_STATUS = 'error';
555
- function zohoServerErrorData(error) {
560
+ /**
561
+ * Normalizes a Zoho error response entry into a consistent {@link ZohoServerErrorData} shape, handling both object and string error formats.
562
+ *
563
+ * @param error - The raw error entry, either a structured object or a plain error code string
564
+ * @returns Normalized error data with code and message fields
565
+ */ function zohoServerErrorData(error) {
556
566
  var errorType = typeof error === "undefined" ? "undefined" : _type_of$5(error);
557
567
  var errorData;
558
568
  if (errorType === 'object') {
@@ -636,8 +646,9 @@ function zohoServerErrorData(error) {
636
646
  /**
637
647
  * Creates a logZohoServerErrorFunction that logs the error to console.
638
648
  *
639
- * @param zohoApiNamePrefix Prefix to use when logging. I.E. ZohoRecruitError, etc.
640
- * @returns
649
+ * @param zohoApiNamePrefix - Prefix to use when logging (e.g. 'ZohoRecruit', 'ZohoSign')
650
+ * @param options - Optional configuration for controlling which error types are logged
651
+ * @returns A function that logs Zoho server errors to the console
641
652
  */ function logZohoServerErrorFunction(zohoApiNamePrefix, options) {
642
653
  var _ref = options !== null && options !== void 0 ? options : {}, _ref_logDataArrayErrors = _ref.logDataArrayErrors, logDataArrayErrors = _ref_logDataArrayErrors === void 0 ? false : _ref_logDataArrayErrors;
643
654
  return function(error) {
@@ -660,8 +671,9 @@ function zohoServerErrorData(error) {
660
671
  /**
661
672
  * Wraps a ConfiguredFetch to support handling errors returned by fetch.
662
673
  *
663
- * @param fetch
664
- * @returns
674
+ * @param parseZohoError - Function that parses a fetch response error into a Zoho-specific error
675
+ * @param defaultLogError - Default error logging function used when no custom logger is provided
676
+ * @returns Factory that wraps a ConfiguredFetch with Zoho error handling
665
677
  */ function handleZohoErrorFetchFactory(parseZohoError, defaultLogError) {
666
678
  return function(fetch) {
667
679
  var logError = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultLogError, onError = arguments.length > 2 ? arguments[2] : void 0;
@@ -718,16 +730,17 @@ function zohoServerErrorData(error) {
718
730
  }
719
731
  /**
720
732
  * FetchJsonInterceptJsonResponseFunction that intercepts a 200 response that actually contains a ZohoServerError and throws a ZohoServerError for the error handling to catch.
733
+ *
734
+ * @param parseZohoServerErrorResponseData - Function that parses raw error response data into a structured error
735
+ * @returns Interceptor function that detects and throws hidden errors in 200 responses
721
736
  */ function interceptZohoErrorResponseFactory(parseZohoServerErrorResponseData) {
722
737
  return function(json, response) {
723
738
  var error = json === null || json === void 0 ? void 0 : json.error;
724
739
  if (error != null) {
725
740
  var responseError = new FetchResponseError(response);
726
- if (responseError) {
727
- var parsedError = parseZohoServerErrorResponseData(json, responseError);
728
- if (parsedError) {
729
- throw parsedError;
730
- }
741
+ var parsedError = parseZohoServerErrorResponseData(json, responseError);
742
+ if (parsedError) {
743
+ throw parsedError;
731
744
  }
732
745
  }
733
746
  return json;
@@ -817,7 +830,12 @@ var ZOHO_RATE_LIMIT_REMAINING_HEADER = 'X-RATELIMIT-REMAINING';
817
830
  var ZOHO_RATE_LIMIT_RESET_HEADER = 'X-RATELIMIT-RESET';
818
831
  var DEFAULT_ZOHO_API_RATE_LIMIT = 100;
819
832
  var DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD = MS_IN_MINUTE;
820
- function zohoRateLimitHeaderDetails(headers) {
833
+ /**
834
+ * Extracts rate limit details from Zoho API response headers, returning null if the headers are absent.
835
+ *
836
+ * @param headers - HTTP response headers from a Zoho API call
837
+ * @returns Parsed rate limit details, or null if rate limit headers are missing
838
+ */ function zohoRateLimitHeaderDetails(headers) {
821
839
  var limitHeader = headers.get(ZOHO_RATE_LIMIT_LIMIT_HEADER);
822
840
  var remainingHeader = headers.get(ZOHO_RATE_LIMIT_REMAINING_HEADER);
823
841
  var resetHeader = headers.get(ZOHO_RATE_LIMIT_RESET_HEADER);
@@ -855,9 +873,9 @@ var ZohoTooManyRequestsError = /*#__PURE__*/ function(ZohoServerFetchResponseErr
855
873
  /**
856
874
  * Function that parses/transforms a ZohoServerErrorResponseData into a general ZohoServerError or other known error type.
857
875
  *
858
- * @param errorResponseData
859
- * @param responseError
860
- * @returns
876
+ * @param errorResponseData - Raw error response data from the Zoho API
877
+ * @param responseError - The underlying fetch response error
878
+ * @returns A typed Zoho server error, or undefined if no error is found
861
879
  */ function parseZohoServerErrorResponseData(errorResponseData, responseError) {
862
880
  var result;
863
881
  if (isZohoServerErrorResponseDataArrayRef(errorResponseData)) {
@@ -902,8 +920,7 @@ var ZohoTooManyRequestsError = /*#__PURE__*/ function(ZohoServerFetchResponseErr
902
920
  */ function tryFindZohoServerErrorData(errorResponseData, responseError) {
903
921
  var _ref, _errorResponseData_error;
904
922
  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;
923
+ 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
924
  }
908
925
 
909
926
  function _assert_this_initialized$4(self) {
@@ -1200,17 +1217,22 @@ function _ts_generator$8(thisArg, body) {
1200
1217
  }(ZohoRecruitRecordCrudInvalidDataError);
1201
1218
  /**
1202
1219
  * Creates a typed CRUD error subclass based on the error code returned by the Zoho Recruit API, enabling callers to catch specific failure modes.
1220
+ *
1221
+ * @param error - Structured error data from the Zoho Recruit API response
1222
+ * @returns A specific CRUD error subclass matching the error code
1203
1223
  */ function zohoRecruitRecordCrudError(error) {
1204
1224
  var result;
1205
1225
  switch(error.code){
1206
1226
  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;
1227
+ {
1228
+ var invalidDataError = new ZohoRecruitRecordCrudInvalidDataError(error);
1229
+ if (invalidDataError.invalidFieldDetails['id']) {
1230
+ result = new ZohoRecruitRecordCrudNoMatchingRecordError(error);
1231
+ } else {
1232
+ result = invalidDataError;
1233
+ }
1234
+ break;
1212
1235
  }
1213
- break;
1214
1236
  case ZOHO_MANDATORY_NOT_FOUND_ERROR_CODE:
1215
1237
  result = new ZohoRecruitRecordCrudMandatoryFieldNotFoundError(error);
1216
1238
  break;
@@ -1225,10 +1247,14 @@ function _ts_generator$8(thisArg, body) {
1225
1247
  }
1226
1248
  /**
1227
1249
  * Returns an assertion function that throws {@link ZohoRecruitRecordNoContentError} when the data array result is empty or null, indicating the requested record does not exist.
1250
+ *
1251
+ * @param moduleName - Optional module name for the error context
1252
+ * @param recordId - Optional record ID for the error context
1253
+ * @returns Assertion function that validates the data array is non-empty
1228
1254
  */ function assertZohoRecruitRecordDataArrayResultHasContent(moduleName, recordId) {
1229
1255
  return function(x) {
1230
1256
  var _x_data;
1231
- if (x == null || !((_x_data = x.data) === null || _x_data === void 0 ? void 0 : _x_data.length)) {
1257
+ if (!(x === null || x === void 0 ? void 0 : (_x_data = x.data) === null || _x_data === void 0 ? void 0 : _x_data.length)) {
1232
1258
  throw new ZohoRecruitRecordNoContentError(moduleName, recordId);
1233
1259
  } else {
1234
1260
  return x;
@@ -1240,6 +1266,9 @@ function _ts_generator$8(thisArg, body) {
1240
1266
  */ var logZohoRecruitErrorToConsole = logZohoServerErrorFunction('ZohoRecruit');
1241
1267
  /**
1242
1268
  * Parses the JSON body of a failed Zoho Recruit fetch response into a structured error, returning undefined if the body cannot be parsed.
1269
+ *
1270
+ * @param responseError - The fetch response error to parse
1271
+ * @returns Parsed Zoho server error, or undefined if parsing fails
1243
1272
  */ function parseZohoRecruitError(responseError) {
1244
1273
  return _async_to_generator$8(function() {
1245
1274
  var data, result;
@@ -1248,7 +1277,7 @@ function _ts_generator$8(thisArg, body) {
1248
1277
  case 0:
1249
1278
  return [
1250
1279
  4,
1251
- responseError.response.json().catch(function(x) {
1280
+ responseError.response.json().catch(function() {
1252
1281
  return undefined;
1253
1282
  })
1254
1283
  ];
@@ -1267,6 +1296,10 @@ function _ts_generator$8(thisArg, body) {
1267
1296
  }
1268
1297
  /**
1269
1298
  * 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.
1299
+ *
1300
+ * @param errorResponseData - Raw error response data from the Zoho Recruit API
1301
+ * @param responseError - The underlying fetch response error
1302
+ * @returns Parsed Zoho server error, or undefined if the data contains no recognizable error
1270
1303
  */ function parseZohoRecruitServerErrorResponseData(errorResponseData, responseError) {
1271
1304
  var result;
1272
1305
  var error = tryFindZohoServerErrorData(errorResponseData, responseError);
@@ -1409,6 +1442,11 @@ function _is_native_reflect_construct$3() {
1409
1442
  *
1410
1443
  * When a single record is provided, the function returns the change details directly or throws on error.
1411
1444
  * When multiple records are provided, it returns a paired success/error result.
1445
+ *
1446
+ * @param context - Zoho Recruit API context providing fetch and authentication
1447
+ * @param fetchUrlPrefix - URL path suffix for the endpoint (empty for insert/update, '/upsert' for upsert)
1448
+ * @param fetchMethod - HTTP method to use for the request
1449
+ * @returns Factory function that inserts, updates, or upserts records
1412
1450
  */ function updateRecordLikeFunction$1(context, fetchUrlPrefix, fetchMethod) {
1413
1451
  return function(param) {
1414
1452
  var data = param.data, module = param.module;
@@ -1669,11 +1707,11 @@ function _is_native_reflect_construct$3() {
1669
1707
  var criteriaString = zohoRecruitSearchRecordsCriteriaString(input.criteria);
1670
1708
  baseInput.criteria = criteriaString;
1671
1709
  }
1710
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- Zoho API migration pending
1672
1711
  if (!baseInput.word && !input.criteria && !input.email && !input.phone) {
1673
1712
  throw new Error('At least one of word, criteria, email, or phone must be provided');
1674
1713
  }
1675
- var urlParams = zohoRecruitUrlSearchParamsMinusModule(baseInput);
1676
- return urlParams;
1714
+ return zohoRecruitUrlSearchParamsMinusModule(baseInput);
1677
1715
  }
1678
1716
  return function(input) {
1679
1717
  return context.fetchJson("/v2/".concat(input.module, "/search?").concat(searchRecordsUrlSearchParams(input).toString()), zohoRecruitApiFetchJsonInput('GET')).then(function(x) {
@@ -1742,6 +1780,7 @@ function _is_native_reflect_construct$3() {
1742
1780
  */ function zohoRecruitGetRelatedRecordsFunctionFactory(context) {
1743
1781
  return function(config) {
1744
1782
  var targetModule = config.targetModule, _config_returnEmptyRecordsInsteadOfNull = config.returnEmptyRecordsInsteadOfNull, returnEmptyRecordsInsteadOfNull = _config_returnEmptyRecordsInsteadOfNull === void 0 ? true : _config_returnEmptyRecordsInsteadOfNull;
1783
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- Zoho API migration pending
1745
1784
  return function(input) {
1746
1785
  return context.fetchJson("/v2/".concat(input.module, "/").concat(input.id, "/").concat(targetModule, "?").concat(zohoRecruitUrlSearchParamsMinusIdAndModule(input, input.filter).toString()), zohoRecruitApiFetchJsonInput('GET')).then(function(x) {
1747
1786
  return x !== null && x !== void 0 ? x : returnEmptyRecordsInsteadOfNull !== false ? emptyZohoPageResult() : x;
@@ -2074,6 +2113,9 @@ function _is_native_reflect_construct$3() {
2074
2113
  // MARK: Util
2075
2114
  /**
2076
2115
  * Builds URL search params from input objects, omitting the `module` key since it is used in the URL path rather than query string.
2116
+ *
2117
+ * @param input - One or more objects whose key-value pairs become query parameters
2118
+ * @returns URLSearchParams with the `module` key excluded
2077
2119
  */ function zohoRecruitUrlSearchParamsMinusModule() {
2078
2120
  for(var _len = arguments.length, input = new Array(_len), _key = 0; _key < _len; _key++){
2079
2121
  input[_key] = arguments[_key];
@@ -2084,6 +2126,9 @@ function _is_native_reflect_construct$3() {
2084
2126
  }
2085
2127
  /**
2086
2128
  * Builds URL search params from input objects, omitting both `id` and `module` keys since they are used in the URL path.
2129
+ *
2130
+ * @param input - One or more objects whose key-value pairs become query parameters
2131
+ * @returns URLSearchParams with `id` and `module` keys excluded
2087
2132
  */ function zohoRecruitUrlSearchParamsMinusIdAndModule() {
2088
2133
  for(var _len = arguments.length, input = new Array(_len), _key = 0; _key < _len; _key++){
2089
2134
  input[_key] = arguments[_key];
@@ -2100,12 +2145,15 @@ function _is_native_reflect_construct$3() {
2100
2145
  */ var zohoRecruitUrlSearchParams = makeUrlSearchParams;
2101
2146
  /**
2102
2147
  * Constructs a standard {@link FetchJsonInput} for Zoho Recruit API calls with the given HTTP method and optional body.
2148
+ *
2149
+ * @param method - HTTP method for the request
2150
+ * @param body - Optional JSON body to include in the request
2151
+ * @returns Configured fetch JSON input
2103
2152
  */ function zohoRecruitApiFetchJsonInput(method, body) {
2104
- var result = {
2153
+ return {
2105
2154
  method: method,
2106
2155
  body: body !== null && body !== void 0 ? body : undefined
2107
2156
  };
2108
- return result;
2109
2157
  }
2110
2158
  /**
2111
2159
  * Separates a change response's entries into success and error arrays based on their status.
@@ -2285,6 +2333,9 @@ function _object_spread_props$a(target, source) {
2285
2333
  *
2286
2334
  * The result separates "already associated" errors from other errors, allowing callers to treat duplicate associations as non-fatal.
2287
2335
  *
2336
+ * @param context - Zoho Recruit API context providing fetch and authentication
2337
+ * @returns Factory function that associates candidates with job openings
2338
+ *
2288
2339
  * https://www.zoho.com/recruit/developer-guide/apiv2/associate-candidate.html
2289
2340
  */ function zohoRecruitAssociateCandidateRecordsWithJobOpenings(context) {
2290
2341
  return function(input) {
@@ -2308,6 +2359,9 @@ function _object_spread_props$a(target, source) {
2308
2359
  }
2309
2360
  /**
2310
2361
  * Searches for records associated with a given candidate or job opening. Returns an empty page result when no records are found.
2362
+ *
2363
+ * @param context - Zoho Recruit API context providing fetch and authentication
2364
+ * @returns Factory function that searches for associated records
2311
2365
  */ function zohoRecruitSearchAssociatedRecords(context) {
2312
2366
  return function(input) {
2313
2367
  return context.fetchJson("/v2/".concat(input.module, "/").concat(input.id, "/associate?").concat(zohoRecruitUrlSearchParamsMinusIdAndModule(input).toString()), zohoRecruitApiFetchJsonInput('GET')).then(function(x) {
@@ -2318,6 +2372,9 @@ function _object_spread_props$a(target, source) {
2318
2372
  }
2319
2373
  /**
2320
2374
  * Searches for job openings associated with a specific candidate.
2375
+ *
2376
+ * @param context - Zoho Recruit API context providing fetch and authentication
2377
+ * @returns Factory function that searches for job openings associated with a candidate
2321
2378
  */ function zohoRecruitSearchCandidateAssociatedJobOpeningRecords(context) {
2322
2379
  var searchAssociatedRecordsFactory = zohoRecruitSearchAssociatedRecords(context);
2323
2380
  return function(input) {
@@ -2328,11 +2385,18 @@ function _object_spread_props$a(target, source) {
2328
2385
  }
2329
2386
  /**
2330
2387
  * Creates a page factory for paginating over job openings associated with a candidate.
2388
+ *
2389
+ * @param context - Zoho Recruit API context providing fetch and authentication
2390
+ * @returns Page factory for iterating through associated job openings
2331
2391
  */ function zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory(context) {
2332
2392
  return zohoFetchPageFactory(zohoRecruitSearchCandidateAssociatedJobOpeningRecords(context));
2333
2393
  }
2334
2394
  /**
2335
2395
  * Searches for candidates associated with a specific job opening.
2396
+ *
2397
+ * @param context - Zoho Recruit API context providing fetch and authentication
2398
+ * @param jobOpeningModuleName - Module name for job openings, defaults to the standard module
2399
+ * @returns Factory function that searches for candidates associated with a job opening
2336
2400
  */ function zohoRecruitSearchJobOpeningAssociatedCandidateRecords(context) {
2337
2401
  var jobOpeningModuleName = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ZOHO_RECRUIT_JOB_OPENINGS_MODULE;
2338
2402
  var searchAssociatedRecordsFactory = zohoRecruitSearchAssociatedRecords(context);
@@ -2344,6 +2408,9 @@ function _object_spread_props$a(target, source) {
2344
2408
  }
2345
2409
  /**
2346
2410
  * Creates a page factory for paginating over candidates associated with a job opening.
2411
+ *
2412
+ * @param context - Zoho Recruit API context providing fetch and authentication
2413
+ * @returns Page factory for iterating through associated candidates
2347
2414
  */ function zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory(context) {
2348
2415
  return zohoFetchPageFactory(zohoRecruitSearchJobOpeningAssociatedCandidateRecords(context));
2349
2416
  }
@@ -3012,7 +3079,12 @@ var ZOHO_ACCOUNTS_INVALID_CLIENT_ERROR_CODE = 'invalid_client';
3012
3079
  return ZohoAccountsAuthFailureError;
3013
3080
  }(FetchRequestFactoryError);
3014
3081
  var logZohoAccountsErrorToConsole = logZohoServerErrorFunction('ZohoAccounts');
3015
- function parseZohoAccountsError(responseError) {
3082
+ /**
3083
+ * Parses a fetch response error into a typed Zoho Accounts server error by extracting and interpreting the JSON error body.
3084
+ *
3085
+ * @param responseError - The fetch response error to parse
3086
+ * @returns The parsed Zoho server error, or undefined if the response could not be parsed
3087
+ */ function parseZohoAccountsError(responseError) {
3016
3088
  return _async_to_generator$7(function() {
3017
3089
  var data, result;
3018
3090
  return _ts_generator$7(this, function(_state) {
@@ -3020,7 +3092,7 @@ function parseZohoAccountsError(responseError) {
3020
3092
  case 0:
3021
3093
  return [
3022
3094
  4,
3023
- responseError.response.json().catch(function(x) {
3095
+ responseError.response.json().catch(function() {
3024
3096
  return undefined;
3025
3097
  })
3026
3098
  ];
@@ -3037,7 +3109,13 @@ function parseZohoAccountsError(responseError) {
3037
3109
  });
3038
3110
  })();
3039
3111
  }
3040
- function parseZohoAccountsServerErrorResponseData(errorResponseData, responseError) {
3112
+ /**
3113
+ * 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.
3114
+ *
3115
+ * @param errorResponseData - The raw error response data from the Zoho Accounts API
3116
+ * @param responseError - The original fetch response error for context
3117
+ * @returns The parsed Zoho server error, or undefined if the error could not be classified
3118
+ */ function parseZohoAccountsServerErrorResponseData(errorResponseData, responseError) {
3041
3119
  var result;
3042
3120
  var error = errorResponseData.error;
3043
3121
  if (error) {
@@ -3187,6 +3265,9 @@ function _ts_generator$6(thisArg, body) {
3187
3265
  }
3188
3266
  /**
3189
3267
  * Generates a new ZohoAccessTokenStringFactory.
3268
+ *
3269
+ * @param zohoAccessTokenFactory - Factory that produces ZohoAccessToken instances
3270
+ * @returns A factory function that resolves to the access token string
3190
3271
  */ function zohoAccessTokenStringFactory(zohoAccessTokenFactory) {
3191
3272
  return function() {
3192
3273
  return _async_to_generator$6(function() {
@@ -3200,7 +3281,7 @@ function _ts_generator$6(thisArg, body) {
3200
3281
  ];
3201
3282
  case 1:
3202
3283
  token = _state.sent();
3203
- if (!(token === null || token === void 0 ? void 0 : token.accessToken)) {
3284
+ if (!token.accessToken) {
3204
3285
  throw new ZohoAccountsAuthFailureError();
3205
3286
  }
3206
3287
  return [
@@ -3215,7 +3296,9 @@ function _ts_generator$6(thisArg, body) {
3215
3296
 
3216
3297
  /**
3217
3298
  * 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) {
3299
+ *
3300
+ * @param headers - Rate limit details extracted from the Zoho API response headers
3301
+ */ var DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION = function DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION(headers) {
3219
3302
  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
3303
  };
3221
3304
  /**
@@ -3234,13 +3317,17 @@ function _ts_generator$6(thisArg, body) {
3234
3317
  * @returns A rate-limited fetch handler with the underlying rate limiter accessible via `_rateLimiter`
3235
3318
  */ function zohoRateLimitedFetchHandler(config) {
3236
3319
  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;
3320
+ 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
3321
  var defaultLimit = (_ref1 = config === null || config === void 0 ? void 0 : config.maxRateLimit) !== null && _ref1 !== void 0 ? _ref1 : DEFAULT_ZOHO_API_RATE_LIMIT;
3239
3322
  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
3323
  /**
3241
3324
  * Builds a rate limiter config derived from the given limit.
3242
3325
  * Called once at initialization with `defaultLimit`, and again dynamically
3243
3326
  * when the API's `X-RATELIMIT-LIMIT` header reports a different value.
3327
+ *
3328
+ * @param limit - Maximum number of requests allowed per reset period
3329
+ * @param resetAt - Optional date when the rate limit window resets
3330
+ * @returns Rate limiter configuration scaled to the given limit
3244
3331
  */ function configForLimit(limit, resetAt) {
3245
3332
  return {
3246
3333
  limit: limit,
@@ -3259,6 +3346,10 @@ function _ts_generator$6(thisArg, body) {
3259
3346
  /**
3260
3347
  * Inspects each response for Zoho rate limit headers and updates the limiter accordingly.
3261
3348
  * Returns `true` to signal a retry when a 429 status is received.
3349
+ *
3350
+ * @param response - The HTTP response to inspect for rate limit headers
3351
+ * @param fetchResponseError - Optional fetch error if the response was an error
3352
+ * @returns Whether the request should be retried
3262
3353
  */ updateWithResponse: function updateWithResponse(response, fetchResponseError) {
3263
3354
  var hasLimitHeader = response.headers.has(ZOHO_RATE_LIMIT_REMAINING_HEADER);
3264
3355
  var shouldRetry = false;
@@ -3278,8 +3369,9 @@ function _ts_generator$6(thisArg, body) {
3278
3369
  if (response.status === ZOHO_TOO_MANY_REQUESTS_HTTP_STATUS_CODE) {
3279
3370
  shouldRetry = true;
3280
3371
  try {
3281
- onTooManyRequests === null || onTooManyRequests === void 0 ? void 0 : onTooManyRequests(headerDetails, response, fetchResponseError);
3282
- } catch (e) {}
3372
+ void (onTooManyRequests === null || onTooManyRequests === void 0 ? void 0 : onTooManyRequests(headerDetails, response, fetchResponseError));
3373
+ } catch (unused) {
3374
+ /* ignored */ }
3283
3375
  }
3284
3376
  }
3285
3377
  }
@@ -3288,6 +3380,10 @@ function _ts_generator$6(thisArg, body) {
3288
3380
  }
3289
3381
  });
3290
3382
  }
3383
+ // MARK: Compat
3384
+ /**
3385
+ * @deprecated use DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION instead.
3386
+ */ var DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION = DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION;
3291
3387
 
3292
3388
  function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
3293
3389
  try {
@@ -3544,7 +3640,7 @@ function _ts_generator$5(thisArg, body) {
3544
3640
  });
3545
3641
  var fetch = handleZohoRecruitErrorFetch(baseFetch, logZohoServerErrorFunction, function(x) {
3546
3642
  if (_instanceof$4(x, ZohoInvalidTokenError)) {
3547
- accountsContext.loadAccessToken.resetAccessToken();
3643
+ void accountsContext.loadAccessToken.resetAccessToken();
3548
3644
  }
3549
3645
  });
3550
3646
  var fetchJson = fetchJsonFunction(fetch, {
@@ -3576,6 +3672,9 @@ function _ts_generator$5(thisArg, body) {
3576
3672
  */ var ZOHO_CRM_SERVICE_NAME = 'crm';
3577
3673
  /**
3578
3674
  * 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.
3675
+ *
3676
+ * @param input - A well-known environment key or a custom CRM API URL
3677
+ * @returns The resolved full Zoho CRM API base URL
3579
3678
  */ function zohoCrmConfigApiUrl(input) {
3580
3679
  switch(input){
3581
3680
  case 'sandbox':
@@ -3937,17 +4036,22 @@ function _ts_generator$4(thisArg, body) {
3937
4036
  }(ZohoCrmRecordCrudInvalidDataError);
3938
4037
  /**
3939
4038
  * Maps a Zoho CRM server error to the appropriate typed {@link ZohoCrmRecordCrudError} subclass based on the error code and affected field.
4039
+ *
4040
+ * @param error - The server error data containing the error code and field details
4041
+ * @returns The appropriate typed CRM CRUD error instance
3940
4042
  */ function zohoCrmRecordCrudError(error) {
3941
4043
  var result;
3942
4044
  switch(error.code){
3943
4045
  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;
4046
+ {
4047
+ var invalidDataError = new ZohoCrmRecordCrudInvalidDataError(error);
4048
+ if (invalidDataError.invalidFieldDetails.api_name === 'id') {
4049
+ result = new ZohoCrmRecordCrudNoMatchingRecordError(error);
4050
+ } else {
4051
+ result = invalidDataError;
4052
+ }
4053
+ break;
3949
4054
  }
3950
- break;
3951
4055
  case ZOHO_MANDATORY_NOT_FOUND_ERROR_CODE:
3952
4056
  result = new ZohoCrmRecordCrudMandatoryFieldNotFoundError(error);
3953
4057
  break;
@@ -3962,10 +4066,14 @@ function _ts_generator$4(thisArg, body) {
3962
4066
  }
3963
4067
  /**
3964
4068
  * Returns an assertion function that throws {@link ZohoCrmRecordNoContentError} when a data array result is empty or null, typically indicating a missing record.
4069
+ *
4070
+ * @param moduleName - Optional CRM module name for the error context
4071
+ * @param recordId - Optional record ID for the error context
4072
+ * @returns Assertion function that throws if the data array is empty
3965
4073
  */ function assertZohoCrmRecordDataArrayResultHasContent(moduleName, recordId) {
3966
4074
  return function(x) {
3967
4075
  var _x_data;
3968
- if (x == null || !((_x_data = x.data) === null || _x_data === void 0 ? void 0 : _x_data.length)) {
4076
+ if (!(x === null || x === void 0 ? void 0 : (_x_data = x.data) === null || _x_data === void 0 ? void 0 : _x_data.length)) {
3969
4077
  throw new ZohoCrmRecordNoContentError(moduleName, recordId);
3970
4078
  } else {
3971
4079
  return x;
@@ -3979,6 +4087,9 @@ function _ts_generator$4(thisArg, body) {
3979
4087
  });
3980
4088
  /**
3981
4089
  * Parses a fetch response error into a typed Zoho CRM server error by extracting and interpreting the JSON error body.
4090
+ *
4091
+ * @param responseError - The fetch response error to parse
4092
+ * @returns The parsed Zoho server error, or undefined if the response could not be parsed
3982
4093
  */ function parseZohoCrmError(responseError) {
3983
4094
  return _async_to_generator$4(function() {
3984
4095
  var data, result;
@@ -3987,7 +4098,7 @@ function _ts_generator$4(thisArg, body) {
3987
4098
  case 0:
3988
4099
  return [
3989
4100
  4,
3990
- responseError.response.json().catch(function(x) {
4101
+ responseError.response.json().catch(function() {
3991
4102
  return undefined;
3992
4103
  })
3993
4104
  ];
@@ -4006,6 +4117,10 @@ function _ts_generator$4(thisArg, body) {
4006
4117
  }
4007
4118
  /**
4008
4119
  * 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.
4120
+ *
4121
+ * @param errorResponseData - The raw error response data from the Zoho CRM API
4122
+ * @param responseError - The original fetch response error for context
4123
+ * @returns The parsed Zoho server error, or undefined if the error could not be classified
4009
4124
  */ function parseZohoCrmServerErrorResponseData(errorResponseData, responseError) {
4010
4125
  var result;
4011
4126
  var error = tryFindZohoServerErrorData(errorResponseData, responseError);
@@ -4151,6 +4266,11 @@ function _is_native_reflect_construct() {
4151
4266
  *
4152
4267
  * When a single record is provided, the function returns the change details directly or throws on error.
4153
4268
  * When multiple records are provided, it returns a paired success/error result.
4269
+ *
4270
+ * @param context - Authenticated Zoho CRM context for making API calls
4271
+ * @param fetchUrlPrefix - URL path segment appended after the module name (empty string for insert/update, '/upsert' for upsert)
4272
+ * @param fetchMethod - HTTP method to use for the request (POST for insert/upsert, PUT for update)
4273
+ * @returns Overloaded function handling both single and multi-record operations
4154
4274
  */ function updateRecordLikeFunction(context, fetchUrlPrefix, fetchMethod) {
4155
4275
  return function(param) {
4156
4276
  var data = param.data, module = param.module;
@@ -4415,8 +4535,7 @@ function _is_native_reflect_construct() {
4415
4535
  if (!baseInput.word && !input.cvid && !input.criteria && !input.email && !input.phone) {
4416
4536
  throw new Error('At least one of word, cvid, criteria, email, or phone must be provided');
4417
4537
  }
4418
- var urlParams = zohoCrmUrlSearchParamsMinusModule(baseInput);
4419
- return urlParams;
4538
+ return zohoCrmUrlSearchParamsMinusModule(baseInput);
4420
4539
  }
4421
4540
  return function(input) {
4422
4541
  return context.fetchJson("/v8/".concat(input.module, "/search?").concat(searchRecordsUrlSearchParams(input).toString()), zohoCrmApiFetchJsonInput('GET')).then(function(x) {
@@ -4485,6 +4604,7 @@ function _is_native_reflect_construct() {
4485
4604
  */ function zohoCrmGetRelatedRecordsFunctionFactory(context) {
4486
4605
  return function(config) {
4487
4606
  var targetModule = config.targetModule, _config_returnEmptyRecordsInsteadOfNull = config.returnEmptyRecordsInsteadOfNull, returnEmptyRecordsInsteadOfNull = _config_returnEmptyRecordsInsteadOfNull === void 0 ? true : _config_returnEmptyRecordsInsteadOfNull;
4607
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- Zoho API migration pending
4488
4608
  return function(input) {
4489
4609
  return context.fetchJson("/v8/".concat(input.module, "/").concat(input.id, "/").concat(targetModule, "?").concat(zohoCrmUrlSearchParamsMinusIdAndModule(input, input.filter).toString()), zohoCrmApiFetchJsonInput('GET')).then(function(x) {
4490
4610
  return x !== null && x !== void 0 ? x : returnEmptyRecordsInsteadOfNull !== false ? emptyZohoPageResult() : x;
@@ -4802,6 +4922,9 @@ function _is_native_reflect_construct() {
4802
4922
  // MARK: Util
4803
4923
  /**
4804
4924
  * 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.
4925
+ *
4926
+ * @param input - One or more objects to convert into URL search parameters
4927
+ * @returns URL search params string with the `module` key excluded
4805
4928
  */ function zohoCrmUrlSearchParamsMinusModule() {
4806
4929
  for(var _len = arguments.length, input = new Array(_len), _key = 0; _key < _len; _key++){
4807
4930
  input[_key] = arguments[_key];
@@ -4812,6 +4935,9 @@ function _is_native_reflect_construct() {
4812
4935
  }
4813
4936
  /**
4814
4937
  * Builds URL search params from the input objects, omitting both `id` and `module` keys since they are used in the URL path.
4938
+ *
4939
+ * @param input - One or more objects to convert into URL search parameters
4940
+ * @returns URL search params string with `id` and `module` keys excluded
4815
4941
  */ function zohoCrmUrlSearchParamsMinusIdAndModule() {
4816
4942
  for(var _len = arguments.length, input = new Array(_len), _key = 0; _key < _len; _key++){
4817
4943
  input[_key] = arguments[_key];
@@ -4828,18 +4954,24 @@ function _is_native_reflect_construct() {
4828
4954
  */ var zohoCrmUrlSearchParams = makeUrlSearchParams;
4829
4955
  /**
4830
4956
  * Constructs the standard FetchJsonInput used by CRM API calls, pairing the HTTP method with an optional body.
4957
+ *
4958
+ * @param method - HTTP method to use for the request
4959
+ * @param body - Optional request body to include
4960
+ * @returns Configured fetch input for the Zoho CRM API call
4831
4961
  */ function zohoCrmApiFetchJsonInput(method, body) {
4832
- var result = {
4962
+ return {
4833
4963
  method: method,
4834
4964
  body: body !== null && body !== void 0 ? body : undefined
4835
4965
  };
4836
- return result;
4837
4966
  }
4838
4967
  // MARK: Results
4839
4968
  /**
4840
4969
  * Catches ZohoServerFetchResponseDataArrayError and returns the error data array as the response data, as each data element will have the error details.
4841
4970
  *
4842
4971
  * Use to catch errors from functions that return ZohoCrmChangeObjectLikeResponse and pass the result to zohoCrmChangeObjectLikeResponseSuccessAndErrorPairs.
4972
+ *
4973
+ * @param e - The error to catch and potentially convert
4974
+ * @returns The error data array wrapped as a change object response
4843
4975
  */ function zohoCrmCatchZohoCrmChangeObjectLikeResponseError(e) {
4844
4976
  var result;
4845
4977
  if (_instanceof$3(e, ZohoServerFetchResponseDataArrayError)) {
@@ -4977,6 +5109,9 @@ function _object_spread_props$5(target, source) {
4977
5109
  * Creates notes directly in the CRM Notes module. Each note must include the parent record reference and module name.
4978
5110
  *
4979
5111
  * For creating notes associated with a specific record, prefer {@link zohoCrmCreateNotesForRecord} which handles parent binding automatically.
5112
+ *
5113
+ * @param context - Authenticated Zoho CRM context for making API calls
5114
+ * @returns Function that creates notes in the CRM Notes module
4980
5115
  */ function zohoCrmCreateNotes(context) {
4981
5116
  return function(input) {
4982
5117
  return context.fetchJson("/v2/".concat(ZOHO_CRM_NOTES_MODULE), zohoCrmApiFetchJsonInput('POST', {
@@ -4988,6 +5123,9 @@ function _object_spread_props$5(target, source) {
4988
5123
  }
4989
5124
  /**
4990
5125
  * Deletes one or more notes from the CRM Notes module by their IDs.
5126
+ *
5127
+ * @param context - Authenticated Zoho CRM context for making API calls
5128
+ * @returns Function that deletes notes by their IDs
4991
5129
  */ function zohoCrmDeleteNotes(context) {
4992
5130
  return function(input) {
4993
5131
  return context.fetchJson("/v2/".concat(ZOHO_CRM_NOTES_MODULE, "?").concat(makeUrlSearchParams({
@@ -4999,6 +5137,9 @@ function _object_spread_props$5(target, source) {
4999
5137
  }
5000
5138
  /**
5001
5139
  * Retrieves paginated notes associated with a specific CRM record using the related records API.
5140
+ *
5141
+ * @param context - Authenticated Zoho CRM context for making API calls
5142
+ * @returns Function that retrieves notes for a specific record
5002
5143
  */ function zohoCrmGetNotesForRecord(context) {
5003
5144
  return zohoCrmGetRelatedRecordsFunctionFactory(context)({
5004
5145
  targetModule: ZOHO_CRM_NOTES_MODULE
@@ -5006,6 +5147,9 @@ function _object_spread_props$5(target, source) {
5006
5147
  }
5007
5148
  /**
5008
5149
  * Creates a page factory for iterating through all notes for a record across multiple pages.
5150
+ *
5151
+ * @param context - Authenticated Zoho CRM context for making API calls
5152
+ * @returns Page factory for paginating through notes for a record
5009
5153
  */ function zohoCrmGetNotesForRecordPageFactory(context) {
5010
5154
  return zohoFetchPageFactory(zohoCrmGetNotesForRecord(context));
5011
5155
  }
@@ -5013,6 +5157,9 @@ function _object_spread_props$5(target, source) {
5013
5157
  * Creates notes for a specific record, automatically binding the parent module and record ID to each note entry.
5014
5158
  *
5015
5159
  * https://www.zoho.com/crm/developer/docs/api/v8/create-notes.html
5160
+ *
5161
+ * @param context - Authenticated Zoho CRM context for making API calls
5162
+ * @returns Function that creates notes bound to a specific record
5016
5163
  */ function zohoCrmCreateNotesForRecord(context) {
5017
5164
  var createNotesInstance = zohoCrmCreateNotes(context);
5018
5165
  return function(input) {
@@ -5110,6 +5257,9 @@ function _unsupported_iterable_to_array(o, minLen) {
5110
5257
  }
5111
5258
  /**
5112
5259
  * Creates one or more tags for a CRM module. Duplicate tag errors are separated from other errors in the result to simplify idempotent workflows.
5260
+ *
5261
+ * @param context - Authenticated Zoho CRM context for making API calls
5262
+ * @returns Function that creates tags for a module
5113
5263
  */ function zohoCrmCreateTagsForModule(context) {
5114
5264
  return function(input) {
5115
5265
  return context.fetchJson("/v8/settings/tags?".concat(makeUrlSearchParams({
@@ -5151,8 +5301,8 @@ function _unsupported_iterable_to_array(o, minLen) {
5151
5301
  *
5152
5302
  * https://www.zoho.com/crm/developer/docs/api/v8/delete-tag.html
5153
5303
  *
5154
- * @param context
5155
- * @returns
5304
+ * @param context - Authenticated Zoho CRM context for making API calls
5305
+ * @returns Function that deletes a tag by ID
5156
5306
  */ function zohoCrmDeleteTag(context) {
5157
5307
  return function(input) {
5158
5308
  return context.fetchJson("/v8/settings/tags/".concat(input.id), zohoCrmApiFetchJsonInput('DELETE')).then(function(x) {
@@ -5165,8 +5315,8 @@ function _unsupported_iterable_to_array(o, minLen) {
5165
5315
  *
5166
5316
  * https://www.zoho.com/crm/developer-guide/apiv2/get-tag-list.html
5167
5317
  *
5168
- * @param context
5169
- * @returns
5318
+ * @param context - Authenticated Zoho CRM context for making API calls
5319
+ * @returns Function that retrieves tags for a module
5170
5320
  */ function zohoCrmGetTagsForModule(context) {
5171
5321
  return function(input) {
5172
5322
  return context.fetchJson("/v8/settings/tags?".concat(makeUrlSearchParams({
@@ -5182,6 +5332,9 @@ function _unsupported_iterable_to_array(o, minLen) {
5182
5332
  }
5183
5333
  /**
5184
5334
  * Creates a page factory for iterating through all tags in a module across multiple pages.
5335
+ *
5336
+ * @param context - Authenticated Zoho CRM context for making API calls
5337
+ * @returns Page factory for paginating through tags in a module
5185
5338
  */ function zohoCrmGetTagsForModulePageFactory(context) {
5186
5339
  return zohoFetchPageFactory(zohoCrmGetTagsForModule(context));
5187
5340
  }
@@ -5194,8 +5347,8 @@ function _unsupported_iterable_to_array(o, minLen) {
5194
5347
  *
5195
5348
  * https://www.zoho.com/crm/developer-guide/apiv2/add-tags.html
5196
5349
  *
5197
- * @param context
5198
- * @returns
5350
+ * @param context - Authenticated Zoho CRM context for making API calls
5351
+ * @returns Function that adds tags to records
5199
5352
  */ function zohoCrmAddTagsToRecords(context) {
5200
5353
  return function(input) {
5201
5354
  return context.fetchJson("/v8/".concat(input.module, "/actions/add_tags"), zohoCrmApiFetchJsonInput('POST', zohoCrmAddTagsToRecordsRequestBody(input))).then(function(x) {
@@ -5208,6 +5361,9 @@ function _unsupported_iterable_to_array(o, minLen) {
5208
5361
  }
5209
5362
  /**
5210
5363
  * Builds the request body for the add/remove tags endpoints, merging `tag_names` into `tags` and enforcing the max ID limit.
5364
+ *
5365
+ * @param input - The add/remove tags request containing tag names, tag objects, and record IDs
5366
+ * @returns The formatted request body with merged tags and record IDs
5211
5367
  */ function zohoCrmAddTagsToRecordsRequestBody(input) {
5212
5368
  if (Array.isArray(input.ids) && input.ids.length > ZOHO_CRM_ADD_TAGS_TO_RECORDS_MAX_IDS_ALLOWED) {
5213
5369
  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 +5396,8 @@ function _unsupported_iterable_to_array(o, minLen) {
5240
5396
  *
5241
5397
  * https://www.zoho.com/crm/developer-guide/apiv2/remove-tags.html
5242
5398
  *
5243
- * @param context
5244
- * @returns
5399
+ * @param context - Authenticated Zoho CRM context for making API calls
5400
+ * @returns Function that removes tags from records
5245
5401
  */ function zohoCrmRemoveTagsFromRecords(context) {
5246
5402
  return function(input) {
5247
5403
  return context.fetchJson("/v8/".concat(input.module, "/actions/remove_tags"), zohoCrmApiFetchJsonInput('POST', zohoCrmAddTagsToRecordsRequestBody(input))).then(function(x) {
@@ -5508,7 +5664,7 @@ function _ts_generator$3(thisArg, body) {
5508
5664
  });
5509
5665
  var fetch = handleZohoCrmErrorFetch(baseFetch, logZohoServerErrorFunction, function(x) {
5510
5666
  if (_instanceof$1(x, ZohoInvalidTokenError)) {
5511
- accountsContext.loadAccessToken.resetAccessToken();
5667
+ void accountsContext.loadAccessToken.resetAccessToken();
5512
5668
  }
5513
5669
  });
5514
5670
  var fetchJson = fetchJsonFunction(fetch, {
@@ -5694,6 +5850,10 @@ function _object_without_properties_loose(source, excluded) {
5694
5850
  // MARK: Utility
5695
5851
  /**
5696
5852
  * Builds a {@link FetchJsonInput} for Zoho Sign API calls.
5853
+ *
5854
+ * @param method - HTTP method for the request
5855
+ * @param body - Optional JSON body to include in the request
5856
+ * @returns Configured fetch JSON input
5697
5857
  */ function zohoSignApiFetchJsonInput(method, body) {
5698
5858
  return {
5699
5859
  method: method,
@@ -5859,7 +6019,8 @@ function _object_without_properties_loose(source, excluded) {
5859
6019
  ]);
5860
6020
  var searchParams = makeUrlSearchParams(params);
5861
6021
  var queryString = searchParams.toString();
5862
- var url = "/requests/".concat(requestId, "/pdf").concat(queryString ? "?".concat(queryString) : '');
6022
+ var suffix = queryString ? "?".concat(queryString) : '';
6023
+ var url = "/requests/".concat(requestId, "/pdf").concat(suffix);
5863
6024
  return context.fetch(url, {
5864
6025
  method: 'GET'
5865
6026
  });
@@ -6089,7 +6250,12 @@ function _object_without_properties_loose(source, excluded) {
6089
6250
  }
6090
6251
 
6091
6252
  var ZOHO_SIGN_SERVICE_NAME = 'sign';
6092
- function zohoSignConfigApiUrl(input) {
6253
+ /**
6254
+ * Resolves an environment key or passthrough URL to the full Zoho Sign API URL.
6255
+ *
6256
+ * @param input - An environment key ('sandbox' or 'production') or a full API URL
6257
+ * @returns The resolved Zoho Sign API URL
6258
+ */ function zohoSignConfigApiUrl(input) {
6093
6259
  switch(input){
6094
6260
  case 'sandbox':
6095
6261
  return 'https://signsandbox.zoho.com/api/v1';
@@ -6231,7 +6397,12 @@ function _ts_generator$2(thisArg, body) {
6231
6397
  var logZohoSignErrorToConsole = logZohoServerErrorFunction('ZohoSign', {
6232
6398
  logDataArrayErrors: false
6233
6399
  });
6234
- function parseZohoSignError(responseError) {
6400
+ /**
6401
+ * Parses the JSON body of a failed Zoho Sign fetch response into a structured error, returning undefined if the body cannot be parsed.
6402
+ *
6403
+ * @param responseError - The fetch response error to parse
6404
+ * @returns Parsed Zoho server error, or undefined if parsing fails
6405
+ */ function parseZohoSignError(responseError) {
6235
6406
  return _async_to_generator$2(function() {
6236
6407
  var data, result;
6237
6408
  return _ts_generator$2(this, function(_state) {
@@ -6256,7 +6427,13 @@ function parseZohoSignError(responseError) {
6256
6427
  });
6257
6428
  })();
6258
6429
  }
6259
- function parseZohoSignServerErrorResponseData(errorResponseData, responseError) {
6430
+ /**
6431
+ * 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.
6432
+ *
6433
+ * @param errorResponseData - Raw error response data from the Zoho Sign API
6434
+ * @param responseError - The underlying fetch response error
6435
+ * @returns Parsed Zoho server error, or undefined if the data contains no recognizable error
6436
+ */ function parseZohoSignServerErrorResponseData(errorResponseData, responseError) {
6260
6437
  var result;
6261
6438
  var error = tryFindZohoServerErrorData(errorResponseData, responseError);
6262
6439
  if (error) {
@@ -6528,7 +6705,7 @@ function _ts_generator$1(thisArg, body) {
6528
6705
  });
6529
6706
  var fetch = handleZohoSignErrorFetch(baseFetch, logZohoServerErrorFunction, function(x) {
6530
6707
  if (_instanceof(x, ZohoInvalidTokenError)) {
6531
- accountsContext.loadAccessToken.resetAccessToken();
6708
+ void accountsContext.loadAccessToken.resetAccessToken();
6532
6709
  }
6533
6710
  });
6534
6711
  var fetchJson = fetchJsonFunction(fetch, {
@@ -6639,18 +6816,26 @@ function _ts_generator$1(thisArg, body) {
6639
6816
  }
6640
6817
  /**
6641
6818
  * Constructs a standard {@link FetchJsonInput} for Zoho Accounts API calls with the given HTTP method and optional body.
6819
+ *
6820
+ * @param method - HTTP method to use for the request
6821
+ * @param body - Optional request body to include
6822
+ * @returns Configured fetch input for the Zoho Accounts API call
6642
6823
  */ function zohoAccountsApiFetchJsonInput(method, body) {
6643
- var result = {
6824
+ return {
6644
6825
  method: method,
6645
6826
  body: body
6646
6827
  };
6647
- return result;
6648
6828
  }
6649
6829
 
6650
6830
  /**
6651
6831
  * The Zoho Accounts API URL for the US datacenter.
6652
6832
  */ var ZOHO_ACCOUNTS_US_API_URL = 'https://accounts.zoho.com';
6653
- function zohoAccountsConfigApiUrl(input) {
6833
+ /**
6834
+ * 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.
6835
+ *
6836
+ * @param input - A well-known datacenter key or a custom Zoho Accounts API URL
6837
+ * @returns The resolved full Zoho Accounts API base URL
6838
+ */ function zohoAccountsConfigApiUrl(input) {
6654
6839
  switch(input){
6655
6840
  case 'us':
6656
6841
  return ZOHO_ACCOUNTS_US_API_URL;
@@ -7017,7 +7202,7 @@ function _ts_generator(thisArg, body) {
7017
7202
  }
7018
7203
  if (!!currentToken) return [
7019
7204
  3,
7020
- 10
7205
+ 9
7021
7206
  ];
7022
7207
  _state.label = 3;
7023
7208
  case 3:
@@ -7042,35 +7227,29 @@ function _ts_generator(thisArg, body) {
7042
7227
  console.error("zohoAccountsZohoAccessTokenFactory(): Failed retrieving new token from tokenRefresher: ", e);
7043
7228
  throw new ZohoAccountsAuthFailureError('Token Refresh Failed');
7044
7229
  case 6:
7045
- if (!currentToken) return [
7046
- 3,
7047
- 10
7048
- ];
7049
- _state.label = 7;
7050
- case 7:
7051
7230
  _state.trys.push([
7052
- 7,
7053
- 9,
7231
+ 6,
7232
+ 8,
7054
7233
  ,
7055
- 10
7234
+ 9
7056
7235
  ]);
7057
7236
  return [
7058
7237
  4,
7059
7238
  accessTokenCache === null || accessTokenCache === void 0 ? void 0 : accessTokenCache.updateCachedToken(currentToken)
7060
7239
  ];
7061
- case 8:
7240
+ case 7:
7062
7241
  _state.sent();
7063
7242
  return [
7064
7243
  3,
7065
- 10
7244
+ 9
7066
7245
  ];
7067
- case 9:
7246
+ case 8:
7068
7247
  _state.sent();
7069
7248
  return [
7070
7249
  3,
7071
- 10
7250
+ 9
7072
7251
  ];
7073
- case 10:
7252
+ case 9:
7074
7253
  return [
7075
7254
  2,
7076
7255
  currentToken
@@ -7103,4 +7282,4 @@ function safeZohoDateTimeString(date) {
7103
7282
  return isoDate.substring(0, isoDate.length - 5) + 'Z';
7104
7283
  }
7105
7284
 
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 };
7285
+ 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 };