api-core-lib 12.2.0 → 12.4.0

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
@@ -260,7 +260,7 @@ type UseApiState<T> = StandardResponse<T>;
260
260
  * @template T The type of the data entity being managed.
261
261
  */
262
262
  interface UseApiActions<T, TListItem = T extends (infer U)[] ? U : T> {
263
- fetch: () => Promise<void>;
263
+ fetch: (querryOptions?: QueryOptions) => Promise<void>;
264
264
  create: (newItem: Partial<TListItem>, options?: ActionOptions) => Promise<StandardResponse<TListItem>>;
265
265
  put: (id: string | number, item: TListItem, options?: ActionOptions) => Promise<StandardResponse<TListItem>>;
266
266
  update: (id: string | number, updatedItem: Partial<TListItem>, options?: ActionOptions) => Promise<StandardResponse<TListItem>>;
@@ -323,6 +323,7 @@ interface UseApiModuleOptions {
323
323
  staleTime?: number;
324
324
  cacheTime?: number;
325
325
  refetchOnWindowFocus?: boolean;
326
+ pathParams?: Record<string, any>;
326
327
  }
327
328
  interface ActionState<TOutput> {
328
329
  data: TOutput | null;
@@ -330,6 +331,7 @@ interface ActionState<TOutput> {
330
331
  loading: boolean;
331
332
  success: boolean;
332
333
  called: boolean;
334
+ response: StandardResponse<TOutput> | null;
333
335
  }
334
336
  /**
335
337
  * The unified object for a single action, containing its state, executor, and controls.
package/dist/index.d.ts CHANGED
@@ -260,7 +260,7 @@ type UseApiState<T> = StandardResponse<T>;
260
260
  * @template T The type of the data entity being managed.
261
261
  */
262
262
  interface UseApiActions<T, TListItem = T extends (infer U)[] ? U : T> {
263
- fetch: () => Promise<void>;
263
+ fetch: (querryOptions?: QueryOptions) => Promise<void>;
264
264
  create: (newItem: Partial<TListItem>, options?: ActionOptions) => Promise<StandardResponse<TListItem>>;
265
265
  put: (id: string | number, item: TListItem, options?: ActionOptions) => Promise<StandardResponse<TListItem>>;
266
266
  update: (id: string | number, updatedItem: Partial<TListItem>, options?: ActionOptions) => Promise<StandardResponse<TListItem>>;
@@ -323,6 +323,7 @@ interface UseApiModuleOptions {
323
323
  staleTime?: number;
324
324
  cacheTime?: number;
325
325
  refetchOnWindowFocus?: boolean;
326
+ pathParams?: Record<string, any>;
326
327
  }
327
328
  interface ActionState<TOutput> {
328
329
  data: TOutput | null;
@@ -330,6 +331,7 @@ interface ActionState<TOutput> {
330
331
  loading: boolean;
331
332
  success: boolean;
332
333
  called: boolean;
334
+ response: StandardResponse<TOutput> | null;
333
335
  }
334
336
  /**
335
337
  * The unified object for a single action, containing its state, executor, and controls.