@moonbase.sh/storefront-api 1.0.16 → 1.0.19
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 +8 -2
- package/dist/index.d.cts +177 -2
- package/dist/index.d.ts +177 -2
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -103,6 +103,9 @@ var pricingVariationSchema = z.object({
|
|
|
103
103
|
recurrence: recurrenceSchema,
|
|
104
104
|
pricingTiers: z.array(pricingTierSchema).nullish()
|
|
105
105
|
});
|
|
106
|
+
var rawPropertyValueSchema = z.lazy(
|
|
107
|
+
() => z.union([z.string(), z.number(), z.boolean(), z.record(rawPropertyValueSchema)])
|
|
108
|
+
);
|
|
106
109
|
function paged(itemSchema) {
|
|
107
110
|
return z.object({
|
|
108
111
|
items: z.array(itemSchema),
|
|
@@ -191,6 +194,7 @@ var storefrontProductSchema = z3.object({
|
|
|
191
194
|
downloads: downloadSchema.array().optional(),
|
|
192
195
|
defaultVariation: pricingVariationSchema.optional(),
|
|
193
196
|
variations: pricingVariationSchema.array().optional(),
|
|
197
|
+
properties: z3.record(rawPropertyValueSchema).nullish(),
|
|
194
198
|
type: z3.string().optional().default("Product").pipe(z3.literal("Product"))
|
|
195
199
|
});
|
|
196
200
|
var storefrontBundleSchema = z3.object({
|
|
@@ -206,6 +210,7 @@ var storefrontBundleSchema = z3.object({
|
|
|
206
210
|
})).array(),
|
|
207
211
|
defaultVariation: pricingVariationSchema.optional(),
|
|
208
212
|
variations: pricingVariationSchema.array().optional(),
|
|
213
|
+
properties: z3.record(rawPropertyValueSchema).nullish(),
|
|
209
214
|
type: z3.string().optional().default("Bundle").pipe(z3.literal("Bundle"))
|
|
210
215
|
});
|
|
211
216
|
var cartContainsItemsConditionSchema = z3.object({
|
|
@@ -390,7 +395,7 @@ import { z as z7 } from "zod";
|
|
|
390
395
|
|
|
391
396
|
// src/identity/models.ts
|
|
392
397
|
var ConnectableAccountProvider = /* @__PURE__ */ ((ConnectableAccountProvider2) => {
|
|
393
|
-
ConnectableAccountProvider2["
|
|
398
|
+
ConnectableAccountProvider2["iLok"] = "iLok";
|
|
394
399
|
return ConnectableAccountProvider2;
|
|
395
400
|
})(ConnectableAccountProvider || {});
|
|
396
401
|
|
|
@@ -408,7 +413,7 @@ var communicationPreferencesSchema = z7.object({
|
|
|
408
413
|
// productUpdatesOptIn: z.boolean(), // TODO: Enable when relevant
|
|
409
414
|
});
|
|
410
415
|
var ilokConnectedAccountSchema = z7.object({
|
|
411
|
-
provider: z7.literal("
|
|
416
|
+
provider: z7.literal("iLok" /* iLok */),
|
|
412
417
|
isConnected: z7.boolean(),
|
|
413
418
|
pendingLicenseFulfillments: z7.boolean(),
|
|
414
419
|
accountId: z7.string().nullish()
|
|
@@ -625,6 +630,7 @@ var licenseSchema = z8.object({
|
|
|
625
630
|
externalFulfillment: externalLicenseContent.optional(),
|
|
626
631
|
requiredConnectedAccount: z8.nativeEnum(ConnectableAccountProvider).nullish(),
|
|
627
632
|
fulfillmentMessage: z8.string().optional(),
|
|
633
|
+
properties: z8.record(rawPropertyValueSchema).nullish(),
|
|
628
634
|
expiresAt: z8.coerce.date().optional(),
|
|
629
635
|
createdAt: z8.coerce.date()
|
|
630
636
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.19",
|
|
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",
|