ingeniuscliq-core 0.4.10 → 0.4.11

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
@@ -2570,6 +2570,7 @@ class v4 {
2570
2570
  productDetails: null,
2571
2571
  products: null,
2572
2572
  categories: null,
2573
+ bestSellers: null,
2573
2574
  loading: !1,
2574
2575
  error: null
2575
2576
  });
@@ -2627,9 +2628,9 @@ class v4 {
2627
2628
  try {
2628
2629
  t({ loading: !0, error: null });
2629
2630
  const i = await this.productService.bestSellers(r);
2630
- return t({ loading: !1 }), o(i), i.data;
2631
+ return t({ loading: !1, bestSellers: i.data.data }), o(i), i.data;
2631
2632
  } catch (i) {
2632
- throw t((c) => ({ ...c, error: i, loading: !1 })), a(i), i;
2633
+ throw t((c) => ({ ...c, error: i, loading: !1, bestSellers: null })), a(i), i;
2633
2634
  } finally {
2634
2635
  s();
2635
2636
  }
@@ -4,7 +4,7 @@ import { CoreProduct, CoreProductStore } from '../types/CoreProduct';
4
4
  import { CoreProductCategory } from '../types';
5
5
  export declare class CoreProductBuilder<T extends CoreProduct, K extends CoreProductCategory> implements CoreBuilder {
6
6
  protected productService: CoreProductBaseService;
7
- protected initialState: Pick<CoreProductStore<T, K>, "productDetails" | "products" | "categories" | "loading" | "error">;
7
+ protected initialState: Pick<CoreProductStore<T, K>, "productDetails" | "products" | "categories" | "bestSellers" | "loading" | "error">;
8
8
  constructor(service?: CoreProductBaseService, initialState?: any);
9
9
  build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreProductStore<T, K>>, "persist"> & {
10
10
  persist: {
@@ -26,6 +26,7 @@ export interface CoreProductStore<T extends CoreProduct, K extends CoreProductCa
26
26
  productDetails: T | null;
27
27
  products: BasePagination<T> | null;
28
28
  categories: K[] | null;
29
+ bestSellers: T[] | null;
29
30
  setProducts: (products: BasePagination<T> | null) => void;
30
31
  setCategories: (categories: K[]) => void;
31
32
  setProductDetails: (product: T | null) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",