api-core-lib 12.0.87 → 12.0.89

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.
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig, AxiosProgressEvent, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
2
- import React__default from 'react';
2
+ import react__default from 'react';
3
3
 
4
4
  /**
5
5
  * يمثل معلومات الترقيم (Pagination) التي قد تعود من ה-API.
@@ -156,7 +156,7 @@ interface UseApiQuery {
156
156
  /** The current query options state. */
157
157
  options: QueryOptions;
158
158
  /** A function to set the entire query options object at once. */
159
- setOptions: React__default.Dispatch<React__default.SetStateAction<QueryOptions>>;
159
+ setOptions: react__default.Dispatch<react__default.SetStateAction<QueryOptions>>;
160
160
  /** Sets the current page number. */
161
161
  setPage: (page: number) => void;
162
162
  /** Sets the number of items per page and resets to the first page. */
@@ -287,4 +287,4 @@ type ActionMethods<TAction extends ActionConfigModule<any, any>> = {
287
287
  }) => void;
288
288
  };
289
289
 
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, 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 };
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, ActionsWithQuery as f, ApiClientConfig as g, ActionOptions as h, ActionStateModule as i, ApiError as j, TokenManager as k, MiddlewareContext as l, Middleware as m, RefreshTokenConfig as n, ActionConfig as o, UseApiState as p, ActionState as q, ExecuteOptions as r, ActionMethods as s, t };
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig, AxiosProgressEvent, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
2
- import React__default from 'react';
2
+ import react__default from 'react';
3
3
 
4
4
  /**
5
5
  * يمثل معلومات الترقيم (Pagination) التي قد تعود من ה-API.
@@ -156,7 +156,7 @@ interface UseApiQuery {
156
156
  /** The current query options state. */
157
157
  options: QueryOptions;
158
158
  /** A function to set the entire query options object at once. */
159
- setOptions: React__default.Dispatch<React__default.SetStateAction<QueryOptions>>;
159
+ setOptions: react__default.Dispatch<react__default.SetStateAction<QueryOptions>>;
160
160
  /** Sets the current page number. */
161
161
  setPage: (page: number) => void;
162
162
  /** Sets the number of items per page and resets to the first page. */
@@ -287,4 +287,4 @@ type ActionMethods<TAction extends ActionConfigModule<any, any>> = {
287
287
  }) => void;
288
288
  };
289
289
 
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, 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 };
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, ActionsWithQuery as f, ApiClientConfig as g, ActionOptions as h, ActionStateModule as i, ApiError as j, TokenManager as k, MiddlewareContext as l, Middleware as m, RefreshTokenConfig as n, ActionConfig as o, UseApiState as p, ActionState as q, ExecuteOptions as r, ActionMethods as s, t };
package/dist/cli.cjs CHANGED
@@ -328,7 +328,7 @@ async function generateModuleFiles(module2, allSchemas, allEnums, outputDir) {
328
328
  const createdFileExports = ["config"];
329
329
  let configContent = `// This file is auto-generated. Do not edit directly.
330
330
 
331
- import type { ApiModuleConfig, ActionConfigModule } from 'api-core-lib';
331
+ import type { ApiModuleConfig, ActionConfigModule, QueryOptions } from 'api-core-lib';
332
332
  `;
333
333
  if (schemasToImport.length > 0) configContent += `import type { ${schemasToImport.join(", ")} } from './types';
334
334
  `;
@@ -453,20 +453,113 @@ import type { ${schemasToImport.join(", ")} } from './types';
453
453
  console.log(import_chalk.default.gray(` \u2713 index.ts (Initial)`));
454
454
  const moduleBaseName = module2.moduleName.replace(/Api$/, "");
455
455
  const camelCaseModuleName = toCamelCase(moduleBaseName);
456
- const allPathParams = /* @__PURE__ */ new Set();
457
- Object.values(module2.actions).forEach((action) => action.pathParams.forEach((param) => allPathParams.add(param)));
458
- const pathParamsType = allPathParams.size > 0 ? `{ ${[...allPathParams].map((p) => `${p}?: string | number`).join("; ")} }` : "Record<string, never>";
456
+ let endpointsContent = `// This file is auto-generated. Do not edit directly.
457
+
458
+ `;
459
+ endpointsContent += `import type { QueryOptions } from 'api-core-lib';
460
+ `;
461
+ const endpointTypesToImport = /* @__PURE__ */ new Set();
462
+ Object.values(module2.actions).forEach((action) => {
463
+ if (action.inputType !== "undefined" && action.inputType !== "QueryOptions" && !BUILT_IN_TYPES.has(action.inputType)) {
464
+ endpointTypesToImport.add(action.inputType);
465
+ }
466
+ });
467
+ if (endpointTypesToImport.size > 0) {
468
+ endpointsContent += `import type { ${[...endpointTypesToImport].join(", ")} } from './types';
469
+
470
+ `;
471
+ }
472
+ endpointsContent += `export const ${camelCaseModuleName}Endpoints = {
473
+ `;
474
+ for (const action of Object.values(module2.actions)) {
475
+ const params = [];
476
+ if (action.pathParams.length > 0) {
477
+ params.push(`params: { ${action.pathParams.map((p) => `${p}: string | number`).join("; ")} }`);
478
+ }
479
+ if (action.inputType !== "undefined" && action.inputType !== "QueryOptions") {
480
+ params.push(`body: ${action.inputType}`);
481
+ }
482
+ if (action.hasQuery) {
483
+ params.push(`query?: QueryOptions`);
484
+ }
485
+ endpointsContent += ` /**
486
+ * ${action.method} ${module2.baseEndpoint}${action.path}
487
+ * ${action.description}
488
+ */
489
+ `;
490
+ endpointsContent += ` ${action.name}: (${params.join(", ")}) => ({
491
+ `;
492
+ endpointsContent += ` action: '${action.name}' as const,
493
+ `;
494
+ if (action.pathParams.length > 0) endpointsContent += ` pathParams: params,
495
+ `;
496
+ if (action.inputType !== "undefined" && action.inputType !== "QueryOptions") endpointsContent += ` input: body,
497
+ `;
498
+ else if (action.hasQuery) endpointsContent += ` input: query,
499
+ `;
500
+ endpointsContent += ` }),
501
+
502
+ `;
503
+ }
504
+ endpointsContent += `};
505
+ `;
506
+ import_fs.default.writeFileSync(import_path.default.join(moduleOutputPath, `${camelCaseModuleName}.endpoints.ts`), endpointsContent.trim());
459
507
  console.log(import_chalk.default.gray(` \u2713 ${camelCaseModuleName}.endpoints.ts (Type-Safe Endpoints)`));
460
- console.log(import_chalk.default.gray(` \u2713 use${moduleBaseName}.ts (Custom Hook)`));
461
- const providerFileName = `${moduleBaseName}.provider.tsx`;
462
- console.log(import_chalk.default.gray(` \u2713 ${providerFileName} (React Provider)`));
508
+ const contextFileContent = `// This file is auto-generated. Do not edit directly.
509
+ 'use client';
510
+
511
+ import React from 'react';
512
+ import { createApiModuleContext, useApiModule, UseApiModuleOptions } from 'api-core-lib/client';
513
+ import { apiClient } from '@/lib/api-core/clientApi'; // Assuming a fixed path
514
+ import { ${module2.moduleName}, ${module2.moduleName} as TModuleType } from './config';
515
+
516
+ // 1. Create the strongly-typed context, provider, and consumer hook
517
+ const {
518
+ Provider,
519
+ useContext: use${moduleBaseName}Context
520
+ } = createApiModuleContext<typeof TModuleType['actions']>();
521
+
522
+ export { use${moduleBaseName}Context };
523
+
524
+ // 2. Create a custom Provider that encapsulates the useApiModule logic
525
+ type Options = Parameters<typeof useApiModule>[2];
526
+
527
+ interface ${moduleBaseName}ProviderProps {
528
+ children: React.ReactNode;
529
+ options?: Options;
530
+ }
531
+
532
+ /**
533
+ * A dedicated React Provider that initializes and provides the ${moduleBaseName} API context.
534
+ */
535
+ export function ${moduleBaseName}Provider({ children, options = {} }: ${moduleBaseName}ProviderProps) {
536
+ const api = useApiModule(apiClient, ${module2.moduleName}, options);
537
+ return <Provider value={api}>{children}</Provider>;
538
+ }
539
+ `;
540
+ const contextFileName = `${camelCaseModuleName}.context.tsx`;
541
+ import_fs.default.writeFileSync(import_path.default.join(moduleOutputPath, contextFileName), contextFileContent.trim());
542
+ console.log(import_chalk.default.gray(` \u2713 ${contextFileName} (Strongly-Typed Context & Provider)`));
543
+ const serverContent = `// This file is auto-generated. For server-side use only.
544
+
545
+ import { createServerApi } from 'api-core-lib/server';
546
+ import { serverApiClient } from '@/lib/api-core/serverApi'; // Assuming a fixed path
547
+ import { ${module2.moduleName} } from './config';
548
+
549
+ /**
550
+ * Creates a server-side instance of the ${moduleBaseName} API for pre-fetching data in RSC.
551
+ */
552
+ export const create${moduleBaseName}ServerApi = () => {
553
+ return createServerApi(serverApiClient, ${module2.moduleName});
554
+ };
555
+ `;
556
+ import_fs.default.writeFileSync(import_path.default.join(moduleOutputPath, `${camelCaseModuleName}.server.ts`), serverContent.trim());
463
557
  console.log(import_chalk.default.gray(` \u2713 ${camelCaseModuleName}.server.ts (Server-Side Helper)`));
464
558
  const newExports = [
465
559
  `
466
560
  // Generated API helpers`,
467
561
  `export * from './${camelCaseModuleName}.endpoints';`,
468
- `export * from './use${moduleBaseName}';`,
469
- `export * from './${moduleBaseName}.provider';`,
562
+ `export * from './${camelCaseModuleName}.context';`,
470
563
  `export * from './${camelCaseModuleName}.server';`
471
564
  ].join("\n");
472
565
  import_fs.default.appendFileSync(indexFilePath, newExports);
package/dist/client.cjs CHANGED
@@ -523,10 +523,32 @@ function useApiModule(axiosInstance, moduleConfig, options = {}) {
523
523
  return finalApiReturn;
524
524
  }
525
525
 
526
+ // src/hooks/useApiModule/apiModuleContext.ts
527
+
528
+ function createApiModuleContext() {
529
+ const Context = _react.createContext.call(void 0, null);
530
+ const Provider = ({ value, children }) => {
531
+ return _react.createElement.call(void 0, Context.Provider, { value }, children);
532
+ };
533
+ const useConsumer = () => {
534
+ const context = _react.useContext.call(void 0, Context);
535
+ if (!context) {
536
+ throw new Error("This component must be used within its corresponding ApiModuleProvider.");
537
+ }
538
+ return context;
539
+ };
540
+ return {
541
+ Context,
542
+ Provider,
543
+ useContext: useConsumer
544
+ };
545
+ }
546
+
547
+
526
548
 
527
549
 
528
550
 
529
551
 
530
552
 
531
553
 
532
- exports.ApiModuleProvider = ApiModuleProvider; exports.useApi = useApi; exports.useApiModule = useApiModule; exports.useApiRecord = useApiRecord; exports.useDeepCompareEffect = useDeepCompareEffect; exports.useModuleContext = useModuleContext;
554
+ exports.ApiModuleProvider = ApiModuleProvider; exports.createApiModuleContext = createApiModuleContext; exports.useApi = useApi; exports.useApiModule = useApiModule; exports.useApiRecord = useApiRecord; exports.useDeepCompareEffect = useDeepCompareEffect; exports.useModuleContext = useModuleContext;
package/dist/client.d.cts CHANGED
@@ -1,7 +1,8 @@
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 } from './apiModule.types-Bn0tJF7b.cjs';
3
- import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-NZtPRga3.cjs';
4
- import * as React from 'react';
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, f as ActionsWithQuery } from './apiModule.types-CZX-M2Ub.cjs';
3
+ import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-Cq9AlZX2.cjs';
4
+ import * as react from 'react';
5
+ import { ReactNode } from 'react';
5
6
 
6
7
  declare function useApi<T>(axiosInstance: AxiosInstance, config: UseApiConfig<T>): any;
7
8
 
@@ -21,7 +22,7 @@ type EffectCallback = () => (void | (() => void));
21
22
  type DependencyList = readonly any[];
22
23
  declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): void;
23
24
 
24
- declare const ApiModuleProvider: React.Provider<{
25
+ declare const ApiModuleProvider: react.Provider<{
25
26
  states: ModuleStates<any>;
26
27
  actions: ModuleActions<any>;
27
28
  queries: {
@@ -32,4 +33,30 @@ declare const ApiModuleProvider: React.Provider<{
32
33
  declare function useModuleContext<TModule extends ApiModuleConfig<any>, TExtra = {}>(): UseApiModuleReturn<TModule['actions'], TExtra>;
33
34
  declare function useApiModule<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}>(axiosInstance: AxiosInstance, moduleConfig: ApiModuleConfig<TActions>, options?: UseApiModuleOptions<TExtra>): UseApiModuleReturn<TActions, TExtra>;
34
35
 
35
- export { ApiModuleProvider, useApi, useApiModule, useApiRecord, useDeepCompareEffect, useModuleContext };
36
+ /**
37
+ * Creates a strongly-typed React Context, Provider, and consumer hook for a specific API module.
38
+ * This pattern avoids the need for manual type assertions in consuming components.
39
+ *
40
+ * @template TActions - The shape of the actions in the API module.
41
+ * @returns An object containing the typed Context, Provider, and a `useContext` hook.
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>;
50
+ Provider: ({ value, children }: {
51
+ value: UseApiModuleReturn<TActions>;
52
+ children: ReactNode;
53
+ }) => react.FunctionComponentElement<react.ProviderProps<{
54
+ states: ModuleStates<TActions>;
55
+ actions: ModuleActions<TActions>;
56
+ queries: { [K in ActionsWithQuery<TActions>]: UseApiQuery; };
57
+ dehydrate: () => string;
58
+ } | null>>;
59
+ useContext: () => UseApiModuleReturn<TActions>;
60
+ };
61
+
62
+ export { ApiModuleProvider, createApiModuleContext, useApi, useApiModule, useApiRecord, useDeepCompareEffect, useModuleContext };
package/dist/client.d.ts CHANGED
@@ -1,7 +1,8 @@
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 } from './apiModule.types-Bn0tJF7b.js';
3
- import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-CWhwCAB6.js';
4
- import * as React from 'react';
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, f as ActionsWithQuery } from './apiModule.types-CZX-M2Ub.js';
3
+ import { U as UseApiRecordConfig, a as UseApiRecordReturn } from './useApiRecord.types-Cye9a7zh.js';
4
+ import * as react from 'react';
5
+ import { ReactNode } from 'react';
5
6
 
6
7
  declare function useApi<T>(axiosInstance: AxiosInstance, config: UseApiConfig<T>): any;
7
8
 
@@ -21,7 +22,7 @@ type EffectCallback = () => (void | (() => void));
21
22
  type DependencyList = readonly any[];
22
23
  declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): void;
23
24
 
24
- declare const ApiModuleProvider: React.Provider<{
25
+ declare const ApiModuleProvider: react.Provider<{
25
26
  states: ModuleStates<any>;
26
27
  actions: ModuleActions<any>;
27
28
  queries: {
@@ -32,4 +33,30 @@ declare const ApiModuleProvider: React.Provider<{
32
33
  declare function useModuleContext<TModule extends ApiModuleConfig<any>, TExtra = {}>(): UseApiModuleReturn<TModule['actions'], TExtra>;
33
34
  declare function useApiModule<TActions extends Record<string, ActionConfigModule<any, any>>, TExtra extends object = {}>(axiosInstance: AxiosInstance, moduleConfig: ApiModuleConfig<TActions>, options?: UseApiModuleOptions<TExtra>): UseApiModuleReturn<TActions, TExtra>;
34
35
 
35
- export { ApiModuleProvider, useApi, useApiModule, useApiRecord, useDeepCompareEffect, useModuleContext };
36
+ /**
37
+ * Creates a strongly-typed React Context, Provider, and consumer hook for a specific API module.
38
+ * This pattern avoids the need for manual type assertions in consuming components.
39
+ *
40
+ * @template TActions - The shape of the actions in the API module.
41
+ * @returns An object containing the typed Context, Provider, and a `useContext` hook.
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>;
50
+ Provider: ({ value, children }: {
51
+ value: UseApiModuleReturn<TActions>;
52
+ children: ReactNode;
53
+ }) => react.FunctionComponentElement<react.ProviderProps<{
54
+ states: ModuleStates<TActions>;
55
+ actions: ModuleActions<TActions>;
56
+ queries: { [K in ActionsWithQuery<TActions>]: UseApiQuery; };
57
+ dehydrate: () => string;
58
+ } | null>>;
59
+ useContext: () => UseApiModuleReturn<TActions>;
60
+ };
61
+
62
+ export { ApiModuleProvider, createApiModuleContext, useApi, useApiModule, useApiRecord, useDeepCompareEffect, useModuleContext };
package/dist/client.js CHANGED
@@ -522,8 +522,30 @@ function useApiModule(axiosInstance, moduleConfig, options = {}) {
522
522
  }), [baseApiReturn, extraContextData]);
523
523
  return finalApiReturn;
524
524
  }
525
+
526
+ // src/hooks/useApiModule/apiModuleContext.ts
527
+ import { createContext as createContext2, useContext as useContext2, createElement } from "react";
528
+ function createApiModuleContext() {
529
+ const Context = createContext2(null);
530
+ const Provider = ({ value, children }) => {
531
+ return createElement(Context.Provider, { value }, children);
532
+ };
533
+ const useConsumer = () => {
534
+ const context = useContext2(Context);
535
+ if (!context) {
536
+ throw new Error("This component must be used within its corresponding ApiModuleProvider.");
537
+ }
538
+ return context;
539
+ };
540
+ return {
541
+ Context,
542
+ Provider,
543
+ useContext: useConsumer
544
+ };
545
+ }
525
546
  export {
526
547
  ApiModuleProvider,
548
+ createApiModuleContext,
527
549
  useApi,
528
550
  useApiModule,
529
551
  useApiRecord,
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, e as UseApiQuery, i as ApiError, L as LogLevel } from './apiModule.types-Bn0tJF7b.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-Bn0tJF7b.cjs';
4
- export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-NZtPRga3.cjs';
2
+ import { g as ApiClientConfig, A as ActionConfigModule, S as StandardResponse, h as ActionOptions, R as RequestConfig, i as ActionStateModule, Q as QueryOptions, e as UseApiQuery, j as ApiError, L as LogLevel } from './apiModule.types-CZX-M2Ub.cjs';
3
+ export { o as ActionConfig, s as ActionMethods, q as ActionState, f as ActionsWithQuery, a as ApiModuleConfig, E as ExecutableAction, r as ExecuteOptions, I as InputOf, m as Middleware, l as MiddlewareContext, d as ModuleActions, M as ModuleStates, O as OutputOf, P as PaginationMeta, n as RefreshTokenConfig, k as TokenManager, T as Tokens, U as UseApiConfig, b as UseApiModuleOptions, c as UseApiModuleReturn, p as UseApiState, V as ValidationError, t } from './apiModule.types-CZX-M2Ub.cjs';
4
+ export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-Cq9AlZX2.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, e as UseApiQuery, i as ApiError, L as LogLevel } from './apiModule.types-Bn0tJF7b.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-Bn0tJF7b.js';
4
- export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-CWhwCAB6.js';
2
+ import { g as ApiClientConfig, A as ActionConfigModule, S as StandardResponse, h as ActionOptions, R as RequestConfig, i as ActionStateModule, Q as QueryOptions, e as UseApiQuery, j as ApiError, L as LogLevel } from './apiModule.types-CZX-M2Ub.js';
3
+ export { o as ActionConfig, s as ActionMethods, q as ActionState, f as ActionsWithQuery, a as ApiModuleConfig, E as ExecutableAction, r as ExecuteOptions, I as InputOf, m as Middleware, l as MiddlewareContext, d as ModuleActions, M as ModuleStates, O as OutputOf, P as PaginationMeta, n as RefreshTokenConfig, k as TokenManager, T as Tokens, U as UseApiConfig, b as UseApiModuleOptions, c as UseApiModuleReturn, p as UseApiState, V as ValidationError, t } from './apiModule.types-CZX-M2Ub.js';
4
+ export { c as UseApiRecordActions, U as UseApiRecordConfig, a as UseApiRecordReturn, b as UseApiRecordState } from './useApiRecord.types-Cye9a7zh.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-Bn0tJF7b.cjs';
2
+ import { A as ActionConfigModule, a as ApiModuleConfig, I as InputOf } from './apiModule.types-CZX-M2Ub.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-Bn0tJF7b.js';
2
+ import { A as ActionConfigModule, a as ApiModuleConfig, I as InputOf } from './apiModule.types-CZX-M2Ub.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, i as ApiError, S as StandardResponse, g as ActionOptions } from './apiModule.types-Bn0tJF7b.cjs';
2
+ import { R as RequestConfig, j as ApiError, S as StandardResponse, h as ActionOptions } from './apiModule.types-CZX-M2Ub.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, i as ApiError, S as StandardResponse, g as ActionOptions } from './apiModule.types-Bn0tJF7b.js';
2
+ import { R as RequestConfig, j as ApiError, S as StandardResponse, h as ActionOptions } from './apiModule.types-CZX-M2Ub.js';
3
3
 
4
4
  /**
5
5
  * Represents the internal state of the `useApiRecord` hook.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-core-lib",
3
- "version": "12.0.87",
3
+ "version": "12.0.89",
4
4
  "description": "A flexible and powerful API client library for modern web applications.",
5
5
  "type": "module",
6
6
  "exports": {