@moonbase.sh/storefront-api 0.2.22 → 0.2.24

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.js CHANGED
@@ -15,13 +15,15 @@ var percentageOffDiscountSchema = z.object({
15
15
  name: z.string(),
16
16
  description: z.string().optional(),
17
17
  percentage: z.number(),
18
- total: priceCollectionSchema
18
+ total: priceCollectionSchema.optional(),
19
+ isExclusive: z.boolean()
19
20
  });
20
21
  var flatAmountOffDiscountSchema = z.object({
21
22
  type: z.literal("FlatAmountOffDiscount"),
22
23
  name: z.string(),
23
24
  description: z.string().optional(),
24
- total: priceCollectionSchema
25
+ total: priceCollectionSchema.optional(),
26
+ isExclusive: z.boolean()
25
27
  });
26
28
  var discountSchema = z.discriminatedUnion("type", [
27
29
  percentageOffDiscountSchema,
@@ -391,25 +393,6 @@ var couponSchema = z8.object({
391
393
  name: z8.string(),
392
394
  description: z8.string()
393
395
  });
394
- var percentageOffDiscountSchema2 = z8.object({
395
- type: z8.literal("PercentageOffDiscount"),
396
- name: z8.string(),
397
- description: z8.string().optional(),
398
- percentage: z8.number(),
399
- total: priceCollectionSchema.optional(),
400
- isExclusive: z8.boolean()
401
- });
402
- var flatAmountOffDiscountSchema2 = z8.object({
403
- type: z8.literal("FlatAmountOffDiscount"),
404
- name: z8.string(),
405
- description: z8.string().optional(),
406
- total: priceCollectionSchema.optional(),
407
- isExclusive: z8.boolean()
408
- });
409
- var discountSchema2 = z8.discriminatedUnion("type", [
410
- percentageOffDiscountSchema2,
411
- flatAmountOffDiscountSchema2
412
- ]);
413
396
  var openProductLineItem = z8.object({
414
397
  id: z8.string(),
415
398
  type: z8.literal("Product"),
@@ -419,7 +402,7 @@ var openProductLineItem = z8.object({
419
402
  price: priceCollectionSchema.optional(),
420
403
  variation: pricingVariationSchema.optional(),
421
404
  product: storefrontProductSchema.optional(),
422
- appliedDiscount: discountSchema2.optional()
405
+ appliedDiscount: discountSchema.optional()
423
406
  });
424
407
  var openBundleLineItem = z8.object({
425
408
  id: z8.string(),
@@ -430,7 +413,7 @@ var openBundleLineItem = z8.object({
430
413
  price: priceCollectionSchema.optional(),
431
414
  variation: pricingVariationSchema.optional(),
432
415
  bundle: storefrontBundleSchema.optional(),
433
- appliedDiscount: discountSchema2.optional()
416
+ appliedDiscount: discountSchema.optional()
434
417
  });
435
418
  var openOrderLineItem = z8.discriminatedUnion("type", [
436
419
  openProductLineItem,
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.22",
4
+ "version": "0.2.24",
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",