api-core-lib 12.0.92 → 12.0.93
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-CZX-M2Ub.d.cts → apiModule.types-0YqoHN1K.d.cts} +10 -5
- package/dist/{apiModule.types-CZX-M2Ub.d.ts → apiModule.types-0YqoHN1K.d.ts} +10 -5
- package/dist/client.cjs +2 -9
- package/dist/client.d.cts +11 -21
- package/dist/client.d.ts +11 -21
- package/dist/client.js +3 -10
- 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-Cq9AlZX2.d.cts → useApiRecord.types-CdbyfLNG.d.cts} +1 -1
- package/dist/{useApiRecord.types-Cye9a7zh.d.ts → useApiRecord.types-Q5Ux9P1x.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -205,6 +205,8 @@ interface ActionConfigModule<TInput = unknown, TOutput = unknown> {
|
|
|
205
205
|
autoFetch?: boolean;
|
|
206
206
|
cacheResponse?: boolean;
|
|
207
207
|
invalidates?: string[];
|
|
208
|
+
requiresAuth?: boolean;
|
|
209
|
+
pathParams?: string[];
|
|
208
210
|
_input?: TInput;
|
|
209
211
|
_output?: TOutput;
|
|
210
212
|
}
|
|
@@ -261,12 +263,15 @@ type ActionsWithQuery<TActions extends Record<string, any>> = {
|
|
|
261
263
|
hasQuery: true;
|
|
262
264
|
} ? K : never;
|
|
263
265
|
}[keyof TActions];
|
|
264
|
-
type
|
|
266
|
+
type ModuleQueries<TActions extends Record<string, ActionConfigModule<any, any>>> = Partial<{
|
|
267
|
+
[K in keyof TActions as TActions[K] extends {
|
|
268
|
+
hasQuery: true;
|
|
269
|
+
} ? K : never]: UseApiQuery;
|
|
270
|
+
}>;
|
|
271
|
+
type UseApiModuleReturn<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}> = {
|
|
265
272
|
states: ModuleStates<TActions>;
|
|
266
273
|
actions: ModuleActions<TActions>;
|
|
267
|
-
queries:
|
|
268
|
-
[K in ActionsWithQuery<TActions>]: UseApiQuery;
|
|
269
|
-
};
|
|
274
|
+
queries: ModuleQueries<TActions>;
|
|
270
275
|
dehydrate: () => string;
|
|
271
276
|
} & TExtra;
|
|
272
277
|
/**
|
|
@@ -287,4 +292,4 @@ type ActionMethods<TAction extends ActionConfigModule<any, any>> = {
|
|
|
287
292
|
}) => void;
|
|
288
293
|
};
|
|
289
294
|
|
|
290
|
-
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,
|
|
295
|
+
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, ActionsWithQuery as r, ModuleQueries as s, t, ActionMethods as u };
|
|
@@ -205,6 +205,8 @@ interface ActionConfigModule<TInput = unknown, TOutput = unknown> {
|
|
|
205
205
|
autoFetch?: boolean;
|
|
206
206
|
cacheResponse?: boolean;
|
|
207
207
|
invalidates?: string[];
|
|
208
|
+
requiresAuth?: boolean;
|
|
209
|
+
pathParams?: string[];
|
|
208
210
|
_input?: TInput;
|
|
209
211
|
_output?: TOutput;
|
|
210
212
|
}
|
|
@@ -261,12 +263,15 @@ type ActionsWithQuery<TActions extends Record<string, any>> = {
|
|
|
261
263
|
hasQuery: true;
|
|
262
264
|
} ? K : never;
|
|
263
265
|
}[keyof TActions];
|
|
264
|
-
type
|
|
266
|
+
type ModuleQueries<TActions extends Record<string, ActionConfigModule<any, any>>> = Partial<{
|
|
267
|
+
[K in keyof TActions as TActions[K] extends {
|
|
268
|
+
hasQuery: true;
|
|
269
|
+
} ? K : never]: UseApiQuery;
|
|
270
|
+
}>;
|
|
271
|
+
type UseApiModuleReturn<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}> = {
|
|
265
272
|
states: ModuleStates<TActions>;
|
|
266
273
|
actions: ModuleActions<TActions>;
|
|
267
|
-
queries:
|
|
268
|
-
[K in ActionsWithQuery<TActions>]: UseApiQuery;
|
|
269
|
-
};
|
|
274
|
+
queries: ModuleQueries<TActions>;
|
|
270
275
|
dehydrate: () => string;
|
|
271
276
|
} & TExtra;
|
|
272
277
|
/**
|
|
@@ -287,4 +292,4 @@ type ActionMethods<TAction extends ActionConfigModule<any, any>> = {
|
|
|
287
292
|
}) => void;
|
|
288
293
|
};
|
|
289
294
|
|
|
290
|
-
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,
|
|
295
|
+
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, ActionsWithQuery as r, ModuleQueries as s, t, ActionMethods as u };
|
package/dist/client.cjs
CHANGED
|
@@ -317,13 +317,6 @@ function useApiActionState(actionConfig, cacheKey, execute, input, enabled) {
|
|
|
317
317
|
}, [cacheKey, enabled, state.isStale, state.loading, state.called, actionConfig.autoFetch, refetch]);
|
|
318
318
|
return state;
|
|
319
319
|
}
|
|
320
|
-
function useModuleContext() {
|
|
321
|
-
const context = _react.useContext.call(void 0, ApiModuleContext);
|
|
322
|
-
if (!context) {
|
|
323
|
-
throw new Error("useModuleContext must be used within an ApiModuleProvider");
|
|
324
|
-
}
|
|
325
|
-
return context;
|
|
326
|
-
}
|
|
327
320
|
function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
328
321
|
const {
|
|
329
322
|
refetchOnWindowFocus = true,
|
|
@@ -527,6 +520,7 @@ function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
|
527
520
|
|
|
528
521
|
function createApiModuleContext() {
|
|
529
522
|
const Context = _react.createContext.call(void 0, null);
|
|
523
|
+
Context.displayName = "ApiModuleContext";
|
|
530
524
|
const Provider = ({ value, children }) => {
|
|
531
525
|
return _react.createElement.call(void 0, Context.Provider, { value }, children);
|
|
532
526
|
};
|
|
@@ -550,5 +544,4 @@ function createApiModuleContext() {
|
|
|
550
544
|
|
|
551
545
|
|
|
552
546
|
|
|
553
|
-
|
|
554
|
-
exports.ApiModuleProvider = ApiModuleProvider; exports.createApiModuleContext = createApiModuleContext; exports.useApi = useApi; exports.useApiModule = useApiModule; exports.useApiRecord = useApiRecord; exports.useDeepCompareEffect = useDeepCompareEffect; exports.useModuleContext = useModuleContext;
|
|
547
|
+
exports.ApiModuleProvider = ApiModuleProvider; exports.createApiModuleContext = createApiModuleContext; exports.useApi = useApi; exports.useApiModule = useApiModule; exports.useApiRecord = useApiRecord; exports.useDeepCompareEffect = useDeepCompareEffect;
|
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, M as ModuleStates, d as ModuleActions, e as UseApiQuery
|
|
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-0YqoHN1K.cjs';
|
|
3
|
+
import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-CdbyfLNG.cjs';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
|
|
@@ -25,12 +25,11 @@ declare function useDeepCompareEffect(callback: EffectCallback, dependencies: De
|
|
|
25
25
|
declare const ApiModuleProvider: react.Provider<{
|
|
26
26
|
states: ModuleStates<any>;
|
|
27
27
|
actions: ModuleActions<any>;
|
|
28
|
-
queries: {
|
|
28
|
+
queries: Partial<{
|
|
29
29
|
[x: string]: UseApiQuery;
|
|
30
|
-
}
|
|
30
|
+
}>;
|
|
31
31
|
dehydrate: () => string;
|
|
32
32
|
} | null>;
|
|
33
|
-
declare function useModuleContext<TModule extends ApiModuleConfig<any>, TExtra = {}>(): UseApiModuleReturn<TModule['actions'], TExtra>;
|
|
34
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>;
|
|
35
34
|
|
|
36
35
|
/**
|
|
@@ -38,25 +37,16 @@ declare function useApiModule<TActions extends Record<string, ActionConfigModule
|
|
|
38
37
|
* This pattern avoids the need for manual type assertions in consuming components.
|
|
39
38
|
*
|
|
40
39
|
* @template TActions - The shape of the actions in the API module.
|
|
40
|
+
* @template TExtra - The shape of any extra data passed via `extraContextData`.
|
|
41
41
|
* @returns An object containing the typed Context, Provider, and a `useContext` hook.
|
|
42
42
|
*/
|
|
43
|
-
declare function createApiModuleContext<TActions extends Record<string, any
|
|
44
|
-
Context: react.Context<
|
|
45
|
-
states: ModuleStates<TActions>;
|
|
46
|
-
actions: ModuleActions<TActions>;
|
|
47
|
-
queries: { [K in ActionsWithQuery<TActions>]: UseApiQuery; };
|
|
48
|
-
dehydrate: () => string;
|
|
49
|
-
} | null>;
|
|
43
|
+
declare function createApiModuleContext<TActions extends Record<string, any>, TExtra extends object = {}>(): {
|
|
44
|
+
Context: react.Context<UseApiModuleReturn<TActions, TExtra> | null>;
|
|
50
45
|
Provider: ({ value, children }: {
|
|
51
|
-
value: UseApiModuleReturn<TActions>;
|
|
46
|
+
value: UseApiModuleReturn<TActions, TExtra>;
|
|
52
47
|
children: ReactNode;
|
|
53
|
-
}) => react.FunctionComponentElement<react.ProviderProps<
|
|
54
|
-
|
|
55
|
-
actions: ModuleActions<TActions>;
|
|
56
|
-
queries: { [K in ActionsWithQuery<TActions>]: UseApiQuery; };
|
|
57
|
-
dehydrate: () => string;
|
|
58
|
-
} | null>>;
|
|
59
|
-
useContext: () => UseApiModuleReturn<TActions>;
|
|
48
|
+
}) => react.FunctionComponentElement<react.ProviderProps<UseApiModuleReturn<TActions, TExtra> | null>>;
|
|
49
|
+
useContext: () => UseApiModuleReturn<TActions, TExtra>;
|
|
60
50
|
};
|
|
61
51
|
|
|
62
|
-
export { ApiModuleProvider, createApiModuleContext, useApi, useApiModule, useApiRecord, useDeepCompareEffect
|
|
52
|
+
export { ApiModuleProvider, createApiModuleContext, useApi, useApiModule, useApiRecord, useDeepCompareEffect };
|
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, M as ModuleStates, d as ModuleActions, e as UseApiQuery
|
|
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-0YqoHN1K.js';
|
|
3
|
+
import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-Q5Ux9P1x.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
|
|
@@ -25,12 +25,11 @@ declare function useDeepCompareEffect(callback: EffectCallback, dependencies: De
|
|
|
25
25
|
declare const ApiModuleProvider: react.Provider<{
|
|
26
26
|
states: ModuleStates<any>;
|
|
27
27
|
actions: ModuleActions<any>;
|
|
28
|
-
queries: {
|
|
28
|
+
queries: Partial<{
|
|
29
29
|
[x: string]: UseApiQuery;
|
|
30
|
-
}
|
|
30
|
+
}>;
|
|
31
31
|
dehydrate: () => string;
|
|
32
32
|
} | null>;
|
|
33
|
-
declare function useModuleContext<TModule extends ApiModuleConfig<any>, TExtra = {}>(): UseApiModuleReturn<TModule['actions'], TExtra>;
|
|
34
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>;
|
|
35
34
|
|
|
36
35
|
/**
|
|
@@ -38,25 +37,16 @@ declare function useApiModule<TActions extends Record<string, ActionConfigModule
|
|
|
38
37
|
* This pattern avoids the need for manual type assertions in consuming components.
|
|
39
38
|
*
|
|
40
39
|
* @template TActions - The shape of the actions in the API module.
|
|
40
|
+
* @template TExtra - The shape of any extra data passed via `extraContextData`.
|
|
41
41
|
* @returns An object containing the typed Context, Provider, and a `useContext` hook.
|
|
42
42
|
*/
|
|
43
|
-
declare function createApiModuleContext<TActions extends Record<string, any
|
|
44
|
-
Context: react.Context<
|
|
45
|
-
states: ModuleStates<TActions>;
|
|
46
|
-
actions: ModuleActions<TActions>;
|
|
47
|
-
queries: { [K in ActionsWithQuery<TActions>]: UseApiQuery; };
|
|
48
|
-
dehydrate: () => string;
|
|
49
|
-
} | null>;
|
|
43
|
+
declare function createApiModuleContext<TActions extends Record<string, any>, TExtra extends object = {}>(): {
|
|
44
|
+
Context: react.Context<UseApiModuleReturn<TActions, TExtra> | null>;
|
|
50
45
|
Provider: ({ value, children }: {
|
|
51
|
-
value: UseApiModuleReturn<TActions>;
|
|
46
|
+
value: UseApiModuleReturn<TActions, TExtra>;
|
|
52
47
|
children: ReactNode;
|
|
53
|
-
}) => react.FunctionComponentElement<react.ProviderProps<
|
|
54
|
-
|
|
55
|
-
actions: ModuleActions<TActions>;
|
|
56
|
-
queries: { [K in ActionsWithQuery<TActions>]: UseApiQuery; };
|
|
57
|
-
dehydrate: () => string;
|
|
58
|
-
} | null>>;
|
|
59
|
-
useContext: () => UseApiModuleReturn<TActions>;
|
|
48
|
+
}) => react.FunctionComponentElement<react.ProviderProps<UseApiModuleReturn<TActions, TExtra> | null>>;
|
|
49
|
+
useContext: () => UseApiModuleReturn<TActions, TExtra>;
|
|
60
50
|
};
|
|
61
51
|
|
|
62
|
-
export { ApiModuleProvider, createApiModuleContext, useApi, useApiModule, useApiRecord, useDeepCompareEffect
|
|
52
|
+
export { ApiModuleProvider, createApiModuleContext, useApi, useApiModule, useApiRecord, useDeepCompareEffect };
|
package/dist/client.js
CHANGED
|
@@ -271,7 +271,7 @@ function useDeepCompareEffect(callback, dependencies) {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
// src/hooks/useApiModule/useApiModule.ts
|
|
274
|
-
import { createContext, useCallback as useCallback3,
|
|
274
|
+
import { createContext, useCallback as useCallback3, useEffect as useEffect4, useMemo as useMemo3, useRef as useRef4, useState as useState3, useSyncExternalStore } from "react";
|
|
275
275
|
var ApiModuleContext = createContext(null);
|
|
276
276
|
var ApiModuleProvider = ApiModuleContext.Provider;
|
|
277
277
|
var createInitialState = () => ({
|
|
@@ -317,13 +317,6 @@ function useApiActionState(actionConfig, cacheKey, execute, input, enabled) {
|
|
|
317
317
|
}, [cacheKey, enabled, state.isStale, state.loading, state.called, actionConfig.autoFetch, refetch]);
|
|
318
318
|
return state;
|
|
319
319
|
}
|
|
320
|
-
function useModuleContext() {
|
|
321
|
-
const context = useContext(ApiModuleContext);
|
|
322
|
-
if (!context) {
|
|
323
|
-
throw new Error("useModuleContext must be used within an ApiModuleProvider");
|
|
324
|
-
}
|
|
325
|
-
return context;
|
|
326
|
-
}
|
|
327
320
|
function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
328
321
|
const {
|
|
329
322
|
refetchOnWindowFocus = true,
|
|
@@ -527,6 +520,7 @@ function useApiModule(axiosInstance, moduleConfig, options = {}) {
|
|
|
527
520
|
import { createContext as createContext2, useContext as useContext2, createElement } from "react";
|
|
528
521
|
function createApiModuleContext() {
|
|
529
522
|
const Context = createContext2(null);
|
|
523
|
+
Context.displayName = "ApiModuleContext";
|
|
530
524
|
const Provider = ({ value, children }) => {
|
|
531
525
|
return createElement(Context.Provider, { value }, children);
|
|
532
526
|
};
|
|
@@ -549,6 +543,5 @@ export {
|
|
|
549
543
|
useApi,
|
|
550
544
|
useApiModule,
|
|
551
545
|
useApiRecord,
|
|
552
|
-
useDeepCompareEffect
|
|
553
|
-
useModuleContext
|
|
546
|
+
useDeepCompareEffect
|
|
554
547
|
};
|
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-0YqoHN1K.cjs';
|
|
3
|
+
export { n as ActionConfig, u as ActionMethods, p as ActionState, r as ActionsWithQuery, a as ApiModuleConfig, E as ExecutableAction, q as ExecuteOptions, I as InputOf, l as Middleware, k as MiddlewareContext, d as ModuleActions, s as ModuleQueries, 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-0YqoHN1K.cjs';
|
|
4
|
+
export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-CdbyfLNG.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-0YqoHN1K.js';
|
|
3
|
+
export { n as ActionConfig, u as ActionMethods, p as ActionState, r as ActionsWithQuery, a as ApiModuleConfig, E as ExecutableAction, q as ExecuteOptions, I as InputOf, l as Middleware, k as MiddlewareContext, d as ModuleActions, s as ModuleQueries, 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-0YqoHN1K.js';
|
|
4
|
+
export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-Q5Ux9P1x.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-0YqoHN1K.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-0YqoHN1K.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-0YqoHN1K.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-0YqoHN1K.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents the internal state of the `useApiRecord` hook.
|