@dutchiesdk/ecommerce-extensions-sdk 0.6.2 → 0.6.3

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.
@@ -1,37 +1,42 @@
1
+ export type CommerceComponentsActions = {
2
+ goToInfoPage: () => void;
3
+ goToStoreFront: () => void;
4
+ goToStoreLocator: () => void;
5
+ goToStoreBrowser: () => void;
6
+ goToCheckout: () => void;
7
+ goToLogin: () => void;
8
+ goToRegister: () => void;
9
+ goToSearch: (query?: string) => void;
10
+ goToProductDetails: (productId?: string, productCname?: string) => void;
11
+ goToCategory: (categoryId?: string, categoryCname?: string) => void;
12
+ goToBrand: (brandId?: string, brandCname?: string) => void;
13
+ goToStore: (storeId?: string, storeCname?: string) => void;
14
+ goToProductList: (categoryId?: string, categoryCname?: string, brandId?: string, brandCname?: string, collectionId?: string, collectionCname?: string) => void;
15
+ goToBrandList: (brandId?: string, brandCname?: string) => void;
16
+ goToCollectionList: (collectionId?: string, collectionCname?: string) => void;
17
+ showCart: () => void;
18
+ hideCart: () => void;
19
+ addToCart: (productId: string, quantity: number) => void;
20
+ removeFromCart: (productId: string) => void;
21
+ updateCartItem: (productId: string, quantity: number) => void;
22
+ clearCart: () => void;
23
+ };
24
+ export type CommerceComponentsDataLoaders = {
25
+ getAllLocations: () => Promise<Dispensary[] | []>;
26
+ locations: () => Promise<Dispensary[] | []>;
27
+ categories: () => Promise<Category[] | []>;
28
+ collections: () => Promise<Collection[] | []>;
29
+ brands: () => Promise<Brand[] | []>;
30
+ products: () => Promise<Product[] | []>;
31
+ specials: () => Promise<Special[] | []>;
32
+ };
1
33
  export type CommerceComponentsDataInterface = {
2
34
  menuContext: CommerceComponentsMenuContext;
3
35
  location?: Dispensary;
4
36
  user?: User;
5
37
  cart?: Cart;
6
- dataLoaders: {
7
- getAllLocations: () => Promise<Dispensary[] | []>;
8
- locations: () => Promise<Dispensary[] | []>;
9
- categories: () => Promise<Category[] | []>;
10
- brands: () => Promise<Brand[] | []>;
11
- products: () => Promise<Product[] | []>;
12
- collections: () => Promise<Collection[] | []>;
13
- };
14
- actions: {
15
- goToInfoPage: () => void;
16
- goToStoreFront: () => void;
17
- goToStoreLocator: () => void;
18
- goToStoreBrowser: () => void;
19
- goToLogin: () => void;
20
- goToRegister: () => void;
21
- goToProductDetails: (productId: string) => void;
22
- goToCategory: (categoryId: string) => void;
23
- goToBrand: (brandId: string) => void;
24
- goToStore: (storeId?: string, storeCname?: string) => void;
25
- goToProductList: (categoryId?: string, categoryCname?: string) => void;
26
- goToBrandList: (brandId?: string, brandCname?: string) => void;
27
- showCart: () => void;
28
- hideCart: () => void;
29
- addToCart: (productId: string, quantity: number) => void;
30
- removeFromCart: (productId: string) => void;
31
- updateCartItem: (productId: string, quantity: number) => void;
32
- clearCart: () => void;
33
- goToCheckout: () => void;
34
- };
38
+ dataLoaders: CommerceComponentsDataLoaders;
39
+ actions: CommerceComponentsActions;
35
40
  };
36
41
  export type Category = {
37
42
  id: string;
@@ -56,6 +61,13 @@ export type Product = {
56
61
  image: string;
57
62
  description: string;
58
63
  };
64
+ export type Special = {
65
+ id: string;
66
+ name: string;
67
+ cname: string;
68
+ image: string;
69
+ description: string;
70
+ };
59
71
  export type HoursSettingsForOrderType = {
60
72
  enabled: boolean;
61
73
  effectiveHours?: {
@@ -1,37 +1,42 @@
1
+ export type CommerceComponentsActions = {
2
+ goToInfoPage: () => void;
3
+ goToStoreFront: () => void;
4
+ goToStoreLocator: () => void;
5
+ goToStoreBrowser: () => void;
6
+ goToCheckout: () => void;
7
+ goToLogin: () => void;
8
+ goToRegister: () => void;
9
+ goToSearch: (query?: string) => void;
10
+ goToProductDetails: (productId?: string, productCname?: string) => void;
11
+ goToCategory: (categoryId?: string, categoryCname?: string) => void;
12
+ goToBrand: (brandId?: string, brandCname?: string) => void;
13
+ goToStore: (storeId?: string, storeCname?: string) => void;
14
+ goToProductList: (categoryId?: string, categoryCname?: string, brandId?: string, brandCname?: string, collectionId?: string, collectionCname?: string) => void;
15
+ goToBrandList: (brandId?: string, brandCname?: string) => void;
16
+ goToCollectionList: (collectionId?: string, collectionCname?: string) => void;
17
+ showCart: () => void;
18
+ hideCart: () => void;
19
+ addToCart: (productId: string, quantity: number) => void;
20
+ removeFromCart: (productId: string) => void;
21
+ updateCartItem: (productId: string, quantity: number) => void;
22
+ clearCart: () => void;
23
+ };
24
+ export type CommerceComponentsDataLoaders = {
25
+ getAllLocations: () => Promise<Dispensary[] | []>;
26
+ locations: () => Promise<Dispensary[] | []>;
27
+ categories: () => Promise<Category[] | []>;
28
+ collections: () => Promise<Collection[] | []>;
29
+ brands: () => Promise<Brand[] | []>;
30
+ products: () => Promise<Product[] | []>;
31
+ specials: () => Promise<Special[] | []>;
32
+ };
1
33
  export type CommerceComponentsDataInterface = {
2
34
  menuContext: CommerceComponentsMenuContext;
3
35
  location?: Dispensary;
4
36
  user?: User;
5
37
  cart?: Cart;
6
- dataLoaders: {
7
- getAllLocations: () => Promise<Dispensary[] | []>;
8
- locations: () => Promise<Dispensary[] | []>;
9
- categories: () => Promise<Category[] | []>;
10
- brands: () => Promise<Brand[] | []>;
11
- products: () => Promise<Product[] | []>;
12
- collections: () => Promise<Collection[] | []>;
13
- };
14
- actions: {
15
- goToInfoPage: () => void;
16
- goToStoreFront: () => void;
17
- goToStoreLocator: () => void;
18
- goToStoreBrowser: () => void;
19
- goToLogin: () => void;
20
- goToRegister: () => void;
21
- goToProductDetails: (productId: string) => void;
22
- goToCategory: (categoryId: string) => void;
23
- goToBrand: (brandId: string) => void;
24
- goToStore: (storeId?: string, storeCname?: string) => void;
25
- goToProductList: (categoryId?: string, categoryCname?: string) => void;
26
- goToBrandList: (brandId?: string, brandCname?: string) => void;
27
- showCart: () => void;
28
- hideCart: () => void;
29
- addToCart: (productId: string, quantity: number) => void;
30
- removeFromCart: (productId: string) => void;
31
- updateCartItem: (productId: string, quantity: number) => void;
32
- clearCart: () => void;
33
- goToCheckout: () => void;
34
- };
38
+ dataLoaders: CommerceComponentsDataLoaders;
39
+ actions: CommerceComponentsActions;
35
40
  };
36
41
  export type Category = {
37
42
  id: string;
@@ -56,6 +61,13 @@ export type Product = {
56
61
  image: string;
57
62
  description: string;
58
63
  };
64
+ export type Special = {
65
+ id: string;
66
+ name: string;
67
+ cname: string;
68
+ image: string;
69
+ description: string;
70
+ };
59
71
  export type HoursSettingsForOrderType = {
60
72
  enabled: boolean;
61
73
  effectiveHours?: {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.6.2",
7
+ "version": "0.6.3",
8
8
  "license": "MIT",
9
9
  "type": "module",
10
10
  "module": "./dist/esm/index.js",