@dereekb/zoho 12.1.7 → 12.1.9

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
@@ -1870,13 +1870,13 @@ $({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
1870
1870
  });
1871
1871
 
1872
1872
  /**
1873
- * Candidates module name
1874
- */
1875
- const ZOHO_RECRUIT_CANDIDATES_MODULE = 'Candidates';
1876
- /**
1877
- * Returns true if it is a valid ZohoRecruitValidUrl.
1873
+ * Can search up to 10 criteria at a time.
1874
+ *
1875
+ * https://www.zoho.com/recruit/developer-guide/apiv2/search-records.html
1876
+ *
1877
+ * "You can search for a maximum of 10 criteria (with the same or different column) with equals and starts_with conditions."
1878
1878
  */
1879
- const isZohoRecruitValidUrl = util.isStandardInternetAccessibleWebsiteUrl;
1879
+ const MAX_ZOHO_RECRUIT_SEARCH_MODULE_RECORDS_CRITERIA = 10;
1880
1880
  /**
1881
1881
  * Creates a ZohoRecruitSearchRecordsCriteriaString from a ZohoRecruitSearchRecordsCriteriaTree.
1882
1882
  *
@@ -2505,6 +2505,25 @@ function zohoRecruitMultiRecordResult(input, results) {
2505
2505
  return result;
2506
2506
  }
2507
2507
 
2508
+ /**
2509
+ * Creates a ZohoRecruitSearchRecordsCriteriaEntryArray from an array of emails.
2510
+ *
2511
+ * @param emails Email or array of emails to search for.
2512
+ * @param field Optional field name to use. Defaults to 'Email'.
2513
+ * @returns Array of ZohoRecruitSearchRecordsCriteriaEntry
2514
+ */
2515
+ function zohoRecruitSearchRecordsCriteriaEntriesForEmails(emails, field = 'Email') {
2516
+ const allEmails = util.asArray(emails);
2517
+ return allEmails.map(email => {
2518
+ const emailCriteria = {
2519
+ field,
2520
+ filter: 'equals',
2521
+ value: email
2522
+ };
2523
+ return emailCriteria;
2524
+ });
2525
+ }
2526
+
2508
2527
  /**
2509
2528
  * Error in the following cases:
2510
2529
  * - the refresh token string is invalid
@@ -2684,6 +2703,15 @@ function zohoRecruitFactory(factoryConfig) {
2684
2703
  };
2685
2704
  }
2686
2705
 
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
+
2687
2715
  /**
2688
2716
  * Trades a refresh token for a new AccessToken
2689
2717
  * @param context
@@ -2855,6 +2883,7 @@ function zohoDateTimeString(date) {
2855
2883
  exports.DEFAULT_ZOHO_API_RATE_LIMIT = DEFAULT_ZOHO_API_RATE_LIMIT;
2856
2884
  exports.DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD = DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD;
2857
2885
  exports.DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION = DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION;
2886
+ exports.MAX_ZOHO_RECRUIT_SEARCH_MODULE_RECORDS_CRITERIA = MAX_ZOHO_RECRUIT_SEARCH_MODULE_RECORDS_CRITERIA;
2858
2887
  exports.ZOHO_ACCOUNTS_INVALID_CLIENT_ERROR_CODE = ZOHO_ACCOUNTS_INVALID_CLIENT_ERROR_CODE;
2859
2888
  exports.ZOHO_ACCOUNTS_INVALID_CODE_ERROR_CODE = ZOHO_ACCOUNTS_INVALID_CODE_ERROR_CODE;
2860
2889
  exports.ZOHO_ACCOUNTS_US_API_URL = ZOHO_ACCOUNTS_US_API_URL;
@@ -2934,6 +2963,7 @@ exports.zohoRecruitConfigApiUrl = zohoRecruitConfigApiUrl;
2934
2963
  exports.zohoRecruitFactory = zohoRecruitFactory;
2935
2964
  exports.zohoRecruitMultiRecordResult = zohoRecruitMultiRecordResult;
2936
2965
  exports.zohoRecruitRecordCrudError = zohoRecruitRecordCrudError;
2966
+ exports.zohoRecruitSearchRecordsCriteriaEntriesForEmails = zohoRecruitSearchRecordsCriteriaEntriesForEmails;
2937
2967
  exports.zohoRecruitSearchRecordsCriteriaEntryToCriteriaString = zohoRecruitSearchRecordsCriteriaEntryToCriteriaString;
2938
2968
  exports.zohoRecruitSearchRecordsCriteriaString = zohoRecruitSearchRecordsCriteriaString;
2939
2969
  exports.zohoRecruitSearchRecordsCriteriaStringForTree = zohoRecruitSearchRecordsCriteriaStringForTree;
package/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getNextPageNumber, escapeStringCharactersFunction, isStandardInternetAccessibleWebsiteUrl, filterMaybeArrayValues, asArray, MS_IN_MINUTE, resetPeriodPromiseRateLimiter, MS_IN_SECOND } from '@dereekb/util';
1
+ import { getNextPageNumber, escapeStringCharactersFunction, filterMaybeArrayValues, asArray, MS_IN_MINUTE, resetPeriodPromiseRateLimiter, MS_IN_SECOND, isStandardInternetAccessibleWebsiteUrl } 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
 
@@ -1868,13 +1868,13 @@ $({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
1868
1868
  });
1869
1869
 
1870
1870
  /**
1871
- * Candidates module name
1872
- */
1873
- const ZOHO_RECRUIT_CANDIDATES_MODULE = 'Candidates';
1874
- /**
1875
- * Returns true if it is a valid ZohoRecruitValidUrl.
1871
+ * Can search up to 10 criteria at a time.
1872
+ *
1873
+ * https://www.zoho.com/recruit/developer-guide/apiv2/search-records.html
1874
+ *
1875
+ * "You can search for a maximum of 10 criteria (with the same or different column) with equals and starts_with conditions."
1876
1876
  */
1877
- const isZohoRecruitValidUrl = isStandardInternetAccessibleWebsiteUrl;
1877
+ const MAX_ZOHO_RECRUIT_SEARCH_MODULE_RECORDS_CRITERIA = 10;
1878
1878
  /**
1879
1879
  * Creates a ZohoRecruitSearchRecordsCriteriaString from a ZohoRecruitSearchRecordsCriteriaTree.
1880
1880
  *
@@ -2503,6 +2503,25 @@ function zohoRecruitMultiRecordResult(input, results) {
2503
2503
  return result;
2504
2504
  }
2505
2505
 
2506
+ /**
2507
+ * Creates a ZohoRecruitSearchRecordsCriteriaEntryArray from an array of emails.
2508
+ *
2509
+ * @param emails Email or array of emails to search for.
2510
+ * @param field Optional field name to use. Defaults to 'Email'.
2511
+ * @returns Array of ZohoRecruitSearchRecordsCriteriaEntry
2512
+ */
2513
+ function zohoRecruitSearchRecordsCriteriaEntriesForEmails(emails, field = 'Email') {
2514
+ const allEmails = asArray(emails);
2515
+ return allEmails.map(email => {
2516
+ const emailCriteria = {
2517
+ field,
2518
+ filter: 'equals',
2519
+ value: email
2520
+ };
2521
+ return emailCriteria;
2522
+ });
2523
+ }
2524
+
2506
2525
  /**
2507
2526
  * Error in the following cases:
2508
2527
  * - the refresh token string is invalid
@@ -2682,6 +2701,15 @@ function zohoRecruitFactory(factoryConfig) {
2682
2701
  };
2683
2702
  }
2684
2703
 
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
+
2685
2713
  /**
2686
2714
  * Trades a refresh token for a new AccessToken
2687
2715
  * @param context
@@ -2850,4 +2878,4 @@ function zohoDateTimeString(date) {
2850
2878
  return isoDate.substring(0, isoDate.length - 5) + 'Z';
2851
2879
  }
2852
2880
 
2853
- export { DEFAULT_ZOHO_API_RATE_LIMIT, DEFAULT_ZOHO_API_RATE_LIMIT_RESET_PERIOD, DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION, 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, zohoRecruitSearchRecordsCriteriaEntryToCriteriaString, zohoRecruitSearchRecordsCriteriaString, zohoRecruitSearchRecordsCriteriaStringForTree, zohoRecruitUrlSearchParams, zohoRecruitUrlSearchParamsMinusIdAndModule, zohoRecruitUrlSearchParamsMinusModule, zohoServerErrorData };
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 };
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [12.1.9](https://github.com/dereekb/dbx-components/compare/v12.1.8...v12.1.9) (2025-06-09)
6
+
7
+
8
+
9
+ ## [12.1.8](https://github.com/dereekb/dbx-components/compare/v12.1.7...v12.1.8) (2025-06-08)
10
+
11
+
12
+
5
13
  ## [12.1.7](https://github.com/dereekb/dbx-components/compare/v12.1.6...v12.1.7) (2025-06-04)
6
14
 
7
15
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/zoho/nestjs",
3
- "version": "12.1.7",
3
+ "version": "12.1.9",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "main": "./src/index.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/zoho",
3
- "version": "12.1.7",
3
+ "version": "12.1.9",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./src/index.d.ts",
@@ -1,5 +1,7 @@
1
1
  export * from './recruit.api';
2
2
  export * from './recruit.config';
3
+ export * from './recruit.criteria';
4
+ export * from './recruit.criteria.util';
3
5
  export * from './recruit.error.api';
4
6
  export * from './recruit.factory';
5
7
  export * from './recruit';
@@ -1,7 +1,8 @@
1
1
  import { ZohoDataArrayResultRef, ZohoPageFilter, ZohoPageResult } from './../zoho.api.page';
2
2
  import { FetchJsonBody, FetchJsonInput, FetchPage, FetchPageFactory, FetchPageFactoryOptions, makeUrlSearchParams } from '@dereekb/util/fetch';
3
3
  import { ZohoRecruitConfigApiUrlInput, ZohoRecruitContext } from './recruit.config';
4
- import { NewZohoRecruitNoteData, ZohoRecruitCommaSeparateFieldNames, ZohoRecruitCustomViewId, ZohoRecruitDraftOrSaveState, ZohoRecruitFieldName, ZohoRecruitModuleNameRef, ZohoRecruitChangeObjectDetails, ZohoRecruitRecord, ZohoRecruitRecordId, ZohoRecruitRecordNote, ZohoRecruitSearchRecordsCriteriaTreeElement, ZohoRecruitTerritoryId, ZohoRecruitTrueFalseBoth, ZohoRecruitNoteId, ZohoRecruitRestFunctionApiName, ZohoRecruitUserId } from './recruit';
4
+ import { NewZohoRecruitNoteData, ZohoRecruitCommaSeparateFieldNames, ZohoRecruitCustomViewId, ZohoRecruitDraftOrSaveState, ZohoRecruitFieldName, ZohoRecruitModuleNameRef, ZohoRecruitChangeObjectDetails, ZohoRecruitRecord, ZohoRecruitRecordId, ZohoRecruitRecordNote, ZohoRecruitTerritoryId, ZohoRecruitTrueFalseBoth, ZohoRecruitNoteId, ZohoRecruitRestFunctionApiName, ZohoRecruitUserId } from './recruit';
5
+ import { ZohoRecruitSearchRecordsCriteriaTreeElement } from './recruit.criteria';
5
6
  import { ArrayOrValue, EmailAddress, Maybe, PhoneNumber, SortingOrder, UniqueModelWithId } from '@dereekb/util';
6
7
  import { ZohoServerErrorDataWithDetails, ZohoServerErrorStatus, ZohoServerSuccessCode, ZohoServerSuccessStatus } from '../zoho.error.api';
7
8
  import { ZohoDateTimeString } from '../zoho.type';
@@ -0,0 +1,54 @@
1
+ import { Maybe, PrimativeKey } from '@dereekb/util';
2
+ /**
3
+ * Encoded criteria string.
4
+ */
5
+ export type ZohoRecruitSearchRecordsCriteriaString = string;
6
+ /**
7
+ * Can search up to 10 criteria at a time.
8
+ *
9
+ * https://www.zoho.com/recruit/developer-guide/apiv2/search-records.html
10
+ *
11
+ * "You can search for a maximum of 10 criteria (with the same or different column) with equals and starts_with conditions."
12
+ */
13
+ export declare const MAX_ZOHO_RECRUIT_SEARCH_MODULE_RECORDS_CRITERIA = 10;
14
+ /**
15
+ * Creates a ZohoRecruitSearchRecordsCriteriaString from a ZohoRecruitSearchRecordsCriteriaTree.
16
+ *
17
+ * If the input tree is empty, returns undefined.
18
+ */
19
+ export declare function zohoRecruitSearchRecordsCriteriaString<T = any>(input: Maybe<ZohoRecruitSearchRecordsCriteriaTreeElement<T>>): Maybe<ZohoRecruitSearchRecordsCriteriaString>;
20
+ export declare function zohoRecruitSearchRecordsCriteriaStringForTree<T = any>(tree: ZohoRecruitSearchRecordsCriteriaTree<T>): Maybe<ZohoRecruitSearchRecordsCriteriaString>;
21
+ /**
22
+ * Tree items
23
+ *
24
+ * If both AND and OR values are provided at the root tree, then the will be merged together with AND.
25
+ */
26
+ export interface ZohoRecruitSearchRecordsCriteriaTree<T = any> {
27
+ /**
28
+ * Items to AND with eachother
29
+ */
30
+ readonly and?: Maybe<ZohoRecruitSearchRecordsCriteriaTreeElement<T>[]>;
31
+ /**
32
+ * Items to OR with eachother
33
+ */
34
+ readonly or?: Maybe<ZohoRecruitSearchRecordsCriteriaTreeElement<T>[]>;
35
+ }
36
+ export type ZohoRecruitSearchRecordsCriteriaTreeElement<T = any> = ZohoRecruitSearchRecordsCriteriaEntryArray<T> | ZohoRecruitSearchRecordsCriteriaTree<T> | ZohoRecruitSearchRecordsCriteriaString;
37
+ export type ZohoRecruitSearchRecordsCriteriaFilterType = 'starts_with' | 'equals' | 'contains';
38
+ export type ZohoRecruitSearchRecordsCriteriaEntryArray<T = any> = ZohoRecruitSearchRecordsCriteriaEntry<T>[];
39
+ export interface ZohoRecruitSearchRecordsCriteriaEntry<T = any> {
40
+ readonly field: keyof T extends PrimativeKey ? keyof T : PrimativeKey;
41
+ readonly filter: ZohoRecruitSearchRecordsCriteriaFilterType;
42
+ readonly value: string;
43
+ }
44
+ /**
45
+ * Escape used for ZohoRecruitSearchRecordsCriteriaString
46
+ */
47
+ export declare const escapeZohoFieldValueForCriteriaString: import("@dereekb/util").EscapeStringCharactersFunction;
48
+ /**
49
+ * Converts the input entry to a ZohoRecruitSearchRecordsCriteriaString. Properly escapes any parenthesis or commas.
50
+ *
51
+ * @param entry
52
+ * @returns
53
+ */
54
+ export declare function zohoRecruitSearchRecordsCriteriaEntryToCriteriaString<T = any>(entry: ZohoRecruitSearchRecordsCriteriaEntry<T>): ZohoRecruitSearchRecordsCriteriaString;
@@ -0,0 +1,10 @@
1
+ import { ArrayOrValue, EmailAddress, PrimativeKey } from '@dereekb/util';
2
+ import { ZohoRecruitSearchRecordsCriteriaEntryArray } from './recruit.criteria';
3
+ /**
4
+ * Creates a ZohoRecruitSearchRecordsCriteriaEntryArray from an array of emails.
5
+ *
6
+ * @param emails Email or array of emails to search for.
7
+ * @param field Optional field name to use. Defaults to 'Email'.
8
+ * @returns Array of ZohoRecruitSearchRecordsCriteriaEntry
9
+ */
10
+ export declare function zohoRecruitSearchRecordsCriteriaEntriesForEmails<T = any>(emails: ArrayOrValue<EmailAddress>, field?: keyof T extends PrimativeKey ? PrimativeKey & keyof T : PrimativeKey): ZohoRecruitSearchRecordsCriteriaEntryArray<T>;
@@ -1,4 +1,4 @@
1
- import { CommaSeparatedString, ISO8601DateString, Maybe, UniqueModelWithId, WebsiteUrl, PrimativeKey } from '@dereekb/util';
1
+ import { CommaSeparatedString, ISO8601DateString, UniqueModelWithId, WebsiteUrl } from '@dereekb/util';
2
2
  /**
3
3
  * Zoho Recruit module name.
4
4
  *
@@ -128,51 +128,6 @@ export declare const isZohoRecruitValidUrl: (input: WebsiteUrl) => input is Zoho
128
128
  * @deprecated use ZohoRecruitChangeObjectDetails instead.
129
129
  */
130
130
  export type ZohoRecruitRecordUpdateDetails = ZohoRecruitChangeObjectDetails;
131
- /**
132
- * Encoded criteria string.
133
- */
134
- export type ZohoRecruitSearchRecordsCriteriaString = string;
135
- /**
136
- * Creates a ZohoRecruitSearchRecordsCriteriaString from a ZohoRecruitSearchRecordsCriteriaTree.
137
- *
138
- * If the input tree is empty, returns undefined.
139
- */
140
- export declare function zohoRecruitSearchRecordsCriteriaString<T = any>(input: Maybe<ZohoRecruitSearchRecordsCriteriaTreeElement<T>>): Maybe<ZohoRecruitSearchRecordsCriteriaString>;
141
- export declare function zohoRecruitSearchRecordsCriteriaStringForTree<T = any>(tree: ZohoRecruitSearchRecordsCriteriaTree<T>): Maybe<ZohoRecruitSearchRecordsCriteriaString>;
142
- /**
143
- * Tree items
144
- *
145
- * If both AND and OR values are provided at the root tree, then the will be merged together with AND.
146
- */
147
- export interface ZohoRecruitSearchRecordsCriteriaTree<T = any> {
148
- /**
149
- * Items to AND with eachother
150
- */
151
- readonly and?: Maybe<ZohoRecruitSearchRecordsCriteriaTreeElement<T>[]>;
152
- /**
153
- * Items to OR with eachother
154
- */
155
- readonly or?: Maybe<ZohoRecruitSearchRecordsCriteriaTreeElement<T>[]>;
156
- }
157
- export type ZohoRecruitSearchRecordsCriteriaTreeElement<T = any> = ZohoRecruitSearchRecordsCriteriaEntryArray<T> | ZohoRecruitSearchRecordsCriteriaTree<T> | ZohoRecruitSearchRecordsCriteriaString;
158
- export type ZohoRecruitSearchRecordsCriteriaFilterType = 'starts_with' | 'equals' | 'contains';
159
- export type ZohoRecruitSearchRecordsCriteriaEntryArray<T = any> = ZohoRecruitSearchRecordsCriteriaEntry<T>[];
160
- export interface ZohoRecruitSearchRecordsCriteriaEntry<T = any> {
161
- readonly field: keyof T extends PrimativeKey ? keyof T : PrimativeKey;
162
- readonly filter: ZohoRecruitSearchRecordsCriteriaFilterType;
163
- readonly value: string;
164
- }
165
- /**
166
- * Escape used for ZohoRecruitSearchRecordsCriteriaString
167
- */
168
- export declare const escapeZohoFieldValueForCriteriaString: import("@dereekb/util").EscapeStringCharactersFunction;
169
- /**
170
- * Converts the input entry to a ZohoRecruitSearchRecordsCriteriaString. Properly escapes any parenthesis or commas.
171
- *
172
- * @param entry
173
- * @returns
174
- */
175
- export declare function zohoRecruitSearchRecordsCriteriaEntryToCriteriaString<T = any>(entry: ZohoRecruitSearchRecordsCriteriaEntry<T>): ZohoRecruitSearchRecordsCriteriaString;
176
131
  export type ZohoRecruitNoteId = string;
177
132
  export interface ZohoRecruitNoteAction {
178
133
  $is_system_action: boolean;