@rebuy/rebuy 2.5.0 → 2.6.0-rc.1

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.mjs CHANGED
@@ -734,6 +734,9 @@ var RebuyClient = class {
734
734
  }
735
735
  };
736
736
 
737
+ // src/schema/metadata.ts
738
+ import { z as z2 } from "zod/v4";
739
+
737
740
  // src/schema/product.ts
738
741
  import { z } from "zod/v4";
739
742
  var zDatetime = z.iso.datetime({ offset: true });
@@ -907,57 +910,115 @@ var productSchema = z.object({
907
910
  vendor: z.string()
908
911
  });
909
912
 
910
- // src/schema/shopConfig.ts
911
- import { z as z2 } from "zod/v4";
912
- var ShopConfig = z2.object({
913
- activeExperiments: z2.array(
913
+ // src/schema/metadata.ts
914
+ var baseRuleSchema = z2.object({
915
+ operator: z2.string(),
916
+ type: z2.string(),
917
+ value: z2.union([z2.string(), z2.number()])
918
+ });
919
+ var ruleSchema = baseRuleSchema.extend({
920
+ conditions: z2.array(z2.object({ type: z2.string(), value: z2.union([z2.string(), z2.number()]) })).optional(),
921
+ products: z2.array(
914
922
  z2.object({
915
- data: z2.array(
916
- z2.object({
917
- aliasName: z2.string(),
918
- cssInput: z2.string().nullish(),
919
- elementId: z2.coerce.number(),
920
- id: z2.coerce.number(),
921
- javascriptInput: z2.string().nullish(),
922
- traffic: z2.coerce.number()
923
+ productId: z2.number(),
924
+ subRules: z2.object({ logic: z2.array(z2.object({ rules: z2.array(baseRuleSchema) })) }).optional(),
925
+ variantIds: z2.array(z2.number())
926
+ })
927
+ ).optional()
928
+ });
929
+ var outputSchema = z2.object({
930
+ channel: z2.string().optional(),
931
+ collectionId: z2.number().optional(),
932
+ collectionSort: z2.string().optional(),
933
+ collectionSortType: z2.string().nullish(),
934
+ days: z2.string().optional(),
935
+ discount: z2.object({ amount: z2.string(), type: z2.string() }).optional(),
936
+ endpoint: z2.string().optional(),
937
+ key: z2.string().optional(),
938
+ operator: z2.string().optional(),
939
+ productPrice: z2.object({ amount: z2.string(), type: z2.string() }).optional(),
940
+ products: z2.array(z2.object({ productId: z2.number(), variantIds: z2.array(z2.number()) })).optional(),
941
+ productWithTagsSort: z2.string().optional(),
942
+ trendingSort: z2.string().optional(),
943
+ type: z2.string(),
944
+ value: z2.union([z2.string(), z2.number(), z2.boolean()]).optional()
945
+ });
946
+ var matchedRuleSchema = z2.object({
947
+ collapsed: z2.boolean().optional(),
948
+ exitIfMatched: z2.boolean(),
949
+ index: z2.number(),
950
+ logic: z2.array(z2.object({ rules: z2.array(ruleSchema) })),
951
+ output: z2.array(outputSchema)
952
+ });
953
+ var metadataSchema = z2.object({
954
+ cacheInfo: cacheInfoSchema.optional(),
955
+ cartItems: z2.array(z2.never()).optional(),
956
+ errors: z2.array(z2.never()).optional(),
957
+ filteredInputProducts: z2.array(z2.never()).optional(),
958
+ filteredOosProducts: z2.array(productSchema).optional(),
959
+ globalExcludedProducts: z2.array(productSchema).optional(),
960
+ inputProducts: z2.array(z2.never()).optional(),
961
+ matchedRules: z2.array(matchedRuleSchema).optional(),
962
+ topSellersFilled: z2.boolean().optional(),
963
+ unevaluatedRules: z2.array(matchedRuleSchema).optional(),
964
+ unmatchedRules: z2.array(matchedRuleSchema).optional(),
965
+ widget: z2.object({
966
+ discount: z2.object({ amount: z2.string(), type: z2.string() }).optional(),
967
+ language: z2.record(z2.string(), z2.string()).optional()
968
+ }).optional()
969
+ });
970
+
971
+ // src/schema/shopConfig.ts
972
+ import { z as z3 } from "zod/v4";
973
+ var ShopConfig = z3.object({
974
+ activeExperiments: z3.array(
975
+ z3.object({
976
+ data: z3.array(
977
+ z3.object({
978
+ aliasName: z3.string(),
979
+ cssInput: z3.string().nullish(),
980
+ elementId: z3.coerce.number(),
981
+ id: z3.coerce.number(),
982
+ javascriptInput: z3.string().nullish(),
983
+ traffic: z3.coerce.number()
923
984
  })
924
985
  ),
925
- id: z2.coerce.number(),
926
- name: z2.string(),
927
- pageTarget: z2.string().nullable(),
928
- pageTargetUrl: z2.string().nullable(),
929
- placeholderId: z2.coerce.number().nullable(),
930
- type: z2.string()
986
+ id: z3.coerce.number(),
987
+ name: z3.string(),
988
+ pageTarget: z3.string().nullable(),
989
+ pageTargetUrl: z3.string().nullable(),
990
+ placeholderId: z3.coerce.number().nullable(),
991
+ type: z3.string()
931
992
  })
932
993
  ),
933
- activePackages: z2.array(
934
- z2.object({
935
- cancelledAt: z2.string().nullable(),
936
- id: z2.number(),
937
- installedAt: z2.string().nullable(),
938
- isActive: z2.boolean(),
939
- isBillable: z2.boolean(),
940
- packageId: z2.number(),
941
- packageName: z2.string(),
942
- shortName: z2.string(),
943
- trialDays: z2.number(),
944
- uninstalledAt: z2.string().nullable()
994
+ activePackages: z3.array(
995
+ z3.object({
996
+ cancelledAt: z3.string().nullable(),
997
+ id: z3.number(),
998
+ installedAt: z3.string().nullable(),
999
+ isActive: z3.boolean(),
1000
+ isBillable: z3.boolean(),
1001
+ packageId: z3.number(),
1002
+ packageName: z3.string(),
1003
+ shortName: z3.string(),
1004
+ trialDays: z3.number(),
1005
+ uninstalledAt: z3.string().nullable()
945
1006
  })
946
1007
  ),
947
- apiKey: z2.string(),
948
- billingVersion: z2.string(),
949
- cacheKey: z2.coerce.number(),
950
- carousel: z2.enum(["flickity", "splide"]),
951
- currency: z2.string(),
952
- currencySymbol: z2.string(),
953
- domain: z2.string(),
954
- enabledJquery: z2.boolean(),
955
- enabledPresentmentCurrencies: z2.array(z2.string()),
956
- hasSmartCollectionsEnabled: z2.boolean(),
957
- hasSmartSearchEnabled: z2.boolean(),
958
- id: z2.coerce.number(),
959
- integrations: z2.record(
960
- z2.enum([
1008
+ apiKey: z3.string(),
1009
+ billingVersion: z3.string(),
1010
+ cacheKey: z3.coerce.number(),
1011
+ carousel: z3.enum(["flickity", "splide"]),
1012
+ currency: z3.string(),
1013
+ currencySymbol: z3.string(),
1014
+ domain: z3.string(),
1015
+ enabledJquery: z3.boolean(),
1016
+ enabledPresentmentCurrencies: z3.array(z3.string()),
1017
+ hasSmartCollectionsEnabled: z3.boolean(),
1018
+ hasSmartSearchEnabled: z3.boolean(),
1019
+ id: z3.coerce.number(),
1020
+ integrations: z3.record(
1021
+ z3.enum([
961
1022
  "attentive",
962
1023
  "judgeme",
963
1024
  "junip",
@@ -970,55 +1031,55 @@ var ShopConfig = z2.object({
970
1031
  "stamped",
971
1032
  "yotpo"
972
1033
  ]),
973
- z2.boolean()
1034
+ z3.boolean()
974
1035
  ),
975
- markets: z2.object({
976
- enabled: z2.boolean()
1036
+ markets: z3.object({
1037
+ enabled: z3.boolean()
977
1038
  }),
978
- moneyFormat: z2.string(),
979
- myshopifyDomain: z2.string(),
980
- primaryLocale: z2.string(),
981
- productGroupsEnabled: z2.enum(["no", "yes"]).transform((value) => value === "yes"),
982
- rechargeCustomDomain: z2.string().nullable(),
983
- sellingPlansEnabled: z2.boolean(),
984
- shopId: z2.number(),
985
- shopifySellingPlansEnabled: z2.boolean(),
986
- shopName: z2.string(),
987
- storefrontAccessToken: z2.string().nullable(),
988
- useRebuyIcons: z2.boolean()
1039
+ moneyFormat: z3.string(),
1040
+ myshopifyDomain: z3.string(),
1041
+ primaryLocale: z3.string(),
1042
+ productGroupsEnabled: z3.enum(["no", "yes"]).transform((value) => value === "yes"),
1043
+ rechargeCustomDomain: z3.string().nullable(),
1044
+ sellingPlansEnabled: z3.boolean(),
1045
+ shopId: z3.number(),
1046
+ shopifySellingPlansEnabled: z3.boolean(),
1047
+ shopName: z3.string(),
1048
+ storefrontAccessToken: z3.string().nullable(),
1049
+ useRebuyIcons: z3.boolean()
989
1050
  });
990
1051
 
991
1052
  // src/schema/userConfig.ts
992
- import { z as z3 } from "zod/v4";
993
- var UserConfig = z3.object({
1053
+ import { z as z4 } from "zod/v4";
1054
+ var UserConfig = z4.object({
994
1055
  shop: ShopConfig,
995
- smartCart: z3.unknown(),
996
- smartFlows: z3.array(z3.unknown())
1056
+ smartCart: z4.unknown(),
1057
+ smartFlows: z4.array(z4.unknown())
997
1058
  });
998
1059
 
999
1060
  // src/schema/widgetData.ts
1000
- import { z as z29 } from "zod/v4";
1061
+ import { z as z30 } from "zod/v4";
1001
1062
 
1002
1063
  // src/schema/widgets/abTestingPlaceholder.ts
1003
- import { z as z4 } from "zod/v4";
1004
- var ABTestingPlaceholder = z4.looseObject({
1005
- type: z4.literal("placeholder")
1064
+ import { z as z5 } from "zod/v4";
1065
+ var ABTestingPlaceholder = z5.looseObject({
1066
+ type: z5.literal("placeholder")
1006
1067
  });
1007
1068
 
1008
1069
  // src/schema/widgets/checkout-and-beyond/constants.ts
1009
1070
  import { uniqBy } from "lodash-es";
1010
- import { z as z6 } from "zod/v4";
1071
+ import { z as z7 } from "zod/v4";
1011
1072
 
1012
1073
  // src/schema/widgets/checkout-and-beyond/common.ts
1013
- import { z as z5 } from "zod/v4";
1074
+ import { z as z6 } from "zod/v4";
1014
1075
  var borderRadii = ["none", "small", "base", "large", "fullyRounded"];
1015
- var borderRadius = z5.enum(borderRadii);
1076
+ var borderRadius = z6.enum(borderRadii);
1016
1077
  var BorderRadius = borderRadius.enum;
1017
1078
  var borderStyles = ["none", "base", "dotted", "dashed"];
1018
- var borderStyle = z5.enum(borderStyles);
1079
+ var borderStyle = z6.enum(borderStyles);
1019
1080
  var BorderStyle = borderStyle.enum;
1020
1081
  var borderWidths = ["base", "medium", "thick"];
1021
- var borderWidth = z5.enum(borderWidths);
1082
+ var borderWidth = z6.enum(borderWidths);
1022
1083
  var BorderWidth = borderWidth.enum;
1023
1084
  var buttonActions = [
1024
1085
  "addToOrder",
@@ -1031,7 +1092,7 @@ var buttonActions = [
1031
1092
  "showVariants",
1032
1093
  "switchToSubscription"
1033
1094
  ];
1034
- var buttonAction = z5.enum(buttonActions);
1095
+ var buttonAction = z6.enum(buttonActions);
1035
1096
  var ButtonAction = buttonAction.enum;
1036
1097
  var buttonFields = [
1037
1098
  "addedToCart",
@@ -1052,13 +1113,13 @@ var buttonFields = [
1052
1113
  "switchToSubscriptionNoDiscount",
1053
1114
  "switchToSubscriptionWithDiscount"
1054
1115
  ];
1055
- var buttonField = z5.enum(buttonFields);
1116
+ var buttonField = z6.enum(buttonFields);
1056
1117
  var ButtonField = buttonField.enum;
1057
1118
  var buttonStyles = ["primary", "secondary", "plain", "custom"];
1058
- var buttonStyle = z5.enum(buttonStyles);
1119
+ var buttonStyle = z6.enum(buttonStyles);
1059
1120
  var ButtonStyle = buttonStyle.enum;
1060
1121
  var directions = ["columns", "rows"];
1061
- var direction = z5.enum(directions);
1122
+ var direction = z6.enum(directions);
1062
1123
  var Direction = direction.enum;
1063
1124
  var editorModes = [
1064
1125
  "checkoutExtension",
@@ -1068,10 +1129,10 @@ var editorModes = [
1068
1129
  "ordersIndexPage",
1069
1130
  "customerProfilePage"
1070
1131
  ];
1071
- var editorMode = z5.enum(editorModes);
1132
+ var editorMode = z6.enum(editorModes);
1072
1133
  var EditorMode = editorMode.enum;
1073
1134
  var horizontalAlignments = ["start", "center", "end"];
1074
- var horizontalAlignment = z5.enum(horizontalAlignments);
1135
+ var horizontalAlignment = z6.enum(horizontalAlignments);
1075
1136
  var HorizontalAlignment = horizontalAlignment.enum;
1076
1137
  var languageKeys = [
1077
1138
  "ar",
@@ -1101,13 +1162,13 @@ var languageKeys = [
1101
1162
  "vi",
1102
1163
  "zh"
1103
1164
  ];
1104
- var languageKey = z5.enum(languageKeys);
1165
+ var languageKey = z6.enum(languageKeys);
1105
1166
  var LanguageKey = languageKey.enum;
1106
1167
  var objectFits = ["cover", "contain"];
1107
- var objectFit = z5.enum(objectFits);
1168
+ var objectFit = z6.enum(objectFits);
1108
1169
  var ObjectFit = objectFit.enum;
1109
1170
  var quantityInputs = ["select", "number"];
1110
- var quantityInput = z5.enum(quantityInputs);
1171
+ var quantityInput = z6.enum(quantityInputs);
1111
1172
  var QuantityInput = quantityInput.enum;
1112
1173
  var sectionTypes = [
1113
1174
  "button",
@@ -1124,25 +1185,25 @@ var sectionTypes = [
1124
1185
  "text",
1125
1186
  "variants"
1126
1187
  ];
1127
- var sectionType = z5.enum(sectionTypes);
1188
+ var sectionType = z6.enum(sectionTypes);
1128
1189
  var SectionType = sectionType.enum;
1129
1190
  var spacings = ["none", "extraTight", "tight", "base", "loose", "extraLoose"];
1130
- var spacing = z5.enum(spacings);
1191
+ var spacing = z6.enum(spacings);
1131
1192
  var Spacing = spacing.enum;
1132
1193
  var textAlignments = ["start", "center", "end"];
1133
- var textAlignment = z5.enum(textAlignments);
1194
+ var textAlignment = z6.enum(textAlignments);
1134
1195
  var TextAlignment = textAlignment.enum;
1135
1196
  var textColorNames = ["base", "subdued", "accent", "decorative", "success", "warning", "critical"];
1136
- var textColorName = z5.enum(textColorNames);
1197
+ var textColorName = z6.enum(textColorNames);
1137
1198
  var TextColorName = textColorName.enum;
1138
1199
  var textSizeNames = ["extraSmall", "small", "base", "medium", "large", "extraLarge"];
1139
- var textSizeName = z5.enum(textSizeNames);
1200
+ var textSizeName = z6.enum(textSizeNames);
1140
1201
  var TextSizeName = textSizeName.enum;
1141
1202
  var variantSelectors = ["menu", "button", "radio", "color", "image"];
1142
- var variantSelector = z5.enum(variantSelectors);
1203
+ var variantSelector = z6.enum(variantSelectors);
1143
1204
  var VariantSelector = variantSelector.enum;
1144
1205
  var verticalAlignments = ["top", "middle", "bottom"];
1145
- var verticalAlignment = z5.enum(verticalAlignments);
1206
+ var verticalAlignment = z6.enum(verticalAlignments);
1146
1207
  var VerticalAlignment = verticalAlignment.enum;
1147
1208
 
1148
1209
  // src/schema/widgets/checkout-and-beyond/constants.ts
@@ -1218,35 +1279,35 @@ var widgetTypes = [
1218
1279
  "ui_extension_line_item_editor",
1219
1280
  "ui_extension_progress_bar"
1220
1281
  ];
1221
- var widgetType = z6.enum(widgetTypes);
1282
+ var widgetType = z7.enum(widgetTypes);
1222
1283
  var WidgetType = widgetType.enum;
1223
1284
 
1224
1285
  // src/schema/widgets/checkoutExtension.ts
1225
- import { z as z7 } from "zod/v4";
1226
- var CheckoutExtension = z7.looseObject({
1227
- type: z7.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
1286
+ import { z as z8 } from "zod/v4";
1287
+ var CheckoutExtension = z8.looseObject({
1288
+ type: z8.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
1228
1289
  });
1229
1290
 
1230
1291
  // src/schema/widgets/contentBlock.ts
1231
- import { z as z23 } from "zod/v4";
1292
+ import { z as z24 } from "zod/v4";
1232
1293
 
1233
1294
  // src/schema/widgets/checkout-and-beyond/root.ts
1234
- import { z as z22 } from "zod/v4";
1295
+ import { z as z23 } from "zod/v4";
1235
1296
 
1236
1297
  // src/schema/widgets/checkout-and-beyond/layout.ts
1237
1298
  import { v7 as uuidv712 } from "uuid";
1238
- import { z as z21 } from "zod/v4";
1299
+ import { z as z22 } from "zod/v4";
1239
1300
 
1240
1301
  // src/schema/widgets/checkout-and-beyond/shared.ts
1241
- import { z as z20 } from "zod/v4";
1302
+ import { z as z21 } from "zod/v4";
1242
1303
 
1243
1304
  // src/schema/widgets/checkout-and-beyond/button.ts
1244
1305
  import { v7 as uuidv73 } from "uuid";
1245
- import { z as z10 } from "zod/v4";
1306
+ import { z as z11 } from "zod/v4";
1246
1307
 
1247
1308
  // src/schema/widgets/checkout-and-beyond/image.ts
1248
1309
  import { v7 as uuidv7 } from "uuid";
1249
- import { z as z8 } from "zod/v4";
1310
+ import { z as z9 } from "zod/v4";
1250
1311
 
1251
1312
  // src/schema/widgets/checkout-and-beyond/regex.ts
1252
1313
  var ARRAY_INDEX_STRING = /^(0|[1-9]\d*)$/;
@@ -1293,77 +1354,77 @@ var convertNumericObjects = (input) => {
1293
1354
  };
1294
1355
 
1295
1356
  // src/schema/widgets/checkout-and-beyond/image.ts
1296
- var CABImageSection = z8.object({
1297
- altText: z8.string().refine(checkForHTML, NO_HTML).default(""),
1298
- aspectRatio: z8.literal(1).nullable().default(null),
1299
- border: z8.lazy(() => CABBorder),
1300
- buttonField: z8.enum(buttonFields).optional(),
1301
- category: z8.enum(["gallery", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
1302
- name: z8.string().optional(),
1303
- naturalHeight: z8.number().default(0),
1304
- naturalWidth: z8.number().default(0),
1305
- objectFit: z8.enum(objectFits).default(ObjectFit.cover),
1306
- sectionId: z8.uuid().default(() => uuidv7()),
1307
- sectionType: z8.literal(SectionType.image).default(SectionType.image),
1308
- source: z8.union([z8.url(), z8.literal(""), z8.string().regex(DYNAMIC_TOKEN_REGEX)]).default(""),
1309
- width: z8.number().default(100)
1357
+ var CABImageSection = z9.object({
1358
+ altText: z9.string().refine(checkForHTML, NO_HTML).default(""),
1359
+ aspectRatio: z9.literal(1).nullable().default(null),
1360
+ border: z9.lazy(() => CABBorder),
1361
+ buttonField: z9.enum(buttonFields).optional(),
1362
+ category: z9.enum(["gallery", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
1363
+ name: z9.string().optional(),
1364
+ naturalHeight: z9.number().default(0),
1365
+ naturalWidth: z9.number().default(0),
1366
+ objectFit: z9.enum(objectFits).default(ObjectFit.cover),
1367
+ sectionId: z9.uuid().default(() => uuidv7()),
1368
+ sectionType: z9.literal(SectionType.image).default(SectionType.image),
1369
+ source: z9.union([z9.url(), z9.literal(""), z9.string().regex(DYNAMIC_TOKEN_REGEX)]).default(""),
1370
+ width: z9.number().default(100)
1310
1371
  });
1311
1372
 
1312
1373
  // src/schema/widgets/checkout-and-beyond/text.ts
1313
1374
  import { forEach, isString as isString2 } from "lodash-es";
1314
1375
  import { v7 as uuidv72 } from "uuid";
1315
- import { z as z9 } from "zod/v4";
1316
- var enumOrOmit = (...vals) => z9.string().transform((val) => vals.includes(val) ? val : void 0).optional();
1317
- var TiptapText = z9.object({
1318
- marks: z9.union([
1319
- z9.array(
1320
- z9.discriminatedUnion("type", [
1321
- z9.object({ type: z9.literal("bold") }),
1322
- z9.object({ type: z9.literal("italic") }),
1323
- z9.object({
1324
- attrs: z9.object({
1325
- class: z9.string().nullable(),
1326
- href: z9.union([z9.url(), z9.string().regex(DYNAMIC_TOKEN_REGEX)]),
1327
- rel: z9.string().default("noopener noreferrer nofollow"),
1328
- target: z9.string().default("_blank")
1376
+ import { z as z10 } from "zod/v4";
1377
+ var enumOrOmit = (...vals) => z10.string().transform((val) => vals.includes(val) ? val : void 0).optional();
1378
+ var TiptapText = z10.object({
1379
+ marks: z10.union([
1380
+ z10.array(
1381
+ z10.discriminatedUnion("type", [
1382
+ z10.object({ type: z10.literal("bold") }),
1383
+ z10.object({ type: z10.literal("italic") }),
1384
+ z10.object({
1385
+ attrs: z10.object({
1386
+ class: z10.string().nullable(),
1387
+ href: z10.union([z10.url(), z10.string().regex(DYNAMIC_TOKEN_REGEX)]),
1388
+ rel: z10.string().default("noopener noreferrer nofollow"),
1389
+ target: z10.string().default("_blank")
1329
1390
  }),
1330
- type: z9.literal("link")
1391
+ type: z10.literal("link")
1331
1392
  }),
1332
- z9.object({ type: z9.literal("strike") }),
1333
- z9.object({
1334
- attrs: z9.object({
1393
+ z10.object({ type: z10.literal("strike") }),
1394
+ z10.object({
1395
+ attrs: z10.object({
1335
1396
  color: enumOrOmit(...textColorNames).default(TextColorName.base),
1336
1397
  fontSize: enumOrOmit(...textSizeNames).default(TextSizeName.base)
1337
1398
  }),
1338
- type: z9.literal("textStyle")
1399
+ type: z10.literal("textStyle")
1339
1400
  })
1340
1401
  ])
1341
1402
  ),
1342
- z9.strictObject({}).transform(() => [])
1403
+ z10.strictObject({}).transform(() => [])
1343
1404
  ]).optional(),
1344
- text: z9.string().default(""),
1345
- type: z9.literal("text").default("text")
1405
+ text: z10.string().default(""),
1406
+ type: z10.literal("text").default("text")
1346
1407
  });
1347
- var TiptapParagraph = z9.object({
1348
- attrs: z9.object({
1408
+ var TiptapParagraph = z10.object({
1409
+ attrs: z10.object({
1349
1410
  textAlign: enumOrOmit(...textAlignments)
1350
1411
  }).default({ textAlign: TextAlignment.start }),
1351
- content: z9.union([z9.array(TiptapText), z9.strictObject({}).transform(() => [])]).default(() => []),
1352
- type: z9.literal("paragraph").default("paragraph")
1412
+ content: z10.union([z10.array(TiptapText), z10.strictObject({}).transform(() => [])]).default(() => []),
1413
+ type: z10.literal("paragraph").default("paragraph")
1353
1414
  });
1354
- var TiptapDocument = z9.object({
1355
- attrs: z9.object({
1415
+ var TiptapDocument = z10.object({
1416
+ attrs: z10.object({
1356
1417
  blockSpacing: enumOrOmit(...spacings)
1357
1418
  }).default({ blockSpacing: Spacing.base }),
1358
- content: z9.union([z9.array(TiptapParagraph), z9.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
1359
- type: z9.literal("doc").default("doc")
1419
+ content: z10.union([z10.array(TiptapParagraph), z10.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
1420
+ type: z10.literal("doc").default("doc")
1360
1421
  });
1361
- var CABTextSection = z9.object({
1362
- buttonField: z9.enum(buttonFields).optional(),
1363
- content: z9.record(z9.string(), z9.union([z9.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
1364
- name: z9.string().optional(),
1365
- sectionId: z9.uuid().default(() => uuidv72()),
1366
- sectionType: z9.literal(SectionType.text).default(SectionType.text)
1422
+ var CABTextSection = z10.object({
1423
+ buttonField: z10.enum(buttonFields).optional(),
1424
+ content: z10.record(z10.string(), z10.union([z10.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
1425
+ name: z10.string().optional(),
1426
+ sectionId: z10.uuid().default(() => uuidv72()),
1427
+ sectionType: z10.literal(SectionType.text).default(SectionType.text)
1367
1428
  }).superRefine(({ buttonField: buttonField2, content }, ctx) => {
1368
1429
  if (buttonField2 === ButtonField.destinationUrl && content) {
1369
1430
  forEach(content, (value, lang) => {
@@ -1384,99 +1445,99 @@ var CABTextSection = z9.object({
1384
1445
  });
1385
1446
 
1386
1447
  // src/schema/widgets/checkout-and-beyond/button.ts
1387
- var CABButtonContent = z10.lazy(() => z10.discriminatedUnion("sectionType", [CABImageSection, CABTextSection]));
1388
- var CABButtonSection = z10.object({
1389
- action: z10.union([z10.literal(""), z10.enum(buttonActions)]).default(""),
1390
- buttonStyle: z10.enum(buttonStyles).default(ButtonStyle.primary),
1391
- custom: z10.object({
1392
- color: z10.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
1393
- height: z10.number().default(52),
1394
- width: z10.number().default(300)
1448
+ var CABButtonContent = z11.lazy(() => z11.discriminatedUnion("sectionType", [CABImageSection, CABTextSection]));
1449
+ var CABButtonSection = z11.object({
1450
+ action: z11.union([z11.literal(""), z11.enum(buttonActions)]).default(""),
1451
+ buttonStyle: z11.enum(buttonStyles).default(ButtonStyle.primary),
1452
+ custom: z11.object({
1453
+ color: z11.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
1454
+ height: z11.number().default(52),
1455
+ width: z11.number().default(300)
1395
1456
  }).default({
1396
1457
  color: "#005bd3",
1397
1458
  height: 52,
1398
1459
  width: 300
1399
1460
  }),
1400
- name: z10.string().optional(),
1401
- sectionId: z10.uuid().default(() => uuidv73()),
1402
- sections: z10.union([z10.array(CABButtonContent), z10.strictObject({}).transform(() => [])]).default(() => []),
1403
- sectionType: z10.literal(SectionType.button).default(SectionType.button)
1461
+ name: z11.string().optional(),
1462
+ sectionId: z11.uuid().default(() => uuidv73()),
1463
+ sections: z11.union([z11.array(CABButtonContent), z11.strictObject({}).transform(() => [])]).default(() => []),
1464
+ sectionType: z11.literal(SectionType.button).default(SectionType.button)
1404
1465
  });
1405
1466
 
1406
1467
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
1407
1468
  import { v7 as uuidv74 } from "uuid";
1408
- import { z as z11 } from "zod/v4";
1409
- var CABDataSourceSection = z11.object({
1410
- dataSourceId: z11.number().nullable().default(null),
1411
- dataSourcePath: z11.string().default(DEFAULT_ENDPOINTS[0].value),
1412
- limit: z11.number().default(1),
1413
- name: z11.string().default(DEFAULT_ENDPOINTS[0].label),
1414
- sectionId: z11.uuid().default(() => uuidv74()),
1415
- sectionType: z11.literal(SectionType.dataSource).default(SectionType.dataSource)
1469
+ import { z as z12 } from "zod/v4";
1470
+ var CABDataSourceSection = z12.object({
1471
+ dataSourceId: z12.number().nullable().default(null),
1472
+ dataSourcePath: z12.string().default(DEFAULT_ENDPOINTS[0].value),
1473
+ limit: z12.number().default(1),
1474
+ name: z12.string().default(DEFAULT_ENDPOINTS[0].label),
1475
+ sectionId: z12.uuid().default(() => uuidv74()),
1476
+ sectionType: z12.literal(SectionType.dataSource).default(SectionType.dataSource)
1416
1477
  });
1417
1478
 
1418
1479
  // src/schema/widgets/checkout-and-beyond/offers.ts
1419
- import { z as z14 } from "zod/v4";
1480
+ import { z as z15 } from "zod/v4";
1420
1481
 
1421
1482
  // src/schema/widgets/checkout-and-beyond/products.ts
1422
1483
  import { v7 as uuidv76 } from "uuid";
1423
- import { z as z13 } from "zod/v4";
1484
+ import { z as z14 } from "zod/v4";
1424
1485
 
1425
1486
  // src/schema/widgets/checkout-and-beyond/product.ts
1426
1487
  import { v7 as uuidv75 } from "uuid";
1427
- import { z as z12 } from "zod/v4";
1428
- var CABProductSection = z12.object({
1429
- name: z12.string().optional(),
1430
- options: z12.array(
1431
- z12.object({
1488
+ import { z as z13 } from "zod/v4";
1489
+ var CABProductSection = z13.object({
1490
+ name: z13.string().optional(),
1491
+ options: z13.array(
1492
+ z13.object({
1432
1493
  /** `name` represents `Color`, `Size`, etc. */
1433
- name: z12.string(),
1434
- optionId: z12.number(),
1435
- selector: z12.enum(variantSelectors).default(VariantSelector.menu),
1436
- values: z12.array(
1437
- z12.object({
1438
- color: z12.string().optional(),
1439
- image: z12.lazy(() => CABImageSection).optional(),
1494
+ name: z13.string(),
1495
+ optionId: z13.number(),
1496
+ selector: z13.enum(variantSelectors).default(VariantSelector.menu),
1497
+ values: z13.array(
1498
+ z13.object({
1499
+ color: z13.string().optional(),
1500
+ image: z13.lazy(() => CABImageSection).optional(),
1440
1501
  /** `name` represents `Red`, `Blue`, etc. */
1441
- name: z12.string(),
1442
- text: z12.lazy(() => CABTextSection).optional()
1502
+ name: z13.string(),
1503
+ text: z13.lazy(() => CABTextSection).optional()
1443
1504
  })
1444
1505
  )
1445
1506
  })
1446
1507
  ).default(() => []),
1447
- productId: z12.number().nullable().default(null),
1448
- sectionId: z12.uuid().default(() => uuidv75()),
1449
- sectionType: z12.literal(SectionType.product).default(SectionType.product)
1508
+ productId: z13.number().nullable().default(null),
1509
+ sectionId: z13.uuid().default(() => uuidv75()),
1510
+ sectionType: z13.literal(SectionType.product).default(SectionType.product)
1450
1511
  });
1451
1512
 
1452
1513
  // src/schema/widgets/checkout-and-beyond/products.ts
1453
- var CABProductsSection = z13.object({
1454
- name: z13.string().optional(),
1455
- sectionId: z13.uuid().default(() => uuidv76()),
1456
- sections: z13.union([z13.array(z13.lazy(() => CABProductSection)), z13.strictObject({}).transform(() => [])]).default(() => []),
1457
- sectionType: z13.literal(SectionType.products).default(SectionType.products)
1514
+ var CABProductsSection = z14.object({
1515
+ name: z14.string().optional(),
1516
+ sectionId: z14.uuid().default(() => uuidv76()),
1517
+ sections: z14.union([z14.array(z14.lazy(() => CABProductSection)), z14.strictObject({}).transform(() => [])]).default(() => []),
1518
+ sectionType: z14.literal(SectionType.products).default(SectionType.products)
1458
1519
  });
1459
1520
 
1460
1521
  // src/schema/widgets/checkout-and-beyond/offers.ts
1461
- var CABOffersSection = z14.lazy(
1522
+ var CABOffersSection = z15.lazy(
1462
1523
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend(
1463
- z14.object({
1464
- sections: z14.union([z14.array(z14.lazy(() => CABSection)), z14.strictObject({}).transform(() => [])]).default(() => [CABDataSourceSection.parse({}), CABProductsSection.parse({})]),
1465
- sectionType: z14.literal(SectionType.offers).default(SectionType.offers)
1524
+ z15.object({
1525
+ sections: z15.union([z15.array(z15.lazy(() => CABSection)), z15.strictObject({}).transform(() => [])]).default(() => [CABDataSourceSection.parse({}), CABProductsSection.parse({})]),
1526
+ sectionType: z15.literal(SectionType.offers).default(SectionType.offers)
1466
1527
  }).shape
1467
1528
  )
1468
1529
  );
1469
1530
 
1470
1531
  // src/schema/widgets/checkout-and-beyond/quantity.ts
1471
1532
  import { v7 as uuidv77 } from "uuid";
1472
- import { z as z15 } from "zod/v4";
1473
- var CABQuantitySection = z15.object({
1474
- errorMessages: z15.record(
1475
- z15.string(),
1476
- z15.object({
1477
- max: z15.string().optional(),
1478
- min: z15.string().optional(),
1479
- neg: z15.string().optional()
1533
+ import { z as z16 } from "zod/v4";
1534
+ var CABQuantitySection = z16.object({
1535
+ errorMessages: z16.record(
1536
+ z16.string(),
1537
+ z16.object({
1538
+ max: z16.string().optional(),
1539
+ min: z16.string().optional(),
1540
+ neg: z16.string().optional()
1480
1541
  })
1481
1542
  ).default({
1482
1543
  en: {
@@ -1485,64 +1546,64 @@ var CABQuantitySection = z15.object({
1485
1546
  neg: "Quantity cannot be negative"
1486
1547
  }
1487
1548
  }),
1488
- inputType: z15.enum(quantityInputs).default(QuantityInput.select),
1489
- max: z15.number().min(1).max(100).default(10),
1490
- min: z15.number().min(1).default(1),
1491
- name: z15.string().optional(),
1492
- sectionId: z15.uuid().default(() => uuidv77()),
1493
- sectionType: z15.literal(SectionType.quantity).default(SectionType.quantity)
1549
+ inputType: z16.enum(quantityInputs).default(QuantityInput.select),
1550
+ max: z16.number().min(1).max(100).default(10),
1551
+ min: z16.number().min(1).default(1),
1552
+ name: z16.string().optional(),
1553
+ sectionId: z16.uuid().default(() => uuidv77()),
1554
+ sectionType: z16.literal(SectionType.quantity).default(SectionType.quantity)
1494
1555
  });
1495
1556
 
1496
1557
  // src/schema/widgets/checkout-and-beyond/reviews.ts
1497
1558
  import { v7 as uuidv78 } from "uuid";
1498
- import { z as z16 } from "zod/v4";
1499
- var CABReviewsSection = z16.object({
1500
- name: z16.string().optional(),
1501
- sectionId: z16.uuid().default(() => uuidv78()),
1502
- sectionType: z16.literal(SectionType.reviews).default(SectionType.reviews)
1559
+ import { z as z17 } from "zod/v4";
1560
+ var CABReviewsSection = z17.object({
1561
+ name: z17.string().optional(),
1562
+ sectionId: z17.uuid().default(() => uuidv78()),
1563
+ sectionType: z17.literal(SectionType.reviews).default(SectionType.reviews)
1503
1564
  });
1504
1565
 
1505
1566
  // src/schema/widgets/checkout-and-beyond/subscription.ts
1506
1567
  import { v7 as uuidv79 } from "uuid";
1507
- import { z as z17 } from "zod/v4";
1508
- var CABSubscriptionSection = z17.object({
1509
- name: z17.string().optional(),
1510
- sectionId: z17.uuid().default(() => uuidv79()),
1511
- sectionType: z17.literal(SectionType.subscription).default(SectionType.subscription)
1568
+ import { z as z18 } from "zod/v4";
1569
+ var CABSubscriptionSection = z18.object({
1570
+ name: z18.string().optional(),
1571
+ sectionId: z18.uuid().default(() => uuidv79()),
1572
+ sectionType: z18.literal(SectionType.subscription).default(SectionType.subscription)
1512
1573
  });
1513
1574
 
1514
1575
  // src/schema/widgets/checkout-and-beyond/table.ts
1515
1576
  import { v7 as uuidv710 } from "uuid";
1516
- import { z as z18 } from "zod/v4";
1517
- var CABTableSection = z18.object({
1518
- name: z18.string().optional(),
1519
- sectionId: z18.uuid().default(() => uuidv710()),
1520
- sectionType: z18.literal(SectionType.table).default(SectionType.table)
1577
+ import { z as z19 } from "zod/v4";
1578
+ var CABTableSection = z19.object({
1579
+ name: z19.string().optional(),
1580
+ sectionId: z19.uuid().default(() => uuidv710()),
1581
+ sectionType: z19.literal(SectionType.table).default(SectionType.table)
1521
1582
  });
1522
1583
 
1523
1584
  // src/schema/widgets/checkout-and-beyond/variants.ts
1524
1585
  import { slice } from "lodash-es";
1525
1586
  import { v7 as uuidv711 } from "uuid";
1526
- import { z as z19 } from "zod/v4";
1527
- var CABVariantsSection = z19.object({
1528
- name: z19.string().optional(),
1529
- sectionId: z19.uuid().default(() => uuidv711()),
1530
- sectionType: z19.literal(SectionType.variants).default(SectionType.variants),
1531
- selector: z19.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu)
1587
+ import { z as z20 } from "zod/v4";
1588
+ var CABVariantsSection = z20.object({
1589
+ name: z20.string().optional(),
1590
+ sectionId: z20.uuid().default(() => uuidv711()),
1591
+ sectionType: z20.literal(SectionType.variants).default(SectionType.variants),
1592
+ selector: z20.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu)
1532
1593
  });
1533
1594
 
1534
1595
  // src/schema/widgets/checkout-and-beyond/shared.ts
1535
- var CABBorder = z20.object({
1536
- radius: z20.enum(borderRadii).default(BorderRadius.base),
1537
- style: z20.enum(borderStyles).default(BorderStyle.none),
1538
- width: z20.enum(borderWidths).default(BorderWidth.base)
1596
+ var CABBorder = z21.object({
1597
+ radius: z21.enum(borderRadii).default(BorderRadius.base),
1598
+ style: z21.enum(borderStyles).default(BorderStyle.none),
1599
+ width: z21.enum(borderWidths).default(BorderWidth.base)
1539
1600
  }).default({
1540
1601
  radius: BorderRadius.base,
1541
1602
  style: BorderStyle.none,
1542
1603
  width: BorderWidth.base
1543
1604
  });
1544
- var CABSection = z20.lazy(
1545
- () => z20.discriminatedUnion("sectionType", [
1605
+ var CABSection = z21.lazy(
1606
+ () => z21.discriminatedUnion("sectionType", [
1546
1607
  CABButtonSection,
1547
1608
  CABDataSourceSection,
1548
1609
  CABImageSection,
@@ -1560,115 +1621,115 @@ var CABSection = z20.lazy(
1560
1621
  );
1561
1622
 
1562
1623
  // src/schema/widgets/checkout-and-beyond/layout.ts
1563
- var CABLayoutSection = z21.object({
1564
- alignment: z21.object({
1565
- horizontal: z21.enum(horizontalAlignments).default(HorizontalAlignment.start),
1566
- vertical: z21.enum(verticalAlignments).default(VerticalAlignment.top)
1624
+ var CABLayoutSection = z22.object({
1625
+ alignment: z22.object({
1626
+ horizontal: z22.enum(horizontalAlignments).default(HorizontalAlignment.start),
1627
+ vertical: z22.enum(verticalAlignments).default(VerticalAlignment.top)
1567
1628
  }).default({
1568
1629
  horizontal: HorizontalAlignment.start,
1569
1630
  vertical: VerticalAlignment.top
1570
1631
  }),
1571
- border: z21.lazy(() => CABBorder),
1572
- direction: z21.enum(directions).default(Direction.rows),
1573
- name: z21.string().optional(),
1574
- padding: z21.enum(spacings).default(Spacing.none),
1575
- sectionId: z21.uuid().default(() => uuidv712()),
1576
- sections: z21.union([z21.array(z21.lazy(() => CABSection)), z21.strictObject({}).transform(() => [])]).default(() => []),
1577
- sectionType: z21.literal(SectionType.layout).default(SectionType.layout),
1578
- spacing: z21.enum(spacings).default(Spacing.base),
1579
- width: z21.number().default(100)
1632
+ border: z22.lazy(() => CABBorder),
1633
+ direction: z22.enum(directions).default(Direction.rows),
1634
+ name: z22.string().optional(),
1635
+ padding: z22.enum(spacings).default(Spacing.none),
1636
+ sectionId: z22.uuid().default(() => uuidv712()),
1637
+ sections: z22.union([z22.array(z22.lazy(() => CABSection)), z22.strictObject({}).transform(() => [])]).default(() => []),
1638
+ sectionType: z22.literal(SectionType.layout).default(SectionType.layout),
1639
+ spacing: z22.enum(spacings).default(Spacing.base),
1640
+ width: z22.number().default(100)
1580
1641
  });
1581
1642
 
1582
1643
  // src/schema/widgets/checkout-and-beyond/root.ts
1583
- var TargetArea = z22.object({
1584
- fill: z22.boolean().optional(),
1585
- flip: z22.enum(["both", "horizontal", "vertical"]).optional(),
1586
- icon: z22.string(),
1587
- label: z22.string(),
1588
- width: z22.string()
1644
+ var TargetArea = z23.object({
1645
+ fill: z23.boolean().optional(),
1646
+ flip: z23.enum(["both", "horizontal", "vertical"]).optional(),
1647
+ icon: z23.string(),
1648
+ label: z23.string(),
1649
+ width: z23.string()
1589
1650
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
1590
1651
  var CABRootSection = CABLayoutSection.extend(
1591
- z22.object({
1592
- editorMode: z22.enum(editorModes).default(EditorMode.checkoutExtension),
1593
- previewMode: z22.boolean().default(false),
1594
- storeId: z22.number().nullable().default(null),
1652
+ z23.object({
1653
+ editorMode: z23.enum(editorModes).default(EditorMode.checkoutExtension),
1654
+ previewMode: z23.boolean().default(false),
1655
+ storeId: z23.number().nullable().default(null),
1595
1656
  targetArea: TargetArea.nullable(),
1596
- type: z22.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
1597
- version: z22.literal(2).default(2),
1598
- widgetId: z22.number().nullable().default(null)
1657
+ type: z23.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
1658
+ version: z23.literal(2).default(2),
1659
+ widgetId: z23.number().nullable().default(null)
1599
1660
  }).shape
1600
1661
  );
1601
1662
 
1602
1663
  // src/schema/widgets/contentBlock.ts
1603
- var ContentBlockV1 = z23.object({
1604
- blockSpacing: z23.enum(spacings),
1605
- imageBlocks: z23.union([
1606
- z23.array(
1607
- z23.object({
1608
- altText: z23.string().nullable(),
1609
- description: z23.string().nullable(),
1610
- id: z23.uuid(),
1611
- imagePlacement: z23.enum(["top", "right", "bottom", "left"]),
1612
- imageSize: z23.number(),
1613
- imageUrl: z23.url(),
1614
- textAlignment: z23.enum(["left", "center", "right"]),
1615
- textSize: z23.enum(textSizeNames)
1664
+ var ContentBlockV1 = z24.object({
1665
+ blockSpacing: z24.enum(spacings),
1666
+ imageBlocks: z24.union([
1667
+ z24.array(
1668
+ z24.object({
1669
+ altText: z24.string().nullable(),
1670
+ description: z24.string().nullable(),
1671
+ id: z24.uuid(),
1672
+ imagePlacement: z24.enum(["top", "right", "bottom", "left"]),
1673
+ imageSize: z24.number(),
1674
+ imageUrl: z24.url(),
1675
+ textAlignment: z24.enum(["left", "center", "right"]),
1676
+ textSize: z24.enum(textSizeNames)
1616
1677
  })
1617
1678
  ),
1618
- z23.strictObject({}).transform(() => [])
1679
+ z24.strictObject({}).transform(() => [])
1619
1680
  ]),
1620
- imageLayout: z23.enum(["row", "column"]),
1621
- language: z23.object({
1622
- description: z23.string(),
1623
- superTitle: z23.string(),
1624
- title: z23.string()
1681
+ imageLayout: z24.enum(["row", "column"]),
1682
+ language: z24.object({
1683
+ description: z24.string(),
1684
+ superTitle: z24.string(),
1685
+ title: z24.string()
1625
1686
  }),
1626
- previewMode: z23.boolean(),
1627
- type: z23.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
1628
- version: z23.literal(1)
1687
+ previewMode: z24.boolean(),
1688
+ type: z24.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
1689
+ version: z24.literal(1)
1629
1690
  });
1630
- var ContentBlock = z23.discriminatedUnion("version", [
1691
+ var ContentBlock = z24.discriminatedUnion("version", [
1631
1692
  ContentBlockV1,
1632
1693
  CABRootSection.extend({
1633
- type: z23.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
1694
+ type: z24.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
1634
1695
  })
1635
1696
  ]);
1636
1697
 
1637
1698
  // src/schema/widgets/giftWithPurchase.ts
1638
- import { z as z24 } from "zod/v4";
1639
- var GiftWithPurchase = z24.looseObject({
1640
- type: z24.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
1699
+ import { z as z25 } from "zod/v4";
1700
+ var GiftWithPurchase = z25.looseObject({
1701
+ type: z25.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
1641
1702
  });
1642
1703
 
1643
1704
  // src/schema/widgets/lineItemEditor.ts
1644
- import { z as z25 } from "zod/v4";
1645
- var LineItemEditor = z25.looseObject({
1646
- type: z25.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
1705
+ import { z as z26 } from "zod/v4";
1706
+ var LineItemEditor = z26.looseObject({
1707
+ type: z26.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
1647
1708
  });
1648
1709
 
1649
1710
  // src/schema/widgets/progressBar.ts
1650
- import { z as z26 } from "zod/v4";
1651
- var ProgressBar = z26.looseObject({
1652
- type: z26.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
1711
+ import { z as z27 } from "zod/v4";
1712
+ var ProgressBar = z27.looseObject({
1713
+ type: z27.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
1653
1714
  });
1654
1715
 
1655
1716
  // src/schema/widgets/rebuyButton.ts
1656
- import { z as z27 } from "zod/v4";
1657
- var RebuyButtonV1 = z27.looseObject({
1658
- type: z27.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
1659
- version: z27.literal(1)
1717
+ import { z as z28 } from "zod/v4";
1718
+ var RebuyButtonV1 = z28.looseObject({
1719
+ type: z28.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
1720
+ version: z28.literal(1)
1660
1721
  });
1661
- var RebuyButton = z27.discriminatedUnion("version", [
1722
+ var RebuyButton = z28.discriminatedUnion("version", [
1662
1723
  RebuyButtonV1,
1663
1724
  CABRootSection.extend({
1664
- type: z27.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
1725
+ type: z28.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
1665
1726
  })
1666
1727
  ]);
1667
1728
 
1668
1729
  // src/schema/widgets/rebuyMonetize.ts
1669
- import { z as z28 } from "zod/v4";
1670
- var RebuyMonetize = z28.looseObject({
1671
- type: z28.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
1730
+ import { z as z29 } from "zod/v4";
1731
+ var RebuyMonetize = z29.looseObject({
1732
+ type: z29.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
1672
1733
  });
1673
1734
 
1674
1735
  // src/schema/widgetData.ts
@@ -1682,7 +1743,7 @@ var extensionWidgetTypes = [
1682
1743
  WidgetType.ui_extension_line_item_editor,
1683
1744
  WidgetType.ui_extension_progress_bar
1684
1745
  ];
1685
- var WidgetData = z29.discriminatedUnion("type", [
1746
+ var WidgetData = z30.discriminatedUnion("type", [
1686
1747
  ABTestingPlaceholder,
1687
1748
  CheckoutExtension,
1688
1749
  ContentBlock,
@@ -1801,6 +1862,7 @@ export {
1801
1862
  isTextType,
1802
1863
  isVariantsType,
1803
1864
  languageKeys,
1865
+ metadataSchema,
1804
1866
  objectFits,
1805
1867
  productImageObject,
1806
1868
  productSchema,