@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.cjs
CHANGED
|
@@ -488,10 +488,39 @@ var openOrderSchema = import_zod8.z.object({
|
|
|
488
488
|
currency: import_zod8.z.string(),
|
|
489
489
|
items: openOrderLineItem.array(),
|
|
490
490
|
couponsApplied: couponSchema.array(),
|
|
491
|
-
checkoutUrl: import_zod8.z.string().optional()
|
|
491
|
+
checkoutUrl: import_zod8.z.string().optional(),
|
|
492
|
+
embeddedCheckoutUrl: import_zod8.z.string().optional()
|
|
493
|
+
});
|
|
494
|
+
var moneySchema = import_zod8.z.object({
|
|
495
|
+
currency: import_zod8.z.string(),
|
|
496
|
+
amount: import_zod8.z.number()
|
|
497
|
+
});
|
|
498
|
+
var orderTotalSchema = import_zod8.z.object({
|
|
499
|
+
original: moneySchema,
|
|
500
|
+
discount: moneySchema,
|
|
501
|
+
subtotal: moneySchema,
|
|
502
|
+
taxes: moneySchema,
|
|
503
|
+
due: moneySchema
|
|
504
|
+
});
|
|
505
|
+
var customerSnapshotSchema = import_zod8.z.object({
|
|
506
|
+
name: import_zod8.z.string().nullable(),
|
|
507
|
+
businessName: import_zod8.z.string().nullable(),
|
|
508
|
+
taxId: import_zod8.z.string().nullable(),
|
|
509
|
+
email: import_zod8.z.string().nullable(),
|
|
510
|
+
address: addressSchema.nullable()
|
|
511
|
+
});
|
|
512
|
+
var completedOrderSchema = import_zod8.z.object({
|
|
513
|
+
id: import_zod8.z.string(),
|
|
514
|
+
status: import_zod8.z.literal("Completed" /* Completed */),
|
|
515
|
+
currency: import_zod8.z.string(),
|
|
516
|
+
customer: customerSnapshotSchema,
|
|
517
|
+
total: orderTotalSchema,
|
|
518
|
+
items: openOrderLineItem.array(),
|
|
519
|
+
couponsApplied: couponSchema.array()
|
|
492
520
|
});
|
|
493
521
|
var orderSchema = import_zod8.z.discriminatedUnion("status", [
|
|
494
|
-
openOrderSchema
|
|
522
|
+
openOrderSchema,
|
|
523
|
+
completedOrderSchema
|
|
495
524
|
]);
|
|
496
525
|
|
|
497
526
|
// src/orders/endpoints.ts
|