@spoosh/core 0.9.2 → 0.9.3

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/index.d.mts CHANGED
@@ -28,40 +28,32 @@ type QueryField<TQuery> = [TQuery] extends [never] ? object : {
28
28
  type BodyField<TBody> = [TBody] extends [never] ? object : {
29
29
  body: TBody;
30
30
  };
31
- type FormDataField<TFormData> = [TFormData] extends [never] ? object : {
32
- formData: TFormData;
33
- };
34
- type UrlEncodedField<TUrlEncoded> = [TUrlEncoded] extends [never] ? object : {
35
- urlEncoded: TUrlEncoded;
36
- };
37
31
  type ParamsField<TParamNames extends string> = [TParamNames] extends [never] ? object : {
38
32
  params: Record<TParamNames, string | number>;
39
33
  };
40
- type InputFields<TQuery, TBody, TFormData, TUrlEncoded, TParamNames extends string> = QueryField<TQuery> & BodyField<TBody> & FormDataField<TFormData> & UrlEncodedField<TUrlEncoded> & ParamsField<TParamNames>;
41
- type InputFieldWrapper<TQuery, TBody, TFormData, TUrlEncoded, TParamNames extends string> = [TQuery, TBody, TFormData, TUrlEncoded, TParamNames] extends [
42
- never,
43
- never,
44
- never,
45
- never,
46
- never
47
- ] ? object : {
48
- input: InputFields<TQuery, TBody, TFormData, TUrlEncoded, TParamNames>;
34
+ type InputFields<TQuery, TBody, TParamNames extends string> = QueryField<TQuery> & BodyField<TBody> & ParamsField<TParamNames>;
35
+ type InputFieldWrapper<TQuery, TBody, TParamNames extends string> = [
36
+ TQuery,
37
+ TBody,
38
+ TParamNames
39
+ ] extends [never, never, never] ? object : {
40
+ input: InputFields<TQuery, TBody, TParamNames>;
49
41
  };
50
- type SpooshResponse<TData, TError, TRequestOptions = unknown, TQuery = never, TBody = never, TFormData = never, TUrlEncoded = never, TParamNames extends string = never> = ({
42
+ type SpooshResponse<TData, TError, TRequestOptions = unknown, TQuery = never, TBody = never, TParamNames extends string = never> = ({
51
43
  status: number;
52
44
  data: TData;
53
45
  headers?: Headers;
54
46
  error?: undefined;
55
47
  aborted?: false;
56
48
  readonly __requestOptions?: TRequestOptions;
57
- } & InputFieldWrapper<TQuery, TBody, TFormData, TUrlEncoded, TParamNames>) | ({
49
+ } & InputFieldWrapper<TQuery, TBody, TParamNames>) | ({
58
50
  status: number;
59
51
  data?: undefined;
60
52
  headers?: Headers;
61
53
  error: TError;
62
54
  aborted?: boolean;
63
55
  readonly __requestOptions?: TRequestOptions;
64
- } & InputFieldWrapper<TQuery, TBody, TFormData, TUrlEncoded, TParamNames>);
56
+ } & InputFieldWrapper<TQuery, TBody, TParamNames>);
65
57
  type SpooshOptionsExtra<TData = unknown, TError = unknown> = {
66
58
  middlewares?: SpooshMiddleware<TData, TError>[];
67
59
  };
@@ -149,6 +141,7 @@ type EventCallback<T = unknown> = (payload: T) => void;
149
141
  interface BuiltInEvents {
150
142
  refetch: RefetchEvent;
151
143
  invalidate: string[];
144
+ refetchAll: void;
152
145
  }
153
146
  /**
154
147
  * Resolves event payload type. Built-in events get their specific type,
@@ -558,13 +551,14 @@ type PluginAccessor = {
558
551
  get<K extends keyof PluginExportsRegistry>(name: K): PluginExportsRegistry[K] | undefined;
559
552
  get(name: string): unknown;
560
553
  };
554
+ type RefetchEventReason = "focus" | "reconnect" | "polling" | "invalidate";
561
555
  /**
562
556
  * Event emitted by plugins to request a refetch.
563
557
  * Hooks subscribe to this event and trigger controller.execute().
564
558
  */
565
559
  type RefetchEvent = {
566
560
  queryKey: string;
567
- reason: "focus" | "reconnect" | "polling" | "invalidate";
561
+ reason: RefetchEventReason | Omit<string, RefetchEventReason>;
568
562
  };
569
563
  /**
570
564
  * Minimal PluginExecutor interface for InstanceApiContext.
@@ -786,16 +780,7 @@ type ExtractError<T, TDefault = unknown> = T extends {
786
780
  * const api = createClient<ApiSchema>({ baseUrl: "/api" });
787
781
  * ```
788
782
  */
789
- type SpooshSchema<T extends {
790
- [path: string]: {
791
- [M in HttpMethod]?: {
792
- data: unknown;
793
- body?: unknown;
794
- query?: unknown;
795
- error?: unknown;
796
- };
797
- };
798
- }> = T;
783
+ type SpooshSchema<T extends ApiSchema> = T;
799
784
  /**
800
785
  * Convert a route pattern like "posts/:id" to a path matcher pattern like `posts/${string}`.
801
786
  * This enables TypeScript to match actual paths like "posts/123" to their schema definitions.
@@ -807,7 +792,7 @@ type SpooshSchema<T extends {
807
792
  * type C = RouteToPath<"posts">; // "posts"
808
793
  * ```
809
794
  */
810
- type RouteToPath<T extends string> = T extends `${infer Start}/:${string}/${infer Rest}` ? `${Start}/${string}/${RouteToPath<Rest>}` : T extends `${infer Start}/:${string}` ? `${Start}/${string}` : T;
795
+ type RouteToPath<T extends string> = T extends `/${infer Rest}` ? `/${RouteToPath<Rest>}` : T extends `${infer Segment}/${infer Rest}` ? Segment extends `:${string}` ? `${string}/${RouteToPath<Rest>}` : `${Segment}/${RouteToPath<Rest>}` : T extends `:${string}` ? string : T;
811
796
  /**
812
797
  * Find which schema key matches a given path.
813
798
  * First checks for exact match, then checks pattern matches.
@@ -875,12 +860,12 @@ type StripPrefixFromPath<TPath extends string, TPrefix extends string> = TPath e
875
860
  * "api": { GET: { data: string } };
876
861
  * "api/users": { GET: { data: User[] } };
877
862
  * "api/posts/:id": { GET: { data: Post } };
878
- * "health": { GET: { data: { status: string } } };
863
+ * "api/health": { GET: { data: { status: string } } };
879
864
  * };
880
865
  *
881
866
  * type ApiSchema = StripPrefix<FullSchema, "api">;
882
867
  * // {
883
- * // "": { GET: { data: string } };
868
+ * // "/": { GET: { data: string } };
884
869
  * // "users": { GET: { data: User[] } };
885
870
  * // "posts/:id": { GET: { data: Post } };
886
871
  * // "health": { GET: { data: { status: string } } };
@@ -1011,7 +996,7 @@ type IsOptionsRequired<TMethodConfig, TUserPath extends string> = IsBodyRequired
1011
996
  /**
1012
997
  * Build response type for a method call.
1013
998
  */
1014
- type MethodResponse<TMethodConfig, TDefaultError, TUserPath extends string> = SpooshResponse<ExtractData<TMethodConfig>, ExtractError<TMethodConfig, TDefaultError>, RequestOptions<TMethodConfig, TUserPath>, ExtractQuery<TMethodConfig>, ExtractBody<TMethodConfig>, never, never, ExtractParamNames<TUserPath>>;
999
+ type MethodResponse<TMethodConfig, TDefaultError, TUserPath extends string> = SpooshResponse<ExtractData<TMethodConfig>, ExtractError<TMethodConfig, TDefaultError>, RequestOptions<TMethodConfig, TUserPath>, ExtractQuery<TMethodConfig>, ExtractBody<TMethodConfig>, ExtractParamNames<TUserPath>>;
1015
1000
  /**
1016
1001
  * Create a method function type.
1017
1002
  * Direct lookup: Schema[Path][Method] → method config → build function type
@@ -1636,4 +1621,4 @@ type CreateInfiniteReadOptions<TData, TItem, TError, TRequest> = {
1636
1621
  };
1637
1622
  declare function createInfiniteReadController<TData, TItem, TError, TRequest extends InfiniteRequestOptions = InfiniteRequestOptions>(options: CreateInfiniteReadOptions<TData, TItem, TError, TRequest>): InfiniteReadController<TData, TItem, TError>;
1638
1623
 
1639
- export { type AnyRequestOptions, type ApiSchema, type BuiltInEvents, type CacheEntry, type CacheEntryWithKey, type CapturedCall, type SpooshClientConfig as ClientConfig, type ComputeRequestOptions, type CoreRequestOptionsBase, type CreateInfiniteReadOptions, type CreateOperationOptions, type DataAwareCallback, type DataAwareTransform, type EventEmitter, type ExtractBody$1 as ExtractBody, type ExtractData, type ExtractError, type ExtractMethodOptions, type ExtractParamNames, type ExtractQuery$1 as ExtractQuery, type FetchDirection, type FetchExecutor, type FindMatchingKey, HTTP_METHODS, type HasParams, type HasReadMethod, type HasWriteMethod, type HeadersInitOrGetter, type HttpMethod, type HttpMethodKey, type InfiniteReadController, type InfiniteReadState, type InfiniteRequestOptions, type InstanceApiContext, type InstanceApiResolvers, type InstancePluginExecutor, type LifecyclePhase, type MergePluginInstanceApi, type MergePluginOptions, type MergePluginResults, type MethodOptionsMap, type MiddlewareContext, type MiddlewareHandler, type MiddlewarePhase, type OperationController, type OperationState, type OperationType, type PageContext, type PluginAccessor, type PluginArray, type PluginContext, type PluginContextInput, type PluginExecutor, type PluginExportsRegistry, type PluginFactory, type PluginHandler, type PluginLifecycle, type PluginMiddleware, type PluginRegistry, type PluginResolvers, type PluginResponseHandler, type PluginResultResolvers, type PluginTypeConfig, type PluginUpdateHandler, type ReadClient, type ReadPaths, type ReadSchemaHelper, type RefetchEvent, type RequestOptions$1 as RequestOptions, type ResolveInstanceApi, type ResolveResultTypes, type ResolveSchemaTypes, type ResolveTypes, type ResolverContext, type RetryConfig, type RouteToPath, type SchemaPaths, type SelectedEndpoint, type SelectorFunction, type SelectorResult, type Simplify, Spoosh, type SpooshBody, type SpooshClient, type SpooshConfig, type SpooshInstance, type SpooshMiddleware, type SpooshOptions, type SpooshOptionsExtra, type SpooshPlugin, type SpooshResponse, type SpooshSchema, type StateManager, type StripPrefix, type TagMode, type TagOptions, type WriteClient, type WriteMethod, type WritePaths, type WriteSchemaHelper, __DEV__, applyMiddlewares, buildUrl, composeMiddlewares, containsFile, createClient, createEventEmitter, createInfiniteReadController, createInitialState, createMiddleware, createOperationController, createPluginExecutor, createPluginRegistry, createProxyHandler, createSelectorProxy, createStateManager, executeFetch, extractMethodFromSelector, extractPathFromSelector, form, generateTags, getContentType, isJsonBody, isSpooshBody, json, mergeHeaders, objectToFormData, objectToUrlEncoded, resolveHeadersToRecord, resolvePath, resolveRequestBody, resolveTags, setHeaders, sortObjectKeys, urlencoded };
1624
+ export { type AnyRequestOptions, type ApiSchema, type BuiltInEvents, type CacheEntry, type CacheEntryWithKey, type CapturedCall, type SpooshClientConfig as ClientConfig, type ComputeRequestOptions, type CoreRequestOptionsBase, type CreateInfiniteReadOptions, type CreateOperationOptions, type DataAwareCallback, type DataAwareTransform, type EventEmitter, type ExtractBody$1 as ExtractBody, type ExtractData, type ExtractError, type ExtractMethodOptions, type ExtractParamNames, type ExtractQuery$1 as ExtractQuery, type FetchDirection, type FetchExecutor, type FindMatchingKey, HTTP_METHODS, type HasParams, type HasReadMethod, type HasWriteMethod, type HeadersInitOrGetter, type HttpMethod, type HttpMethodKey, type InfiniteReadController, type InfiniteReadState, type InfiniteRequestOptions, type InstanceApiContext, type InstanceApiResolvers, type InstancePluginExecutor, type LifecyclePhase, type MergePluginInstanceApi, type MergePluginOptions, type MergePluginResults, type MethodOptionsMap, type MiddlewareContext, type MiddlewareHandler, type MiddlewarePhase, type OperationController, type OperationState, type OperationType, type PageContext, type PluginAccessor, type PluginArray, type PluginContext, type PluginContextInput, type PluginExecutor, type PluginExportsRegistry, type PluginFactory, type PluginHandler, type PluginLifecycle, type PluginMiddleware, type PluginRegistry, type PluginResolvers, type PluginResponseHandler, type PluginResultResolvers, type PluginTypeConfig, type PluginUpdateHandler, type ReadClient, type ReadPaths, type ReadSchemaHelper, type RefetchEvent, type RequestOptions$1 as RequestOptions, type ResolveInstanceApi, type ResolveResultTypes, type ResolveSchemaTypes, type ResolveTypes, type ResolverContext, type RetryConfig, type SchemaPaths, type SelectedEndpoint, type SelectorFunction, type SelectorResult, type Simplify, Spoosh, type SpooshBody, type SpooshClient, type SpooshConfig, type SpooshInstance, type SpooshMiddleware, type SpooshOptions, type SpooshOptionsExtra, type SpooshPlugin, type SpooshResponse, type SpooshSchema, type StateManager, type StripPrefix, type TagMode, type TagOptions, type WriteClient, type WriteMethod, type WritePaths, type WriteSchemaHelper, __DEV__, applyMiddlewares, buildUrl, composeMiddlewares, containsFile, createClient, createEventEmitter, createInfiniteReadController, createInitialState, createMiddleware, createOperationController, createPluginExecutor, createPluginRegistry, createProxyHandler, createSelectorProxy, createStateManager, executeFetch, extractMethodFromSelector, extractPathFromSelector, form, generateTags, getContentType, isJsonBody, isSpooshBody, json, mergeHeaders, objectToFormData, objectToUrlEncoded, resolveHeadersToRecord, resolvePath, resolveRequestBody, resolveTags, setHeaders, sortObjectKeys, urlencoded };
package/dist/index.d.ts CHANGED
@@ -28,40 +28,32 @@ type QueryField<TQuery> = [TQuery] extends [never] ? object : {
28
28
  type BodyField<TBody> = [TBody] extends [never] ? object : {
29
29
  body: TBody;
30
30
  };
31
- type FormDataField<TFormData> = [TFormData] extends [never] ? object : {
32
- formData: TFormData;
33
- };
34
- type UrlEncodedField<TUrlEncoded> = [TUrlEncoded] extends [never] ? object : {
35
- urlEncoded: TUrlEncoded;
36
- };
37
31
  type ParamsField<TParamNames extends string> = [TParamNames] extends [never] ? object : {
38
32
  params: Record<TParamNames, string | number>;
39
33
  };
40
- type InputFields<TQuery, TBody, TFormData, TUrlEncoded, TParamNames extends string> = QueryField<TQuery> & BodyField<TBody> & FormDataField<TFormData> & UrlEncodedField<TUrlEncoded> & ParamsField<TParamNames>;
41
- type InputFieldWrapper<TQuery, TBody, TFormData, TUrlEncoded, TParamNames extends string> = [TQuery, TBody, TFormData, TUrlEncoded, TParamNames] extends [
42
- never,
43
- never,
44
- never,
45
- never,
46
- never
47
- ] ? object : {
48
- input: InputFields<TQuery, TBody, TFormData, TUrlEncoded, TParamNames>;
34
+ type InputFields<TQuery, TBody, TParamNames extends string> = QueryField<TQuery> & BodyField<TBody> & ParamsField<TParamNames>;
35
+ type InputFieldWrapper<TQuery, TBody, TParamNames extends string> = [
36
+ TQuery,
37
+ TBody,
38
+ TParamNames
39
+ ] extends [never, never, never] ? object : {
40
+ input: InputFields<TQuery, TBody, TParamNames>;
49
41
  };
50
- type SpooshResponse<TData, TError, TRequestOptions = unknown, TQuery = never, TBody = never, TFormData = never, TUrlEncoded = never, TParamNames extends string = never> = ({
42
+ type SpooshResponse<TData, TError, TRequestOptions = unknown, TQuery = never, TBody = never, TParamNames extends string = never> = ({
51
43
  status: number;
52
44
  data: TData;
53
45
  headers?: Headers;
54
46
  error?: undefined;
55
47
  aborted?: false;
56
48
  readonly __requestOptions?: TRequestOptions;
57
- } & InputFieldWrapper<TQuery, TBody, TFormData, TUrlEncoded, TParamNames>) | ({
49
+ } & InputFieldWrapper<TQuery, TBody, TParamNames>) | ({
58
50
  status: number;
59
51
  data?: undefined;
60
52
  headers?: Headers;
61
53
  error: TError;
62
54
  aborted?: boolean;
63
55
  readonly __requestOptions?: TRequestOptions;
64
- } & InputFieldWrapper<TQuery, TBody, TFormData, TUrlEncoded, TParamNames>);
56
+ } & InputFieldWrapper<TQuery, TBody, TParamNames>);
65
57
  type SpooshOptionsExtra<TData = unknown, TError = unknown> = {
66
58
  middlewares?: SpooshMiddleware<TData, TError>[];
67
59
  };
@@ -149,6 +141,7 @@ type EventCallback<T = unknown> = (payload: T) => void;
149
141
  interface BuiltInEvents {
150
142
  refetch: RefetchEvent;
151
143
  invalidate: string[];
144
+ refetchAll: void;
152
145
  }
153
146
  /**
154
147
  * Resolves event payload type. Built-in events get their specific type,
@@ -558,13 +551,14 @@ type PluginAccessor = {
558
551
  get<K extends keyof PluginExportsRegistry>(name: K): PluginExportsRegistry[K] | undefined;
559
552
  get(name: string): unknown;
560
553
  };
554
+ type RefetchEventReason = "focus" | "reconnect" | "polling" | "invalidate";
561
555
  /**
562
556
  * Event emitted by plugins to request a refetch.
563
557
  * Hooks subscribe to this event and trigger controller.execute().
564
558
  */
565
559
  type RefetchEvent = {
566
560
  queryKey: string;
567
- reason: "focus" | "reconnect" | "polling" | "invalidate";
561
+ reason: RefetchEventReason | Omit<string, RefetchEventReason>;
568
562
  };
569
563
  /**
570
564
  * Minimal PluginExecutor interface for InstanceApiContext.
@@ -786,16 +780,7 @@ type ExtractError<T, TDefault = unknown> = T extends {
786
780
  * const api = createClient<ApiSchema>({ baseUrl: "/api" });
787
781
  * ```
788
782
  */
789
- type SpooshSchema<T extends {
790
- [path: string]: {
791
- [M in HttpMethod]?: {
792
- data: unknown;
793
- body?: unknown;
794
- query?: unknown;
795
- error?: unknown;
796
- };
797
- };
798
- }> = T;
783
+ type SpooshSchema<T extends ApiSchema> = T;
799
784
  /**
800
785
  * Convert a route pattern like "posts/:id" to a path matcher pattern like `posts/${string}`.
801
786
  * This enables TypeScript to match actual paths like "posts/123" to their schema definitions.
@@ -807,7 +792,7 @@ type SpooshSchema<T extends {
807
792
  * type C = RouteToPath<"posts">; // "posts"
808
793
  * ```
809
794
  */
810
- type RouteToPath<T extends string> = T extends `${infer Start}/:${string}/${infer Rest}` ? `${Start}/${string}/${RouteToPath<Rest>}` : T extends `${infer Start}/:${string}` ? `${Start}/${string}` : T;
795
+ type RouteToPath<T extends string> = T extends `/${infer Rest}` ? `/${RouteToPath<Rest>}` : T extends `${infer Segment}/${infer Rest}` ? Segment extends `:${string}` ? `${string}/${RouteToPath<Rest>}` : `${Segment}/${RouteToPath<Rest>}` : T extends `:${string}` ? string : T;
811
796
  /**
812
797
  * Find which schema key matches a given path.
813
798
  * First checks for exact match, then checks pattern matches.
@@ -875,12 +860,12 @@ type StripPrefixFromPath<TPath extends string, TPrefix extends string> = TPath e
875
860
  * "api": { GET: { data: string } };
876
861
  * "api/users": { GET: { data: User[] } };
877
862
  * "api/posts/:id": { GET: { data: Post } };
878
- * "health": { GET: { data: { status: string } } };
863
+ * "api/health": { GET: { data: { status: string } } };
879
864
  * };
880
865
  *
881
866
  * type ApiSchema = StripPrefix<FullSchema, "api">;
882
867
  * // {
883
- * // "": { GET: { data: string } };
868
+ * // "/": { GET: { data: string } };
884
869
  * // "users": { GET: { data: User[] } };
885
870
  * // "posts/:id": { GET: { data: Post } };
886
871
  * // "health": { GET: { data: { status: string } } };
@@ -1011,7 +996,7 @@ type IsOptionsRequired<TMethodConfig, TUserPath extends string> = IsBodyRequired
1011
996
  /**
1012
997
  * Build response type for a method call.
1013
998
  */
1014
- type MethodResponse<TMethodConfig, TDefaultError, TUserPath extends string> = SpooshResponse<ExtractData<TMethodConfig>, ExtractError<TMethodConfig, TDefaultError>, RequestOptions<TMethodConfig, TUserPath>, ExtractQuery<TMethodConfig>, ExtractBody<TMethodConfig>, never, never, ExtractParamNames<TUserPath>>;
999
+ type MethodResponse<TMethodConfig, TDefaultError, TUserPath extends string> = SpooshResponse<ExtractData<TMethodConfig>, ExtractError<TMethodConfig, TDefaultError>, RequestOptions<TMethodConfig, TUserPath>, ExtractQuery<TMethodConfig>, ExtractBody<TMethodConfig>, ExtractParamNames<TUserPath>>;
1015
1000
  /**
1016
1001
  * Create a method function type.
1017
1002
  * Direct lookup: Schema[Path][Method] → method config → build function type
@@ -1636,4 +1621,4 @@ type CreateInfiniteReadOptions<TData, TItem, TError, TRequest> = {
1636
1621
  };
1637
1622
  declare function createInfiniteReadController<TData, TItem, TError, TRequest extends InfiniteRequestOptions = InfiniteRequestOptions>(options: CreateInfiniteReadOptions<TData, TItem, TError, TRequest>): InfiniteReadController<TData, TItem, TError>;
1638
1623
 
1639
- export { type AnyRequestOptions, type ApiSchema, type BuiltInEvents, type CacheEntry, type CacheEntryWithKey, type CapturedCall, type SpooshClientConfig as ClientConfig, type ComputeRequestOptions, type CoreRequestOptionsBase, type CreateInfiniteReadOptions, type CreateOperationOptions, type DataAwareCallback, type DataAwareTransform, type EventEmitter, type ExtractBody$1 as ExtractBody, type ExtractData, type ExtractError, type ExtractMethodOptions, type ExtractParamNames, type ExtractQuery$1 as ExtractQuery, type FetchDirection, type FetchExecutor, type FindMatchingKey, HTTP_METHODS, type HasParams, type HasReadMethod, type HasWriteMethod, type HeadersInitOrGetter, type HttpMethod, type HttpMethodKey, type InfiniteReadController, type InfiniteReadState, type InfiniteRequestOptions, type InstanceApiContext, type InstanceApiResolvers, type InstancePluginExecutor, type LifecyclePhase, type MergePluginInstanceApi, type MergePluginOptions, type MergePluginResults, type MethodOptionsMap, type MiddlewareContext, type MiddlewareHandler, type MiddlewarePhase, type OperationController, type OperationState, type OperationType, type PageContext, type PluginAccessor, type PluginArray, type PluginContext, type PluginContextInput, type PluginExecutor, type PluginExportsRegistry, type PluginFactory, type PluginHandler, type PluginLifecycle, type PluginMiddleware, type PluginRegistry, type PluginResolvers, type PluginResponseHandler, type PluginResultResolvers, type PluginTypeConfig, type PluginUpdateHandler, type ReadClient, type ReadPaths, type ReadSchemaHelper, type RefetchEvent, type RequestOptions$1 as RequestOptions, type ResolveInstanceApi, type ResolveResultTypes, type ResolveSchemaTypes, type ResolveTypes, type ResolverContext, type RetryConfig, type RouteToPath, type SchemaPaths, type SelectedEndpoint, type SelectorFunction, type SelectorResult, type Simplify, Spoosh, type SpooshBody, type SpooshClient, type SpooshConfig, type SpooshInstance, type SpooshMiddleware, type SpooshOptions, type SpooshOptionsExtra, type SpooshPlugin, type SpooshResponse, type SpooshSchema, type StateManager, type StripPrefix, type TagMode, type TagOptions, type WriteClient, type WriteMethod, type WritePaths, type WriteSchemaHelper, __DEV__, applyMiddlewares, buildUrl, composeMiddlewares, containsFile, createClient, createEventEmitter, createInfiniteReadController, createInitialState, createMiddleware, createOperationController, createPluginExecutor, createPluginRegistry, createProxyHandler, createSelectorProxy, createStateManager, executeFetch, extractMethodFromSelector, extractPathFromSelector, form, generateTags, getContentType, isJsonBody, isSpooshBody, json, mergeHeaders, objectToFormData, objectToUrlEncoded, resolveHeadersToRecord, resolvePath, resolveRequestBody, resolveTags, setHeaders, sortObjectKeys, urlencoded };
1624
+ export { type AnyRequestOptions, type ApiSchema, type BuiltInEvents, type CacheEntry, type CacheEntryWithKey, type CapturedCall, type SpooshClientConfig as ClientConfig, type ComputeRequestOptions, type CoreRequestOptionsBase, type CreateInfiniteReadOptions, type CreateOperationOptions, type DataAwareCallback, type DataAwareTransform, type EventEmitter, type ExtractBody$1 as ExtractBody, type ExtractData, type ExtractError, type ExtractMethodOptions, type ExtractParamNames, type ExtractQuery$1 as ExtractQuery, type FetchDirection, type FetchExecutor, type FindMatchingKey, HTTP_METHODS, type HasParams, type HasReadMethod, type HasWriteMethod, type HeadersInitOrGetter, type HttpMethod, type HttpMethodKey, type InfiniteReadController, type InfiniteReadState, type InfiniteRequestOptions, type InstanceApiContext, type InstanceApiResolvers, type InstancePluginExecutor, type LifecyclePhase, type MergePluginInstanceApi, type MergePluginOptions, type MergePluginResults, type MethodOptionsMap, type MiddlewareContext, type MiddlewareHandler, type MiddlewarePhase, type OperationController, type OperationState, type OperationType, type PageContext, type PluginAccessor, type PluginArray, type PluginContext, type PluginContextInput, type PluginExecutor, type PluginExportsRegistry, type PluginFactory, type PluginHandler, type PluginLifecycle, type PluginMiddleware, type PluginRegistry, type PluginResolvers, type PluginResponseHandler, type PluginResultResolvers, type PluginTypeConfig, type PluginUpdateHandler, type ReadClient, type ReadPaths, type ReadSchemaHelper, type RefetchEvent, type RequestOptions$1 as RequestOptions, type ResolveInstanceApi, type ResolveResultTypes, type ResolveSchemaTypes, type ResolveTypes, type ResolverContext, type RetryConfig, type SchemaPaths, type SelectedEndpoint, type SelectorFunction, type SelectorResult, type Simplify, Spoosh, type SpooshBody, type SpooshClient, type SpooshConfig, type SpooshInstance, type SpooshMiddleware, type SpooshOptions, type SpooshOptionsExtra, type SpooshPlugin, type SpooshResponse, type SpooshSchema, type StateManager, type StripPrefix, type TagMode, type TagOptions, type WriteClient, type WriteMethod, type WritePaths, type WriteSchemaHelper, __DEV__, applyMiddlewares, buildUrl, composeMiddlewares, containsFile, createClient, createEventEmitter, createInfiniteReadController, createInitialState, createMiddleware, createOperationController, createPluginExecutor, createPluginRegistry, createProxyHandler, createSelectorProxy, createStateManager, executeFetch, extractMethodFromSelector, extractPathFromSelector, form, generateTags, getContentType, isJsonBody, isSpooshBody, json, mergeHeaders, objectToFormData, objectToUrlEncoded, resolveHeadersToRecord, resolvePath, resolveRequestBody, resolveTags, setHeaders, sortObjectKeys, urlencoded };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spoosh/core",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "license": "MIT",
5
5
  "description": "Type-safe API client with plugin middleware system",
6
6
  "keywords": [