@dereekb/zoho 13.11.13 → 13.11.15
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/cli/index.js +5 -5
- package/cli/package.json +7 -7
- package/index.cjs.js +569 -503
- package/index.esm.js +569 -503
- package/nestjs/index.cjs.js +248 -255
- package/nestjs/index.esm.js +248 -255
- package/nestjs/package.json +5 -5
- package/nestjs/src/lib/accounts/accounts.config.d.ts +1 -1
- package/nestjs/src/lib/accounts/accounts.service.d.ts +11 -11
- package/nestjs/src/lib/crm/crm.api.d.ts +31 -31
- package/nestjs/src/lib/crm/crm.config.d.ts +1 -1
- package/nestjs/src/lib/crm/crm.module.d.ts +12 -13
- package/nestjs/src/lib/desk/desk.api.d.ts +48 -48
- package/nestjs/src/lib/desk/desk.config.d.ts +2 -1
- package/nestjs/src/lib/desk/desk.module.d.ts +6 -6
- package/nestjs/src/lib/recruit/recruit.api.d.ts +35 -35
- package/nestjs/src/lib/recruit/recruit.config.d.ts +1 -1
- package/nestjs/src/lib/recruit/recruit.module.d.ts +12 -13
- package/nestjs/src/lib/sign/sign.api.d.ts +16 -16
- package/nestjs/src/lib/sign/sign.module.d.ts +12 -13
- package/nestjs/src/lib/sign/webhook/webhook.zoho.sign.d.ts +2 -2
- package/nestjs/src/lib/sign/webhook/webhook.zoho.sign.module.d.ts +3 -3
- package/nestjs/src/lib/sign/webhook/webhook.zoho.sign.verify.d.ts +2 -2
- package/nestjs/src/lib/zoho.config.d.ts +2 -1
- package/package.json +8 -8
- package/src/lib/accounts/accounts.api.d.ts +10 -10
- package/src/lib/accounts/accounts.config.d.ts +2 -2
- package/src/lib/accounts/accounts.d.ts +3 -2
- package/src/lib/accounts/accounts.error.api.d.ts +5 -5
- package/src/lib/accounts/accounts.factory.d.ts +8 -6
- package/src/lib/crm/crm.api.d.ts +87 -81
- package/src/lib/crm/crm.api.notes.d.ts +11 -10
- package/src/lib/crm/crm.api.tags.d.ts +16 -14
- package/src/lib/crm/crm.config.d.ts +2 -2
- package/src/lib/crm/crm.d.ts +2 -2
- package/src/lib/crm/crm.error.api.d.ts +10 -10
- package/src/lib/crm/crm.factory.d.ts +3 -2
- package/src/lib/crm/crm.notes.d.ts +2 -2
- package/src/lib/desk/desk.agent.d.ts +2 -2
- package/src/lib/desk/desk.api.activities.d.ts +5 -4
- package/src/lib/desk/desk.api.agents.d.ts +11 -10
- package/src/lib/desk/desk.api.attachments.d.ts +4 -4
- package/src/lib/desk/desk.api.comments.d.ts +8 -8
- package/src/lib/desk/desk.api.contacts.d.ts +9 -8
- package/src/lib/desk/desk.api.departments.d.ts +4 -4
- package/src/lib/desk/desk.api.followers.d.ts +6 -6
- package/src/lib/desk/desk.api.page.d.ts +6 -5
- package/src/lib/desk/desk.api.tags.d.ts +10 -10
- package/src/lib/desk/desk.api.threads.d.ts +7 -6
- package/src/lib/desk/desk.api.tickets.d.ts +23 -21
- package/src/lib/desk/desk.api.time.d.ts +10 -10
- package/src/lib/desk/desk.config.d.ts +2 -2
- package/src/lib/desk/desk.error.api.d.ts +5 -5
- package/src/lib/desk/desk.factory.d.ts +3 -2
- package/src/lib/desk/desk.limit.d.ts +3 -3
- package/src/lib/desk/desk.ticket.d.ts +4 -4
- package/src/lib/recruit/recruit.api.candidates.d.ts +15 -13
- package/src/lib/recruit/recruit.api.d.ts +85 -80
- package/src/lib/recruit/recruit.api.notes.d.ts +11 -10
- package/src/lib/recruit/recruit.api.tags.d.ts +19 -18
- package/src/lib/recruit/recruit.config.d.ts +2 -2
- package/src/lib/recruit/recruit.d.ts +2 -2
- package/src/lib/recruit/recruit.error.api.d.ts +10 -10
- package/src/lib/recruit/recruit.factory.d.ts +3 -2
- package/src/lib/recruit/recruit.notes.d.ts +2 -2
- package/src/lib/shared/criteria.d.ts +5 -5
- package/src/lib/shared/criteria.util.d.ts +2 -2
- package/src/lib/sign/sign.api.d.ts +47 -46
- package/src/lib/sign/sign.api.page.d.ts +6 -5
- package/src/lib/sign/sign.config.d.ts +2 -2
- package/src/lib/sign/sign.d.ts +4 -4
- package/src/lib/sign/sign.error.api.d.ts +5 -5
- package/src/lib/sign/sign.factory.d.ts +3 -2
- package/src/lib/zoho.api.page.d.ts +5 -4
- package/src/lib/zoho.error.api.d.ts +17 -14
- package/src/lib/zoho.limit.d.ts +6 -5
- package/src/lib/zoho.type.d.ts +1 -1
|
@@ -79,8 +79,8 @@ export type ZohoServerErrorDataWithDetails<T = unknown> = Required<ZohoServerErr
|
|
|
79
79
|
/**
|
|
80
80
|
* Normalizes a Zoho error response entry into a consistent {@link ZohoServerErrorData} shape, handling both object and string error formats.
|
|
81
81
|
*
|
|
82
|
-
* @param error - The raw error entry, either a structured object or a plain error code string
|
|
83
|
-
* @returns Normalized error data with code and message fields
|
|
82
|
+
* @param error - The raw error entry, either a structured object or a plain error code string.
|
|
83
|
+
* @returns Normalized error data with code and message fields.
|
|
84
84
|
*/
|
|
85
85
|
export declare function zohoServerErrorData(error: ZohoServerErrorResponseDataError): ZohoServerErrorData;
|
|
86
86
|
/**
|
|
@@ -124,8 +124,9 @@ export interface LogZohoServerErrorFunctionConfig {
|
|
|
124
124
|
* Creates a logZohoServerErrorFunction that logs the error to console.
|
|
125
125
|
*
|
|
126
126
|
* @param zohoApiNamePrefix - Prefix to use when logging (e.g. 'ZohoRecruit', 'ZohoSign')
|
|
127
|
-
* @param options - Optional configuration for controlling which error types are logged
|
|
128
|
-
* @returns
|
|
127
|
+
* @param options - Optional configuration for controlling which error types are logged.
|
|
128
|
+
* @returns Logs Zoho server errors to the console.
|
|
129
|
+
*
|
|
129
130
|
* @__NO_SIDE_EFFECTS__
|
|
130
131
|
*/
|
|
131
132
|
export declare function logZohoServerErrorFunction(zohoApiNamePrefix: string, options?: LogZohoServerErrorFunctionConfig): LogZohoServerErrorFunction;
|
|
@@ -141,9 +142,10 @@ export type ParseZohoFetchResponseErrorFunction = (responseError: FetchResponseE
|
|
|
141
142
|
/**
|
|
142
143
|
* Wraps a ConfiguredFetch to support handling errors returned by fetch.
|
|
143
144
|
*
|
|
144
|
-
* @param parseZohoError - Function that parses a fetch response error into a Zoho-specific error
|
|
145
|
-
* @param defaultLogError - Default error logging function used when no custom logger is provided
|
|
146
|
-
* @returns Factory that wraps a ConfiguredFetch with Zoho error handling
|
|
145
|
+
* @param parseZohoError - Function that parses a fetch response error into a Zoho-specific error.
|
|
146
|
+
* @param defaultLogError - Default error logging function used when no custom logger is provided.
|
|
147
|
+
* @returns Factory that wraps a ConfiguredFetch with Zoho error handling.
|
|
148
|
+
*
|
|
147
149
|
* @__NO_SIDE_EFFECTS__
|
|
148
150
|
*/
|
|
149
151
|
export declare function handleZohoErrorFetchFactory(parseZohoError: ParseZohoFetchResponseErrorFunction, defaultLogError: LogZohoServerErrorFunction): HandleZohoErrorFetchFactory;
|
|
@@ -151,8 +153,9 @@ export type ParseZohoServerErrorResponseData = (zohoServerErrorResponseData: Zoh
|
|
|
151
153
|
/**
|
|
152
154
|
* FetchJsonInterceptJsonResponseFunction that intercepts a 200 response that actually contains a ZohoServerError and throws a ZohoServerError for the error handling to catch.
|
|
153
155
|
*
|
|
154
|
-
* @param parseZohoServerErrorResponseData - Function that parses raw error response data into a structured error
|
|
155
|
-
* @returns Interceptor function that detects and throws hidden errors in 200 responses
|
|
156
|
+
* @param parseZohoServerErrorResponseData - Function that parses raw error response data into a structured error.
|
|
157
|
+
* @returns Interceptor function that detects and throws hidden errors in 200 responses.
|
|
158
|
+
*
|
|
156
159
|
* @__NO_SIDE_EFFECTS__
|
|
157
160
|
*/
|
|
158
161
|
export declare function interceptZohoErrorResponseFactory(parseZohoServerErrorResponseData: ParseZohoServerErrorResponseData): FetchJsonInterceptJsonResponseFunction;
|
|
@@ -246,8 +249,8 @@ export interface ZohoRateLimitHeaderDetails {
|
|
|
246
249
|
/**
|
|
247
250
|
* Extracts rate limit details from Zoho API response headers, returning null if the headers are absent.
|
|
248
251
|
*
|
|
249
|
-
* @param headers - HTTP response headers from a Zoho API call
|
|
250
|
-
* @returns Parsed rate limit details, or null if rate limit headers are missing
|
|
252
|
+
* @param headers - HTTP response headers from a Zoho API call.
|
|
253
|
+
* @returns Parsed rate limit details, or null if rate limit headers are missing.
|
|
251
254
|
*/
|
|
252
255
|
export declare function zohoRateLimitHeaderDetails(headers: Headers): Maybe<ZohoRateLimitHeaderDetails>;
|
|
253
256
|
export declare class ZohoTooManyRequestsError extends ZohoServerFetchResponseError {
|
|
@@ -256,9 +259,9 @@ export declare class ZohoTooManyRequestsError extends ZohoServerFetchResponseErr
|
|
|
256
259
|
/**
|
|
257
260
|
* Function that parses/transforms a ZohoServerErrorResponseData into a general ZohoServerError or other known error type.
|
|
258
261
|
*
|
|
259
|
-
* @param errorResponseData - Raw error response data from the Zoho API
|
|
260
|
-
* @param responseError - The underlying fetch response error
|
|
261
|
-
* @returns A typed Zoho server error, or undefined if no error is found
|
|
262
|
+
* @param errorResponseData - Raw error response data from the Zoho API.
|
|
263
|
+
* @param responseError - The underlying fetch response error.
|
|
264
|
+
* @returns A typed Zoho server error, or undefined if no error is found.
|
|
262
265
|
*/
|
|
263
266
|
export declare function parseZohoServerErrorResponseData(errorResponseData: ZohoServerErrorResponseData | ZohoServerErrorResponseDataArrayRef, responseError: FetchResponseError): ZohoServerFetchResponseError | undefined;
|
|
264
267
|
/**
|
package/src/lib/zoho.limit.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type ZohoRateLimitedTooManyRequestsLogFunction = (headers: ZohoRateLimitH
|
|
|
16
16
|
/**
|
|
17
17
|
* Default handler that logs a warning to the console when the Zoho API rate limit is exceeded.
|
|
18
18
|
*
|
|
19
|
-
* @param details - Rate limit details extracted from the Zoho API response headers
|
|
19
|
+
* @param details - Rate limit details extracted from the Zoho API response headers.
|
|
20
20
|
*/
|
|
21
21
|
export declare const DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION: (details: ZohoRateLimitHeaderDetails | ZohoRateLimitResponseDetails) => void;
|
|
22
22
|
/**
|
|
@@ -110,8 +110,9 @@ export interface MakeZohoRateLimitedFetchHandlerConfig extends ZohoRateLimitedFe
|
|
|
110
110
|
* - On 429 responses, the request is automatically retried after the rate limiter delay
|
|
111
111
|
* - The limiter is disabled when responses lack rate limit headers (e.g., error responses)
|
|
112
112
|
*
|
|
113
|
-
* @param config - Configuration including the service-specific header reader, rate limit, reset period, and 429 handling
|
|
113
|
+
* @param config - Configuration including the service-specific header reader, rate limit, reset period, and 429 handling.
|
|
114
114
|
* @returns A rate-limited fetch handler with the underlying rate limiter accessible via `_rateLimiter`
|
|
115
|
+
*
|
|
115
116
|
* @__NO_SIDE_EFFECTS__
|
|
116
117
|
*/
|
|
117
118
|
export declare function makeZohoRateLimitedFetchHandler(config: MakeZohoRateLimitedFetchHandlerConfig): ZohoRateLimitedFetchHandler;
|
|
@@ -122,7 +123,7 @@ export declare function makeZohoRateLimitedFetchHandler(config: MakeZohoRateLimi
|
|
|
122
123
|
* This is a convenience wrapper around {@link makeZohoRateLimitedFetchHandler} pre-configured
|
|
123
124
|
* with the standard Zoho rate limit header reader.
|
|
124
125
|
*
|
|
125
|
-
* @param config - Optional configuration for rate limit, reset period, and 429 handling
|
|
126
|
+
* @param config - Optional configuration for rate limit, reset period, and 429 handling.
|
|
126
127
|
* @returns A rate-limited fetch handler with the underlying rate limiter accessible via `_rateLimiter`
|
|
127
128
|
*/
|
|
128
129
|
export declare function zohoRateLimitedFetchHandler(config?: Maybe<ZohoRateLimitedFetchHandlerConfig>): ZohoRateLimitedFetchHandler;
|
|
@@ -130,8 +131,8 @@ export declare function zohoRateLimitedFetchHandler(config?: Maybe<ZohoRateLimit
|
|
|
130
131
|
* Reads rate limit details from standard Zoho API response headers (`X-RATELIMIT-*`).
|
|
131
132
|
* Used by CRM, Recruit, and Sign services.
|
|
132
133
|
*
|
|
133
|
-
* @param headers - HTTP response headers
|
|
134
|
-
* @returns Parsed rate limit details, or null if headers are absent
|
|
134
|
+
* @param headers - HTTP response headers.
|
|
135
|
+
* @returns Parsed rate limit details, or null if headers are absent.
|
|
135
136
|
*/
|
|
136
137
|
export declare function zohoStandardRateLimitDetailsReader(headers: Headers): Maybe<ZohoRateLimitResponseDetails>;
|
|
137
138
|
/**
|
package/src/lib/zoho.type.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare function safeZohoDateTimeString(date: Maybe<Date>): Maybe<ZohoDat
|
|
|
27
27
|
* Converts a {@link Date} to a {@link ZohoDateTimeString} by stripping milliseconds
|
|
28
28
|
* from the ISO 8601 representation.
|
|
29
29
|
*
|
|
30
|
-
* @param date - Date to convert
|
|
30
|
+
* @param date - Date to convert.
|
|
31
31
|
* @returns Zoho-formatted date-time string (e.g. `'2019-05-02T11:17:33Z'`)
|
|
32
32
|
*
|
|
33
33
|
* @example
|