ingeniuscliq-core 0.3.36 → 0.3.37

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
@@ -2607,8 +2607,8 @@ class Jv extends Xn {
2607
2607
  getShippingMethods() {
2608
2608
  return this.api.get(this.apiPrefix + "/shipment/shipping-methods/actives");
2609
2609
  }
2610
- getShippingAddresses() {
2611
- return this.api.get(this.apiPrefix + "/shipment/addresses");
2610
+ getShippingAddresses(t) {
2611
+ return this.api.get(this.apiPrefix + "/shipment/addresses", { params: t });
2612
2612
  }
2613
2613
  addShippingAddress(t) {
2614
2614
  return this.api.post(this.apiPrefix + "/shipment/addresses", t);
@@ -2646,13 +2646,13 @@ class Q5 {
2646
2646
  throw t((o) => ({ ...o, error: r, loading: !1 })), r;
2647
2647
  }
2648
2648
  },
2649
- fetchShippingAddresses: async () => {
2649
+ fetchShippingAddresses: async (r) => {
2650
2650
  try {
2651
2651
  t({ loading: !0, error: null });
2652
- const r = await this.shipmentService.getShippingAddresses();
2653
- return t({ shippingAddresses: r.data.data, loading: !1 }), r.data;
2654
- } catch (r) {
2655
- throw t((o) => ({ ...o, error: r, loading: !1 })), r;
2652
+ const o = await this.shipmentService.getShippingAddresses(r);
2653
+ return t({ shippingAddresses: o.data.data, loading: !1 }), o.data;
2654
+ } catch (o) {
2655
+ throw t((a) => ({ ...a, error: o, loading: !1 })), o;
2656
2656
  }
2657
2657
  },
2658
2658
  addShippingAddress: async (r) => {
@@ -7,7 +7,7 @@ import { BaseApiResponse, BaseApiResponsePagination } from '../../../types';
7
7
  export declare class CoreShipmentBaseService<T extends CoreShippingMethod<Z>, K extends CoreShippingAddress, Z extends CoreShippingMethodTypes> extends BaseService {
8
8
  constructor();
9
9
  getShippingMethods(): Promise<import('axios').AxiosResponse<BaseApiResponse<T[]>, any>>;
10
- getShippingAddresses(): Promise<import('axios').AxiosResponse<BaseApiResponsePagination<K>, any>>;
10
+ getShippingAddresses(params?: Record<string, any>): Promise<import('axios').AxiosResponse<BaseApiResponsePagination<K>, any>>;
11
11
  addShippingAddress<T extends CoreShippingAddressForm>(newAddress: T): Promise<import('axios').AxiosResponse<BaseApiResponse<K>, any>>;
12
12
  updateShippingAddress(addressId: Pick<K, 'id'>, updateAddress: Partial<K>): Promise<import('axios').AxiosResponse<BaseApiResponse<K>, any>>;
13
13
  }
@@ -8,7 +8,7 @@ export interface CoreShipmentStore<T extends CoreShippingMethod<Z>, K extends Co
8
8
  fetchShippingMethods: () => Promise<BaseApiResponse<T[]>>;
9
9
  setShippingAddresses: (shippingAddresses: BasePagination<K> | null) => void;
10
10
  getShippingAddresses: () => BasePagination<K> | null;
11
- fetchShippingAddresses: () => Promise<BaseApiResponsePagination<K>>;
11
+ fetchShippingAddresses: (params?: Record<string, any>) => Promise<BaseApiResponsePagination<K>>;
12
12
  addShippingAddress: (newAddress: K) => void;
13
13
  }
14
14
  export interface CoreShippingMethod<T extends CoreShippingMethodTypes> extends BaseType {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",