@cimplify/sdk 0.38.3 → 0.38.5
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/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-ZYACIPKO.js → chunk-5VHKZTFJ.js} +35 -35
- package/dist/{chunk-HKVRUGM6.js → chunk-BAWKQRIB.js} +6 -1
- package/dist/{chunk-TFHKVQLL.mjs → chunk-EZK2FXTM.mjs} +6 -1
- package/dist/{chunk-2X6P5WJZ.mjs → chunk-JTU5P6GM.mjs} +1 -1
- package/dist/index.js +66 -66
- package/dist/index.mjs +2 -2
- package/dist/mock/cli.mjs +187 -7
- package/dist/mock/library.d.mts +2 -2
- package/dist/mock/library.d.ts +2 -2
- package/dist/mock/library.js +187 -7
- package/dist/mock/library.mjs +187 -7
- package/dist/mock/msw.d.mts +1 -1
- package/dist/mock/msw.d.ts +1 -1
- package/dist/mock/msw.js +187 -7
- package/dist/mock/msw.mjs +187 -7
- package/dist/react.js +60 -60
- package/dist/react.mjs +3 -3
- package/dist/{server-BNy6Ri-4.d.mts → server-CVEsjECc.d.mts} +27 -0
- package/dist/{server-BNy6Ri-4.d.ts → server-CVEsjECc.d.ts} +27 -0
- package/package.json +1 -1
- package/templates/storefront/README.md +1 -1
- package/templates/storefront/components/collection-strip.tsx +1 -1
- package/templates/storefront/components/store-product-card.tsx +66 -15
- package/templates/storefront/package.json +1 -1
- package/templates/storefront/tsconfig.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5VHKZTFJ_js = require('./chunk-5VHKZTFJ.js');
|
|
4
4
|
var chunkL5GKVQVJ_js = require('./chunk-L5GKVQVJ.js');
|
|
5
|
-
var
|
|
5
|
+
var chunkBAWKQRIB_js = require('./chunk-BAWKQRIB.js');
|
|
6
6
|
var chunkV2O5AO7I_js = require('./chunk-V2O5AO7I.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "ActivityService", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk5VHKZTFJ_js.ActivityService; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "CimplifyClient", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk5VHKZTFJ_js.CimplifyClient; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "DURATION_UNIT", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunk5VHKZTFJ_js.DURATION_UNIT; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "DeliveryService", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunk5VHKZTFJ_js.DeliveryService; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "INPUT_FIELD_TYPE", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunk5VHKZTFJ_js.INPUT_FIELD_TYPE; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "PRODUCT_TYPE", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunk5VHKZTFJ_js.PRODUCT_TYPE; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "PlacesService", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunk5VHKZTFJ_js.PlacesService; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "RENDER_HINT", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunk5VHKZTFJ_js.RENDER_HINT; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "SubscriptionService", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk5VHKZTFJ_js.SubscriptionService; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "SupportService", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk5VHKZTFJ_js.SupportService; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "UploadService", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk5VHKZTFJ_js.UploadService; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "createCimplifyClient", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunk5VHKZTFJ_js.createCimplifyClient; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "getVariantDisplayName", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunk5VHKZTFJ_js.getVariantDisplayName; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "isValidPhoneForContext", {
|
|
63
63
|
enumerable: true,
|
|
@@ -73,207 +73,207 @@ Object.defineProperty(exports, "resolvePhoneCountryCode", {
|
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "AUTHORIZATION_TYPE", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkBAWKQRIB_js.AUTHORIZATION_TYPE; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "AUTH_MUTATION", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkBAWKQRIB_js.AUTH_MUTATION; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "AuthService", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkBAWKQRIB_js.AuthService; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "BusinessService", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkBAWKQRIB_js.BusinessService; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "CHECKOUT_MODE", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkBAWKQRIB_js.CHECKOUT_MODE; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "CHECKOUT_MUTATION", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkBAWKQRIB_js.CHECKOUT_MUTATION; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "CHECKOUT_STEP", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkBAWKQRIB_js.CHECKOUT_STEP; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "CONTACT_TYPE", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkBAWKQRIB_js.CONTACT_TYPE; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "CartOperations", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkBAWKQRIB_js.CartOperations; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "CatalogueQueries", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkBAWKQRIB_js.CatalogueQueries; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "CheckoutOperations", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkBAWKQRIB_js.CheckoutService; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "CheckoutService", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkBAWKQRIB_js.CheckoutService; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "CimplifyElement", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkBAWKQRIB_js.CimplifyElement; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "CimplifyElements", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkBAWKQRIB_js.CimplifyElements; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "DEFAULT_COUNTRY", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkBAWKQRIB_js.DEFAULT_COUNTRY; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "DEFAULT_CURRENCY", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkBAWKQRIB_js.DEFAULT_CURRENCY; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "DEVICE_TYPE", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkBAWKQRIB_js.DEVICE_TYPE; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "ELEMENT_TYPES", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkBAWKQRIB_js.ELEMENT_TYPES; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "EVENT_TYPES", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkBAWKQRIB_js.EVENT_TYPES; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "FxService", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkBAWKQRIB_js.FxService; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "InventoryService", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkBAWKQRIB_js.InventoryService; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "LINK_MUTATION", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkBAWKQRIB_js.LINK_MUTATION; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "LINK_QUERY", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkBAWKQRIB_js.LINK_QUERY; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "LinkService", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkBAWKQRIB_js.LinkService; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "LiteService", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkBAWKQRIB_js.LiteService; }
|
|
173
173
|
});
|
|
174
174
|
Object.defineProperty(exports, "MESSAGE_TYPES", {
|
|
175
175
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkBAWKQRIB_js.MESSAGE_TYPES; }
|
|
177
177
|
});
|
|
178
178
|
Object.defineProperty(exports, "MOBILE_MONEY_PROVIDER", {
|
|
179
179
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkBAWKQRIB_js.MOBILE_MONEY_PROVIDER; }
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "ORDER_MUTATION", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkBAWKQRIB_js.ORDER_MUTATION; }
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "ORDER_TYPE", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkBAWKQRIB_js.ORDER_TYPE; }
|
|
189
189
|
});
|
|
190
190
|
Object.defineProperty(exports, "OrderQueries", {
|
|
191
191
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkBAWKQRIB_js.OrderQueries; }
|
|
193
193
|
});
|
|
194
194
|
Object.defineProperty(exports, "PAYMENT_METHOD", {
|
|
195
195
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkBAWKQRIB_js.PAYMENT_METHOD; }
|
|
197
197
|
});
|
|
198
198
|
Object.defineProperty(exports, "PAYMENT_MUTATION", {
|
|
199
199
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkBAWKQRIB_js.PAYMENT_MUTATION; }
|
|
201
201
|
});
|
|
202
202
|
Object.defineProperty(exports, "PAYMENT_STATE", {
|
|
203
203
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkBAWKQRIB_js.PAYMENT_STATE; }
|
|
205
205
|
});
|
|
206
206
|
Object.defineProperty(exports, "PICKUP_TIME_TYPE", {
|
|
207
207
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkBAWKQRIB_js.PICKUP_TIME_TYPE; }
|
|
209
209
|
});
|
|
210
210
|
Object.defineProperty(exports, "SchedulingService", {
|
|
211
211
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkBAWKQRIB_js.SchedulingService; }
|
|
213
213
|
});
|
|
214
214
|
Object.defineProperty(exports, "combine", {
|
|
215
215
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkBAWKQRIB_js.combine; }
|
|
217
217
|
});
|
|
218
218
|
Object.defineProperty(exports, "combineObject", {
|
|
219
219
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkBAWKQRIB_js.combineObject; }
|
|
221
221
|
});
|
|
222
222
|
Object.defineProperty(exports, "createElements", {
|
|
223
223
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkBAWKQRIB_js.createElements; }
|
|
225
225
|
});
|
|
226
226
|
Object.defineProperty(exports, "err", {
|
|
227
227
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkBAWKQRIB_js.err; }
|
|
229
229
|
});
|
|
230
230
|
Object.defineProperty(exports, "flatMap", {
|
|
231
231
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkBAWKQRIB_js.flatMap; }
|
|
233
233
|
});
|
|
234
234
|
Object.defineProperty(exports, "fromPromise", {
|
|
235
235
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkBAWKQRIB_js.fromPromise; }
|
|
237
237
|
});
|
|
238
238
|
Object.defineProperty(exports, "generateIdempotencyKey", {
|
|
239
239
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkBAWKQRIB_js.generateIdempotencyKey; }
|
|
241
241
|
});
|
|
242
242
|
Object.defineProperty(exports, "getOrElse", {
|
|
243
243
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkBAWKQRIB_js.getOrElse; }
|
|
245
245
|
});
|
|
246
246
|
Object.defineProperty(exports, "isErr", {
|
|
247
247
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkBAWKQRIB_js.isErr; }
|
|
249
249
|
});
|
|
250
250
|
Object.defineProperty(exports, "isOk", {
|
|
251
251
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkBAWKQRIB_js.isOk; }
|
|
253
253
|
});
|
|
254
254
|
Object.defineProperty(exports, "mapError", {
|
|
255
255
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkBAWKQRIB_js.mapError; }
|
|
257
257
|
});
|
|
258
258
|
Object.defineProperty(exports, "mapResult", {
|
|
259
259
|
enumerable: true,
|
|
260
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkBAWKQRIB_js.mapResult; }
|
|
261
261
|
});
|
|
262
262
|
Object.defineProperty(exports, "ok", {
|
|
263
263
|
enumerable: true,
|
|
264
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkBAWKQRIB_js.ok; }
|
|
265
265
|
});
|
|
266
266
|
Object.defineProperty(exports, "toNullable", {
|
|
267
267
|
enumerable: true,
|
|
268
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkBAWKQRIB_js.toNullable; }
|
|
269
269
|
});
|
|
270
270
|
Object.defineProperty(exports, "tryCatch", {
|
|
271
271
|
enumerable: true,
|
|
272
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkBAWKQRIB_js.tryCatch; }
|
|
273
273
|
});
|
|
274
274
|
Object.defineProperty(exports, "unwrap", {
|
|
275
275
|
enumerable: true,
|
|
276
|
-
get: function () { return
|
|
276
|
+
get: function () { return chunkBAWKQRIB_js.unwrap; }
|
|
277
277
|
});
|
|
278
278
|
Object.defineProperty(exports, "CURRENCY_SYMBOLS", {
|
|
279
279
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActivityService, CimplifyClient, DURATION_UNIT, DeliveryService, INPUT_FIELD_TYPE, PRODUCT_TYPE, PlacesService, RENDER_HINT, SubscriptionService, SupportService, UploadService, createCimplifyClient, getVariantDisplayName } from './chunk-
|
|
1
|
+
export { ActivityService, CimplifyClient, DURATION_UNIT, DeliveryService, INPUT_FIELD_TYPE, PRODUCT_TYPE, PlacesService, RENDER_HINT, SubscriptionService, SupportService, UploadService, createCimplifyClient, getVariantDisplayName } from './chunk-JTU5P6GM.mjs';
|
|
2
2
|
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
3
|
-
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, toNullable, tryCatch, unwrap } from './chunk-
|
|
3
|
+
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, toNullable, tryCatch, unwrap } from './chunk-EZK2FXTM.mjs';
|
|
4
4
|
export { CURRENCY_SYMBOLS, CimplifyError, ERROR_HINTS, ErrorCode, IdempotencyMismatchError, MOBILE_MONEY_PROVIDERS, ZERO, categorizePaymentError, currencyCode, detectMobileMoneyProvider, enrichError, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getErrorHint, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, hasTaxInfo, isCimplifyError, isIdempotencyMismatchError, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isRetryableError, isSupportedCurrency, isTaxInclusive, money, moneyFromNumber, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './chunk-6TVQQYQ5.mjs';
|
package/dist/mock/cli.mjs
CHANGED
|
@@ -4170,12 +4170,21 @@ function toCanonicalProductSummary(p) {
|
|
|
4170
4170
|
updated_at: p.updated_at
|
|
4171
4171
|
};
|
|
4172
4172
|
}
|
|
4173
|
-
|
|
4173
|
+
var FOOD_REGEX = /food|drink|cake|bread|pastry|dessert|coffee|tea|juice|spice|sweet|breakfast|baked/i;
|
|
4174
|
+
function deriveRenderHint(p, registry) {
|
|
4175
|
+
if (p.render_hint) return p.render_hint;
|
|
4174
4176
|
if (p.product_type === "service") return "general";
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
)
|
|
4178
|
-
|
|
4177
|
+
if (p.product_type === "digital") return "general";
|
|
4178
|
+
if ((p.tags ?? []).some((t) => FOOD_REGEX.test(t))) return "food";
|
|
4179
|
+
if (registry) {
|
|
4180
|
+
for (const cid of p.category_ids) {
|
|
4181
|
+
const cat = registry.categories.get(cid);
|
|
4182
|
+
if (cat && (FOOD_REGEX.test(cat.name) || FOOD_REGEX.test(cat.slug))) {
|
|
4183
|
+
return "food";
|
|
4184
|
+
}
|
|
4185
|
+
}
|
|
4186
|
+
}
|
|
4187
|
+
return "general";
|
|
4179
4188
|
}
|
|
4180
4189
|
function toApiProduct(p, ctx) {
|
|
4181
4190
|
const { registry, priceInfo, groups, components, composite, bundle } = ctx;
|
|
@@ -4191,7 +4200,7 @@ function toApiProduct(p, ctx) {
|
|
|
4191
4200
|
images: p.images,
|
|
4192
4201
|
default_price: p.base_price,
|
|
4193
4202
|
type: p.product_type,
|
|
4194
|
-
render_hint: deriveRenderHint(p),
|
|
4203
|
+
render_hint: deriveRenderHint(p, registry),
|
|
4195
4204
|
inventory_type: "none",
|
|
4196
4205
|
variant_strategy: p.variant_ids.length > 0 ? "use_axes" : "fetch_all",
|
|
4197
4206
|
is_active: p.is_available,
|
|
@@ -4199,6 +4208,12 @@ function toApiProduct(p, ctx) {
|
|
|
4199
4208
|
tags: p.tags ?? [],
|
|
4200
4209
|
calories: p.calories,
|
|
4201
4210
|
allergies: p.allergies ?? [],
|
|
4211
|
+
display_mode: p.display_mode,
|
|
4212
|
+
digital_product_type: p.digital_product_type,
|
|
4213
|
+
quantity_pricing: p.quantity_pricing,
|
|
4214
|
+
duration_unit: p.duration_unit,
|
|
4215
|
+
duration_minutes: p.duration_minutes,
|
|
4216
|
+
billing_plans: p.billing_plans,
|
|
4202
4217
|
created_at: p.created_at,
|
|
4203
4218
|
updated_at: p.updated_at,
|
|
4204
4219
|
metadata: {
|
|
@@ -5689,6 +5704,21 @@ function makeProduct(input, categoryIds) {
|
|
|
5689
5704
|
pairings: input.pairings ?? [],
|
|
5690
5705
|
is_signature: input.isSignature ?? false,
|
|
5691
5706
|
is_new: input.isNew ?? false,
|
|
5707
|
+
render_hint: input.renderHint,
|
|
5708
|
+
display_mode: input.displayMode,
|
|
5709
|
+
digital_product_type: input.digitalProductType,
|
|
5710
|
+
quantity_pricing: input.quantityPricing,
|
|
5711
|
+
duration_unit: input.durationUnit,
|
|
5712
|
+
duration_minutes: input.durationMinutes,
|
|
5713
|
+
billing_plans: input.billingPlans?.map((b) => ({
|
|
5714
|
+
id: b.id,
|
|
5715
|
+
name: b.name,
|
|
5716
|
+
interval: b.interval,
|
|
5717
|
+
interval_count: b.interval_count,
|
|
5718
|
+
price: b.price,
|
|
5719
|
+
currency: b.currency ?? "GHS",
|
|
5720
|
+
trial_period_days: b.trial_period_days
|
|
5721
|
+
})),
|
|
5692
5722
|
created_at: ISO,
|
|
5693
5723
|
updated_at: ISO
|
|
5694
5724
|
};
|
|
@@ -5729,7 +5759,9 @@ function seedDefault(registry) {
|
|
|
5729
5759
|
{ slug: "pastries", name: "Pastries", description: "Hand-laminated croissants, danishes, brownies." },
|
|
5730
5760
|
{ slug: "cakes", name: "Cakes", description: "Slices and made-to-order showstoppers." },
|
|
5731
5761
|
{ slug: "drinks", name: "Drinks", description: "Locally roasted coffee, brewed teas, fresh juice." },
|
|
5732
|
-
{ slug: "boxes", name: "Boxes & Bundles", description: "Curated boxes for sharing." }
|
|
5762
|
+
{ slug: "boxes", name: "Boxes & Bundles", description: "Curated boxes for sharing." },
|
|
5763
|
+
{ slug: "merch", name: "Merch & More", description: "Branded goods, wholesale flour, downloadable recipes, gift cards." },
|
|
5764
|
+
{ slug: "classes", name: "Classes & Stays", description: "Hands-on baking classes, kitchen rentals, monthly bread subscriptions." }
|
|
5733
5765
|
];
|
|
5734
5766
|
const catIds = /* @__PURE__ */ new Map();
|
|
5735
5767
|
for (const c of categoryDefs) {
|
|
@@ -6043,6 +6075,154 @@ function seedDefault(registry) {
|
|
|
6043
6075
|
imageUrl: img("1486427944299-d1955d23e34d"),
|
|
6044
6076
|
tags: ["composite", "build-your-own", "gift"],
|
|
6045
6077
|
productType: "composite"
|
|
6078
|
+
},
|
|
6079
|
+
// ── Merch (Retail card — render_hint=physical) ──
|
|
6080
|
+
{
|
|
6081
|
+
id: "prod_apron",
|
|
6082
|
+
name: "Akua's Bakery Apron",
|
|
6083
|
+
slug: "apron",
|
|
6084
|
+
price: "85.00",
|
|
6085
|
+
description: "Heavy-weight cotton-canvas apron with leather neck strap, embroidered logo, and two front pockets. Made in Accra.",
|
|
6086
|
+
category: "merch",
|
|
6087
|
+
imageUrl: img("1556905055-8f358a7a47b2"),
|
|
6088
|
+
tags: ["merch", "physical"],
|
|
6089
|
+
renderHint: "physical"
|
|
6090
|
+
},
|
|
6091
|
+
{
|
|
6092
|
+
id: "prod_tote",
|
|
6093
|
+
name: "Bakery Tote Bag",
|
|
6094
|
+
slug: "tote-bag",
|
|
6095
|
+
price: "35.00",
|
|
6096
|
+
description: "12oz natural canvas tote, screen-printed with our wheat-stalk crest. Roomy enough for two loaves.",
|
|
6097
|
+
category: "merch",
|
|
6098
|
+
imageUrl: img("1591561954557-26941169b49e"),
|
|
6099
|
+
tags: ["merch", "physical", "gift"],
|
|
6100
|
+
renderHint: "physical",
|
|
6101
|
+
isNew: true
|
|
6102
|
+
},
|
|
6103
|
+
// ── Wholesale (Wholesale card — quantity_pricing tiers) ──
|
|
6104
|
+
{
|
|
6105
|
+
id: "prod_flour-wholesale",
|
|
6106
|
+
name: "Heritage Flour \u2014 25kg Sack",
|
|
6107
|
+
slug: "flour-25kg",
|
|
6108
|
+
price: "320.00",
|
|
6109
|
+
description: "Stone-milled heritage wheat flour, the same we use in our country sourdough. Tiered pricing for caf\xE9s, restaurants, and home-baking co-ops.",
|
|
6110
|
+
category: "merch",
|
|
6111
|
+
imageUrl: img("1568254183919-78a4f43a2877"),
|
|
6112
|
+
tags: ["wholesale", "physical", "trade"],
|
|
6113
|
+
renderHint: "physical",
|
|
6114
|
+
quantityPricing: [
|
|
6115
|
+
{ min_quantity: 1, unit_price: "320.00" },
|
|
6116
|
+
{ min_quantity: 5, unit_price: "295.00" },
|
|
6117
|
+
{ min_quantity: 10, unit_price: "270.00" },
|
|
6118
|
+
{ min_quantity: 25, unit_price: "245.00" }
|
|
6119
|
+
]
|
|
6120
|
+
},
|
|
6121
|
+
// ── Digital products (Digital card — type=digital) ──
|
|
6122
|
+
{
|
|
6123
|
+
id: "prod_recipe-ebook",
|
|
6124
|
+
name: "Sourdough Starter eBook",
|
|
6125
|
+
slug: "sourdough-ebook",
|
|
6126
|
+
price: "45.00",
|
|
6127
|
+
description: "PDF + EPUB walkthrough of our sourdough programme \u2014 starter, levain, autolyse, bulk fermentation, shaping, scoring. Lifetime updates.",
|
|
6128
|
+
category: "merch",
|
|
6129
|
+
imageUrl: img("1543002588-bfa74002ed7e"),
|
|
6130
|
+
tags: ["digital", "download"],
|
|
6131
|
+
productType: "digital",
|
|
6132
|
+
digitalProductType: "download"
|
|
6133
|
+
},
|
|
6134
|
+
{
|
|
6135
|
+
id: "prod_gift-card",
|
|
6136
|
+
name: "Bakery Gift Card",
|
|
6137
|
+
slug: "gift-card",
|
|
6138
|
+
price: "100.00",
|
|
6139
|
+
description: "Send instantly. Redeemable in-store and online toward any product. Choose any amount from GH\u20B550 upward.",
|
|
6140
|
+
category: "merch",
|
|
6141
|
+
imageUrl: img("1556905055-8f358a7a47b2"),
|
|
6142
|
+
tags: ["digital", "gift"],
|
|
6143
|
+
productType: "digital",
|
|
6144
|
+
digitalProductType: "gift_code",
|
|
6145
|
+
isSignature: true
|
|
6146
|
+
},
|
|
6147
|
+
// ── Services (Standard service card — type=service + duration_minutes) ──
|
|
6148
|
+
{
|
|
6149
|
+
id: "prod_baking-class",
|
|
6150
|
+
name: "Sourdough Baking Class",
|
|
6151
|
+
slug: "baking-class",
|
|
6152
|
+
price: "320.00",
|
|
6153
|
+
description: "Two-hour hands-on class: shape your own boule, score it, and take home a baked loaf and a starter jar. Held Saturdays, 10am\u201312pm.",
|
|
6154
|
+
category: "classes",
|
|
6155
|
+
imageUrl: img("1556909114-44e3e9399a2e"),
|
|
6156
|
+
tags: ["class", "service", "hands-on"],
|
|
6157
|
+
productType: "service",
|
|
6158
|
+
durationMinutes: 120
|
|
6159
|
+
},
|
|
6160
|
+
{
|
|
6161
|
+
id: "prod_pastry-workshop",
|
|
6162
|
+
name: "Lamination Workshop",
|
|
6163
|
+
slug: "pastry-workshop",
|
|
6164
|
+
price: "480.00",
|
|
6165
|
+
description: "Three-hour deep-dive on laminated dough. We cover croissants, danishes, kouign-amann. Aprons supplied; pastries to take home.",
|
|
6166
|
+
category: "classes",
|
|
6167
|
+
imageUrl: img("1517433367423-c7e5b0f35086"),
|
|
6168
|
+
tags: ["class", "service", "advanced"],
|
|
6169
|
+
productType: "service",
|
|
6170
|
+
durationMinutes: 180,
|
|
6171
|
+
isNew: true
|
|
6172
|
+
},
|
|
6173
|
+
// ── Rental service (Rental card — duration_unit=hours) ──
|
|
6174
|
+
{
|
|
6175
|
+
id: "prod_kitchen-rental",
|
|
6176
|
+
name: "Pro Kitchen Rental",
|
|
6177
|
+
slug: "kitchen-rental",
|
|
6178
|
+
price: "180.00",
|
|
6179
|
+
description: "Rent our commercial bakery after hours. Deck oven, retarder-proofer, mixers, scales \u2014 bring your team or shoot your content. Hourly.",
|
|
6180
|
+
category: "classes",
|
|
6181
|
+
imageUrl: img("1556909114-44e3e9399a2e"),
|
|
6182
|
+
tags: ["rental", "service", "commercial"],
|
|
6183
|
+
productType: "service",
|
|
6184
|
+
durationUnit: "hours"
|
|
6185
|
+
},
|
|
6186
|
+
// ── Accommodation (Accommodation card — duration_unit=nights) ──
|
|
6187
|
+
{
|
|
6188
|
+
id: "prod_loft-stay",
|
|
6189
|
+
name: "Bakery Loft \u2014 Weekend Stay",
|
|
6190
|
+
slug: "loft-stay",
|
|
6191
|
+
price: "650.00",
|
|
6192
|
+
description: "One-bedroom loft above the bakery. Wakes up to fresh croissants, ends with a private dinner. Ghana Tourism-licensed. Per night.",
|
|
6193
|
+
category: "classes",
|
|
6194
|
+
imageUrl: img("1564013799919-ab600027ffc6"),
|
|
6195
|
+
tags: ["stay", "service", "premium"],
|
|
6196
|
+
productType: "service",
|
|
6197
|
+
durationUnit: "nights"
|
|
6198
|
+
},
|
|
6199
|
+
// ── Subscription (Subscription card — billing_plans, no duration_minutes) ──
|
|
6200
|
+
{
|
|
6201
|
+
id: "prod_loaf-subscription",
|
|
6202
|
+
name: "Weekly Loaf Subscription",
|
|
6203
|
+
slug: "loaf-subscription",
|
|
6204
|
+
price: "0.00",
|
|
6205
|
+
description: "A fresh loaf delivered to your door every week. Pause or skip any time. Choose monthly or quarterly billing for a discount.",
|
|
6206
|
+
category: "classes",
|
|
6207
|
+
imageUrl: img("1509440159596-0249088772ff"),
|
|
6208
|
+
tags: ["subscription", "service", "delivery"],
|
|
6209
|
+
productType: "service",
|
|
6210
|
+
billingPlans: [
|
|
6211
|
+
{
|
|
6212
|
+
id: "plan_loaf_monthly",
|
|
6213
|
+
name: "Monthly",
|
|
6214
|
+
interval: "month",
|
|
6215
|
+
interval_count: 1,
|
|
6216
|
+
price: "90.00"
|
|
6217
|
+
},
|
|
6218
|
+
{
|
|
6219
|
+
id: "plan_loaf_quarterly",
|
|
6220
|
+
name: "Quarterly (save 10%)",
|
|
6221
|
+
interval: "month",
|
|
6222
|
+
interval_count: 3,
|
|
6223
|
+
price: "243.00"
|
|
6224
|
+
}
|
|
6225
|
+
]
|
|
6046
6226
|
}
|
|
6047
6227
|
];
|
|
6048
6228
|
for (const input of productInputs) {
|
package/dist/mock/library.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MockBus, a as MockEvent } from '../server-
|
|
2
|
-
export { A as AppHandle, m as Clock, C as CreateAppOptions, D as Deps, I as IdGen, h as MockBusiness, j as MockCart, l as MockEventType, d as MockOptions, k as MockOrder, i as MockProduct, S as SeedName, f as Session, g as StateRegistry, e as applySeed, b as createDeps, c as createMockApp } from '../server-
|
|
1
|
+
import { M as MockBus, a as MockEvent } from '../server-CVEsjECc.mjs';
|
|
2
|
+
export { A as AppHandle, m as Clock, C as CreateAppOptions, D as Deps, I as IdGen, h as MockBusiness, j as MockCart, l as MockEventType, d as MockOptions, k as MockOrder, i as MockProduct, S as SeedName, f as Session, g as StateRegistry, e as applySeed, b as createDeps, c as createMockApp } from '../server-CVEsjECc.mjs';
|
|
3
3
|
import 'hono';
|
|
4
4
|
|
|
5
5
|
interface WebhookOptions {
|
package/dist/mock/library.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MockBus, a as MockEvent } from '../server-
|
|
2
|
-
export { A as AppHandle, m as Clock, C as CreateAppOptions, D as Deps, I as IdGen, h as MockBusiness, j as MockCart, l as MockEventType, d as MockOptions, k as MockOrder, i as MockProduct, S as SeedName, f as Session, g as StateRegistry, e as applySeed, b as createDeps, c as createMockApp } from '../server-
|
|
1
|
+
import { M as MockBus, a as MockEvent } from '../server-CVEsjECc.js';
|
|
2
|
+
export { A as AppHandle, m as Clock, C as CreateAppOptions, D as Deps, I as IdGen, h as MockBusiness, j as MockCart, l as MockEventType, d as MockOptions, k as MockOrder, i as MockProduct, S as SeedName, f as Session, g as StateRegistry, e as applySeed, b as createDeps, c as createMockApp } from '../server-CVEsjECc.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
|
|
5
5
|
interface WebhookOptions {
|