@cimplify/sdk 0.80.0 → 0.82.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.
- package/dist/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-3BKMNVTR.mjs → chunk-7BM56JET.mjs} +1 -0
- package/dist/{chunk-FIC5S3KD.mjs → chunk-7PAQR3VC.mjs} +2 -2
- package/dist/{chunk-BNA4GW4D.mjs → chunk-BRVIXGUW.mjs} +60 -0
- package/dist/{chunk-NV445GMS.js → chunk-GFM5JW45.js} +48 -36
- package/dist/{chunk-CV5QMDQS.js → chunk-HPN5R3K2.js} +1 -0
- package/dist/{chunk-KMP4HVA2.js → chunk-IZDJEDR4.js} +4 -4
- package/dist/{chunk-NJGJCQWF.mjs → chunk-NWUEWUX2.mjs} +13 -1
- package/dist/{chunk-OSTOGR4F.js → chunk-SRJEMEVZ.js} +60 -0
- package/dist/{client-6BNd11sq.d.mts → client-BSpVgule.d.mts} +2 -2
- package/dist/{client-CuoWlAfH.d.ts → client-Dh-KIIX8.d.ts} +2 -2
- package/dist/{client-D22iSqke.d.ts → client-DnHP_2Jw.d.mts} +44 -4
- package/dist/{client-Czbt-mej.d.mts → client-xc2aQSB4.d.ts} +44 -4
- package/dist/{index-Moe4cGMB.d.ts → index-C4xE31-D.d.ts} +3 -3
- package/dist/{index-Bu76UyFz.d.mts → index-Dy8D3r9b.d.mts} +3 -3
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +69 -69
- package/dist/index.mjs +3 -3
- package/dist/mock/cli.mjs +60 -0
- package/dist/mock/library.js +60 -0
- package/dist/mock/library.mjs +60 -0
- package/dist/mock/msw.js +60 -0
- package/dist/mock/msw.mjs +60 -0
- package/dist/{payment-B7qzWdaJ.d.mts → payment-T_0MUE9o.d.mts} +1 -1
- package/dist/{payment-mVIJIJcq.d.ts → payment-nH9OCUg2.d.ts} +1 -1
- package/dist/{price-CS1IsORZ.d.ts → price-B8WMoldA.d.ts} +1 -1
- package/dist/{price-BfOaGqjx.d.mts → price-Bg7hujK_.d.mts} +1 -1
- package/dist/{product-BgFOFmQw.d.ts → product-DXhjLQ_w.d.mts} +1 -0
- package/dist/{product-BgFOFmQw.d.mts → product-DXhjLQ_w.d.ts} +1 -0
- package/dist/react.d.mts +23 -5
- package/dist/react.d.ts +23 -5
- package/dist/react.js +43 -17
- package/dist/react.mjs +29 -4
- package/dist/{server-CGO4zneR.d.mts → server-tr993CPj.d.mts} +22 -1
- package/dist/{server-Daq42vK7.d.ts → server-wAB-qfyZ.d.ts} +22 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +23 -23
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +79 -79
- package/dist/testing.mjs +5 -5
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkIQLJJW2H_js = require('./chunk-IQLJJW2H.js');
|
|
4
4
|
var chunkL5GKVQVJ_js = require('./chunk-L5GKVQVJ.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkGFM5JW45_js = require('./chunk-GFM5JW45.js');
|
|
6
|
+
var chunkHPN5R3K2_js = require('./chunk-HPN5R3K2.js');
|
|
7
7
|
var chunk7Y2O3E4D_js = require('./chunk-7Y2O3E4D.js');
|
|
8
8
|
var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
|
|
9
9
|
require('./chunk-OWW5GUSB.js');
|
|
@@ -27,9 +27,9 @@ async function signInSilent(opts) {
|
|
|
27
27
|
} catch {
|
|
28
28
|
}
|
|
29
29
|
const callbackUri = opts.callbackUri ?? "/auth/callback";
|
|
30
|
-
const authorizeEndpoint = opts.authUrl ? `${opts.authUrl.replace(/\/$/, "")}/oauth/authorize` : await
|
|
31
|
-
const pkce = await
|
|
32
|
-
const state =
|
|
30
|
+
const authorizeEndpoint = opts.authUrl ? `${opts.authUrl.replace(/\/$/, "")}/oauth/authorize` : await chunkHPN5R3K2_js.getAuthorizationEndpoint(opts.issuer ?? chunkHPN5R3K2_js.DEFAULT_ISSUER);
|
|
31
|
+
const pkce = await chunkHPN5R3K2_js.generatePkce();
|
|
32
|
+
const state = chunkHPN5R3K2_js.generateState();
|
|
33
33
|
const params = new URLSearchParams({
|
|
34
34
|
response_type: RESPONSE_TYPE_CODE,
|
|
35
35
|
response_mode: RESPONSE_MODE_WEB_MESSAGE,
|
|
@@ -155,259 +155,259 @@ Object.defineProperty(exports, "resolvePhoneCountryCode", {
|
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "ActivityService", {
|
|
157
157
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkGFM5JW45_js.ActivityService; }
|
|
159
159
|
});
|
|
160
160
|
Object.defineProperty(exports, "CimplifyClient", {
|
|
161
161
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkGFM5JW45_js.CimplifyClient; }
|
|
163
163
|
});
|
|
164
164
|
Object.defineProperty(exports, "DeliveryService", {
|
|
165
165
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunkGFM5JW45_js.DeliveryService; }
|
|
167
167
|
});
|
|
168
168
|
Object.defineProperty(exports, "PlacesService", {
|
|
169
169
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunkGFM5JW45_js.PlacesService; }
|
|
171
171
|
});
|
|
172
172
|
Object.defineProperty(exports, "StoreCreditQueries", {
|
|
173
173
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunkGFM5JW45_js.StoreCreditQueries; }
|
|
175
175
|
});
|
|
176
176
|
Object.defineProperty(exports, "SubscriptionService", {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkGFM5JW45_js.SubscriptionService; }
|
|
179
179
|
});
|
|
180
180
|
Object.defineProperty(exports, "SupportService", {
|
|
181
181
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkGFM5JW45_js.SupportService; }
|
|
183
183
|
});
|
|
184
184
|
Object.defineProperty(exports, "UploadService", {
|
|
185
185
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunkGFM5JW45_js.UploadService; }
|
|
187
187
|
});
|
|
188
188
|
Object.defineProperty(exports, "createCimplifyClient", {
|
|
189
189
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkGFM5JW45_js.createCimplifyClient; }
|
|
191
191
|
});
|
|
192
192
|
Object.defineProperty(exports, "AUTHORIZATION_TYPE", {
|
|
193
193
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkHPN5R3K2_js.AUTHORIZATION_TYPE; }
|
|
195
195
|
});
|
|
196
196
|
Object.defineProperty(exports, "AUTH_MUTATION", {
|
|
197
197
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkHPN5R3K2_js.AUTH_MUTATION; }
|
|
199
199
|
});
|
|
200
200
|
Object.defineProperty(exports, "AuthService", {
|
|
201
201
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunkHPN5R3K2_js.AuthService; }
|
|
203
203
|
});
|
|
204
204
|
Object.defineProperty(exports, "BusinessService", {
|
|
205
205
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunkHPN5R3K2_js.BusinessService; }
|
|
207
207
|
});
|
|
208
208
|
Object.defineProperty(exports, "CHECKOUT_MODE", {
|
|
209
209
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunkHPN5R3K2_js.CHECKOUT_MODE; }
|
|
211
211
|
});
|
|
212
212
|
Object.defineProperty(exports, "CHECKOUT_MUTATION", {
|
|
213
213
|
enumerable: true,
|
|
214
|
-
get: function () { return
|
|
214
|
+
get: function () { return chunkHPN5R3K2_js.CHECKOUT_MUTATION; }
|
|
215
215
|
});
|
|
216
216
|
Object.defineProperty(exports, "CHECKOUT_STEP", {
|
|
217
217
|
enumerable: true,
|
|
218
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunkHPN5R3K2_js.CHECKOUT_STEP; }
|
|
219
219
|
});
|
|
220
220
|
Object.defineProperty(exports, "CONTACT_TYPE", {
|
|
221
221
|
enumerable: true,
|
|
222
|
-
get: function () { return
|
|
222
|
+
get: function () { return chunkHPN5R3K2_js.CONTACT_TYPE; }
|
|
223
223
|
});
|
|
224
224
|
Object.defineProperty(exports, "CartOperations", {
|
|
225
225
|
enumerable: true,
|
|
226
|
-
get: function () { return
|
|
226
|
+
get: function () { return chunkHPN5R3K2_js.CartOperations; }
|
|
227
227
|
});
|
|
228
228
|
Object.defineProperty(exports, "CatalogueQueries", {
|
|
229
229
|
enumerable: true,
|
|
230
|
-
get: function () { return
|
|
230
|
+
get: function () { return chunkHPN5R3K2_js.CatalogueQueries; }
|
|
231
231
|
});
|
|
232
232
|
Object.defineProperty(exports, "CheckoutOperations", {
|
|
233
233
|
enumerable: true,
|
|
234
|
-
get: function () { return
|
|
234
|
+
get: function () { return chunkHPN5R3K2_js.CheckoutService; }
|
|
235
235
|
});
|
|
236
236
|
Object.defineProperty(exports, "CheckoutService", {
|
|
237
237
|
enumerable: true,
|
|
238
|
-
get: function () { return
|
|
238
|
+
get: function () { return chunkHPN5R3K2_js.CheckoutService; }
|
|
239
239
|
});
|
|
240
240
|
Object.defineProperty(exports, "CimplifyElement", {
|
|
241
241
|
enumerable: true,
|
|
242
|
-
get: function () { return
|
|
242
|
+
get: function () { return chunkHPN5R3K2_js.CimplifyElement; }
|
|
243
243
|
});
|
|
244
244
|
Object.defineProperty(exports, "CimplifyElements", {
|
|
245
245
|
enumerable: true,
|
|
246
|
-
get: function () { return
|
|
246
|
+
get: function () { return chunkHPN5R3K2_js.CimplifyElements; }
|
|
247
247
|
});
|
|
248
248
|
Object.defineProperty(exports, "DEFAULT_COUNTRY", {
|
|
249
249
|
enumerable: true,
|
|
250
|
-
get: function () { return
|
|
250
|
+
get: function () { return chunkHPN5R3K2_js.DEFAULT_COUNTRY; }
|
|
251
251
|
});
|
|
252
252
|
Object.defineProperty(exports, "DEFAULT_CURRENCY", {
|
|
253
253
|
enumerable: true,
|
|
254
|
-
get: function () { return
|
|
254
|
+
get: function () { return chunkHPN5R3K2_js.DEFAULT_CURRENCY; }
|
|
255
255
|
});
|
|
256
256
|
Object.defineProperty(exports, "DEVICE_TYPE", {
|
|
257
257
|
enumerable: true,
|
|
258
|
-
get: function () { return
|
|
258
|
+
get: function () { return chunkHPN5R3K2_js.DEVICE_TYPE; }
|
|
259
259
|
});
|
|
260
260
|
Object.defineProperty(exports, "ELEMENTS_AUTH_CONTACT_TYPES", {
|
|
261
261
|
enumerable: true,
|
|
262
|
-
get: function () { return
|
|
262
|
+
get: function () { return chunkHPN5R3K2_js.ELEMENTS_AUTH_CONTACT_TYPES; }
|
|
263
263
|
});
|
|
264
264
|
Object.defineProperty(exports, "ELEMENTS_AUTH_MODES", {
|
|
265
265
|
enumerable: true,
|
|
266
|
-
get: function () { return
|
|
266
|
+
get: function () { return chunkHPN5R3K2_js.ELEMENTS_AUTH_MODES; }
|
|
267
267
|
});
|
|
268
268
|
Object.defineProperty(exports, "ELEMENTS_AUTH_PROMPTS", {
|
|
269
269
|
enumerable: true,
|
|
270
|
-
get: function () { return
|
|
270
|
+
get: function () { return chunkHPN5R3K2_js.ELEMENTS_AUTH_PROMPTS; }
|
|
271
271
|
});
|
|
272
272
|
Object.defineProperty(exports, "ELEMENT_TYPES", {
|
|
273
273
|
enumerable: true,
|
|
274
|
-
get: function () { return
|
|
274
|
+
get: function () { return chunkHPN5R3K2_js.ELEMENT_TYPES; }
|
|
275
275
|
});
|
|
276
276
|
Object.defineProperty(exports, "EVENT_TYPES", {
|
|
277
277
|
enumerable: true,
|
|
278
|
-
get: function () { return
|
|
278
|
+
get: function () { return chunkHPN5R3K2_js.EVENT_TYPES; }
|
|
279
279
|
});
|
|
280
280
|
Object.defineProperty(exports, "FxService", {
|
|
281
281
|
enumerable: true,
|
|
282
|
-
get: function () { return
|
|
282
|
+
get: function () { return chunkHPN5R3K2_js.FxService; }
|
|
283
283
|
});
|
|
284
284
|
Object.defineProperty(exports, "InventoryService", {
|
|
285
285
|
enumerable: true,
|
|
286
|
-
get: function () { return
|
|
286
|
+
get: function () { return chunkHPN5R3K2_js.InventoryService; }
|
|
287
287
|
});
|
|
288
288
|
Object.defineProperty(exports, "LINK_MUTATION", {
|
|
289
289
|
enumerable: true,
|
|
290
|
-
get: function () { return
|
|
290
|
+
get: function () { return chunkHPN5R3K2_js.LINK_MUTATION; }
|
|
291
291
|
});
|
|
292
292
|
Object.defineProperty(exports, "LINK_QUERY", {
|
|
293
293
|
enumerable: true,
|
|
294
|
-
get: function () { return
|
|
294
|
+
get: function () { return chunkHPN5R3K2_js.LINK_QUERY; }
|
|
295
295
|
});
|
|
296
296
|
Object.defineProperty(exports, "LinkService", {
|
|
297
297
|
enumerable: true,
|
|
298
|
-
get: function () { return
|
|
298
|
+
get: function () { return chunkHPN5R3K2_js.LinkService; }
|
|
299
299
|
});
|
|
300
300
|
Object.defineProperty(exports, "LiteService", {
|
|
301
301
|
enumerable: true,
|
|
302
|
-
get: function () { return
|
|
302
|
+
get: function () { return chunkHPN5R3K2_js.LiteService; }
|
|
303
303
|
});
|
|
304
304
|
Object.defineProperty(exports, "MESSAGE_TYPES", {
|
|
305
305
|
enumerable: true,
|
|
306
|
-
get: function () { return
|
|
306
|
+
get: function () { return chunkHPN5R3K2_js.MESSAGE_TYPES; }
|
|
307
307
|
});
|
|
308
308
|
Object.defineProperty(exports, "MOBILE_MONEY_PROVIDER", {
|
|
309
309
|
enumerable: true,
|
|
310
|
-
get: function () { return
|
|
310
|
+
get: function () { return chunkHPN5R3K2_js.MOBILE_MONEY_PROVIDER; }
|
|
311
311
|
});
|
|
312
312
|
Object.defineProperty(exports, "ORDER_MUTATION", {
|
|
313
313
|
enumerable: true,
|
|
314
|
-
get: function () { return
|
|
314
|
+
get: function () { return chunkHPN5R3K2_js.ORDER_MUTATION; }
|
|
315
315
|
});
|
|
316
316
|
Object.defineProperty(exports, "ORDER_TYPE", {
|
|
317
317
|
enumerable: true,
|
|
318
|
-
get: function () { return
|
|
318
|
+
get: function () { return chunkHPN5R3K2_js.ORDER_TYPE; }
|
|
319
319
|
});
|
|
320
320
|
Object.defineProperty(exports, "OrderQueries", {
|
|
321
321
|
enumerable: true,
|
|
322
|
-
get: function () { return
|
|
322
|
+
get: function () { return chunkHPN5R3K2_js.OrderQueries; }
|
|
323
323
|
});
|
|
324
324
|
Object.defineProperty(exports, "PAYMENT_METHOD", {
|
|
325
325
|
enumerable: true,
|
|
326
|
-
get: function () { return
|
|
326
|
+
get: function () { return chunkHPN5R3K2_js.PAYMENT_METHOD; }
|
|
327
327
|
});
|
|
328
328
|
Object.defineProperty(exports, "PAYMENT_MUTATION", {
|
|
329
329
|
enumerable: true,
|
|
330
|
-
get: function () { return
|
|
330
|
+
get: function () { return chunkHPN5R3K2_js.PAYMENT_MUTATION; }
|
|
331
331
|
});
|
|
332
332
|
Object.defineProperty(exports, "PAYMENT_STATE", {
|
|
333
333
|
enumerable: true,
|
|
334
|
-
get: function () { return
|
|
334
|
+
get: function () { return chunkHPN5R3K2_js.PAYMENT_STATE; }
|
|
335
335
|
});
|
|
336
336
|
Object.defineProperty(exports, "PICKUP_TIME_TYPE", {
|
|
337
337
|
enumerable: true,
|
|
338
|
-
get: function () { return
|
|
338
|
+
get: function () { return chunkHPN5R3K2_js.PICKUP_TIME_TYPE; }
|
|
339
339
|
});
|
|
340
340
|
Object.defineProperty(exports, "SchedulingService", {
|
|
341
341
|
enumerable: true,
|
|
342
|
-
get: function () { return
|
|
342
|
+
get: function () { return chunkHPN5R3K2_js.SchedulingService; }
|
|
343
343
|
});
|
|
344
344
|
Object.defineProperty(exports, "combine", {
|
|
345
345
|
enumerable: true,
|
|
346
|
-
get: function () { return
|
|
346
|
+
get: function () { return chunkHPN5R3K2_js.combine; }
|
|
347
347
|
});
|
|
348
348
|
Object.defineProperty(exports, "combineObject", {
|
|
349
349
|
enumerable: true,
|
|
350
|
-
get: function () { return
|
|
350
|
+
get: function () { return chunkHPN5R3K2_js.combineObject; }
|
|
351
351
|
});
|
|
352
352
|
Object.defineProperty(exports, "createElements", {
|
|
353
353
|
enumerable: true,
|
|
354
|
-
get: function () { return
|
|
354
|
+
get: function () { return chunkHPN5R3K2_js.createElements; }
|
|
355
355
|
});
|
|
356
356
|
Object.defineProperty(exports, "err", {
|
|
357
357
|
enumerable: true,
|
|
358
|
-
get: function () { return
|
|
358
|
+
get: function () { return chunkHPN5R3K2_js.err; }
|
|
359
359
|
});
|
|
360
360
|
Object.defineProperty(exports, "flatMap", {
|
|
361
361
|
enumerable: true,
|
|
362
|
-
get: function () { return
|
|
362
|
+
get: function () { return chunkHPN5R3K2_js.flatMap; }
|
|
363
363
|
});
|
|
364
364
|
Object.defineProperty(exports, "fromPromise", {
|
|
365
365
|
enumerable: true,
|
|
366
|
-
get: function () { return
|
|
366
|
+
get: function () { return chunkHPN5R3K2_js.fromPromise; }
|
|
367
367
|
});
|
|
368
368
|
Object.defineProperty(exports, "generateIdempotencyKey", {
|
|
369
369
|
enumerable: true,
|
|
370
|
-
get: function () { return
|
|
370
|
+
get: function () { return chunkHPN5R3K2_js.generateIdempotencyKey; }
|
|
371
371
|
});
|
|
372
372
|
Object.defineProperty(exports, "getOrElse", {
|
|
373
373
|
enumerable: true,
|
|
374
|
-
get: function () { return
|
|
374
|
+
get: function () { return chunkHPN5R3K2_js.getOrElse; }
|
|
375
375
|
});
|
|
376
376
|
Object.defineProperty(exports, "isErr", {
|
|
377
377
|
enumerable: true,
|
|
378
|
-
get: function () { return
|
|
378
|
+
get: function () { return chunkHPN5R3K2_js.isErr; }
|
|
379
379
|
});
|
|
380
380
|
Object.defineProperty(exports, "isOk", {
|
|
381
381
|
enumerable: true,
|
|
382
|
-
get: function () { return
|
|
382
|
+
get: function () { return chunkHPN5R3K2_js.isOk; }
|
|
383
383
|
});
|
|
384
384
|
Object.defineProperty(exports, "mapError", {
|
|
385
385
|
enumerable: true,
|
|
386
|
-
get: function () { return
|
|
386
|
+
get: function () { return chunkHPN5R3K2_js.mapError; }
|
|
387
387
|
});
|
|
388
388
|
Object.defineProperty(exports, "mapResult", {
|
|
389
389
|
enumerable: true,
|
|
390
|
-
get: function () { return
|
|
390
|
+
get: function () { return chunkHPN5R3K2_js.mapResult; }
|
|
391
391
|
});
|
|
392
392
|
Object.defineProperty(exports, "ok", {
|
|
393
393
|
enumerable: true,
|
|
394
|
-
get: function () { return
|
|
394
|
+
get: function () { return chunkHPN5R3K2_js.ok; }
|
|
395
395
|
});
|
|
396
396
|
Object.defineProperty(exports, "startSignIn", {
|
|
397
397
|
enumerable: true,
|
|
398
|
-
get: function () { return
|
|
398
|
+
get: function () { return chunkHPN5R3K2_js.startSignIn; }
|
|
399
399
|
});
|
|
400
400
|
Object.defineProperty(exports, "toNullable", {
|
|
401
401
|
enumerable: true,
|
|
402
|
-
get: function () { return
|
|
402
|
+
get: function () { return chunkHPN5R3K2_js.toNullable; }
|
|
403
403
|
});
|
|
404
404
|
Object.defineProperty(exports, "tryCatch", {
|
|
405
405
|
enumerable: true,
|
|
406
|
-
get: function () { return
|
|
406
|
+
get: function () { return chunkHPN5R3K2_js.tryCatch; }
|
|
407
407
|
});
|
|
408
408
|
Object.defineProperty(exports, "unwrap", {
|
|
409
409
|
enumerable: true,
|
|
410
|
-
get: function () { return
|
|
410
|
+
get: function () { return chunkHPN5R3K2_js.unwrap; }
|
|
411
411
|
});
|
|
412
412
|
Object.defineProperty(exports, "CURRENCY_SYMBOLS", {
|
|
413
413
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, getVariantDisplayName, isCimplifyAsset, resolveGallery } from './chunk-E6T5VJMG.mjs';
|
|
2
2
|
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
3
|
-
export { ActivityService, CimplifyClient, DeliveryService, PlacesService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-
|
|
4
|
-
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-
|
|
5
|
-
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, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, 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, startSignIn, toNullable, tryCatch, unwrap } from './chunk-
|
|
3
|
+
export { ActivityService, CimplifyClient, DeliveryService, PlacesService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-NWUEWUX2.mjs';
|
|
4
|
+
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-7BM56JET.mjs';
|
|
5
|
+
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, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, 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, startSignIn, toNullable, tryCatch, unwrap } from './chunk-7BM56JET.mjs';
|
|
6
6
|
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './chunk-TD3AY34U.mjs';
|
|
7
7
|
export { CimplifyError, ERROR_HINTS, ErrorCode, IdempotencyMismatchError, ZERO, currencyCode, enrichError, getErrorHint, isCimplifyError, isIdempotencyMismatchError, isQuoteConflictRequiringConsent, isQuoteError, isRetryableError, isSupportedCurrency, money, moneyFromNumber } from './chunk-AMZXALF6.mjs';
|
|
8
8
|
import './chunk-3G6RQLXK.mjs';
|
package/dist/mock/cli.mjs
CHANGED
|
@@ -3108,6 +3108,17 @@ function buildV1(deps) {
|
|
|
3108
3108
|
})
|
|
3109
3109
|
)
|
|
3110
3110
|
);
|
|
3111
|
+
app.get(
|
|
3112
|
+
"/delivery/options",
|
|
3113
|
+
(c) => tryRoute(
|
|
3114
|
+
c,
|
|
3115
|
+
() => deps.delivery.getOptions({
|
|
3116
|
+
lat: getQueryNum(c, "dropoff_lat"),
|
|
3117
|
+
lng: getQueryNum(c, "dropoff_lng"),
|
|
3118
|
+
order_value: c.req.query("order_value")
|
|
3119
|
+
})
|
|
3120
|
+
)
|
|
3121
|
+
);
|
|
3111
3122
|
app.post("/places/autocomplete", async (c) => {
|
|
3112
3123
|
const body = await c.req.json().catch(() => ({}));
|
|
3113
3124
|
return tryRoute(c, () => deps.places.autocomplete({ query: body.input ?? body.query ?? "", country: body.country }));
|
|
@@ -6018,6 +6029,22 @@ function createPlacesService() {
|
|
|
6018
6029
|
}
|
|
6019
6030
|
|
|
6020
6031
|
// src/mock/domain/delivery.ts
|
|
6032
|
+
function optionDetails(rateId, rateName) {
|
|
6033
|
+
return {
|
|
6034
|
+
zone_id: "dlvz_mock",
|
|
6035
|
+
zone_name: "Mock Zone",
|
|
6036
|
+
provider: "manual",
|
|
6037
|
+
provider_resolved_from: "zone",
|
|
6038
|
+
rate_id: rateId,
|
|
6039
|
+
rate_name: rateName,
|
|
6040
|
+
distance_km: "4.20",
|
|
6041
|
+
base_fee: money(5),
|
|
6042
|
+
per_km_fee: money(2),
|
|
6043
|
+
surge_multiplier: "1",
|
|
6044
|
+
calculated_fee: money(15),
|
|
6045
|
+
currency: "GHS"
|
|
6046
|
+
};
|
|
6047
|
+
}
|
|
6021
6048
|
function createDeliveryService() {
|
|
6022
6049
|
return {
|
|
6023
6050
|
getFee(opts) {
|
|
@@ -6034,6 +6061,39 @@ function createDeliveryService() {
|
|
|
6034
6061
|
{ provider: "uber", fee: money(22), eta_minutes: 28 }
|
|
6035
6062
|
]
|
|
6036
6063
|
};
|
|
6064
|
+
},
|
|
6065
|
+
getOptions(opts) {
|
|
6066
|
+
const orderValue = parseFloat(opts.order_value ?? "0");
|
|
6067
|
+
const standardFree = orderValue >= 200;
|
|
6068
|
+
return {
|
|
6069
|
+
serviceable: true,
|
|
6070
|
+
options: [
|
|
6071
|
+
{
|
|
6072
|
+
rate_id: "dlvrt_mock_standard",
|
|
6073
|
+
name: "Standard",
|
|
6074
|
+
fee: standardFree ? money(0) : money(15),
|
|
6075
|
+
currency: "GHS",
|
|
6076
|
+
free_delivery_applied: standardFree,
|
|
6077
|
+
free_over_amount: money(200),
|
|
6078
|
+
eta_min_minutes: 45,
|
|
6079
|
+
eta_max_minutes: 90,
|
|
6080
|
+
is_default: true,
|
|
6081
|
+
details: optionDetails("dlvrt_mock_standard", "Standard")
|
|
6082
|
+
},
|
|
6083
|
+
{
|
|
6084
|
+
rate_id: "dlvrt_mock_express",
|
|
6085
|
+
name: "Express",
|
|
6086
|
+
description: "Delivered within the hour",
|
|
6087
|
+
fee: money(25),
|
|
6088
|
+
currency: "GHS",
|
|
6089
|
+
free_delivery_applied: false,
|
|
6090
|
+
eta_min_minutes: 30,
|
|
6091
|
+
eta_max_minutes: 60,
|
|
6092
|
+
is_default: false,
|
|
6093
|
+
details: optionDetails("dlvrt_mock_express", "Express")
|
|
6094
|
+
}
|
|
6095
|
+
]
|
|
6096
|
+
};
|
|
6037
6097
|
}
|
|
6038
6098
|
};
|
|
6039
6099
|
}
|
package/dist/mock/library.js
CHANGED
|
@@ -2476,6 +2476,17 @@ function buildV1(deps) {
|
|
|
2476
2476
|
})
|
|
2477
2477
|
)
|
|
2478
2478
|
);
|
|
2479
|
+
app.get(
|
|
2480
|
+
"/delivery/options",
|
|
2481
|
+
(c) => tryRoute(
|
|
2482
|
+
c,
|
|
2483
|
+
() => deps.delivery.getOptions({
|
|
2484
|
+
lat: getQueryNum(c, "dropoff_lat"),
|
|
2485
|
+
lng: getQueryNum(c, "dropoff_lng"),
|
|
2486
|
+
order_value: c.req.query("order_value")
|
|
2487
|
+
})
|
|
2488
|
+
)
|
|
2489
|
+
);
|
|
2479
2490
|
app.post("/places/autocomplete", async (c) => {
|
|
2480
2491
|
const body = await c.req.json().catch(() => ({}));
|
|
2481
2492
|
return tryRoute(c, () => deps.places.autocomplete({ query: body.input ?? body.query ?? "", country: body.country }));
|
|
@@ -5386,6 +5397,22 @@ function createPlacesService() {
|
|
|
5386
5397
|
}
|
|
5387
5398
|
|
|
5388
5399
|
// src/mock/domain/delivery.ts
|
|
5400
|
+
function optionDetails(rateId, rateName) {
|
|
5401
|
+
return {
|
|
5402
|
+
zone_id: "dlvz_mock",
|
|
5403
|
+
zone_name: "Mock Zone",
|
|
5404
|
+
provider: "manual",
|
|
5405
|
+
provider_resolved_from: "zone",
|
|
5406
|
+
rate_id: rateId,
|
|
5407
|
+
rate_name: rateName,
|
|
5408
|
+
distance_km: "4.20",
|
|
5409
|
+
base_fee: money(5),
|
|
5410
|
+
per_km_fee: money(2),
|
|
5411
|
+
surge_multiplier: "1",
|
|
5412
|
+
calculated_fee: money(15),
|
|
5413
|
+
currency: "GHS"
|
|
5414
|
+
};
|
|
5415
|
+
}
|
|
5389
5416
|
function createDeliveryService() {
|
|
5390
5417
|
return {
|
|
5391
5418
|
getFee(opts) {
|
|
@@ -5402,6 +5429,39 @@ function createDeliveryService() {
|
|
|
5402
5429
|
{ provider: "uber", fee: money(22), eta_minutes: 28 }
|
|
5403
5430
|
]
|
|
5404
5431
|
};
|
|
5432
|
+
},
|
|
5433
|
+
getOptions(opts) {
|
|
5434
|
+
const orderValue = parseFloat(opts.order_value ?? "0");
|
|
5435
|
+
const standardFree = orderValue >= 200;
|
|
5436
|
+
return {
|
|
5437
|
+
serviceable: true,
|
|
5438
|
+
options: [
|
|
5439
|
+
{
|
|
5440
|
+
rate_id: "dlvrt_mock_standard",
|
|
5441
|
+
name: "Standard",
|
|
5442
|
+
fee: standardFree ? money(0) : money(15),
|
|
5443
|
+
currency: "GHS",
|
|
5444
|
+
free_delivery_applied: standardFree,
|
|
5445
|
+
free_over_amount: money(200),
|
|
5446
|
+
eta_min_minutes: 45,
|
|
5447
|
+
eta_max_minutes: 90,
|
|
5448
|
+
is_default: true,
|
|
5449
|
+
details: optionDetails("dlvrt_mock_standard", "Standard")
|
|
5450
|
+
},
|
|
5451
|
+
{
|
|
5452
|
+
rate_id: "dlvrt_mock_express",
|
|
5453
|
+
name: "Express",
|
|
5454
|
+
description: "Delivered within the hour",
|
|
5455
|
+
fee: money(25),
|
|
5456
|
+
currency: "GHS",
|
|
5457
|
+
free_delivery_applied: false,
|
|
5458
|
+
eta_min_minutes: 30,
|
|
5459
|
+
eta_max_minutes: 60,
|
|
5460
|
+
is_default: false,
|
|
5461
|
+
details: optionDetails("dlvrt_mock_express", "Express")
|
|
5462
|
+
}
|
|
5463
|
+
]
|
|
5464
|
+
};
|
|
5405
5465
|
}
|
|
5406
5466
|
};
|
|
5407
5467
|
}
|
package/dist/mock/library.mjs
CHANGED
|
@@ -2474,6 +2474,17 @@ function buildV1(deps) {
|
|
|
2474
2474
|
})
|
|
2475
2475
|
)
|
|
2476
2476
|
);
|
|
2477
|
+
app.get(
|
|
2478
|
+
"/delivery/options",
|
|
2479
|
+
(c) => tryRoute(
|
|
2480
|
+
c,
|
|
2481
|
+
() => deps.delivery.getOptions({
|
|
2482
|
+
lat: getQueryNum(c, "dropoff_lat"),
|
|
2483
|
+
lng: getQueryNum(c, "dropoff_lng"),
|
|
2484
|
+
order_value: c.req.query("order_value")
|
|
2485
|
+
})
|
|
2486
|
+
)
|
|
2487
|
+
);
|
|
2477
2488
|
app.post("/places/autocomplete", async (c) => {
|
|
2478
2489
|
const body = await c.req.json().catch(() => ({}));
|
|
2479
2490
|
return tryRoute(c, () => deps.places.autocomplete({ query: body.input ?? body.query ?? "", country: body.country }));
|
|
@@ -5384,6 +5395,22 @@ function createPlacesService() {
|
|
|
5384
5395
|
}
|
|
5385
5396
|
|
|
5386
5397
|
// src/mock/domain/delivery.ts
|
|
5398
|
+
function optionDetails(rateId, rateName) {
|
|
5399
|
+
return {
|
|
5400
|
+
zone_id: "dlvz_mock",
|
|
5401
|
+
zone_name: "Mock Zone",
|
|
5402
|
+
provider: "manual",
|
|
5403
|
+
provider_resolved_from: "zone",
|
|
5404
|
+
rate_id: rateId,
|
|
5405
|
+
rate_name: rateName,
|
|
5406
|
+
distance_km: "4.20",
|
|
5407
|
+
base_fee: money(5),
|
|
5408
|
+
per_km_fee: money(2),
|
|
5409
|
+
surge_multiplier: "1",
|
|
5410
|
+
calculated_fee: money(15),
|
|
5411
|
+
currency: "GHS"
|
|
5412
|
+
};
|
|
5413
|
+
}
|
|
5387
5414
|
function createDeliveryService() {
|
|
5388
5415
|
return {
|
|
5389
5416
|
getFee(opts) {
|
|
@@ -5400,6 +5427,39 @@ function createDeliveryService() {
|
|
|
5400
5427
|
{ provider: "uber", fee: money(22), eta_minutes: 28 }
|
|
5401
5428
|
]
|
|
5402
5429
|
};
|
|
5430
|
+
},
|
|
5431
|
+
getOptions(opts) {
|
|
5432
|
+
const orderValue = parseFloat(opts.order_value ?? "0");
|
|
5433
|
+
const standardFree = orderValue >= 200;
|
|
5434
|
+
return {
|
|
5435
|
+
serviceable: true,
|
|
5436
|
+
options: [
|
|
5437
|
+
{
|
|
5438
|
+
rate_id: "dlvrt_mock_standard",
|
|
5439
|
+
name: "Standard",
|
|
5440
|
+
fee: standardFree ? money(0) : money(15),
|
|
5441
|
+
currency: "GHS",
|
|
5442
|
+
free_delivery_applied: standardFree,
|
|
5443
|
+
free_over_amount: money(200),
|
|
5444
|
+
eta_min_minutes: 45,
|
|
5445
|
+
eta_max_minutes: 90,
|
|
5446
|
+
is_default: true,
|
|
5447
|
+
details: optionDetails("dlvrt_mock_standard", "Standard")
|
|
5448
|
+
},
|
|
5449
|
+
{
|
|
5450
|
+
rate_id: "dlvrt_mock_express",
|
|
5451
|
+
name: "Express",
|
|
5452
|
+
description: "Delivered within the hour",
|
|
5453
|
+
fee: money(25),
|
|
5454
|
+
currency: "GHS",
|
|
5455
|
+
free_delivery_applied: false,
|
|
5456
|
+
eta_min_minutes: 30,
|
|
5457
|
+
eta_max_minutes: 60,
|
|
5458
|
+
is_default: false,
|
|
5459
|
+
details: optionDetails("dlvrt_mock_express", "Express")
|
|
5460
|
+
}
|
|
5461
|
+
]
|
|
5462
|
+
};
|
|
5403
5463
|
}
|
|
5404
5464
|
};
|
|
5405
5465
|
}
|