api-core-lib 12.0.95 → 12.0.96
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-CJcNd7lV.d.cts → apiModule.types-BdtTSLfS.d.cts} +7 -9
- package/dist/{apiModule.types-CJcNd7lV.d.ts → apiModule.types-BdtTSLfS.d.ts} +7 -9
- package/dist/client.d.cts +3 -3
- package/dist/client.d.ts +3 -3
- 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-50_aWEIS.d.cts → useApiRecord.types-1j78RjW0.d.cts} +1 -1
- package/dist/{useApiRecord.types-Cw9vEZLd.d.ts → useApiRecord.types-CTHi8FbV.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -263,20 +263,18 @@ type ActionsWithQuery<TActions extends Record<string, ActionConfigModule<any, an
|
|
|
263
263
|
hasQuery: true;
|
|
264
264
|
} ? K : never;
|
|
265
265
|
}[keyof TActions];
|
|
266
|
-
/**
|
|
267
|
-
* يُنشئ نوعًا لكائن `queries` يحتوي فقط على الإجراءات التي تقبل الكويري.
|
|
268
|
-
* هذا هو الإصلاح الأبسط والأكثر مباشرة.
|
|
269
|
-
*/
|
|
270
|
-
type ModuleQueries<TActions extends Record<string, ActionConfigModule<any, any>>> = {
|
|
271
|
-
[K in ActionsWithQuery<TActions>]: UseApiQuery;
|
|
272
|
-
};
|
|
273
266
|
/**
|
|
274
267
|
* @description The complete, fully-typed return object of the `useApiModule` hook.
|
|
275
268
|
*/
|
|
276
269
|
type UseApiModuleReturn<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}> = {
|
|
277
270
|
states: ModuleStates<TActions>;
|
|
278
271
|
actions: ModuleActions<TActions>;
|
|
279
|
-
|
|
272
|
+
/**
|
|
273
|
+
* ✅ الحل النهائي: نستخدم `Record` لتعريف الكائن بشكل صريح.
|
|
274
|
+
* المفاتيح (Keys) هي فقط تلك الموجودة في `ActionsWithQuery`.
|
|
275
|
+
* القيم (Values) هي `UseApiQuery`.
|
|
276
|
+
*/
|
|
277
|
+
queries: Record<ActionsWithQuery<TActions>, UseApiQuery>;
|
|
280
278
|
dehydrate: () => string;
|
|
281
279
|
} & TExtra;
|
|
282
280
|
/**
|
|
@@ -297,4 +295,4 @@ type ActionMethods<TAction extends ActionConfigModule<any, any>> = {
|
|
|
297
295
|
}) => void;
|
|
298
296
|
};
|
|
299
297
|
|
|
300
|
-
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,
|
|
298
|
+
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, ActionMethods as s, t };
|
|
@@ -263,20 +263,18 @@ type ActionsWithQuery<TActions extends Record<string, ActionConfigModule<any, an
|
|
|
263
263
|
hasQuery: true;
|
|
264
264
|
} ? K : never;
|
|
265
265
|
}[keyof TActions];
|
|
266
|
-
/**
|
|
267
|
-
* يُنشئ نوعًا لكائن `queries` يحتوي فقط على الإجراءات التي تقبل الكويري.
|
|
268
|
-
* هذا هو الإصلاح الأبسط والأكثر مباشرة.
|
|
269
|
-
*/
|
|
270
|
-
type ModuleQueries<TActions extends Record<string, ActionConfigModule<any, any>>> = {
|
|
271
|
-
[K in ActionsWithQuery<TActions>]: UseApiQuery;
|
|
272
|
-
};
|
|
273
266
|
/**
|
|
274
267
|
* @description The complete, fully-typed return object of the `useApiModule` hook.
|
|
275
268
|
*/
|
|
276
269
|
type UseApiModuleReturn<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}> = {
|
|
277
270
|
states: ModuleStates<TActions>;
|
|
278
271
|
actions: ModuleActions<TActions>;
|
|
279
|
-
|
|
272
|
+
/**
|
|
273
|
+
* ✅ الحل النهائي: نستخدم `Record` لتعريف الكائن بشكل صريح.
|
|
274
|
+
* المفاتيح (Keys) هي فقط تلك الموجودة في `ActionsWithQuery`.
|
|
275
|
+
* القيم (Values) هي `UseApiQuery`.
|
|
276
|
+
*/
|
|
277
|
+
queries: Record<ActionsWithQuery<TActions>, UseApiQuery>;
|
|
280
278
|
dehydrate: () => string;
|
|
281
279
|
} & TExtra;
|
|
282
280
|
/**
|
|
@@ -297,4 +295,4 @@ type ActionMethods<TAction extends ActionConfigModule<any, any>> = {
|
|
|
297
295
|
}) => void;
|
|
298
296
|
};
|
|
299
297
|
|
|
300
|
-
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,
|
|
298
|
+
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, ActionMethods as s, t };
|
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
|
|
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-BdtTSLfS.cjs';
|
|
3
|
+
import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-1j78RjW0.cjs';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ 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: Record<string, UseApiQuery>;
|
|
29
29
|
dehydrate: () => string;
|
|
30
30
|
} | null>;
|
|
31
31
|
declare function useApiModule<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}>(axiosInstance: AxiosInstance, moduleConfig: ApiModuleConfig<TActions>, options?: UseApiModuleOptions<TExtra>): UseApiModuleReturn<TActions, TExtra>;
|
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
|
|
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-BdtTSLfS.js';
|
|
3
|
+
import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-CTHi8FbV.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ 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: Record<string, UseApiQuery>;
|
|
29
29
|
dehydrate: () => string;
|
|
30
30
|
} | null>;
|
|
31
31
|
declare function useApiModule<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}>(axiosInstance: AxiosInstance, moduleConfig: ApiModuleConfig<TActions>, options?: UseApiModuleOptions<TExtra>): UseApiModuleReturn<TActions, TExtra>;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosRequestConfig, Method, AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
import { f as ApiClientConfig, A as ActionConfigModule, S as StandardResponse, g as ActionOptions, R as RequestConfig, h as ActionStateModule, Q as QueryOptions,
|
|
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-BdtTSLfS.cjs';
|
|
3
|
+
export { n as ActionConfig, s 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, 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-BdtTSLfS.cjs';
|
|
4
|
+
export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-1j78RjW0.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 { f as ApiClientConfig, A as ActionConfigModule, S as StandardResponse, g as ActionOptions, R as RequestConfig, h as ActionStateModule, Q as QueryOptions,
|
|
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-BdtTSLfS.js';
|
|
3
|
+
export { n as ActionConfig, s 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, 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-BdtTSLfS.js';
|
|
4
|
+
export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-CTHi8FbV.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-BdtTSLfS.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-BdtTSLfS.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-BdtTSLfS.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-BdtTSLfS.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents the internal state of the `useApiRecord` hook.
|