@plyaz/types 1.44.1 → 1.45.1
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/dist/api/client/types.d.ts +26 -1
- package/dist/api/index.cjs +3 -3
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.js +3 -3
- package/dist/api/index.js.map +1 -1
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/errors/index.cjs +3 -3
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.js +3 -3
- package/dist/errors/index.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Defines the client interface and options
|
|
4
4
|
*/
|
|
5
5
|
import type { ApiHandlerMethods, FetchResponse, RequestConfig, ResponseError } from 'fetchff';
|
|
6
|
-
import type { ApiConfig, ConfigState } from '../config';
|
|
6
|
+
import type { ApiConfig, ConfigState, RequestInterceptor } from '../config';
|
|
7
7
|
import type { ConfigUpdateStrategy, EventScopeWithTemporary, HandlerStrategy } from '../events';
|
|
8
8
|
import type { EndpointTypes } from '../endpoints';
|
|
9
9
|
import type { UnknownRecord } from 'type-fest';
|
|
@@ -424,6 +424,31 @@ export interface SetupUnifiedHandlersParams {
|
|
|
424
424
|
*/
|
|
425
425
|
getResolvedFetchffConfig?: () => RequestConfig;
|
|
426
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* Options for createOnRequestHandler
|
|
429
|
+
*/
|
|
430
|
+
export interface OnRequestHandlerOptions {
|
|
431
|
+
handlers: RequestInterceptor[] | undefined;
|
|
432
|
+
enrichedHeadersConfig?: ApiClientOptions['enrichedHeaders'];
|
|
433
|
+
encryptionConfig?: ApiClientOptions['encryption'];
|
|
434
|
+
configStrategy?: ConfigUpdateStrategy;
|
|
435
|
+
getResolvedFetchffConfig?: () => RequestConfig;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Options for createFetchffClient
|
|
439
|
+
*/
|
|
440
|
+
export interface CreateFetchffClientOptions {
|
|
441
|
+
fetchffConfig: RequestConfig;
|
|
442
|
+
effectiveConfig: ApiConfig;
|
|
443
|
+
options: ApiClientOptions;
|
|
444
|
+
unifiedHandlers: {
|
|
445
|
+
onRequest: RequestConfig['onRequest'];
|
|
446
|
+
onResponse: RequestConfig['onResponse'];
|
|
447
|
+
onError: RequestConfig['onError'];
|
|
448
|
+
onRetry: RequestConfig['onRetry'];
|
|
449
|
+
};
|
|
450
|
+
getResolvedFetchffConfig: () => RequestConfig;
|
|
451
|
+
}
|
|
427
452
|
/**
|
|
428
453
|
* Props for API initialization loading component.
|
|
429
454
|
* Used by ApiProvider to display loading state during client initialization.
|
package/dist/api/index.cjs
CHANGED
|
@@ -4333,10 +4333,10 @@ var ERROR_DEFINITIONS = {
|
|
|
4333
4333
|
},
|
|
4334
4334
|
[ERROR_CODES.DB_FIND_BY_ID_FAILED]: {
|
|
4335
4335
|
code: ERROR_CODES.DB_FIND_BY_ID_FAILED,
|
|
4336
|
-
status: HTTP_STATUS.
|
|
4337
|
-
category: ERROR_CATEGORY.
|
|
4336
|
+
status: HTTP_STATUS.NOT_FOUND,
|
|
4337
|
+
category: ERROR_CATEGORY.Client,
|
|
4338
4338
|
userMessage: "db.crud.find_by_id_failed",
|
|
4339
|
-
severity: ERROR_SEVERITY.
|
|
4339
|
+
severity: ERROR_SEVERITY.Low,
|
|
4340
4340
|
retryable: false
|
|
4341
4341
|
},
|
|
4342
4342
|
[ERROR_CODES.DB_UPDATE_FAILED]: {
|