@rebuy/rebuy 2.3.0 → 2.4.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.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +130 -27
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +131 -28
- package/dist/index.mjs.map +4 -4
- package/dist/schema/cab/button.d.ts.map +1 -0
- package/dist/schema/cab/common.d.ts.map +1 -0
- package/dist/schema/cab/constants.d.ts.map +1 -0
- package/dist/schema/cab/data-source.d.ts.map +1 -0
- package/dist/schema/cab/image.d.ts.map +1 -0
- package/dist/schema/cab/index.d.ts.map +1 -0
- package/dist/schema/cab/layout.d.ts.map +1 -0
- package/dist/schema/cab/offers.d.ts.map +1 -0
- package/dist/schema/cab/product.d.ts.map +1 -0
- package/dist/schema/cab/products.d.ts.map +1 -0
- package/dist/schema/cab/quantity.d.ts.map +1 -0
- package/dist/schema/{regex.d.ts → cab/regex.d.ts} +2 -0
- package/dist/schema/cab/regex.d.ts.map +1 -0
- package/dist/schema/cab/reviews.d.ts.map +1 -0
- package/dist/schema/cab/root.d.ts.map +1 -0
- package/dist/schema/cab/shared.d.ts.map +1 -0
- package/dist/schema/cab/subscription.d.ts.map +1 -0
- package/dist/schema/cab/table.d.ts.map +1 -0
- package/dist/schema/cab/text.d.ts.map +1 -0
- package/dist/schema/{utils.d.ts → cab/utils.d.ts} +1 -0
- package/dist/schema/cab/utils.d.ts.map +1 -0
- package/dist/schema/cab/variants.d.ts.map +1 -0
- package/dist/schema/shopConfig.d.ts +63 -0
- package/dist/schema/shopConfig.d.ts.map +1 -0
- package/dist/schema/userConfig.d.ts +66 -0
- package/dist/schema/userConfig.d.ts.map +1 -0
- package/dist/schema/widgetSettings.d.ts +152 -0
- package/dist/schema/widgetSettings.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/schema/button.d.ts.map +0 -1
- package/dist/schema/common.d.ts.map +0 -1
- package/dist/schema/constants.d.ts.map +0 -1
- package/dist/schema/data-source.d.ts.map +0 -1
- package/dist/schema/image.d.ts.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/layout.d.ts.map +0 -1
- package/dist/schema/offers.d.ts.map +0 -1
- package/dist/schema/product.d.ts.map +0 -1
- package/dist/schema/products.d.ts.map +0 -1
- package/dist/schema/quantity.d.ts.map +0 -1
- package/dist/schema/regex.d.ts.map +0 -1
- package/dist/schema/reviews.d.ts.map +0 -1
- package/dist/schema/root.d.ts.map +0 -1
- package/dist/schema/shared.d.ts.map +0 -1
- package/dist/schema/subscription.d.ts.map +0 -1
- package/dist/schema/table.d.ts.map +0 -1
- package/dist/schema/text.d.ts.map +0 -1
- package/dist/schema/utils.d.ts.map +0 -1
- package/dist/schema/variants.d.ts.map +0 -1
- /package/dist/schema/{button.d.ts → cab/button.d.ts} +0 -0
- /package/dist/schema/{common.d.ts → cab/common.d.ts} +0 -0
- /package/dist/schema/{constants.d.ts → cab/constants.d.ts} +0 -0
- /package/dist/schema/{data-source.d.ts → cab/data-source.d.ts} +0 -0
- /package/dist/schema/{image.d.ts → cab/image.d.ts} +0 -0
- /package/dist/schema/{index.d.ts → cab/index.d.ts} +0 -0
- /package/dist/schema/{layout.d.ts → cab/layout.d.ts} +0 -0
- /package/dist/schema/{offers.d.ts → cab/offers.d.ts} +0 -0
- /package/dist/schema/{product.d.ts → cab/product.d.ts} +0 -0
- /package/dist/schema/{products.d.ts → cab/products.d.ts} +0 -0
- /package/dist/schema/{quantity.d.ts → cab/quantity.d.ts} +0 -0
- /package/dist/schema/{reviews.d.ts → cab/reviews.d.ts} +0 -0
- /package/dist/schema/{root.d.ts → cab/root.d.ts} +0 -0
- /package/dist/schema/{shared.d.ts → cab/shared.d.ts} +0 -0
- /package/dist/schema/{subscription.d.ts → cab/subscription.d.ts} +0 -0
- /package/dist/schema/{table.d.ts → cab/table.d.ts} +0 -0
- /package/dist/schema/{text.d.ts → cab/text.d.ts} +0 -0
- /package/dist/schema/{variants.d.ts → cab/variants.d.ts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -734,11 +734,11 @@ var RebuyClient = class {
|
|
|
734
734
|
}
|
|
735
735
|
};
|
|
736
736
|
|
|
737
|
-
// src/schema/button.ts
|
|
737
|
+
// src/schema/cab/button.ts
|
|
738
738
|
import { v7 as uuidv712 } from "uuid";
|
|
739
739
|
import { z as z16 } from "zod/v4";
|
|
740
740
|
|
|
741
|
-
// src/schema/common.ts
|
|
741
|
+
// src/schema/cab/common.ts
|
|
742
742
|
import { z } from "zod/v4";
|
|
743
743
|
var borderRadii = ["none", "small", "base", "large", "fullyRounded"];
|
|
744
744
|
var borderRadius = z.enum(borderRadii);
|
|
@@ -874,23 +874,24 @@ var verticalAlignments = ["top", "middle", "bottom"];
|
|
|
874
874
|
var verticalAlignment = z.enum(verticalAlignments);
|
|
875
875
|
var VerticalAlignment = verticalAlignment.enum;
|
|
876
876
|
|
|
877
|
-
// src/schema/image.ts
|
|
877
|
+
// src/schema/cab/image.ts
|
|
878
878
|
import { v7 as uuidv711 } from "uuid";
|
|
879
879
|
import { z as z15 } from "zod/v4";
|
|
880
880
|
|
|
881
|
-
// src/schema/regex.ts
|
|
881
|
+
// src/schema/cab/regex.ts
|
|
882
|
+
var ARRAY_INDEX_STRING = /^(0|[1-9]\d*)$/;
|
|
882
883
|
var DYNAMIC_TOKEN_REGEX = /^\{\{\s*[A-Za-z]+\s*\}\}$/;
|
|
883
884
|
var HEX_COLOR_REGEX = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
884
885
|
var HTML_TAGS_REGEX = /<[^>]*>/gi;
|
|
885
886
|
|
|
886
|
-
// src/schema/shared.ts
|
|
887
|
+
// src/schema/cab/shared.ts
|
|
887
888
|
import { z as z14 } from "zod/v4";
|
|
888
889
|
|
|
889
|
-
// src/schema/data-source.ts
|
|
890
|
+
// src/schema/cab/data-source.ts
|
|
890
891
|
import { v7 as uuidv7 } from "uuid";
|
|
891
892
|
import { z as z3 } from "zod/v4";
|
|
892
893
|
|
|
893
|
-
// src/schema/constants.ts
|
|
894
|
+
// src/schema/cab/constants.ts
|
|
894
895
|
import { uniqBy } from "lodash-es";
|
|
895
896
|
import { z as z2 } from "zod/v4";
|
|
896
897
|
var DEFAULT_ENDPOINTS = [
|
|
@@ -968,7 +969,7 @@ var widgetTypes = [
|
|
|
968
969
|
var widgetType = z2.enum(widgetTypes);
|
|
969
970
|
var WidgetType = widgetType.enum;
|
|
970
971
|
|
|
971
|
-
// src/schema/data-source.ts
|
|
972
|
+
// src/schema/cab/data-source.ts
|
|
972
973
|
var CABDataSourceSection = z3.object({
|
|
973
974
|
dataSourceId: z3.number().nullable().default(null),
|
|
974
975
|
dataSourcePath: z3.string().default(DEFAULT_ENDPOINTS[0].value),
|
|
@@ -978,7 +979,7 @@ var CABDataSourceSection = z3.object({
|
|
|
978
979
|
sectionType: z3.literal(SectionType.dataSource).default(SectionType.dataSource)
|
|
979
980
|
});
|
|
980
981
|
|
|
981
|
-
// src/schema/layout.ts
|
|
982
|
+
// src/schema/cab/layout.ts
|
|
982
983
|
import { v7 as uuidv72 } from "uuid";
|
|
983
984
|
import { z as z4 } from "zod/v4";
|
|
984
985
|
var CABLayoutSection = z4.object({
|
|
@@ -1000,24 +1001,24 @@ var CABLayoutSection = z4.object({
|
|
|
1000
1001
|
width: z4.number().default(100)
|
|
1001
1002
|
});
|
|
1002
1003
|
|
|
1003
|
-
// src/schema/offers.ts
|
|
1004
|
+
// src/schema/cab/offers.ts
|
|
1004
1005
|
import { z as z8 } from "zod/v4";
|
|
1005
1006
|
|
|
1006
|
-
// src/schema/products.ts
|
|
1007
|
+
// src/schema/cab/products.ts
|
|
1007
1008
|
import { v7 as uuidv75 } from "uuid";
|
|
1008
1009
|
import { z as z7 } from "zod/v4";
|
|
1009
1010
|
|
|
1010
|
-
// src/schema/product.ts
|
|
1011
|
+
// src/schema/cab/product.ts
|
|
1011
1012
|
import { v7 as uuidv74 } from "uuid";
|
|
1012
1013
|
import { z as z6 } from "zod/v4";
|
|
1013
1014
|
|
|
1014
|
-
// src/schema/text.ts
|
|
1015
|
+
// src/schema/cab/text.ts
|
|
1015
1016
|
import { forEach, isString as isString2 } from "lodash-es";
|
|
1016
1017
|
import { v7 as uuidv73 } from "uuid";
|
|
1017
1018
|
import { z as z5 } from "zod/v4";
|
|
1018
1019
|
|
|
1019
|
-
// src/schema/utils.ts
|
|
1020
|
-
import { get as get2, isPlainObject, isString } from "lodash-es";
|
|
1020
|
+
// src/schema/cab/utils.ts
|
|
1021
|
+
import { entries, every, get as get2, isArray, isPlainObject, isString, map, mapValues, size } from "lodash-es";
|
|
1021
1022
|
var isHTML = (html = "") => {
|
|
1022
1023
|
if (typeof window !== "undefined") {
|
|
1023
1024
|
const parser = new DOMParser();
|
|
@@ -1043,8 +1044,18 @@ var isSubscriptionType = (section) => get2(section, "sectionType") === SectionTy
|
|
|
1043
1044
|
var isTableType = (section) => get2(section, "sectionType") === SectionType.table;
|
|
1044
1045
|
var isTextType = (section) => get2(section, "sectionType") === SectionType.text;
|
|
1045
1046
|
var isVariantsType = (section) => get2(section, "sectionType") === SectionType.variants;
|
|
1047
|
+
var hasOnlyNumericKeys = (input) => !!size(input) && every(input, (_, key) => ARRAY_INDEX_STRING.test(key) && Number.isSafeInteger(Number(key)));
|
|
1048
|
+
var numericObjectToArray = (input) => entries(input).sort(([a], [b]) => Number(a) - Number(b)).map(([_, value]) => value);
|
|
1049
|
+
var convertNumericObjects = (input) => {
|
|
1050
|
+
if (isArray(input)) return map(input, convertNumericObjects);
|
|
1051
|
+
if (isPlainObject(input)) {
|
|
1052
|
+
const obj = input;
|
|
1053
|
+
return hasOnlyNumericKeys(obj) ? map(numericObjectToArray(obj), convertNumericObjects) : mapValues(obj, convertNumericObjects);
|
|
1054
|
+
}
|
|
1055
|
+
return input;
|
|
1056
|
+
};
|
|
1046
1057
|
|
|
1047
|
-
// src/schema/text.ts
|
|
1058
|
+
// src/schema/cab/text.ts
|
|
1048
1059
|
var enumOrOmit = (...vals) => z5.string().transform((val) => vals.includes(val) ? val : void 0).optional();
|
|
1049
1060
|
var TiptapText = z5.object({
|
|
1050
1061
|
marks: z5.array(
|
|
@@ -1112,7 +1123,7 @@ var CABTextSection = z5.object({
|
|
|
1112
1123
|
}
|
|
1113
1124
|
});
|
|
1114
1125
|
|
|
1115
|
-
// src/schema/product.ts
|
|
1126
|
+
// src/schema/cab/product.ts
|
|
1116
1127
|
var CABProductSection = z6.object({
|
|
1117
1128
|
name: z6.string().optional(),
|
|
1118
1129
|
options: z6.array(
|
|
@@ -1137,7 +1148,7 @@ var CABProductSection = z6.object({
|
|
|
1137
1148
|
sectionType: z6.literal(SectionType.product).default(SectionType.product)
|
|
1138
1149
|
});
|
|
1139
1150
|
|
|
1140
|
-
// src/schema/products.ts
|
|
1151
|
+
// src/schema/cab/products.ts
|
|
1141
1152
|
var CABProductsSection = z7.object({
|
|
1142
1153
|
name: z7.string().optional(),
|
|
1143
1154
|
sectionId: z7.uuidv7().default(() => uuidv75()),
|
|
@@ -1145,7 +1156,7 @@ var CABProductsSection = z7.object({
|
|
|
1145
1156
|
sectionType: z7.literal(SectionType.products).default(SectionType.products)
|
|
1146
1157
|
});
|
|
1147
1158
|
|
|
1148
|
-
// src/schema/offers.ts
|
|
1159
|
+
// src/schema/cab/offers.ts
|
|
1149
1160
|
var CABOffersSection = CABLayoutSection.omit({ sections: true, sectionType: true }).extend(
|
|
1150
1161
|
z8.object({
|
|
1151
1162
|
sections: z8.array(z8.lazy(() => CABSection)).default(() => [CABDataSourceSection.parse({}), CABProductsSection.parse({})]),
|
|
@@ -1153,7 +1164,7 @@ var CABOffersSection = CABLayoutSection.omit({ sections: true, sectionType: true
|
|
|
1153
1164
|
}).shape
|
|
1154
1165
|
);
|
|
1155
1166
|
|
|
1156
|
-
// src/schema/quantity.ts
|
|
1167
|
+
// src/schema/cab/quantity.ts
|
|
1157
1168
|
import { v7 as uuidv76 } from "uuid";
|
|
1158
1169
|
import { z as z9 } from "zod/v4";
|
|
1159
1170
|
var CABQuantitySection = z9.object({
|
|
@@ -1179,7 +1190,7 @@ var CABQuantitySection = z9.object({
|
|
|
1179
1190
|
sectionType: z9.literal(SectionType.quantity).default(SectionType.quantity)
|
|
1180
1191
|
});
|
|
1181
1192
|
|
|
1182
|
-
// src/schema/reviews.ts
|
|
1193
|
+
// src/schema/cab/reviews.ts
|
|
1183
1194
|
import { v7 as uuidv77 } from "uuid";
|
|
1184
1195
|
import { z as z10 } from "zod/v4";
|
|
1185
1196
|
var CABReviewsSection = z10.object({
|
|
@@ -1188,7 +1199,7 @@ var CABReviewsSection = z10.object({
|
|
|
1188
1199
|
sectionType: z10.literal(SectionType.reviews).default(SectionType.reviews)
|
|
1189
1200
|
});
|
|
1190
1201
|
|
|
1191
|
-
// src/schema/subscription.ts
|
|
1202
|
+
// src/schema/cab/subscription.ts
|
|
1192
1203
|
import { v7 as uuidv78 } from "uuid";
|
|
1193
1204
|
import { z as z11 } from "zod/v4";
|
|
1194
1205
|
var CABSubscriptionSection = z11.object({
|
|
@@ -1197,7 +1208,7 @@ var CABSubscriptionSection = z11.object({
|
|
|
1197
1208
|
sectionType: z11.literal(SectionType.subscription).default(SectionType.subscription)
|
|
1198
1209
|
});
|
|
1199
1210
|
|
|
1200
|
-
// src/schema/table.ts
|
|
1211
|
+
// src/schema/cab/table.ts
|
|
1201
1212
|
import { v7 as uuidv79 } from "uuid";
|
|
1202
1213
|
import { z as z12 } from "zod/v4";
|
|
1203
1214
|
var CABTableSection = z12.object({
|
|
@@ -1206,7 +1217,7 @@ var CABTableSection = z12.object({
|
|
|
1206
1217
|
sectionType: z12.literal(SectionType.table).default(SectionType.table)
|
|
1207
1218
|
});
|
|
1208
1219
|
|
|
1209
|
-
// src/schema/variants.ts
|
|
1220
|
+
// src/schema/cab/variants.ts
|
|
1210
1221
|
import { slice } from "lodash-es";
|
|
1211
1222
|
import { v7 as uuidv710 } from "uuid";
|
|
1212
1223
|
import { z as z13 } from "zod/v4";
|
|
@@ -1217,7 +1228,7 @@ var CABVariantsSection = z13.object({
|
|
|
1217
1228
|
selector: z13.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu)
|
|
1218
1229
|
});
|
|
1219
1230
|
|
|
1220
|
-
// src/schema/shared.ts
|
|
1231
|
+
// src/schema/cab/shared.ts
|
|
1221
1232
|
var CABBorder = z14.object({
|
|
1222
1233
|
radius: z14.enum(borderRadii).default(BorderRadius.base),
|
|
1223
1234
|
style: z14.enum(borderStyles).default(BorderStyle.none),
|
|
@@ -1245,7 +1256,7 @@ var CABSection = z14.lazy(
|
|
|
1245
1256
|
])
|
|
1246
1257
|
);
|
|
1247
1258
|
|
|
1248
|
-
// src/schema/image.ts
|
|
1259
|
+
// src/schema/cab/image.ts
|
|
1249
1260
|
var CABImageSection = z15.object({
|
|
1250
1261
|
altText: z15.string().refine(checkForHTML, NO_HTML).default(""),
|
|
1251
1262
|
aspectRatio: z15.literal(1).nullable().default(null),
|
|
@@ -1262,7 +1273,7 @@ var CABImageSection = z15.object({
|
|
|
1262
1273
|
width: z15.number().default(100)
|
|
1263
1274
|
});
|
|
1264
1275
|
|
|
1265
|
-
// src/schema/button.ts
|
|
1276
|
+
// src/schema/cab/button.ts
|
|
1266
1277
|
var CABButtonContent = z16.lazy(() => z16.discriminatedUnion("sectionType", [CABImageSection, CABTextSection]));
|
|
1267
1278
|
var CABButtonSection = z16.object({
|
|
1268
1279
|
action: z16.union([z16.literal(""), z16.enum(buttonActions)]).default(""),
|
|
@@ -1282,7 +1293,7 @@ var CABButtonSection = z16.object({
|
|
|
1282
1293
|
sectionType: z16.literal(SectionType.button).default(SectionType.button)
|
|
1283
1294
|
});
|
|
1284
1295
|
|
|
1285
|
-
// src/schema/root.ts
|
|
1296
|
+
// src/schema/cab/root.ts
|
|
1286
1297
|
import { z as z17 } from "zod/v4";
|
|
1287
1298
|
var TargetArea = z17.object({
|
|
1288
1299
|
fill: z17.boolean().optional(),
|
|
@@ -1302,7 +1313,94 @@ var CABRootSection = CABLayoutSection.extend(
|
|
|
1302
1313
|
widgetId: z17.number().nullable().default(null)
|
|
1303
1314
|
}).shape
|
|
1304
1315
|
);
|
|
1316
|
+
|
|
1317
|
+
// src/schema/shopConfig.ts
|
|
1318
|
+
import { z as z18 } from "zod/v4";
|
|
1319
|
+
var ShopConfig = z18.object({
|
|
1320
|
+
activeExperiments: z18.array(
|
|
1321
|
+
z18.object({
|
|
1322
|
+
data: z18.array(
|
|
1323
|
+
z18.object({
|
|
1324
|
+
aliasName: z18.string(),
|
|
1325
|
+
cssInput: z18.string().nullish(),
|
|
1326
|
+
elementId: z18.string(),
|
|
1327
|
+
id: z18.string(),
|
|
1328
|
+
javascriptInput: z18.string().nullish(),
|
|
1329
|
+
traffic: z18.string()
|
|
1330
|
+
})
|
|
1331
|
+
),
|
|
1332
|
+
id: z18.string(),
|
|
1333
|
+
name: z18.string(),
|
|
1334
|
+
pageTarget: z18.string().nullable(),
|
|
1335
|
+
placeholderId: z18.string().nullable(),
|
|
1336
|
+
type: z18.string()
|
|
1337
|
+
})
|
|
1338
|
+
).optional(),
|
|
1339
|
+
activePackages: z18.array(
|
|
1340
|
+
z18.object({
|
|
1341
|
+
cancelledAt: z18.string().nullable(),
|
|
1342
|
+
id: z18.number(),
|
|
1343
|
+
installedAt: z18.string().nullable(),
|
|
1344
|
+
isActive: z18.boolean(),
|
|
1345
|
+
isBillable: z18.boolean(),
|
|
1346
|
+
packageId: z18.number(),
|
|
1347
|
+
packageName: z18.string(),
|
|
1348
|
+
shortName: z18.string(),
|
|
1349
|
+
trialDays: z18.number(),
|
|
1350
|
+
uninstalledAt: z18.string().nullable()
|
|
1351
|
+
})
|
|
1352
|
+
).optional(),
|
|
1353
|
+
apiKey: z18.string(),
|
|
1354
|
+
billingVersion: z18.string().optional(),
|
|
1355
|
+
cacheKey: z18.string().regex(/^[0-9]+$/),
|
|
1356
|
+
carousel: z18.string(),
|
|
1357
|
+
currency: z18.string(),
|
|
1358
|
+
currencySymbol: z18.string(),
|
|
1359
|
+
domain: z18.string(),
|
|
1360
|
+
enabledJquery: z18.boolean(),
|
|
1361
|
+
enabledPresentmentCurrencies: z18.array(z18.string()),
|
|
1362
|
+
hasSmartCollectionsEnabled: z18.boolean().optional(),
|
|
1363
|
+
hasSmartSearchEnabled: z18.boolean(),
|
|
1364
|
+
id: z18.string().regex(/^[0-9]+$/),
|
|
1365
|
+
integrations: z18.record(z18.string(), z18.boolean()),
|
|
1366
|
+
markets: z18.object({
|
|
1367
|
+
enabled: z18.boolean()
|
|
1368
|
+
}),
|
|
1369
|
+
moneyFormat: z18.string(),
|
|
1370
|
+
myshopifyDomain: z18.string(),
|
|
1371
|
+
primaryLocale: z18.string(),
|
|
1372
|
+
productGroupsEnabled: z18.enum(["no", "yes"]),
|
|
1373
|
+
rechargeCustomDomain: z18.string().nullable(),
|
|
1374
|
+
sellingPlansEnabled: z18.boolean(),
|
|
1375
|
+
shopId: z18.number(),
|
|
1376
|
+
shopifySellingPlansEnabled: z18.boolean(),
|
|
1377
|
+
shopName: z18.string(),
|
|
1378
|
+
storefrontAccessToken: z18.string().nullable(),
|
|
1379
|
+
useRebuyIcons: z18.boolean()
|
|
1380
|
+
});
|
|
1381
|
+
|
|
1382
|
+
// src/schema/userConfig.ts
|
|
1383
|
+
import { z as z19 } from "zod/v4";
|
|
1384
|
+
var UserConfig = z19.object({
|
|
1385
|
+
shop: ShopConfig,
|
|
1386
|
+
smartCart: z19.unknown(),
|
|
1387
|
+
smartFlows: z19.array(z19.unknown())
|
|
1388
|
+
});
|
|
1389
|
+
|
|
1390
|
+
// src/schema/widgetSettings.ts
|
|
1391
|
+
import { z as z20 } from "zod/v4";
|
|
1392
|
+
var LegacyV1Widget = z20.discriminatedUnion("type", [
|
|
1393
|
+
z20.object({ type: z20.literal(WidgetType.gift_with_purchase), version: z20.literal(1) }),
|
|
1394
|
+
z20.object({ type: z20.literal(WidgetType.shopify_checkout_extension), version: z20.literal(1) }),
|
|
1395
|
+
z20.object({ type: z20.literal(WidgetType.ui_extension_ad), version: z20.literal(1) }),
|
|
1396
|
+
z20.object({ type: z20.literal(WidgetType.ui_extension_button), version: z20.literal(1) }),
|
|
1397
|
+
z20.object({ type: z20.literal(WidgetType.ui_extension_content_block), version: z20.literal(1) }),
|
|
1398
|
+
z20.object({ type: z20.literal(WidgetType.ui_extension_line_item_editor), version: z20.literal(1) }),
|
|
1399
|
+
z20.object({ type: z20.literal(WidgetType.ui_extension_progress_bar), version: z20.literal(1) })
|
|
1400
|
+
]);
|
|
1401
|
+
var WidgetSettings = z20.discriminatedUnion("version", [LegacyV1Widget, CABRootSection]);
|
|
1305
1402
|
export {
|
|
1403
|
+
ARRAY_INDEX_STRING,
|
|
1306
1404
|
Api,
|
|
1307
1405
|
BorderRadius,
|
|
1308
1406
|
BorderStyle,
|
|
@@ -1338,6 +1436,7 @@ export {
|
|
|
1338
1436
|
HorizontalAlignment,
|
|
1339
1437
|
Identity,
|
|
1340
1438
|
LanguageKey,
|
|
1439
|
+
LegacyV1Widget,
|
|
1341
1440
|
NO_HTML,
|
|
1342
1441
|
ObjectFit,
|
|
1343
1442
|
QuantityInput,
|
|
@@ -1345,6 +1444,7 @@ export {
|
|
|
1345
1444
|
STATIC_ENDPOINTS,
|
|
1346
1445
|
SectionType,
|
|
1347
1446
|
Session,
|
|
1447
|
+
ShopConfig,
|
|
1348
1448
|
Spacing,
|
|
1349
1449
|
TextAlignment,
|
|
1350
1450
|
TextColorName,
|
|
@@ -1352,8 +1452,10 @@ export {
|
|
|
1352
1452
|
TiptapDocument,
|
|
1353
1453
|
TiptapParagraph,
|
|
1354
1454
|
TiptapText,
|
|
1455
|
+
UserConfig,
|
|
1355
1456
|
VariantSelector,
|
|
1356
1457
|
VerticalAlignment,
|
|
1458
|
+
WidgetSettings,
|
|
1357
1459
|
WidgetType,
|
|
1358
1460
|
amountToCents,
|
|
1359
1461
|
borderRadii,
|
|
@@ -1363,6 +1465,7 @@ export {
|
|
|
1363
1465
|
buttonFields,
|
|
1364
1466
|
buttonStyles,
|
|
1365
1467
|
checkForHTML,
|
|
1468
|
+
convertNumericObjects,
|
|
1366
1469
|
convertProductToStorefrontFormat,
|
|
1367
1470
|
convertToNodes,
|
|
1368
1471
|
convertVariantToStorefrontFormat,
|