@dutchiesdk/ecommerce-extensions-sdk 0.24.0 → 0.25.0

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.
@@ -30,7 +30,7 @@ __webpack_require__.d(__webpack_exports__, {
30
30
  useDataBridge: ()=>useDataBridge
31
31
  });
32
32
  const external_react_namespaceObject = require("react");
33
- const DataBridgeVersion = '0.24.0';
33
+ const DataBridgeVersion = '0.25.0';
34
34
  const DataBridgeContext = (0, external_react_namespaceObject.createContext)(void 0);
35
35
  const useDataBridge = ()=>{
36
36
  const context = (0, external_react_namespaceObject.useContext)(DataBridgeContext);
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext, useEffect, useState } from "react";
2
- const DataBridgeVersion = '0.24.0';
2
+ const DataBridgeVersion = '0.25.0';
3
3
  const DataBridgeContext = createContext(void 0);
4
4
  const useDataBridge = ()=>{
5
5
  const context = useContext(DataBridgeContext);
@@ -1,8 +1,10 @@
1
1
  export type Brand = {
2
2
  cname: string;
3
+ description?: string;
3
4
  id: string;
4
5
  image?: string | null;
5
6
  name: string;
7
+ websiteUrl?: string;
6
8
  };
7
9
  export type CartItem = {
8
10
  /**
@@ -24,13 +26,27 @@ export type Cart = {
24
26
  };
25
27
  export type Category = {
26
28
  cname: string;
29
+ href?: string;
27
30
  id: string;
31
+ image?: string;
32
+ isOutlet?: boolean;
28
33
  name: string;
34
+ route?: string;
29
35
  };
30
36
  export type Collection = {
37
+ cardBadgeColor?: string;
38
+ cardBadgeTitle?: string;
39
+ cardImage?: string;
31
40
  cname: string;
41
+ description?: string;
32
42
  id: string;
43
+ image?: string;
44
+ isExclusive?: boolean;
45
+ isOutlet?: boolean;
33
46
  name: string;
47
+ outletTimerMessage?: string;
48
+ position?: number;
49
+ productCount?: number;
34
50
  };
35
51
  export type MenuContext = 'store-front' | 'kiosk';
36
52
  export type DayHours = {
@@ -40,8 +56,10 @@ export type DayHours = {
40
56
  };
41
57
  export type Dispensary = {
42
58
  address: DispensaryAddress;
59
+ bannerImage?: string;
43
60
  chain: string;
44
61
  cname: string;
62
+ description?: string;
45
63
  email: string;
46
64
  hours: DispensaryHoursSettings;
47
65
  id: string;
@@ -59,6 +77,7 @@ export type Dispensary = {
59
77
  phone: string;
60
78
  recDispensary: boolean;
61
79
  status: string;
80
+ timezone?: string;
62
81
  };
63
82
  export type DispensaryAddress = {
64
83
  city: string;
@@ -108,20 +127,64 @@ export type OrderTypesConfig = {
108
127
  offerAnyPickupService?: boolean;
109
128
  offerDeliveryService?: boolean;
110
129
  };
130
+ export type ProductPotency = {
131
+ range?: number[];
132
+ unit: string;
133
+ };
134
+ export type ProductImage = {
135
+ description?: string;
136
+ label?: string;
137
+ url: string;
138
+ };
139
+ export type ProductTerpene = {
140
+ name: string;
141
+ unit?: string;
142
+ value?: number;
143
+ };
111
144
  export type Product = {
145
+ brandId?: string;
146
+ brandName?: string;
147
+ category?: string;
148
+ cbdContent?: ProductPotency;
112
149
  cname: string;
150
+ comingSoon?: boolean;
113
151
  description: string;
152
+ descriptionHtml?: string;
153
+ effects?: Record<string, unknown>;
154
+ featured?: boolean;
114
155
  id: string;
115
156
  image: string;
157
+ images?: ProductImage[];
158
+ medicalOnly?: boolean;
159
+ medicalPrices?: number[];
160
+ medicalSpecialPrices?: number[];
116
161
  name: string;
162
+ options?: string[];
117
163
  price: number;
164
+ prices?: number[];
165
+ recOnly?: boolean;
166
+ recPrices?: number[];
167
+ recSpecialPrices?: number[];
168
+ strainType?: string;
169
+ subcategory?: string;
170
+ terpenes?: ProductTerpene[];
171
+ thcContent?: ProductPotency;
172
+ weight?: number;
118
173
  };
119
174
  export type Special = {
120
175
  cname: string;
121
176
  description: string;
177
+ descriptionHtml?: string;
178
+ displayRank?: number;
179
+ endDate?: string;
180
+ heading?: string;
122
181
  id: string;
123
182
  image: string;
183
+ isRecurring?: boolean;
184
+ menuType?: string;
124
185
  name: string;
186
+ startDate?: string;
187
+ type?: string;
125
188
  };
126
189
  export type User = {
127
190
  birthday: string;
@@ -129,6 +192,21 @@ export type User = {
129
192
  firstName: string;
130
193
  lastName: string;
131
194
  };
195
+ export type LoyaltyData = {
196
+ balance: string;
197
+ currentTierName: string;
198
+ currentTierThreshold: number;
199
+ nextTierName: string;
200
+ nextTierThreshold: number | null;
201
+ expirationDate: string | null;
202
+ rewardsProgramName: string;
203
+ balanceDaysToExpiration?: number | null;
204
+ badgeColor: string;
205
+ progressPercentage: string;
206
+ isLoyaltyMember: boolean;
207
+ isPoints: boolean;
208
+ isDiscountRedemption: boolean;
209
+ };
132
210
  export type DataLoaders = {
133
211
  /**
134
212
  * Available brands
@@ -162,4 +240,8 @@ export type DataLoaders = {
162
240
  * Available specials
163
241
  */
164
242
  specials: () => Promise<Special[] | []>;
243
+ /**
244
+ * Loyalty data
245
+ */
246
+ loyalty: () => Promise<LoyaltyData | null>;
165
247
  };
@@ -1,8 +1,10 @@
1
1
  export type Brand = {
2
2
  cname: string;
3
+ description?: string;
3
4
  id: string;
4
5
  image?: string | null;
5
6
  name: string;
7
+ websiteUrl?: string;
6
8
  };
7
9
  export type CartItem = {
8
10
  /**
@@ -24,13 +26,27 @@ export type Cart = {
24
26
  };
25
27
  export type Category = {
26
28
  cname: string;
29
+ href?: string;
27
30
  id: string;
31
+ image?: string;
32
+ isOutlet?: boolean;
28
33
  name: string;
34
+ route?: string;
29
35
  };
30
36
  export type Collection = {
37
+ cardBadgeColor?: string;
38
+ cardBadgeTitle?: string;
39
+ cardImage?: string;
31
40
  cname: string;
41
+ description?: string;
32
42
  id: string;
43
+ image?: string;
44
+ isExclusive?: boolean;
45
+ isOutlet?: boolean;
33
46
  name: string;
47
+ outletTimerMessage?: string;
48
+ position?: number;
49
+ productCount?: number;
34
50
  };
35
51
  export type MenuContext = 'store-front' | 'kiosk';
36
52
  export type DayHours = {
@@ -40,8 +56,10 @@ export type DayHours = {
40
56
  };
41
57
  export type Dispensary = {
42
58
  address: DispensaryAddress;
59
+ bannerImage?: string;
43
60
  chain: string;
44
61
  cname: string;
62
+ description?: string;
45
63
  email: string;
46
64
  hours: DispensaryHoursSettings;
47
65
  id: string;
@@ -59,6 +77,7 @@ export type Dispensary = {
59
77
  phone: string;
60
78
  recDispensary: boolean;
61
79
  status: string;
80
+ timezone?: string;
62
81
  };
63
82
  export type DispensaryAddress = {
64
83
  city: string;
@@ -108,20 +127,64 @@ export type OrderTypesConfig = {
108
127
  offerAnyPickupService?: boolean;
109
128
  offerDeliveryService?: boolean;
110
129
  };
130
+ export type ProductPotency = {
131
+ range?: number[];
132
+ unit: string;
133
+ };
134
+ export type ProductImage = {
135
+ description?: string;
136
+ label?: string;
137
+ url: string;
138
+ };
139
+ export type ProductTerpene = {
140
+ name: string;
141
+ unit?: string;
142
+ value?: number;
143
+ };
111
144
  export type Product = {
145
+ brandId?: string;
146
+ brandName?: string;
147
+ category?: string;
148
+ cbdContent?: ProductPotency;
112
149
  cname: string;
150
+ comingSoon?: boolean;
113
151
  description: string;
152
+ descriptionHtml?: string;
153
+ effects?: Record<string, unknown>;
154
+ featured?: boolean;
114
155
  id: string;
115
156
  image: string;
157
+ images?: ProductImage[];
158
+ medicalOnly?: boolean;
159
+ medicalPrices?: number[];
160
+ medicalSpecialPrices?: number[];
116
161
  name: string;
162
+ options?: string[];
117
163
  price: number;
164
+ prices?: number[];
165
+ recOnly?: boolean;
166
+ recPrices?: number[];
167
+ recSpecialPrices?: number[];
168
+ strainType?: string;
169
+ subcategory?: string;
170
+ terpenes?: ProductTerpene[];
171
+ thcContent?: ProductPotency;
172
+ weight?: number;
118
173
  };
119
174
  export type Special = {
120
175
  cname: string;
121
176
  description: string;
177
+ descriptionHtml?: string;
178
+ displayRank?: number;
179
+ endDate?: string;
180
+ heading?: string;
122
181
  id: string;
123
182
  image: string;
183
+ isRecurring?: boolean;
184
+ menuType?: string;
124
185
  name: string;
186
+ startDate?: string;
187
+ type?: string;
125
188
  };
126
189
  export type User = {
127
190
  birthday: string;
@@ -129,6 +192,21 @@ export type User = {
129
192
  firstName: string;
130
193
  lastName: string;
131
194
  };
195
+ export type LoyaltyData = {
196
+ balance: string;
197
+ currentTierName: string;
198
+ currentTierThreshold: number;
199
+ nextTierName: string;
200
+ nextTierThreshold: number | null;
201
+ expirationDate: string | null;
202
+ rewardsProgramName: string;
203
+ balanceDaysToExpiration?: number | null;
204
+ badgeColor: string;
205
+ progressPercentage: string;
206
+ isLoyaltyMember: boolean;
207
+ isPoints: boolean;
208
+ isDiscountRedemption: boolean;
209
+ };
132
210
  export type DataLoaders = {
133
211
  /**
134
212
  * Available brands
@@ -162,4 +240,8 @@ export type DataLoaders = {
162
240
  * Available specials
163
241
  */
164
242
  specials: () => Promise<Special[] | []>;
243
+ /**
244
+ * Loyalty data
245
+ */
246
+ loyalty: () => Promise<LoyaltyData | null>;
165
247
  };
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "url": "git+https://github.com/GetDutchie/ecommerce-extensions-sdk.git",
10
10
  "directory": "packages/sdk"
11
11
  },
12
- "version": "0.24.0",
12
+ "version": "0.25.0",
13
13
  "license": "MIT",
14
14
  "type": "module",
15
15
  "module": "./dist/esm/index.js",