@soma-vertical-web/multi-lib 0.0.52 → 0.0.54
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/contexts/index.d.ts +2 -0
- package/contexts/store/wishlist.d.ts +12 -0
- package/data/api/wishlist/products/index.d.ts +3 -0
- package/index-DfnS9D5I.mjs +354 -0
- package/index-WV5Gjz3i.js +1 -0
- package/index.js +14 -14
- package/index.mjs +3023 -3089
- package/index2.js +1 -1
- package/index2.mjs +843 -722
- package/package.json +1 -1
- package/server.d.ts +5 -0
- package/types/contexts/contexts/session.d.ts +2 -0
- package/types/contexts/store/wishlist.d.ts +17 -0
package/package.json
CHANGED
package/server.d.ts
CHANGED
|
@@ -6,12 +6,16 @@ import * as cms from './data/api/cms';
|
|
|
6
6
|
import * as search from './data/api/search';
|
|
7
7
|
import * as masterdata from './data/api/master-data';
|
|
8
8
|
import * as catalogHelpers from './data/helpers/catalog';
|
|
9
|
+
import * as productHelpers from './data/helpers/product';
|
|
9
10
|
declare const serverAPIs: {
|
|
10
11
|
checkout: typeof checkout;
|
|
11
12
|
catalog: typeof catalog;
|
|
12
13
|
cms: typeof cms;
|
|
13
14
|
search: typeof search;
|
|
14
15
|
masterdata: typeof masterdata;
|
|
16
|
+
wishlist: {
|
|
17
|
+
getWishlistProducts({ body, apiUrl, extraData, fetchOptions }: import('./types/data/api').FetchFunctionsProps<any>): Promise<any>;
|
|
18
|
+
};
|
|
15
19
|
};
|
|
16
20
|
declare const serverHelpers: {
|
|
17
21
|
catalog: typeof catalogHelpers;
|
|
@@ -26,5 +30,6 @@ declare const serverHelpers: {
|
|
|
26
30
|
}[];
|
|
27
31
|
filterNonCategorySelected: (facets: import('./types/data/api/search/facets').Facet[], base?: string | null) => import('./types/data/api/search/facets').Facet<import('./types/data/api/search/facets').FacetValueBoolean | import('./types/data/api/search/facets').FacetValueRange>[];
|
|
28
32
|
};
|
|
33
|
+
product: typeof productHelpers;
|
|
29
34
|
};
|
|
30
35
|
export { serverAPIs, serverHelpers, serverCMS };
|
|
@@ -57,6 +57,7 @@ export interface ISessionContext {
|
|
|
57
57
|
cashback: ValueBox[] | null;
|
|
58
58
|
} | null;
|
|
59
59
|
user?: {
|
|
60
|
+
id: string;
|
|
60
61
|
userId: string;
|
|
61
62
|
email: string;
|
|
62
63
|
firstName: string;
|
|
@@ -70,6 +71,7 @@ export interface ISessionContext {
|
|
|
70
71
|
street: string;
|
|
71
72
|
postalCode: string;
|
|
72
73
|
};
|
|
74
|
+
wishlist?: string[];
|
|
73
75
|
token?: string;
|
|
74
76
|
texts?: {
|
|
75
77
|
welcome?: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type WishListStateValue = {
|
|
2
|
+
feedback: {
|
|
3
|
+
active: boolean;
|
|
4
|
+
action: 'add' | 'remove' | '';
|
|
5
|
+
};
|
|
6
|
+
list: string[];
|
|
7
|
+
};
|
|
8
|
+
export type UseWishlistStoreType = {
|
|
9
|
+
value: WishListStateValue;
|
|
10
|
+
actions: {
|
|
11
|
+
reset: () => void;
|
|
12
|
+
setValue: (value: WishListStateValue) => void;
|
|
13
|
+
toggleProduct: (productId: string) => void;
|
|
14
|
+
updateList: (list: string[]) => void;
|
|
15
|
+
resetFeedback: () => void;
|
|
16
|
+
};
|
|
17
|
+
};
|