@plyaz/types 1.44.1 → 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.
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.44.1",
3
+ "version": "1.45.0",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",