@rebuy/rebuy 3.25.0 → 3.27.0
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 +898 -715
- package/dist/index.mjs +898 -715
- package/dist/schema/index.d.ts +10 -0
- package/dist/schema/postPurchaseEligibility.d.ts +12 -0
- package/dist/schema/postPurchaseExitPolicy.d.ts +20 -0
- package/dist/schema/postPurchaseIdentity.d.ts +27 -0
- package/dist/schema/postPurchaseOrderDecision.d.ts +10 -0
- package/dist/schema/postPurchasePolicy.d.ts +62 -0
- package/dist/schema/postPurchaseSelection.d.ts +29 -0
- package/dist/schema/postPurchaseSession.d.ts +112 -0
- package/dist/schema/postPurchaseSessionClose.d.ts +25 -0
- package/dist/schema/postPurchaseShadow.d.ts +124 -0
- package/dist/schema/postPurchaseSkipTrace.d.ts +19 -0
- package/dist/schema/widgets/checkout-and-beyond/banner.d.ts +1 -1
- package/dist/schema/widgets/checkout-and-beyond/carousel.d.ts +1 -1
- package/dist/schema/widgets/checkout-and-beyond/cartLine.d.ts +1 -1
- package/dist/schema/widgets/checkout-and-beyond/icons.d.ts +1 -1
- package/dist/schema/widgets/checkout-and-beyond/image.d.ts +2 -2
- package/dist/schema/widgets/checkout-and-beyond/offers.d.ts +1 -1
- package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts +1 -1
- package/dist/server/requestSchemas.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1252,57 +1252,214 @@ var OfferProduct = z5.object({
|
|
|
1252
1252
|
variants: z5.array(OfferProductVariant).min(1)
|
|
1253
1253
|
});
|
|
1254
1254
|
|
|
1255
|
-
// src/schema/
|
|
1255
|
+
// src/schema/postPurchaseEligibility.ts
|
|
1256
1256
|
import { z as z6 } from "zod";
|
|
1257
|
-
var
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1257
|
+
var PostPurchaseSkipReasonSchema = z6.enum(["empty", "no-eligible-subscription"]);
|
|
1258
|
+
|
|
1259
|
+
// src/schema/postPurchaseExitPolicy.ts
|
|
1260
|
+
import { z as z7 } from "zod";
|
|
1261
|
+
var EXIT_DELAY_MAX_MS = 60 * 60 * 1e3;
|
|
1262
|
+
var ExitPolicySchema = z7.discriminatedUnion("status", [
|
|
1263
|
+
z7.strictObject({ status: z7.literal("unavailable") }),
|
|
1264
|
+
z7.strictObject({
|
|
1265
|
+
delayMs: z7.number().int().nonnegative().max(EXIT_DELAY_MAX_MS),
|
|
1266
|
+
source: z7.enum(["admitted", "selected-flow"]),
|
|
1267
|
+
status: z7.literal("available")
|
|
1268
|
+
})
|
|
1269
|
+
]);
|
|
1270
|
+
|
|
1271
|
+
// src/schema/postPurchaseIdentity.ts
|
|
1272
|
+
import { z as z8 } from "zod";
|
|
1273
|
+
var POST_PURCHASE_ID_MAX = 128;
|
|
1274
|
+
var PostPurchaseTimestampSchema = z8.number().int().nonnegative();
|
|
1275
|
+
var PostPurchaseOrderIdSchema = z8.string().regex(/^gid:\/\/shopify\/Order\/[1-9]\d*$/);
|
|
1276
|
+
var ShopifyDomainSchema = z8.string().max(POST_PURCHASE_ID_MAX).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?\.myshopify\.com$/);
|
|
1277
|
+
var DecideRequestSchema = z8.object({
|
|
1278
|
+
checkoutToken: z8.string().min(1).max(POST_PURCHASE_ID_MAX),
|
|
1279
|
+
shop: ShopifyDomainSchema
|
|
1280
|
+
});
|
|
1281
|
+
var PostPurchaseAppIdSchema = z8.string().min(1).max(POST_PURCHASE_ID_MAX);
|
|
1282
|
+
var DecisionEntrySchema = z8.object({
|
|
1283
|
+
blockId: z8.number().int().positive(),
|
|
1284
|
+
blockIndex: z8.string(),
|
|
1285
|
+
blockParentIndex: z8.string(),
|
|
1286
|
+
flowId: z8.number().int().positive(),
|
|
1287
|
+
sectionId: z8.number().int().positive(),
|
|
1288
|
+
widgetId: z8.number().int().positive(),
|
|
1289
|
+
widgetTraffic: z8.number().min(0).max(100)
|
|
1290
|
+
});
|
|
1291
|
+
|
|
1292
|
+
// src/schema/postPurchaseOrderDecision.ts
|
|
1293
|
+
import { z as z9 } from "zod";
|
|
1294
|
+
var OrderDecisionSchema = z9.discriminatedUnion("owner", [
|
|
1295
|
+
z9.object({ owner: z9.literal("session"), sessionId: z9.string().regex(/^[a-f0-9]{64}$/) }),
|
|
1296
|
+
z9.object({ owner: z9.literal("release"), sessionId: z9.null() })
|
|
1297
|
+
]);
|
|
1298
|
+
|
|
1299
|
+
// src/schema/postPurchasePolicy.ts
|
|
1300
|
+
import { z as z10 } from "zod";
|
|
1301
|
+
var HoldSettingSchema = z10.discriminatedUnion("enabled", [
|
|
1302
|
+
z10.object({ durationMinutes: z10.number().int().min(1).max(60), enabled: z10.literal(true) }),
|
|
1303
|
+
z10.object({ durationMinutes: z10.null(), enabled: z10.literal(false) })
|
|
1304
|
+
]);
|
|
1305
|
+
var TimingSettingsSchema = z10.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
|
|
1306
|
+
var SessionPolicySchema = TimingSettingsSchema.extend({
|
|
1307
|
+
durationMinutes: z10.number().int().min(1).max(60).nullable(),
|
|
1308
|
+
source: z10.enum(["shop", "flow", "native"])
|
|
1309
|
+
}).refine(
|
|
1310
|
+
(policy) => {
|
|
1311
|
+
const expectedSource = policy.shopHold.enabled ? "shop" : policy.flowHold.enabled ? "flow" : "native";
|
|
1312
|
+
const expectedDuration = expectedSource === "shop" ? policy.shopHold.durationMinutes : expectedSource === "flow" ? policy.flowHold.durationMinutes : null;
|
|
1313
|
+
return policy.source === expectedSource && policy.durationMinutes === expectedDuration;
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
message: "source and durationMinutes must reflect the shop-over-flow-over-native precedence",
|
|
1317
|
+
path: ["source"]
|
|
1318
|
+
}
|
|
1319
|
+
);
|
|
1320
|
+
|
|
1321
|
+
// src/schema/postPurchaseSelection.ts
|
|
1322
|
+
import { z as z11 } from "zod";
|
|
1323
|
+
var SelectionClaimsSchema = DecideRequestSchema.extend({
|
|
1324
|
+
appId: PostPurchaseAppIdSchema,
|
|
1325
|
+
entry: DecisionEntrySchema,
|
|
1326
|
+
iss: z11.literal("rebuy-api"),
|
|
1327
|
+
purpose: z11.literal("post-purchase-selection")
|
|
1328
|
+
});
|
|
1329
|
+
var SessionStartRequestSchema = DecideRequestSchema.extend({
|
|
1330
|
+
selectionToken: z11.string().min(1).max(8192).optional()
|
|
1331
|
+
}).strict();
|
|
1332
|
+
|
|
1333
|
+
// src/schema/postPurchaseSession.ts
|
|
1334
|
+
import { z as z12 } from "zod";
|
|
1335
|
+
var SessionIdentitySchema = DecideRequestSchema.extend({ appId: PostPurchaseAppIdSchema });
|
|
1336
|
+
var SessionOrderTimingSchema = z12.object({
|
|
1337
|
+
nativeDeadline: PostPurchaseTimestampSchema,
|
|
1338
|
+
orderCreatedAt: PostPurchaseTimestampSchema,
|
|
1339
|
+
orderId: PostPurchaseOrderIdSchema,
|
|
1340
|
+
timingSource: z12.literal("shopify-order-created-at")
|
|
1341
|
+
});
|
|
1342
|
+
var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
|
|
1343
|
+
deadline: PostPurchaseTimestampSchema,
|
|
1344
|
+
entry: DecisionEntrySchema,
|
|
1345
|
+
policySnapshot: SessionPolicySchema,
|
|
1346
|
+
startedAt: PostPurchaseTimestampSchema
|
|
1347
|
+
}).refine((session) => session.orderCreatedAt <= session.startedAt, {
|
|
1348
|
+
message: "startedAt must not precede orderCreatedAt",
|
|
1349
|
+
path: ["startedAt"]
|
|
1350
|
+
}).refine((session) => session.startedAt <= session.deadline, {
|
|
1351
|
+
message: "deadline must not precede startedAt",
|
|
1352
|
+
path: ["deadline"]
|
|
1353
|
+
}).refine((session) => session.deadline <= session.nativeDeadline, {
|
|
1354
|
+
message: "deadline must not exceed nativeDeadline",
|
|
1355
|
+
path: ["deadline"]
|
|
1356
|
+
});
|
|
1357
|
+
var SessionStartResponseSchema = z12.object({
|
|
1358
|
+
data: z12.object({
|
|
1359
|
+
phase: z12.literal("render"),
|
|
1360
|
+
serverNow: PostPurchaseTimestampSchema,
|
|
1361
|
+
session: ReadySessionTimingSchema,
|
|
1362
|
+
workflowPhase: z12.literal("start")
|
|
1363
|
+
}),
|
|
1364
|
+
successful: z12.literal(true)
|
|
1365
|
+
});
|
|
1366
|
+
|
|
1367
|
+
// src/schema/postPurchaseSessionClose.ts
|
|
1368
|
+
import { z as z13 } from "zod";
|
|
1369
|
+
var SessionClosureSchema = z13.object({ closedAt: PostPurchaseTimestampSchema, status: z13.literal("closed") });
|
|
1370
|
+
var SessionCloseRequestSchema = DecideRequestSchema.strict();
|
|
1371
|
+
var SessionCloseResponseSchema = z13.object({ data: SessionClosureSchema, successful: z13.literal(true) });
|
|
1372
|
+
|
|
1373
|
+
// src/schema/postPurchaseShadow.ts
|
|
1374
|
+
import { z as z14 } from "zod";
|
|
1375
|
+
var PostPurchaseShadowSelectionSchema = z14.discriminatedUnion("verdict", [
|
|
1376
|
+
z14.object({ entry: DecisionEntrySchema, verdict: z14.literal("render") }),
|
|
1377
|
+
z14.object({ verdict: z14.literal("skip") })
|
|
1378
|
+
]);
|
|
1379
|
+
var PostPurchaseShadowReportFields = z14.object({
|
|
1380
|
+
differences: z14.array(z14.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
|
|
1381
|
+
message: "differences must not contain duplicate entries"
|
|
1382
|
+
}),
|
|
1383
|
+
legacySelection: PostPurchaseShadowSelectionSchema,
|
|
1384
|
+
phase: z14.literal("shouldRender"),
|
|
1385
|
+
sampleId: z14.string(),
|
|
1386
|
+
serverSelection: PostPurchaseShadowSelectionSchema.optional(),
|
|
1387
|
+
status: z14.enum(["match", "diverged", "incomplete"]),
|
|
1388
|
+
targetingFlowIds: z14.array(z14.number().int().positive()),
|
|
1389
|
+
workflowPhase: z14.literal("decide")
|
|
1390
|
+
});
|
|
1391
|
+
var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
|
|
1392
|
+
(report) => report.status !== "match" || report.differences.length === 0,
|
|
1393
|
+
{ message: "status 'match' requires an empty differences array", path: ["status"] }
|
|
1394
|
+
).refine((report) => report.status !== "diverged" || report.differences.length > 0, {
|
|
1395
|
+
message: "status 'diverged' requires a non-empty differences array",
|
|
1396
|
+
path: ["status"]
|
|
1397
|
+
}).refine((report) => report.status !== "diverged" || report.serverSelection !== void 0, {
|
|
1398
|
+
message: "status 'diverged' requires a serverSelection to diverge from",
|
|
1399
|
+
path: ["status"]
|
|
1400
|
+
});
|
|
1401
|
+
|
|
1402
|
+
// src/schema/postPurchaseSkipTrace.ts
|
|
1403
|
+
import { z as z15 } from "zod";
|
|
1404
|
+
var POST_PURCHASE_SKIP_LIMIT = 32;
|
|
1405
|
+
var PostPurchaseSkipTraceSchema = z15.array(
|
|
1406
|
+
z15.object({
|
|
1407
|
+
entry: DecisionEntrySchema,
|
|
1408
|
+
reason: PostPurchaseSkipReasonSchema
|
|
1409
|
+
})
|
|
1410
|
+
).max(POST_PURCHASE_SKIP_LIMIT);
|
|
1411
|
+
|
|
1412
|
+
// src/schema/shopConfig.ts
|
|
1413
|
+
import { z as z16 } from "zod";
|
|
1414
|
+
var ShopConfig = z16.object({
|
|
1415
|
+
activeExperiments: z16.array(
|
|
1416
|
+
z16.object({
|
|
1417
|
+
data: z16.array(
|
|
1418
|
+
z16.object({
|
|
1419
|
+
aliasName: z16.string(),
|
|
1420
|
+
cssInput: z16.string().nullish(),
|
|
1421
|
+
elementId: z16.coerce.number(),
|
|
1422
|
+
id: z16.coerce.number(),
|
|
1423
|
+
javascriptInput: z16.string().nullish(),
|
|
1424
|
+
traffic: z16.coerce.number()
|
|
1268
1425
|
})
|
|
1269
1426
|
),
|
|
1270
|
-
id:
|
|
1271
|
-
name:
|
|
1272
|
-
pageTarget:
|
|
1273
|
-
pageTargetUrl:
|
|
1274
|
-
placeholderId:
|
|
1275
|
-
type:
|
|
1427
|
+
id: z16.coerce.number(),
|
|
1428
|
+
name: z16.string(),
|
|
1429
|
+
pageTarget: z16.string().nullable(),
|
|
1430
|
+
pageTargetUrl: z16.string().nullable(),
|
|
1431
|
+
placeholderId: z16.coerce.number().nullable(),
|
|
1432
|
+
type: z16.string()
|
|
1276
1433
|
})
|
|
1277
1434
|
),
|
|
1278
|
-
activePackages:
|
|
1279
|
-
|
|
1280
|
-
cancelledAt:
|
|
1281
|
-
id:
|
|
1282
|
-
installedAt:
|
|
1283
|
-
isActive:
|
|
1284
|
-
isBillable:
|
|
1285
|
-
packageId:
|
|
1286
|
-
packageName:
|
|
1287
|
-
shortName:
|
|
1288
|
-
trialDays:
|
|
1289
|
-
uninstalledAt:
|
|
1435
|
+
activePackages: z16.array(
|
|
1436
|
+
z16.object({
|
|
1437
|
+
cancelledAt: z16.string().nullable(),
|
|
1438
|
+
id: z16.number(),
|
|
1439
|
+
installedAt: z16.string().nullable(),
|
|
1440
|
+
isActive: z16.boolean(),
|
|
1441
|
+
isBillable: z16.boolean(),
|
|
1442
|
+
packageId: z16.number(),
|
|
1443
|
+
packageName: z16.string(),
|
|
1444
|
+
shortName: z16.string(),
|
|
1445
|
+
trialDays: z16.number(),
|
|
1446
|
+
uninstalledAt: z16.string().nullable()
|
|
1290
1447
|
})
|
|
1291
1448
|
),
|
|
1292
|
-
apiKey:
|
|
1293
|
-
billingVersion:
|
|
1294
|
-
cacheKey:
|
|
1295
|
-
carousel:
|
|
1296
|
-
currency:
|
|
1297
|
-
currencySymbol:
|
|
1298
|
-
domain:
|
|
1299
|
-
enabledJquery:
|
|
1300
|
-
enabledPresentmentCurrencies:
|
|
1301
|
-
hasSmartCollectionsEnabled:
|
|
1302
|
-
hasSmartSearchEnabled:
|
|
1303
|
-
id:
|
|
1304
|
-
integrations:
|
|
1305
|
-
|
|
1449
|
+
apiKey: z16.string(),
|
|
1450
|
+
billingVersion: z16.string().nullable(),
|
|
1451
|
+
cacheKey: z16.coerce.number(),
|
|
1452
|
+
carousel: z16.enum(["flickity", "splide"]),
|
|
1453
|
+
currency: z16.string(),
|
|
1454
|
+
currencySymbol: z16.string(),
|
|
1455
|
+
domain: z16.string(),
|
|
1456
|
+
enabledJquery: z16.boolean(),
|
|
1457
|
+
enabledPresentmentCurrencies: z16.array(z16.string()),
|
|
1458
|
+
hasSmartCollectionsEnabled: z16.boolean(),
|
|
1459
|
+
hasSmartSearchEnabled: z16.boolean(),
|
|
1460
|
+
id: z16.coerce.number(),
|
|
1461
|
+
integrations: z16.record(
|
|
1462
|
+
z16.enum([
|
|
1306
1463
|
"attentive",
|
|
1307
1464
|
"judgeme",
|
|
1308
1465
|
"junip",
|
|
@@ -1315,46 +1472,46 @@ var ShopConfig = z6.object({
|
|
|
1315
1472
|
"stamped",
|
|
1316
1473
|
"yotpo"
|
|
1317
1474
|
]),
|
|
1318
|
-
|
|
1475
|
+
z16.union([z16.boolean(), z16.unknown()])
|
|
1319
1476
|
),
|
|
1320
|
-
markets:
|
|
1321
|
-
enabled:
|
|
1477
|
+
markets: z16.object({
|
|
1478
|
+
enabled: z16.boolean()
|
|
1322
1479
|
}),
|
|
1323
|
-
monetize:
|
|
1324
|
-
publisherKey:
|
|
1480
|
+
monetize: z16.object({
|
|
1481
|
+
publisherKey: z16.string().nullable()
|
|
1325
1482
|
}).nullish(),
|
|
1326
|
-
moneyFormat:
|
|
1327
|
-
myshopifyDomain:
|
|
1328
|
-
primaryLocale:
|
|
1329
|
-
productGroupsEnabled:
|
|
1330
|
-
rechargeCustomDomain:
|
|
1331
|
-
sellingPlansEnabled:
|
|
1332
|
-
shopId:
|
|
1333
|
-
shopifySellingPlansEnabled:
|
|
1334
|
-
shopName:
|
|
1335
|
-
storefrontAccessToken:
|
|
1336
|
-
useRebuyIcons:
|
|
1483
|
+
moneyFormat: z16.string(),
|
|
1484
|
+
myshopifyDomain: z16.string(),
|
|
1485
|
+
primaryLocale: z16.string(),
|
|
1486
|
+
productGroupsEnabled: z16.enum(["no", "yes"]).transform((value) => value === "yes"),
|
|
1487
|
+
rechargeCustomDomain: z16.string().nullable(),
|
|
1488
|
+
sellingPlansEnabled: z16.boolean(),
|
|
1489
|
+
shopId: z16.number(),
|
|
1490
|
+
shopifySellingPlansEnabled: z16.boolean(),
|
|
1491
|
+
shopName: z16.string(),
|
|
1492
|
+
storefrontAccessToken: z16.string().nullable(),
|
|
1493
|
+
useRebuyIcons: z16.boolean()
|
|
1337
1494
|
});
|
|
1338
1495
|
|
|
1339
1496
|
// src/schema/userConfig.ts
|
|
1340
|
-
import { z as
|
|
1341
|
-
var UserConfig =
|
|
1497
|
+
import { z as z17 } from "zod";
|
|
1498
|
+
var UserConfig = z17.object({
|
|
1342
1499
|
shop: ShopConfig,
|
|
1343
1500
|
/**
|
|
1344
1501
|
* `.catch(undefined)` is the safety bar: smart-cart shape drift can NEVER fail `fetchUserConfig`,
|
|
1345
1502
|
* which resolves the apiKey for every offers/monetize/analytics/gift request.
|
|
1346
1503
|
*/
|
|
1347
1504
|
smartCart: SmartCartConfig.nullish().catch(void 0),
|
|
1348
|
-
smartFlows:
|
|
1505
|
+
smartFlows: z17.array(z17.unknown())
|
|
1349
1506
|
});
|
|
1350
1507
|
|
|
1351
1508
|
// src/schema/widgetData.ts
|
|
1352
|
-
import { z as
|
|
1509
|
+
import { z as z47 } from "zod";
|
|
1353
1510
|
|
|
1354
1511
|
// src/schema/widgets/abTestingPlaceholder.ts
|
|
1355
|
-
import { z as
|
|
1356
|
-
var ABTestingPlaceholder =
|
|
1357
|
-
type:
|
|
1512
|
+
import { z as z18 } from "zod";
|
|
1513
|
+
var ABTestingPlaceholder = z18.looseObject({
|
|
1514
|
+
type: z18.literal("placeholder")
|
|
1358
1515
|
});
|
|
1359
1516
|
|
|
1360
1517
|
// src/schema/widgets/checkout-and-beyond/constants.ts
|
|
@@ -1614,26 +1771,26 @@ var targetAreas = {
|
|
|
1614
1771
|
};
|
|
1615
1772
|
|
|
1616
1773
|
// src/schema/widgets/checkoutExtension.ts
|
|
1617
|
-
import { z as
|
|
1618
|
-
var CheckoutExtension =
|
|
1619
|
-
type:
|
|
1774
|
+
import { z as z19 } from "zod";
|
|
1775
|
+
var CheckoutExtension = z19.looseObject({
|
|
1776
|
+
type: z19.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
|
|
1620
1777
|
});
|
|
1621
1778
|
|
|
1622
1779
|
// src/schema/widgets/contentBlock.ts
|
|
1623
|
-
import { z as
|
|
1780
|
+
import { z as z41 } from "zod";
|
|
1624
1781
|
|
|
1625
1782
|
// src/schema/widgets/checkout-and-beyond/root.ts
|
|
1626
|
-
import { z as
|
|
1783
|
+
import { z as z40 } from "zod";
|
|
1627
1784
|
|
|
1628
1785
|
// src/schema/widgets/checkout-and-beyond/layout.ts
|
|
1629
1786
|
import { v7 as uuidv712 } from "uuid";
|
|
1630
|
-
import { z as
|
|
1787
|
+
import { z as z39 } from "zod";
|
|
1631
1788
|
|
|
1632
1789
|
// src/schema/widgets/checkout-and-beyond/shared.ts
|
|
1633
|
-
import { z as
|
|
1790
|
+
import { z as z38 } from "zod";
|
|
1634
1791
|
|
|
1635
1792
|
// src/schema/widgets/checkout-and-beyond/banner.ts
|
|
1636
|
-
import { z as
|
|
1793
|
+
import { z as z20 } from "zod";
|
|
1637
1794
|
|
|
1638
1795
|
// src/schema/widgets/checkout-and-beyond/utils.ts
|
|
1639
1796
|
import { isPlainObject as isPlainObject2 } from "es-toolkit";
|
|
@@ -1711,11 +1868,11 @@ var isTextType = isSectionType(SectionType.text);
|
|
|
1711
1868
|
var isVariantsType = isSectionType(SectionType.variants);
|
|
1712
1869
|
|
|
1713
1870
|
// src/schema/widgets/checkout-and-beyond/banner.ts
|
|
1714
|
-
var CABBannerSection =
|
|
1871
|
+
var CABBannerSection = z20.lazy(
|
|
1715
1872
|
() => CABLayoutSection.omit({ sectionType: true }).extend({
|
|
1716
|
-
buttonField:
|
|
1717
|
-
color:
|
|
1718
|
-
dismissible:
|
|
1873
|
+
buttonField: z20.enum(buttonFields).optional(),
|
|
1874
|
+
color: z20.enum(bannerColors).default("info"),
|
|
1875
|
+
dismissible: z20.boolean().default(true),
|
|
1719
1876
|
/**
|
|
1720
1877
|
* The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
|
|
1721
1878
|
* blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
|
|
@@ -1731,18 +1888,18 @@ var CABBannerSection = z10.lazy(
|
|
|
1731
1888
|
* not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
|
|
1732
1889
|
* either strips first or teaches `normalizeTextContent` to strip this field.
|
|
1733
1890
|
*/
|
|
1734
|
-
heading:
|
|
1735
|
-
sectionType:
|
|
1891
|
+
heading: z20.record(z20.string(), z20.string().refine(checkForHTML, NO_HTML)).optional(),
|
|
1892
|
+
sectionType: z20.literal(SectionType.banner).default(SectionType.banner)
|
|
1736
1893
|
})
|
|
1737
1894
|
);
|
|
1738
1895
|
|
|
1739
1896
|
// src/schema/widgets/checkout-and-beyond/button.ts
|
|
1740
1897
|
import { v7 as uuidv73 } from "uuid";
|
|
1741
|
-
import { z as
|
|
1898
|
+
import { z as z25 } from "zod";
|
|
1742
1899
|
|
|
1743
1900
|
// src/schema/widgets/checkout-and-beyond/image.ts
|
|
1744
1901
|
import { v7 as uuidv7 } from "uuid";
|
|
1745
|
-
import { z as
|
|
1902
|
+
import { z as z23 } from "zod";
|
|
1746
1903
|
|
|
1747
1904
|
// src/schema/widgets/checkout-and-beyond/icons.ts
|
|
1748
1905
|
var iconNames = [
|
|
@@ -1829,10 +1986,10 @@ var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "wa
|
|
|
1829
1986
|
var IconTone = freezeEnum(iconTones);
|
|
1830
1987
|
|
|
1831
1988
|
// src/schema/widgets/checkout-and-beyond/variables.ts
|
|
1832
|
-
import { z as
|
|
1989
|
+
import { z as z22 } from "zod";
|
|
1833
1990
|
|
|
1834
1991
|
// src/schema/widgets/checkout-and-beyond/rule.ts
|
|
1835
|
-
import { z as
|
|
1992
|
+
import { z as z21 } from "zod";
|
|
1836
1993
|
var ruleTypes = [
|
|
1837
1994
|
"cart",
|
|
1838
1995
|
"cart_count",
|
|
@@ -1851,7 +2008,7 @@ var ruleTypes = [
|
|
|
1851
2008
|
"product_type",
|
|
1852
2009
|
"product_vendor"
|
|
1853
2010
|
];
|
|
1854
|
-
var ruleType =
|
|
2011
|
+
var ruleType = z21.enum(ruleTypes);
|
|
1855
2012
|
var RuleType = ruleType.enum;
|
|
1856
2013
|
var ruleOperators = [
|
|
1857
2014
|
"after",
|
|
@@ -1866,124 +2023,124 @@ var ruleOperators = [
|
|
|
1866
2023
|
"greater_than",
|
|
1867
2024
|
"less_than"
|
|
1868
2025
|
];
|
|
1869
|
-
var ruleOperator =
|
|
2026
|
+
var ruleOperator = z21.enum(ruleOperators);
|
|
1870
2027
|
var RuleOperator = ruleOperator.enum;
|
|
1871
|
-
var RuleCondition =
|
|
1872
|
-
operator:
|
|
1873
|
-
products:
|
|
1874
|
-
type:
|
|
1875
|
-
value:
|
|
2028
|
+
var RuleCondition = z21.object({
|
|
2029
|
+
operator: z21.enum(ruleOperators).default(RuleOperator.anything),
|
|
2030
|
+
products: z21.union([z21.array(z21.unknown()), z21.strictObject({}).transform(() => [])]).default(() => []),
|
|
2031
|
+
type: z21.enum(ruleTypes).default(RuleType.cart_subtotal),
|
|
2032
|
+
value: z21.coerce.string().default("")
|
|
1876
2033
|
});
|
|
1877
|
-
var RuleLogicBlock =
|
|
1878
|
-
rules:
|
|
2034
|
+
var RuleLogicBlock = z21.object({
|
|
2035
|
+
rules: z21.array(RuleCondition).default(() => [])
|
|
1879
2036
|
});
|
|
1880
|
-
var CABRulesetEntry =
|
|
1881
|
-
exitIfMatched:
|
|
1882
|
-
logic:
|
|
1883
|
-
output:
|
|
1884
|
-
|
|
1885
|
-
key:
|
|
1886
|
-
type:
|
|
1887
|
-
value:
|
|
2037
|
+
var CABRulesetEntry = z21.object({
|
|
2038
|
+
exitIfMatched: z21.boolean().default(true),
|
|
2039
|
+
logic: z21.array(RuleLogicBlock).default(() => []),
|
|
2040
|
+
output: z21.array(
|
|
2041
|
+
z21.object({
|
|
2042
|
+
key: z21.string().default("should_show"),
|
|
2043
|
+
type: z21.literal("data_json").default("data_json"),
|
|
2044
|
+
value: z21.string().default("true")
|
|
1888
2045
|
})
|
|
1889
2046
|
).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
|
|
1890
2047
|
});
|
|
1891
|
-
var CABRuleset =
|
|
2048
|
+
var CABRuleset = z21.union([z21.array(CABRulesetEntry), z21.strictObject({}).transform(() => [])]).default(() => []);
|
|
1892
2049
|
|
|
1893
2050
|
// src/schema/widgets/checkout-and-beyond/variables.ts
|
|
1894
|
-
var variableEffect =
|
|
1895
|
-
var CABVariableSeed =
|
|
1896
|
-
dataSourceId:
|
|
2051
|
+
var variableEffect = z22.enum(variableEffects);
|
|
2052
|
+
var CABVariableSeed = z22.object({
|
|
2053
|
+
dataSourceId: z22.number().nullable().default(null),
|
|
1897
2054
|
ruleset: CABRuleset
|
|
1898
2055
|
});
|
|
1899
|
-
var CABBooleanVariable =
|
|
2056
|
+
var CABBooleanVariable = z22.object({
|
|
1900
2057
|
/**
|
|
1901
2058
|
* Holds until the first seed verdict lands (and forever, for unseeded variables). Omitted, it derives
|
|
1902
2059
|
* from seededness — `false` with a `seed` (visibility is EARNED), `true` without — via the transform
|
|
1903
2060
|
* below; a cross-field default has no `.default()` spelling. An explicit value always wins.
|
|
1904
2061
|
*/
|
|
1905
|
-
defaultValue:
|
|
1906
|
-
name:
|
|
2062
|
+
defaultValue: z22.boolean().optional(),
|
|
2063
|
+
name: z22.string().min(1),
|
|
1907
2064
|
seed: CABVariableSeed.optional(),
|
|
1908
2065
|
/** Defaulted so every stored declaration (all boolean before `text` existed) parses unchanged. */
|
|
1909
|
-
type:
|
|
2066
|
+
type: z22.literal(VariableType.boolean).default(VariableType.boolean)
|
|
1910
2067
|
});
|
|
1911
|
-
var CABTextVariable =
|
|
1912
|
-
defaultValue:
|
|
1913
|
-
name:
|
|
1914
|
-
seed:
|
|
1915
|
-
type:
|
|
2068
|
+
var CABTextVariable = z22.object({
|
|
2069
|
+
defaultValue: z22.string(),
|
|
2070
|
+
name: z22.string().min(1),
|
|
2071
|
+
seed: z22.never().optional(),
|
|
2072
|
+
type: z22.literal(VariableType.text)
|
|
1916
2073
|
});
|
|
1917
|
-
var CABNumberVariable =
|
|
1918
|
-
defaultValue:
|
|
1919
|
-
name:
|
|
1920
|
-
seed:
|
|
1921
|
-
type:
|
|
2074
|
+
var CABNumberVariable = z22.object({
|
|
2075
|
+
defaultValue: z22.number(),
|
|
2076
|
+
name: z22.string().min(1),
|
|
2077
|
+
seed: z22.never().optional(),
|
|
2078
|
+
type: z22.literal(VariableType.number)
|
|
1922
2079
|
});
|
|
1923
|
-
var CABVariable =
|
|
2080
|
+
var CABVariable = z22.union([CABTextVariable, CABNumberVariable, CABBooleanVariable]).transform(
|
|
1924
2081
|
(variable) => variable.type === VariableType.boolean ? { ...variable, defaultValue: variable.defaultValue ?? variable.seed === void 0 } : variable
|
|
1925
2082
|
);
|
|
1926
|
-
var CABVariableEffect =
|
|
2083
|
+
var CABVariableEffect = z22.object({
|
|
1927
2084
|
effect: variableEffect.default(VariableEffect.toggle),
|
|
1928
|
-
variable:
|
|
2085
|
+
variable: z22.string().min(1)
|
|
1929
2086
|
});
|
|
1930
|
-
var CABVisibility =
|
|
1931
|
-
variable:
|
|
1932
|
-
visibleWhen:
|
|
2087
|
+
var CABVisibility = z22.object({
|
|
2088
|
+
variable: z22.string().min(1),
|
|
2089
|
+
visibleWhen: z22.boolean().default(true)
|
|
1933
2090
|
});
|
|
1934
|
-
var contentOperator =
|
|
1935
|
-
var resultCountOperator =
|
|
1936
|
-
var resultTagOperator =
|
|
1937
|
-
var mutatorEvent =
|
|
1938
|
-
var CABContentTrigger =
|
|
2091
|
+
var contentOperator = z22.enum(contentOperators);
|
|
2092
|
+
var resultCountOperator = z22.enum(resultCountOperators);
|
|
2093
|
+
var resultTagOperator = z22.enum(resultTagOperators);
|
|
2094
|
+
var mutatorEvent = z22.enum(mutatorEvents);
|
|
2095
|
+
var CABContentTrigger = z22.object({
|
|
1939
2096
|
operator: contentOperator.default(ContentOperator.is_empty),
|
|
1940
|
-
type:
|
|
2097
|
+
type: z22.literal("content")
|
|
1941
2098
|
});
|
|
1942
|
-
var CABResultCountTrigger =
|
|
2099
|
+
var CABResultCountTrigger = z22.object({
|
|
1943
2100
|
operator: resultCountOperator.default(ResultCountOperator.equals),
|
|
1944
|
-
type:
|
|
1945
|
-
value:
|
|
2101
|
+
type: z22.literal("result_count"),
|
|
2102
|
+
value: z22.number().default(0)
|
|
1946
2103
|
});
|
|
1947
|
-
var CABResultTagTrigger =
|
|
2104
|
+
var CABResultTagTrigger = z22.object({
|
|
1948
2105
|
operator: resultTagOperator.default(ResultTagOperator.contains),
|
|
1949
|
-
type:
|
|
1950
|
-
value:
|
|
2106
|
+
type: z22.literal("result_tag"),
|
|
2107
|
+
value: z22.string().min(1)
|
|
1951
2108
|
});
|
|
1952
|
-
var CABEventTrigger =
|
|
2109
|
+
var CABEventTrigger = z22.object({
|
|
1953
2110
|
event: mutatorEvent,
|
|
1954
|
-
type:
|
|
2111
|
+
type: z22.literal("event")
|
|
1955
2112
|
});
|
|
1956
|
-
var CABVariableTrigger =
|
|
2113
|
+
var CABVariableTrigger = z22.discriminatedUnion("type", [
|
|
1957
2114
|
CABContentTrigger,
|
|
1958
2115
|
CABEventTrigger,
|
|
1959
2116
|
CABResultCountTrigger,
|
|
1960
2117
|
CABResultTagTrigger
|
|
1961
2118
|
]);
|
|
1962
|
-
var CABVariableMutator =
|
|
2119
|
+
var CABVariableMutator = z22.object({
|
|
1963
2120
|
effect: variableEffect.default(VariableEffect.set_false),
|
|
1964
|
-
variable:
|
|
2121
|
+
variable: z22.string().min(1),
|
|
1965
2122
|
when: CABVariableTrigger
|
|
1966
2123
|
});
|
|
1967
2124
|
var CABVariableFields = {
|
|
1968
|
-
mutators:
|
|
1969
|
-
variables:
|
|
2125
|
+
mutators: z22.array(CABVariableMutator).optional(),
|
|
2126
|
+
variables: z22.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
|
|
1970
2127
|
message: "variable names must be unique within a section"
|
|
1971
2128
|
}).optional(),
|
|
1972
2129
|
visibility: CABVisibility.optional()
|
|
1973
2130
|
};
|
|
1974
2131
|
|
|
1975
2132
|
// src/schema/widgets/checkout-and-beyond/image.ts
|
|
1976
|
-
var CABImageSectionFields =
|
|
2133
|
+
var CABImageSectionFields = z23.object({
|
|
1977
2134
|
...CABVariableFields,
|
|
1978
|
-
altText:
|
|
2135
|
+
altText: z23.string().refine(checkForHTML, NO_HTML).default(""),
|
|
1979
2136
|
/**
|
|
1980
2137
|
* Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
|
|
1981
2138
|
* ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
|
|
1982
2139
|
* and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
|
|
1983
2140
|
*/
|
|
1984
|
-
aspectRatio:
|
|
1985
|
-
border:
|
|
1986
|
-
buttonField:
|
|
2141
|
+
aspectRatio: z23.number().positive().nullable().default(null),
|
|
2142
|
+
border: z23.lazy(() => CABBorder),
|
|
2143
|
+
buttonField: z23.enum(buttonFields).optional(),
|
|
1987
2144
|
/**
|
|
1988
2145
|
* `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
|
|
1989
2146
|
* `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
|
|
@@ -2002,29 +2159,29 @@ var CABImageSectionFields = z13.object({
|
|
|
2002
2159
|
* behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
|
|
2003
2160
|
* the risky half.
|
|
2004
2161
|
*/
|
|
2005
|
-
category:
|
|
2162
|
+
category: z23.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
|
|
2006
2163
|
/** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
|
|
2007
|
-
iconSize:
|
|
2164
|
+
iconSize: z23.enum(iconSizes).nullable().default(null),
|
|
2008
2165
|
/** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
|
|
2009
|
-
iconTone:
|
|
2010
|
-
name:
|
|
2011
|
-
naturalHeight:
|
|
2012
|
-
naturalWidth:
|
|
2166
|
+
iconTone: z23.enum(iconTones).nullable().default(null),
|
|
2167
|
+
name: z23.string().optional(),
|
|
2168
|
+
naturalHeight: z23.number().default(0),
|
|
2169
|
+
naturalWidth: z23.number().default(0),
|
|
2013
2170
|
/**
|
|
2014
2171
|
* `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
|
|
2015
2172
|
* `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
|
|
2016
2173
|
*/
|
|
2017
|
-
objectFit:
|
|
2018
|
-
sectionId:
|
|
2019
|
-
sectionType:
|
|
2174
|
+
objectFit: z23.enum(objectFits).default(ObjectFit.contain),
|
|
2175
|
+
sectionId: z23.uuid().default(() => uuidv7()),
|
|
2176
|
+
sectionType: z23.literal(SectionType.image).default(SectionType.image),
|
|
2020
2177
|
/**
|
|
2021
2178
|
* An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
|
|
2022
2179
|
* takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
|
|
2023
2180
|
* would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
|
|
2024
2181
|
* server-chosen tier icon actually needs it.
|
|
2025
2182
|
*/
|
|
2026
|
-
source:
|
|
2027
|
-
width:
|
|
2183
|
+
source: z23.union([z23.url(), z23.literal(""), z23.string().regex(DYNAMIC_TOKEN_REGEX), z23.enum(iconNames)]).default(""),
|
|
2184
|
+
width: z23.number().default(100)
|
|
2028
2185
|
});
|
|
2029
2186
|
var iconNameSet = new Set(iconNames);
|
|
2030
2187
|
var isIconName = (source) => iconNameSet.has(source);
|
|
@@ -2046,71 +2203,71 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source }, c
|
|
|
2046
2203
|
// src/schema/widgets/checkout-and-beyond/text.ts
|
|
2047
2204
|
import { forEach, isString as isString2 } from "es-toolkit/compat";
|
|
2048
2205
|
import { v7 as uuidv72 } from "uuid";
|
|
2049
|
-
import { z as
|
|
2050
|
-
var enumOrOmit = (...vals) =>
|
|
2051
|
-
var TiptapText =
|
|
2052
|
-
marks:
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
attrs:
|
|
2059
|
-
class:
|
|
2060
|
-
href:
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2206
|
+
import { z as z24 } from "zod";
|
|
2207
|
+
var enumOrOmit = (...vals) => z24.string().transform((val) => vals.includes(val) ? val : void 0).optional();
|
|
2208
|
+
var TiptapText = z24.object({
|
|
2209
|
+
marks: z24.union([
|
|
2210
|
+
z24.array(
|
|
2211
|
+
z24.discriminatedUnion("type", [
|
|
2212
|
+
z24.object({ type: z24.literal("bold") }),
|
|
2213
|
+
z24.object({ type: z24.literal("italic") }),
|
|
2214
|
+
z24.object({
|
|
2215
|
+
attrs: z24.object({
|
|
2216
|
+
class: z24.string().nullable(),
|
|
2217
|
+
href: z24.union([
|
|
2218
|
+
z24.url(),
|
|
2219
|
+
z24.literal("#"),
|
|
2220
|
+
z24.string().regex(DYNAMIC_TOKEN_REGEX),
|
|
2221
|
+
z24.string().regex(ROOT_RELATIVE_PATH_REGEX)
|
|
2065
2222
|
]),
|
|
2066
|
-
rel:
|
|
2067
|
-
target:
|
|
2223
|
+
rel: z24.string().default("noopener noreferrer nofollow"),
|
|
2224
|
+
target: z24.string().default("_blank")
|
|
2068
2225
|
}),
|
|
2069
|
-
type:
|
|
2226
|
+
type: z24.literal("link")
|
|
2070
2227
|
}),
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
attrs:
|
|
2228
|
+
z24.object({ type: z24.literal("strike") }),
|
|
2229
|
+
z24.object({
|
|
2230
|
+
attrs: z24.object({
|
|
2074
2231
|
color: enumOrOmit(...textColorNames).default(TextColorName.base),
|
|
2075
2232
|
fontSize: enumOrOmit(...textSizeNames).default(TextSizeName.base)
|
|
2076
2233
|
}),
|
|
2077
|
-
type:
|
|
2234
|
+
type: z24.literal("textStyle")
|
|
2078
2235
|
})
|
|
2079
2236
|
])
|
|
2080
2237
|
),
|
|
2081
|
-
|
|
2238
|
+
z24.strictObject({}).transform(() => [])
|
|
2082
2239
|
]).optional(),
|
|
2083
|
-
text:
|
|
2084
|
-
type:
|
|
2240
|
+
text: z24.string().default(""),
|
|
2241
|
+
type: z24.literal("text").default("text")
|
|
2085
2242
|
});
|
|
2086
|
-
var TiptapParagraph =
|
|
2087
|
-
attrs:
|
|
2243
|
+
var TiptapParagraph = z24.object({
|
|
2244
|
+
attrs: z24.object({
|
|
2088
2245
|
textAlign: enumOrOmit(...textAlignments)
|
|
2089
2246
|
}).default({ textAlign: TextAlignment.start }),
|
|
2090
|
-
content:
|
|
2091
|
-
type:
|
|
2247
|
+
content: z24.union([z24.array(TiptapText), z24.strictObject({}).transform(() => [])]).default(() => []),
|
|
2248
|
+
type: z24.literal("paragraph").default("paragraph")
|
|
2092
2249
|
});
|
|
2093
|
-
var TiptapDocument =
|
|
2094
|
-
attrs:
|
|
2250
|
+
var TiptapDocument = z24.object({
|
|
2251
|
+
attrs: z24.object({
|
|
2095
2252
|
blockSpacing: enumOrOmit(...spacings)
|
|
2096
2253
|
}).default({ blockSpacing: Spacing.base }),
|
|
2097
|
-
content:
|
|
2098
|
-
type:
|
|
2254
|
+
content: z24.union([z24.array(TiptapParagraph), z24.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
|
|
2255
|
+
type: z24.literal("doc").default("doc")
|
|
2099
2256
|
});
|
|
2100
|
-
var CABTextTier =
|
|
2101
|
-
threshold:
|
|
2102
|
-
thresholds:
|
|
2103
|
-
tierId:
|
|
2104
|
-
tierType:
|
|
2257
|
+
var CABTextTier = z24.object({
|
|
2258
|
+
threshold: z24.number().int().nonnegative(),
|
|
2259
|
+
thresholds: z24.record(z24.string(), z24.number().int().nonnegative()).default(() => ({})),
|
|
2260
|
+
tierId: z24.string().optional(),
|
|
2261
|
+
tierType: z24.enum(progressTierTypes).default(ProgressTierType.shipping)
|
|
2105
2262
|
});
|
|
2106
|
-
var CABTextSection =
|
|
2263
|
+
var CABTextSection = z24.object({
|
|
2107
2264
|
...CABVariableFields,
|
|
2108
|
-
buttonField:
|
|
2109
|
-
content:
|
|
2110
|
-
name:
|
|
2111
|
-
optionId:
|
|
2112
|
-
sectionId:
|
|
2113
|
-
sectionType:
|
|
2265
|
+
buttonField: z24.enum(buttonFields).optional(),
|
|
2266
|
+
content: z24.record(z24.string(), z24.union([z24.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
|
|
2267
|
+
name: z24.string().optional(),
|
|
2268
|
+
optionId: z24.number().optional(),
|
|
2269
|
+
sectionId: z24.uuid().default(() => uuidv72()),
|
|
2270
|
+
sectionType: z24.literal(SectionType.text).default(SectionType.text),
|
|
2114
2271
|
tier: CABTextTier.optional()
|
|
2115
2272
|
}).superRefine(({ buttonField, content }, ctx) => {
|
|
2116
2273
|
if (buttonField === ButtonField.destinationUrl && content) {
|
|
@@ -2132,35 +2289,35 @@ var CABTextSection = z14.object({
|
|
|
2132
2289
|
});
|
|
2133
2290
|
|
|
2134
2291
|
// src/schema/widgets/checkout-and-beyond/button.ts
|
|
2135
|
-
var CABButtonContent =
|
|
2136
|
-
() =>
|
|
2292
|
+
var CABButtonContent = z25.lazy(
|
|
2293
|
+
() => z25.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
|
|
2137
2294
|
);
|
|
2138
|
-
var CABButtonSection =
|
|
2295
|
+
var CABButtonSection = z25.object({
|
|
2139
2296
|
...CABVariableFields,
|
|
2140
|
-
action:
|
|
2141
|
-
buttonStyle:
|
|
2142
|
-
custom:
|
|
2143
|
-
color:
|
|
2144
|
-
height:
|
|
2145
|
-
width:
|
|
2297
|
+
action: z25.union([z25.literal(""), z25.enum(buttonActions)]).default(""),
|
|
2298
|
+
buttonStyle: z25.enum(buttonStyles).default(ButtonStyle.primary),
|
|
2299
|
+
custom: z25.object({
|
|
2300
|
+
color: z25.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
|
|
2301
|
+
height: z25.number().default(52),
|
|
2302
|
+
width: z25.number().default(300)
|
|
2146
2303
|
}).default({
|
|
2147
2304
|
color: "#005bd3",
|
|
2148
2305
|
height: 52,
|
|
2149
2306
|
width: 300
|
|
2150
2307
|
}),
|
|
2151
|
-
disableDowngrade:
|
|
2152
|
-
name:
|
|
2153
|
-
optionId:
|
|
2154
|
-
popover:
|
|
2155
|
-
alignment:
|
|
2156
|
-
position:
|
|
2308
|
+
disableDowngrade: z25.boolean().default(false),
|
|
2309
|
+
name: z25.string().optional(),
|
|
2310
|
+
optionId: z25.number().optional(),
|
|
2311
|
+
popover: z25.object({
|
|
2312
|
+
alignment: z25.enum(textAlignments).default(TextAlignment.center),
|
|
2313
|
+
position: z25.enum(popoverPositions).default(PopoverPosition.blockStart)
|
|
2157
2314
|
}).optional().default(() => ({
|
|
2158
2315
|
alignment: TextAlignment.center,
|
|
2159
2316
|
position: PopoverPosition.blockStart
|
|
2160
2317
|
})),
|
|
2161
|
-
sectionId:
|
|
2162
|
-
sections:
|
|
2163
|
-
sectionType:
|
|
2318
|
+
sectionId: z25.uuid().default(() => uuidv73()),
|
|
2319
|
+
sections: z25.union([z25.array(CABButtonContent), z25.strictObject({}).transform(() => [])]).default(() => []),
|
|
2320
|
+
sectionType: z25.literal(SectionType.button).default(SectionType.button),
|
|
2164
2321
|
/**
|
|
2165
2322
|
* The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
|
|
2166
2323
|
* client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
|
|
@@ -2175,91 +2332,91 @@ var CABButtonSection = z15.object({
|
|
|
2175
2332
|
* lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
|
|
2176
2333
|
* stored payloads to grandfather, and the producer is client code, not a merchant form.
|
|
2177
2334
|
*/
|
|
2178
|
-
tier:
|
|
2335
|
+
tier: z25.object({ tierId: z25.string().min(1) }).optional(),
|
|
2179
2336
|
/** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
|
|
2180
|
-
trackingUrl:
|
|
2337
|
+
trackingUrl: z25.string().optional(),
|
|
2181
2338
|
/**
|
|
2182
2339
|
* Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
|
|
2183
2340
|
* `action` — an `addToOrder` button can also flip a variable. Applied in array order.
|
|
2184
2341
|
*/
|
|
2185
|
-
variableEffects:
|
|
2342
|
+
variableEffects: z25.array(CABVariableEffect).optional()
|
|
2186
2343
|
});
|
|
2187
2344
|
|
|
2188
2345
|
// src/schema/widgets/checkout-and-beyond/carousel.ts
|
|
2189
|
-
import { z as
|
|
2346
|
+
import { z as z30 } from "zod";
|
|
2190
2347
|
|
|
2191
2348
|
// src/schema/widgets/checkout-and-beyond/offers.ts
|
|
2192
|
-
import { z as
|
|
2349
|
+
import { z as z29 } from "zod";
|
|
2193
2350
|
|
|
2194
2351
|
// src/schema/widgets/checkout-and-beyond/dataSource.ts
|
|
2195
2352
|
import { v7 as uuidv74 } from "uuid";
|
|
2196
|
-
import { z as
|
|
2197
|
-
var CABDiscount =
|
|
2198
|
-
amount:
|
|
2199
|
-
discountedBy:
|
|
2200
|
-
discountedFrom:
|
|
2201
|
-
type:
|
|
2353
|
+
import { z as z26 } from "zod";
|
|
2354
|
+
var CABDiscount = z26.object({
|
|
2355
|
+
amount: z26.union([z26.number(), z26.string()]).catch(0),
|
|
2356
|
+
discountedBy: z26.string().optional(),
|
|
2357
|
+
discountedFrom: z26.enum(discountSources).optional().catch(void 0),
|
|
2358
|
+
type: z26.enum(discountTypes).catch("none")
|
|
2202
2359
|
});
|
|
2203
|
-
var CABIntegrations =
|
|
2204
|
-
judgeme:
|
|
2205
|
-
junip:
|
|
2206
|
-
klaviyo:
|
|
2207
|
-
loox:
|
|
2208
|
-
okendo:
|
|
2209
|
-
opinew:
|
|
2210
|
-
reviewsio:
|
|
2211
|
-
stamped:
|
|
2212
|
-
yotpo:
|
|
2360
|
+
var CABIntegrations = z26.object({
|
|
2361
|
+
judgeme: z26.boolean().default(false),
|
|
2362
|
+
junip: z26.boolean().default(false),
|
|
2363
|
+
klaviyo: z26.boolean().default(false),
|
|
2364
|
+
loox: z26.boolean().default(false),
|
|
2365
|
+
okendo: z26.boolean().default(false),
|
|
2366
|
+
opinew: z26.boolean().default(false),
|
|
2367
|
+
reviewsio: z26.boolean().default(false),
|
|
2368
|
+
stamped: z26.boolean().default(false),
|
|
2369
|
+
yotpo: z26.boolean().default(false)
|
|
2213
2370
|
});
|
|
2214
|
-
var CABDataSourceSection =
|
|
2215
|
-
dataSourceId:
|
|
2216
|
-
dataSourcePath:
|
|
2371
|
+
var CABDataSourceSection = z26.object({
|
|
2372
|
+
dataSourceId: z26.number().nullable().default(null),
|
|
2373
|
+
dataSourcePath: z26.string().default(DEFAULT_ENDPOINTS[0].value),
|
|
2217
2374
|
discount: CABDiscount.optional(),
|
|
2218
2375
|
integrations: CABIntegrations.optional(),
|
|
2219
|
-
limit:
|
|
2220
|
-
matchVariant:
|
|
2221
|
-
matchVariantOutOfStock:
|
|
2222
|
-
name:
|
|
2223
|
-
productType:
|
|
2224
|
-
sectionId:
|
|
2225
|
-
sectionType:
|
|
2376
|
+
limit: z26.number().default(1),
|
|
2377
|
+
matchVariant: z26.boolean().default(false),
|
|
2378
|
+
matchVariantOutOfStock: z26.boolean().default(false),
|
|
2379
|
+
name: z26.string().default(DEFAULT_ENDPOINTS[0].label),
|
|
2380
|
+
productType: z26.enum(productTypes).optional(),
|
|
2381
|
+
sectionId: z26.uuid().default(() => uuidv74()),
|
|
2382
|
+
sectionType: z26.literal(SectionType.dataSource).default(SectionType.dataSource),
|
|
2226
2383
|
/** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
|
|
2227
|
-
subscriptionIsDefault:
|
|
2228
|
-
treatAsGwp:
|
|
2384
|
+
subscriptionIsDefault: z26.boolean().default(false),
|
|
2385
|
+
treatAsGwp: z26.boolean().default(false)
|
|
2229
2386
|
});
|
|
2230
2387
|
|
|
2231
2388
|
// src/schema/widgets/checkout-and-beyond/products.ts
|
|
2232
2389
|
import { v7 as uuidv76 } from "uuid";
|
|
2233
|
-
import { z as
|
|
2390
|
+
import { z as z28 } from "zod";
|
|
2234
2391
|
|
|
2235
2392
|
// src/schema/widgets/checkout-and-beyond/product.ts
|
|
2236
2393
|
import { v7 as uuidv75 } from "uuid";
|
|
2237
|
-
import { z as
|
|
2238
|
-
var CABVariantContent =
|
|
2239
|
-
() =>
|
|
2394
|
+
import { z as z27 } from "zod";
|
|
2395
|
+
var CABVariantContent = z27.lazy(
|
|
2396
|
+
() => z27.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
|
|
2240
2397
|
);
|
|
2241
|
-
var CABProductSection =
|
|
2398
|
+
var CABProductSection = z27.object({
|
|
2242
2399
|
...CABVariableFields,
|
|
2243
|
-
name:
|
|
2244
|
-
productId:
|
|
2245
|
-
sectionId:
|
|
2246
|
-
sections:
|
|
2247
|
-
sectionType:
|
|
2248
|
-
selectors:
|
|
2249
|
-
variantMode:
|
|
2400
|
+
name: z27.string().optional(),
|
|
2401
|
+
productId: z27.number().nullable().default(null),
|
|
2402
|
+
sectionId: z27.uuid().default(() => uuidv75()),
|
|
2403
|
+
sections: z27.union([z27.array(CABVariantContent), z27.strictObject({}).transform(() => [])]).default(() => []),
|
|
2404
|
+
sectionType: z27.literal(SectionType.product).default(SectionType.product),
|
|
2405
|
+
selectors: z27.record(z27.string(), z27.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
|
|
2406
|
+
variantMode: z27.enum(variantModes).default(VariantMode.multiple)
|
|
2250
2407
|
});
|
|
2251
2408
|
|
|
2252
2409
|
// src/schema/widgets/checkout-and-beyond/products.ts
|
|
2253
|
-
var CABProductsSection =
|
|
2410
|
+
var CABProductsSection = z28.object({
|
|
2254
2411
|
...CABVariableFields,
|
|
2255
|
-
name:
|
|
2256
|
-
sectionId:
|
|
2257
|
-
sections:
|
|
2258
|
-
sectionType:
|
|
2412
|
+
name: z28.string().optional(),
|
|
2413
|
+
sectionId: z28.uuid().default(() => uuidv76()),
|
|
2414
|
+
sections: z28.union([z28.array(z28.lazy(() => CABProductSection)), z28.strictObject({}).transform(() => [])]).default(() => []),
|
|
2415
|
+
sectionType: z28.literal(SectionType.products).default(SectionType.products)
|
|
2259
2416
|
});
|
|
2260
2417
|
|
|
2261
2418
|
// src/schema/widgets/checkout-and-beyond/offers.ts
|
|
2262
|
-
var CABOffersSection =
|
|
2419
|
+
var CABOffersSection = z29.lazy(
|
|
2263
2420
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
2264
2421
|
/**
|
|
2265
2422
|
* A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
|
|
@@ -2267,8 +2424,8 @@ var CABOffersSection = z19.lazy(
|
|
|
2267
2424
|
* run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
|
|
2268
2425
|
* hand-built tree keeps React CAB's dividerless rendering.
|
|
2269
2426
|
*/
|
|
2270
|
-
divider:
|
|
2271
|
-
sections:
|
|
2427
|
+
divider: z29.boolean().optional(),
|
|
2428
|
+
sections: z29.union([z29.array(z29.lazy(() => CABSection)), z29.strictObject({}).transform(() => [])]).default(() => [
|
|
2272
2429
|
CABBannerSection.parse({
|
|
2273
2430
|
buttonField: "undoAddToOrder",
|
|
2274
2431
|
color: "success",
|
|
@@ -2282,77 +2439,77 @@ var CABOffersSection = z19.lazy(
|
|
|
2282
2439
|
CABDataSourceSection.parse({}),
|
|
2283
2440
|
CABProductsSection.parse({})
|
|
2284
2441
|
]),
|
|
2285
|
-
sectionType:
|
|
2442
|
+
sectionType: z29.literal(SectionType.offers).default(SectionType.offers)
|
|
2286
2443
|
})
|
|
2287
2444
|
);
|
|
2288
2445
|
|
|
2289
2446
|
// src/schema/widgets/checkout-and-beyond/carousel.ts
|
|
2290
|
-
var CABCarouselSection =
|
|
2447
|
+
var CABCarouselSection = z30.lazy(
|
|
2291
2448
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
2292
|
-
autoAdvanceInterval:
|
|
2293
|
-
itemsAtOnce:
|
|
2449
|
+
autoAdvanceInterval: z30.number().default(0),
|
|
2450
|
+
itemsAtOnce: z30.number().min(1).default(1),
|
|
2294
2451
|
/** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
|
|
2295
|
-
offersDirection:
|
|
2296
|
-
sections:
|
|
2297
|
-
sectionType:
|
|
2452
|
+
offersDirection: z30.enum(offersDirections).default("vertical"),
|
|
2453
|
+
sections: z30.union([z30.array(z30.lazy(() => CABSection)), z30.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
|
|
2454
|
+
sectionType: z30.literal(SectionType.carousel).default(SectionType.carousel)
|
|
2298
2455
|
})
|
|
2299
2456
|
);
|
|
2300
2457
|
|
|
2301
2458
|
// src/schema/widgets/checkout-and-beyond/cartLine.ts
|
|
2302
|
-
import { z as
|
|
2303
|
-
var CABCartLineSection =
|
|
2459
|
+
import { z as z31 } from "zod";
|
|
2460
|
+
var CABCartLineSection = z31.lazy(
|
|
2304
2461
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
2305
|
-
sections:
|
|
2306
|
-
sectionType:
|
|
2462
|
+
sections: z31.union([z31.array(z31.lazy(() => CABSection)), z31.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
|
|
2463
|
+
sectionType: z31.literal(SectionType.cartLine).default(SectionType.cartLine)
|
|
2307
2464
|
})
|
|
2308
2465
|
);
|
|
2309
2466
|
|
|
2310
2467
|
// src/schema/widgets/checkout-and-beyond/discount.ts
|
|
2311
2468
|
import { v7 as uuidv77 } from "uuid";
|
|
2312
|
-
import { z as
|
|
2313
|
-
var CABDiscountSection =
|
|
2469
|
+
import { z as z32 } from "zod";
|
|
2470
|
+
var CABDiscountSection = z32.object({
|
|
2314
2471
|
...CABVariableFields,
|
|
2315
|
-
amount:
|
|
2316
|
-
discountedBy:
|
|
2317
|
-
discountedFrom:
|
|
2318
|
-
message:
|
|
2319
|
-
name:
|
|
2320
|
-
quantity:
|
|
2321
|
-
sectionId:
|
|
2322
|
-
sectionType:
|
|
2323
|
-
type:
|
|
2472
|
+
amount: z32.union([z32.number(), z32.string()]).catch(0),
|
|
2473
|
+
discountedBy: z32.string().optional(),
|
|
2474
|
+
discountedFrom: z32.enum(discountSources).optional().catch(void 0),
|
|
2475
|
+
message: z32.string().optional(),
|
|
2476
|
+
name: z32.string().optional(),
|
|
2477
|
+
quantity: z32.number().default(1),
|
|
2478
|
+
sectionId: z32.uuid().default(() => uuidv77()),
|
|
2479
|
+
sectionType: z32.literal(SectionType.discount).default(SectionType.discount),
|
|
2480
|
+
type: z32.enum(discountTypes).catch("none")
|
|
2324
2481
|
});
|
|
2325
2482
|
|
|
2326
2483
|
// src/schema/widgets/checkout-and-beyond/monetize.ts
|
|
2327
2484
|
import { v7 as uuidv78 } from "uuid";
|
|
2328
|
-
import { z as
|
|
2329
|
-
var CABMonetizeAds =
|
|
2330
|
-
requestId:
|
|
2485
|
+
import { z as z33 } from "zod";
|
|
2486
|
+
var CABMonetizeAds = z33.object({
|
|
2487
|
+
requestId: z33.string().optional(),
|
|
2331
2488
|
/** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
|
|
2332
|
-
testing:
|
|
2489
|
+
testing: z33.boolean().default(false)
|
|
2333
2490
|
});
|
|
2334
|
-
var CABMonetizeSection =
|
|
2491
|
+
var CABMonetizeSection = z33.object({
|
|
2335
2492
|
...CABVariableFields,
|
|
2336
2493
|
ads: CABMonetizeAds.optional(),
|
|
2337
|
-
name:
|
|
2494
|
+
name: z33.string().optional(),
|
|
2338
2495
|
/**
|
|
2339
2496
|
* Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
|
|
2340
2497
|
* context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
|
|
2341
2498
|
* nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
|
|
2342
2499
|
*/
|
|
2343
|
-
offers:
|
|
2500
|
+
offers: z33.array(z33.lazy(() => CABSection)).optional(),
|
|
2344
2501
|
/** Privacy Policy footer href (the widget's `privacy_policy_url` setting); read server-side for hydration, relayed by the client only on the legacy `/cab/monetize` fallback. */
|
|
2345
|
-
privacyPolicyUrl:
|
|
2346
|
-
sectionId:
|
|
2347
|
-
sectionType:
|
|
2502
|
+
privacyPolicyUrl: z33.string().optional(),
|
|
2503
|
+
sectionId: z33.uuid().default(() => uuidv78()),
|
|
2504
|
+
sectionType: z33.literal(SectionType.monetize).default(SectionType.monetize),
|
|
2348
2505
|
/** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
|
|
2349
|
-
subVertical:
|
|
2506
|
+
subVertical: z33.string().optional(),
|
|
2350
2507
|
/** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
|
|
2351
|
-
vertical:
|
|
2508
|
+
vertical: z33.string().optional()
|
|
2352
2509
|
});
|
|
2353
2510
|
|
|
2354
2511
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
2355
|
-
import { z as
|
|
2512
|
+
import { z as z34 } from "zod";
|
|
2356
2513
|
|
|
2357
2514
|
// src/schema/widgets/checkout-and-beyond/giftLabels.ts
|
|
2358
2515
|
var GIFT_LABELS = {
|
|
@@ -2471,34 +2628,34 @@ var GIFT_LABELS = {
|
|
|
2471
2628
|
};
|
|
2472
2629
|
|
|
2473
2630
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
2474
|
-
var CABProgressTierExclusion =
|
|
2475
|
-
collectionIds:
|
|
2476
|
-
productIds:
|
|
2477
|
-
tags:
|
|
2478
|
-
type:
|
|
2631
|
+
var CABProgressTierExclusion = z34.object({
|
|
2632
|
+
collectionIds: z34.array(z34.number().int().positive()).default(() => []),
|
|
2633
|
+
productIds: z34.array(z34.number().int().positive()).default(() => []),
|
|
2634
|
+
tags: z34.array(z34.string().min(1)).default(() => []),
|
|
2635
|
+
type: z34.enum(progressTierExclusionTypes)
|
|
2479
2636
|
});
|
|
2480
|
-
var CABProgressTier =
|
|
2637
|
+
var CABProgressTier = z34.object({
|
|
2481
2638
|
/**
|
|
2482
2639
|
* Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
|
|
2483
2640
|
* cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
|
|
2484
2641
|
* `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
|
|
2485
2642
|
* `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
|
|
2486
2643
|
*/
|
|
2487
|
-
discount:
|
|
2644
|
+
discount: z34.object({ amount: z34.number().nonnegative(), type: z34.enum(["fixedAmount", "percentage"]) }).optional(),
|
|
2488
2645
|
/**
|
|
2489
2646
|
* Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
|
|
2490
2647
|
* toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
|
|
2491
2648
|
* the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
|
|
2492
2649
|
* `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
|
|
2493
2650
|
*/
|
|
2494
|
-
exclusions:
|
|
2651
|
+
exclusions: z34.array(CABProgressTierExclusion).default(() => []),
|
|
2495
2652
|
/**
|
|
2496
2653
|
* Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
|
|
2497
2654
|
* tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
|
|
2498
2655
|
* controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
|
|
2499
2656
|
* on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
|
|
2500
2657
|
*/
|
|
2501
|
-
filterOosVariants:
|
|
2658
|
+
filterOosVariants: z34.boolean().default(false),
|
|
2502
2659
|
/**
|
|
2503
2660
|
* Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
|
|
2504
2661
|
* `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
|
|
@@ -2506,10 +2663,10 @@ var CABProgressTier = z24.object({
|
|
|
2506
2663
|
* tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
|
|
2507
2664
|
* tree is complete.
|
|
2508
2665
|
*/
|
|
2509
|
-
gift:
|
|
2510
|
-
productId:
|
|
2511
|
-
title:
|
|
2512
|
-
variantIds:
|
|
2666
|
+
gift: z34.object({
|
|
2667
|
+
productId: z34.number().int().positive(),
|
|
2668
|
+
title: z34.string().optional(),
|
|
2669
|
+
variantIds: z34.array(z34.number().int().positive()).default(() => [])
|
|
2513
2670
|
}).optional(),
|
|
2514
2671
|
/**
|
|
2515
2672
|
* The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
|
|
@@ -2529,7 +2686,7 @@ var CABProgressTier = z24.object({
|
|
|
2529
2686
|
* renderer never spells a fallback), which also makes a tree authored before this field render at
|
|
2530
2687
|
* React's size rather than the old hardcoded 20.
|
|
2531
2688
|
*/
|
|
2532
|
-
iconSizePx:
|
|
2689
|
+
iconSizePx: z34.number().int().min(1).max(64).default(18),
|
|
2533
2690
|
/**
|
|
2534
2691
|
* The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
|
|
2535
2692
|
* type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
|
|
@@ -2539,35 +2696,35 @@ var CABProgressTier = z24.object({
|
|
|
2539
2696
|
* turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
|
|
2540
2697
|
* emits no caption slot rather than an empty one). Plain text — a compact icon+label.
|
|
2541
2698
|
*/
|
|
2542
|
-
label:
|
|
2699
|
+
label: z34.record(z34.string(), z34.string()).optional(),
|
|
2543
2700
|
/**
|
|
2544
2701
|
* Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
|
|
2545
2702
|
* the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
|
|
2546
2703
|
* carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
|
|
2547
2704
|
* parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
|
|
2548
2705
|
*/
|
|
2549
|
-
productTierImage:
|
|
2706
|
+
productTierImage: z34.boolean().default(false),
|
|
2550
2707
|
/**
|
|
2551
2708
|
* The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
|
|
2552
2709
|
* fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
|
|
2553
2710
|
* multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
|
|
2554
2711
|
* `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
|
|
2555
2712
|
*/
|
|
2556
|
-
threshold:
|
|
2713
|
+
threshold: z34.number().int().nonnegative(),
|
|
2557
2714
|
/**
|
|
2558
2715
|
* Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
|
|
2559
2716
|
* When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
|
|
2560
2717
|
* `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
|
|
2561
2718
|
* converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
|
|
2562
2719
|
*/
|
|
2563
|
-
thresholds:
|
|
2720
|
+
thresholds: z34.record(z34.string(), z34.number().int().nonnegative()).default(() => ({})),
|
|
2564
2721
|
/**
|
|
2565
2722
|
* Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
|
|
2566
2723
|
* match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
|
|
2567
2724
|
* shipping bar (single unlabeled tier, no gift).
|
|
2568
2725
|
*/
|
|
2569
|
-
tierId:
|
|
2570
|
-
tierType:
|
|
2726
|
+
tierId: z34.string().optional(),
|
|
2727
|
+
tierType: z34.enum(progressTierTypes).default(ProgressTierType.shipping),
|
|
2571
2728
|
/**
|
|
2572
2729
|
* What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
|
|
2573
2730
|
* the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
|
|
@@ -2578,9 +2735,9 @@ var CABProgressTier = z24.object({
|
|
|
2578
2735
|
* count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
|
|
2579
2736
|
* template text supplies grammatically-neutral wording around the token.
|
|
2580
2737
|
*/
|
|
2581
|
-
unit:
|
|
2738
|
+
unit: z34.enum(progressTierUnits).default(ProgressTierUnit.currency)
|
|
2582
2739
|
});
|
|
2583
|
-
var CABProgressBarSection =
|
|
2740
|
+
var CABProgressBarSection = z34.lazy(
|
|
2584
2741
|
() => CABLayoutSection.omit({ sectionType: true }).extend({
|
|
2585
2742
|
/**
|
|
2586
2743
|
* The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
|
|
@@ -2589,35 +2746,35 @@ var CABProgressBarSection = z24.lazy(
|
|
|
2589
2746
|
* checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
|
|
2590
2747
|
* (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
|
|
2591
2748
|
*/
|
|
2592
|
-
barId:
|
|
2749
|
+
barId: z34.string().optional(),
|
|
2593
2750
|
/** Empty = shown everywhere; otherwise uppercase ISO country codes. */
|
|
2594
|
-
countryCodes:
|
|
2751
|
+
countryCodes: z34.array(z34.string().transform((code) => code.trim().toUpperCase())).default(() => []),
|
|
2595
2752
|
/**
|
|
2596
2753
|
* Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
|
|
2597
2754
|
* hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
|
|
2598
2755
|
*/
|
|
2599
|
-
excludeCountryCodes:
|
|
2756
|
+
excludeCountryCodes: z34.array(z34.string().transform((code) => code.trim().toUpperCase())).default(() => []),
|
|
2600
2757
|
/**
|
|
2601
2758
|
* Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
|
|
2602
2759
|
* forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
|
|
2603
2760
|
* adds the cart's discount allocations back to the live subtotal.
|
|
2604
2761
|
*/
|
|
2605
|
-
excludeDiscountInSubtotal:
|
|
2762
|
+
excludeDiscountInSubtotal: z34.boolean().default(false),
|
|
2606
2763
|
/** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
|
|
2607
|
-
excludedVariantIds:
|
|
2764
|
+
excludedVariantIds: z34.array(z34.number().int().positive()).default(() => []),
|
|
2608
2765
|
/**
|
|
2609
2766
|
* When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
|
|
2610
2767
|
* `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
|
|
2611
2768
|
*/
|
|
2612
|
-
freeShippingOnSubscription:
|
|
2769
|
+
freeShippingOnSubscription: z34.boolean().default(false),
|
|
2613
2770
|
/** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
|
|
2614
|
-
giftAreaTitle:
|
|
2771
|
+
giftAreaTitle: z34.record(z34.string(), z34.string()).default(() => ({ en: "FREE GIFTS" })),
|
|
2615
2772
|
/** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
|
|
2616
|
-
giftLabels:
|
|
2617
|
-
addGift:
|
|
2618
|
-
remove:
|
|
2619
|
-
selectOptions:
|
|
2620
|
-
yourGift:
|
|
2773
|
+
giftLabels: z34.object({
|
|
2774
|
+
addGift: z34.record(z34.string(), z34.string()).default(() => ({ ...GIFT_LABELS.addGift })),
|
|
2775
|
+
remove: z34.record(z34.string(), z34.string()).default(() => ({ ...GIFT_LABELS.remove })),
|
|
2776
|
+
selectOptions: z34.record(z34.string(), z34.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
|
|
2777
|
+
yourGift: z34.record(z34.string(), z34.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
|
|
2621
2778
|
}).default(() => ({
|
|
2622
2779
|
addGift: { ...GIFT_LABELS.addGift },
|
|
2623
2780
|
remove: { ...GIFT_LABELS.remove },
|
|
@@ -2625,38 +2782,38 @@ var CABProgressBarSection = z24.lazy(
|
|
|
2625
2782
|
yourGift: { ...GIFT_LABELS.yourGift }
|
|
2626
2783
|
})),
|
|
2627
2784
|
/** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
|
|
2628
|
-
name:
|
|
2785
|
+
name: z34.string().default("Order progress"),
|
|
2629
2786
|
/**
|
|
2630
2787
|
* Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
|
|
2631
2788
|
* fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
|
|
2632
2789
|
* absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
|
|
2633
2790
|
* optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
|
|
2634
2791
|
*/
|
|
2635
|
-
progressColor:
|
|
2636
|
-
sectionType:
|
|
2792
|
+
progressColor: z34.string().optional(),
|
|
2793
|
+
sectionType: z34.literal(SectionType.progressBar).default(SectionType.progressBar),
|
|
2637
2794
|
/**
|
|
2638
2795
|
* The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
|
|
2639
2796
|
* O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
|
|
2640
2797
|
* count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
|
|
2641
2798
|
* gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
|
|
2642
2799
|
*/
|
|
2643
|
-
tiers:
|
|
2800
|
+
tiers: z34.union([z34.array(CABProgressTier), z34.strictObject({}).transform(() => [])]).default(() => [])
|
|
2644
2801
|
})
|
|
2645
2802
|
);
|
|
2646
2803
|
|
|
2647
2804
|
// src/schema/widgets/checkout-and-beyond/quantity.ts
|
|
2648
2805
|
import { v7 as uuidv79 } from "uuid";
|
|
2649
|
-
import { z as
|
|
2650
|
-
var CABQuantitySection =
|
|
2806
|
+
import { z as z35 } from "zod";
|
|
2807
|
+
var CABQuantitySection = z35.object({
|
|
2651
2808
|
...CABVariableFields,
|
|
2652
|
-
errorMessages:
|
|
2653
|
-
|
|
2654
|
-
|
|
2809
|
+
errorMessages: z35.record(
|
|
2810
|
+
z35.string(),
|
|
2811
|
+
z35.object({
|
|
2655
2812
|
/** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
|
|
2656
|
-
increment:
|
|
2657
|
-
max:
|
|
2658
|
-
min:
|
|
2659
|
-
neg:
|
|
2813
|
+
increment: z35.string().optional(),
|
|
2814
|
+
max: z35.string().optional(),
|
|
2815
|
+
min: z35.string().optional(),
|
|
2816
|
+
neg: z35.string().optional()
|
|
2660
2817
|
})
|
|
2661
2818
|
).default({
|
|
2662
2819
|
en: {
|
|
@@ -2666,18 +2823,18 @@ var CABQuantitySection = z25.object({
|
|
|
2666
2823
|
neg: "Quantity cannot be negative"
|
|
2667
2824
|
}
|
|
2668
2825
|
}),
|
|
2669
|
-
inputType:
|
|
2670
|
-
max:
|
|
2671
|
-
min:
|
|
2826
|
+
inputType: z35.enum(quantityInputs).default(QuantityInput.select),
|
|
2827
|
+
max: z35.number().min(1).max(100).default(10),
|
|
2828
|
+
min: z35.number().min(1).default(1),
|
|
2672
2829
|
/** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
|
|
2673
|
-
name:
|
|
2674
|
-
sectionId:
|
|
2675
|
-
sectionType:
|
|
2830
|
+
name: z35.string().default("Quantity"),
|
|
2831
|
+
sectionId: z35.uuid().default(() => uuidv79()),
|
|
2832
|
+
sectionType: z35.literal(SectionType.quantity).default(SectionType.quantity)
|
|
2676
2833
|
});
|
|
2677
2834
|
|
|
2678
2835
|
// src/schema/widgets/checkout-and-beyond/reviews.ts
|
|
2679
2836
|
import { v7 as uuidv710 } from "uuid";
|
|
2680
|
-
import { z as
|
|
2837
|
+
import { z as z36 } from "zod";
|
|
2681
2838
|
|
|
2682
2839
|
// src/schema/widgets/checkout-and-beyond/reviewLabels.ts
|
|
2683
2840
|
var REVIEW_LABELS = {
|
|
@@ -2740,50 +2897,50 @@ var REVIEW_LABELS = {
|
|
|
2740
2897
|
};
|
|
2741
2898
|
|
|
2742
2899
|
// src/schema/widgets/checkout-and-beyond/reviews.ts
|
|
2743
|
-
var CABReviewsSection =
|
|
2900
|
+
var CABReviewsSection = z36.object({
|
|
2744
2901
|
...CABVariableFields,
|
|
2745
|
-
color:
|
|
2902
|
+
color: z36.string().default("#fadb14"),
|
|
2746
2903
|
/**
|
|
2747
2904
|
* Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
|
|
2748
2905
|
* form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
|
|
2749
2906
|
* or merchant work.
|
|
2750
2907
|
*/
|
|
2751
|
-
countLabels:
|
|
2752
|
-
one:
|
|
2753
|
-
other:
|
|
2908
|
+
countLabels: z36.object({
|
|
2909
|
+
one: z36.record(z36.string(), z36.string()).default(() => ({ ...REVIEW_LABELS.one })),
|
|
2910
|
+
other: z36.record(z36.string(), z36.string()).default(() => ({ ...REVIEW_LABELS.other }))
|
|
2754
2911
|
}).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
|
|
2755
|
-
name:
|
|
2756
|
-
sectionId:
|
|
2757
|
-
sectionType:
|
|
2758
|
-
size:
|
|
2912
|
+
name: z36.string().optional(),
|
|
2913
|
+
sectionId: z36.uuid().default(() => uuidv710()),
|
|
2914
|
+
sectionType: z36.literal(SectionType.reviews).default(SectionType.reviews),
|
|
2915
|
+
size: z36.enum(reviewsSizes).default(ReviewsSize.default)
|
|
2759
2916
|
});
|
|
2760
2917
|
|
|
2761
2918
|
// src/schema/widgets/checkout-and-beyond/variants.ts
|
|
2762
2919
|
import { slice } from "es-toolkit/compat";
|
|
2763
2920
|
import { v7 as uuidv711 } from "uuid";
|
|
2764
|
-
import { z as
|
|
2765
|
-
var CABVariantsSection =
|
|
2921
|
+
import { z as z37 } from "zod";
|
|
2922
|
+
var CABVariantsSection = z37.object({
|
|
2766
2923
|
...CABVariableFields,
|
|
2767
|
-
hideOutOfStockVariants:
|
|
2768
|
-
name:
|
|
2769
|
-
sectionId:
|
|
2770
|
-
sectionType:
|
|
2771
|
-
selector:
|
|
2772
|
-
variantMode:
|
|
2924
|
+
hideOutOfStockVariants: z37.boolean().default(false),
|
|
2925
|
+
name: z37.string().optional(),
|
|
2926
|
+
sectionId: z37.uuid().default(() => uuidv711()),
|
|
2927
|
+
sectionType: z37.literal(SectionType.variants).default(SectionType.variants),
|
|
2928
|
+
selector: z37.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
|
|
2929
|
+
variantMode: z37.enum(variantModes).default(VariantMode.multiple)
|
|
2773
2930
|
});
|
|
2774
2931
|
|
|
2775
2932
|
// src/schema/widgets/checkout-and-beyond/shared.ts
|
|
2776
|
-
var CABBorder =
|
|
2777
|
-
radius:
|
|
2778
|
-
style:
|
|
2779
|
-
width:
|
|
2933
|
+
var CABBorder = z38.object({
|
|
2934
|
+
radius: z38.enum(borderRadii).default(BorderRadius.base),
|
|
2935
|
+
style: z38.enum(borderStyles).default(BorderStyle.none),
|
|
2936
|
+
width: z38.enum(borderWidths).default(BorderWidth.base)
|
|
2780
2937
|
}).default({
|
|
2781
2938
|
radius: BorderRadius.base,
|
|
2782
2939
|
style: BorderStyle.none,
|
|
2783
2940
|
width: BorderWidth.base
|
|
2784
2941
|
});
|
|
2785
|
-
var CABSection =
|
|
2786
|
-
() =>
|
|
2942
|
+
var CABSection = z38.lazy(
|
|
2943
|
+
() => z38.discriminatedUnion("sectionType", [
|
|
2787
2944
|
CABBannerSection,
|
|
2788
2945
|
CABButtonSection,
|
|
2789
2946
|
CABCarouselSection,
|
|
@@ -2805,32 +2962,32 @@ var CABSection = z28.lazy(
|
|
|
2805
2962
|
);
|
|
2806
2963
|
|
|
2807
2964
|
// src/schema/widgets/checkout-and-beyond/layout.ts
|
|
2808
|
-
var GridItem =
|
|
2809
|
-
var CABLayoutSection =
|
|
2965
|
+
var GridItem = z39.union([z39.literal("auto"), z39.literal("fill"), z39.string().regex(/^\d+%$/), z39.number()]);
|
|
2966
|
+
var CABLayoutSection = z39.object({
|
|
2810
2967
|
...CABVariableFields,
|
|
2811
|
-
alignment:
|
|
2812
|
-
horizontal:
|
|
2813
|
-
vertical:
|
|
2968
|
+
alignment: z39.object({
|
|
2969
|
+
horizontal: z39.enum(horizontalAlignments).default(HorizontalAlignment.start),
|
|
2970
|
+
vertical: z39.enum(verticalAlignments).default(VerticalAlignment.top)
|
|
2814
2971
|
}).default({
|
|
2815
2972
|
horizontal: HorizontalAlignment.start,
|
|
2816
2973
|
vertical: VerticalAlignment.top
|
|
2817
2974
|
}),
|
|
2818
|
-
border:
|
|
2819
|
-
buttonField:
|
|
2820
|
-
direction:
|
|
2821
|
-
grid:
|
|
2822
|
-
columns:
|
|
2823
|
-
rows:
|
|
2975
|
+
border: z39.lazy(() => CABBorder),
|
|
2976
|
+
buttonField: z39.enum(buttonFields).optional(),
|
|
2977
|
+
direction: z39.enum(directions).default(Direction.rows),
|
|
2978
|
+
grid: z39.object({
|
|
2979
|
+
columns: z39.union([z39.array(GridItem), z39.undefined()]).default(() => ["auto"]),
|
|
2980
|
+
rows: z39.union([z39.array(GridItem), z39.undefined()]).default(() => ["auto"])
|
|
2824
2981
|
}).default({ columns: ["auto"], rows: ["auto"] }).optional(),
|
|
2825
|
-
name:
|
|
2826
|
-
padding:
|
|
2827
|
-
sectionId:
|
|
2828
|
-
sections:
|
|
2829
|
-
sectionType:
|
|
2830
|
-
spacing:
|
|
2982
|
+
name: z39.string().optional(),
|
|
2983
|
+
padding: z39.enum(spacings).default(Spacing.none),
|
|
2984
|
+
sectionId: z39.uuid().default(() => uuidv712()),
|
|
2985
|
+
sections: z39.union([z39.array(z39.lazy(() => CABSection)), z39.strictObject({}).transform(() => [])]).default(() => []),
|
|
2986
|
+
sectionType: z39.literal(SectionType.layout).default(SectionType.layout),
|
|
2987
|
+
spacing: z39.enum(spacings).default(Spacing.base),
|
|
2831
2988
|
/** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
|
|
2832
|
-
viewUrl:
|
|
2833
|
-
width:
|
|
2989
|
+
viewUrl: z39.string().optional(),
|
|
2990
|
+
width: z39.number().default(100)
|
|
2834
2991
|
});
|
|
2835
2992
|
|
|
2836
2993
|
// src/schema/widgets/checkout-and-beyond/uiLabels.ts
|
|
@@ -2851,8 +3008,8 @@ var UI_LABELS = {
|
|
|
2851
3008
|
};
|
|
2852
3009
|
|
|
2853
3010
|
// src/schema/widgets/checkout-and-beyond/root.ts
|
|
2854
|
-
var localized = (fallback) =>
|
|
2855
|
-
var CABUILabels =
|
|
3011
|
+
var localized = (fallback) => z40.record(z40.string(), z40.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
|
|
3012
|
+
var CABUILabels = z40.object({
|
|
2856
3013
|
currentPage: localized(UI_LABELS.currentPage),
|
|
2857
3014
|
guest: localized(UI_LABELS.guest),
|
|
2858
3015
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
@@ -2877,154 +3034,154 @@ var CABUILabels = z30.object({
|
|
|
2877
3034
|
subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
|
|
2878
3035
|
updating: { ...UI_LABELS.updating }
|
|
2879
3036
|
}));
|
|
2880
|
-
var TargetArea =
|
|
2881
|
-
fill:
|
|
2882
|
-
flip:
|
|
2883
|
-
icon:
|
|
2884
|
-
label:
|
|
2885
|
-
width:
|
|
3037
|
+
var TargetArea = z40.object({
|
|
3038
|
+
fill: z40.boolean().optional(),
|
|
3039
|
+
flip: z40.enum(["both", "horizontal", "vertical"]).optional(),
|
|
3040
|
+
icon: z40.string(),
|
|
3041
|
+
label: z40.string(),
|
|
3042
|
+
width: z40.string()
|
|
2886
3043
|
}).default(targetAreas[EditorMode.checkoutExtension][1]);
|
|
2887
|
-
var CABTracking =
|
|
2888
|
-
enableAttribution:
|
|
2889
|
-
enableSource:
|
|
2890
|
-
enableWidget:
|
|
3044
|
+
var CABTracking = z40.object({
|
|
3045
|
+
enableAttribution: z40.boolean().nullish().transform((value) => value ?? true),
|
|
3046
|
+
enableSource: z40.boolean().nullish().transform((value) => value ?? true),
|
|
3047
|
+
enableWidget: z40.boolean().nullish().transform((value) => value ?? true)
|
|
2891
3048
|
}).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
|
|
2892
|
-
var CABExperiment =
|
|
2893
|
-
elementId:
|
|
2894
|
-
experimentId:
|
|
2895
|
-
experimentType:
|
|
2896
|
-
selectedId:
|
|
3049
|
+
var CABExperiment = z40.object({
|
|
3050
|
+
elementId: z40.number(),
|
|
3051
|
+
experimentId: z40.number(),
|
|
3052
|
+
experimentType: z40.string(),
|
|
3053
|
+
selectedId: z40.number()
|
|
2897
3054
|
});
|
|
2898
3055
|
var CABRootSection = CABLayoutSection.extend({
|
|
2899
|
-
editorMode:
|
|
3056
|
+
editorMode: z40.enum(editorModes).default(EditorMode.checkoutExtension),
|
|
2900
3057
|
experiment: CABExperiment.optional(),
|
|
2901
3058
|
// Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
|
|
2902
3059
|
// `null` must fall back rather than throw the widget; malformed values still throw.
|
|
2903
|
-
previewMode:
|
|
2904
|
-
storeId:
|
|
3060
|
+
previewMode: z40.boolean().nullish().transform((value) => value ?? false),
|
|
3061
|
+
storeId: z40.number().nullable().default(null),
|
|
2905
3062
|
targetArea: TargetArea.nullable(),
|
|
2906
3063
|
tracking: CABTracking,
|
|
2907
|
-
type:
|
|
3064
|
+
type: z40.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
|
|
2908
3065
|
uiLabels: CABUILabels,
|
|
2909
|
-
version:
|
|
2910
|
-
widgetId:
|
|
3066
|
+
version: z40.literal(2).default(2),
|
|
3067
|
+
widgetId: z40.number().nullable().default(null)
|
|
2911
3068
|
});
|
|
2912
3069
|
|
|
2913
3070
|
// src/schema/widgets/contentBlock.ts
|
|
2914
|
-
var ContentBlockV1 =
|
|
2915
|
-
blockSpacing:
|
|
2916
|
-
imageBlocks:
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
altText:
|
|
2920
|
-
description:
|
|
2921
|
-
id:
|
|
2922
|
-
imagePlacement:
|
|
2923
|
-
imageSize:
|
|
2924
|
-
imageUrl:
|
|
2925
|
-
textAlignment:
|
|
3071
|
+
var ContentBlockV1 = z41.object({
|
|
3072
|
+
blockSpacing: z41.enum(spacings).optional(),
|
|
3073
|
+
imageBlocks: z41.union([
|
|
3074
|
+
z41.array(
|
|
3075
|
+
z41.object({
|
|
3076
|
+
altText: z41.string().nullable(),
|
|
3077
|
+
description: z41.string().nullable(),
|
|
3078
|
+
id: z41.uuid(),
|
|
3079
|
+
imagePlacement: z41.enum(["top", "right", "bottom", "left"]),
|
|
3080
|
+
imageSize: z41.number(),
|
|
3081
|
+
imageUrl: z41.url(),
|
|
3082
|
+
textAlignment: z41.enum(["left", "center", "right"]),
|
|
2926
3083
|
/** Inline scale only: an image caption can never be a block-level heading. */
|
|
2927
|
-
textSize:
|
|
3084
|
+
textSize: z41.enum(inlineTextSizeNames)
|
|
2928
3085
|
})
|
|
2929
3086
|
),
|
|
2930
|
-
|
|
3087
|
+
z41.strictObject({}).transform(() => [])
|
|
2931
3088
|
]).optional(),
|
|
2932
|
-
imageLayout:
|
|
2933
|
-
language:
|
|
2934
|
-
description:
|
|
2935
|
-
superTitle:
|
|
2936
|
-
title:
|
|
3089
|
+
imageLayout: z41.enum(["row", "column"]).optional(),
|
|
3090
|
+
language: z41.object({
|
|
3091
|
+
description: z41.string(),
|
|
3092
|
+
superTitle: z41.string(),
|
|
3093
|
+
title: z41.string()
|
|
2937
3094
|
}),
|
|
2938
|
-
previewMode:
|
|
2939
|
-
type:
|
|
2940
|
-
version:
|
|
3095
|
+
previewMode: z41.boolean(),
|
|
3096
|
+
type: z41.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
|
|
3097
|
+
version: z41.literal(1)
|
|
2941
3098
|
});
|
|
2942
|
-
var ContentBlock =
|
|
3099
|
+
var ContentBlock = z41.discriminatedUnion("version", [
|
|
2943
3100
|
ContentBlockV1,
|
|
2944
3101
|
CABRootSection.extend({
|
|
2945
|
-
type:
|
|
3102
|
+
type: z41.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
|
|
2946
3103
|
})
|
|
2947
3104
|
]);
|
|
2948
3105
|
|
|
2949
3106
|
// src/schema/widgets/giftWithPurchase.ts
|
|
2950
|
-
import { z as
|
|
2951
|
-
var GiftWithPurchase =
|
|
2952
|
-
type:
|
|
3107
|
+
import { z as z42 } from "zod";
|
|
3108
|
+
var GiftWithPurchase = z42.looseObject({
|
|
3109
|
+
type: z42.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
|
|
2953
3110
|
});
|
|
2954
3111
|
|
|
2955
3112
|
// src/schema/widgets/lineItemEditor.ts
|
|
2956
|
-
import { z as
|
|
2957
|
-
var LineItemEditorSwitchLanguageV1 =
|
|
2958
|
-
downgradeToOneTimeLabel:
|
|
3113
|
+
import { z as z43 } from "zod";
|
|
3114
|
+
var LineItemEditorSwitchLanguageV1 = z43.object({
|
|
3115
|
+
downgradeToOneTimeLabel: z43.string().optional(),
|
|
2959
3116
|
/** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
|
|
2960
|
-
subscriptionOptionLabel:
|
|
2961
|
-
upgradeToSubscriptionLabel:
|
|
2962
|
-
upgradeToSubscriptionWithoutDiscountLabel:
|
|
3117
|
+
subscriptionOptionLabel: z43.string().optional(),
|
|
3118
|
+
upgradeToSubscriptionLabel: z43.string().optional(),
|
|
3119
|
+
upgradeToSubscriptionWithoutDiscountLabel: z43.string().optional()
|
|
2963
3120
|
});
|
|
2964
|
-
var LineItemEditorV1 =
|
|
3121
|
+
var LineItemEditorV1 = z43.object({
|
|
2965
3122
|
/** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
|
|
2966
|
-
button:
|
|
2967
|
-
previewMode:
|
|
2968
|
-
switchToSubscription:
|
|
2969
|
-
disableDowngrade:
|
|
3123
|
+
button: z43.object({ kind: z43.enum(["plain", "primary", "secondary"]).optional() }).optional(),
|
|
3124
|
+
previewMode: z43.boolean().optional(),
|
|
3125
|
+
switchToSubscription: z43.object({
|
|
3126
|
+
disableDowngrade: z43.boolean().optional(),
|
|
2970
3127
|
language: LineItemEditorSwitchLanguageV1.optional()
|
|
2971
3128
|
}).optional(),
|
|
2972
|
-
switchToSubscriptionEnabled:
|
|
2973
|
-
tracking:
|
|
2974
|
-
enableAttribution:
|
|
2975
|
-
enableSource:
|
|
2976
|
-
enableWidget:
|
|
3129
|
+
switchToSubscriptionEnabled: z43.boolean().optional(),
|
|
3130
|
+
tracking: z43.object({
|
|
3131
|
+
enableAttribution: z43.boolean().optional(),
|
|
3132
|
+
enableSource: z43.boolean().optional(),
|
|
3133
|
+
enableWidget: z43.boolean().optional()
|
|
2977
3134
|
}).optional(),
|
|
2978
|
-
type:
|
|
2979
|
-
version:
|
|
3135
|
+
type: z43.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
|
|
3136
|
+
version: z43.literal(1)
|
|
2980
3137
|
});
|
|
2981
|
-
var LineItemEditor =
|
|
3138
|
+
var LineItemEditor = z43.discriminatedUnion("version", [
|
|
2982
3139
|
LineItemEditorV1,
|
|
2983
3140
|
CABRootSection.extend({
|
|
2984
|
-
type:
|
|
3141
|
+
type: z43.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
|
|
2985
3142
|
})
|
|
2986
3143
|
]);
|
|
2987
3144
|
|
|
2988
3145
|
// src/schema/widgets/progressBar.ts
|
|
2989
|
-
import { z as
|
|
2990
|
-
var ProgressBar =
|
|
2991
|
-
type:
|
|
3146
|
+
import { z as z44 } from "zod";
|
|
3147
|
+
var ProgressBar = z44.looseObject({
|
|
3148
|
+
type: z44.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
|
|
2992
3149
|
});
|
|
2993
3150
|
|
|
2994
3151
|
// src/schema/widgets/rebuyButton.ts
|
|
2995
|
-
import { z as
|
|
2996
|
-
var RebuyButtonV1 =
|
|
2997
|
-
type:
|
|
2998
|
-
version:
|
|
3152
|
+
import { z as z45 } from "zod";
|
|
3153
|
+
var RebuyButtonV1 = z45.looseObject({
|
|
3154
|
+
type: z45.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
|
|
3155
|
+
version: z45.literal(1)
|
|
2999
3156
|
});
|
|
3000
|
-
var RebuyButton =
|
|
3157
|
+
var RebuyButton = z45.discriminatedUnion("version", [
|
|
3001
3158
|
RebuyButtonV1,
|
|
3002
3159
|
CABRootSection.extend({
|
|
3003
|
-
type:
|
|
3160
|
+
type: z45.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
|
|
3004
3161
|
})
|
|
3005
3162
|
]);
|
|
3006
3163
|
|
|
3007
3164
|
// src/schema/widgets/rebuyMonetize.ts
|
|
3008
|
-
import { z as
|
|
3009
|
-
var RebuyMonetize =
|
|
3010
|
-
type:
|
|
3165
|
+
import { z as z46 } from "zod";
|
|
3166
|
+
var RebuyMonetize = z46.looseObject({
|
|
3167
|
+
type: z46.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
|
|
3011
3168
|
});
|
|
3012
|
-
var RebuyMonetizeV1 =
|
|
3013
|
-
name:
|
|
3014
|
-
previewMode:
|
|
3169
|
+
var RebuyMonetizeV1 = z46.object({
|
|
3170
|
+
name: z46.string().nullable().optional(),
|
|
3171
|
+
previewMode: z46.boolean().optional(),
|
|
3015
3172
|
/** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
|
|
3016
|
-
privacyPolicyUrl:
|
|
3173
|
+
privacyPolicyUrl: z46.string().nullable().optional(),
|
|
3017
3174
|
/** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
|
|
3018
|
-
subVertical:
|
|
3019
|
-
tracking:
|
|
3020
|
-
enableAttribution:
|
|
3021
|
-
enableSource:
|
|
3022
|
-
enableWidget:
|
|
3175
|
+
subVertical: z46.string().nullable().optional(),
|
|
3176
|
+
tracking: z46.object({
|
|
3177
|
+
enableAttribution: z46.boolean().optional(),
|
|
3178
|
+
enableSource: z46.boolean().optional(),
|
|
3179
|
+
enableWidget: z46.boolean().optional()
|
|
3023
3180
|
}).optional(),
|
|
3024
|
-
type:
|
|
3025
|
-
version:
|
|
3181
|
+
type: z46.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
|
|
3182
|
+
version: z46.literal(1),
|
|
3026
3183
|
/** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
|
|
3027
|
-
vertical:
|
|
3184
|
+
vertical: z46.string().nullable().optional()
|
|
3028
3185
|
});
|
|
3029
3186
|
|
|
3030
3187
|
// src/schema/widgetData.ts
|
|
@@ -3038,7 +3195,7 @@ var extensionWidgetTypes = [
|
|
|
3038
3195
|
WidgetType.ui_extension_line_item_editor,
|
|
3039
3196
|
WidgetType.ui_extension_progress_bar
|
|
3040
3197
|
];
|
|
3041
|
-
var WidgetData =
|
|
3198
|
+
var WidgetData = z47.discriminatedUnion("type", [
|
|
3042
3199
|
ABTestingPlaceholder,
|
|
3043
3200
|
CheckoutExtension,
|
|
3044
3201
|
ContentBlock,
|
|
@@ -3399,15 +3556,15 @@ var SWITCH_LABELS = {
|
|
|
3399
3556
|
|
|
3400
3557
|
// src/schema/widgets/post-purchase-offer/common.ts
|
|
3401
3558
|
import { replace, toNumber, toString } from "es-toolkit/compat";
|
|
3402
|
-
import { z as
|
|
3403
|
-
var strictNumber =
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3559
|
+
import { z as z48 } from "zod";
|
|
3560
|
+
var strictNumber = z48.union([
|
|
3561
|
+
z48.number(),
|
|
3562
|
+
z48.string().transform((value) => toNumber(replace(toString(value), /[^0-9.]/g, "")) || 0),
|
|
3563
|
+
z48.unknown().transform(() => 0)
|
|
3407
3564
|
]);
|
|
3408
3565
|
|
|
3409
3566
|
// src/schema/widgets/post-purchase-offer/constants.ts
|
|
3410
|
-
import { z as
|
|
3567
|
+
import { z as z49 } from "zod";
|
|
3411
3568
|
var blockTypes = [
|
|
3412
3569
|
"callout_banner",
|
|
3413
3570
|
"image",
|
|
@@ -3418,144 +3575,144 @@ var blockTypes = [
|
|
|
3418
3575
|
"text",
|
|
3419
3576
|
"timer"
|
|
3420
3577
|
];
|
|
3421
|
-
var blockType =
|
|
3578
|
+
var blockType = z49.enum(blockTypes);
|
|
3422
3579
|
var BlockType = blockType.enum;
|
|
3423
3580
|
|
|
3424
3581
|
// src/schema/widgets/post-purchase-offer/postPurchaseBlocks.ts
|
|
3425
3582
|
import { get as get3, isEqual } from "es-toolkit/compat";
|
|
3426
3583
|
import { v4 as uuidv42 } from "uuid";
|
|
3427
|
-
import { z as
|
|
3428
|
-
var TextAlignment2 =
|
|
3429
|
-
var TextSize =
|
|
3430
|
-
|
|
3431
|
-
|
|
3584
|
+
import { z as z50 } from "zod";
|
|
3585
|
+
var TextAlignment2 = z50.union([z50.enum(["leading", "center", "trailing"]), z50.unknown().transform(() => "leading")]);
|
|
3586
|
+
var TextSize = z50.union([
|
|
3587
|
+
z50.enum(["xsmall", "small", "base", "default", "medium", "large", "xlarge"]),
|
|
3588
|
+
z50.unknown().transform(() => "medium")
|
|
3432
3589
|
]);
|
|
3433
|
-
var CalloutBannerBlock =
|
|
3434
|
-
id:
|
|
3435
|
-
name:
|
|
3436
|
-
settings:
|
|
3437
|
-
superTitle:
|
|
3438
|
-
title:
|
|
3590
|
+
var CalloutBannerBlock = z50.object({
|
|
3591
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3592
|
+
name: z50.string().optional(),
|
|
3593
|
+
settings: z50.object({
|
|
3594
|
+
superTitle: z50.union([z50.string(), TiptapDocument]).default(() => "Limited-time Offer"),
|
|
3595
|
+
title: z50.union([z50.string(), TiptapDocument]).default(() => "Add this customer favorite to your order")
|
|
3439
3596
|
}),
|
|
3440
|
-
styles:
|
|
3441
|
-
superTitleEmphasized:
|
|
3597
|
+
styles: z50.object({
|
|
3598
|
+
superTitleEmphasized: z50.boolean().default(false),
|
|
3442
3599
|
superTitleSize: TextSize.default("large"),
|
|
3443
3600
|
textAlignment: TextAlignment2.default("center"),
|
|
3444
|
-
titleEmphasized:
|
|
3601
|
+
titleEmphasized: z50.boolean().default(true),
|
|
3445
3602
|
titleSize: TextSize.default("large")
|
|
3446
3603
|
}),
|
|
3447
|
-
type:
|
|
3604
|
+
type: z50.literal(BlockType.callout_banner).default(BlockType.callout_banner)
|
|
3448
3605
|
});
|
|
3449
|
-
var ImageBlock =
|
|
3450
|
-
id:
|
|
3451
|
-
name:
|
|
3452
|
-
settings:
|
|
3453
|
-
|
|
3606
|
+
var ImageBlock = z50.object({
|
|
3607
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3608
|
+
name: z50.string().optional(),
|
|
3609
|
+
settings: z50.union([
|
|
3610
|
+
z50.object({
|
|
3454
3611
|
/** This isn't used in the post-purchase offer widget */
|
|
3455
|
-
alt:
|
|
3456
|
-
image:
|
|
3457
|
-
imageSize:
|
|
3458
|
-
imageType:
|
|
3612
|
+
alt: z50.string().optional().default(""),
|
|
3613
|
+
image: z50.union([z50.literal(""), z50.url()]).default(""),
|
|
3614
|
+
imageSize: z50.number().default(20),
|
|
3615
|
+
imageType: z50.enum(["URL", "UPLOAD"]).default("URL")
|
|
3459
3616
|
}),
|
|
3460
|
-
|
|
3617
|
+
z50.array(z50.never()).transform(() => ({}))
|
|
3461
3618
|
]),
|
|
3462
|
-
type:
|
|
3619
|
+
type: z50.literal(BlockType.image).default(BlockType.image)
|
|
3463
3620
|
});
|
|
3464
|
-
var ImageContentBlock =
|
|
3465
|
-
id:
|
|
3466
|
-
name:
|
|
3467
|
-
settings:
|
|
3468
|
-
alt:
|
|
3469
|
-
description:
|
|
3621
|
+
var ImageContentBlock = z50.object({
|
|
3622
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3623
|
+
name: z50.string().optional(),
|
|
3624
|
+
settings: z50.object({
|
|
3625
|
+
alt: z50.string().optional().default(""),
|
|
3626
|
+
description: z50.union([z50.string(), TiptapDocument, z50.null()]).default(
|
|
3470
3627
|
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
|
3471
3628
|
),
|
|
3472
3629
|
descriptionSize: TextSize.default("medium"),
|
|
3473
3630
|
horizontalAlignment: TextAlignment2.default("leading"),
|
|
3474
|
-
image:
|
|
3475
|
-
imagePlacement:
|
|
3476
|
-
imageSize:
|
|
3477
|
-
superTitle:
|
|
3631
|
+
image: z50.union([z50.literal(""), z50.url()]).default(""),
|
|
3632
|
+
imagePlacement: z50.enum(["bottom", "left", "right", "top"]).optional().default("left"),
|
|
3633
|
+
imageSize: z50.number().default(20),
|
|
3634
|
+
superTitle: z50.union([z50.string(), TiptapDocument]).default("Lorem Ipsum!"),
|
|
3478
3635
|
superTitleSize: TextSize.default("medium"),
|
|
3479
3636
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3480
|
-
swapContent:
|
|
3481
|
-
title:
|
|
3637
|
+
swapContent: z50.boolean().optional().default(false),
|
|
3638
|
+
title: z50.union([z50.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet"),
|
|
3482
3639
|
titleSize: TextSize.default("medium")
|
|
3483
3640
|
}),
|
|
3484
|
-
type:
|
|
3641
|
+
type: z50.literal(BlockType.image_content).default(BlockType.image_content)
|
|
3485
3642
|
});
|
|
3486
|
-
var PayButtonBlock =
|
|
3487
|
-
id:
|
|
3488
|
-
name:
|
|
3489
|
-
settings:
|
|
3490
|
-
|
|
3491
|
-
label:
|
|
3643
|
+
var PayButtonBlock = z50.object({
|
|
3644
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3645
|
+
name: z50.string().optional(),
|
|
3646
|
+
settings: z50.union([
|
|
3647
|
+
z50.object({
|
|
3648
|
+
label: z50.string().default("Pay Now")
|
|
3492
3649
|
}),
|
|
3493
|
-
|
|
3650
|
+
z50.array(z50.never()).transform(() => ({
|
|
3494
3651
|
label: "Pay Now"
|
|
3495
3652
|
}))
|
|
3496
3653
|
]),
|
|
3497
|
-
styles:
|
|
3498
|
-
|
|
3499
|
-
buttonWidth:
|
|
3654
|
+
styles: z50.union([
|
|
3655
|
+
z50.object({
|
|
3656
|
+
buttonWidth: z50.number().min(10).max(100).default(50)
|
|
3500
3657
|
}),
|
|
3501
|
-
|
|
3658
|
+
z50.array(z50.never()).transform(() => ({
|
|
3502
3659
|
buttonWidth: 50
|
|
3503
3660
|
}))
|
|
3504
3661
|
]),
|
|
3505
|
-
type:
|
|
3662
|
+
type: z50.literal(BlockType.pay_button).default(BlockType.pay_button)
|
|
3506
3663
|
});
|
|
3507
|
-
var ProductInformationBlock =
|
|
3664
|
+
var ProductInformationBlock = z50.object({
|
|
3508
3665
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3509
|
-
hideProductImage:
|
|
3510
|
-
id:
|
|
3511
|
-
name:
|
|
3512
|
-
type:
|
|
3666
|
+
hideProductImage: z50.boolean().optional().default(false),
|
|
3667
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3668
|
+
name: z50.string().optional(),
|
|
3669
|
+
type: z50.literal(BlockType.product_information).default(BlockType.product_information)
|
|
3513
3670
|
});
|
|
3514
|
-
var SeparatorBlock =
|
|
3515
|
-
id:
|
|
3516
|
-
name:
|
|
3517
|
-
type:
|
|
3671
|
+
var SeparatorBlock = z50.object({
|
|
3672
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3673
|
+
name: z50.string().optional(),
|
|
3674
|
+
type: z50.literal(BlockType.separator).default(BlockType.separator)
|
|
3518
3675
|
});
|
|
3519
|
-
var TextBlock =
|
|
3520
|
-
id:
|
|
3521
|
-
name:
|
|
3522
|
-
settings:
|
|
3523
|
-
description:
|
|
3676
|
+
var TextBlock = z50.object({
|
|
3677
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3678
|
+
name: z50.string().optional(),
|
|
3679
|
+
settings: z50.object({
|
|
3680
|
+
description: z50.union([z50.string(), TiptapDocument]).optional().default(
|
|
3524
3681
|
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
|
3525
3682
|
),
|
|
3526
3683
|
/** This isn't used in the post-purchase offer widget */
|
|
3527
3684
|
descriptionSize: TextSize.default("medium"),
|
|
3528
3685
|
horizontalAlignment: TextAlignment2.default("leading"),
|
|
3529
|
-
superTitle:
|
|
3686
|
+
superTitle: z50.union([z50.string(), TiptapDocument]).default("Super Title"),
|
|
3530
3687
|
/** This isn't used in the post-purchase offer widget */
|
|
3531
3688
|
superTitleSize: TextSize.default("medium"),
|
|
3532
|
-
title:
|
|
3689
|
+
title: z50.union([z50.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet."),
|
|
3533
3690
|
/** This isn't used in the post-purchase offer widget */
|
|
3534
3691
|
titleSize: TextSize.default("medium")
|
|
3535
3692
|
}),
|
|
3536
|
-
type:
|
|
3693
|
+
type: z50.literal(BlockType.text).default(BlockType.text)
|
|
3537
3694
|
});
|
|
3538
|
-
var TimerBlock =
|
|
3539
|
-
id:
|
|
3540
|
-
name:
|
|
3541
|
-
settings:
|
|
3542
|
-
durationMinutes:
|
|
3543
|
-
durationSeconds:
|
|
3544
|
-
endOffer:
|
|
3545
|
-
title:
|
|
3695
|
+
var TimerBlock = z50.object({
|
|
3696
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3697
|
+
name: z50.string().optional(),
|
|
3698
|
+
settings: z50.object({
|
|
3699
|
+
durationMinutes: z50.number().min(0).default(10),
|
|
3700
|
+
durationSeconds: z50.union([z50.number().min(0), z50.unknown().transform(() => 0)]).default(0),
|
|
3701
|
+
endOffer: z50.boolean().default(true),
|
|
3702
|
+
title: z50.union([z50.string(), TiptapDocument]).default("Hurry \u2014 your special offer ends in:")
|
|
3546
3703
|
}),
|
|
3547
|
-
styles:
|
|
3704
|
+
styles: z50.object({
|
|
3548
3705
|
textAlignment: TextAlignment2.default("center"),
|
|
3549
|
-
timerBackgroundColor:
|
|
3550
|
-
timerEmphasized:
|
|
3706
|
+
timerBackgroundColor: z50.enum(["info", "warning", "success", "critical"]).default("warning"),
|
|
3707
|
+
timerEmphasized: z50.union([z50.boolean(), z50.unknown().transform(() => true)]).default(true),
|
|
3551
3708
|
timerSize: TextSize.default("medium"),
|
|
3552
|
-
timerWidth:
|
|
3553
|
-
titleEmphasized:
|
|
3709
|
+
timerWidth: z50.number().min(10).max(100).optional().default(100),
|
|
3710
|
+
titleEmphasized: z50.union([z50.boolean(), z50.unknown().transform(() => true)]).default(false),
|
|
3554
3711
|
titleSize: TextSize.default("medium")
|
|
3555
3712
|
}),
|
|
3556
|
-
type:
|
|
3713
|
+
type: z50.literal(BlockType.timer).default(BlockType.timer)
|
|
3557
3714
|
});
|
|
3558
|
-
var PostPurchaseBlock =
|
|
3715
|
+
var PostPurchaseBlock = z50.discriminatedUnion("type", [
|
|
3559
3716
|
CalloutBannerBlock,
|
|
3560
3717
|
ImageBlock,
|
|
3561
3718
|
ImageContentBlock,
|
|
@@ -3575,68 +3732,68 @@ var isTextBlock = (block) => isEqual(get3(block, "type"), BlockType.text);
|
|
|
3575
3732
|
var isTimerBlock = (block) => isEqual(get3(block, "type"), BlockType.timer);
|
|
3576
3733
|
|
|
3577
3734
|
// src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
|
|
3578
|
-
import { z as
|
|
3735
|
+
import { z as z53 } from "zod";
|
|
3579
3736
|
|
|
3580
3737
|
// src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
|
|
3581
|
-
import { z as
|
|
3738
|
+
import { z as z52 } from "zod";
|
|
3582
3739
|
|
|
3583
3740
|
// src/schema/widgets/post-purchase-offer/postPurchaseSettings.ts
|
|
3584
|
-
import { z as
|
|
3585
|
-
var PostPurchaseSettings =
|
|
3586
|
-
advance:
|
|
3587
|
-
blocks:
|
|
3741
|
+
import { z as z51 } from "zod";
|
|
3742
|
+
var PostPurchaseSettings = z51.object({
|
|
3743
|
+
advance: z51.object({ removePartialOrder: z51.boolean().default(true) }).optional().default(() => ({ removePartialOrder: true })),
|
|
3744
|
+
blocks: z51.union([z51.array(PostPurchaseBlock), z51.unknown().transform(() => [])]).default(() => [
|
|
3588
3745
|
PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.timer }),
|
|
3589
3746
|
PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.callout_banner }),
|
|
3590
3747
|
PostPurchaseBlock.parse({ type: BlockType.product_information })
|
|
3591
3748
|
]),
|
|
3592
|
-
columnLayout:
|
|
3593
|
-
discount:
|
|
3749
|
+
columnLayout: z51.boolean().optional(),
|
|
3750
|
+
discount: z51.object({
|
|
3594
3751
|
amount: strictNumber.default(30),
|
|
3595
|
-
shouldShowSavingText:
|
|
3596
|
-
type:
|
|
3752
|
+
shouldShowSavingText: z51.boolean().optional().default(true),
|
|
3753
|
+
type: z51.enum(["none", "fixed_amount", "percentage"]).default("none")
|
|
3597
3754
|
}),
|
|
3598
|
-
discountedFrom:
|
|
3599
|
-
endpoint:
|
|
3600
|
-
integrations:
|
|
3601
|
-
judgeme:
|
|
3602
|
-
junip:
|
|
3603
|
-
klaviyo:
|
|
3604
|
-
loox:
|
|
3605
|
-
okendo:
|
|
3606
|
-
opinew:
|
|
3607
|
-
reviewsio:
|
|
3608
|
-
stamped:
|
|
3609
|
-
yotpo:
|
|
3755
|
+
discountedFrom: z51.enum(["price", "compare_at_price"]).optional().default("price"),
|
|
3756
|
+
endpoint: z51.string().optional(),
|
|
3757
|
+
integrations: z51.object({
|
|
3758
|
+
judgeme: z51.boolean().default(false),
|
|
3759
|
+
junip: z51.boolean().optional().default(false),
|
|
3760
|
+
klaviyo: z51.boolean().default(false),
|
|
3761
|
+
loox: z51.boolean().default(false),
|
|
3762
|
+
okendo: z51.boolean().default(false),
|
|
3763
|
+
opinew: z51.boolean().optional().default(false),
|
|
3764
|
+
reviewsio: z51.boolean().optional().default(false),
|
|
3765
|
+
stamped: z51.boolean().default(false),
|
|
3766
|
+
yotpo: z51.boolean().default(false)
|
|
3610
3767
|
}),
|
|
3611
|
-
key:
|
|
3612
|
-
language:
|
|
3613
|
-
description:
|
|
3614
|
-
descriptionEnabled:
|
|
3615
|
-
descriptionRte:
|
|
3616
|
-
content:
|
|
3617
|
-
type:
|
|
3768
|
+
key: z51.string().optional(),
|
|
3769
|
+
language: z51.object({
|
|
3770
|
+
description: z51.union([z51.string(), z51.unknown().transform(() => "")]).default(""),
|
|
3771
|
+
descriptionEnabled: z51.boolean().optional().default(false),
|
|
3772
|
+
descriptionRte: z51.object({
|
|
3773
|
+
content: z51.array(z51.unknown()),
|
|
3774
|
+
type: z51.string()
|
|
3618
3775
|
}).optional(),
|
|
3619
|
-
descriptionSpacing:
|
|
3620
|
-
displayCtaPrice:
|
|
3621
|
-
global:
|
|
3622
|
-
declineAll:
|
|
3623
|
-
declineThisOffer:
|
|
3624
|
-
free:
|
|
3625
|
-
notAvailable:
|
|
3626
|
-
payNow:
|
|
3627
|
-
payNowUpgradeToSubscription:
|
|
3628
|
-
quantity:
|
|
3776
|
+
descriptionSpacing: z51.enum(["none", "xtight", "tight", "default", "loose", "xloose"]).optional(),
|
|
3777
|
+
displayCtaPrice: z51.boolean().default(true),
|
|
3778
|
+
global: z51.object({
|
|
3779
|
+
declineAll: z51.string().optional().default("Decline All"),
|
|
3780
|
+
declineThisOffer: z51.string().default("Decline this offer"),
|
|
3781
|
+
free: z51.string().optional().default("Free"),
|
|
3782
|
+
notAvailable: z51.string().optional().default("Not available"),
|
|
3783
|
+
payNow: z51.string().default("Pay Now"),
|
|
3784
|
+
payNowUpgradeToSubscription: z51.string().optional().default("Upgrade to Subscription"),
|
|
3785
|
+
quantity: z51.string().default("Quantity"),
|
|
3629
3786
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3630
|
-
recurringShipping:
|
|
3631
|
-
recurringSubtotal:
|
|
3632
|
-
reviewsPlural:
|
|
3633
|
-
reviewsSingular:
|
|
3634
|
-
save:
|
|
3635
|
-
shipping:
|
|
3636
|
-
subscriptionOption:
|
|
3637
|
-
subtotal:
|
|
3638
|
-
taxes:
|
|
3639
|
-
total:
|
|
3787
|
+
recurringShipping: z51.string().optional().default("Recurring shipping"),
|
|
3788
|
+
recurringSubtotal: z51.string().default("Recurring subtotal"),
|
|
3789
|
+
reviewsPlural: z51.string().optional().default("Reviews"),
|
|
3790
|
+
reviewsSingular: z51.string().optional().default("Review"),
|
|
3791
|
+
save: z51.union([z51.string(), z51.unknown().transform(() => "Save")]).optional().default("Save"),
|
|
3792
|
+
shipping: z51.string().default("Shipping"),
|
|
3793
|
+
subscriptionOption: z51.string().optional().default("Subscribe and Save"),
|
|
3794
|
+
subtotal: z51.string().default("Subtotal"),
|
|
3795
|
+
taxes: z51.string().default("Taxes"),
|
|
3796
|
+
total: z51.string().default("Total")
|
|
3640
3797
|
}).optional().default(() => ({
|
|
3641
3798
|
declineAll: "Decline All",
|
|
3642
3799
|
declineThisOffer: "Decline this offer",
|
|
@@ -3657,70 +3814,70 @@ var PostPurchaseSettings = z41.object({
|
|
|
3657
3814
|
taxes: "Taxes",
|
|
3658
3815
|
total: "Total"
|
|
3659
3816
|
})),
|
|
3660
|
-
globalTranslation:
|
|
3817
|
+
globalTranslation: z51.string().optional().default("english")
|
|
3661
3818
|
}),
|
|
3662
|
-
metafields:
|
|
3819
|
+
metafields: z51.boolean().default(false),
|
|
3663
3820
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3664
|
-
offer:
|
|
3665
|
-
count:
|
|
3821
|
+
offer: z51.object({
|
|
3822
|
+
count: z51.number().default(1)
|
|
3666
3823
|
}),
|
|
3667
|
-
offersLayout:
|
|
3668
|
-
itemsPerPage:
|
|
3669
|
-
type:
|
|
3824
|
+
offersLayout: z51.object({
|
|
3825
|
+
itemsPerPage: z51.number().optional(),
|
|
3826
|
+
type: z51.enum(["list", "grid", "carousel"]).default("list")
|
|
3670
3827
|
}).optional().default({
|
|
3671
3828
|
type: "list"
|
|
3672
3829
|
}),
|
|
3673
3830
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3674
|
-
previewMode:
|
|
3675
|
-
productLimit:
|
|
3676
|
-
productOptions:
|
|
3831
|
+
previewMode: z51.boolean().default(false),
|
|
3832
|
+
productLimit: z51.number().optional().default(1),
|
|
3833
|
+
productOptions: z51.object({
|
|
3677
3834
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3678
|
-
hideOutOfStockVariants:
|
|
3679
|
-
matchVariant:
|
|
3680
|
-
showDeclineAll:
|
|
3681
|
-
showShipping:
|
|
3682
|
-
showSubtotal:
|
|
3683
|
-
showTaxes:
|
|
3684
|
-
showTotal:
|
|
3685
|
-
showVariantSelectors:
|
|
3686
|
-
variantSelectorDisplayMode:
|
|
3835
|
+
hideOutOfStockVariants: z51.boolean().optional().default(false),
|
|
3836
|
+
matchVariant: z51.boolean().optional().default(true),
|
|
3837
|
+
showDeclineAll: z51.enum(["above", "below", "both", "none"]).optional(),
|
|
3838
|
+
showShipping: z51.boolean().optional().default(true),
|
|
3839
|
+
showSubtotal: z51.boolean().optional().default(true),
|
|
3840
|
+
showTaxes: z51.boolean().optional().default(true),
|
|
3841
|
+
showTotal: z51.boolean().optional().default(true),
|
|
3842
|
+
showVariantSelectors: z51.boolean().optional().default(true),
|
|
3843
|
+
variantSelectorDisplayMode: z51.enum(["separate", "single"]).optional().default("separate")
|
|
3687
3844
|
}),
|
|
3688
|
-
productType:
|
|
3689
|
-
productTypeSelector:
|
|
3690
|
-
quantityInputs:
|
|
3691
|
-
defaultQuantity:
|
|
3692
|
-
enabled:
|
|
3693
|
-
maxValue:
|
|
3694
|
-
minValue:
|
|
3845
|
+
productType: z51.union([z51.enum(["one-time", "subscription", "both"]), z51.literal("").transform(() => "one-time")]).default("one-time"),
|
|
3846
|
+
productTypeSelector: z51.enum(["dropdown", "radio"]).optional().default("radio"),
|
|
3847
|
+
quantityInputs: z51.object({
|
|
3848
|
+
defaultQuantity: z51.union([z51.number(), z51.null().transform(() => 1)]).default(1),
|
|
3849
|
+
enabled: z51.boolean().default(true),
|
|
3850
|
+
maxValue: z51.union([z51.number(), z51.null().transform(() => 15)]).default(15),
|
|
3851
|
+
minValue: z51.union([z51.number().min(0), z51.unknown().transform(() => 0)]).default(1)
|
|
3695
3852
|
}),
|
|
3696
|
-
shipping:
|
|
3853
|
+
shipping: z51.object({
|
|
3697
3854
|
amount: strictNumber.default(10),
|
|
3698
3855
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3699
|
-
enabled:
|
|
3700
|
-
title:
|
|
3701
|
-
type:
|
|
3856
|
+
enabled: z51.boolean().default(true),
|
|
3857
|
+
title: z51.string().optional().default("Shipping Fees"),
|
|
3858
|
+
type: z51.enum(["free", "fixed_amount"]).default("free")
|
|
3702
3859
|
}),
|
|
3703
|
-
styles:
|
|
3704
|
-
starColor:
|
|
3705
|
-
starSize:
|
|
3706
|
-
starStrokeColor:
|
|
3707
|
-
strokeWidth:
|
|
3860
|
+
styles: z51.object({
|
|
3861
|
+
starColor: z51.string().optional().default("#fadb14"),
|
|
3862
|
+
starSize: z51.union([z51.enum(["small", "medium", "large"]), z51.unknown().transform(() => "large")]).optional().default("large"),
|
|
3863
|
+
starStrokeColor: z51.string().optional().default("#fadb14"),
|
|
3864
|
+
strokeWidth: z51.string().optional().default("1")
|
|
3708
3865
|
}).optional(),
|
|
3709
|
-
subImages:
|
|
3710
|
-
subscription:
|
|
3711
|
-
discount:
|
|
3866
|
+
subImages: z51.number().nullish().default(8),
|
|
3867
|
+
subscription: z51.object({
|
|
3868
|
+
discount: z51.object({
|
|
3712
3869
|
amount: strictNumber.default(30),
|
|
3713
|
-
shouldShowSavingText:
|
|
3714
|
-
type:
|
|
3870
|
+
shouldShowSavingText: z51.boolean().optional().default(true),
|
|
3871
|
+
type: z51.enum(["none", "fixed_amount", "percentage"]).default("none")
|
|
3715
3872
|
}),
|
|
3716
|
-
shipping:
|
|
3873
|
+
shipping: z51.object({
|
|
3717
3874
|
amount: strictNumber.default(1),
|
|
3718
3875
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3719
|
-
enabled:
|
|
3876
|
+
enabled: z51.boolean().default(true),
|
|
3720
3877
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3721
3878
|
recurringAmount: strictNumber.default(2),
|
|
3722
|
-
shippingTitle:
|
|
3723
|
-
type:
|
|
3879
|
+
shippingTitle: z51.string().default("Shipping Fees"),
|
|
3880
|
+
type: z51.enum(["free", "fixed_amount"]).default("free")
|
|
3724
3881
|
})
|
|
3725
3882
|
}).optional().default({
|
|
3726
3883
|
discount: {
|
|
@@ -3738,15 +3895,15 @@ var PostPurchaseSettings = z41.object({
|
|
|
3738
3895
|
type: "free"
|
|
3739
3896
|
}
|
|
3740
3897
|
}),
|
|
3741
|
-
subscriptionIsDefault:
|
|
3898
|
+
subscriptionIsDefault: z51.boolean().optional(),
|
|
3742
3899
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3743
|
-
template:
|
|
3744
|
-
type:
|
|
3745
|
-
upgradeToSubscription:
|
|
3746
|
-
acceptButtonText:
|
|
3747
|
-
allow:
|
|
3748
|
-
emailRefundNotice:
|
|
3749
|
-
errorBannerText:
|
|
3900
|
+
template: z51.string().optional().default(""),
|
|
3901
|
+
type: z51.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension"),
|
|
3902
|
+
upgradeToSubscription: z51.object({
|
|
3903
|
+
acceptButtonText: z51.string().optional().default("Upgrade"),
|
|
3904
|
+
allow: z51.boolean().optional().default(false),
|
|
3905
|
+
emailRefundNotice: z51.boolean().optional().default(false),
|
|
3906
|
+
errorBannerText: z51.string().optional().default("This subscription cannot be added - limit one per order")
|
|
3750
3907
|
}).optional().default(() => ({
|
|
3751
3908
|
acceptButtonText: "Upgrade",
|
|
3752
3909
|
allow: false,
|
|
@@ -3756,32 +3913,32 @@ var PostPurchaseSettings = z41.object({
|
|
|
3756
3913
|
});
|
|
3757
3914
|
|
|
3758
3915
|
// src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
|
|
3759
|
-
var PostPurchaseWidgetLinkedFlow =
|
|
3760
|
-
id:
|
|
3761
|
-
name:
|
|
3916
|
+
var PostPurchaseWidgetLinkedFlow = z52.object({
|
|
3917
|
+
id: z52.number(),
|
|
3918
|
+
name: z52.string()
|
|
3762
3919
|
});
|
|
3763
|
-
var PostPurchaseWidget =
|
|
3764
|
-
classification:
|
|
3765
|
-
createdAtTime:
|
|
3766
|
-
customEndpointName:
|
|
3767
|
-
id:
|
|
3768
|
-
lastViewed:
|
|
3769
|
-
linkedCustomEndpointId:
|
|
3770
|
-
linkedFlows:
|
|
3771
|
-
name:
|
|
3772
|
-
owner:
|
|
3920
|
+
var PostPurchaseWidget = z52.object({
|
|
3921
|
+
classification: z52.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
|
|
3922
|
+
createdAtTime: z52.iso.datetime({ offset: true }).optional(),
|
|
3923
|
+
customEndpointName: z52.string().nullish(),
|
|
3924
|
+
id: z52.number().default(0),
|
|
3925
|
+
lastViewed: z52.iso.datetime({ offset: true }).nullish(),
|
|
3926
|
+
linkedCustomEndpointId: z52.number().nullish(),
|
|
3927
|
+
linkedFlows: z52.array(PostPurchaseWidgetLinkedFlow).optional(),
|
|
3928
|
+
name: z52.string().default(""),
|
|
3929
|
+
owner: z52.number().nullish(),
|
|
3773
3930
|
settings: PostPurchaseSettings
|
|
3774
3931
|
});
|
|
3775
3932
|
|
|
3776
3933
|
// src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
|
|
3777
|
-
var PostPurchaseOffer =
|
|
3778
|
-
|
|
3779
|
-
errors:
|
|
3780
|
-
message:
|
|
3781
|
-
successful:
|
|
3934
|
+
var PostPurchaseOffer = z53.discriminatedUnion("successful", [
|
|
3935
|
+
z53.strictObject({
|
|
3936
|
+
errors: z53.array(z53.object({ message: z53.string() })),
|
|
3937
|
+
message: z53.string(),
|
|
3938
|
+
successful: z53.literal(false)
|
|
3782
3939
|
}),
|
|
3783
|
-
|
|
3784
|
-
successful:
|
|
3940
|
+
z53.strictObject({
|
|
3941
|
+
successful: z53.literal(true),
|
|
3785
3942
|
widget: PostPurchaseWidget
|
|
3786
3943
|
})
|
|
3787
3944
|
]);
|
|
@@ -4925,16 +5082,20 @@ export {
|
|
|
4925
5082
|
DESCRIPTION_LABELS,
|
|
4926
5083
|
DYNAMIC_TOKEN_ANYWHERE_REGEX,
|
|
4927
5084
|
DYNAMIC_TOKEN_REGEX,
|
|
5085
|
+
DecideRequestSchema,
|
|
5086
|
+
DecisionEntrySchema,
|
|
4928
5087
|
Direction,
|
|
4929
5088
|
DiscountSource,
|
|
4930
5089
|
DiscountType,
|
|
4931
5090
|
EditorMode,
|
|
5091
|
+
ExitPolicySchema,
|
|
4932
5092
|
GIFT_LABELS,
|
|
4933
5093
|
Geolocation,
|
|
4934
5094
|
GiftWithPurchase,
|
|
4935
5095
|
GridItem,
|
|
4936
5096
|
HEX_COLOR_REGEX,
|
|
4937
5097
|
HTML_TAGS_REGEX,
|
|
5098
|
+
HoldSettingSchema,
|
|
4938
5099
|
HorizontalAlignment,
|
|
4939
5100
|
IconName,
|
|
4940
5101
|
IconSize,
|
|
@@ -4954,11 +5115,21 @@ export {
|
|
|
4954
5115
|
ObjectFit,
|
|
4955
5116
|
OfferProduct,
|
|
4956
5117
|
OffersDirection,
|
|
5118
|
+
OrderDecisionSchema,
|
|
5119
|
+
POST_PURCHASE_SKIP_LIMIT,
|
|
4957
5120
|
PayButtonBlock,
|
|
4958
5121
|
PopoverPosition,
|
|
5122
|
+
PostPurchaseAppIdSchema,
|
|
4959
5123
|
PostPurchaseBlock,
|
|
4960
5124
|
PostPurchaseOffer,
|
|
5125
|
+
PostPurchaseOrderIdSchema,
|
|
4961
5126
|
PostPurchaseSettings,
|
|
5127
|
+
PostPurchaseShadowReportFields,
|
|
5128
|
+
PostPurchaseShadowReportSchema,
|
|
5129
|
+
PostPurchaseShadowSelectionSchema,
|
|
5130
|
+
PostPurchaseSkipReasonSchema,
|
|
5131
|
+
PostPurchaseSkipTraceSchema,
|
|
5132
|
+
PostPurchaseTimestampSchema,
|
|
4962
5133
|
PostPurchaseWidget,
|
|
4963
5134
|
PostPurchaseWidgetLinkedFlow,
|
|
4964
5135
|
Product,
|
|
@@ -4971,6 +5142,7 @@ export {
|
|
|
4971
5142
|
QuantityInput,
|
|
4972
5143
|
REVIEW_LABELS,
|
|
4973
5144
|
ROOT_RELATIVE_PATH_REGEX,
|
|
5145
|
+
ReadySessionTimingSchema,
|
|
4974
5146
|
RebuyButton,
|
|
4975
5147
|
RebuyButtonV1,
|
|
4976
5148
|
RebuyClient,
|
|
@@ -4987,10 +5159,20 @@ export {
|
|
|
4987
5159
|
STATIC_ENDPOINTS,
|
|
4988
5160
|
SWITCH_LABELS,
|
|
4989
5161
|
SectionType,
|
|
5162
|
+
SelectionClaimsSchema,
|
|
4990
5163
|
SellingPlanGroup,
|
|
4991
5164
|
SeparatorBlock,
|
|
4992
5165
|
Session,
|
|
5166
|
+
SessionCloseRequestSchema,
|
|
5167
|
+
SessionCloseResponseSchema,
|
|
5168
|
+
SessionClosureSchema,
|
|
5169
|
+
SessionIdentitySchema,
|
|
5170
|
+
SessionOrderTimingSchema,
|
|
5171
|
+
SessionPolicySchema,
|
|
5172
|
+
SessionStartRequestSchema,
|
|
5173
|
+
SessionStartResponseSchema,
|
|
4993
5174
|
ShopConfig,
|
|
5175
|
+
ShopifyDomainSchema,
|
|
4994
5176
|
SmartCartBar,
|
|
4995
5177
|
SmartCartComponent,
|
|
4996
5178
|
SmartCartConfig,
|
|
@@ -5003,6 +5185,7 @@ export {
|
|
|
5003
5185
|
TextColorName,
|
|
5004
5186
|
TextSizeName,
|
|
5005
5187
|
TimerBlock,
|
|
5188
|
+
TimingSettingsSchema,
|
|
5006
5189
|
TiptapDocument,
|
|
5007
5190
|
TiptapParagraph,
|
|
5008
5191
|
TiptapText,
|