@dereekb/zoho 12.3.7 → 12.3.8
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 +100 -0
- package/index.esm.js +99 -3
- package/nestjs/CHANGELOG.md +4 -0
- package/nestjs/package.json +1 -1
- package/nestjs/src/lib/recruit/recruit.api.d.ts +3 -0
- package/nestjs/src/lib/recruit/recruit.api.js +9 -0
- package/nestjs/src/lib/recruit/recruit.api.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/recruit/recruit.api.d.ts +78 -3
- package/src/lib/recruit/recruit.config.d.ts +2 -1
- package/src/lib/recruit/recruit.d.ts +14 -0
package/index.cjs.js
CHANGED
|
@@ -2497,6 +2497,101 @@ function getAttachmentsForRecord(context) {
|
|
|
2497
2497
|
function getAttachmentsForRecordPageFactory(context) {
|
|
2498
2498
|
return zohoFetchPageFactory(getAttachmentsForRecord(context));
|
|
2499
2499
|
}
|
|
2500
|
+
/**
|
|
2501
|
+
* Maximum attachment size allowed by Zoho Recruit.
|
|
2502
|
+
*
|
|
2503
|
+
* 20MB
|
|
2504
|
+
*/
|
|
2505
|
+
const ZOHO_RECRUIT_ATTACHMENT_MAX_SIZE = 20 * 1024 * 1024;
|
|
2506
|
+
/**
|
|
2507
|
+
* Uploads an attachment to a record.
|
|
2508
|
+
*
|
|
2509
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/upload-attachment.html
|
|
2510
|
+
*
|
|
2511
|
+
* @param context
|
|
2512
|
+
* @returns
|
|
2513
|
+
*/
|
|
2514
|
+
function uploadAttachmentForRecord(context) {
|
|
2515
|
+
return input => {
|
|
2516
|
+
const {
|
|
2517
|
+
attachmentCategoryId,
|
|
2518
|
+
attachmentCategoryName,
|
|
2519
|
+
formData
|
|
2520
|
+
} = input;
|
|
2521
|
+
const urlParams = {
|
|
2522
|
+
attachments_category_id: util.joinStringsWithCommas(attachmentCategoryId),
|
|
2523
|
+
attachments_category: util.joinStringsWithCommas(attachmentCategoryName),
|
|
2524
|
+
attachment_url: input.attachmentUrl
|
|
2525
|
+
};
|
|
2526
|
+
if (!urlParams.attachments_category_id?.length && !urlParams.attachments_category?.length) {
|
|
2527
|
+
throw new Error('attachmentCategoryId or attachmentCategoryName must be provided and not empty.');
|
|
2528
|
+
}
|
|
2529
|
+
if (formData != null) {
|
|
2530
|
+
delete urlParams.attachment_url;
|
|
2531
|
+
}
|
|
2532
|
+
const url = `https://recruitsandbox.zoho.com/recruit/v2/${input.module}/${input.id}/${ZOHO_RECRUIT_ATTACHMENTS_MODULE}?${fetch.makeUrlSearchParams(urlParams).toString()}`;
|
|
2533
|
+
let response;
|
|
2534
|
+
if (urlParams.attachment_url) {
|
|
2535
|
+
response = context.fetch(url, {
|
|
2536
|
+
method: 'POST'
|
|
2537
|
+
});
|
|
2538
|
+
} else if (formData != null) {
|
|
2539
|
+
throw new Error('unsupported currently. Use the attachmentUrl parameter instead.');
|
|
2540
|
+
// There is something weird going on with sending requests this way and zoho's server is rejecting it.
|
|
2541
|
+
/*
|
|
2542
|
+
response = context.fetch(url, {
|
|
2543
|
+
method: 'POST',
|
|
2544
|
+
headers: {
|
|
2545
|
+
'Content-Type': 'multipart/form-data',
|
|
2546
|
+
'content-length': '210'
|
|
2547
|
+
},
|
|
2548
|
+
body: formData
|
|
2549
|
+
});
|
|
2550
|
+
*/
|
|
2551
|
+
/*
|
|
2552
|
+
const fullUrl = (context.config.apiUrl as string) + url;
|
|
2553
|
+
const accessToken = await context.accessTokenStringFactory();
|
|
2554
|
+
response = fetch(fullUrl, {
|
|
2555
|
+
headers: {
|
|
2556
|
+
Authorization: `Bearer ${accessToken}`
|
|
2557
|
+
},
|
|
2558
|
+
body: formData,
|
|
2559
|
+
method: 'POST'
|
|
2560
|
+
});
|
|
2561
|
+
console.log({ response });
|
|
2562
|
+
*/
|
|
2563
|
+
} else {
|
|
2564
|
+
throw new Error('body or attachmentUrl must be provided.');
|
|
2565
|
+
}
|
|
2566
|
+
return response;
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2570
|
+
* Downloads an attachment from a record.
|
|
2571
|
+
*
|
|
2572
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/download-attachments.html
|
|
2573
|
+
*
|
|
2574
|
+
* @param context
|
|
2575
|
+
* @returns
|
|
2576
|
+
*/
|
|
2577
|
+
function downloadAttachmentForRecord(context) {
|
|
2578
|
+
return input => context.fetch(`/v2/${input.module}/${input.id}/${ZOHO_RECRUIT_ATTACHMENTS_MODULE}/${input.attachment_id}`, {
|
|
2579
|
+
method: 'GET'
|
|
2580
|
+
}).then(fetch.parseFetchFileResponse);
|
|
2581
|
+
}
|
|
2582
|
+
/**
|
|
2583
|
+
* Deletes an attachment from a record.
|
|
2584
|
+
*
|
|
2585
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/delete-attachments.html
|
|
2586
|
+
*
|
|
2587
|
+
* @param context
|
|
2588
|
+
* @returns
|
|
2589
|
+
*/
|
|
2590
|
+
function deleteAttachmentFromRecord(context) {
|
|
2591
|
+
return input => context.fetch(`/v2/${input.module}/${input.id}/${ZOHO_RECRUIT_ATTACHMENTS_MODULE}/${input.attachment_id}`, {
|
|
2592
|
+
method: 'DELETE'
|
|
2593
|
+
});
|
|
2594
|
+
}
|
|
2500
2595
|
class ZohoRecruitExecuteRestApiFunctionError extends makeError.BaseError {
|
|
2501
2596
|
constructor(error) {
|
|
2502
2597
|
super(`An error occured during the execution of the function. Code: ${error.code}, Message: ${error.message}`);
|
|
@@ -2948,6 +3043,7 @@ function zohoRecruitFactory(factoryConfig) {
|
|
|
2948
3043
|
const recruitContext = {
|
|
2949
3044
|
fetch: fetch$1,
|
|
2950
3045
|
fetchJson,
|
|
3046
|
+
accessTokenStringFactory,
|
|
2951
3047
|
config: {
|
|
2952
3048
|
...config,
|
|
2953
3049
|
apiUrl
|
|
@@ -3154,6 +3250,7 @@ exports.ZOHO_RATE_LIMIT_REMAINING_HEADER = ZOHO_RATE_LIMIT_REMAINING_HEADER;
|
|
|
3154
3250
|
exports.ZOHO_RATE_LIMIT_RESET_HEADER = ZOHO_RATE_LIMIT_RESET_HEADER;
|
|
3155
3251
|
exports.ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE = ZOHO_RECRUIT_ALREADY_ASSOCIATED_ERROR_CODE;
|
|
3156
3252
|
exports.ZOHO_RECRUIT_ATTACHMENTS_MODULE = ZOHO_RECRUIT_ATTACHMENTS_MODULE;
|
|
3253
|
+
exports.ZOHO_RECRUIT_ATTACHMENT_MAX_SIZE = ZOHO_RECRUIT_ATTACHMENT_MAX_SIZE;
|
|
3157
3254
|
exports.ZOHO_RECRUIT_CANDIDATES_MODULE = ZOHO_RECRUIT_CANDIDATES_MODULE;
|
|
3158
3255
|
exports.ZOHO_RECRUIT_EMAILS_MODULE = ZOHO_RECRUIT_EMAILS_MODULE;
|
|
3159
3256
|
exports.ZOHO_RECRUIT_JOB_OPENINGS_MODULE = ZOHO_RECRUIT_JOB_OPENINGS_MODULE;
|
|
@@ -3187,8 +3284,10 @@ exports.associateCandidateRecordsWithJobOpenings = associateCandidateRecordsWith
|
|
|
3187
3284
|
exports.createNotes = createNotes;
|
|
3188
3285
|
exports.createNotesForRecord = createNotesForRecord;
|
|
3189
3286
|
exports.createTagsForModule = createTagsForModule;
|
|
3287
|
+
exports.deleteAttachmentFromRecord = deleteAttachmentFromRecord;
|
|
3190
3288
|
exports.deleteNotes = deleteNotes;
|
|
3191
3289
|
exports.deleteRecord = deleteRecord;
|
|
3290
|
+
exports.downloadAttachmentForRecord = downloadAttachmentForRecord;
|
|
3192
3291
|
exports.emptyZohoPageResult = emptyZohoPageResult;
|
|
3193
3292
|
exports.escapeZohoFieldValueForCriteriaString = escapeZohoFieldValueForCriteriaString;
|
|
3194
3293
|
exports.executeRestApiFunction = executeRestApiFunction;
|
|
@@ -3229,6 +3328,7 @@ exports.searchRecords = searchRecords;
|
|
|
3229
3328
|
exports.searchRecordsPageFactory = searchRecordsPageFactory;
|
|
3230
3329
|
exports.tryFindZohoServerErrorData = tryFindZohoServerErrorData;
|
|
3231
3330
|
exports.updateRecord = updateRecord;
|
|
3331
|
+
exports.uploadAttachmentForRecord = uploadAttachmentForRecord;
|
|
3232
3332
|
exports.upsertRecord = upsertRecord;
|
|
3233
3333
|
exports.zohoAccessTokenStringFactory = zohoAccessTokenStringFactory;
|
|
3234
3334
|
exports.zohoAccountsApiFetchJsonInput = zohoAccountsApiFetchJsonInput;
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getNextPageNumber, isStandardInternetAccessibleWebsiteUrl, escapeStringCharactersFunction, filterMaybeArrayValues, asArray, MS_IN_MINUTE, separateValues, resetPeriodPromiseRateLimiter, MS_IN_SECOND } from '@dereekb/util';
|
|
2
|
-
import { fetchPageFactory, FetchResponseError, makeUrlSearchParams, FetchRequestFactoryError, rateLimitedFetchHandler, fetchJsonFunction, returnNullHandleFetchJsonParseErrorFunction, fetchApiFetchService } from '@dereekb/util/fetch';
|
|
1
|
+
import { getNextPageNumber, isStandardInternetAccessibleWebsiteUrl, escapeStringCharactersFunction, filterMaybeArrayValues, asArray, MS_IN_MINUTE, joinStringsWithCommas, separateValues, resetPeriodPromiseRateLimiter, MS_IN_SECOND } from '@dereekb/util';
|
|
2
|
+
import { fetchPageFactory, FetchResponseError, makeUrlSearchParams, parseFetchFileResponse, FetchRequestFactoryError, rateLimitedFetchHandler, fetchJsonFunction, returnNullHandleFetchJsonParseErrorFunction, fetchApiFetchService } from '@dereekb/util/fetch';
|
|
3
3
|
import { BaseError } from 'make-error';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -2495,6 +2495,101 @@ function getAttachmentsForRecord(context) {
|
|
|
2495
2495
|
function getAttachmentsForRecordPageFactory(context) {
|
|
2496
2496
|
return zohoFetchPageFactory(getAttachmentsForRecord(context));
|
|
2497
2497
|
}
|
|
2498
|
+
/**
|
|
2499
|
+
* Maximum attachment size allowed by Zoho Recruit.
|
|
2500
|
+
*
|
|
2501
|
+
* 20MB
|
|
2502
|
+
*/
|
|
2503
|
+
const ZOHO_RECRUIT_ATTACHMENT_MAX_SIZE = 20 * 1024 * 1024;
|
|
2504
|
+
/**
|
|
2505
|
+
* Uploads an attachment to a record.
|
|
2506
|
+
*
|
|
2507
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/upload-attachment.html
|
|
2508
|
+
*
|
|
2509
|
+
* @param context
|
|
2510
|
+
* @returns
|
|
2511
|
+
*/
|
|
2512
|
+
function uploadAttachmentForRecord(context) {
|
|
2513
|
+
return input => {
|
|
2514
|
+
const {
|
|
2515
|
+
attachmentCategoryId,
|
|
2516
|
+
attachmentCategoryName,
|
|
2517
|
+
formData
|
|
2518
|
+
} = input;
|
|
2519
|
+
const urlParams = {
|
|
2520
|
+
attachments_category_id: joinStringsWithCommas(attachmentCategoryId),
|
|
2521
|
+
attachments_category: joinStringsWithCommas(attachmentCategoryName),
|
|
2522
|
+
attachment_url: input.attachmentUrl
|
|
2523
|
+
};
|
|
2524
|
+
if (!urlParams.attachments_category_id?.length && !urlParams.attachments_category?.length) {
|
|
2525
|
+
throw new Error('attachmentCategoryId or attachmentCategoryName must be provided and not empty.');
|
|
2526
|
+
}
|
|
2527
|
+
if (formData != null) {
|
|
2528
|
+
delete urlParams.attachment_url;
|
|
2529
|
+
}
|
|
2530
|
+
const url = `https://recruitsandbox.zoho.com/recruit/v2/${input.module}/${input.id}/${ZOHO_RECRUIT_ATTACHMENTS_MODULE}?${makeUrlSearchParams(urlParams).toString()}`;
|
|
2531
|
+
let response;
|
|
2532
|
+
if (urlParams.attachment_url) {
|
|
2533
|
+
response = context.fetch(url, {
|
|
2534
|
+
method: 'POST'
|
|
2535
|
+
});
|
|
2536
|
+
} else if (formData != null) {
|
|
2537
|
+
throw new Error('unsupported currently. Use the attachmentUrl parameter instead.');
|
|
2538
|
+
// There is something weird going on with sending requests this way and zoho's server is rejecting it.
|
|
2539
|
+
/*
|
|
2540
|
+
response = context.fetch(url, {
|
|
2541
|
+
method: 'POST',
|
|
2542
|
+
headers: {
|
|
2543
|
+
'Content-Type': 'multipart/form-data',
|
|
2544
|
+
'content-length': '210'
|
|
2545
|
+
},
|
|
2546
|
+
body: formData
|
|
2547
|
+
});
|
|
2548
|
+
*/
|
|
2549
|
+
/*
|
|
2550
|
+
const fullUrl = (context.config.apiUrl as string) + url;
|
|
2551
|
+
const accessToken = await context.accessTokenStringFactory();
|
|
2552
|
+
response = fetch(fullUrl, {
|
|
2553
|
+
headers: {
|
|
2554
|
+
Authorization: `Bearer ${accessToken}`
|
|
2555
|
+
},
|
|
2556
|
+
body: formData,
|
|
2557
|
+
method: 'POST'
|
|
2558
|
+
});
|
|
2559
|
+
console.log({ response });
|
|
2560
|
+
*/
|
|
2561
|
+
} else {
|
|
2562
|
+
throw new Error('body or attachmentUrl must be provided.');
|
|
2563
|
+
}
|
|
2564
|
+
return response;
|
|
2565
|
+
};
|
|
2566
|
+
}
|
|
2567
|
+
/**
|
|
2568
|
+
* Downloads an attachment from a record.
|
|
2569
|
+
*
|
|
2570
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/download-attachments.html
|
|
2571
|
+
*
|
|
2572
|
+
* @param context
|
|
2573
|
+
* @returns
|
|
2574
|
+
*/
|
|
2575
|
+
function downloadAttachmentForRecord(context) {
|
|
2576
|
+
return input => context.fetch(`/v2/${input.module}/${input.id}/${ZOHO_RECRUIT_ATTACHMENTS_MODULE}/${input.attachment_id}`, {
|
|
2577
|
+
method: 'GET'
|
|
2578
|
+
}).then(parseFetchFileResponse);
|
|
2579
|
+
}
|
|
2580
|
+
/**
|
|
2581
|
+
* Deletes an attachment from a record.
|
|
2582
|
+
*
|
|
2583
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/delete-attachments.html
|
|
2584
|
+
*
|
|
2585
|
+
* @param context
|
|
2586
|
+
* @returns
|
|
2587
|
+
*/
|
|
2588
|
+
function deleteAttachmentFromRecord(context) {
|
|
2589
|
+
return input => context.fetch(`/v2/${input.module}/${input.id}/${ZOHO_RECRUIT_ATTACHMENTS_MODULE}/${input.attachment_id}`, {
|
|
2590
|
+
method: 'DELETE'
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2498
2593
|
class ZohoRecruitExecuteRestApiFunctionError extends BaseError {
|
|
2499
2594
|
constructor(error) {
|
|
2500
2595
|
super(`An error occured during the execution of the function. Code: ${error.code}, Message: ${error.message}`);
|
|
@@ -2946,6 +3041,7 @@ function zohoRecruitFactory(factoryConfig) {
|
|
|
2946
3041
|
const recruitContext = {
|
|
2947
3042
|
fetch,
|
|
2948
3043
|
fetchJson,
|
|
3044
|
+
accessTokenStringFactory,
|
|
2949
3045
|
config: {
|
|
2950
3046
|
...config,
|
|
2951
3047
|
apiUrl
|
|
@@ -3132,4 +3228,4 @@ function zohoDateTimeString(date) {
|
|
|
3132
3228
|
return isoDate.substring(0, isoDate.length - 5) + 'Z';
|
|
3133
3229
|
}
|
|
3134
3230
|
|
|
3135
|
-
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_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_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_ATTACHMENTS_MODULE, ZOHO_RECRUIT_CANDIDATES_MODULE, ZOHO_RECRUIT_EMAILS_MODULE, ZOHO_RECRUIT_JOB_OPENINGS_MODULE, ZOHO_RECRUIT_NOTES_MODULE, ZOHO_RECRUIT_RECORD_ATTACHMENT_METADATA_ATTACH_TYPE_RESUME, ZOHO_RECRUIT_SERVICE_NAME, ZOHO_RECRUIT_TAG_NAME_MAX_LENGTH, ZOHO_SUCCESS_CODE, ZOHO_SUCCESS_STATUS, 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, addTagsToRecords, assertRecordDataArrayResultHasContent, associateCandidateRecordsWithJobOpenings, createNotes, createNotesForRecord, createTagsForModule, deleteNotes, deleteRecord, emptyZohoPageResult, escapeZohoFieldValueForCriteriaString, executeRestApiFunction, getAttachmentsForRecord, getAttachmentsForRecordPageFactory, getEmailsForRecord, getEmailsForRecordPageFactory, getNotesForRecord, getNotesForRecordPageFactory, getRecordById, getRecords, getRelatedRecordsFunctionFactory, getTagsForModule, getTagsForModulePageFactory, 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, zohoRecruitChangeObjectLikeResponseSuccessAndErrorPairs, zohoRecruitConfigApiUrl, zohoRecruitFactory, zohoRecruitMultiRecordResult, zohoRecruitRecordCrudError, zohoRecruitSearchRecordsCriteriaEntriesForEmails, zohoRecruitSearchRecordsCriteriaEntryToCriteriaString, zohoRecruitSearchRecordsCriteriaString, zohoRecruitSearchRecordsCriteriaStringForTree, zohoRecruitUrlSearchParams, zohoRecruitUrlSearchParamsMinusIdAndModule, zohoRecruitUrlSearchParamsMinusModule, zohoServerErrorData };
|
|
3231
|
+
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_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_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_ATTACHMENTS_MODULE, ZOHO_RECRUIT_ATTACHMENT_MAX_SIZE, ZOHO_RECRUIT_CANDIDATES_MODULE, ZOHO_RECRUIT_EMAILS_MODULE, ZOHO_RECRUIT_JOB_OPENINGS_MODULE, ZOHO_RECRUIT_NOTES_MODULE, ZOHO_RECRUIT_RECORD_ATTACHMENT_METADATA_ATTACH_TYPE_RESUME, ZOHO_RECRUIT_SERVICE_NAME, ZOHO_RECRUIT_TAG_NAME_MAX_LENGTH, ZOHO_SUCCESS_CODE, ZOHO_SUCCESS_STATUS, 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, addTagsToRecords, assertRecordDataArrayResultHasContent, associateCandidateRecordsWithJobOpenings, createNotes, createNotesForRecord, createTagsForModule, deleteAttachmentFromRecord, deleteNotes, deleteRecord, downloadAttachmentForRecord, emptyZohoPageResult, escapeZohoFieldValueForCriteriaString, executeRestApiFunction, getAttachmentsForRecord, getAttachmentsForRecordPageFactory, getEmailsForRecord, getEmailsForRecordPageFactory, getNotesForRecord, getNotesForRecordPageFactory, getRecordById, getRecords, getRelatedRecordsFunctionFactory, getTagsForModule, getTagsForModulePageFactory, 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, uploadAttachmentForRecord, upsertRecord, zohoAccessTokenStringFactory, zohoAccountsApiFetchJsonInput, zohoAccountsConfigApiUrl, zohoAccountsFactory, zohoAccountsZohoAccessTokenFactory, zohoDateTimeString, zohoFetchPageFactory, zohoRateLimitHeaderDetails, zohoRateLimitedFetchHandler, zohoRecruitApiFetchJsonInput, zohoRecruitChangeObjectLikeResponseSuccessAndErrorPairs, zohoRecruitConfigApiUrl, zohoRecruitFactory, zohoRecruitMultiRecordResult, zohoRecruitRecordCrudError, zohoRecruitSearchRecordsCriteriaEntriesForEmails, zohoRecruitSearchRecordsCriteriaEntryToCriteriaString, zohoRecruitSearchRecordsCriteriaString, zohoRecruitSearchRecordsCriteriaStringForTree, zohoRecruitUrlSearchParams, zohoRecruitUrlSearchParamsMinusIdAndModule, zohoRecruitUrlSearchParamsMinusModule, zohoServerErrorData };
|
package/nestjs/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [12.3.8](https://github.com/dereekb/dbx-components/compare/v12.3.7-dev...v12.3.8) (2025-08-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
## [12.3.7](https://github.com/dereekb/dbx-components/compare/v12.3.6-dev...v12.3.7) (2025-08-14)
|
|
6
10
|
|
|
7
11
|
|
package/nestjs/package.json
CHANGED
|
@@ -21,6 +21,9 @@ export declare class ZohoRecruitApi {
|
|
|
21
21
|
get getEmailsForRecordPageFactory(): import("@dereekb/zoho").GetEmailsForRecordPageFactory;
|
|
22
22
|
get getAttachmentsForRecord(): import("@dereekb/zoho").ZohoRecruitGetAttachmentsForRecordFunction;
|
|
23
23
|
get getAttachmentsForRecordPageFactory(): import("@dereekb/zoho").GetAttachmentsForRecordPageFactory;
|
|
24
|
+
get uploadAttachmentForRecord(): import("@dereekb/zoho").ZohoRecruitUploadAttachmentForRecordFunction;
|
|
25
|
+
get downloadAttachmentForRecord(): import("@dereekb/zoho").ZohoRecruitDownloadAttachmentForRecordFunction;
|
|
26
|
+
get deleteAttachmentFromRecord(): import("@dereekb/zoho").ZohoRecruitDeleteAttachmentFromRecordFunction;
|
|
24
27
|
get createNotes(): (input: import("@dereekb/zoho").ZohoRecruitCreateNotesRequest) => Promise<import("@dereekb/zoho").ZohoRecruitMultiRecordResult<import("@dereekb/zoho").NewZohoRecruitNoteData, import("@dereekb/zoho").ZohoRecruitChangeObjectResponseSuccessEntry<import("@dereekb/zoho").ZohoRecruitChangeObjectDetails>, import("@dereekb/zoho").ZohoRecruitChangeObjectResponseErrorEntry>>;
|
|
25
28
|
get deleteNotes(): (input: import("@dereekb/zoho").ZohoRecruitDeleteNotesRequest) => Promise<import("@dereekb/zoho").ZohoRecruitMultiRecordResult<string, import("@dereekb/zoho").ZohoRecruitChangeObjectResponseSuccessEntry<import("@dereekb/zoho").ZohoRecruitChangeObjectDetails>, import("@dereekb/zoho").ZohoRecruitChangeObjectResponseErrorEntry>>;
|
|
26
29
|
get createNotesForRecord(): import("@dereekb/zoho").ZohoRecruitCreateNotesForRecordFunction;
|
|
@@ -64,6 +64,15 @@ let ZohoRecruitApi = class ZohoRecruitApi {
|
|
|
64
64
|
get getAttachmentsForRecordPageFactory() {
|
|
65
65
|
return (0, zoho_1.getAttachmentsForRecordPageFactory)(this.recruitContext);
|
|
66
66
|
}
|
|
67
|
+
get uploadAttachmentForRecord() {
|
|
68
|
+
return (0, zoho_1.uploadAttachmentForRecord)(this.recruitContext);
|
|
69
|
+
}
|
|
70
|
+
get downloadAttachmentForRecord() {
|
|
71
|
+
return (0, zoho_1.downloadAttachmentForRecord)(this.recruitContext);
|
|
72
|
+
}
|
|
73
|
+
get deleteAttachmentFromRecord() {
|
|
74
|
+
return (0, zoho_1.deleteAttachmentFromRecord)(this.recruitContext);
|
|
75
|
+
}
|
|
67
76
|
get createNotes() {
|
|
68
77
|
return (0, zoho_1.createNotes)(this.recruitContext);
|
|
69
78
|
}
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"recruit.api.js","sourceRoot":"","sources":["../../../../../../../packages/zoho/nestjs/src/lib/recruit/recruit.api.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ZohoDataArrayResultRef, ZohoPageFilter, ZohoPageResult } from './../zoho.api.page';
|
|
2
|
-
import { FetchJsonBody, FetchJsonInput, FetchPage, FetchPageFactory, FetchPageFactoryOptions, makeUrlSearchParams } from '@dereekb/util/fetch';
|
|
2
|
+
import { FetchFileResponse, FetchJsonBody, FetchJsonInput, FetchPage, FetchPageFactory, FetchPageFactoryOptions, makeUrlSearchParams } from '@dereekb/util/fetch';
|
|
3
3
|
import { ZohoRecruitConfigApiUrlInput, ZohoRecruitContext } from './recruit.config';
|
|
4
|
-
import { ZohoRecruitCommaSeparateFieldNames, ZohoRecruitCustomViewId, ZohoRecruitDraftOrSaveState, ZohoRecruitFieldName, ZohoRecruitModuleNameRef, ZohoRecruitChangeObjectDetails, ZohoRecruitRecord, ZohoRecruitRecordId, ZohoRecruitTerritoryId, ZohoRecruitTrueFalseBoth, ZohoRecruitRestFunctionApiName, ZohoRecruitUserId, ZohoRecruitModuleName, ZohoRecruitRecordEmailMetadata, ZohoRecruitRecordAttachmentMetadata } from './recruit';
|
|
4
|
+
import { ZohoRecruitCommaSeparateFieldNames, ZohoRecruitCustomViewId, ZohoRecruitDraftOrSaveState, ZohoRecruitFieldName, ZohoRecruitModuleNameRef, ZohoRecruitChangeObjectDetails, ZohoRecruitRecord, ZohoRecruitRecordId, ZohoRecruitTerritoryId, ZohoRecruitTrueFalseBoth, ZohoRecruitRestFunctionApiName, ZohoRecruitUserId, ZohoRecruitModuleName, ZohoRecruitRecordEmailMetadata, ZohoRecruitRecordAttachmentMetadata, ZohoRecruitAttachmentRecordId, ZohoRecruitAttachmentCategoryId, KnownZohoRecruitAttachmentCategoryName } from './recruit';
|
|
5
5
|
import { ZohoRecruitSearchRecordsCriteriaTreeElement } from './recruit.criteria';
|
|
6
|
-
import { ArrayOrValue, EmailAddress, Maybe, PhoneNumber, SortingOrder, UniqueModelWithId } from '@dereekb/util';
|
|
6
|
+
import { ArrayOrValue, EmailAddress, Maybe, PhoneNumber, SortingOrder, UniqueModelWithId, WebsiteUrlWithPrefix } from '@dereekb/util';
|
|
7
7
|
import { ZohoServerErrorDataWithDetails, ZohoServerErrorStatus, ZohoServerSuccessCode, ZohoServerSuccessStatus } from '../zoho.error.api';
|
|
8
8
|
import { ZohoDateTimeString } from '../zoho.type';
|
|
9
9
|
import { BaseError } from 'make-error';
|
|
@@ -209,6 +209,81 @@ export type ZohoRecruitGetAttachmentsForRecordFunction = (input: ZohoRecruitGetA
|
|
|
209
209
|
export declare function getAttachmentsForRecord(context: ZohoRecruitContext): ZohoRecruitGetAttachmentsForRecordFunction;
|
|
210
210
|
export type GetAttachmentsForRecordPageFactory = FetchPageFactory<ZohoRecruitGetAttachmentsForRecordRequest, ZohoRecruitGetAttachmentsForRecordResponse>;
|
|
211
211
|
export declare function getAttachmentsForRecordPageFactory(context: ZohoRecruitContext): GetAttachmentsForRecordPageFactory;
|
|
212
|
+
/**
|
|
213
|
+
* Maximum attachment size allowed by Zoho Recruit.
|
|
214
|
+
*
|
|
215
|
+
* 20MB
|
|
216
|
+
*/
|
|
217
|
+
export declare const ZOHO_RECRUIT_ATTACHMENT_MAX_SIZE: number;
|
|
218
|
+
export interface ZohoRecruitUploadAttachmentForRecordRequest extends ZohoRecruitGetRecordByIdInput {
|
|
219
|
+
/**
|
|
220
|
+
* Requires the use of a FormData object.
|
|
221
|
+
*
|
|
222
|
+
* Max of 20MB are allowed
|
|
223
|
+
*
|
|
224
|
+
* @deprecated Use attachmentUrl instead for now.
|
|
225
|
+
*/
|
|
226
|
+
readonly formData?: FormData;
|
|
227
|
+
/**
|
|
228
|
+
* File url to pull the file from.
|
|
229
|
+
*
|
|
230
|
+
* Either this or formData must be provided.
|
|
231
|
+
*/
|
|
232
|
+
readonly attachmentUrl?: WebsiteUrlWithPrefix;
|
|
233
|
+
/**
|
|
234
|
+
* The category id(s) of the attachment.
|
|
235
|
+
*
|
|
236
|
+
* Either this or attachments_category must be provided.
|
|
237
|
+
*/
|
|
238
|
+
readonly attachmentCategoryId?: ArrayOrValue<ZohoRecruitAttachmentCategoryId>;
|
|
239
|
+
/**
|
|
240
|
+
* The category name(s) of the attachment.
|
|
241
|
+
*
|
|
242
|
+
* Either this or attachments_category_id must be provided.
|
|
243
|
+
*
|
|
244
|
+
* Example: "Resume"
|
|
245
|
+
*/
|
|
246
|
+
readonly attachmentCategoryName?: ArrayOrValue<KnownZohoRecruitAttachmentCategoryName>;
|
|
247
|
+
}
|
|
248
|
+
export type ZohoRecruitUploadAttachmentForRecordResponse = Response;
|
|
249
|
+
export type ZohoRecruitUploadAttachmentForRecordFunction = (input: ZohoRecruitUploadAttachmentForRecordRequest) => Promise<ZohoRecruitUploadAttachmentForRecordResponse>;
|
|
250
|
+
/**
|
|
251
|
+
* Uploads an attachment to a record.
|
|
252
|
+
*
|
|
253
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/upload-attachment.html
|
|
254
|
+
*
|
|
255
|
+
* @param context
|
|
256
|
+
* @returns
|
|
257
|
+
*/
|
|
258
|
+
export declare function uploadAttachmentForRecord(context: ZohoRecruitContext): ZohoRecruitUploadAttachmentForRecordFunction;
|
|
259
|
+
export interface ZohoRecruitDownloadAttachmentForRecordRequest extends ZohoRecruitGetRecordByIdInput {
|
|
260
|
+
readonly attachment_id: ZohoRecruitAttachmentRecordId;
|
|
261
|
+
}
|
|
262
|
+
export type ZohoRecruitDownloadAttachmentForRecordResponse = FetchFileResponse;
|
|
263
|
+
export type ZohoRecruitDownloadAttachmentForRecordFunction = (input: ZohoRecruitDownloadAttachmentForRecordRequest) => Promise<ZohoRecruitDownloadAttachmentForRecordResponse>;
|
|
264
|
+
/**
|
|
265
|
+
* Downloads an attachment from a record.
|
|
266
|
+
*
|
|
267
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/download-attachments.html
|
|
268
|
+
*
|
|
269
|
+
* @param context
|
|
270
|
+
* @returns
|
|
271
|
+
*/
|
|
272
|
+
export declare function downloadAttachmentForRecord(context: ZohoRecruitContext): ZohoRecruitDownloadAttachmentForRecordFunction;
|
|
273
|
+
export interface ZohoRecruitDeleteAttachmentFromRecordRequest extends ZohoRecruitGetRecordByIdInput {
|
|
274
|
+
readonly attachment_id: ZohoRecruitAttachmentRecordId;
|
|
275
|
+
}
|
|
276
|
+
export type ZohoRecruitDeleteAttachmentFromRecordResponse = Response;
|
|
277
|
+
export type ZohoRecruitDeleteAttachmentFromRecordFunction = (input: ZohoRecruitDeleteAttachmentFromRecordRequest) => Promise<ZohoRecruitDeleteAttachmentFromRecordResponse>;
|
|
278
|
+
/**
|
|
279
|
+
* Deletes an attachment from a record.
|
|
280
|
+
*
|
|
281
|
+
* https://www.zoho.com/recruit/developer-guide/apiv2/delete-attachments.html
|
|
282
|
+
*
|
|
283
|
+
* @param context
|
|
284
|
+
* @returns
|
|
285
|
+
*/
|
|
286
|
+
export declare function deleteAttachmentFromRecord(context: ZohoRecruitContext): ZohoRecruitDeleteAttachmentFromRecordFunction;
|
|
212
287
|
export type ZohoRecruitExecuteRestApiFunctionRequest = ZohoRecruitExecuteRestApiFunctionNormalRequest | ZohoRecruitExecuteRestApiFunctionApiSpecificRequest;
|
|
213
288
|
export interface ZohoRecruitExecuteRestApiFunctionNormalRequest {
|
|
214
289
|
readonly functionName: ZohoRecruitRestFunctionApiName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FactoryWithRequiredInput } from '@dereekb/util';
|
|
2
2
|
import { ConfiguredFetch, FetchJsonFunction } from '@dereekb/util/fetch';
|
|
3
3
|
import { ZohoApiUrl, ZohoApiUrlKey, ZohoConfig, ZohoApiServiceName } from '../zoho.config';
|
|
4
|
-
import { ZohoServiceAccessTokenKey } from '../accounts';
|
|
4
|
+
import { ZohoAccessTokenStringFactory, ZohoServiceAccessTokenKey } from '../accounts';
|
|
5
5
|
import { ZohoRateLimiterRef } from '../zoho.limit';
|
|
6
6
|
export declare const ZOHO_RECRUIT_SERVICE_NAME: ZohoApiServiceName | ZohoServiceAccessTokenKey;
|
|
7
7
|
export type ZohoRecruitApiUrl = ZohoApiUrl;
|
|
@@ -16,6 +16,7 @@ export type ZohoRecruitFetchFactory = FactoryWithRequiredInput<ConfiguredFetch,
|
|
|
16
16
|
export interface ZohoRecruitContext extends ZohoRateLimiterRef {
|
|
17
17
|
readonly fetch: ConfiguredFetch;
|
|
18
18
|
readonly fetchJson: FetchJsonFunction;
|
|
19
|
+
readonly accessTokenStringFactory: ZohoAccessTokenStringFactory;
|
|
19
20
|
readonly config: ZohoRecruitConfig;
|
|
20
21
|
}
|
|
21
22
|
export interface ZohoRecruitContextRef {
|
|
@@ -199,6 +199,20 @@ export type ZohoRecruitAttachmentRecordId = ZohoRecruitRecordId;
|
|
|
199
199
|
* The size of the attachment in bytes, stored as a string.
|
|
200
200
|
*/
|
|
201
201
|
export type ZohoRecruitRecordAttachmentMetadataSize = string;
|
|
202
|
+
/**
|
|
203
|
+
* Attachment category id
|
|
204
|
+
*/
|
|
205
|
+
export type ZohoRecruitAttachmentCategoryId = string;
|
|
206
|
+
/**
|
|
207
|
+
* Known attachment category names
|
|
208
|
+
*/
|
|
209
|
+
export type KnownZohoRecruitAttachmentCategoryName = 'Resume' | 'Offer' | 'Contracts' | 'Criminal records' | 'Mandatory reporter' | 'Teaching certification' | 'Health records' | 'Others' | 'Cover Letter' | 'Formatted Resume';
|
|
210
|
+
/**
|
|
211
|
+
* Attachment category name
|
|
212
|
+
*
|
|
213
|
+
* I.E. "Resume"
|
|
214
|
+
*/
|
|
215
|
+
export type ZohoRecruitAttachmentCategoryName = KnownZohoRecruitAttachmentCategoryName | string;
|
|
202
216
|
/**
|
|
203
217
|
* Metadata for a record's attachment.
|
|
204
218
|
*/
|