@moonbase.sh/storefront-api 0.3.1 → 0.3.4

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
@@ -43,7 +43,8 @@ __export(index_exports, {
43
43
  NotFoundError: () => NotFoundError,
44
44
  OrderStatus: () => OrderStatus,
45
45
  Platform: () => Platform,
46
- schemas: () => schemas_exports2,
46
+ TokenStore: () => TokenStore,
47
+ schemas: () => schemas_exports3,
47
48
  utmToObject: () => utmToObject
48
49
  });
49
50
  module.exports = __toCommonJS(index_exports);
@@ -120,6 +121,7 @@ var pricingVariationSchema = import_zod.z.object({
120
121
  price: priceCollectionSchema,
121
122
  hasDiscount: import_zod.z.boolean(),
122
123
  discount: discountSchema.optional(),
124
+ // TODO: Remove default once subscriptions are live
123
125
  recurrence: recurrenceSchema.default({ type: "OneOff" }),
124
126
  pricingTiers: import_zod.z.array(pricingTierSchema).nullish()
125
127
  });
@@ -363,6 +365,14 @@ async function handleResponseProblem(response) {
363
365
  }
364
366
 
365
367
  // src/identity/schemas.ts
368
+ var schemas_exports = {};
369
+ __export(schemas_exports, {
370
+ addressSchema: () => addressSchema,
371
+ communicationPreferencesSchema: () => communicationPreferencesSchema,
372
+ identityUserSchema: () => identityUserSchema,
373
+ userAccountConfirmedSchema: () => userAccountConfirmedSchema,
374
+ userSchema: () => userSchema
375
+ });
366
376
  var import_zod7 = require("zod");
367
377
  var addressSchema = import_zod7.z.object({
368
378
  countryCode: import_zod7.z.string(),
@@ -628,8 +638,8 @@ var InventoryEndpoints = class {
628
638
  };
629
639
 
630
640
  // src/orders/schemas.ts
631
- var schemas_exports = {};
632
- __export(schemas_exports, {
641
+ var schemas_exports2 = {};
642
+ __export(schemas_exports2, {
633
643
  completedOrderSchema: () => completedOrderSchema,
634
644
  openBundleLineItem: () => openBundleLineItem,
635
645
  openOrderLineItem: () => openOrderLineItem,
@@ -1015,9 +1025,10 @@ var VoucherEndpoints = class {
1015
1025
  };
1016
1026
 
1017
1027
  // src/schemas.ts
1018
- var schemas_exports2 = {};
1019
- __export(schemas_exports2, {
1020
- orders: () => schemas_exports
1028
+ var schemas_exports3 = {};
1029
+ __export(schemas_exports3, {
1030
+ identity: () => schemas_exports,
1031
+ orders: () => schemas_exports2
1021
1032
  });
1022
1033
 
1023
1034
  // src/index.ts
@@ -1051,6 +1062,7 @@ var MoonbaseClient = class {
1051
1062
  NotFoundError,
1052
1063
  OrderStatus,
1053
1064
  Platform,
1065
+ TokenStore,
1054
1066
  schemas,
1055
1067
  utmToObject
1056
1068
  });
package/dist/index.d.cts CHANGED
@@ -195,6 +195,15 @@ declare const userAccountConfirmedSchema: z.ZodObject<{
195
195
  resetPasswordToken: string | null;
196
196
  }>;
197
197
 
198
+ declare const schemas$2_addressSchema: typeof addressSchema;
199
+ declare const schemas$2_communicationPreferencesSchema: typeof communicationPreferencesSchema;
200
+ declare const schemas$2_identityUserSchema: typeof identityUserSchema;
201
+ declare const schemas$2_userAccountConfirmedSchema: typeof userAccountConfirmedSchema;
202
+ declare const schemas$2_userSchema: typeof userSchema;
203
+ declare namespace schemas$2 {
204
+ export { schemas$2_addressSchema as addressSchema, schemas$2_communicationPreferencesSchema as communicationPreferencesSchema, schemas$2_identityUserSchema as identityUserSchema, schemas$2_userAccountConfirmedSchema as userAccountConfirmedSchema, schemas$2_userSchema as userSchema };
205
+ }
206
+
198
207
  type IdentityUser = z.infer<typeof identityUserSchema>;
199
208
  type UserTokens = IdentityUser & {
200
209
  expiresAt: Date;
@@ -14566,7 +14575,7 @@ declare class VoucherEndpoints {
14566
14575
  }
14567
14576
 
14568
14577
  declare namespace schemas {
14569
- export { schemas$1 as orders };
14578
+ export { schemas$2 as identity, schemas$1 as orders };
14570
14579
  }
14571
14580
 
14572
14581
  declare const storefrontProductSchema: z.ZodObject<{
@@ -18448,4 +18457,4 @@ declare class MoonbaseClient {
18448
18457
  orders: OrderEndpoints;
18449
18458
  }
18450
18459
 
18451
- export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestFulfillmentType, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type CompletedOrder, CycleLength, type Discount, type Download, type DownloadManifest, type IRecurrence, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingTier, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, type UrchinTrackingModule, type User, type UserAccountConfirmed, type Vendor, type Voucher, schemas, utmToObject };
18460
+ export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestFulfillmentType, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type CompletedOrder, CycleLength, type Discount, type Download, type DownloadManifest, type IRecurrence, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingTier, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, TokenStore, type UrchinTrackingModule, type User, type UserAccountConfirmed, type Vendor, type Voucher, schemas, utmToObject };
package/dist/index.d.ts CHANGED
@@ -195,6 +195,15 @@ declare const userAccountConfirmedSchema: z.ZodObject<{
195
195
  resetPasswordToken: string | null;
196
196
  }>;
197
197
 
198
+ declare const schemas$2_addressSchema: typeof addressSchema;
199
+ declare const schemas$2_communicationPreferencesSchema: typeof communicationPreferencesSchema;
200
+ declare const schemas$2_identityUserSchema: typeof identityUserSchema;
201
+ declare const schemas$2_userAccountConfirmedSchema: typeof userAccountConfirmedSchema;
202
+ declare const schemas$2_userSchema: typeof userSchema;
203
+ declare namespace schemas$2 {
204
+ export { schemas$2_addressSchema as addressSchema, schemas$2_communicationPreferencesSchema as communicationPreferencesSchema, schemas$2_identityUserSchema as identityUserSchema, schemas$2_userAccountConfirmedSchema as userAccountConfirmedSchema, schemas$2_userSchema as userSchema };
205
+ }
206
+
198
207
  type IdentityUser = z.infer<typeof identityUserSchema>;
199
208
  type UserTokens = IdentityUser & {
200
209
  expiresAt: Date;
@@ -14566,7 +14575,7 @@ declare class VoucherEndpoints {
14566
14575
  }
14567
14576
 
14568
14577
  declare namespace schemas {
14569
- export { schemas$1 as orders };
14578
+ export { schemas$2 as identity, schemas$1 as orders };
14570
14579
  }
14571
14580
 
14572
14581
  declare const storefrontProductSchema: z.ZodObject<{
@@ -18448,4 +18457,4 @@ declare class MoonbaseClient {
18448
18457
  orders: OrderEndpoints;
18449
18458
  }
18450
18459
 
18451
- export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestFulfillmentType, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type CompletedOrder, CycleLength, type Discount, type Download, type DownloadManifest, type IRecurrence, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingTier, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, type UrchinTrackingModule, type User, type UserAccountConfirmed, type Vendor, type Voucher, schemas, utmToObject };
18460
+ export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestFulfillmentType, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type CompletedOrder, CycleLength, type Discount, type Download, type DownloadManifest, type IRecurrence, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingTier, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, TokenStore, type UrchinTrackingModule, type User, type UserAccountConfirmed, type Vendor, type Voucher, schemas, utmToObject };
package/dist/index.js CHANGED
@@ -76,6 +76,7 @@ var pricingVariationSchema = z.object({
76
76
  price: priceCollectionSchema,
77
77
  hasDiscount: z.boolean(),
78
78
  discount: discountSchema.optional(),
79
+ // TODO: Remove default once subscriptions are live
79
80
  recurrence: recurrenceSchema.default({ type: "OneOff" }),
80
81
  pricingTiers: z.array(pricingTierSchema).nullish()
81
82
  });
@@ -319,6 +320,14 @@ async function handleResponseProblem(response) {
319
320
  }
320
321
 
321
322
  // src/identity/schemas.ts
323
+ var schemas_exports = {};
324
+ __export(schemas_exports, {
325
+ addressSchema: () => addressSchema,
326
+ communicationPreferencesSchema: () => communicationPreferencesSchema,
327
+ identityUserSchema: () => identityUserSchema,
328
+ userAccountConfirmedSchema: () => userAccountConfirmedSchema,
329
+ userSchema: () => userSchema
330
+ });
322
331
  import { z as z7 } from "zod";
323
332
  var addressSchema = z7.object({
324
333
  countryCode: z7.string(),
@@ -584,8 +593,8 @@ var InventoryEndpoints = class {
584
593
  };
585
594
 
586
595
  // src/orders/schemas.ts
587
- var schemas_exports = {};
588
- __export(schemas_exports, {
596
+ var schemas_exports2 = {};
597
+ __export(schemas_exports2, {
589
598
  completedOrderSchema: () => completedOrderSchema,
590
599
  openBundleLineItem: () => openBundleLineItem,
591
600
  openOrderLineItem: () => openOrderLineItem,
@@ -971,9 +980,10 @@ var VoucherEndpoints = class {
971
980
  };
972
981
 
973
982
  // src/schemas.ts
974
- var schemas_exports2 = {};
975
- __export(schemas_exports2, {
976
- orders: () => schemas_exports
983
+ var schemas_exports3 = {};
984
+ __export(schemas_exports3, {
985
+ identity: () => schemas_exports,
986
+ orders: () => schemas_exports2
977
987
  });
978
988
 
979
989
  // src/index.ts
@@ -1006,6 +1016,7 @@ export {
1006
1016
  NotFoundError,
1007
1017
  OrderStatus,
1008
1018
  Platform,
1009
- schemas_exports2 as schemas,
1019
+ TokenStore,
1020
+ schemas_exports3 as schemas,
1010
1021
  utmToObject
1011
1022
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/storefront-api",
3
3
  "type": "module",
4
- "version": "0.3.1",
4
+ "version": "0.3.4",
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",