@moonbase.sh/storefront-api 0.2.14 → 0.2.17
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/index.cjs +31 -2
- package/dist/index.d.cts +5179 -47
- package/dist/index.d.ts +5179 -47
- package/dist/index.js +31 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -441,10 +441,39 @@ var openOrderSchema = z8.object({
|
|
|
441
441
|
currency: z8.string(),
|
|
442
442
|
items: openOrderLineItem.array(),
|
|
443
443
|
couponsApplied: couponSchema.array(),
|
|
444
|
-
checkoutUrl: z8.string().optional()
|
|
444
|
+
checkoutUrl: z8.string().optional(),
|
|
445
|
+
embeddedCheckoutUrl: z8.string().optional()
|
|
446
|
+
});
|
|
447
|
+
var moneySchema = z8.object({
|
|
448
|
+
currency: z8.string(),
|
|
449
|
+
amount: z8.number()
|
|
450
|
+
});
|
|
451
|
+
var orderTotalSchema = z8.object({
|
|
452
|
+
original: moneySchema,
|
|
453
|
+
discount: moneySchema,
|
|
454
|
+
subtotal: moneySchema,
|
|
455
|
+
taxes: moneySchema,
|
|
456
|
+
due: moneySchema
|
|
457
|
+
});
|
|
458
|
+
var customerSnapshotSchema = z8.object({
|
|
459
|
+
name: z8.string().nullable(),
|
|
460
|
+
businessName: z8.string().nullable(),
|
|
461
|
+
taxId: z8.string().nullable(),
|
|
462
|
+
email: z8.string().nullable(),
|
|
463
|
+
address: addressSchema.nullable()
|
|
464
|
+
});
|
|
465
|
+
var completedOrderSchema = z8.object({
|
|
466
|
+
id: z8.string(),
|
|
467
|
+
status: z8.literal("Completed" /* Completed */),
|
|
468
|
+
currency: z8.string(),
|
|
469
|
+
customer: customerSnapshotSchema,
|
|
470
|
+
total: orderTotalSchema,
|
|
471
|
+
items: openOrderLineItem.array(),
|
|
472
|
+
couponsApplied: couponSchema.array()
|
|
445
473
|
});
|
|
446
474
|
var orderSchema = z8.discriminatedUnion("status", [
|
|
447
|
-
openOrderSchema
|
|
475
|
+
openOrderSchema,
|
|
476
|
+
completedOrderSchema
|
|
448
477
|
]);
|
|
449
478
|
|
|
450
479
|
// src/orders/endpoints.ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.17",
|
|
5
5
|
"description": "Package to let you build storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|