@moonbase.sh/storefront-api 1.0.17 → 1.0.20
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 +19 -4
- package/dist/index.d.cts +230 -3
- package/dist/index.d.ts +230 -3
- package/dist/index.js +19 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -69,7 +69,8 @@ __export(schemas_exports2, {
|
|
|
69
69
|
storefrontBundleSchema: () => storefrontBundleSchema,
|
|
70
70
|
storefrontOfferSchema: () => storefrontOfferSchema,
|
|
71
71
|
storefrontProductSchema: () => storefrontProductSchema,
|
|
72
|
-
storefrontSchema: () => storefrontSchema
|
|
72
|
+
storefrontSchema: () => storefrontSchema,
|
|
73
|
+
taxEstimateSchema: () => taxEstimateSchema
|
|
73
74
|
});
|
|
74
75
|
var import_zod3 = require("zod");
|
|
75
76
|
|
|
@@ -151,6 +152,9 @@ var pricingVariationSchema = import_zod.z.object({
|
|
|
151
152
|
recurrence: recurrenceSchema,
|
|
152
153
|
pricingTiers: import_zod.z.array(pricingTierSchema).nullish()
|
|
153
154
|
});
|
|
155
|
+
var rawPropertyValueSchema = import_zod.z.lazy(
|
|
156
|
+
() => import_zod.z.union([import_zod.z.string(), import_zod.z.number(), import_zod.z.boolean(), import_zod.z.record(rawPropertyValueSchema)])
|
|
157
|
+
);
|
|
154
158
|
function paged(itemSchema) {
|
|
155
159
|
return import_zod.z.object({
|
|
156
160
|
items: import_zod.z.array(itemSchema),
|
|
@@ -239,6 +243,7 @@ var storefrontProductSchema = import_zod3.z.object({
|
|
|
239
243
|
downloads: downloadSchema.array().optional(),
|
|
240
244
|
defaultVariation: pricingVariationSchema.optional(),
|
|
241
245
|
variations: pricingVariationSchema.array().optional(),
|
|
246
|
+
properties: import_zod3.z.record(rawPropertyValueSchema).nullish(),
|
|
242
247
|
type: import_zod3.z.string().optional().default("Product").pipe(import_zod3.z.literal("Product"))
|
|
243
248
|
});
|
|
244
249
|
var storefrontBundleSchema = import_zod3.z.object({
|
|
@@ -254,6 +259,7 @@ var storefrontBundleSchema = import_zod3.z.object({
|
|
|
254
259
|
})).array(),
|
|
255
260
|
defaultVariation: pricingVariationSchema.optional(),
|
|
256
261
|
variations: pricingVariationSchema.array().optional(),
|
|
262
|
+
properties: import_zod3.z.record(rawPropertyValueSchema).nullish(),
|
|
257
263
|
type: import_zod3.z.string().optional().default("Bundle").pipe(import_zod3.z.literal("Bundle"))
|
|
258
264
|
});
|
|
259
265
|
var cartContainsItemsConditionSchema = import_zod3.z.object({
|
|
@@ -269,6 +275,12 @@ var storefrontOfferSchema = import_zod3.z.object({
|
|
|
269
275
|
condition: offerConditionSchema,
|
|
270
276
|
discount: discountSchema
|
|
271
277
|
});
|
|
278
|
+
var taxEstimateSchema = import_zod3.z.object({
|
|
279
|
+
rate: import_zod3.z.number(),
|
|
280
|
+
mode: import_zod3.z.enum(["Exclusive", "Inclusive"]),
|
|
281
|
+
countryCode: import_zod3.z.string(),
|
|
282
|
+
region: import_zod3.z.string().optional()
|
|
283
|
+
});
|
|
272
284
|
var storefrontSchema = import_zod3.z.object({
|
|
273
285
|
suggestedCurrency: import_zod3.z.string(),
|
|
274
286
|
// Enabled currencies need to be optional since we may still have old, cached representations in browsers
|
|
@@ -276,7 +288,9 @@ var storefrontSchema = import_zod3.z.object({
|
|
|
276
288
|
products: storefrontProductSchema.array(),
|
|
277
289
|
bundles: storefrontBundleSchema.array(),
|
|
278
290
|
// Offers need to be optional since we may still have old, cached representations in browsers
|
|
279
|
-
offers: storefrontOfferSchema.array().optional()
|
|
291
|
+
offers: storefrontOfferSchema.array().optional(),
|
|
292
|
+
// Depending on circumstances, we may have a tax estimate available
|
|
293
|
+
estimatedTax: taxEstimateSchema.optional()
|
|
280
294
|
});
|
|
281
295
|
|
|
282
296
|
// src/activationRequests/models.ts
|
|
@@ -438,7 +452,7 @@ var import_zod7 = require("zod");
|
|
|
438
452
|
|
|
439
453
|
// src/identity/models.ts
|
|
440
454
|
var ConnectableAccountProvider = /* @__PURE__ */ ((ConnectableAccountProvider2) => {
|
|
441
|
-
ConnectableAccountProvider2["
|
|
455
|
+
ConnectableAccountProvider2["iLok"] = "iLok";
|
|
442
456
|
return ConnectableAccountProvider2;
|
|
443
457
|
})(ConnectableAccountProvider || {});
|
|
444
458
|
|
|
@@ -456,7 +470,7 @@ var communicationPreferencesSchema = import_zod7.z.object({
|
|
|
456
470
|
// productUpdatesOptIn: z.boolean(), // TODO: Enable when relevant
|
|
457
471
|
});
|
|
458
472
|
var ilokConnectedAccountSchema = import_zod7.z.object({
|
|
459
|
-
provider: import_zod7.z.literal("
|
|
473
|
+
provider: import_zod7.z.literal("iLok" /* iLok */),
|
|
460
474
|
isConnected: import_zod7.z.boolean(),
|
|
461
475
|
pendingLicenseFulfillments: import_zod7.z.boolean(),
|
|
462
476
|
accountId: import_zod7.z.string().nullish()
|
|
@@ -673,6 +687,7 @@ var licenseSchema = import_zod8.z.object({
|
|
|
673
687
|
externalFulfillment: externalLicenseContent.optional(),
|
|
674
688
|
requiredConnectedAccount: import_zod8.z.nativeEnum(ConnectableAccountProvider).nullish(),
|
|
675
689
|
fulfillmentMessage: import_zod8.z.string().optional(),
|
|
690
|
+
properties: import_zod8.z.record(rawPropertyValueSchema).nullish(),
|
|
676
691
|
expiresAt: import_zod8.z.coerce.date().optional(),
|
|
677
692
|
createdAt: import_zod8.z.coerce.date()
|
|
678
693
|
});
|