@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.js CHANGED
@@ -1,3 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
1
7
  // src/activationRequests/endpoints.ts
2
8
  import { z as z5 } from "zod";
3
9
 
@@ -376,6 +382,15 @@ var IdentityEndpoints = class {
376
382
  };
377
383
 
378
384
  // src/orders/schemas.ts
385
+ var schemas_exports = {};
386
+ __export(schemas_exports, {
387
+ completedOrderSchema: () => completedOrderSchema,
388
+ openBundleLineItem: () => openBundleLineItem,
389
+ openOrderLineItem: () => openOrderLineItem,
390
+ openOrderSchema: () => openOrderSchema,
391
+ openProductLineItem: () => openProductLineItem,
392
+ orderSchema: () => orderSchema
393
+ });
379
394
  import { z as z8 } from "zod";
380
395
 
381
396
  // src/orders/models.ts
@@ -393,6 +408,12 @@ var couponSchema = z8.object({
393
408
  name: z8.string(),
394
409
  description: z8.string()
395
410
  });
411
+ var lineItemProductSchema = z8.object({
412
+ id: z8.string(),
413
+ name: z8.string(),
414
+ tagline: z8.string(),
415
+ iconUrl: z8.string().nullable()
416
+ });
396
417
  var openProductLineItem = z8.object({
397
418
  id: z8.string(),
398
419
  type: z8.literal("Product"),
@@ -401,9 +422,19 @@ var openProductLineItem = z8.object({
401
422
  variationId: z8.string(),
402
423
  price: priceCollectionSchema.optional(),
403
424
  variation: pricingVariationSchema.optional(),
404
- product: storefrontProductSchema.optional(),
425
+ product: lineItemProductSchema.optional(),
405
426
  appliedDiscount: discountSchema.optional()
406
427
  });
428
+ var lineItemBundleSchema = z8.object({
429
+ id: z8.string(),
430
+ name: z8.string(),
431
+ tagline: z8.string(),
432
+ iconUrl: z8.string().nullable(),
433
+ partial: z8.boolean(),
434
+ products: lineItemProductSchema.and(z8.object({
435
+ included: z8.boolean().optional()
436
+ })).array()
437
+ });
407
438
  var openBundleLineItem = z8.object({
408
439
  id: z8.string(),
409
440
  type: z8.literal("Bundle"),
@@ -412,7 +443,7 @@ var openBundleLineItem = z8.object({
412
443
  variationId: z8.string(),
413
444
  price: priceCollectionSchema.optional(),
414
445
  variation: pricingVariationSchema.optional(),
415
- bundle: storefrontBundleSchema.optional(),
446
+ bundle: lineItemBundleSchema.optional(),
416
447
  appliedDiscount: discountSchema.optional()
417
448
  });
418
449
  var openOrderLineItem = z8.discriminatedUnion("type", [
@@ -807,6 +838,12 @@ var InventoryEndpoints = class {
807
838
  }
808
839
  };
809
840
 
841
+ // src/schemas.ts
842
+ var schemas_exports2 = {};
843
+ __export(schemas_exports2, {
844
+ orders: () => schemas_exports
845
+ });
846
+
810
847
  // src/index.ts
811
848
  var MoonbaseClient = class {
812
849
  constructor(configuration) {
@@ -834,5 +871,6 @@ export {
834
871
  NotFoundError,
835
872
  OrderStatus,
836
873
  Platform,
874
+ schemas_exports2 as schemas,
837
875
  utmToObject
838
876
  };
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.28",
4
+ "version": "0.2.31",
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",
@@ -17,7 +17,7 @@
17
17
  "zod": "^3.23.8"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/node": "^22.5.2",
20
+ "@types/node": "^22.5.4",
21
21
  "rimraf": "^6.0.1",
22
22
  "tsup": "^8.2.4",
23
23
  "typescript": "~5.5.4"