ingeniuscliq-core 0.2.46 → 0.2.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 +6 -2
- package/dist/modules/CoreCustomization/services/base.d.ts +2 -1
- package/dist/modules/CoreCustomization/types/CoreCustomization.d.ts +1 -0
- package/dist/modules/CorePayForm/classes/CorePayFormBuilder.d.ts +2 -2
- package/dist/modules/CorePayForm/types/CorePayForm.d.ts +4 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2104,6 +2104,9 @@ class uw extends go {
|
|
|
2104
2104
|
fetchTemplate() {
|
|
2105
2105
|
return this.api.get(this.apiPrefix + "/layout");
|
|
2106
2106
|
}
|
|
2107
|
+
fetchSettings() {
|
|
2108
|
+
return this.api.get(this.apiPrefix + "/store-config");
|
|
2109
|
+
}
|
|
2107
2110
|
}
|
|
2108
2111
|
class dw {
|
|
2109
2112
|
constructor(t = new uw(), n = this.initialState) {
|
|
@@ -2128,6 +2131,7 @@ class dw {
|
|
|
2128
2131
|
getStyles: () => n().styles,
|
|
2129
2132
|
getSettings: () => n().settings,
|
|
2130
2133
|
fetchTemplate: async () => (await this.customizationService.fetchTemplate()).data.data,
|
|
2134
|
+
fetchSettings: async () => (await this.customizationService.fetchSettings()).data.data,
|
|
2131
2135
|
setTemplate: (r) => t({ template: r }),
|
|
2132
2136
|
setComponents: (r) => t({ components: r }),
|
|
2133
2137
|
setStyles: (r) => t({ styles: r }),
|
|
@@ -2293,7 +2297,7 @@ class Y5 {
|
|
|
2293
2297
|
fetchPayForms: async (r) => {
|
|
2294
2298
|
try {
|
|
2295
2299
|
const o = await this.payFormService.getAll(r);
|
|
2296
|
-
return t({ payForms: o.data.data }), o.data;
|
|
2300
|
+
return t({ payForms: o.data.data }), o.data.data;
|
|
2297
2301
|
} catch (o) {
|
|
2298
2302
|
throw t({ error: o }), o;
|
|
2299
2303
|
}
|
|
@@ -2313,7 +2317,7 @@ class Y5 {
|
|
|
2313
2317
|
class Sw extends go {
|
|
2314
2318
|
constructor() {
|
|
2315
2319
|
super("product");
|
|
2316
|
-
ze(this, "getAllCategories", (n) => this.api.get(`${this.apiPrefix}/categories`, { params: n }));
|
|
2320
|
+
ze(this, "getAllCategories", (n) => this.api.get(`${this.apiPrefix}/shop/categories`, { params: n }));
|
|
2317
2321
|
this.setCrudResourceProperty("getAll", "shop/products"), this.setCrudResourceProperty("get", "products");
|
|
2318
2322
|
}
|
|
2319
2323
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { BaseService } from '../../../services/base';
|
|
2
2
|
import { BaseApiResponse } from '../../../types/contracts/BaseApiResponse';
|
|
3
|
-
import { CoreDesignTemplate } from '../../../types/ui/template';
|
|
3
|
+
import { CoreDesignTemplate, CoreDesignTemplateSettings } from '../../../types/ui/template';
|
|
4
4
|
/**
|
|
5
5
|
* Base class that can be extended by concrete services
|
|
6
6
|
*/
|
|
7
7
|
export declare class CoreCustomizationBaseService extends BaseService {
|
|
8
8
|
constructor();
|
|
9
9
|
fetchTemplate(): Promise<import('axios').AxiosResponse<BaseApiResponse<CoreDesignTemplate>, any>>;
|
|
10
|
+
fetchSettings(): Promise<import('axios').AxiosResponse<BaseApiResponse<CoreDesignTemplateSettings>, any>>;
|
|
10
11
|
}
|
|
@@ -18,6 +18,7 @@ export interface CoreCustomizationStore extends BaseStore {
|
|
|
18
18
|
styles: CoreDesignTemplateStyles[] | null;
|
|
19
19
|
settings: CoreDesignTemplateSettings | null;
|
|
20
20
|
fetchTemplate: () => Promise<CoreDesignTemplate>;
|
|
21
|
+
fetchSettings: () => Promise<CoreDesignTemplateSettings>;
|
|
21
22
|
setTemplate: (template: string) => void;
|
|
22
23
|
setComponents: (components: {
|
|
23
24
|
key: string;
|
|
@@ -8,7 +8,7 @@ export declare class CorePayFormBuilder implements CoreBuilder {
|
|
|
8
8
|
build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CorePayFormStore<CorePayForm>>, "persist"> & {
|
|
9
9
|
persist: {
|
|
10
10
|
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CorePayFormStore<CorePayForm>, {
|
|
11
|
-
payForms:
|
|
11
|
+
payForms: CorePayForm[] | null;
|
|
12
12
|
}>>) => void;
|
|
13
13
|
clearStorage: () => void;
|
|
14
14
|
rehydrate: () => Promise<void> | void;
|
|
@@ -16,7 +16,7 @@ export declare class CorePayFormBuilder implements CoreBuilder {
|
|
|
16
16
|
onHydrate: (fn: (state: CorePayFormStore<CorePayForm>) => void) => () => void;
|
|
17
17
|
onFinishHydration: (fn: (state: CorePayFormStore<CorePayForm>) => void) => () => void;
|
|
18
18
|
getOptions: () => Partial<import('zustand/middleware').PersistOptions<CorePayFormStore<CorePayForm>, {
|
|
19
|
-
payForms:
|
|
19
|
+
payForms: CorePayForm[] | null;
|
|
20
20
|
}>>;
|
|
21
21
|
};
|
|
22
22
|
}>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { BaseStore } from '../../../types/BaseStore';
|
|
2
2
|
import { BaseType } from '../../../types/BaseType';
|
|
3
|
-
import { BaseApiResponsePagination } from '../../../types/contracts/BaseApiResponse';
|
|
4
|
-
import { BasePagination } from '../../../types/contracts/BasePagination';
|
|
5
3
|
/**
|
|
6
4
|
* CorePayForm base type
|
|
7
5
|
*/
|
|
@@ -12,8 +10,8 @@ export interface CorePayForm extends BaseType {
|
|
|
12
10
|
currencies: string[];
|
|
13
11
|
}
|
|
14
12
|
export interface CorePayFormStore<T extends CorePayForm> extends BaseStore {
|
|
15
|
-
payForms:
|
|
16
|
-
setPayForms: (payForms:
|
|
17
|
-
getPayForms: () =>
|
|
18
|
-
fetchPayForms: (params?: Record<string, any>) => Promise<
|
|
13
|
+
payForms: T[] | null;
|
|
14
|
+
setPayForms: (payForms: T[] | null) => void;
|
|
15
|
+
getPayForms: () => T[] | null;
|
|
16
|
+
fetchPayForms: (params?: Record<string, any>) => Promise<T[]>;
|
|
19
17
|
}
|