@rebuy/rebuy 3.26.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 +870 -747
- package/dist/index.mjs +870 -747
- package/dist/schema/index.d.ts +6 -0
- package/dist/schema/postPurchaseEligibility.d.ts +2 -2
- package/dist/schema/postPurchaseExitPolicy.d.ts +20 -0
- package/dist/schema/postPurchaseIdentity.d.ts +9 -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 +56 -1
- package/dist/schema/postPurchaseSkipTrace.d.ts +2 -2
- package/dist/server/requestSchemas.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1254,105 +1254,212 @@ var OfferProduct = z5.object({
|
|
|
1254
1254
|
|
|
1255
1255
|
// src/schema/postPurchaseEligibility.ts
|
|
1256
1256
|
import { z as z6 } from "zod";
|
|
1257
|
-
var
|
|
1257
|
+
var PostPurchaseSkipReasonSchema = z6.enum(["empty", "no-eligible-subscription"]);
|
|
1258
1258
|
|
|
1259
|
-
// src/schema/
|
|
1259
|
+
// src/schema/postPurchaseExitPolicy.ts
|
|
1260
1260
|
import { z as z7 } from "zod";
|
|
1261
|
-
var
|
|
1262
|
-
var
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
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),
|
|
1266
1279
|
shop: ShopifyDomainSchema
|
|
1267
1280
|
});
|
|
1268
|
-
var
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
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)
|
|
1276
1290
|
});
|
|
1277
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
|
+
|
|
1278
1373
|
// src/schema/postPurchaseShadow.ts
|
|
1279
|
-
import { z as
|
|
1280
|
-
var PostPurchaseShadowSelectionSchema =
|
|
1281
|
-
|
|
1282
|
-
|
|
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") })
|
|
1283
1378
|
]);
|
|
1284
|
-
var
|
|
1285
|
-
differences:
|
|
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
|
+
}),
|
|
1286
1383
|
legacySelection: PostPurchaseShadowSelectionSchema,
|
|
1287
|
-
phase:
|
|
1288
|
-
sampleId:
|
|
1384
|
+
phase: z14.literal("shouldRender"),
|
|
1385
|
+
sampleId: z14.string(),
|
|
1289
1386
|
serverSelection: PostPurchaseShadowSelectionSchema.optional(),
|
|
1290
|
-
status:
|
|
1291
|
-
targetingFlowIds:
|
|
1292
|
-
workflowPhase:
|
|
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"]
|
|
1293
1400
|
});
|
|
1294
1401
|
|
|
1295
1402
|
// src/schema/postPurchaseSkipTrace.ts
|
|
1296
|
-
import { z as
|
|
1403
|
+
import { z as z15 } from "zod";
|
|
1297
1404
|
var POST_PURCHASE_SKIP_LIMIT = 32;
|
|
1298
|
-
var
|
|
1299
|
-
|
|
1405
|
+
var PostPurchaseSkipTraceSchema = z15.array(
|
|
1406
|
+
z15.object({
|
|
1300
1407
|
entry: DecisionEntrySchema,
|
|
1301
|
-
reason:
|
|
1408
|
+
reason: PostPurchaseSkipReasonSchema
|
|
1302
1409
|
})
|
|
1303
1410
|
).max(POST_PURCHASE_SKIP_LIMIT);
|
|
1304
1411
|
|
|
1305
1412
|
// src/schema/shopConfig.ts
|
|
1306
|
-
import { z as
|
|
1307
|
-
var ShopConfig =
|
|
1308
|
-
activeExperiments:
|
|
1309
|
-
|
|
1310
|
-
data:
|
|
1311
|
-
|
|
1312
|
-
aliasName:
|
|
1313
|
-
cssInput:
|
|
1314
|
-
elementId:
|
|
1315
|
-
id:
|
|
1316
|
-
javascriptInput:
|
|
1317
|
-
traffic:
|
|
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()
|
|
1318
1425
|
})
|
|
1319
1426
|
),
|
|
1320
|
-
id:
|
|
1321
|
-
name:
|
|
1322
|
-
pageTarget:
|
|
1323
|
-
pageTargetUrl:
|
|
1324
|
-
placeholderId:
|
|
1325
|
-
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()
|
|
1326
1433
|
})
|
|
1327
1434
|
),
|
|
1328
|
-
activePackages:
|
|
1329
|
-
|
|
1330
|
-
cancelledAt:
|
|
1331
|
-
id:
|
|
1332
|
-
installedAt:
|
|
1333
|
-
isActive:
|
|
1334
|
-
isBillable:
|
|
1335
|
-
packageId:
|
|
1336
|
-
packageName:
|
|
1337
|
-
shortName:
|
|
1338
|
-
trialDays:
|
|
1339
|
-
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()
|
|
1340
1447
|
})
|
|
1341
1448
|
),
|
|
1342
|
-
apiKey:
|
|
1343
|
-
billingVersion:
|
|
1344
|
-
cacheKey:
|
|
1345
|
-
carousel:
|
|
1346
|
-
currency:
|
|
1347
|
-
currencySymbol:
|
|
1348
|
-
domain:
|
|
1349
|
-
enabledJquery:
|
|
1350
|
-
enabledPresentmentCurrencies:
|
|
1351
|
-
hasSmartCollectionsEnabled:
|
|
1352
|
-
hasSmartSearchEnabled:
|
|
1353
|
-
id:
|
|
1354
|
-
integrations:
|
|
1355
|
-
|
|
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([
|
|
1356
1463
|
"attentive",
|
|
1357
1464
|
"judgeme",
|
|
1358
1465
|
"junip",
|
|
@@ -1365,46 +1472,46 @@ var ShopConfig = z10.object({
|
|
|
1365
1472
|
"stamped",
|
|
1366
1473
|
"yotpo"
|
|
1367
1474
|
]),
|
|
1368
|
-
|
|
1475
|
+
z16.union([z16.boolean(), z16.unknown()])
|
|
1369
1476
|
),
|
|
1370
|
-
markets:
|
|
1371
|
-
enabled:
|
|
1477
|
+
markets: z16.object({
|
|
1478
|
+
enabled: z16.boolean()
|
|
1372
1479
|
}),
|
|
1373
|
-
monetize:
|
|
1374
|
-
publisherKey:
|
|
1480
|
+
monetize: z16.object({
|
|
1481
|
+
publisherKey: z16.string().nullable()
|
|
1375
1482
|
}).nullish(),
|
|
1376
|
-
moneyFormat:
|
|
1377
|
-
myshopifyDomain:
|
|
1378
|
-
primaryLocale:
|
|
1379
|
-
productGroupsEnabled:
|
|
1380
|
-
rechargeCustomDomain:
|
|
1381
|
-
sellingPlansEnabled:
|
|
1382
|
-
shopId:
|
|
1383
|
-
shopifySellingPlansEnabled:
|
|
1384
|
-
shopName:
|
|
1385
|
-
storefrontAccessToken:
|
|
1386
|
-
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()
|
|
1387
1494
|
});
|
|
1388
1495
|
|
|
1389
1496
|
// src/schema/userConfig.ts
|
|
1390
|
-
import { z as
|
|
1391
|
-
var UserConfig =
|
|
1497
|
+
import { z as z17 } from "zod";
|
|
1498
|
+
var UserConfig = z17.object({
|
|
1392
1499
|
shop: ShopConfig,
|
|
1393
1500
|
/**
|
|
1394
1501
|
* `.catch(undefined)` is the safety bar: smart-cart shape drift can NEVER fail `fetchUserConfig`,
|
|
1395
1502
|
* which resolves the apiKey for every offers/monetize/analytics/gift request.
|
|
1396
1503
|
*/
|
|
1397
1504
|
smartCart: SmartCartConfig.nullish().catch(void 0),
|
|
1398
|
-
smartFlows:
|
|
1505
|
+
smartFlows: z17.array(z17.unknown())
|
|
1399
1506
|
});
|
|
1400
1507
|
|
|
1401
1508
|
// src/schema/widgetData.ts
|
|
1402
|
-
import { z as
|
|
1509
|
+
import { z as z47 } from "zod";
|
|
1403
1510
|
|
|
1404
1511
|
// src/schema/widgets/abTestingPlaceholder.ts
|
|
1405
|
-
import { z as
|
|
1406
|
-
var ABTestingPlaceholder =
|
|
1407
|
-
type:
|
|
1512
|
+
import { z as z18 } from "zod";
|
|
1513
|
+
var ABTestingPlaceholder = z18.looseObject({
|
|
1514
|
+
type: z18.literal("placeholder")
|
|
1408
1515
|
});
|
|
1409
1516
|
|
|
1410
1517
|
// src/schema/widgets/checkout-and-beyond/constants.ts
|
|
@@ -1664,26 +1771,26 @@ var targetAreas = {
|
|
|
1664
1771
|
};
|
|
1665
1772
|
|
|
1666
1773
|
// src/schema/widgets/checkoutExtension.ts
|
|
1667
|
-
import { z as
|
|
1668
|
-
var CheckoutExtension =
|
|
1669
|
-
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)
|
|
1670
1777
|
});
|
|
1671
1778
|
|
|
1672
1779
|
// src/schema/widgets/contentBlock.ts
|
|
1673
|
-
import { z as
|
|
1780
|
+
import { z as z41 } from "zod";
|
|
1674
1781
|
|
|
1675
1782
|
// src/schema/widgets/checkout-and-beyond/root.ts
|
|
1676
|
-
import { z as
|
|
1783
|
+
import { z as z40 } from "zod";
|
|
1677
1784
|
|
|
1678
1785
|
// src/schema/widgets/checkout-and-beyond/layout.ts
|
|
1679
1786
|
import { v7 as uuidv712 } from "uuid";
|
|
1680
|
-
import { z as
|
|
1787
|
+
import { z as z39 } from "zod";
|
|
1681
1788
|
|
|
1682
1789
|
// src/schema/widgets/checkout-and-beyond/shared.ts
|
|
1683
|
-
import { z as
|
|
1790
|
+
import { z as z38 } from "zod";
|
|
1684
1791
|
|
|
1685
1792
|
// src/schema/widgets/checkout-and-beyond/banner.ts
|
|
1686
|
-
import { z as
|
|
1793
|
+
import { z as z20 } from "zod";
|
|
1687
1794
|
|
|
1688
1795
|
// src/schema/widgets/checkout-and-beyond/utils.ts
|
|
1689
1796
|
import { isPlainObject as isPlainObject2 } from "es-toolkit";
|
|
@@ -1761,11 +1868,11 @@ var isTextType = isSectionType(SectionType.text);
|
|
|
1761
1868
|
var isVariantsType = isSectionType(SectionType.variants);
|
|
1762
1869
|
|
|
1763
1870
|
// src/schema/widgets/checkout-and-beyond/banner.ts
|
|
1764
|
-
var CABBannerSection =
|
|
1871
|
+
var CABBannerSection = z20.lazy(
|
|
1765
1872
|
() => CABLayoutSection.omit({ sectionType: true }).extend({
|
|
1766
|
-
buttonField:
|
|
1767
|
-
color:
|
|
1768
|
-
dismissible:
|
|
1873
|
+
buttonField: z20.enum(buttonFields).optional(),
|
|
1874
|
+
color: z20.enum(bannerColors).default("info"),
|
|
1875
|
+
dismissible: z20.boolean().default(true),
|
|
1769
1876
|
/**
|
|
1770
1877
|
* The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
|
|
1771
1878
|
* blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
|
|
@@ -1781,18 +1888,18 @@ var CABBannerSection = z14.lazy(
|
|
|
1781
1888
|
* not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
|
|
1782
1889
|
* either strips first or teaches `normalizeTextContent` to strip this field.
|
|
1783
1890
|
*/
|
|
1784
|
-
heading:
|
|
1785
|
-
sectionType:
|
|
1891
|
+
heading: z20.record(z20.string(), z20.string().refine(checkForHTML, NO_HTML)).optional(),
|
|
1892
|
+
sectionType: z20.literal(SectionType.banner).default(SectionType.banner)
|
|
1786
1893
|
})
|
|
1787
1894
|
);
|
|
1788
1895
|
|
|
1789
1896
|
// src/schema/widgets/checkout-and-beyond/button.ts
|
|
1790
1897
|
import { v7 as uuidv73 } from "uuid";
|
|
1791
|
-
import { z as
|
|
1898
|
+
import { z as z25 } from "zod";
|
|
1792
1899
|
|
|
1793
1900
|
// src/schema/widgets/checkout-and-beyond/image.ts
|
|
1794
1901
|
import { v7 as uuidv7 } from "uuid";
|
|
1795
|
-
import { z as
|
|
1902
|
+
import { z as z23 } from "zod";
|
|
1796
1903
|
|
|
1797
1904
|
// src/schema/widgets/checkout-and-beyond/icons.ts
|
|
1798
1905
|
var iconNames = [
|
|
@@ -1879,10 +1986,10 @@ var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "wa
|
|
|
1879
1986
|
var IconTone = freezeEnum(iconTones);
|
|
1880
1987
|
|
|
1881
1988
|
// src/schema/widgets/checkout-and-beyond/variables.ts
|
|
1882
|
-
import { z as
|
|
1989
|
+
import { z as z22 } from "zod";
|
|
1883
1990
|
|
|
1884
1991
|
// src/schema/widgets/checkout-and-beyond/rule.ts
|
|
1885
|
-
import { z as
|
|
1992
|
+
import { z as z21 } from "zod";
|
|
1886
1993
|
var ruleTypes = [
|
|
1887
1994
|
"cart",
|
|
1888
1995
|
"cart_count",
|
|
@@ -1901,7 +2008,7 @@ var ruleTypes = [
|
|
|
1901
2008
|
"product_type",
|
|
1902
2009
|
"product_vendor"
|
|
1903
2010
|
];
|
|
1904
|
-
var ruleType =
|
|
2011
|
+
var ruleType = z21.enum(ruleTypes);
|
|
1905
2012
|
var RuleType = ruleType.enum;
|
|
1906
2013
|
var ruleOperators = [
|
|
1907
2014
|
"after",
|
|
@@ -1916,124 +2023,124 @@ var ruleOperators = [
|
|
|
1916
2023
|
"greater_than",
|
|
1917
2024
|
"less_than"
|
|
1918
2025
|
];
|
|
1919
|
-
var ruleOperator =
|
|
2026
|
+
var ruleOperator = z21.enum(ruleOperators);
|
|
1920
2027
|
var RuleOperator = ruleOperator.enum;
|
|
1921
|
-
var RuleCondition =
|
|
1922
|
-
operator:
|
|
1923
|
-
products:
|
|
1924
|
-
type:
|
|
1925
|
-
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("")
|
|
1926
2033
|
});
|
|
1927
|
-
var RuleLogicBlock =
|
|
1928
|
-
rules:
|
|
2034
|
+
var RuleLogicBlock = z21.object({
|
|
2035
|
+
rules: z21.array(RuleCondition).default(() => [])
|
|
1929
2036
|
});
|
|
1930
|
-
var CABRulesetEntry =
|
|
1931
|
-
exitIfMatched:
|
|
1932
|
-
logic:
|
|
1933
|
-
output:
|
|
1934
|
-
|
|
1935
|
-
key:
|
|
1936
|
-
type:
|
|
1937
|
-
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")
|
|
1938
2045
|
})
|
|
1939
2046
|
).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
|
|
1940
2047
|
});
|
|
1941
|
-
var CABRuleset =
|
|
2048
|
+
var CABRuleset = z21.union([z21.array(CABRulesetEntry), z21.strictObject({}).transform(() => [])]).default(() => []);
|
|
1942
2049
|
|
|
1943
2050
|
// src/schema/widgets/checkout-and-beyond/variables.ts
|
|
1944
|
-
var variableEffect =
|
|
1945
|
-
var CABVariableSeed =
|
|
1946
|
-
dataSourceId:
|
|
2051
|
+
var variableEffect = z22.enum(variableEffects);
|
|
2052
|
+
var CABVariableSeed = z22.object({
|
|
2053
|
+
dataSourceId: z22.number().nullable().default(null),
|
|
1947
2054
|
ruleset: CABRuleset
|
|
1948
2055
|
});
|
|
1949
|
-
var CABBooleanVariable =
|
|
2056
|
+
var CABBooleanVariable = z22.object({
|
|
1950
2057
|
/**
|
|
1951
2058
|
* Holds until the first seed verdict lands (and forever, for unseeded variables). Omitted, it derives
|
|
1952
2059
|
* from seededness — `false` with a `seed` (visibility is EARNED), `true` without — via the transform
|
|
1953
2060
|
* below; a cross-field default has no `.default()` spelling. An explicit value always wins.
|
|
1954
2061
|
*/
|
|
1955
|
-
defaultValue:
|
|
1956
|
-
name:
|
|
2062
|
+
defaultValue: z22.boolean().optional(),
|
|
2063
|
+
name: z22.string().min(1),
|
|
1957
2064
|
seed: CABVariableSeed.optional(),
|
|
1958
2065
|
/** Defaulted so every stored declaration (all boolean before `text` existed) parses unchanged. */
|
|
1959
|
-
type:
|
|
2066
|
+
type: z22.literal(VariableType.boolean).default(VariableType.boolean)
|
|
1960
2067
|
});
|
|
1961
|
-
var CABTextVariable =
|
|
1962
|
-
defaultValue:
|
|
1963
|
-
name:
|
|
1964
|
-
seed:
|
|
1965
|
-
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)
|
|
1966
2073
|
});
|
|
1967
|
-
var CABNumberVariable =
|
|
1968
|
-
defaultValue:
|
|
1969
|
-
name:
|
|
1970
|
-
seed:
|
|
1971
|
-
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)
|
|
1972
2079
|
});
|
|
1973
|
-
var CABVariable =
|
|
2080
|
+
var CABVariable = z22.union([CABTextVariable, CABNumberVariable, CABBooleanVariable]).transform(
|
|
1974
2081
|
(variable) => variable.type === VariableType.boolean ? { ...variable, defaultValue: variable.defaultValue ?? variable.seed === void 0 } : variable
|
|
1975
2082
|
);
|
|
1976
|
-
var CABVariableEffect =
|
|
2083
|
+
var CABVariableEffect = z22.object({
|
|
1977
2084
|
effect: variableEffect.default(VariableEffect.toggle),
|
|
1978
|
-
variable:
|
|
2085
|
+
variable: z22.string().min(1)
|
|
1979
2086
|
});
|
|
1980
|
-
var CABVisibility =
|
|
1981
|
-
variable:
|
|
1982
|
-
visibleWhen:
|
|
2087
|
+
var CABVisibility = z22.object({
|
|
2088
|
+
variable: z22.string().min(1),
|
|
2089
|
+
visibleWhen: z22.boolean().default(true)
|
|
1983
2090
|
});
|
|
1984
|
-
var contentOperator =
|
|
1985
|
-
var resultCountOperator =
|
|
1986
|
-
var resultTagOperator =
|
|
1987
|
-
var mutatorEvent =
|
|
1988
|
-
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({
|
|
1989
2096
|
operator: contentOperator.default(ContentOperator.is_empty),
|
|
1990
|
-
type:
|
|
2097
|
+
type: z22.literal("content")
|
|
1991
2098
|
});
|
|
1992
|
-
var CABResultCountTrigger =
|
|
2099
|
+
var CABResultCountTrigger = z22.object({
|
|
1993
2100
|
operator: resultCountOperator.default(ResultCountOperator.equals),
|
|
1994
|
-
type:
|
|
1995
|
-
value:
|
|
2101
|
+
type: z22.literal("result_count"),
|
|
2102
|
+
value: z22.number().default(0)
|
|
1996
2103
|
});
|
|
1997
|
-
var CABResultTagTrigger =
|
|
2104
|
+
var CABResultTagTrigger = z22.object({
|
|
1998
2105
|
operator: resultTagOperator.default(ResultTagOperator.contains),
|
|
1999
|
-
type:
|
|
2000
|
-
value:
|
|
2106
|
+
type: z22.literal("result_tag"),
|
|
2107
|
+
value: z22.string().min(1)
|
|
2001
2108
|
});
|
|
2002
|
-
var CABEventTrigger =
|
|
2109
|
+
var CABEventTrigger = z22.object({
|
|
2003
2110
|
event: mutatorEvent,
|
|
2004
|
-
type:
|
|
2111
|
+
type: z22.literal("event")
|
|
2005
2112
|
});
|
|
2006
|
-
var CABVariableTrigger =
|
|
2113
|
+
var CABVariableTrigger = z22.discriminatedUnion("type", [
|
|
2007
2114
|
CABContentTrigger,
|
|
2008
2115
|
CABEventTrigger,
|
|
2009
2116
|
CABResultCountTrigger,
|
|
2010
2117
|
CABResultTagTrigger
|
|
2011
2118
|
]);
|
|
2012
|
-
var CABVariableMutator =
|
|
2119
|
+
var CABVariableMutator = z22.object({
|
|
2013
2120
|
effect: variableEffect.default(VariableEffect.set_false),
|
|
2014
|
-
variable:
|
|
2121
|
+
variable: z22.string().min(1),
|
|
2015
2122
|
when: CABVariableTrigger
|
|
2016
2123
|
});
|
|
2017
2124
|
var CABVariableFields = {
|
|
2018
|
-
mutators:
|
|
2019
|
-
variables:
|
|
2125
|
+
mutators: z22.array(CABVariableMutator).optional(),
|
|
2126
|
+
variables: z22.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
|
|
2020
2127
|
message: "variable names must be unique within a section"
|
|
2021
2128
|
}).optional(),
|
|
2022
2129
|
visibility: CABVisibility.optional()
|
|
2023
2130
|
};
|
|
2024
2131
|
|
|
2025
2132
|
// src/schema/widgets/checkout-and-beyond/image.ts
|
|
2026
|
-
var CABImageSectionFields =
|
|
2133
|
+
var CABImageSectionFields = z23.object({
|
|
2027
2134
|
...CABVariableFields,
|
|
2028
|
-
altText:
|
|
2135
|
+
altText: z23.string().refine(checkForHTML, NO_HTML).default(""),
|
|
2029
2136
|
/**
|
|
2030
2137
|
* Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
|
|
2031
2138
|
* ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
|
|
2032
2139
|
* and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
|
|
2033
2140
|
*/
|
|
2034
|
-
aspectRatio:
|
|
2035
|
-
border:
|
|
2036
|
-
buttonField:
|
|
2141
|
+
aspectRatio: z23.number().positive().nullable().default(null),
|
|
2142
|
+
border: z23.lazy(() => CABBorder),
|
|
2143
|
+
buttonField: z23.enum(buttonFields).optional(),
|
|
2037
2144
|
/**
|
|
2038
2145
|
* `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
|
|
2039
2146
|
* `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
|
|
@@ -2052,29 +2159,29 @@ var CABImageSectionFields = z17.object({
|
|
|
2052
2159
|
* behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
|
|
2053
2160
|
* the risky half.
|
|
2054
2161
|
*/
|
|
2055
|
-
category:
|
|
2162
|
+
category: z23.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
|
|
2056
2163
|
/** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
|
|
2057
|
-
iconSize:
|
|
2164
|
+
iconSize: z23.enum(iconSizes).nullable().default(null),
|
|
2058
2165
|
/** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
|
|
2059
|
-
iconTone:
|
|
2060
|
-
name:
|
|
2061
|
-
naturalHeight:
|
|
2062
|
-
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),
|
|
2063
2170
|
/**
|
|
2064
2171
|
* `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
|
|
2065
2172
|
* `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
|
|
2066
2173
|
*/
|
|
2067
|
-
objectFit:
|
|
2068
|
-
sectionId:
|
|
2069
|
-
sectionType:
|
|
2174
|
+
objectFit: z23.enum(objectFits).default(ObjectFit.contain),
|
|
2175
|
+
sectionId: z23.uuid().default(() => uuidv7()),
|
|
2176
|
+
sectionType: z23.literal(SectionType.image).default(SectionType.image),
|
|
2070
2177
|
/**
|
|
2071
2178
|
* An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
|
|
2072
2179
|
* takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
|
|
2073
2180
|
* would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
|
|
2074
2181
|
* server-chosen tier icon actually needs it.
|
|
2075
2182
|
*/
|
|
2076
|
-
source:
|
|
2077
|
-
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)
|
|
2078
2185
|
});
|
|
2079
2186
|
var iconNameSet = new Set(iconNames);
|
|
2080
2187
|
var isIconName = (source) => iconNameSet.has(source);
|
|
@@ -2096,71 +2203,71 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source }, c
|
|
|
2096
2203
|
// src/schema/widgets/checkout-and-beyond/text.ts
|
|
2097
2204
|
import { forEach, isString as isString2 } from "es-toolkit/compat";
|
|
2098
2205
|
import { v7 as uuidv72 } from "uuid";
|
|
2099
|
-
import { z as
|
|
2100
|
-
var enumOrOmit = (...vals) =>
|
|
2101
|
-
var TiptapText =
|
|
2102
|
-
marks:
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
attrs:
|
|
2109
|
-
class:
|
|
2110
|
-
href:
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
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)
|
|
2115
2222
|
]),
|
|
2116
|
-
rel:
|
|
2117
|
-
target:
|
|
2223
|
+
rel: z24.string().default("noopener noreferrer nofollow"),
|
|
2224
|
+
target: z24.string().default("_blank")
|
|
2118
2225
|
}),
|
|
2119
|
-
type:
|
|
2226
|
+
type: z24.literal("link")
|
|
2120
2227
|
}),
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
attrs:
|
|
2228
|
+
z24.object({ type: z24.literal("strike") }),
|
|
2229
|
+
z24.object({
|
|
2230
|
+
attrs: z24.object({
|
|
2124
2231
|
color: enumOrOmit(...textColorNames).default(TextColorName.base),
|
|
2125
2232
|
fontSize: enumOrOmit(...textSizeNames).default(TextSizeName.base)
|
|
2126
2233
|
}),
|
|
2127
|
-
type:
|
|
2234
|
+
type: z24.literal("textStyle")
|
|
2128
2235
|
})
|
|
2129
2236
|
])
|
|
2130
2237
|
),
|
|
2131
|
-
|
|
2238
|
+
z24.strictObject({}).transform(() => [])
|
|
2132
2239
|
]).optional(),
|
|
2133
|
-
text:
|
|
2134
|
-
type:
|
|
2240
|
+
text: z24.string().default(""),
|
|
2241
|
+
type: z24.literal("text").default("text")
|
|
2135
2242
|
});
|
|
2136
|
-
var TiptapParagraph =
|
|
2137
|
-
attrs:
|
|
2243
|
+
var TiptapParagraph = z24.object({
|
|
2244
|
+
attrs: z24.object({
|
|
2138
2245
|
textAlign: enumOrOmit(...textAlignments)
|
|
2139
2246
|
}).default({ textAlign: TextAlignment.start }),
|
|
2140
|
-
content:
|
|
2141
|
-
type:
|
|
2247
|
+
content: z24.union([z24.array(TiptapText), z24.strictObject({}).transform(() => [])]).default(() => []),
|
|
2248
|
+
type: z24.literal("paragraph").default("paragraph")
|
|
2142
2249
|
});
|
|
2143
|
-
var TiptapDocument =
|
|
2144
|
-
attrs:
|
|
2250
|
+
var TiptapDocument = z24.object({
|
|
2251
|
+
attrs: z24.object({
|
|
2145
2252
|
blockSpacing: enumOrOmit(...spacings)
|
|
2146
2253
|
}).default({ blockSpacing: Spacing.base }),
|
|
2147
|
-
content:
|
|
2148
|
-
type:
|
|
2254
|
+
content: z24.union([z24.array(TiptapParagraph), z24.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
|
|
2255
|
+
type: z24.literal("doc").default("doc")
|
|
2149
2256
|
});
|
|
2150
|
-
var CABTextTier =
|
|
2151
|
-
threshold:
|
|
2152
|
-
thresholds:
|
|
2153
|
-
tierId:
|
|
2154
|
-
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)
|
|
2155
2262
|
});
|
|
2156
|
-
var CABTextSection =
|
|
2263
|
+
var CABTextSection = z24.object({
|
|
2157
2264
|
...CABVariableFields,
|
|
2158
|
-
buttonField:
|
|
2159
|
-
content:
|
|
2160
|
-
name:
|
|
2161
|
-
optionId:
|
|
2162
|
-
sectionId:
|
|
2163
|
-
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),
|
|
2164
2271
|
tier: CABTextTier.optional()
|
|
2165
2272
|
}).superRefine(({ buttonField, content }, ctx) => {
|
|
2166
2273
|
if (buttonField === ButtonField.destinationUrl && content) {
|
|
@@ -2182,35 +2289,35 @@ var CABTextSection = z18.object({
|
|
|
2182
2289
|
});
|
|
2183
2290
|
|
|
2184
2291
|
// src/schema/widgets/checkout-and-beyond/button.ts
|
|
2185
|
-
var CABButtonContent =
|
|
2186
|
-
() =>
|
|
2292
|
+
var CABButtonContent = z25.lazy(
|
|
2293
|
+
() => z25.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
|
|
2187
2294
|
);
|
|
2188
|
-
var CABButtonSection =
|
|
2295
|
+
var CABButtonSection = z25.object({
|
|
2189
2296
|
...CABVariableFields,
|
|
2190
|
-
action:
|
|
2191
|
-
buttonStyle:
|
|
2192
|
-
custom:
|
|
2193
|
-
color:
|
|
2194
|
-
height:
|
|
2195
|
-
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)
|
|
2196
2303
|
}).default({
|
|
2197
2304
|
color: "#005bd3",
|
|
2198
2305
|
height: 52,
|
|
2199
2306
|
width: 300
|
|
2200
2307
|
}),
|
|
2201
|
-
disableDowngrade:
|
|
2202
|
-
name:
|
|
2203
|
-
optionId:
|
|
2204
|
-
popover:
|
|
2205
|
-
alignment:
|
|
2206
|
-
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)
|
|
2207
2314
|
}).optional().default(() => ({
|
|
2208
2315
|
alignment: TextAlignment.center,
|
|
2209
2316
|
position: PopoverPosition.blockStart
|
|
2210
2317
|
})),
|
|
2211
|
-
sectionId:
|
|
2212
|
-
sections:
|
|
2213
|
-
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),
|
|
2214
2321
|
/**
|
|
2215
2322
|
* The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
|
|
2216
2323
|
* client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
|
|
@@ -2225,91 +2332,91 @@ var CABButtonSection = z19.object({
|
|
|
2225
2332
|
* lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
|
|
2226
2333
|
* stored payloads to grandfather, and the producer is client code, not a merchant form.
|
|
2227
2334
|
*/
|
|
2228
|
-
tier:
|
|
2335
|
+
tier: z25.object({ tierId: z25.string().min(1) }).optional(),
|
|
2229
2336
|
/** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
|
|
2230
|
-
trackingUrl:
|
|
2337
|
+
trackingUrl: z25.string().optional(),
|
|
2231
2338
|
/**
|
|
2232
2339
|
* Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
|
|
2233
2340
|
* `action` — an `addToOrder` button can also flip a variable. Applied in array order.
|
|
2234
2341
|
*/
|
|
2235
|
-
variableEffects:
|
|
2342
|
+
variableEffects: z25.array(CABVariableEffect).optional()
|
|
2236
2343
|
});
|
|
2237
2344
|
|
|
2238
2345
|
// src/schema/widgets/checkout-and-beyond/carousel.ts
|
|
2239
|
-
import { z as
|
|
2346
|
+
import { z as z30 } from "zod";
|
|
2240
2347
|
|
|
2241
2348
|
// src/schema/widgets/checkout-and-beyond/offers.ts
|
|
2242
|
-
import { z as
|
|
2349
|
+
import { z as z29 } from "zod";
|
|
2243
2350
|
|
|
2244
2351
|
// src/schema/widgets/checkout-and-beyond/dataSource.ts
|
|
2245
2352
|
import { v7 as uuidv74 } from "uuid";
|
|
2246
|
-
import { z as
|
|
2247
|
-
var CABDiscount =
|
|
2248
|
-
amount:
|
|
2249
|
-
discountedBy:
|
|
2250
|
-
discountedFrom:
|
|
2251
|
-
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")
|
|
2252
2359
|
});
|
|
2253
|
-
var CABIntegrations =
|
|
2254
|
-
judgeme:
|
|
2255
|
-
junip:
|
|
2256
|
-
klaviyo:
|
|
2257
|
-
loox:
|
|
2258
|
-
okendo:
|
|
2259
|
-
opinew:
|
|
2260
|
-
reviewsio:
|
|
2261
|
-
stamped:
|
|
2262
|
-
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)
|
|
2263
2370
|
});
|
|
2264
|
-
var CABDataSourceSection =
|
|
2265
|
-
dataSourceId:
|
|
2266
|
-
dataSourcePath:
|
|
2371
|
+
var CABDataSourceSection = z26.object({
|
|
2372
|
+
dataSourceId: z26.number().nullable().default(null),
|
|
2373
|
+
dataSourcePath: z26.string().default(DEFAULT_ENDPOINTS[0].value),
|
|
2267
2374
|
discount: CABDiscount.optional(),
|
|
2268
2375
|
integrations: CABIntegrations.optional(),
|
|
2269
|
-
limit:
|
|
2270
|
-
matchVariant:
|
|
2271
|
-
matchVariantOutOfStock:
|
|
2272
|
-
name:
|
|
2273
|
-
productType:
|
|
2274
|
-
sectionId:
|
|
2275
|
-
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),
|
|
2276
2383
|
/** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
|
|
2277
|
-
subscriptionIsDefault:
|
|
2278
|
-
treatAsGwp:
|
|
2384
|
+
subscriptionIsDefault: z26.boolean().default(false),
|
|
2385
|
+
treatAsGwp: z26.boolean().default(false)
|
|
2279
2386
|
});
|
|
2280
2387
|
|
|
2281
2388
|
// src/schema/widgets/checkout-and-beyond/products.ts
|
|
2282
2389
|
import { v7 as uuidv76 } from "uuid";
|
|
2283
|
-
import { z as
|
|
2390
|
+
import { z as z28 } from "zod";
|
|
2284
2391
|
|
|
2285
2392
|
// src/schema/widgets/checkout-and-beyond/product.ts
|
|
2286
2393
|
import { v7 as uuidv75 } from "uuid";
|
|
2287
|
-
import { z as
|
|
2288
|
-
var CABVariantContent =
|
|
2289
|
-
() =>
|
|
2394
|
+
import { z as z27 } from "zod";
|
|
2395
|
+
var CABVariantContent = z27.lazy(
|
|
2396
|
+
() => z27.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
|
|
2290
2397
|
);
|
|
2291
|
-
var CABProductSection =
|
|
2398
|
+
var CABProductSection = z27.object({
|
|
2292
2399
|
...CABVariableFields,
|
|
2293
|
-
name:
|
|
2294
|
-
productId:
|
|
2295
|
-
sectionId:
|
|
2296
|
-
sections:
|
|
2297
|
-
sectionType:
|
|
2298
|
-
selectors:
|
|
2299
|
-
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)
|
|
2300
2407
|
});
|
|
2301
2408
|
|
|
2302
2409
|
// src/schema/widgets/checkout-and-beyond/products.ts
|
|
2303
|
-
var CABProductsSection =
|
|
2410
|
+
var CABProductsSection = z28.object({
|
|
2304
2411
|
...CABVariableFields,
|
|
2305
|
-
name:
|
|
2306
|
-
sectionId:
|
|
2307
|
-
sections:
|
|
2308
|
-
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)
|
|
2309
2416
|
});
|
|
2310
2417
|
|
|
2311
2418
|
// src/schema/widgets/checkout-and-beyond/offers.ts
|
|
2312
|
-
var CABOffersSection =
|
|
2419
|
+
var CABOffersSection = z29.lazy(
|
|
2313
2420
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
2314
2421
|
/**
|
|
2315
2422
|
* A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
|
|
@@ -2317,8 +2424,8 @@ var CABOffersSection = z23.lazy(
|
|
|
2317
2424
|
* run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
|
|
2318
2425
|
* hand-built tree keeps React CAB's dividerless rendering.
|
|
2319
2426
|
*/
|
|
2320
|
-
divider:
|
|
2321
|
-
sections:
|
|
2427
|
+
divider: z29.boolean().optional(),
|
|
2428
|
+
sections: z29.union([z29.array(z29.lazy(() => CABSection)), z29.strictObject({}).transform(() => [])]).default(() => [
|
|
2322
2429
|
CABBannerSection.parse({
|
|
2323
2430
|
buttonField: "undoAddToOrder",
|
|
2324
2431
|
color: "success",
|
|
@@ -2332,77 +2439,77 @@ var CABOffersSection = z23.lazy(
|
|
|
2332
2439
|
CABDataSourceSection.parse({}),
|
|
2333
2440
|
CABProductsSection.parse({})
|
|
2334
2441
|
]),
|
|
2335
|
-
sectionType:
|
|
2442
|
+
sectionType: z29.literal(SectionType.offers).default(SectionType.offers)
|
|
2336
2443
|
})
|
|
2337
2444
|
);
|
|
2338
2445
|
|
|
2339
2446
|
// src/schema/widgets/checkout-and-beyond/carousel.ts
|
|
2340
|
-
var CABCarouselSection =
|
|
2447
|
+
var CABCarouselSection = z30.lazy(
|
|
2341
2448
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
2342
|
-
autoAdvanceInterval:
|
|
2343
|
-
itemsAtOnce:
|
|
2449
|
+
autoAdvanceInterval: z30.number().default(0),
|
|
2450
|
+
itemsAtOnce: z30.number().min(1).default(1),
|
|
2344
2451
|
/** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
|
|
2345
|
-
offersDirection:
|
|
2346
|
-
sections:
|
|
2347
|
-
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)
|
|
2348
2455
|
})
|
|
2349
2456
|
);
|
|
2350
2457
|
|
|
2351
2458
|
// src/schema/widgets/checkout-and-beyond/cartLine.ts
|
|
2352
|
-
import { z as
|
|
2353
|
-
var CABCartLineSection =
|
|
2459
|
+
import { z as z31 } from "zod";
|
|
2460
|
+
var CABCartLineSection = z31.lazy(
|
|
2354
2461
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
2355
|
-
sections:
|
|
2356
|
-
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)
|
|
2357
2464
|
})
|
|
2358
2465
|
);
|
|
2359
2466
|
|
|
2360
2467
|
// src/schema/widgets/checkout-and-beyond/discount.ts
|
|
2361
2468
|
import { v7 as uuidv77 } from "uuid";
|
|
2362
|
-
import { z as
|
|
2363
|
-
var CABDiscountSection =
|
|
2469
|
+
import { z as z32 } from "zod";
|
|
2470
|
+
var CABDiscountSection = z32.object({
|
|
2364
2471
|
...CABVariableFields,
|
|
2365
|
-
amount:
|
|
2366
|
-
discountedBy:
|
|
2367
|
-
discountedFrom:
|
|
2368
|
-
message:
|
|
2369
|
-
name:
|
|
2370
|
-
quantity:
|
|
2371
|
-
sectionId:
|
|
2372
|
-
sectionType:
|
|
2373
|
-
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")
|
|
2374
2481
|
});
|
|
2375
2482
|
|
|
2376
2483
|
// src/schema/widgets/checkout-and-beyond/monetize.ts
|
|
2377
2484
|
import { v7 as uuidv78 } from "uuid";
|
|
2378
|
-
import { z as
|
|
2379
|
-
var CABMonetizeAds =
|
|
2380
|
-
requestId:
|
|
2485
|
+
import { z as z33 } from "zod";
|
|
2486
|
+
var CABMonetizeAds = z33.object({
|
|
2487
|
+
requestId: z33.string().optional(),
|
|
2381
2488
|
/** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
|
|
2382
|
-
testing:
|
|
2489
|
+
testing: z33.boolean().default(false)
|
|
2383
2490
|
});
|
|
2384
|
-
var CABMonetizeSection =
|
|
2491
|
+
var CABMonetizeSection = z33.object({
|
|
2385
2492
|
...CABVariableFields,
|
|
2386
2493
|
ads: CABMonetizeAds.optional(),
|
|
2387
|
-
name:
|
|
2494
|
+
name: z33.string().optional(),
|
|
2388
2495
|
/**
|
|
2389
2496
|
* Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
|
|
2390
2497
|
* context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
|
|
2391
2498
|
* nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
|
|
2392
2499
|
*/
|
|
2393
|
-
offers:
|
|
2500
|
+
offers: z33.array(z33.lazy(() => CABSection)).optional(),
|
|
2394
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. */
|
|
2395
|
-
privacyPolicyUrl:
|
|
2396
|
-
sectionId:
|
|
2397
|
-
sectionType:
|
|
2502
|
+
privacyPolicyUrl: z33.string().optional(),
|
|
2503
|
+
sectionId: z33.uuid().default(() => uuidv78()),
|
|
2504
|
+
sectionType: z33.literal(SectionType.monetize).default(SectionType.monetize),
|
|
2398
2505
|
/** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
|
|
2399
|
-
subVertical:
|
|
2506
|
+
subVertical: z33.string().optional(),
|
|
2400
2507
|
/** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
|
|
2401
|
-
vertical:
|
|
2508
|
+
vertical: z33.string().optional()
|
|
2402
2509
|
});
|
|
2403
2510
|
|
|
2404
2511
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
2405
|
-
import { z as
|
|
2512
|
+
import { z as z34 } from "zod";
|
|
2406
2513
|
|
|
2407
2514
|
// src/schema/widgets/checkout-and-beyond/giftLabels.ts
|
|
2408
2515
|
var GIFT_LABELS = {
|
|
@@ -2521,34 +2628,34 @@ var GIFT_LABELS = {
|
|
|
2521
2628
|
};
|
|
2522
2629
|
|
|
2523
2630
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
2524
|
-
var CABProgressTierExclusion =
|
|
2525
|
-
collectionIds:
|
|
2526
|
-
productIds:
|
|
2527
|
-
tags:
|
|
2528
|
-
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)
|
|
2529
2636
|
});
|
|
2530
|
-
var CABProgressTier =
|
|
2637
|
+
var CABProgressTier = z34.object({
|
|
2531
2638
|
/**
|
|
2532
2639
|
* Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
|
|
2533
2640
|
* cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
|
|
2534
2641
|
* `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
|
|
2535
2642
|
* `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
|
|
2536
2643
|
*/
|
|
2537
|
-
discount:
|
|
2644
|
+
discount: z34.object({ amount: z34.number().nonnegative(), type: z34.enum(["fixedAmount", "percentage"]) }).optional(),
|
|
2538
2645
|
/**
|
|
2539
2646
|
* Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
|
|
2540
2647
|
* toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
|
|
2541
2648
|
* the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
|
|
2542
2649
|
* `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
|
|
2543
2650
|
*/
|
|
2544
|
-
exclusions:
|
|
2651
|
+
exclusions: z34.array(CABProgressTierExclusion).default(() => []),
|
|
2545
2652
|
/**
|
|
2546
2653
|
* Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
|
|
2547
2654
|
* tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
|
|
2548
2655
|
* controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
|
|
2549
2656
|
* on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
|
|
2550
2657
|
*/
|
|
2551
|
-
filterOosVariants:
|
|
2658
|
+
filterOosVariants: z34.boolean().default(false),
|
|
2552
2659
|
/**
|
|
2553
2660
|
* Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
|
|
2554
2661
|
* `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
|
|
@@ -2556,10 +2663,10 @@ var CABProgressTier = z28.object({
|
|
|
2556
2663
|
* tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
|
|
2557
2664
|
* tree is complete.
|
|
2558
2665
|
*/
|
|
2559
|
-
gift:
|
|
2560
|
-
productId:
|
|
2561
|
-
title:
|
|
2562
|
-
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(() => [])
|
|
2563
2670
|
}).optional(),
|
|
2564
2671
|
/**
|
|
2565
2672
|
* The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
|
|
@@ -2579,7 +2686,7 @@ var CABProgressTier = z28.object({
|
|
|
2579
2686
|
* renderer never spells a fallback), which also makes a tree authored before this field render at
|
|
2580
2687
|
* React's size rather than the old hardcoded 20.
|
|
2581
2688
|
*/
|
|
2582
|
-
iconSizePx:
|
|
2689
|
+
iconSizePx: z34.number().int().min(1).max(64).default(18),
|
|
2583
2690
|
/**
|
|
2584
2691
|
* The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
|
|
2585
2692
|
* type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
|
|
@@ -2589,35 +2696,35 @@ var CABProgressTier = z28.object({
|
|
|
2589
2696
|
* turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
|
|
2590
2697
|
* emits no caption slot rather than an empty one). Plain text — a compact icon+label.
|
|
2591
2698
|
*/
|
|
2592
|
-
label:
|
|
2699
|
+
label: z34.record(z34.string(), z34.string()).optional(),
|
|
2593
2700
|
/**
|
|
2594
2701
|
* Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
|
|
2595
2702
|
* the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
|
|
2596
2703
|
* carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
|
|
2597
2704
|
* parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
|
|
2598
2705
|
*/
|
|
2599
|
-
productTierImage:
|
|
2706
|
+
productTierImage: z34.boolean().default(false),
|
|
2600
2707
|
/**
|
|
2601
2708
|
* The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
|
|
2602
2709
|
* fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
|
|
2603
2710
|
* multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
|
|
2604
2711
|
* `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
|
|
2605
2712
|
*/
|
|
2606
|
-
threshold:
|
|
2713
|
+
threshold: z34.number().int().nonnegative(),
|
|
2607
2714
|
/**
|
|
2608
2715
|
* Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
|
|
2609
2716
|
* When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
|
|
2610
2717
|
* `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
|
|
2611
2718
|
* converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
|
|
2612
2719
|
*/
|
|
2613
|
-
thresholds:
|
|
2720
|
+
thresholds: z34.record(z34.string(), z34.number().int().nonnegative()).default(() => ({})),
|
|
2614
2721
|
/**
|
|
2615
2722
|
* Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
|
|
2616
2723
|
* match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
|
|
2617
2724
|
* shipping bar (single unlabeled tier, no gift).
|
|
2618
2725
|
*/
|
|
2619
|
-
tierId:
|
|
2620
|
-
tierType:
|
|
2726
|
+
tierId: z34.string().optional(),
|
|
2727
|
+
tierType: z34.enum(progressTierTypes).default(ProgressTierType.shipping),
|
|
2621
2728
|
/**
|
|
2622
2729
|
* What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
|
|
2623
2730
|
* the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
|
|
@@ -2628,9 +2735,9 @@ var CABProgressTier = z28.object({
|
|
|
2628
2735
|
* count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
|
|
2629
2736
|
* template text supplies grammatically-neutral wording around the token.
|
|
2630
2737
|
*/
|
|
2631
|
-
unit:
|
|
2738
|
+
unit: z34.enum(progressTierUnits).default(ProgressTierUnit.currency)
|
|
2632
2739
|
});
|
|
2633
|
-
var CABProgressBarSection =
|
|
2740
|
+
var CABProgressBarSection = z34.lazy(
|
|
2634
2741
|
() => CABLayoutSection.omit({ sectionType: true }).extend({
|
|
2635
2742
|
/**
|
|
2636
2743
|
* The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
|
|
@@ -2639,35 +2746,35 @@ var CABProgressBarSection = z28.lazy(
|
|
|
2639
2746
|
* checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
|
|
2640
2747
|
* (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
|
|
2641
2748
|
*/
|
|
2642
|
-
barId:
|
|
2749
|
+
barId: z34.string().optional(),
|
|
2643
2750
|
/** Empty = shown everywhere; otherwise uppercase ISO country codes. */
|
|
2644
|
-
countryCodes:
|
|
2751
|
+
countryCodes: z34.array(z34.string().transform((code) => code.trim().toUpperCase())).default(() => []),
|
|
2645
2752
|
/**
|
|
2646
2753
|
* Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
|
|
2647
2754
|
* hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
|
|
2648
2755
|
*/
|
|
2649
|
-
excludeCountryCodes:
|
|
2756
|
+
excludeCountryCodes: z34.array(z34.string().transform((code) => code.trim().toUpperCase())).default(() => []),
|
|
2650
2757
|
/**
|
|
2651
2758
|
* Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
|
|
2652
2759
|
* forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
|
|
2653
2760
|
* adds the cart's discount allocations back to the live subtotal.
|
|
2654
2761
|
*/
|
|
2655
|
-
excludeDiscountInSubtotal:
|
|
2762
|
+
excludeDiscountInSubtotal: z34.boolean().default(false),
|
|
2656
2763
|
/** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
|
|
2657
|
-
excludedVariantIds:
|
|
2764
|
+
excludedVariantIds: z34.array(z34.number().int().positive()).default(() => []),
|
|
2658
2765
|
/**
|
|
2659
2766
|
* When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
|
|
2660
2767
|
* `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
|
|
2661
2768
|
*/
|
|
2662
|
-
freeShippingOnSubscription:
|
|
2769
|
+
freeShippingOnSubscription: z34.boolean().default(false),
|
|
2663
2770
|
/** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
|
|
2664
|
-
giftAreaTitle:
|
|
2771
|
+
giftAreaTitle: z34.record(z34.string(), z34.string()).default(() => ({ en: "FREE GIFTS" })),
|
|
2665
2772
|
/** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
|
|
2666
|
-
giftLabels:
|
|
2667
|
-
addGift:
|
|
2668
|
-
remove:
|
|
2669
|
-
selectOptions:
|
|
2670
|
-
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 }))
|
|
2671
2778
|
}).default(() => ({
|
|
2672
2779
|
addGift: { ...GIFT_LABELS.addGift },
|
|
2673
2780
|
remove: { ...GIFT_LABELS.remove },
|
|
@@ -2675,38 +2782,38 @@ var CABProgressBarSection = z28.lazy(
|
|
|
2675
2782
|
yourGift: { ...GIFT_LABELS.yourGift }
|
|
2676
2783
|
})),
|
|
2677
2784
|
/** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
|
|
2678
|
-
name:
|
|
2785
|
+
name: z34.string().default("Order progress"),
|
|
2679
2786
|
/**
|
|
2680
2787
|
* Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
|
|
2681
2788
|
* fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
|
|
2682
2789
|
* absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
|
|
2683
2790
|
* optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
|
|
2684
2791
|
*/
|
|
2685
|
-
progressColor:
|
|
2686
|
-
sectionType:
|
|
2792
|
+
progressColor: z34.string().optional(),
|
|
2793
|
+
sectionType: z34.literal(SectionType.progressBar).default(SectionType.progressBar),
|
|
2687
2794
|
/**
|
|
2688
2795
|
* The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
|
|
2689
2796
|
* O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
|
|
2690
2797
|
* count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
|
|
2691
2798
|
* gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
|
|
2692
2799
|
*/
|
|
2693
|
-
tiers:
|
|
2800
|
+
tiers: z34.union([z34.array(CABProgressTier), z34.strictObject({}).transform(() => [])]).default(() => [])
|
|
2694
2801
|
})
|
|
2695
2802
|
);
|
|
2696
2803
|
|
|
2697
2804
|
// src/schema/widgets/checkout-and-beyond/quantity.ts
|
|
2698
2805
|
import { v7 as uuidv79 } from "uuid";
|
|
2699
|
-
import { z as
|
|
2700
|
-
var CABQuantitySection =
|
|
2806
|
+
import { z as z35 } from "zod";
|
|
2807
|
+
var CABQuantitySection = z35.object({
|
|
2701
2808
|
...CABVariableFields,
|
|
2702
|
-
errorMessages:
|
|
2703
|
-
|
|
2704
|
-
|
|
2809
|
+
errorMessages: z35.record(
|
|
2810
|
+
z35.string(),
|
|
2811
|
+
z35.object({
|
|
2705
2812
|
/** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
|
|
2706
|
-
increment:
|
|
2707
|
-
max:
|
|
2708
|
-
min:
|
|
2709
|
-
neg:
|
|
2813
|
+
increment: z35.string().optional(),
|
|
2814
|
+
max: z35.string().optional(),
|
|
2815
|
+
min: z35.string().optional(),
|
|
2816
|
+
neg: z35.string().optional()
|
|
2710
2817
|
})
|
|
2711
2818
|
).default({
|
|
2712
2819
|
en: {
|
|
@@ -2716,18 +2823,18 @@ var CABQuantitySection = z29.object({
|
|
|
2716
2823
|
neg: "Quantity cannot be negative"
|
|
2717
2824
|
}
|
|
2718
2825
|
}),
|
|
2719
|
-
inputType:
|
|
2720
|
-
max:
|
|
2721
|
-
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),
|
|
2722
2829
|
/** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
|
|
2723
|
-
name:
|
|
2724
|
-
sectionId:
|
|
2725
|
-
sectionType:
|
|
2830
|
+
name: z35.string().default("Quantity"),
|
|
2831
|
+
sectionId: z35.uuid().default(() => uuidv79()),
|
|
2832
|
+
sectionType: z35.literal(SectionType.quantity).default(SectionType.quantity)
|
|
2726
2833
|
});
|
|
2727
2834
|
|
|
2728
2835
|
// src/schema/widgets/checkout-and-beyond/reviews.ts
|
|
2729
2836
|
import { v7 as uuidv710 } from "uuid";
|
|
2730
|
-
import { z as
|
|
2837
|
+
import { z as z36 } from "zod";
|
|
2731
2838
|
|
|
2732
2839
|
// src/schema/widgets/checkout-and-beyond/reviewLabels.ts
|
|
2733
2840
|
var REVIEW_LABELS = {
|
|
@@ -2790,50 +2897,50 @@ var REVIEW_LABELS = {
|
|
|
2790
2897
|
};
|
|
2791
2898
|
|
|
2792
2899
|
// src/schema/widgets/checkout-and-beyond/reviews.ts
|
|
2793
|
-
var CABReviewsSection =
|
|
2900
|
+
var CABReviewsSection = z36.object({
|
|
2794
2901
|
...CABVariableFields,
|
|
2795
|
-
color:
|
|
2902
|
+
color: z36.string().default("#fadb14"),
|
|
2796
2903
|
/**
|
|
2797
2904
|
* Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
|
|
2798
2905
|
* form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
|
|
2799
2906
|
* or merchant work.
|
|
2800
2907
|
*/
|
|
2801
|
-
countLabels:
|
|
2802
|
-
one:
|
|
2803
|
-
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 }))
|
|
2804
2911
|
}).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
|
|
2805
|
-
name:
|
|
2806
|
-
sectionId:
|
|
2807
|
-
sectionType:
|
|
2808
|
-
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)
|
|
2809
2916
|
});
|
|
2810
2917
|
|
|
2811
2918
|
// src/schema/widgets/checkout-and-beyond/variants.ts
|
|
2812
2919
|
import { slice } from "es-toolkit/compat";
|
|
2813
2920
|
import { v7 as uuidv711 } from "uuid";
|
|
2814
|
-
import { z as
|
|
2815
|
-
var CABVariantsSection =
|
|
2921
|
+
import { z as z37 } from "zod";
|
|
2922
|
+
var CABVariantsSection = z37.object({
|
|
2816
2923
|
...CABVariableFields,
|
|
2817
|
-
hideOutOfStockVariants:
|
|
2818
|
-
name:
|
|
2819
|
-
sectionId:
|
|
2820
|
-
sectionType:
|
|
2821
|
-
selector:
|
|
2822
|
-
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)
|
|
2823
2930
|
});
|
|
2824
2931
|
|
|
2825
2932
|
// src/schema/widgets/checkout-and-beyond/shared.ts
|
|
2826
|
-
var CABBorder =
|
|
2827
|
-
radius:
|
|
2828
|
-
style:
|
|
2829
|
-
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)
|
|
2830
2937
|
}).default({
|
|
2831
2938
|
radius: BorderRadius.base,
|
|
2832
2939
|
style: BorderStyle.none,
|
|
2833
2940
|
width: BorderWidth.base
|
|
2834
2941
|
});
|
|
2835
|
-
var CABSection =
|
|
2836
|
-
() =>
|
|
2942
|
+
var CABSection = z38.lazy(
|
|
2943
|
+
() => z38.discriminatedUnion("sectionType", [
|
|
2837
2944
|
CABBannerSection,
|
|
2838
2945
|
CABButtonSection,
|
|
2839
2946
|
CABCarouselSection,
|
|
@@ -2855,32 +2962,32 @@ var CABSection = z32.lazy(
|
|
|
2855
2962
|
);
|
|
2856
2963
|
|
|
2857
2964
|
// src/schema/widgets/checkout-and-beyond/layout.ts
|
|
2858
|
-
var GridItem =
|
|
2859
|
-
var CABLayoutSection =
|
|
2965
|
+
var GridItem = z39.union([z39.literal("auto"), z39.literal("fill"), z39.string().regex(/^\d+%$/), z39.number()]);
|
|
2966
|
+
var CABLayoutSection = z39.object({
|
|
2860
2967
|
...CABVariableFields,
|
|
2861
|
-
alignment:
|
|
2862
|
-
horizontal:
|
|
2863
|
-
vertical:
|
|
2968
|
+
alignment: z39.object({
|
|
2969
|
+
horizontal: z39.enum(horizontalAlignments).default(HorizontalAlignment.start),
|
|
2970
|
+
vertical: z39.enum(verticalAlignments).default(VerticalAlignment.top)
|
|
2864
2971
|
}).default({
|
|
2865
2972
|
horizontal: HorizontalAlignment.start,
|
|
2866
2973
|
vertical: VerticalAlignment.top
|
|
2867
2974
|
}),
|
|
2868
|
-
border:
|
|
2869
|
-
buttonField:
|
|
2870
|
-
direction:
|
|
2871
|
-
grid:
|
|
2872
|
-
columns:
|
|
2873
|
-
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"])
|
|
2874
2981
|
}).default({ columns: ["auto"], rows: ["auto"] }).optional(),
|
|
2875
|
-
name:
|
|
2876
|
-
padding:
|
|
2877
|
-
sectionId:
|
|
2878
|
-
sections:
|
|
2879
|
-
sectionType:
|
|
2880
|
-
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),
|
|
2881
2988
|
/** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
|
|
2882
|
-
viewUrl:
|
|
2883
|
-
width:
|
|
2989
|
+
viewUrl: z39.string().optional(),
|
|
2990
|
+
width: z39.number().default(100)
|
|
2884
2991
|
});
|
|
2885
2992
|
|
|
2886
2993
|
// src/schema/widgets/checkout-and-beyond/uiLabels.ts
|
|
@@ -2901,8 +3008,8 @@ var UI_LABELS = {
|
|
|
2901
3008
|
};
|
|
2902
3009
|
|
|
2903
3010
|
// src/schema/widgets/checkout-and-beyond/root.ts
|
|
2904
|
-
var localized = (fallback) =>
|
|
2905
|
-
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({
|
|
2906
3013
|
currentPage: localized(UI_LABELS.currentPage),
|
|
2907
3014
|
guest: localized(UI_LABELS.guest),
|
|
2908
3015
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
@@ -2927,154 +3034,154 @@ var CABUILabels = z34.object({
|
|
|
2927
3034
|
subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
|
|
2928
3035
|
updating: { ...UI_LABELS.updating }
|
|
2929
3036
|
}));
|
|
2930
|
-
var TargetArea =
|
|
2931
|
-
fill:
|
|
2932
|
-
flip:
|
|
2933
|
-
icon:
|
|
2934
|
-
label:
|
|
2935
|
-
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()
|
|
2936
3043
|
}).default(targetAreas[EditorMode.checkoutExtension][1]);
|
|
2937
|
-
var CABTracking =
|
|
2938
|
-
enableAttribution:
|
|
2939
|
-
enableSource:
|
|
2940
|
-
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)
|
|
2941
3048
|
}).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
|
|
2942
|
-
var CABExperiment =
|
|
2943
|
-
elementId:
|
|
2944
|
-
experimentId:
|
|
2945
|
-
experimentType:
|
|
2946
|
-
selectedId:
|
|
3049
|
+
var CABExperiment = z40.object({
|
|
3050
|
+
elementId: z40.number(),
|
|
3051
|
+
experimentId: z40.number(),
|
|
3052
|
+
experimentType: z40.string(),
|
|
3053
|
+
selectedId: z40.number()
|
|
2947
3054
|
});
|
|
2948
3055
|
var CABRootSection = CABLayoutSection.extend({
|
|
2949
|
-
editorMode:
|
|
3056
|
+
editorMode: z40.enum(editorModes).default(EditorMode.checkoutExtension),
|
|
2950
3057
|
experiment: CABExperiment.optional(),
|
|
2951
3058
|
// Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
|
|
2952
3059
|
// `null` must fall back rather than throw the widget; malformed values still throw.
|
|
2953
|
-
previewMode:
|
|
2954
|
-
storeId:
|
|
3060
|
+
previewMode: z40.boolean().nullish().transform((value) => value ?? false),
|
|
3061
|
+
storeId: z40.number().nullable().default(null),
|
|
2955
3062
|
targetArea: TargetArea.nullable(),
|
|
2956
3063
|
tracking: CABTracking,
|
|
2957
|
-
type:
|
|
3064
|
+
type: z40.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
|
|
2958
3065
|
uiLabels: CABUILabels,
|
|
2959
|
-
version:
|
|
2960
|
-
widgetId:
|
|
3066
|
+
version: z40.literal(2).default(2),
|
|
3067
|
+
widgetId: z40.number().nullable().default(null)
|
|
2961
3068
|
});
|
|
2962
3069
|
|
|
2963
3070
|
// src/schema/widgets/contentBlock.ts
|
|
2964
|
-
var ContentBlockV1 =
|
|
2965
|
-
blockSpacing:
|
|
2966
|
-
imageBlocks:
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
altText:
|
|
2970
|
-
description:
|
|
2971
|
-
id:
|
|
2972
|
-
imagePlacement:
|
|
2973
|
-
imageSize:
|
|
2974
|
-
imageUrl:
|
|
2975
|
-
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"]),
|
|
2976
3083
|
/** Inline scale only: an image caption can never be a block-level heading. */
|
|
2977
|
-
textSize:
|
|
3084
|
+
textSize: z41.enum(inlineTextSizeNames)
|
|
2978
3085
|
})
|
|
2979
3086
|
),
|
|
2980
|
-
|
|
3087
|
+
z41.strictObject({}).transform(() => [])
|
|
2981
3088
|
]).optional(),
|
|
2982
|
-
imageLayout:
|
|
2983
|
-
language:
|
|
2984
|
-
description:
|
|
2985
|
-
superTitle:
|
|
2986
|
-
title:
|
|
3089
|
+
imageLayout: z41.enum(["row", "column"]).optional(),
|
|
3090
|
+
language: z41.object({
|
|
3091
|
+
description: z41.string(),
|
|
3092
|
+
superTitle: z41.string(),
|
|
3093
|
+
title: z41.string()
|
|
2987
3094
|
}),
|
|
2988
|
-
previewMode:
|
|
2989
|
-
type:
|
|
2990
|
-
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)
|
|
2991
3098
|
});
|
|
2992
|
-
var ContentBlock =
|
|
3099
|
+
var ContentBlock = z41.discriminatedUnion("version", [
|
|
2993
3100
|
ContentBlockV1,
|
|
2994
3101
|
CABRootSection.extend({
|
|
2995
|
-
type:
|
|
3102
|
+
type: z41.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
|
|
2996
3103
|
})
|
|
2997
3104
|
]);
|
|
2998
3105
|
|
|
2999
3106
|
// src/schema/widgets/giftWithPurchase.ts
|
|
3000
|
-
import { z as
|
|
3001
|
-
var GiftWithPurchase =
|
|
3002
|
-
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)
|
|
3003
3110
|
});
|
|
3004
3111
|
|
|
3005
3112
|
// src/schema/widgets/lineItemEditor.ts
|
|
3006
|
-
import { z as
|
|
3007
|
-
var LineItemEditorSwitchLanguageV1 =
|
|
3008
|
-
downgradeToOneTimeLabel:
|
|
3113
|
+
import { z as z43 } from "zod";
|
|
3114
|
+
var LineItemEditorSwitchLanguageV1 = z43.object({
|
|
3115
|
+
downgradeToOneTimeLabel: z43.string().optional(),
|
|
3009
3116
|
/** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
|
|
3010
|
-
subscriptionOptionLabel:
|
|
3011
|
-
upgradeToSubscriptionLabel:
|
|
3012
|
-
upgradeToSubscriptionWithoutDiscountLabel:
|
|
3117
|
+
subscriptionOptionLabel: z43.string().optional(),
|
|
3118
|
+
upgradeToSubscriptionLabel: z43.string().optional(),
|
|
3119
|
+
upgradeToSubscriptionWithoutDiscountLabel: z43.string().optional()
|
|
3013
3120
|
});
|
|
3014
|
-
var LineItemEditorV1 =
|
|
3121
|
+
var LineItemEditorV1 = z43.object({
|
|
3015
3122
|
/** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
|
|
3016
|
-
button:
|
|
3017
|
-
previewMode:
|
|
3018
|
-
switchToSubscription:
|
|
3019
|
-
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(),
|
|
3020
3127
|
language: LineItemEditorSwitchLanguageV1.optional()
|
|
3021
3128
|
}).optional(),
|
|
3022
|
-
switchToSubscriptionEnabled:
|
|
3023
|
-
tracking:
|
|
3024
|
-
enableAttribution:
|
|
3025
|
-
enableSource:
|
|
3026
|
-
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()
|
|
3027
3134
|
}).optional(),
|
|
3028
|
-
type:
|
|
3029
|
-
version:
|
|
3135
|
+
type: z43.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
|
|
3136
|
+
version: z43.literal(1)
|
|
3030
3137
|
});
|
|
3031
|
-
var LineItemEditor =
|
|
3138
|
+
var LineItemEditor = z43.discriminatedUnion("version", [
|
|
3032
3139
|
LineItemEditorV1,
|
|
3033
3140
|
CABRootSection.extend({
|
|
3034
|
-
type:
|
|
3141
|
+
type: z43.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
|
|
3035
3142
|
})
|
|
3036
3143
|
]);
|
|
3037
3144
|
|
|
3038
3145
|
// src/schema/widgets/progressBar.ts
|
|
3039
|
-
import { z as
|
|
3040
|
-
var ProgressBar =
|
|
3041
|
-
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)
|
|
3042
3149
|
});
|
|
3043
3150
|
|
|
3044
3151
|
// src/schema/widgets/rebuyButton.ts
|
|
3045
|
-
import { z as
|
|
3046
|
-
var RebuyButtonV1 =
|
|
3047
|
-
type:
|
|
3048
|
-
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)
|
|
3049
3156
|
});
|
|
3050
|
-
var RebuyButton =
|
|
3157
|
+
var RebuyButton = z45.discriminatedUnion("version", [
|
|
3051
3158
|
RebuyButtonV1,
|
|
3052
3159
|
CABRootSection.extend({
|
|
3053
|
-
type:
|
|
3160
|
+
type: z45.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
|
|
3054
3161
|
})
|
|
3055
3162
|
]);
|
|
3056
3163
|
|
|
3057
3164
|
// src/schema/widgets/rebuyMonetize.ts
|
|
3058
|
-
import { z as
|
|
3059
|
-
var RebuyMonetize =
|
|
3060
|
-
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)
|
|
3061
3168
|
});
|
|
3062
|
-
var RebuyMonetizeV1 =
|
|
3063
|
-
name:
|
|
3064
|
-
previewMode:
|
|
3169
|
+
var RebuyMonetizeV1 = z46.object({
|
|
3170
|
+
name: z46.string().nullable().optional(),
|
|
3171
|
+
previewMode: z46.boolean().optional(),
|
|
3065
3172
|
/** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
|
|
3066
|
-
privacyPolicyUrl:
|
|
3173
|
+
privacyPolicyUrl: z46.string().nullable().optional(),
|
|
3067
3174
|
/** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
|
|
3068
|
-
subVertical:
|
|
3069
|
-
tracking:
|
|
3070
|
-
enableAttribution:
|
|
3071
|
-
enableSource:
|
|
3072
|
-
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()
|
|
3073
3180
|
}).optional(),
|
|
3074
|
-
type:
|
|
3075
|
-
version:
|
|
3181
|
+
type: z46.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
|
|
3182
|
+
version: z46.literal(1),
|
|
3076
3183
|
/** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
|
|
3077
|
-
vertical:
|
|
3184
|
+
vertical: z46.string().nullable().optional()
|
|
3078
3185
|
});
|
|
3079
3186
|
|
|
3080
3187
|
// src/schema/widgetData.ts
|
|
@@ -3088,7 +3195,7 @@ var extensionWidgetTypes = [
|
|
|
3088
3195
|
WidgetType.ui_extension_line_item_editor,
|
|
3089
3196
|
WidgetType.ui_extension_progress_bar
|
|
3090
3197
|
];
|
|
3091
|
-
var WidgetData =
|
|
3198
|
+
var WidgetData = z47.discriminatedUnion("type", [
|
|
3092
3199
|
ABTestingPlaceholder,
|
|
3093
3200
|
CheckoutExtension,
|
|
3094
3201
|
ContentBlock,
|
|
@@ -3449,15 +3556,15 @@ var SWITCH_LABELS = {
|
|
|
3449
3556
|
|
|
3450
3557
|
// src/schema/widgets/post-purchase-offer/common.ts
|
|
3451
3558
|
import { replace, toNumber, toString } from "es-toolkit/compat";
|
|
3452
|
-
import { z as
|
|
3453
|
-
var strictNumber =
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
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)
|
|
3457
3564
|
]);
|
|
3458
3565
|
|
|
3459
3566
|
// src/schema/widgets/post-purchase-offer/constants.ts
|
|
3460
|
-
import { z as
|
|
3567
|
+
import { z as z49 } from "zod";
|
|
3461
3568
|
var blockTypes = [
|
|
3462
3569
|
"callout_banner",
|
|
3463
3570
|
"image",
|
|
@@ -3468,144 +3575,144 @@ var blockTypes = [
|
|
|
3468
3575
|
"text",
|
|
3469
3576
|
"timer"
|
|
3470
3577
|
];
|
|
3471
|
-
var blockType =
|
|
3578
|
+
var blockType = z49.enum(blockTypes);
|
|
3472
3579
|
var BlockType = blockType.enum;
|
|
3473
3580
|
|
|
3474
3581
|
// src/schema/widgets/post-purchase-offer/postPurchaseBlocks.ts
|
|
3475
3582
|
import { get as get3, isEqual } from "es-toolkit/compat";
|
|
3476
3583
|
import { v4 as uuidv42 } from "uuid";
|
|
3477
|
-
import { z as
|
|
3478
|
-
var TextAlignment2 =
|
|
3479
|
-
var TextSize =
|
|
3480
|
-
|
|
3481
|
-
|
|
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")
|
|
3482
3589
|
]);
|
|
3483
|
-
var CalloutBannerBlock =
|
|
3484
|
-
id:
|
|
3485
|
-
name:
|
|
3486
|
-
settings:
|
|
3487
|
-
superTitle:
|
|
3488
|
-
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")
|
|
3489
3596
|
}),
|
|
3490
|
-
styles:
|
|
3491
|
-
superTitleEmphasized:
|
|
3597
|
+
styles: z50.object({
|
|
3598
|
+
superTitleEmphasized: z50.boolean().default(false),
|
|
3492
3599
|
superTitleSize: TextSize.default("large"),
|
|
3493
3600
|
textAlignment: TextAlignment2.default("center"),
|
|
3494
|
-
titleEmphasized:
|
|
3601
|
+
titleEmphasized: z50.boolean().default(true),
|
|
3495
3602
|
titleSize: TextSize.default("large")
|
|
3496
3603
|
}),
|
|
3497
|
-
type:
|
|
3604
|
+
type: z50.literal(BlockType.callout_banner).default(BlockType.callout_banner)
|
|
3498
3605
|
});
|
|
3499
|
-
var ImageBlock =
|
|
3500
|
-
id:
|
|
3501
|
-
name:
|
|
3502
|
-
settings:
|
|
3503
|
-
|
|
3606
|
+
var ImageBlock = z50.object({
|
|
3607
|
+
id: z50.string().optional().default(() => uuidv42()),
|
|
3608
|
+
name: z50.string().optional(),
|
|
3609
|
+
settings: z50.union([
|
|
3610
|
+
z50.object({
|
|
3504
3611
|
/** This isn't used in the post-purchase offer widget */
|
|
3505
|
-
alt:
|
|
3506
|
-
image:
|
|
3507
|
-
imageSize:
|
|
3508
|
-
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")
|
|
3509
3616
|
}),
|
|
3510
|
-
|
|
3617
|
+
z50.array(z50.never()).transform(() => ({}))
|
|
3511
3618
|
]),
|
|
3512
|
-
type:
|
|
3619
|
+
type: z50.literal(BlockType.image).default(BlockType.image)
|
|
3513
3620
|
});
|
|
3514
|
-
var ImageContentBlock =
|
|
3515
|
-
id:
|
|
3516
|
-
name:
|
|
3517
|
-
settings:
|
|
3518
|
-
alt:
|
|
3519
|
-
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(
|
|
3520
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."
|
|
3521
3628
|
),
|
|
3522
3629
|
descriptionSize: TextSize.default("medium"),
|
|
3523
3630
|
horizontalAlignment: TextAlignment2.default("leading"),
|
|
3524
|
-
image:
|
|
3525
|
-
imagePlacement:
|
|
3526
|
-
imageSize:
|
|
3527
|
-
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!"),
|
|
3528
3635
|
superTitleSize: TextSize.default("medium"),
|
|
3529
3636
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3530
|
-
swapContent:
|
|
3531
|
-
title:
|
|
3637
|
+
swapContent: z50.boolean().optional().default(false),
|
|
3638
|
+
title: z50.union([z50.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet"),
|
|
3532
3639
|
titleSize: TextSize.default("medium")
|
|
3533
3640
|
}),
|
|
3534
|
-
type:
|
|
3641
|
+
type: z50.literal(BlockType.image_content).default(BlockType.image_content)
|
|
3535
3642
|
});
|
|
3536
|
-
var PayButtonBlock =
|
|
3537
|
-
id:
|
|
3538
|
-
name:
|
|
3539
|
-
settings:
|
|
3540
|
-
|
|
3541
|
-
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")
|
|
3542
3649
|
}),
|
|
3543
|
-
|
|
3650
|
+
z50.array(z50.never()).transform(() => ({
|
|
3544
3651
|
label: "Pay Now"
|
|
3545
3652
|
}))
|
|
3546
3653
|
]),
|
|
3547
|
-
styles:
|
|
3548
|
-
|
|
3549
|
-
buttonWidth:
|
|
3654
|
+
styles: z50.union([
|
|
3655
|
+
z50.object({
|
|
3656
|
+
buttonWidth: z50.number().min(10).max(100).default(50)
|
|
3550
3657
|
}),
|
|
3551
|
-
|
|
3658
|
+
z50.array(z50.never()).transform(() => ({
|
|
3552
3659
|
buttonWidth: 50
|
|
3553
3660
|
}))
|
|
3554
3661
|
]),
|
|
3555
|
-
type:
|
|
3662
|
+
type: z50.literal(BlockType.pay_button).default(BlockType.pay_button)
|
|
3556
3663
|
});
|
|
3557
|
-
var ProductInformationBlock =
|
|
3664
|
+
var ProductInformationBlock = z50.object({
|
|
3558
3665
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3559
|
-
hideProductImage:
|
|
3560
|
-
id:
|
|
3561
|
-
name:
|
|
3562
|
-
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)
|
|
3563
3670
|
});
|
|
3564
|
-
var SeparatorBlock =
|
|
3565
|
-
id:
|
|
3566
|
-
name:
|
|
3567
|
-
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)
|
|
3568
3675
|
});
|
|
3569
|
-
var TextBlock =
|
|
3570
|
-
id:
|
|
3571
|
-
name:
|
|
3572
|
-
settings:
|
|
3573
|
-
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(
|
|
3574
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."
|
|
3575
3682
|
),
|
|
3576
3683
|
/** This isn't used in the post-purchase offer widget */
|
|
3577
3684
|
descriptionSize: TextSize.default("medium"),
|
|
3578
3685
|
horizontalAlignment: TextAlignment2.default("leading"),
|
|
3579
|
-
superTitle:
|
|
3686
|
+
superTitle: z50.union([z50.string(), TiptapDocument]).default("Super Title"),
|
|
3580
3687
|
/** This isn't used in the post-purchase offer widget */
|
|
3581
3688
|
superTitleSize: TextSize.default("medium"),
|
|
3582
|
-
title:
|
|
3689
|
+
title: z50.union([z50.string(), TiptapDocument]).nullable().default("Lorem ipsum dolor sit amet."),
|
|
3583
3690
|
/** This isn't used in the post-purchase offer widget */
|
|
3584
3691
|
titleSize: TextSize.default("medium")
|
|
3585
3692
|
}),
|
|
3586
|
-
type:
|
|
3693
|
+
type: z50.literal(BlockType.text).default(BlockType.text)
|
|
3587
3694
|
});
|
|
3588
|
-
var TimerBlock =
|
|
3589
|
-
id:
|
|
3590
|
-
name:
|
|
3591
|
-
settings:
|
|
3592
|
-
durationMinutes:
|
|
3593
|
-
durationSeconds:
|
|
3594
|
-
endOffer:
|
|
3595
|
-
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:")
|
|
3596
3703
|
}),
|
|
3597
|
-
styles:
|
|
3704
|
+
styles: z50.object({
|
|
3598
3705
|
textAlignment: TextAlignment2.default("center"),
|
|
3599
|
-
timerBackgroundColor:
|
|
3600
|
-
timerEmphasized:
|
|
3706
|
+
timerBackgroundColor: z50.enum(["info", "warning", "success", "critical"]).default("warning"),
|
|
3707
|
+
timerEmphasized: z50.union([z50.boolean(), z50.unknown().transform(() => true)]).default(true),
|
|
3601
3708
|
timerSize: TextSize.default("medium"),
|
|
3602
|
-
timerWidth:
|
|
3603
|
-
titleEmphasized:
|
|
3709
|
+
timerWidth: z50.number().min(10).max(100).optional().default(100),
|
|
3710
|
+
titleEmphasized: z50.union([z50.boolean(), z50.unknown().transform(() => true)]).default(false),
|
|
3604
3711
|
titleSize: TextSize.default("medium")
|
|
3605
3712
|
}),
|
|
3606
|
-
type:
|
|
3713
|
+
type: z50.literal(BlockType.timer).default(BlockType.timer)
|
|
3607
3714
|
});
|
|
3608
|
-
var PostPurchaseBlock =
|
|
3715
|
+
var PostPurchaseBlock = z50.discriminatedUnion("type", [
|
|
3609
3716
|
CalloutBannerBlock,
|
|
3610
3717
|
ImageBlock,
|
|
3611
3718
|
ImageContentBlock,
|
|
@@ -3625,68 +3732,68 @@ var isTextBlock = (block) => isEqual(get3(block, "type"), BlockType.text);
|
|
|
3625
3732
|
var isTimerBlock = (block) => isEqual(get3(block, "type"), BlockType.timer);
|
|
3626
3733
|
|
|
3627
3734
|
// src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
|
|
3628
|
-
import { z as
|
|
3735
|
+
import { z as z53 } from "zod";
|
|
3629
3736
|
|
|
3630
3737
|
// src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
|
|
3631
|
-
import { z as
|
|
3738
|
+
import { z as z52 } from "zod";
|
|
3632
3739
|
|
|
3633
3740
|
// src/schema/widgets/post-purchase-offer/postPurchaseSettings.ts
|
|
3634
|
-
import { z as
|
|
3635
|
-
var PostPurchaseSettings =
|
|
3636
|
-
advance:
|
|
3637
|
-
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(() => [
|
|
3638
3745
|
PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.timer }),
|
|
3639
3746
|
PostPurchaseBlock.parse({ settings: {}, styles: {}, type: BlockType.callout_banner }),
|
|
3640
3747
|
PostPurchaseBlock.parse({ type: BlockType.product_information })
|
|
3641
3748
|
]),
|
|
3642
|
-
columnLayout:
|
|
3643
|
-
discount:
|
|
3749
|
+
columnLayout: z51.boolean().optional(),
|
|
3750
|
+
discount: z51.object({
|
|
3644
3751
|
amount: strictNumber.default(30),
|
|
3645
|
-
shouldShowSavingText:
|
|
3646
|
-
type:
|
|
3752
|
+
shouldShowSavingText: z51.boolean().optional().default(true),
|
|
3753
|
+
type: z51.enum(["none", "fixed_amount", "percentage"]).default("none")
|
|
3647
3754
|
}),
|
|
3648
|
-
discountedFrom:
|
|
3649
|
-
endpoint:
|
|
3650
|
-
integrations:
|
|
3651
|
-
judgeme:
|
|
3652
|
-
junip:
|
|
3653
|
-
klaviyo:
|
|
3654
|
-
loox:
|
|
3655
|
-
okendo:
|
|
3656
|
-
opinew:
|
|
3657
|
-
reviewsio:
|
|
3658
|
-
stamped:
|
|
3659
|
-
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)
|
|
3660
3767
|
}),
|
|
3661
|
-
key:
|
|
3662
|
-
language:
|
|
3663
|
-
description:
|
|
3664
|
-
descriptionEnabled:
|
|
3665
|
-
descriptionRte:
|
|
3666
|
-
content:
|
|
3667
|
-
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()
|
|
3668
3775
|
}).optional(),
|
|
3669
|
-
descriptionSpacing:
|
|
3670
|
-
displayCtaPrice:
|
|
3671
|
-
global:
|
|
3672
|
-
declineAll:
|
|
3673
|
-
declineThisOffer:
|
|
3674
|
-
free:
|
|
3675
|
-
notAvailable:
|
|
3676
|
-
payNow:
|
|
3677
|
-
payNowUpgradeToSubscription:
|
|
3678
|
-
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"),
|
|
3679
3786
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3680
|
-
recurringShipping:
|
|
3681
|
-
recurringSubtotal:
|
|
3682
|
-
reviewsPlural:
|
|
3683
|
-
reviewsSingular:
|
|
3684
|
-
save:
|
|
3685
|
-
shipping:
|
|
3686
|
-
subscriptionOption:
|
|
3687
|
-
subtotal:
|
|
3688
|
-
taxes:
|
|
3689
|
-
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")
|
|
3690
3797
|
}).optional().default(() => ({
|
|
3691
3798
|
declineAll: "Decline All",
|
|
3692
3799
|
declineThisOffer: "Decline this offer",
|
|
@@ -3707,70 +3814,70 @@ var PostPurchaseSettings = z45.object({
|
|
|
3707
3814
|
taxes: "Taxes",
|
|
3708
3815
|
total: "Total"
|
|
3709
3816
|
})),
|
|
3710
|
-
globalTranslation:
|
|
3817
|
+
globalTranslation: z51.string().optional().default("english")
|
|
3711
3818
|
}),
|
|
3712
|
-
metafields:
|
|
3819
|
+
metafields: z51.boolean().default(false),
|
|
3713
3820
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3714
|
-
offer:
|
|
3715
|
-
count:
|
|
3821
|
+
offer: z51.object({
|
|
3822
|
+
count: z51.number().default(1)
|
|
3716
3823
|
}),
|
|
3717
|
-
offersLayout:
|
|
3718
|
-
itemsPerPage:
|
|
3719
|
-
type:
|
|
3824
|
+
offersLayout: z51.object({
|
|
3825
|
+
itemsPerPage: z51.number().optional(),
|
|
3826
|
+
type: z51.enum(["list", "grid", "carousel"]).default("list")
|
|
3720
3827
|
}).optional().default({
|
|
3721
3828
|
type: "list"
|
|
3722
3829
|
}),
|
|
3723
3830
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3724
|
-
previewMode:
|
|
3725
|
-
productLimit:
|
|
3726
|
-
productOptions:
|
|
3831
|
+
previewMode: z51.boolean().default(false),
|
|
3832
|
+
productLimit: z51.number().optional().default(1),
|
|
3833
|
+
productOptions: z51.object({
|
|
3727
3834
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3728
|
-
hideOutOfStockVariants:
|
|
3729
|
-
matchVariant:
|
|
3730
|
-
showDeclineAll:
|
|
3731
|
-
showShipping:
|
|
3732
|
-
showSubtotal:
|
|
3733
|
-
showTaxes:
|
|
3734
|
-
showTotal:
|
|
3735
|
-
showVariantSelectors:
|
|
3736
|
-
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")
|
|
3737
3844
|
}),
|
|
3738
|
-
productType:
|
|
3739
|
-
productTypeSelector:
|
|
3740
|
-
quantityInputs:
|
|
3741
|
-
defaultQuantity:
|
|
3742
|
-
enabled:
|
|
3743
|
-
maxValue:
|
|
3744
|
-
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)
|
|
3745
3852
|
}),
|
|
3746
|
-
shipping:
|
|
3853
|
+
shipping: z51.object({
|
|
3747
3854
|
amount: strictNumber.default(10),
|
|
3748
3855
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3749
|
-
enabled:
|
|
3750
|
-
title:
|
|
3751
|
-
type:
|
|
3856
|
+
enabled: z51.boolean().default(true),
|
|
3857
|
+
title: z51.string().optional().default("Shipping Fees"),
|
|
3858
|
+
type: z51.enum(["free", "fixed_amount"]).default("free")
|
|
3752
3859
|
}),
|
|
3753
|
-
styles:
|
|
3754
|
-
starColor:
|
|
3755
|
-
starSize:
|
|
3756
|
-
starStrokeColor:
|
|
3757
|
-
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")
|
|
3758
3865
|
}).optional(),
|
|
3759
|
-
subImages:
|
|
3760
|
-
subscription:
|
|
3761
|
-
discount:
|
|
3866
|
+
subImages: z51.number().nullish().default(8),
|
|
3867
|
+
subscription: z51.object({
|
|
3868
|
+
discount: z51.object({
|
|
3762
3869
|
amount: strictNumber.default(30),
|
|
3763
|
-
shouldShowSavingText:
|
|
3764
|
-
type:
|
|
3870
|
+
shouldShowSavingText: z51.boolean().optional().default(true),
|
|
3871
|
+
type: z51.enum(["none", "fixed_amount", "percentage"]).default("none")
|
|
3765
3872
|
}),
|
|
3766
|
-
shipping:
|
|
3873
|
+
shipping: z51.object({
|
|
3767
3874
|
amount: strictNumber.default(1),
|
|
3768
3875
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3769
|
-
enabled:
|
|
3876
|
+
enabled: z51.boolean().default(true),
|
|
3770
3877
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3771
3878
|
recurringAmount: strictNumber.default(2),
|
|
3772
|
-
shippingTitle:
|
|
3773
|
-
type:
|
|
3879
|
+
shippingTitle: z51.string().default("Shipping Fees"),
|
|
3880
|
+
type: z51.enum(["free", "fixed_amount"]).default("free")
|
|
3774
3881
|
})
|
|
3775
3882
|
}).optional().default({
|
|
3776
3883
|
discount: {
|
|
@@ -3788,15 +3895,15 @@ var PostPurchaseSettings = z45.object({
|
|
|
3788
3895
|
type: "free"
|
|
3789
3896
|
}
|
|
3790
3897
|
}),
|
|
3791
|
-
subscriptionIsDefault:
|
|
3898
|
+
subscriptionIsDefault: z51.boolean().optional(),
|
|
3792
3899
|
/** This isn't configurable in the admin-nextjs editor */
|
|
3793
|
-
template:
|
|
3794
|
-
type:
|
|
3795
|
-
upgradeToSubscription:
|
|
3796
|
-
acceptButtonText:
|
|
3797
|
-
allow:
|
|
3798
|
-
emailRefundNotice:
|
|
3799
|
-
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")
|
|
3800
3907
|
}).optional().default(() => ({
|
|
3801
3908
|
acceptButtonText: "Upgrade",
|
|
3802
3909
|
allow: false,
|
|
@@ -3806,32 +3913,32 @@ var PostPurchaseSettings = z45.object({
|
|
|
3806
3913
|
});
|
|
3807
3914
|
|
|
3808
3915
|
// src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
|
|
3809
|
-
var PostPurchaseWidgetLinkedFlow =
|
|
3810
|
-
id:
|
|
3811
|
-
name:
|
|
3916
|
+
var PostPurchaseWidgetLinkedFlow = z52.object({
|
|
3917
|
+
id: z52.number(),
|
|
3918
|
+
name: z52.string()
|
|
3812
3919
|
});
|
|
3813
|
-
var PostPurchaseWidget =
|
|
3814
|
-
classification:
|
|
3815
|
-
createdAtTime:
|
|
3816
|
-
customEndpointName:
|
|
3817
|
-
id:
|
|
3818
|
-
lastViewed:
|
|
3819
|
-
linkedCustomEndpointId:
|
|
3820
|
-
linkedFlows:
|
|
3821
|
-
name:
|
|
3822
|
-
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(),
|
|
3823
3930
|
settings: PostPurchaseSettings
|
|
3824
3931
|
});
|
|
3825
3932
|
|
|
3826
3933
|
// src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
|
|
3827
|
-
var PostPurchaseOffer =
|
|
3828
|
-
|
|
3829
|
-
errors:
|
|
3830
|
-
message:
|
|
3831
|
-
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)
|
|
3832
3939
|
}),
|
|
3833
|
-
|
|
3834
|
-
successful:
|
|
3940
|
+
z53.strictObject({
|
|
3941
|
+
successful: z53.literal(true),
|
|
3835
3942
|
widget: PostPurchaseWidget
|
|
3836
3943
|
})
|
|
3837
3944
|
]);
|
|
@@ -4981,12 +5088,14 @@ export {
|
|
|
4981
5088
|
DiscountSource,
|
|
4982
5089
|
DiscountType,
|
|
4983
5090
|
EditorMode,
|
|
5091
|
+
ExitPolicySchema,
|
|
4984
5092
|
GIFT_LABELS,
|
|
4985
5093
|
Geolocation,
|
|
4986
5094
|
GiftWithPurchase,
|
|
4987
5095
|
GridItem,
|
|
4988
5096
|
HEX_COLOR_REGEX,
|
|
4989
5097
|
HTML_TAGS_REGEX,
|
|
5098
|
+
HoldSettingSchema,
|
|
4990
5099
|
HorizontalAlignment,
|
|
4991
5100
|
IconName,
|
|
4992
5101
|
IconSize,
|
|
@@ -5006,17 +5115,20 @@ export {
|
|
|
5006
5115
|
ObjectFit,
|
|
5007
5116
|
OfferProduct,
|
|
5008
5117
|
OffersDirection,
|
|
5118
|
+
OrderDecisionSchema,
|
|
5009
5119
|
POST_PURCHASE_SKIP_LIMIT,
|
|
5010
5120
|
PayButtonBlock,
|
|
5011
5121
|
PopoverPosition,
|
|
5122
|
+
PostPurchaseAppIdSchema,
|
|
5012
5123
|
PostPurchaseBlock,
|
|
5013
5124
|
PostPurchaseOffer,
|
|
5014
5125
|
PostPurchaseOrderIdSchema,
|
|
5015
5126
|
PostPurchaseSettings,
|
|
5127
|
+
PostPurchaseShadowReportFields,
|
|
5016
5128
|
PostPurchaseShadowReportSchema,
|
|
5017
5129
|
PostPurchaseShadowSelectionSchema,
|
|
5018
|
-
|
|
5019
|
-
|
|
5130
|
+
PostPurchaseSkipReasonSchema,
|
|
5131
|
+
PostPurchaseSkipTraceSchema,
|
|
5020
5132
|
PostPurchaseTimestampSchema,
|
|
5021
5133
|
PostPurchaseWidget,
|
|
5022
5134
|
PostPurchaseWidgetLinkedFlow,
|
|
@@ -5030,6 +5142,7 @@ export {
|
|
|
5030
5142
|
QuantityInput,
|
|
5031
5143
|
REVIEW_LABELS,
|
|
5032
5144
|
ROOT_RELATIVE_PATH_REGEX,
|
|
5145
|
+
ReadySessionTimingSchema,
|
|
5033
5146
|
RebuyButton,
|
|
5034
5147
|
RebuyButtonV1,
|
|
5035
5148
|
RebuyClient,
|
|
@@ -5046,9 +5159,18 @@ export {
|
|
|
5046
5159
|
STATIC_ENDPOINTS,
|
|
5047
5160
|
SWITCH_LABELS,
|
|
5048
5161
|
SectionType,
|
|
5162
|
+
SelectionClaimsSchema,
|
|
5049
5163
|
SellingPlanGroup,
|
|
5050
5164
|
SeparatorBlock,
|
|
5051
5165
|
Session,
|
|
5166
|
+
SessionCloseRequestSchema,
|
|
5167
|
+
SessionCloseResponseSchema,
|
|
5168
|
+
SessionClosureSchema,
|
|
5169
|
+
SessionIdentitySchema,
|
|
5170
|
+
SessionOrderTimingSchema,
|
|
5171
|
+
SessionPolicySchema,
|
|
5172
|
+
SessionStartRequestSchema,
|
|
5173
|
+
SessionStartResponseSchema,
|
|
5052
5174
|
ShopConfig,
|
|
5053
5175
|
ShopifyDomainSchema,
|
|
5054
5176
|
SmartCartBar,
|
|
@@ -5063,6 +5185,7 @@ export {
|
|
|
5063
5185
|
TextColorName,
|
|
5064
5186
|
TextSizeName,
|
|
5065
5187
|
TimerBlock,
|
|
5188
|
+
TimingSettingsSchema,
|
|
5066
5189
|
TiptapDocument,
|
|
5067
5190
|
TiptapParagraph,
|
|
5068
5191
|
TiptapText,
|