@moonbase.sh/storefront-api 0.2.28 → 0.2.31

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 CHANGED
@@ -41,6 +41,7 @@ __export(src_exports, {
41
41
  NotFoundError: () => NotFoundError,
42
42
  OrderStatus: () => OrderStatus,
43
43
  Platform: () => Platform,
44
+ schemas: () => schemas_exports2,
44
45
  utmToObject: () => utmToObject
45
46
  });
46
47
  module.exports = __toCommonJS(src_exports);
@@ -423,6 +424,15 @@ var IdentityEndpoints = class {
423
424
  };
424
425
 
425
426
  // src/orders/schemas.ts
427
+ var schemas_exports = {};
428
+ __export(schemas_exports, {
429
+ completedOrderSchema: () => completedOrderSchema,
430
+ openBundleLineItem: () => openBundleLineItem,
431
+ openOrderLineItem: () => openOrderLineItem,
432
+ openOrderSchema: () => openOrderSchema,
433
+ openProductLineItem: () => openProductLineItem,
434
+ orderSchema: () => orderSchema
435
+ });
426
436
  var import_zod8 = require("zod");
427
437
 
428
438
  // src/orders/models.ts
@@ -440,6 +450,12 @@ var couponSchema = import_zod8.z.object({
440
450
  name: import_zod8.z.string(),
441
451
  description: import_zod8.z.string()
442
452
  });
453
+ var lineItemProductSchema = import_zod8.z.object({
454
+ id: import_zod8.z.string(),
455
+ name: import_zod8.z.string(),
456
+ tagline: import_zod8.z.string(),
457
+ iconUrl: import_zod8.z.string().nullable()
458
+ });
443
459
  var openProductLineItem = import_zod8.z.object({
444
460
  id: import_zod8.z.string(),
445
461
  type: import_zod8.z.literal("Product"),
@@ -448,9 +464,19 @@ var openProductLineItem = import_zod8.z.object({
448
464
  variationId: import_zod8.z.string(),
449
465
  price: priceCollectionSchema.optional(),
450
466
  variation: pricingVariationSchema.optional(),
451
- product: storefrontProductSchema.optional(),
467
+ product: lineItemProductSchema.optional(),
452
468
  appliedDiscount: discountSchema.optional()
453
469
  });
470
+ var lineItemBundleSchema = import_zod8.z.object({
471
+ id: import_zod8.z.string(),
472
+ name: import_zod8.z.string(),
473
+ tagline: import_zod8.z.string(),
474
+ iconUrl: import_zod8.z.string().nullable(),
475
+ partial: import_zod8.z.boolean(),
476
+ products: lineItemProductSchema.and(import_zod8.z.object({
477
+ included: import_zod8.z.boolean().optional()
478
+ })).array()
479
+ });
454
480
  var openBundleLineItem = import_zod8.z.object({
455
481
  id: import_zod8.z.string(),
456
482
  type: import_zod8.z.literal("Bundle"),
@@ -459,7 +485,7 @@ var openBundleLineItem = import_zod8.z.object({
459
485
  variationId: import_zod8.z.string(),
460
486
  price: priceCollectionSchema.optional(),
461
487
  variation: pricingVariationSchema.optional(),
462
- bundle: storefrontBundleSchema.optional(),
488
+ bundle: lineItemBundleSchema.optional(),
463
489
  appliedDiscount: discountSchema.optional()
464
490
  });
465
491
  var openOrderLineItem = import_zod8.z.discriminatedUnion("type", [
@@ -854,6 +880,12 @@ var InventoryEndpoints = class {
854
880
  }
855
881
  };
856
882
 
883
+ // src/schemas.ts
884
+ var schemas_exports2 = {};
885
+ __export(schemas_exports2, {
886
+ orders: () => schemas_exports
887
+ });
888
+
857
889
  // src/index.ts
858
890
  var MoonbaseClient = class {
859
891
  constructor(configuration) {
@@ -882,5 +914,6 @@ var MoonbaseClient = class {
882
914
  NotFoundError,
883
915
  OrderStatus,
884
916
  Platform,
917
+ schemas,
885
918
  utmToObject
886
919
  });