ingeniuscliq-core 0.2.57 → 0.2.59

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.js CHANGED
@@ -2376,7 +2376,8 @@ class q5 {
2376
2376
  name: "product-storage",
2377
2377
  partialize: (t) => ({
2378
2378
  productDetails: t.productDetails,
2379
- products: t.products
2379
+ products: t.products,
2380
+ categories: t.categories
2380
2381
  })
2381
2382
  }
2382
2383
  )
@@ -11,6 +11,7 @@ export declare class CoreProductBuilder implements CoreBuilder {
11
11
  setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreProductStore<CoreProduct, CoreProductCategory>, {
12
12
  productDetails: CoreProduct | null;
13
13
  products: import('../../..').BasePagination<CoreProduct> | null;
14
+ categories: CoreProductCategory[] | null;
14
15
  }>>) => void;
15
16
  clearStorage: () => void;
16
17
  rehydrate: () => Promise<void> | void;
@@ -20,6 +21,7 @@ export declare class CoreProductBuilder implements CoreBuilder {
20
21
  getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreProductStore<CoreProduct, CoreProductCategory>, {
21
22
  productDetails: CoreProduct | null;
22
23
  products: import('../../..').BasePagination<CoreProduct> | null;
24
+ categories: CoreProductCategory[] | null;
23
25
  }>>;
24
26
  };
25
27
  }>;
@@ -24,14 +24,14 @@ export interface CoreProduct extends BaseType, BaseSlugType, BaseImagesType, Bas
24
24
  export interface CoreProductStore<T extends CoreProduct, K extends CoreProductCategory> extends BaseStore {
25
25
  productDetails: T | null;
26
26
  products: BasePagination<T> | null;
27
- categories: BasePagination<K> | null;
27
+ categories: K[] | null;
28
28
  setProducts: (products: BasePagination<T> | null) => void;
29
- setCategories: (categories: BasePagination<K> | null) => void;
29
+ setCategories: (categories: K[]) => void;
30
30
  setProductDetails: (product: T | null) => void;
31
31
  fetchProducts: (params?: Record<string, any>) => Promise<BaseApiResponsePagination<T>>;
32
32
  getProducts: () => BasePagination<T> | null;
33
33
  fetchProductDetails: (id: string | number) => Promise<BaseApiResponse<T>>;
34
34
  getProductDetails: () => T | null;
35
- fetchCategories: (params?: Record<string, any>) => Promise<BaseApiResponsePagination<K>>;
36
- getCategories: () => BasePagination<K> | null;
35
+ fetchCategories: (params?: Record<string, any>) => Promise<BaseApiResponse<K[]>>;
36
+ getCategories: () => K[] | null;
37
37
  }
@@ -1,10 +1,9 @@
1
1
  import { BaseType } from '../../../types/BaseType';
2
2
  export interface CoreProductCategory extends BaseType {
3
3
  name: string;
4
+ parent: string | number;
5
+ children: CoreProductCategory[];
4
6
  }
5
7
  export interface HasProductCategories {
6
8
  categories?: CoreProductCategory[];
7
9
  }
8
- export interface HasProbablyProductCategories {
9
- categories?: CoreProductCategory[];
10
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.2.57",
3
+ "version": "0.2.59",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",