ingeniuscliq-core 0.3.47 → 0.3.48

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
@@ -2384,13 +2384,18 @@ class X5 {
2384
2384
  setLoading: (r) => t({ loading: r }),
2385
2385
  setError: (r) => t({ error: r }),
2386
2386
  getPayForms: () => n().payForms,
2387
- fetchPayForms: async (r) => {
2387
+ fetchPayForms: async (r, { onSuccess: o = () => {
2388
+ }, onError: a = () => {
2389
+ }, onFinish: s = () => {
2390
+ } } = {}) => {
2388
2391
  try {
2389
2392
  t({ loading: !0, error: null });
2390
- const o = await this.payFormService.getAll(r);
2391
- return t({ payForms: o.data.data, loading: !1 }), o.data.data;
2392
- } catch (o) {
2393
- throw t((a) => ({ ...a, error: o, loading: !1 })), o;
2393
+ const i = await this.payFormService.getAll(r);
2394
+ return t({ payForms: i.data.data, loading: !1 }), o(i.data.data), i.data.data;
2395
+ } catch (i) {
2396
+ throw t((c) => ({ ...c, error: i, loading: !1 })), a(i), i;
2397
+ } finally {
2398
+ s();
2394
2399
  }
2395
2400
  },
2396
2401
  reset: () => t(this.initialState)
@@ -1,3 +1,4 @@
1
+ import { CoreActions } from '../../../types';
1
2
  import { BaseStore } from '../../../types/BaseStore';
2
3
  import { BaseType } from '../../../types/BaseType';
3
4
  /**
@@ -13,5 +14,5 @@ export interface CorePayFormStore<T extends CorePayForm> extends BaseStore {
13
14
  payForms: T[] | null;
14
15
  setPayForms: (payForms: T[] | null) => void;
15
16
  getPayForms: () => T[] | null;
16
- fetchPayForms: (params?: Record<string, any>) => Promise<T[]>;
17
+ fetchPayForms: (params?: Record<string, any>, actions?: CoreActions) => Promise<T[]>;
17
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.3.47",
3
+ "version": "0.3.48",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",