@plyaz/types 1.44.0 → 1.45.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/dist/api/client/types.d.ts +32 -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';
|
|
@@ -417,6 +417,37 @@ export interface SetupUnifiedHandlersParams {
|
|
|
417
417
|
globalConfig?: ApiConfig;
|
|
418
418
|
clientOptions?: ApiClientOptions;
|
|
419
419
|
clearTemporaryOverrides?: () => void;
|
|
420
|
+
/**
|
|
421
|
+
* Get the current resolved fetchff config.
|
|
422
|
+
* Called on each request to get latest config including temporary overrides.
|
|
423
|
+
* This ensures updateConfig() changes are applied to subsequent requests.
|
|
424
|
+
*/
|
|
425
|
+
getResolvedFetchffConfig?: () => RequestConfig;
|
|
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;
|
|
420
451
|
}
|
|
421
452
|
/**
|
|
422
453
|
* Props for API initialization loading component.
|
package/package.json
CHANGED