api-core-lib 12.0.22 → 12.0.24
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/{apiModule.types-D0LSWRW8.d.cts → apiModule.types-B_MxXat3.d.cts} +5 -4
- package/dist/{apiModule.types-D0LSWRW8.d.ts → apiModule.types-B_MxXat3.d.ts} +5 -4
- package/dist/client.cjs +24 -13
- package/dist/client.d.cts +12 -5
- package/dist/client.d.ts +12 -5
- package/dist/client.js +24 -13
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/{useApiRecord.types-DXv1-ly6.d.cts → useApiRecord.types-A-m0WKKh.d.cts} +1 -1
- package/dist/{useApiRecord.types-C7T0gsX_.d.ts → useApiRecord.types-BgjdqOHw.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -218,13 +218,14 @@ interface ApiModuleConfig<TActions extends Record<string, ActionConfigModule<any
|
|
|
218
218
|
actions: TActions;
|
|
219
219
|
}
|
|
220
220
|
/** @description Configuration options passed directly to the `useApiModule` hook. */
|
|
221
|
-
interface UseApiModuleOptions {
|
|
221
|
+
interface UseApiModuleOptions<TExtra = {}> {
|
|
222
222
|
onSuccess?: (actionName: string, message: string, data: unknown) => void;
|
|
223
223
|
onError?: (actionName: string, message: string, error?: ApiError | null) => void;
|
|
224
224
|
refetchOnWindowFocus?: boolean;
|
|
225
225
|
pathParams?: Record<string, any>;
|
|
226
226
|
enabled?: boolean;
|
|
227
227
|
hydratedState?: string;
|
|
228
|
+
extraContextData?: TExtra;
|
|
228
229
|
}
|
|
229
230
|
/** A utility type to infer the Input type (`TInput`) from an ActionConfigModule. */
|
|
230
231
|
type InputOf<TActionConfig> = TActionConfig extends ActionConfigModule<infer TInput, any> ? TInput : never;
|
|
@@ -253,7 +254,7 @@ type ModuleStates<TActions extends Record<string, ActionConfigModule<any, any>>>
|
|
|
253
254
|
[K in keyof TActions]: ActionState<OutputOf<TActions[K]>>;
|
|
254
255
|
};
|
|
255
256
|
/** @description The complete, fully-typed return object of the `useApiModule` hook. */
|
|
256
|
-
|
|
257
|
+
type UseApiModuleReturn<TActions extends Record<string, any>, TExtra = {}> = {
|
|
257
258
|
states: ModuleStates<TActions>;
|
|
258
259
|
actions: ModuleActions<TActions>;
|
|
259
260
|
queries: {
|
|
@@ -262,7 +263,7 @@ interface UseApiModuleReturn<TActions extends Record<string, ActionConfigModule<
|
|
|
262
263
|
} ? UseApiQuery : never;
|
|
263
264
|
};
|
|
264
265
|
dehydrate: () => string;
|
|
265
|
-
}
|
|
266
|
+
} & TExtra;
|
|
266
267
|
/**
|
|
267
268
|
* يصف دوال `execute` و `reset` لإجراء واحد.
|
|
268
269
|
* هذا النوع عام (generic) ليتناسب مع أنواع الإدخال والإخراج المختلفة لكل إجراء.
|
|
@@ -281,4 +282,4 @@ type ActionMethods<TAction extends ActionConfigModule<any, any>> = {
|
|
|
281
282
|
}) => void;
|
|
282
283
|
};
|
|
283
284
|
|
|
284
|
-
export type { ActionConfigModule as A, ExecutableAction as E, InputOf as I, LogLevel as L,
|
|
285
|
+
export type { ActionConfigModule as A, ExecutableAction as E, InputOf as I, LogLevel as L, ModuleStates as M, OutputOf as O, PaginationMeta as P, QueryOptions as Q, RequestConfig as R, StandardResponse as S, Tokens as T, UseApiConfig as U, ValidationError as V, ApiModuleConfig as a, UseApiModuleOptions as b, UseApiModuleReturn as c, ModuleActions as d, UseApiQuery as e, ApiClientConfig as f, ActionOptions as g, ActionStateModule as h, ApiError as i, TokenManager as j, MiddlewareContext as k, Middleware as l, RefreshTokenConfig as m, ActionConfig as n, UseApiState as o, ActionState as p, ExecuteOptions as q, ActionMethods as r, t };
|
|
@@ -218,13 +218,14 @@ interface ApiModuleConfig<TActions extends Record<string, ActionConfigModule<any
|
|
|
218
218
|
actions: TActions;
|
|
219
219
|
}
|
|
220
220
|
/** @description Configuration options passed directly to the `useApiModule` hook. */
|
|
221
|
-
interface UseApiModuleOptions {
|
|
221
|
+
interface UseApiModuleOptions<TExtra = {}> {
|
|
222
222
|
onSuccess?: (actionName: string, message: string, data: unknown) => void;
|
|
223
223
|
onError?: (actionName: string, message: string, error?: ApiError | null) => void;
|
|
224
224
|
refetchOnWindowFocus?: boolean;
|
|
225
225
|
pathParams?: Record<string, any>;
|
|
226
226
|
enabled?: boolean;
|
|
227
227
|
hydratedState?: string;
|
|
228
|
+
extraContextData?: TExtra;
|
|
228
229
|
}
|
|
229
230
|
/** A utility type to infer the Input type (`TInput`) from an ActionConfigModule. */
|
|
230
231
|
type InputOf<TActionConfig> = TActionConfig extends ActionConfigModule<infer TInput, any> ? TInput : never;
|
|
@@ -253,7 +254,7 @@ type ModuleStates<TActions extends Record<string, ActionConfigModule<any, any>>>
|
|
|
253
254
|
[K in keyof TActions]: ActionState<OutputOf<TActions[K]>>;
|
|
254
255
|
};
|
|
255
256
|
/** @description The complete, fully-typed return object of the `useApiModule` hook. */
|
|
256
|
-
|
|
257
|
+
type UseApiModuleReturn<TActions extends Record<string, any>, TExtra = {}> = {
|
|
257
258
|
states: ModuleStates<TActions>;
|
|
258
259
|
actions: ModuleActions<TActions>;
|
|
259
260
|
queries: {
|
|
@@ -262,7 +263,7 @@ interface UseApiModuleReturn<TActions extends Record<string, ActionConfigModule<
|
|
|
262
263
|
} ? UseApiQuery : never;
|
|
263
264
|
};
|
|
264
265
|
dehydrate: () => string;
|
|
265
|
-
}
|
|
266
|
+
} & TExtra;
|
|
266
267
|
/**
|
|
267
268
|
* يصف دوال `execute` و `reset` لإجراء واحد.
|
|
268
269
|
* هذا النوع عام (generic) ليتناسب مع أنواع الإدخال والإخراج المختلفة لكل إجراء.
|
|
@@ -281,4 +282,4 @@ type ActionMethods<TAction extends ActionConfigModule<any, any>> = {
|
|
|
281
282
|
}) => void;
|
|
282
283
|
};
|
|
283
284
|
|
|
284
|
-
export type { ActionConfigModule as A, ExecutableAction as E, InputOf as I, LogLevel as L,
|
|
285
|
+
export type { ActionConfigModule as A, ExecutableAction as E, InputOf as I, LogLevel as L, ModuleStates as M, OutputOf as O, PaginationMeta as P, QueryOptions as Q, RequestConfig as R, StandardResponse as S, Tokens as T, UseApiConfig as U, ValidationError as V, ApiModuleConfig as a, UseApiModuleOptions as b, UseApiModuleReturn as c, ModuleActions as d, UseApiQuery as e, ApiClientConfig as f, ActionOptions as g, ActionStateModule as h, ApiError as i, TokenManager as j, MiddlewareContext as k, Middleware as l, RefreshTokenConfig as m, ActionConfig as n, UseApiState as o, ActionState as p, ExecuteOptions as q, ActionMethods as r, t };
|
package/dist/client.cjs
CHANGED
|
@@ -741,7 +741,15 @@ function useModuleContext() {
|
|
|
741
741
|
return context;
|
|
742
742
|
}
|
|
743
743
|
function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
744
|
-
const {
|
|
744
|
+
const {
|
|
745
|
+
refetchOnWindowFocus = true,
|
|
746
|
+
onSuccess,
|
|
747
|
+
onError,
|
|
748
|
+
pathParams: modulePathParams,
|
|
749
|
+
enabled = true,
|
|
750
|
+
hydratedState,
|
|
751
|
+
extraContextData
|
|
752
|
+
} = options;
|
|
745
753
|
const pathParamsString = (0, import_react4.useMemo)(() => JSON.stringify(modulePathParams || {}), [modulePathParams]);
|
|
746
754
|
const [queryOptions, setQueryOptions] = (0, import_react4.useState)({});
|
|
747
755
|
const savedCallbacks = (0, import_react4.useRef)({ onSuccess, onError });
|
|
@@ -845,21 +853,19 @@ function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
|
845
853
|
const builtQueries = {};
|
|
846
854
|
for (const actionName in moduleConfig.actions) {
|
|
847
855
|
if (moduleConfig.actions[actionName]?.hasQuery) {
|
|
848
|
-
const setActionQueryOptions = (
|
|
856
|
+
const setActionQueryOptions = (updater) => {
|
|
849
857
|
setQueryOptions((prev) => ({ ...prev, [actionName]: typeof updater === "function" ? updater(prev[actionName] || {}) : updater }));
|
|
850
|
-
}
|
|
858
|
+
};
|
|
851
859
|
builtQueries[actionName] = {
|
|
852
|
-
// `options` ستتغير، وهذا صحيح
|
|
853
860
|
options: queryOptions[actionName] || {},
|
|
854
|
-
// `setOptions` والدوال الأخرى ستكون الآن مستقرة
|
|
855
861
|
setOptions: setActionQueryOptions,
|
|
856
|
-
setPage: (
|
|
857
|
-
setLimit: (
|
|
858
|
-
setSearchTerm: (
|
|
859
|
-
setFilters: (
|
|
860
|
-
setSorting: (
|
|
861
|
-
setQueryParam: (
|
|
862
|
-
reset: (
|
|
862
|
+
setPage: (page) => setActionQueryOptions((p) => ({ ...p, page })),
|
|
863
|
+
setLimit: (limit) => setActionQueryOptions((p) => ({ ...p, limit, page: 1 })),
|
|
864
|
+
setSearchTerm: (search) => setActionQueryOptions((p) => ({ ...p, search, page: 1 })),
|
|
865
|
+
setFilters: (filter) => setActionQueryOptions((p) => ({ ...p, filter, page: 1 })),
|
|
866
|
+
setSorting: (sortBy) => setActionQueryOptions((p) => ({ ...p, sortBy })),
|
|
867
|
+
setQueryParam: (key, value) => setActionQueryOptions((p) => ({ ...p, [key]: value, page: key !== "page" ? value : p.page })),
|
|
868
|
+
reset: () => setActionQueryOptions({})
|
|
863
869
|
};
|
|
864
870
|
}
|
|
865
871
|
}
|
|
@@ -915,7 +921,12 @@ function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
|
915
921
|
const dehydrate = (0, import_react4.useMemo)(() => {
|
|
916
922
|
return () => globalStateManager.dehydrate();
|
|
917
923
|
}, []);
|
|
918
|
-
|
|
924
|
+
const baseApiReturn = { actions, states, queries, dehydrate };
|
|
925
|
+
const finalApiReturn = (0, import_react4.useMemo)(() => ({
|
|
926
|
+
...baseApiReturn,
|
|
927
|
+
...extraContextData || {}
|
|
928
|
+
}), [baseApiReturn, extraContextData]);
|
|
929
|
+
return finalApiReturn;
|
|
919
930
|
}
|
|
920
931
|
// Annotate the CommonJS export names for ESM import in node:
|
|
921
932
|
0 && (module.exports = {
|
package/dist/client.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { U as UseApiConfig, A as ActionConfigModule, a as ApiModuleConfig, b as UseApiModuleOptions, c as UseApiModuleReturn } from './apiModule.types-
|
|
3
|
-
import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-
|
|
2
|
+
import { U as UseApiConfig, A as ActionConfigModule, a as ApiModuleConfig, b as UseApiModuleOptions, c as UseApiModuleReturn, M as ModuleStates, d as ModuleActions, e as UseApiQuery } from './apiModule.types-B_MxXat3.cjs';
|
|
3
|
+
import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-A-m0WKKh.cjs';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
declare function useApi<T>(axiosInstance: AxiosInstance, config: UseApiConfig<T>): any;
|
|
@@ -21,8 +21,15 @@ type EffectCallback = () => (void | (() => void));
|
|
|
21
21
|
type DependencyList = readonly any[];
|
|
22
22
|
declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): void;
|
|
23
23
|
|
|
24
|
-
declare const ApiModuleProvider: React.Provider<
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
declare const ApiModuleProvider: React.Provider<{
|
|
25
|
+
states: ModuleStates<any>;
|
|
26
|
+
actions: ModuleActions<any>;
|
|
27
|
+
queries: {
|
|
28
|
+
[x: string]: UseApiQuery | undefined;
|
|
29
|
+
};
|
|
30
|
+
dehydrate: () => string;
|
|
31
|
+
} | null>;
|
|
32
|
+
declare function useModuleContext<TModule extends ApiModuleConfig<any>, TExtra = {}>(): UseApiModuleReturn<TModule['actions'], TExtra>;
|
|
33
|
+
declare function useApiModule<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}>(axiosInstance: AxiosInstance, moduleConfig: ApiModuleConfig<TActions>, options?: UseApiModuleOptions<TExtra>): UseApiModuleReturn<TActions, TExtra>;
|
|
27
34
|
|
|
28
35
|
export { ApiModuleProvider, useApi, useApiModule, useApiRecord, useDeepCompareEffect, useModuleContext };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { U as UseApiConfig, A as ActionConfigModule, a as ApiModuleConfig, b as UseApiModuleOptions, c as UseApiModuleReturn } from './apiModule.types-
|
|
3
|
-
import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-
|
|
2
|
+
import { U as UseApiConfig, A as ActionConfigModule, a as ApiModuleConfig, b as UseApiModuleOptions, c as UseApiModuleReturn, M as ModuleStates, d as ModuleActions, e as UseApiQuery } from './apiModule.types-B_MxXat3.js';
|
|
3
|
+
import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-BgjdqOHw.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
declare function useApi<T>(axiosInstance: AxiosInstance, config: UseApiConfig<T>): any;
|
|
@@ -21,8 +21,15 @@ type EffectCallback = () => (void | (() => void));
|
|
|
21
21
|
type DependencyList = readonly any[];
|
|
22
22
|
declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): void;
|
|
23
23
|
|
|
24
|
-
declare const ApiModuleProvider: React.Provider<
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
declare const ApiModuleProvider: React.Provider<{
|
|
25
|
+
states: ModuleStates<any>;
|
|
26
|
+
actions: ModuleActions<any>;
|
|
27
|
+
queries: {
|
|
28
|
+
[x: string]: UseApiQuery | undefined;
|
|
29
|
+
};
|
|
30
|
+
dehydrate: () => string;
|
|
31
|
+
} | null>;
|
|
32
|
+
declare function useModuleContext<TModule extends ApiModuleConfig<any>, TExtra = {}>(): UseApiModuleReturn<TModule['actions'], TExtra>;
|
|
33
|
+
declare function useApiModule<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}>(axiosInstance: AxiosInstance, moduleConfig: ApiModuleConfig<TActions>, options?: UseApiModuleOptions<TExtra>): UseApiModuleReturn<TActions, TExtra>;
|
|
27
34
|
|
|
28
35
|
export { ApiModuleProvider, useApi, useApiModule, useApiRecord, useDeepCompareEffect, useModuleContext };
|
package/dist/client.js
CHANGED
|
@@ -702,7 +702,15 @@ function useModuleContext() {
|
|
|
702
702
|
return context;
|
|
703
703
|
}
|
|
704
704
|
function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
705
|
-
const {
|
|
705
|
+
const {
|
|
706
|
+
refetchOnWindowFocus = true,
|
|
707
|
+
onSuccess,
|
|
708
|
+
onError,
|
|
709
|
+
pathParams: modulePathParams,
|
|
710
|
+
enabled = true,
|
|
711
|
+
hydratedState,
|
|
712
|
+
extraContextData
|
|
713
|
+
} = options;
|
|
706
714
|
const pathParamsString = useMemo3(() => JSON.stringify(modulePathParams || {}), [modulePathParams]);
|
|
707
715
|
const [queryOptions, setQueryOptions] = useState3({});
|
|
708
716
|
const savedCallbacks = useRef4({ onSuccess, onError });
|
|
@@ -806,21 +814,19 @@ function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
|
806
814
|
const builtQueries = {};
|
|
807
815
|
for (const actionName in moduleConfig.actions) {
|
|
808
816
|
if (moduleConfig.actions[actionName]?.hasQuery) {
|
|
809
|
-
const setActionQueryOptions =
|
|
817
|
+
const setActionQueryOptions = (updater) => {
|
|
810
818
|
setQueryOptions((prev) => ({ ...prev, [actionName]: typeof updater === "function" ? updater(prev[actionName] || {}) : updater }));
|
|
811
|
-
}
|
|
819
|
+
};
|
|
812
820
|
builtQueries[actionName] = {
|
|
813
|
-
// `options` ستتغير، وهذا صحيح
|
|
814
821
|
options: queryOptions[actionName] || {},
|
|
815
|
-
// `setOptions` والدوال الأخرى ستكون الآن مستقرة
|
|
816
822
|
setOptions: setActionQueryOptions,
|
|
817
|
-
setPage:
|
|
818
|
-
setLimit:
|
|
819
|
-
setSearchTerm:
|
|
820
|
-
setFilters:
|
|
821
|
-
setSorting:
|
|
822
|
-
setQueryParam:
|
|
823
|
-
reset:
|
|
823
|
+
setPage: (page) => setActionQueryOptions((p) => ({ ...p, page })),
|
|
824
|
+
setLimit: (limit) => setActionQueryOptions((p) => ({ ...p, limit, page: 1 })),
|
|
825
|
+
setSearchTerm: (search) => setActionQueryOptions((p) => ({ ...p, search, page: 1 })),
|
|
826
|
+
setFilters: (filter) => setActionQueryOptions((p) => ({ ...p, filter, page: 1 })),
|
|
827
|
+
setSorting: (sortBy) => setActionQueryOptions((p) => ({ ...p, sortBy })),
|
|
828
|
+
setQueryParam: (key, value) => setActionQueryOptions((p) => ({ ...p, [key]: value, page: key !== "page" ? value : p.page })),
|
|
829
|
+
reset: () => setActionQueryOptions({})
|
|
824
830
|
};
|
|
825
831
|
}
|
|
826
832
|
}
|
|
@@ -876,7 +882,12 @@ function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
|
876
882
|
const dehydrate = useMemo3(() => {
|
|
877
883
|
return () => globalStateManager.dehydrate();
|
|
878
884
|
}, []);
|
|
879
|
-
|
|
885
|
+
const baseApiReturn = { actions, states, queries, dehydrate };
|
|
886
|
+
const finalApiReturn = useMemo3(() => ({
|
|
887
|
+
...baseApiReturn,
|
|
888
|
+
...extraContextData || {}
|
|
889
|
+
}), [baseApiReturn, extraContextData]);
|
|
890
|
+
return finalApiReturn;
|
|
880
891
|
}
|
|
881
892
|
export {
|
|
882
893
|
ApiModuleProvider,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosRequestConfig, Method, AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-
|
|
2
|
+
import { f as ApiClientConfig, A as ActionConfigModule, S as StandardResponse, g as ActionOptions, R as RequestConfig, h as ActionStateModule, Q as QueryOptions, e as UseApiQuery, i as ApiError, L as LogLevel } from './apiModule.types-B_MxXat3.cjs';
|
|
3
|
+
export { n as ActionConfig, r as ActionMethods, p as ActionState, a as ApiModuleConfig, E as ExecutableAction, q as ExecuteOptions, I as InputOf, l as Middleware, k as MiddlewareContext, d as ModuleActions, M as ModuleStates, O as OutputOf, P as PaginationMeta, m as RefreshTokenConfig, j as TokenManager, T as Tokens, U as UseApiConfig, b as UseApiModuleOptions, c as UseApiModuleReturn, o as UseApiState, V as ValidationError, t } from './apiModule.types-B_MxXat3.cjs';
|
|
4
|
+
export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-A-m0WKKh.cjs';
|
|
5
5
|
import 'react';
|
|
6
6
|
|
|
7
7
|
declare function createApiClient(config: ApiClientConfig): AxiosInstance;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosRequestConfig, Method, AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-
|
|
2
|
+
import { f as ApiClientConfig, A as ActionConfigModule, S as StandardResponse, g as ActionOptions, R as RequestConfig, h as ActionStateModule, Q as QueryOptions, e as UseApiQuery, i as ApiError, L as LogLevel } from './apiModule.types-B_MxXat3.js';
|
|
3
|
+
export { n as ActionConfig, r as ActionMethods, p as ActionState, a as ApiModuleConfig, E as ExecutableAction, q as ExecuteOptions, I as InputOf, l as Middleware, k as MiddlewareContext, d as ModuleActions, M as ModuleStates, O as OutputOf, P as PaginationMeta, m as RefreshTokenConfig, j as TokenManager, T as Tokens, U as UseApiConfig, b as UseApiModuleOptions, c as UseApiModuleReturn, o as UseApiState, V as ValidationError, t } from './apiModule.types-B_MxXat3.js';
|
|
4
|
+
export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-BgjdqOHw.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
|
|
7
7
|
declare function createApiClient(config: ApiClientConfig): AxiosInstance;
|
package/dist/server.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { A as ActionConfigModule, a as ApiModuleConfig, I as InputOf } from './apiModule.types-
|
|
2
|
+
import { A as ActionConfigModule, a as ApiModuleConfig, I as InputOf } from './apiModule.types-B_MxXat3.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { A as ActionConfigModule, a as ApiModuleConfig, I as InputOf } from './apiModule.types-
|
|
2
|
+
import { A as ActionConfigModule, a as ApiModuleConfig, I as InputOf } from './apiModule.types-B_MxXat3.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { R as RequestConfig,
|
|
2
|
+
import { R as RequestConfig, i as ApiError, S as StandardResponse, g as ActionOptions } from './apiModule.types-B_MxXat3.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents the internal state of the `useApiRecord` hook.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { R as RequestConfig,
|
|
2
|
+
import { R as RequestConfig, i as ApiError, S as StandardResponse, g as ActionOptions } from './apiModule.types-B_MxXat3.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents the internal state of the `useApiRecord` hook.
|