ingeniuscliq-core 0.2.50 → 0.2.52
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 +2427 -2374
- package/dist/modules/CoreShipment/classes/CoreShipmentBuilder.d.ts +9 -7
- package/dist/modules/CoreShipment/registry/classes/index.d.ts +1 -0
- package/dist/modules/CoreShipment/registry/index.d.ts +3 -0
- package/dist/modules/CoreShipment/registry/services/index.d.ts +1 -0
- package/dist/modules/CoreShipment/registry/types/index.d.ts +1 -0
- package/dist/modules/CoreShipment/services/base.d.ts +2 -2
- package/dist/modules/CoreShipment/types/CoreShipment.d.ts +5 -3
- package/dist/modules/registry/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { CoreBuilder } from '../../../classes/CoreBuilder';
|
|
2
2
|
import { CoreShipmentBaseService } from '../services/base';
|
|
3
|
-
import { CoreShipment, CoreShipmentStore } from '../types/CoreShipment';
|
|
3
|
+
import { CoreShipment, CoreShipmentStore, CoreShippingMethod } from '../types/CoreShipment';
|
|
4
4
|
export declare class CoreShipmentBuilder implements CoreBuilder {
|
|
5
5
|
protected shipmentService: CoreShipmentBaseService;
|
|
6
|
-
protected initialState: Pick<CoreShipmentStore<CoreShipment>, "shipment" | "loading" | "error">;
|
|
6
|
+
protected initialState: Pick<CoreShipmentStore<CoreShipment, CoreShippingMethod>, "shipment" | "shippingMethods" | "loading" | "error">;
|
|
7
7
|
constructor(service?: CoreShipmentBaseService, initialState?: any);
|
|
8
|
-
build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreShipmentStore<CoreShipment>>, "persist"> & {
|
|
8
|
+
build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreShipmentStore<CoreShipment, CoreShippingMethod>>, "persist"> & {
|
|
9
9
|
persist: {
|
|
10
|
-
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreShipmentStore<CoreShipment>, {
|
|
10
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreShipmentStore<CoreShipment, CoreShippingMethod>, {
|
|
11
11
|
shipment: CoreShipment | null;
|
|
12
|
+
shippingMethods: CoreShippingMethod[] | null;
|
|
12
13
|
}>>) => void;
|
|
13
14
|
clearStorage: () => void;
|
|
14
15
|
rehydrate: () => Promise<void> | void;
|
|
15
16
|
hasHydrated: () => boolean;
|
|
16
|
-
onHydrate: (fn: (state: CoreShipmentStore<CoreShipment>) => void) => () => void;
|
|
17
|
-
onFinishHydration: (fn: (state: CoreShipmentStore<CoreShipment>) => void) => () => void;
|
|
18
|
-
getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreShipmentStore<CoreShipment>, {
|
|
17
|
+
onHydrate: (fn: (state: CoreShipmentStore<CoreShipment, CoreShippingMethod>) => void) => () => void;
|
|
18
|
+
onFinishHydration: (fn: (state: CoreShipmentStore<CoreShipment, CoreShippingMethod>) => void) => () => void;
|
|
19
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreShipmentStore<CoreShipment, CoreShippingMethod>, {
|
|
19
20
|
shipment: CoreShipment | null;
|
|
21
|
+
shippingMethods: CoreShippingMethod[] | null;
|
|
20
22
|
}>>;
|
|
21
23
|
};
|
|
22
24
|
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../classes/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../services/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../types/index';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BaseService } from '../../../services/base';
|
|
2
|
-
import {
|
|
2
|
+
import { CoreShippingMethod } from '../types/CoreShipment';
|
|
3
3
|
import { BaseApiResponse } from '../../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Base class that can be extended by concrete services
|
|
6
6
|
*/
|
|
7
7
|
export declare class CoreShipmentBaseService extends BaseService {
|
|
8
8
|
constructor();
|
|
9
|
-
getShippingMethods(): Promise<import('axios').AxiosResponse<BaseApiResponse<
|
|
9
|
+
getShippingMethods(): Promise<import('axios').AxiosResponse<BaseApiResponse<CoreShippingMethod[]>, any>>;
|
|
10
10
|
}
|
|
@@ -4,13 +4,15 @@ import { BaseType } from '../../../types/BaseType';
|
|
|
4
4
|
* CoreShipment base type
|
|
5
5
|
*/
|
|
6
6
|
export interface CoreShipment extends BaseType {
|
|
7
|
-
shippingMethods: CoreShippingMethod[];
|
|
8
7
|
}
|
|
9
|
-
export interface CoreShipmentStore<T extends CoreShipment> extends BaseStore {
|
|
8
|
+
export interface CoreShipmentStore<T extends CoreShipment, K extends CoreShippingMethod> extends BaseStore {
|
|
10
9
|
shipment: T | null;
|
|
10
|
+
shippingMethods: K[] | null;
|
|
11
11
|
setShipment: (shipment: T | null) => void;
|
|
12
12
|
getShipment: () => T | null;
|
|
13
|
-
|
|
13
|
+
setShippingMethods: (shippingMethods: K[] | null) => void;
|
|
14
|
+
getShippingMethods: () => K[] | null;
|
|
15
|
+
fetchShippingMethods: () => Promise<BaseApiResponse<K[]>>;
|
|
14
16
|
}
|
|
15
17
|
export interface CoreShippingMethod extends BaseType {
|
|
16
18
|
name: string;
|