@dereekb/zoho 13.6.17 → 13.7.0
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/nestjs/index.cjs.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var common = require('@nestjs/common');
|
|
4
4
|
var zoho = require('@dereekb/zoho');
|
|
5
5
|
var util = require('@dereekb/util');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var node_path = require('node:path');
|
|
7
|
+
var node_fs = require('node:fs');
|
|
8
8
|
var config = require('@nestjs/config');
|
|
9
9
|
var nestjs = require('@dereekb/nestjs');
|
|
10
|
-
var
|
|
10
|
+
var node_crypto = require('node:crypto');
|
|
11
11
|
|
|
12
12
|
function _type_of(obj) {
|
|
13
13
|
"@swc/helpers - typeof";
|
|
@@ -635,10 +635,10 @@ var DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = '.tmp/zoho-acce
|
|
|
635
635
|
}
|
|
636
636
|
function readTokenFile() {
|
|
637
637
|
return new Promise(function(resolve) {
|
|
638
|
-
|
|
638
|
+
node_fs.mkdirSync(node_path.dirname(filename), {
|
|
639
639
|
recursive: true
|
|
640
640
|
}); // make the directory first
|
|
641
|
-
|
|
641
|
+
node_fs.readFile(filename, {}, function(x, data) {
|
|
642
642
|
var result = undefined;
|
|
643
643
|
if (!x) {
|
|
644
644
|
try {
|
|
@@ -670,7 +670,7 @@ var DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = '.tmp/zoho-acce
|
|
|
670
670
|
return [
|
|
671
671
|
2,
|
|
672
672
|
new Promise(function(resolve, reject) {
|
|
673
|
-
|
|
673
|
+
node_fs.writeFile(filename, JSON.stringify(tokens), {}, function(x) {
|
|
674
674
|
if (!x) {
|
|
675
675
|
resolve();
|
|
676
676
|
} else {
|
|
@@ -688,7 +688,7 @@ var DEFAULT_FILE_ZOHO_ACCOUNTS_ACCESS_TOKEN_CACHE_SERVICE_PATH = '.tmp/zoho-acce
|
|
|
688
688
|
return [
|
|
689
689
|
2,
|
|
690
690
|
new Promise(function(resolve, reject) {
|
|
691
|
-
|
|
691
|
+
node_fs.rm(filename, function(x) {
|
|
692
692
|
if (!x) {
|
|
693
693
|
resolve();
|
|
694
694
|
} else {
|
|
@@ -2857,14 +2857,14 @@ function _ts_generator$2(thisArg, body) {
|
|
|
2857
2857
|
}
|
|
2858
2858
|
payloadString = rawBody.toString('utf-8');
|
|
2859
2859
|
// Compute HMAC-SHA256 and base64 encode
|
|
2860
|
-
computedSignature =
|
|
2860
|
+
computedSignature = node_crypto.createHmac('sha256', secret).update(payloadString, 'utf-8').digest('base64');
|
|
2861
2861
|
// Use timing-safe comparison
|
|
2862
2862
|
valid = false;
|
|
2863
2863
|
try {
|
|
2864
2864
|
receivedBuffer = Buffer.from(receivedSignature, 'base64');
|
|
2865
2865
|
computedBuffer = Buffer.from(computedSignature, 'base64');
|
|
2866
2866
|
if (receivedBuffer.length === computedBuffer.length) {
|
|
2867
|
-
valid =
|
|
2867
|
+
valid = node_crypto.timingSafeEqual(receivedBuffer, computedBuffer);
|
|
2868
2868
|
}
|
|
2869
2869
|
} catch (unused) {
|
|
2870
2870
|
valid = false;
|
package/nestjs/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Injectable, Inject, Logger, Post, Req, Controller, Module } from '@nestjs/common';
|
|
2
2
|
import { zohoAccountsFactory, zohoAccountsAccessToken, zohoCrmFactory, zohoCrmInsertRecord, zohoCrmUpsertRecord, zohoCrmUpdateRecord, zohoCrmDeleteRecord, zohoCrmGetRecordById, zohoCrmGetRecords, zohoCrmSearchRecords, zohoCrmSearchRecordsPageFactory, zohoCrmGetRelatedRecordsFunctionFactory, zohoCrmGetEmailsForRecord, zohoCrmGetEmailsForRecordPageFactory, zohoCrmGetAttachmentsForRecord, zohoCrmGetAttachmentsForRecordPageFactory, zohoCrmUploadAttachmentForRecord, zohoCrmDownloadAttachmentForRecord, zohoCrmDeleteAttachmentFromRecord, zohoCrmCreateNotes, zohoCrmDeleteNotes, zohoCrmCreateNotesForRecord, zohoCrmGetNotesForRecord, zohoCrmGetNotesForRecordPageFactory, zohoCrmExecuteRestApiFunction, zohoCrmCreateTagsForModule, zohoCrmDeleteTag, zohoCrmGetTagsForModule, zohoCrmAddTagsToRecords, zohoCrmRemoveTagsFromRecords, ZOHO_CRM_SERVICE_NAME, zohoRecruitFactory, zohoRecruitInsertRecord, zohoRecruitUpsertRecord, zohoRecruitUpdateRecord, zohoRecruitDeleteRecord, zohoRecruitGetRecordById, zohoRecruitGetRecords, zohoRecruitSearchRecords, zohoRecruitSearchRecordsPageFactory, zohoRecruitGetRelatedRecordsFunctionFactory, zohoRecruitGetEmailsForRecord, zohoRecruitGetEmailsForRecordPageFactory, zohoRecruitGetAttachmentsForRecord, zohoRecruitGetAttachmentsForRecordPageFactory, zohoRecruitUploadAttachmentForRecord, zohoRecruitDownloadAttachmentForRecord, zohoRecruitDeleteAttachmentFromRecord, zohoRecruitCreateNotes, zohoRecruitDeleteNotes, zohoRecruitCreateNotesForRecord, zohoRecruitGetNotesForRecord, zohoRecruitGetNotesForRecordPageFactory, zohoRecruitExecuteRestApiFunction, zohoRecruitAssociateCandidateRecordsWithJobOpenings, zohoRecruitSearchCandidateAssociatedJobOpeningRecords, zohoRecruitSearchCandidateAssociatedJobOpeningRecordsPageFactory, zohoRecruitSearchJobOpeningAssociatedCandidateRecords, zohoRecruitSearchJobOpeningAssociatedCandidateRecordsPageFactory, zohoRecruitCreateTagsForModule, zohoRecruitGetTagsForModule, zohoRecruitAddTagsToRecords, zohoRecruitRemoveTagsFromRecords, ZOHO_RECRUIT_SERVICE_NAME, zohoSignFactory, zohoSignGetDocument, zohoSignGetDocuments, zohoSignGetDocumentsPageFactory, zohoSignGetDocumentFormData, zohoSignRetrieveFieldTypes, zohoSignDownloadPdf, zohoSignDownloadCompletionCertificate, zohoSignCreateDocument, zohoSignUpdateDocument, zohoSignSendDocumentForSignature, zohoSignExtendDocument, zohoSignDeleteDocument, ZOHO_SIGN_SERVICE_NAME } from '@dereekb/zoho';
|
|
3
3
|
import { forEachKeyValue, tryWithPromiseFactoriesFunction, isPast, filterMaybeArrayValues, handlerFactory, handlerConfigurerFactory, handlerMappedSetFunctionFactory } from '@dereekb/util';
|
|
4
|
-
import { dirname } from 'path';
|
|
5
|
-
import { mkdirSync, readFile, writeFile, rm } from 'fs';
|
|
4
|
+
import { dirname } from 'node:path';
|
|
5
|
+
import { mkdirSync, readFile, writeFile, rm } from 'node:fs';
|
|
6
6
|
import { ConfigService, ConfigModule } from '@nestjs/config';
|
|
7
7
|
import { RawBody } from '@dereekb/nestjs';
|
|
8
|
-
import { createHmac, timingSafeEqual } from 'crypto';
|
|
8
|
+
import { createHmac, timingSafeEqual } from 'node:crypto';
|
|
9
9
|
|
|
10
10
|
function _type_of(obj) {
|
|
11
11
|
"@swc/helpers - typeof";
|
package/nestjs/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/zoho/nestjs",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.7.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/nestjs": "13.
|
|
6
|
-
"@dereekb/rxjs": "13.
|
|
7
|
-
"@dereekb/util": "13.
|
|
8
|
-
"@dereekb/zoho": "13.
|
|
5
|
+
"@dereekb/nestjs": "13.7.0",
|
|
6
|
+
"@dereekb/rxjs": "13.7.0",
|
|
7
|
+
"@dereekb/util": "13.7.0",
|
|
8
|
+
"@dereekb/zoho": "13.7.0",
|
|
9
9
|
"@nestjs/common": "^11.1.17",
|
|
10
10
|
"@nestjs/config": "^4.0.3",
|
|
11
11
|
"express": "^5.0.0"
|
|
@@ -2,7 +2,7 @@ import { type ZohoCrmConfig, type ZohoCrmFactoryConfig } from '@dereekb/zoho';
|
|
|
2
2
|
/**
|
|
3
3
|
* API configuration for connecting to the Zoho CRM service endpoint.
|
|
4
4
|
*/
|
|
5
|
-
export type ZohoCrmServiceApiConfig = ZohoCrmConfig
|
|
5
|
+
export type ZohoCrmServiceApiConfig = ZohoCrmConfig;
|
|
6
6
|
/**
|
|
7
7
|
* Abstract configuration class for the NestJS Zoho CRM service.
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@ import { type ZohoRecruitConfig, type ZohoRecruitFactoryConfig } from '@dereekb/
|
|
|
2
2
|
/**
|
|
3
3
|
* API configuration for connecting to the Zoho Recruit service endpoint.
|
|
4
4
|
*/
|
|
5
|
-
export type ZohoRecruitServiceApiConfig = ZohoRecruitConfig
|
|
5
|
+
export type ZohoRecruitServiceApiConfig = ZohoRecruitConfig;
|
|
6
6
|
/**
|
|
7
7
|
* Abstract configuration class for the NestJS Zoho Recruit service.
|
|
8
8
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/zoho",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.7.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./nestjs": {
|
|
6
6
|
"module": "./nestjs/index.esm.js",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@dereekb/nestjs": "13.
|
|
21
|
-
"@dereekb/rxjs": "13.
|
|
22
|
-
"@dereekb/util": "13.
|
|
20
|
+
"@dereekb/nestjs": "13.7.0",
|
|
21
|
+
"@dereekb/rxjs": "13.7.0",
|
|
22
|
+
"@dereekb/util": "13.7.0",
|
|
23
23
|
"@nestjs/common": "^11.1.17",
|
|
24
24
|
"@nestjs/config": "^4.0.3",
|
|
25
25
|
"express": "^5.0.0",
|