@dereekb/zoho 12.1.10 → 12.1.11

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.
package/index.cjs.js CHANGED
@@ -1775,6 +1775,21 @@ $$1({ target: 'Iterator', proto: true, real: true, forced: IS_PURE$1 }, {
1775
1775
  map: map
1776
1776
  });
1777
1777
 
1778
+ /**
1779
+ * Returns an empty ZohoPageResult that is typed to R and has no more records/results.
1780
+ */
1781
+ function emptyZohoPageResult() {
1782
+ return {
1783
+ data: [],
1784
+ info: {
1785
+ page: 1,
1786
+ per_page: 100,
1787
+ // default value
1788
+ count: 0,
1789
+ more_records: false
1790
+ }
1791
+ };
1792
+ }
1778
1793
  /**
1779
1794
  * Creates a FetchPageFactory using the input ZohoFetchPageFetchFunction.
1780
1795
  *
@@ -2069,6 +2084,10 @@ function interceptZohoErrorResponseFactory(parseZohoServerErrorResponseData) {
2069
2084
  * - An extra parameter is provided
2070
2085
  */
2071
2086
  const ZOHO_INTERNAL_ERROR_CODE = 'INTERNAL_ERROR';
2087
+ /**
2088
+ * Error code for when a failure occured for the given action
2089
+ */
2090
+ const ZOHO_FAILURE_ERROR_CODE = 'FAILURE';
2072
2091
  /**
2073
2092
  * Error when the Zoho API returns an internal error
2074
2093
  */
@@ -2188,6 +2207,12 @@ function tryFindZohoServerErrorData(errorResponseData, responseError) {
2188
2207
  return error;
2189
2208
  }
2190
2209
 
2210
+ /**
2211
+ * Error code for when two records are already associated with each other.
2212
+ *
2213
+ * Example being a candidate and a job opening are already associated.
2214
+ */
2215
+ const ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE = 'ALREADY_ASSOCIATED';
2191
2216
  /**
2192
2217
  * Thrown when a record with the given id has no content. Typically also means it does not exist.
2193
2218
  */
@@ -2505,6 +2530,80 @@ function zohoRecruitMultiRecordResult(input, results) {
2505
2530
  return result;
2506
2531
  }
2507
2532
 
2533
+ /**
2534
+ * Candidates module name
2535
+ */
2536
+ const ZOHO_RECRUIT_CANDIDATES_MODULE = 'Candidates';
2537
+ /**
2538
+ * Job Openings module name
2539
+ */
2540
+ const ZOHO_RECRUIT_JOB_OPENINGS_MODULE = 'Job_Openings';
2541
+ /**
2542
+ * Returns true if it is a valid ZohoRecruitValidUrl.
2543
+ */
2544
+ const isZohoRecruitValidUrl = util.isStandardInternetAccessibleWebsiteUrl;
2545
+
2546
+ /**
2547
+ * Associates one or more candidates with one or more job openings.
2548
+ *
2549
+ * https://www.zoho.com/recruit/developer-guide/apiv2/associate-candidate.html
2550
+ *
2551
+ * @param context
2552
+ * @returns
2553
+ */
2554
+ function associateCandidateRecordsWithJobOpenings(context) {
2555
+ return input => context.fetchJson(`/v2/${ZOHO_RECRUIT_CANDIDATES_MODULE}/actions/associate`, zohoRecruitApiFetchJsonInput('PUT', {
2556
+ data: util.asArray(input)
2557
+ })).then(x => {
2558
+ const resultInputMap = x.data.map(() => input); // assign "input" to each value for now
2559
+ const result = zohoRecruitMultiRecordResult(resultInputMap, x.data);
2560
+ const {
2561
+ included: alreadyAssociatedErrorItems,
2562
+ excluded: otherErrorItems
2563
+ } = util.separateValues(result.errorItems, x => {
2564
+ return x.result.code === ZOHO_FAILURE_ERROR_CODE && x.result.details.error[0].code === ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE;
2565
+ });
2566
+ return {
2567
+ ...result,
2568
+ errorItems: otherErrorItems,
2569
+ alreadyAssociatedErrorItems,
2570
+ allErrorItems: result.errorItems
2571
+ };
2572
+ });
2573
+ }
2574
+ function searchAssociatedRecords(context) {
2575
+ return input => {
2576
+ return context.fetchJson(`/v2/${input.module}/${input.id}/associate?${zohoRecruitUrlSearchParamsMinusIdAndModule(input).toString()}`, zohoRecruitApiFetchJsonInput('GET')).then(x => {
2577
+ const result = x ?? emptyZohoPageResult();
2578
+ return result;
2579
+ });
2580
+ };
2581
+ }
2582
+ function searchCandidateAssociatedJobOpeningRecords(context) {
2583
+ const searchAssociatedRecordsFactory = searchAssociatedRecords(context);
2584
+ return input => {
2585
+ return searchAssociatedRecordsFactory({
2586
+ ...input,
2587
+ module: ZOHO_RECRUIT_CANDIDATES_MODULE
2588
+ });
2589
+ };
2590
+ }
2591
+ function searchCandidateAssociatedJobOpeningRecordsPageFactory(context) {
2592
+ return zohoFetchPageFactory(searchCandidateAssociatedJobOpeningRecords(context));
2593
+ }
2594
+ function searchJobOpeningAssociatedCandidateRecords(context, jobOpeningModuleName = ZOHO_RECRUIT_JOB_OPENINGS_MODULE) {
2595
+ const searchAssociatedRecordsFactory = searchAssociatedRecords(context);
2596
+ return input => {
2597
+ return searchAssociatedRecordsFactory({
2598
+ ...input,
2599
+ module: jobOpeningModuleName
2600
+ });
2601
+ };
2602
+ }
2603
+ function searchJobOpeningAssociatedCandidateRecordsPageFactory(context) {
2604
+ return zohoFetchPageFactory(searchJobOpeningAssociatedCandidateRecords(context));
2605
+ }
2606
+
2508
2607
  /**
2509
2608
  * Creates a ZohoRecruitSearchRecordsCriteriaEntryArray from an array of emails.
2510
2609
  *
@@ -2703,15 +2802,6 @@ function zohoRecruitFactory(factoryConfig) {
2703
2802
  };
2704
2803
  }
2705
2804
 
2706
- /**
2707
- * Candidates module name
2708
- */
2709
- const ZOHO_RECRUIT_CANDIDATES_MODULE = 'Candidates';
2710
- /**
2711
- * Returns true if it is a valid ZohoRecruitValidUrl.
2712
- */
2713
- const isZohoRecruitValidUrl = util.isStandardInternetAccessibleWebsiteUrl;
2714
-
2715
2805
  /**
2716
2806
  * Trades a refresh token for a new AccessToken
2717
2807
  * @param context
@@ -2888,6 +2978,7 @@ exports.ZOHO_ACCOUNTS_INVALID_CLIENT_ERROR_CODE = ZOHO_ACCOUNTS_INVALID_CLIENT_E
2888
2978
  exports.ZOHO_ACCOUNTS_INVALID_CODE_ERROR_CODE = ZOHO_ACCOUNTS_INVALID_CODE_ERROR_CODE;
2889
2979
  exports.ZOHO_ACCOUNTS_US_API_URL = ZOHO_ACCOUNTS_US_API_URL;
2890
2980
  exports.ZOHO_DUPLICATE_DATA_ERROR_CODE = ZOHO_DUPLICATE_DATA_ERROR_CODE;
2981
+ exports.ZOHO_FAILURE_ERROR_CODE = ZOHO_FAILURE_ERROR_CODE;
2891
2982
  exports.ZOHO_INTERNAL_ERROR_CODE = ZOHO_INTERNAL_ERROR_CODE;
2892
2983
  exports.ZOHO_INVALID_AUTHORIZATION_ERROR_CODE = ZOHO_INVALID_AUTHORIZATION_ERROR_CODE;
2893
2984
  exports.ZOHO_INVALID_DATA_ERROR_CODE = ZOHO_INVALID_DATA_ERROR_CODE;
@@ -2896,7 +2987,9 @@ exports.ZOHO_MANDATORY_NOT_FOUND_ERROR_CODE = ZOHO_MANDATORY_NOT_FOUND_ERROR_COD
2896
2987
  exports.ZOHO_RATE_LIMIT_LIMIT_HEADER = ZOHO_RATE_LIMIT_LIMIT_HEADER;
2897
2988
  exports.ZOHO_RATE_LIMIT_REMAINING_HEADER = ZOHO_RATE_LIMIT_REMAINING_HEADER;
2898
2989
  exports.ZOHO_RATE_LIMIT_RESET_HEADER = ZOHO_RATE_LIMIT_RESET_HEADER;
2990
+ exports.ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE = ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE;
2899
2991
  exports.ZOHO_RECRUIT_CANDIDATES_MODULE = ZOHO_RECRUIT_CANDIDATES_MODULE;
2992
+ exports.ZOHO_RECRUIT_JOB_OPENINGS_MODULE = ZOHO_RECRUIT_JOB_OPENINGS_MODULE;
2900
2993
  exports.ZOHO_RECRUIT_SERVICE_NAME = ZOHO_RECRUIT_SERVICE_NAME;
2901
2994
  exports.ZOHO_SUCCESS_CODE = ZOHO_SUCCESS_CODE;
2902
2995
  exports.ZOHO_TOO_MANY_REQUESTS_ERROR_CODE = ZOHO_TOO_MANY_REQUESTS_ERROR_CODE;
@@ -2918,9 +3011,11 @@ exports.ZohoServerFetchResponseError = ZohoServerFetchResponseError;
2918
3011
  exports.ZohoTooManyRequestsError = ZohoTooManyRequestsError;
2919
3012
  exports.accessToken = accessToken;
2920
3013
  exports.assertRecordDataArrayResultHasContent = assertRecordDataArrayResultHasContent;
3014
+ exports.associateCandidateRecordsWithJobOpenings = associateCandidateRecordsWithJobOpenings;
2921
3015
  exports.createNotes = createNotes;
2922
3016
  exports.createNotesForRecord = createNotesForRecord;
2923
3017
  exports.deleteNotes = deleteNotes;
3018
+ exports.emptyZohoPageResult = emptyZohoPageResult;
2924
3019
  exports.escapeZohoFieldValueForCriteriaString = escapeZohoFieldValueForCriteriaString;
2925
3020
  exports.executeRestApiFunction = executeRestApiFunction;
2926
3021
  exports.getNotesForRecord = getNotesForRecord;
@@ -2944,6 +3039,11 @@ exports.parseZohoRecruitError = parseZohoRecruitError;
2944
3039
  exports.parseZohoRecruitServerErrorResponseData = parseZohoRecruitServerErrorResponseData;
2945
3040
  exports.parseZohoServerErrorResponseData = parseZohoServerErrorResponseData;
2946
3041
  exports.safeZohoDateTimeString = safeZohoDateTimeString;
3042
+ exports.searchAssociatedRecords = searchAssociatedRecords;
3043
+ exports.searchCandidateAssociatedJobOpeningRecords = searchCandidateAssociatedJobOpeningRecords;
3044
+ exports.searchCandidateAssociatedJobOpeningRecordsPageFactory = searchCandidateAssociatedJobOpeningRecordsPageFactory;
3045
+ exports.searchJobOpeningAssociatedCandidateRecords = searchJobOpeningAssociatedCandidateRecords;
3046
+ exports.searchJobOpeningAssociatedCandidateRecordsPageFactory = searchJobOpeningAssociatedCandidateRecordsPageFactory;
2947
3047
  exports.searchRecords = searchRecords;
2948
3048
  exports.searchRecordsPageFactory = searchRecordsPageFactory;
2949
3049
  exports.tryFindZohoServerErrorData = tryFindZohoServerErrorData;
package/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getNextPageNumber, escapeStringCharactersFunction, filterMaybeArrayValues, asArray, MS_IN_MINUTE, resetPeriodPromiseRateLimiter, MS_IN_SECOND, isStandardInternetAccessibleWebsiteUrl } from '@dereekb/util';
1
+ import { getNextPageNumber, escapeStringCharactersFunction, filterMaybeArrayValues, asArray, MS_IN_MINUTE, isStandardInternetAccessibleWebsiteUrl, separateValues, resetPeriodPromiseRateLimiter, MS_IN_SECOND } from '@dereekb/util';
2
2
  import { fetchPageFactory, FetchResponseError, makeUrlSearchParams, FetchRequestFactoryError, rateLimitedFetchHandler, fetchJsonFunction, returnNullHandleFetchJsonParseErrorFunction, fetchApiFetchService } from '@dereekb/util/fetch';
3
3
  import { BaseError } from 'make-error';
4
4
 
@@ -1773,6 +1773,21 @@ $$1({ target: 'Iterator', proto: true, real: true, forced: IS_PURE$1 }, {
1773
1773
  map: map
1774
1774
  });
1775
1775
 
1776
+ /**
1777
+ * Returns an empty ZohoPageResult that is typed to R and has no more records/results.
1778
+ */
1779
+ function emptyZohoPageResult() {
1780
+ return {
1781
+ data: [],
1782
+ info: {
1783
+ page: 1,
1784
+ per_page: 100,
1785
+ // default value
1786
+ count: 0,
1787
+ more_records: false
1788
+ }
1789
+ };
1790
+ }
1776
1791
  /**
1777
1792
  * Creates a FetchPageFactory using the input ZohoFetchPageFetchFunction.
1778
1793
  *
@@ -2067,6 +2082,10 @@ function interceptZohoErrorResponseFactory(parseZohoServerErrorResponseData) {
2067
2082
  * - An extra parameter is provided
2068
2083
  */
2069
2084
  const ZOHO_INTERNAL_ERROR_CODE = 'INTERNAL_ERROR';
2085
+ /**
2086
+ * Error code for when a failure occured for the given action
2087
+ */
2088
+ const ZOHO_FAILURE_ERROR_CODE = 'FAILURE';
2070
2089
  /**
2071
2090
  * Error when the Zoho API returns an internal error
2072
2091
  */
@@ -2186,6 +2205,12 @@ function tryFindZohoServerErrorData(errorResponseData, responseError) {
2186
2205
  return error;
2187
2206
  }
2188
2207
 
2208
+ /**
2209
+ * Error code for when two records are already associated with each other.
2210
+ *
2211
+ * Example being a candidate and a job opening are already associated.
2212
+ */
2213
+ const ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE = 'ALREADY_ASSOCIATED';
2189
2214
  /**
2190
2215
  * Thrown when a record with the given id has no content. Typically also means it does not exist.
2191
2216
  */
@@ -2503,6 +2528,80 @@ function zohoRecruitMultiRecordResult(input, results) {
2503
2528
  return result;
2504
2529
  }
2505
2530
 
2531
+ /**
2532
+ * Candidates module name
2533
+ */
2534
+ const ZOHO_RECRUIT_CANDIDATES_MODULE = 'Candidates';
2535
+ /**
2536
+ * Job Openings module name
2537
+ */
2538
+ const ZOHO_RECRUIT_JOB_OPENINGS_MODULE = 'Job_Openings';
2539
+ /**
2540
+ * Returns true if it is a valid ZohoRecruitValidUrl.
2541
+ */
2542
+ const isZohoRecruitValidUrl = isStandardInternetAccessibleWebsiteUrl;
2543
+
2544
+ /**
2545
+ * Associates one or more candidates with one or more job openings.
2546
+ *
2547
+ * https://www.zoho.com/recruit/developer-guide/apiv2/associate-candidate.html
2548
+ *
2549
+ * @param context
2550
+ * @returns
2551
+ */
2552
+ function associateCandidateRecordsWithJobOpenings(context) {
2553
+ return input => context.fetchJson(`/v2/${ZOHO_RECRUIT_CANDIDATES_MODULE}/actions/associate`, zohoRecruitApiFetchJsonInput('PUT', {
2554
+ data: asArray(input)
2555
+ })).then(x => {
2556
+ const resultInputMap = x.data.map(() => input); // assign "input" to each value for now
2557
+ const result = zohoRecruitMultiRecordResult(resultInputMap, x.data);
2558
+ const {
2559
+ included: alreadyAssociatedErrorItems,
2560
+ excluded: otherErrorItems
2561
+ } = separateValues(result.errorItems, x => {
2562
+ return x.result.code === ZOHO_FAILURE_ERROR_CODE && x.result.details.error[0].code === ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE;
2563
+ });
2564
+ return {
2565
+ ...result,
2566
+ errorItems: otherErrorItems,
2567
+ alreadyAssociatedErrorItems,
2568
+ allErrorItems: result.errorItems
2569
+ };
2570
+ });
2571
+ }
2572
+ function searchAssociatedRecords(context) {
2573
+ return input => {
2574
+ return context.fetchJson(`/v2/${input.module}/${input.id}/associate?${zohoRecruitUrlSearchParamsMinusIdAndModule(input).toString()}`, zohoRecruitApiFetchJsonInput('GET')).then(x => {
2575
+ const result = x ?? emptyZohoPageResult();
2576
+ return result;
2577
+ });
2578
+ };
2579
+ }
2580
+ function searchCandidateAssociatedJobOpeningRecords(context) {
2581
+ const searchAssociatedRecordsFactory = searchAssociatedRecords(context);
2582
+ return input => {
2583
+ return searchAssociatedRecordsFactory({
2584
+ ...input,
2585
+ module: ZOHO_RECRUIT_CANDIDATES_MODULE
2586
+ });
2587
+ };
2588
+ }
2589
+ function searchCandidateAssociatedJobOpeningRecordsPageFactory(context) {
2590
+ return zohoFetchPageFactory(searchCandidateAssociatedJobOpeningRecords(context));
2591
+ }
2592
+ function searchJobOpeningAssociatedCandidateRecords(context, jobOpeningModuleName = ZOHO_RECRUIT_JOB_OPENINGS_MODULE) {
2593
+ const searchAssociatedRecordsFactory = searchAssociatedRecords(context);
2594
+ return input => {
2595
+ return searchAssociatedRecordsFactory({
2596
+ ...input,
2597
+ module: jobOpeningModuleName
2598
+ });
2599
+ };
2600
+ }
2601
+ function searchJobOpeningAssociatedCandidateRecordsPageFactory(context) {
2602
+ return zohoFetchPageFactory(searchJobOpeningAssociatedCandidateRecords(context));
2603
+ }
2604
+
2506
2605
  /**
2507
2606
  * Creates a ZohoRecruitSearchRecordsCriteriaEntryArray from an array of emails.
2508
2607
  *
@@ -2701,15 +2800,6 @@ function zohoRecruitFactory(factoryConfig) {
2701
2800
  };
2702
2801
  }
2703
2802
 
2704
- /**
2705
- * Candidates module name
2706
- */
2707
- const ZOHO_RECRUIT_CANDIDATES_MODULE = 'Candidates';
2708
- /**
2709
- * Returns true if it is a valid ZohoRecruitValidUrl.
2710
- */
2711
- const isZohoRecruitValidUrl = isStandardInternetAccessibleWebsiteUrl;
2712
-
2713
2803
  /**
2714
2804
  * Trades a refresh token for a new AccessToken
2715
2805
  * @param context
@@ -2878,4 +2968,4 @@ function zohoDateTimeString(date) {
2878
2968
  return isoDate.substring(0, isoDate.length - 5) + 'Z';
2879
2969
  }
2880
2970
 
2881
- export { DEFAULT_ZOHO_API_RATE_LIMIT, DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD, DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION, 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_DUPLICATE_DATA_ERROR_CODE, ZOHO_INTERNAL_ERROR_CODE, ZOHO_INVALID_AUTHORIZATION_ERROR_CODE, ZOHO_INVALID_DATA_ERROR_CODE, ZOHO_INVALID_QUERY_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_CANDIDATES_MODULE, ZOHO_RECRUIT_SERVICE_NAME, ZOHO_SUCCESS_CODE, ZOHO_TOO_MANY_REQUESTS_ERROR_CODE, ZOHO_TOO_MANY_REQUESTS_HTTP_STATUS_CODE, ZohoAccountsAccessTokenError, ZohoAccountsAuthFailureError, ZohoInternalError, ZohoInvalidAuthorizationError, ZohoInvalidQueryError, ZohoRecruitExecuteRestApiFunctionError, ZohoRecruitRecordCrudDuplicateDataError, ZohoRecruitRecordCrudError, ZohoRecruitRecordCrudInvalidDataError, ZohoRecruitRecordCrudMandatoryFieldNotFoundError, ZohoRecruitRecordCrudNoMatchingRecordError, ZohoRecruitRecordNoContentError, ZohoServerError, ZohoServerFetchResponseError, ZohoTooManyRequestsError, accessToken, assertRecordDataArrayResultHasContent, createNotes, createNotesForRecord, deleteNotes, escapeZohoFieldValueForCriteriaString, executeRestApiFunction, getNotesForRecord, getNotesForRecordPageFactory, getRecordById, getRecords, handleZohoAccountsErrorFetch, handleZohoErrorFetchFactory, handleZohoRecruitErrorFetch, insertRecord, interceptZohoAccounts200StatusWithErrorResponse, interceptZohoErrorResponseFactory, interceptZohoRecruit200StatusWithErrorResponse, isZohoRecruitValidUrl, logZohoAccountsErrorToConsole, logZohoRecruitErrorToConsole, logZohoServerErrorFunction, parseZohoAccountsError, parseZohoAccountsServerErrorResponseData, parseZohoRecruitError, parseZohoRecruitServerErrorResponseData, parseZohoServerErrorResponseData, safeZohoDateTimeString, searchRecords, searchRecordsPageFactory, tryFindZohoServerErrorData, updateRecord, upsertRecord, zohoAccessTokenStringFactory, zohoAccountsApiFetchJsonInput, zohoAccountsConfigApiUrl, zohoAccountsFactory, zohoAccountsZohoAccessTokenFactory, zohoDateTimeString, zohoFetchPageFactory, zohoRateLimitHeaderDetails, zohoRateLimitedFetchHandler, zohoRecruitApiFetchJsonInput, zohoRecruitConfigApiUrl, zohoRecruitFactory, zohoRecruitMultiRecordResult, zohoRecruitRecordCrudError, zohoRecruitSearchRecordsCriteriaEntriesForEmails, zohoRecruitSearchRecordsCriteriaEntryToCriteriaString, zohoRecruitSearchRecordsCriteriaString, zohoRecruitSearchRecordsCriteriaStringForTree, zohoRecruitUrlSearchParams, zohoRecruitUrlSearchParamsMinusIdAndModule, zohoRecruitUrlSearchParamsMinusModule, zohoServerErrorData };
2971
+ export { DEFAULT_ZOHO_API_RATE_LIMIT, DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD, DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION, 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_DUPLICATE_DATA_ERROR_CODE, ZOHO_FAILURE_ERROR_CODE, ZOHO_INTERNAL_ERROR_CODE, ZOHO_INVALID_AUTHORIZATION_ERROR_CODE, ZOHO_INVALID_DATA_ERROR_CODE, ZOHO_INVALID_QUERY_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_ALREADY_ASSOCIATED_ERROR_CODE, ZOHO_RECRUIT_CANDIDATES_MODULE, ZOHO_RECRUIT_JOB_OPENINGS_MODULE, ZOHO_RECRUIT_SERVICE_NAME, ZOHO_SUCCESS_CODE, ZOHO_TOO_MANY_REQUESTS_ERROR_CODE, ZOHO_TOO_MANY_REQUESTS_HTTP_STATUS_CODE, ZohoAccountsAccessTokenError, ZohoAccountsAuthFailureError, ZohoInternalError, ZohoInvalidAuthorizationError, ZohoInvalidQueryError, ZohoRecruitExecuteRestApiFunctionError, ZohoRecruitRecordCrudDuplicateDataError, ZohoRecruitRecordCrudError, ZohoRecruitRecordCrudInvalidDataError, ZohoRecruitRecordCrudMandatoryFieldNotFoundError, ZohoRecruitRecordCrudNoMatchingRecordError, ZohoRecruitRecordNoContentError, ZohoServerError, ZohoServerFetchResponseError, ZohoTooManyRequestsError, accessToken, assertRecordDataArrayResultHasContent, associateCandidateRecordsWithJobOpenings, createNotes, createNotesForRecord, deleteNotes, emptyZohoPageResult, escapeZohoFieldValueForCriteriaString, executeRestApiFunction, getNotesForRecord, getNotesForRecordPageFactory, getRecordById, getRecords, handleZohoAccountsErrorFetch, handleZohoErrorFetchFactory, handleZohoRecruitErrorFetch, insertRecord, interceptZohoAccounts200StatusWithErrorResponse, interceptZohoErrorResponseFactory, interceptZohoRecruit200StatusWithErrorResponse, isZohoRecruitValidUrl, logZohoAccountsErrorToConsole, logZohoRecruitErrorToConsole, logZohoServerErrorFunction, parseZohoAccountsError, parseZohoAccountsServerErrorResponseData, parseZohoRecruitError, parseZohoRecruitServerErrorResponseData, parseZohoServerErrorResponseData, safeZohoDateTimeString, searchAssociatedRecords, searchCandidateAssociatedJobOpeningRecords, searchCandidateAssociatedJobOpeningRecordsPageFactory, searchJobOpeningAssociatedCandidateRecords, searchJobOpeningAssociatedCandidateRecordsPageFactory, searchRecords, searchRecordsPageFactory, tryFindZohoServerErrorData, updateRecord, upsertRecord, zohoAccessTokenStringFactory, zohoAccountsApiFetchJsonInput, zohoAccountsConfigApiUrl, zohoAccountsFactory, zohoAccountsZohoAccessTokenFactory, zohoDateTimeString, zohoFetchPageFactory, zohoRateLimitHeaderDetails, zohoRateLimitedFetchHandler, zohoRecruitApiFetchJsonInput, zohoRecruitConfigApiUrl, zohoRecruitFactory, zohoRecruitMultiRecordResult, zohoRecruitRecordCrudError, zohoRecruitSearchRecordsCriteriaEntriesForEmails, zohoRecruitSearchRecordsCriteriaEntryToCriteriaString, zohoRecruitSearchRecordsCriteriaString, zohoRecruitSearchRecordsCriteriaStringForTree, zohoRecruitUrlSearchParams, zohoRecruitUrlSearchParamsMinusIdAndModule, zohoRecruitUrlSearchParamsMinusModule, zohoServerErrorData };
@@ -2,6 +2,10 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [12.1.11](https://github.com/dereekb/dbx-components/compare/v12.1.10...v12.1.11) (2025-06-17)
6
+
7
+
8
+
5
9
  ## [12.1.10](https://github.com/dereekb/dbx-components/compare/v12.1.9...v12.1.10) (2025-06-13)
6
10
 
7
11
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/zoho/nestjs",
3
- "version": "12.1.10",
3
+ "version": "12.1.11",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "main": "./src/index.js"
@@ -29,7 +29,7 @@ export declare function mergeZohoAccountsAccessTokenCacheServices(inputServicesT
29
29
  *
30
30
  * @returns
31
31
  */
32
- export declare function memoryZohoAccountsAccessTokenCacheService(existingCache?: ZohoAccountsAccessTokenCacheRecord): ZohoAccountsAccessTokenCacheService;
32
+ export declare function memoryZohoAccountsAccessTokenCacheService(existingCache?: ZohoAccountsAccessTokenCacheRecord, logAccessToConsole?: boolean): ZohoAccountsAccessTokenCacheService;
33
33
  export interface FileSystemZohoAccountsAccessTokenCacheService extends ZohoAccountsAccessTokenCacheService {
34
34
  readTokenFile(): Promise<Maybe<ZohoAccountsAccessTokenCacheRecord>>;
35
35
  writeTokenFile(tokens: ZohoAccountsAccessTokenCacheRecord): Promise<void>;
@@ -89,18 +89,22 @@ function mergeZohoAccountsAccessTokenCacheServices(inputServicesToMerge, logErro
89
89
  *
90
90
  * @returns
91
91
  */
92
- function memoryZohoAccountsAccessTokenCacheService(existingCache) {
92
+ function memoryZohoAccountsAccessTokenCacheService(existingCache, logAccessToConsole) {
93
93
  const tokens = existingCache ?? {};
94
94
  function loadZohoAccessTokenCache(service) {
95
95
  const accessTokenCache = {
96
96
  loadCachedToken: async function () {
97
97
  const token = tokens[service];
98
- console.log('retrieving access token from memory: ', { token, service });
98
+ if (logAccessToConsole) {
99
+ console.log('retrieving access token from memory: ', { token, service });
100
+ }
99
101
  return token;
100
102
  },
101
103
  updateCachedToken: async function (accessToken) {
102
104
  tokens[service] = accessToken;
103
- console.log('updating access token in memory: ', { accessToken, service });
105
+ if (logAccessToConsole) {
106
+ console.log('updating access token in memory: ', { accessToken, service });
107
+ }
104
108
  }
105
109
  };
106
110
  return accessTokenCache;
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.service.js","sourceRoot":"","sources":["../../../../../../../packages/zoho/nestjs/src/lib/accounts/accounts.service.ts"],"names":[],"mappings":";;;AAuBA,4HAKC;AAWD,8FA+DC;AAQD,8FAsBC;AAkBD,0FAyGC;;AA/PD,2CAA4C;AAE5C,wCAAsI;AACtI,+BAA+B;AAC/B,2BAAwD;AAIxD;;GAEG;AAEI,IAAe,mCAAmC,GAAlD,MAAe,mCAAmC;CAOxD,CAAA;AAPqB,kFAAmC;8CAAnC,mCAAmC;IADxD,IAAA,mBAAU,GAAE;GACS,mCAAmC,CAOxD;AAID,SAAgB,wDAAwD,CAAC,aAA2D;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C;gBAElC,IAAI,MAAM,EAAE,CAAC;oBACX,MAAM,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC;gBAChC,CAAC;gBAED,4EAA4E;gBAE5E,IAAI,CAAC;oBACH,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;gBAC/B,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAC;gBAC7D,CAAC;YACH,CAAC;SACF,CAAC;QAEF,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,OAAO;QACL,wBAAwB;QACxB,aAAa;QACb,cAAc;QACd,eAAe;KAChB,CAAC;AACJ,CAAC"}
@@ -21,4 +21,9 @@ export declare class ZohoRecruitApi {
21
21
  get getNotesForRecord(): import("@dereekb/zoho").ZohoRecruitGetNotesForRecordFunction;
22
22
  get getNotesForRecordPageFactory(): import("@dereekb/zoho").GetNotesForRecordPageFactory;
23
23
  get executeRestApiFunction(): import("@dereekb/zoho").ZohoRecruitExecuteRestApiFunctionFunction;
24
+ get associateCandidateRecordsWithJobOpenings(): import("@dereekb/zoho").ZohoRecruitAssociateCandidateRecordsWithJobOpeningsFunction;
25
+ get searchCandidateAssociatedJobOpeningRecords(): import("@dereekb/zoho").ZohoRecruitSearchCandidateAssociatedJobOpeningRecordsFunction<import("@dereekb/zoho").ZohoRecruitRecord>;
26
+ get searchCandidateAssociatedJobOpeningRecordsPageFactory(): import("dist/packages/util/fetch/src").FetchPageFactory<import("@dereekb/zoho").ZohoRecruitSearchCandidateAssociatedJobOpeningRecordsInput, import("@dereekb/zoho").ZohoRecruitSearchAssociatedRecordsResponse<import("@dereekb/zoho").ZohoRecruitRecord>>;
27
+ get searchJobOpeningAssociatedCandidateRecords(): import("@dereekb/zoho").ZohoRecruitSearchJobOpeningAssociatedCandidateRecordsFunction<import("@dereekb/zoho").ZohoRecruitRecord>;
28
+ get searchJobOpeningAssociatedCandidateRecordsPageFactory(): import("dist/packages/util/fetch/src").FetchPageFactory<import("@dereekb/zoho").ZohoRecruitSearchJobOpeningAssociatedCandidateRecordsInput, import("@dereekb/zoho").ZohoRecruitSearchAssociatedRecordsResponse<import("@dereekb/zoho").ZohoRecruitRecord>>;
24
29
  }
@@ -64,6 +64,21 @@ let ZohoRecruitApi = class ZohoRecruitApi {
64
64
  get executeRestApiFunction() {
65
65
  return (0, zoho_1.executeRestApiFunction)(this.recruitContext);
66
66
  }
67
+ get associateCandidateRecordsWithJobOpenings() {
68
+ return (0, zoho_1.associateCandidateRecordsWithJobOpenings)(this.recruitContext);
69
+ }
70
+ get searchCandidateAssociatedJobOpeningRecords() {
71
+ return (0, zoho_1.searchCandidateAssociatedJobOpeningRecords)(this.recruitContext);
72
+ }
73
+ get searchCandidateAssociatedJobOpeningRecordsPageFactory() {
74
+ return (0, zoho_1.searchCandidateAssociatedJobOpeningRecordsPageFactory)(this.recruitContext);
75
+ }
76
+ get searchJobOpeningAssociatedCandidateRecords() {
77
+ return (0, zoho_1.searchJobOpeningAssociatedCandidateRecords)(this.recruitContext);
78
+ }
79
+ get searchJobOpeningAssociatedCandidateRecordsPageFactory() {
80
+ return (0, zoho_1.searchJobOpeningAssociatedCandidateRecordsPageFactory)(this.recruitContext);
81
+ }
67
82
  };
68
83
  exports.ZohoRecruitApi = ZohoRecruitApi;
69
84
  exports.ZohoRecruitApi = ZohoRecruitApi = tslib_1.__decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"recruit.api.js","sourceRoot":"","sources":["../../../../../../../packages/zoho/nestjs/src/lib/recruit/recruit.api.ts"],"names":[],"mappings":";;;;AAAA,2CAAoD;AACpD,wCAA2T;AAC3T,qDAA4D;AAC5D,2DAA2D;AAGpD,IAAM,cAAc,GAApB,MAAM,cAAc;IAYoB;IACT;IAZ3B,WAAW,CAAc;IAElC,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;IACzC,CAAC;IAED,IAAI,eAAe;QACjB,OAA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AAc,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,IAAA,wBAAiB,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,4BAA4B;QAC9B,OAAO,IAAA,mCAA4B,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,sBAAsB;QACxB,OAAO,IAAA,6BAAsB,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrD,CAAC;CACF,CAAA;AAzEY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAaR,mBAAA,IAAA,eAAM,EAAC,yCAAwB,CAAC,CAAA;IAChC,mBAAA,IAAA,eAAM,EAAC,8BAAe,CAAC,CAAA;6CAD2B,yCAAwB;QACxB,8BAAe;GAbzD,cAAc,CAyE1B"}
1
+ {"version":3,"file":"recruit.api.js","sourceRoot":"","sources":["../../../../../../../packages/zoho/nestjs/src/lib/recruit/recruit.api.ts"],"names":[],"mappings":";;;;AAAA,2CAAoD;AACpD,wCAsBuB;AACvB,qDAA4D;AAC5D,2DAA2D;AAGpD,IAAM,cAAc,GAApB,MAAM,cAAc;IAYoB;IACT;IAZ3B,WAAW,CAAc;IAElC,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;IACzC,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,eAAe,CAAC;IACzD,CAAC;IAED,YAC6C,MAAgC,EACzC,eAAgC;QADvB,WAAM,GAAN,MAAM,CAA0B;QACzC,oBAAe,GAAf,eAAe,CAAiB;QAElE,IAAI,CAAC,WAAW,GAAG,IAAA,yBAAkB,EAAC;YACpC,GAAG,MAAM,CAAC,aAAa;YACvB,eAAe,EAAE,eAAe,CAAC,eAAe;SACjD,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAED,kBAAkB;IAClB,IAA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,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,0CAA0C;QAC5C,OAAO,IAAA,iDAA0C,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,qDAAqD;QACvD,OAAO,IAAA,4DAAqD,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACpF,CAAC;IAED,IAAI,0CAA0C;QAC5C,OAAO,IAAA,iDAA0C,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,qDAAqD;QACvD,OAAO,IAAA,4DAAqD,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACpF,CAAC;CACF,CAAA;AA7FY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAaR,mBAAA,IAAA,eAAM,EAAC,yCAAwB,CAAC,CAAA;IAChC,mBAAA,IAAA,eAAM,EAAC,8BAAe,CAAC,CAAA;6CAD2B,yCAAwB;QACxB,8BAAe;GAbzD,cAAc,CA6F1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/zoho",
3
- "version": "12.1.10",
3
+ "version": "12.1.11",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./src/index.d.ts",
@@ -1,4 +1,5 @@
1
1
  export * from './recruit.api';
2
+ export * from './recruit.api.candidates';
2
3
  export * from './recruit.config';
3
4
  export * from './recruit.criteria';
4
5
  export * from './recruit.criteria.util';
@@ -0,0 +1,69 @@
1
+ import { ZohoRecruitContext } from './recruit.config';
2
+ import { ArrayOrValue } from '@dereekb/util';
3
+ import { ZohoRecruitJobOpeningId, ZohoRecruitCandidateId, ZohoRecruitCandidateStatus, ZohoRecruitJobOpeningPostingTitle, ZohoRecruitModuleNameRef, ZohoRecruitRecord } from './recruit';
4
+ import { ZohoRecruitChangeObjectLikeResponse, ZohoRecruitChangeObjectLikeResponseSuccessEntryMeta, ZohoRecruitChangeObjectResponseErrorEntry, ZohoRecruitGetRecordsPageFilter, ZohoRecruitMultiRecordResult, ZohoRecruitMultiRecordResultEntry, ZohoRecruitSearchRecordsResponse } from './recruit.api';
5
+ import { ZohoServerErrorDataWithDetails } from '../zoho.error.api';
6
+ export type ZohoRecruitAssociateCandidateRecordsWithJobOpeningsInput = ArrayOrValue<ZohoRecruitAssociateCandidateRecordsWithJobOpeningsInputData>;
7
+ export interface ZohoRecruitAssociateCandidateRecordsWithJobOpeningsInputData {
8
+ readonly jobids: ZohoRecruitJobOpeningId[];
9
+ readonly ids: ZohoRecruitCandidateId[];
10
+ }
11
+ export interface ZohoRecruitAssociateCandidateRecordsWithJobOpeningsResultDetails {
12
+ /**
13
+ * Job Opening id that was updated
14
+ */
15
+ readonly jobid: ZohoRecruitJobOpeningId;
16
+ /**
17
+ * Candidate ids that were associated with the job opening
18
+ */
19
+ readonly ids: ZohoRecruitCandidateId[];
20
+ }
21
+ export interface ZohoRecruitAssociateCandidateRecordsWithJobOpeningsSuccessEntry extends ZohoRecruitChangeObjectLikeResponseSuccessEntryMeta {
22
+ readonly details: ZohoRecruitAssociateCandidateRecordsWithJobOpeningsResultDetails;
23
+ }
24
+ export type ZohoRecruitAssociateCandidateRecordsWithJobOpeningsResponse = ZohoRecruitChangeObjectLikeResponse<ZohoRecruitAssociateCandidateRecordsWithJobOpeningsSuccessEntry>;
25
+ export interface ZohoRecruitAssociateCandidateRecordsWithJobOpeningsErrorEntryDetails extends ZohoRecruitAssociateCandidateRecordsWithJobOpeningsResultDetails {
26
+ readonly error: ZohoServerErrorDataWithDetails[];
27
+ }
28
+ export type ZohoRecruitAssociateCandidateRecordsWithJobOpeningsErrorEntry = ZohoRecruitChangeObjectResponseErrorEntry & {
29
+ readonly details: ZohoRecruitAssociateCandidateRecordsWithJobOpeningsErrorEntryDetails;
30
+ };
31
+ export type ZohoRecruitAssociateCandidateRecordsWithJobOpeningsResult = ZohoRecruitMultiRecordResult<ZohoRecruitAssociateCandidateRecordsWithJobOpeningsInput, ZohoRecruitAssociateCandidateRecordsWithJobOpeningsSuccessEntry, ZohoRecruitAssociateCandidateRecordsWithJobOpeningsErrorEntry> & {
32
+ /**
33
+ * List of items that are already associated with the job opening
34
+ */
35
+ readonly alreadyAssociatedErrorItems: ZohoRecruitMultiRecordResultEntry<ZohoRecruitAssociateCandidateRecordsWithJobOpeningsInput, ZohoRecruitAssociateCandidateRecordsWithJobOpeningsErrorEntry>[];
36
+ readonly allErrorItems: ZohoRecruitMultiRecordResultEntry<ZohoRecruitAssociateCandidateRecordsWithJobOpeningsInput, ZohoRecruitAssociateCandidateRecordsWithJobOpeningsErrorEntry>[];
37
+ };
38
+ export type ZohoRecruitAssociateCandidateRecordsWithJobOpeningsFunction = (input: ZohoRecruitAssociateCandidateRecordsWithJobOpeningsInput) => Promise<ZohoRecruitAssociateCandidateRecordsWithJobOpeningsResult>;
39
+ /**
40
+ * Associates one or more candidates with one or more job openings.
41
+ *
42
+ * https://www.zoho.com/recruit/developer-guide/apiv2/associate-candidate.html
43
+ *
44
+ * @param context
45
+ * @returns
46
+ */
47
+ export declare function associateCandidateRecordsWithJobOpenings(context: ZohoRecruitContext): ZohoRecruitAssociateCandidateRecordsWithJobOpeningsFunction;
48
+ export interface ZohoRecruitSearchAssociatedRecordsInput extends ZohoRecruitModuleNameRef, ZohoRecruitGetRecordsPageFilter {
49
+ readonly id: ZohoRecruitCandidateId | ZohoRecruitJobOpeningId;
50
+ /**
51
+ * Posting title to filter associated Job Openings by
52
+ */
53
+ readonly posting_title?: ZohoRecruitJobOpeningPostingTitle;
54
+ /**
55
+ * Candidate statuses to filter associated Candidates by
56
+ */
57
+ readonly candidate_statuses?: ZohoRecruitCandidateStatus;
58
+ }
59
+ export type ZohoRecruitSearchAssociatedRecordsResponse<T = ZohoRecruitRecord> = ZohoRecruitSearchRecordsResponse<T>;
60
+ export type ZohoRecruitSearchAssociatedRecordsFunction<R extends ZohoRecruitSearchAssociatedRecordsResponse> = (input: ZohoRecruitSearchAssociatedRecordsInput) => Promise<R>;
61
+ export declare function searchAssociatedRecords<R extends ZohoRecruitSearchAssociatedRecordsResponse>(context: ZohoRecruitContext): ZohoRecruitSearchAssociatedRecordsFunction<R>;
62
+ export type ZohoRecruitSearchCandidateAssociatedJobOpeningRecordsInput = Omit<ZohoRecruitSearchAssociatedRecordsInput, 'module' | 'candidate_statuses'>;
63
+ export type ZohoRecruitSearchCandidateAssociatedJobOpeningRecordsFunction<T extends ZohoRecruitRecord> = (input: ZohoRecruitSearchCandidateAssociatedJobOpeningRecordsInput) => Promise<ZohoRecruitSearchAssociatedRecordsResponse<T>>;
64
+ export declare function searchCandidateAssociatedJobOpeningRecords<T extends ZohoRecruitRecord>(context: ZohoRecruitContext): ZohoRecruitSearchCandidateAssociatedJobOpeningRecordsFunction<T>;
65
+ export declare function searchCandidateAssociatedJobOpeningRecordsPageFactory<T extends ZohoRecruitRecord>(context: ZohoRecruitContext): import("dist/packages/util/fetch/src").FetchPageFactory<ZohoRecruitSearchCandidateAssociatedJobOpeningRecordsInput, ZohoRecruitSearchAssociatedRecordsResponse<T>>;
66
+ export type ZohoRecruitSearchJobOpeningAssociatedCandidateRecordsInput = Omit<ZohoRecruitSearchAssociatedRecordsInput, 'module' | 'posting_title'>;
67
+ export type ZohoRecruitSearchJobOpeningAssociatedCandidateRecordsFunction<T extends ZohoRecruitRecord> = (input: ZohoRecruitSearchJobOpeningAssociatedCandidateRecordsInput) => Promise<ZohoRecruitSearchAssociatedRecordsResponse<T>>;
68
+ export declare function searchJobOpeningAssociatedCandidateRecords<T extends ZohoRecruitRecord>(context: ZohoRecruitContext, jobOpeningModuleName?: string): ZohoRecruitSearchJobOpeningAssociatedCandidateRecordsFunction<T>;
69
+ export declare function searchJobOpeningAssociatedCandidateRecordsPageFactory<T extends ZohoRecruitRecord>(context: ZohoRecruitContext): import("dist/packages/util/fetch/src").FetchPageFactory<ZohoRecruitSearchJobOpeningAssociatedCandidateRecordsInput, ZohoRecruitSearchAssociatedRecordsResponse<T>>;
@@ -236,14 +236,18 @@ export declare function zohoRecruitUrlSearchParamsMinusIdAndModule(...input: May
236
236
  */
237
237
  export declare const zohoRecruitUrlSearchParams: typeof makeUrlSearchParams;
238
238
  export declare function zohoRecruitApiFetchJsonInput(method: string, body?: Maybe<FetchJsonBody>): FetchJsonInput;
239
- export type ZohoRecruitChangeObjectResponse<T extends ZohoRecruitChangeObjectResponseEntry = ZohoRecruitChangeObjectResponseEntry> = ZohoDataArrayResultRef<T>;
240
- export type ZohoRecruitChangeObjectResponseEntry<E extends ZohoRecruitChangeObjectResponseSuccessEntry = ZohoRecruitChangeObjectResponseSuccessEntry> = E | ZohoRecruitChangeObjectResponseErrorEntry;
241
- export interface ZohoRecruitChangeObjectResponseSuccessEntry<D extends ZohoRecruitChangeObjectDetails = ZohoRecruitChangeObjectDetails> {
239
+ export type ZohoRecruitChangeObjectLikeResponse<T extends ZohoRecruitChangeObjectLikeResponseEntry = ZohoRecruitChangeObjectLikeResponseEntry> = ZohoDataArrayResultRef<T>;
240
+ export type ZohoRecruitChangeObjectLikeResponseEntry<E extends ZohoRecruitChangeObjectLikeResponseSuccessEntryMeta = ZohoRecruitChangeObjectLikeResponseSuccessEntryMeta> = E | ZohoRecruitChangeObjectResponseErrorEntry;
241
+ export interface ZohoRecruitChangeObjectLikeResponseSuccessEntryMeta {
242
242
  readonly code: ZohoServerSuccessCode;
243
- readonly details: D;
244
243
  readonly status: ZohoServerSuccessStatus;
245
244
  readonly message: string;
246
245
  }
246
+ export type ZohoRecruitChangeObjectResponse<T extends ZohoRecruitChangeObjectResponseEntry = ZohoRecruitChangeObjectResponseEntry> = ZohoRecruitChangeObjectLikeResponse<T>;
247
+ export type ZohoRecruitChangeObjectResponseEntry<E extends ZohoRecruitChangeObjectResponseSuccessEntry = ZohoRecruitChangeObjectResponseSuccessEntry> = ZohoRecruitChangeObjectLikeResponseEntry<E>;
248
+ export interface ZohoRecruitChangeObjectResponseSuccessEntry<D extends ZohoRecruitChangeObjectDetails = ZohoRecruitChangeObjectDetails> extends ZohoRecruitChangeObjectLikeResponseSuccessEntryMeta {
249
+ readonly details: D;
250
+ }
247
251
  export interface ZohoRecruitChangeObjectResponseErrorEntry extends ZohoServerErrorDataWithDetails {
248
252
  readonly status: ZohoServerErrorStatus;
249
253
  }
@@ -9,6 +9,10 @@ export type ZohoRecruitModuleName = string;
9
9
  * Candidates module name
10
10
  */
11
11
  export declare const ZOHO_RECRUIT_CANDIDATES_MODULE = "Candidates";
12
+ /**
13
+ * Job Openings module name
14
+ */
15
+ export declare const ZOHO_RECRUIT_JOB_OPENINGS_MODULE = "Job_Openings";
12
16
  /**
13
17
  * Contains a reference to a module.
14
18
  */
@@ -23,6 +27,14 @@ export type ZohoRecruitRestFunctionApiName = string;
23
27
  * An identifier in Zoho Recruit.
24
28
  */
25
29
  export type ZohoRecruitId = string;
30
+ /**
31
+ * Identifier of a Candidate record in Zoho Recruit.
32
+ */
33
+ export type ZohoRecruitCandidateId = string;
34
+ /**
35
+ * Identifier of a Job Opening record in Zoho Recruit.
36
+ */
37
+ export type ZohoRecruitJobOpeningId = string;
26
38
  /**
27
39
  * Zoho Recruit record id
28
40
  *
@@ -170,6 +182,14 @@ export type ZohoRecruitNoteFileSize = number;
170
182
  export interface ZohoRecruitNote extends ZohoRecruitNoteData, UniqueModelWithId {
171
183
  }
172
184
  export type ZohoRecruitRecordNote = ZohoRecruitNote;
185
+ /**
186
+ * The posting title of a job opening.
187
+ */
188
+ export type ZohoRecruitJobOpeningPostingTitle = string;
189
+ /**
190
+ * The status of a candidate.
191
+ */
192
+ export type ZohoRecruitCandidateStatus = string;
173
193
  /**
174
194
  * @deprecated use NewZohoRecruitNewNoteData instead.
175
195
  */
@@ -3,6 +3,12 @@ import { BaseError } from 'make-error';
3
3
  import { ZohoServerErrorDataWithDetails, ZohoServerErrorResponseData, ZohoServerError, ParsedZohoServerError } from '../zoho.error.api';
4
4
  import { ZohoRecruitModuleName, ZohoRecruitRecordId } from './recruit';
5
5
  import { ZohoDataArrayResultRef } from '../zoho.api.page';
6
+ /**
7
+ * Error code for when two records are already associated with each other.
8
+ *
9
+ * Example being a candidate and a job opening are already associated.
10
+ */
11
+ export declare const ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE = "ALREADY_ASSOCIATED";
6
12
  /**
7
13
  * Thrown when a record with the given id has no content. Typically also means it does not exist.
8
14
  */
@@ -22,6 +22,10 @@ export interface ZohoPageResult<T, I extends ZohoPageResultInfo = ZohoPageResult
22
22
  */
23
23
  readonly info: I;
24
24
  }
25
+ /**
26
+ * Returns an empty ZohoPageResult that is typed to R and has no more records/results.
27
+ */
28
+ export declare function emptyZohoPageResult<T = unknown>(): ZohoPageResult<T>;
25
29
  /**
26
30
  * Page information within a ZohoPageResult
27
31
  */
@@ -82,6 +82,10 @@ export declare function interceptZohoErrorResponseFactory(parseZohoServerErrorRe
82
82
  * - An extra parameter is provided
83
83
  */
84
84
  export declare const ZOHO_INTERNAL_ERROR_CODE = "INTERNAL_ERROR";
85
+ /**
86
+ * Error code for when a failure occured for the given action
87
+ */
88
+ export declare const ZOHO_FAILURE_ERROR_CODE = "FAILURE";
85
89
  /**
86
90
  * Error when the Zoho API returns an internal error
87
91
  */