@kachingappz/bundles-js 0.3.7 → 1.0.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/README.md +70 -3
- package/dist/bundles-js.iife.js +129 -114
- package/dist/index.d.ts +1033 -3
- package/dist/index.js +980 -0
- package/dist/kaching-bundle-component/index.d.ts +1055 -0
- package/dist/kaching-bundle-component/index.js +1406 -0
- package/dist/react/index.cjs +228 -0
- package/dist/react/index.d.ts +1082 -0
- package/dist/react/index.js +1476 -0
- package/package.json +69 -11
- package/dist/bundles-js.js +0 -1202
|
@@ -0,0 +1,1055 @@
|
|
|
1
|
+
declare type AddPersonalisationModal = {
|
|
2
|
+
size: number;
|
|
3
|
+
roundness: number;
|
|
4
|
+
heading: string;
|
|
5
|
+
placeholderText: string;
|
|
6
|
+
lettersAllowed?: boolean;
|
|
7
|
+
numbersAllowed?: boolean;
|
|
8
|
+
characterLimitEnabled: boolean;
|
|
9
|
+
characterLimit: number;
|
|
10
|
+
imageSize: number;
|
|
11
|
+
textSize: number;
|
|
12
|
+
overlayColor: Color;
|
|
13
|
+
primaryTextColor: Color;
|
|
14
|
+
secondaryTextColor: Color;
|
|
15
|
+
buttonColor: Color;
|
|
16
|
+
buttonTextColor: Color;
|
|
17
|
+
errorColor: Color;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
declare type Badge = SimpleBadge | MostPopularBadge | CustomBadge | BorderBadge;
|
|
21
|
+
|
|
22
|
+
declare type BadgeAttachedTo = {
|
|
23
|
+
type: "block";
|
|
24
|
+
} | {
|
|
25
|
+
type: "dealBar";
|
|
26
|
+
dealBarId: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: "checkboxUpsell";
|
|
29
|
+
upsellId: string;
|
|
30
|
+
} | {
|
|
31
|
+
type: "barUpsell";
|
|
32
|
+
dealBarId: string;
|
|
33
|
+
upsellId: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare type BadgeColors = {
|
|
37
|
+
text: Color;
|
|
38
|
+
background: Color;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
declare type BadgeStyle = "simple" | "most-popular" | "custom";
|
|
42
|
+
|
|
43
|
+
declare type BaseBadge = {
|
|
44
|
+
id: string;
|
|
45
|
+
attachedTo: BadgeAttachedTo;
|
|
46
|
+
text: string;
|
|
47
|
+
colors: BadgeColors | null;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
declare interface BaseDealBar {
|
|
51
|
+
id: string;
|
|
52
|
+
dealBarType?: DealBarType;
|
|
53
|
+
title: string;
|
|
54
|
+
subtitle: string;
|
|
55
|
+
label: string;
|
|
56
|
+
badgeStyle: BadgeStyle;
|
|
57
|
+
badgeText: string;
|
|
58
|
+
badgeImageGID: string | null;
|
|
59
|
+
mediaImageGID: string | null;
|
|
60
|
+
featuredMediaGID?: string | null;
|
|
61
|
+
featuredProductGID?: string | null;
|
|
62
|
+
featuredImages?: DealBarFeaturedImage[];
|
|
63
|
+
freeGifts: FreeGift[];
|
|
64
|
+
freeGiftsSummary?: FreeGiftsSummary | null;
|
|
65
|
+
multipleGiftsSelectors?: MultipleGiftsSelector[];
|
|
66
|
+
upsells: Upsell[];
|
|
67
|
+
productPersonalisation: ProductPersonalisation | null;
|
|
68
|
+
highlights?: Highlights | null;
|
|
69
|
+
sellingPlanEnabled?: boolean;
|
|
70
|
+
sellingPlanGid?: string | null;
|
|
71
|
+
hideBehindScratchOff?: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare type BlockLayout = "vertical" | "horizontal" | "grid" | "plain";
|
|
75
|
+
|
|
76
|
+
declare type BlockVisibility = "all-products" | "excluded-products" | "selected-products" | "selected-collections";
|
|
77
|
+
|
|
78
|
+
declare type BorderBadge = BaseBadge & {
|
|
79
|
+
badgeType: "border";
|
|
80
|
+
position: "all" | "top" | "bottom" | "left" | "right";
|
|
81
|
+
thickness: number;
|
|
82
|
+
gap?: number;
|
|
83
|
+
textSize: number;
|
|
84
|
+
spacing: number;
|
|
85
|
+
repeatText: boolean;
|
|
86
|
+
delimiter?: string;
|
|
87
|
+
animated: boolean;
|
|
88
|
+
spinSpeed: number;
|
|
89
|
+
spinDirection: "clockwise" | "counterclockwise";
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
declare const BRAND_COLOR_KEYS: readonly ["primaryBackground", "secondaryBackground", "primaryText", "secondaryText", "border", "overlay", "primaryAccent", "primaryAccentText", "badgeBackground", "badgeText", "error"];
|
|
93
|
+
|
|
94
|
+
declare type BrandColorKey = (typeof BRAND_COLOR_KEYS)[number];
|
|
95
|
+
|
|
96
|
+
declare type BrandColors = Record<BrandColorKey, string>;
|
|
97
|
+
|
|
98
|
+
declare interface BundleDealBar extends BaseDealBar, ShowAsSoldOutFeature, RequireVariantSelectionFeature {
|
|
99
|
+
dealBarType: DealBarType.Bundle;
|
|
100
|
+
layout?: "horizontal" | "vertical";
|
|
101
|
+
quantitySelector: boolean;
|
|
102
|
+
showProductsOnlyWhenSelected?: boolean;
|
|
103
|
+
bundleProducts: BundleProduct[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare interface BundleProduct {
|
|
107
|
+
id: string;
|
|
108
|
+
productGID: string | null;
|
|
109
|
+
variantGIDs: string[] | null;
|
|
110
|
+
defaultVariantGID: string | null;
|
|
111
|
+
quantity: number;
|
|
112
|
+
discountType: DiscountType;
|
|
113
|
+
discountValue: string | number;
|
|
114
|
+
mediaImageGID: string | null;
|
|
115
|
+
title?: string;
|
|
116
|
+
hidePrice?: boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare interface BxgyDealBar extends BaseDealBar, ShowAsSoldOutFeature, RequireVariantSelectionFeature {
|
|
120
|
+
dealBarType: DealBarType.Bxgy;
|
|
121
|
+
buyQuantity: number;
|
|
122
|
+
buyDiscountType?: DiscountType;
|
|
123
|
+
buyDiscountValue?: string | number;
|
|
124
|
+
getQuantity: number;
|
|
125
|
+
getDiscountType?: DiscountType;
|
|
126
|
+
getDiscountValue?: string | number;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare type CheckboxUpsell = {
|
|
130
|
+
id: string;
|
|
131
|
+
productGID: string | null;
|
|
132
|
+
variantGIDs: string[] | null;
|
|
133
|
+
defaultVariantGID?: string | null;
|
|
134
|
+
mediaImageGID: string | null;
|
|
135
|
+
discountType: DiscountType;
|
|
136
|
+
discountValue: string | number;
|
|
137
|
+
title: string;
|
|
138
|
+
subtitle: string;
|
|
139
|
+
productSource?: "selected" | "complementary";
|
|
140
|
+
preselected: boolean;
|
|
141
|
+
showProductOptionsOnlyWhenSelected?: boolean;
|
|
142
|
+
matchQuantityWithDealBar: boolean;
|
|
143
|
+
quantitySelector?: boolean;
|
|
144
|
+
subscriptionEnabled?: boolean;
|
|
145
|
+
subscriptionType?: "deal" | "always";
|
|
146
|
+
badgeStyle?: BadgeStyle;
|
|
147
|
+
badgeText?: string;
|
|
148
|
+
badgeImageGID?: string | null;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
declare type CheckboxUpsells = {
|
|
152
|
+
title?: string;
|
|
153
|
+
upsells: CheckboxUpsell[];
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
declare type ChooseMultipleGiftsModal = {
|
|
157
|
+
buttonSize: number;
|
|
158
|
+
textSize: number;
|
|
159
|
+
overlayColor: Color;
|
|
160
|
+
priceColor: Color;
|
|
161
|
+
compareAtPriceColor: Color;
|
|
162
|
+
textColor: Color;
|
|
163
|
+
buttonColor: Color;
|
|
164
|
+
buttonTextColor: Color;
|
|
165
|
+
productPhotoSize: number;
|
|
166
|
+
heading: string;
|
|
167
|
+
subtitle: string;
|
|
168
|
+
buttonTextBeforeSelection: string;
|
|
169
|
+
buttonTextAfterSelection: string;
|
|
170
|
+
footerText: string;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
declare type ChooseProductModal = {
|
|
174
|
+
buttonSize: number;
|
|
175
|
+
textSize: number;
|
|
176
|
+
overlayColor: Color;
|
|
177
|
+
priceColor: Color;
|
|
178
|
+
compareAtPriceColor: Color;
|
|
179
|
+
textColor: Color;
|
|
180
|
+
buttonColor: Color;
|
|
181
|
+
buttonTextColor: Color;
|
|
182
|
+
productPhotoSize: number;
|
|
183
|
+
heading?: string;
|
|
184
|
+
subtitle?: string;
|
|
185
|
+
buttonText?: string;
|
|
186
|
+
showSearchField: boolean;
|
|
187
|
+
showVariantImageByDefault?: boolean;
|
|
188
|
+
defaultSortOption?: DefaultSortOption;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
declare type CollectionBreaks = {
|
|
192
|
+
visibility: CollectionBreaksVisibility;
|
|
193
|
+
excludedProducts?: {
|
|
194
|
+
id: string;
|
|
195
|
+
}[];
|
|
196
|
+
selectedProducts?: {
|
|
197
|
+
id: string;
|
|
198
|
+
}[];
|
|
199
|
+
selectedCollections?: {
|
|
200
|
+
id: string;
|
|
201
|
+
}[];
|
|
202
|
+
mediaImageGID: string | null;
|
|
203
|
+
buttonText: string;
|
|
204
|
+
buttonColor: Color;
|
|
205
|
+
productPhotoSize: number;
|
|
206
|
+
showProductName: boolean;
|
|
207
|
+
showChosenProductsPriceOnly?: boolean;
|
|
208
|
+
autoFillNotChosenItems: boolean;
|
|
209
|
+
requireItemSelectionEnabled: boolean;
|
|
210
|
+
requireItemSelectionAlert: RequireItemSelectionAlert | null;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
declare type CollectionBreaksVisibility = "excluded-products" | "selected-products" | "selected-collections" | "deal-products";
|
|
214
|
+
|
|
215
|
+
declare type Color = {
|
|
216
|
+
red: number;
|
|
217
|
+
green: number;
|
|
218
|
+
blue: number;
|
|
219
|
+
alpha: number;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
declare type Currency = {
|
|
223
|
+
currencyCode: string;
|
|
224
|
+
currencyRate: number;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
declare type CustomBadge = BaseBadge & {
|
|
228
|
+
badgeType: "custom";
|
|
229
|
+
imageGID: string | null;
|
|
230
|
+
size: number;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
declare type DealBar = QuantityBreakDealBar | BxgyDealBar | BundleDealBar | MixAndMatchDealBar | SkuDealBar;
|
|
234
|
+
|
|
235
|
+
declare interface DealBarFeaturedImage {
|
|
236
|
+
productGID: string;
|
|
237
|
+
mediaGID: string;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
declare type DealBarProgressiveGiftStyle = {
|
|
241
|
+
imageSize: number;
|
|
242
|
+
cornerRadius: number;
|
|
243
|
+
labelBackgroundColor: Color;
|
|
244
|
+
labelTextColor: Color;
|
|
245
|
+
labelTextSize: number;
|
|
246
|
+
textColor: Color;
|
|
247
|
+
selectedTextColor: Color;
|
|
248
|
+
textSize: number;
|
|
249
|
+
lockedLabelBackgroundColor: Color;
|
|
250
|
+
lockedLabelTextColor: Color;
|
|
251
|
+
lockedLabelTextSize: number;
|
|
252
|
+
lockedTextColor: Color;
|
|
253
|
+
lockedTextSize: number;
|
|
254
|
+
lockedIconColor: Color;
|
|
255
|
+
lockedMediaImageGID: string | null;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
declare enum DealBarType {
|
|
259
|
+
QuantityBreak = "quantity-break",
|
|
260
|
+
Bxgy = "bxgy",
|
|
261
|
+
Bundle = "bundle",
|
|
262
|
+
MixAndMatch = "mix-and-match",
|
|
263
|
+
Sku = "sku"
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
declare type DealBlock = {
|
|
267
|
+
id: string;
|
|
268
|
+
nanoId: string;
|
|
269
|
+
versionId?: string;
|
|
270
|
+
abTestVariantId?: string;
|
|
271
|
+
/** Durable variant letter (A-D). Display only -- never match on it. */
|
|
272
|
+
abTestVariantLetter?: string;
|
|
273
|
+
/** Half-open [lower, upper) share of the 0-99 session percentage space. */
|
|
274
|
+
abTestVariantRange?: [number, number];
|
|
275
|
+
/** @deprecated Superseded by abTestVariantRange. */
|
|
276
|
+
abTestVariantNumber?: number;
|
|
277
|
+
/** @deprecated Superseded by abTestVariantRange. */
|
|
278
|
+
abTestVariantsCount?: number;
|
|
279
|
+
/** @deprecated Superseded by abTestVariantRange. */
|
|
280
|
+
abTestTrafficAllocation?: number | null;
|
|
281
|
+
blockName: string;
|
|
282
|
+
discountName?: string;
|
|
283
|
+
blockTitle: string;
|
|
284
|
+
blockLayout: BlockLayout;
|
|
285
|
+
bundleBarsPerRow?: "2" | "3";
|
|
286
|
+
blockVisibility: BlockVisibility;
|
|
287
|
+
marketId?: number | null;
|
|
288
|
+
excludedMarketIds?: number[];
|
|
289
|
+
currency?: Currency | null;
|
|
290
|
+
excludeB2bCustomers: boolean;
|
|
291
|
+
excludePos?: boolean;
|
|
292
|
+
startTimestamp: number;
|
|
293
|
+
endTimestamp: number | null;
|
|
294
|
+
differentVariantsEnabled: boolean;
|
|
295
|
+
hideVariantPicker: boolean;
|
|
296
|
+
disableVariantOptionSync?: boolean;
|
|
297
|
+
hideUnavailableOptions?: boolean;
|
|
298
|
+
showPricesPerItem: boolean;
|
|
299
|
+
showBothPrices: boolean;
|
|
300
|
+
unitLabel?: string;
|
|
301
|
+
useProductCompareAtPrice: boolean;
|
|
302
|
+
showPricesWithoutDecimals?: boolean;
|
|
303
|
+
priceRounding: boolean;
|
|
304
|
+
priceRoundingPrecision: PriceRoundingPrecision;
|
|
305
|
+
updateNativePrice?: boolean;
|
|
306
|
+
updateNativePriceType?: "item" | "bundle";
|
|
307
|
+
showTotalPriceInAddToCartButton?: boolean;
|
|
308
|
+
skipCart: boolean;
|
|
309
|
+
showVariantsForSingleQuantity: boolean;
|
|
310
|
+
preselectedDealBarId: string | null;
|
|
311
|
+
cornerRadius: number;
|
|
312
|
+
spacing?: number;
|
|
313
|
+
selectedProductIds: number[];
|
|
314
|
+
selectedCollectionIds: number[];
|
|
315
|
+
excludedProductIds: number[];
|
|
316
|
+
excludedCollectionIds?: number[];
|
|
317
|
+
colors: {
|
|
318
|
+
background: Color;
|
|
319
|
+
selectedBackground: Color;
|
|
320
|
+
border: Color;
|
|
321
|
+
blockTitle: Color;
|
|
322
|
+
title: Color;
|
|
323
|
+
subtitle: Color;
|
|
324
|
+
price: Color;
|
|
325
|
+
fullPrice: Color;
|
|
326
|
+
labelBackground: Color;
|
|
327
|
+
label: Color;
|
|
328
|
+
badgeBackground: Color;
|
|
329
|
+
badgeText: Color;
|
|
330
|
+
freeGiftBackground: Color;
|
|
331
|
+
freeGiftText: Color;
|
|
332
|
+
freeGiftSelectedBackground: Color;
|
|
333
|
+
freeGiftSelectedText: Color;
|
|
334
|
+
upsellBackground: Color;
|
|
335
|
+
upsellText: Color;
|
|
336
|
+
upsellSelectedBackground: Color;
|
|
337
|
+
upsellSelectedText: Color;
|
|
338
|
+
progressiveGiftsLabelBackground?: Color;
|
|
339
|
+
primary?: Color;
|
|
340
|
+
pillBackground?: Color;
|
|
341
|
+
pillText?: Color;
|
|
342
|
+
pillBorder?: Color;
|
|
343
|
+
pillSelectedBackground?: Color;
|
|
344
|
+
pillSelectedText?: Color;
|
|
345
|
+
pillSelectedBorder?: Color;
|
|
346
|
+
};
|
|
347
|
+
fonts: {
|
|
348
|
+
fontFamily?: string | null;
|
|
349
|
+
blockTitle: Font;
|
|
350
|
+
title: Font;
|
|
351
|
+
subtitle: Font;
|
|
352
|
+
label: Font;
|
|
353
|
+
freeGift: Font;
|
|
354
|
+
upsell: Font;
|
|
355
|
+
unitLabel: Font;
|
|
356
|
+
pill?: Font;
|
|
357
|
+
};
|
|
358
|
+
dealBars: DealBar[];
|
|
359
|
+
badgesEnabled?: boolean;
|
|
360
|
+
badges?: Badge[];
|
|
361
|
+
swatchOptions?: SwatchOption[];
|
|
362
|
+
swatchSize?: number;
|
|
363
|
+
swatchShape?: SwatchShape;
|
|
364
|
+
showSelectedSwatchName?: boolean;
|
|
365
|
+
pillCornerRadius?: number | null;
|
|
366
|
+
imageSize?: number;
|
|
367
|
+
imageCornerRadius?: number;
|
|
368
|
+
defaultVariantsV2?: {
|
|
369
|
+
productGID: string | number;
|
|
370
|
+
dealBarId: string;
|
|
371
|
+
variantGIDs: (string | number | null)[];
|
|
372
|
+
}[];
|
|
373
|
+
collectionBreaksEnabled?: boolean;
|
|
374
|
+
collectionBreaks?: CollectionBreaks | null;
|
|
375
|
+
chooseProductModal?: ChooseProductModal | null;
|
|
376
|
+
mixAndMatchChooseProductModal?: MixAndMatchChooseProductModal | null;
|
|
377
|
+
chooseMultipleGiftsModal?: ChooseMultipleGiftsModal | null;
|
|
378
|
+
addPersonalisationModal?: AddPersonalisationModal | null;
|
|
379
|
+
timerEnabled: boolean;
|
|
380
|
+
timer: Timer | null;
|
|
381
|
+
scratchOffEnabled?: boolean;
|
|
382
|
+
scratchOff?: ScratchOff | null;
|
|
383
|
+
subscriptionsEnabled: boolean;
|
|
384
|
+
subscriptions: Subscriptions | null;
|
|
385
|
+
stickyAtcEnabled: boolean;
|
|
386
|
+
stickyAtc: StickyAtc | null;
|
|
387
|
+
progressiveGiftsEnabled: boolean;
|
|
388
|
+
progressiveGifts: ProgressiveGifts | null;
|
|
389
|
+
checkboxUpsellsEnabled: boolean | null;
|
|
390
|
+
checkboxUpsells: CheckboxUpsells | null;
|
|
391
|
+
savingsSummaryEnabled?: boolean;
|
|
392
|
+
savingsSummary?: SavingsSummary | null;
|
|
393
|
+
customStylesEnabled?: boolean;
|
|
394
|
+
shopCustomStyles?: string;
|
|
395
|
+
customStyles?: string;
|
|
396
|
+
lowStockAlertEnabled: boolean;
|
|
397
|
+
lowStockAlert: LowStockAlert | null;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
declare type DefaultSortOption = "relevance" | "newest-first" | "price-low-to-high" | "price-high-to-low";
|
|
401
|
+
|
|
402
|
+
declare type DiscountType = "default" | "percentage" | "amount" | "specific";
|
|
403
|
+
|
|
404
|
+
export declare const fetchKachingBundlesData: (storefront: HydrogenV2Storefront | ReactHydrogenStorefront | ShopifyStorefrontApiClient | StorefrontCredentials, { productId, dealBlockId, country, language, }: {
|
|
405
|
+
productId: string;
|
|
406
|
+
dealBlockId?: string;
|
|
407
|
+
country?: string;
|
|
408
|
+
language?: string;
|
|
409
|
+
}) => Promise<KachingBundlesData | null>;
|
|
410
|
+
|
|
411
|
+
declare type Font = {
|
|
412
|
+
size: string | number;
|
|
413
|
+
style: FontStyle;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
declare type FontStyle = "light" | "light-italic" | "regular" | "regular-italic" | "medium" | "medium-italic" | "bold" | "bold-italic";
|
|
417
|
+
|
|
418
|
+
declare type FreeGift = {
|
|
419
|
+
id: string;
|
|
420
|
+
giftType?: "product" | "shipping";
|
|
421
|
+
productGID: string | null;
|
|
422
|
+
variantGIDs: string[] | null;
|
|
423
|
+
mediaImageGID: string | null;
|
|
424
|
+
text: string;
|
|
425
|
+
imageSize: number;
|
|
426
|
+
quantity: number;
|
|
427
|
+
showPrice: boolean;
|
|
428
|
+
includeInCompareAt?: boolean;
|
|
429
|
+
applyOnlyForSubscriptions: boolean;
|
|
430
|
+
excludeRatesAboveThreshold?: boolean;
|
|
431
|
+
excludeRatesAboveThresholdAmount?: number;
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
declare type FreeGiftsSummary = {
|
|
435
|
+
enabled: boolean;
|
|
436
|
+
showImages: boolean;
|
|
437
|
+
title: string;
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
declare interface GlobalConfig {
|
|
441
|
+
shopifyDomain: string;
|
|
442
|
+
moneyFormat: string;
|
|
443
|
+
locale: string;
|
|
444
|
+
liquidLocale?: string;
|
|
445
|
+
country: string;
|
|
446
|
+
currencyRate: number;
|
|
447
|
+
marketCurrencyCode?: string;
|
|
448
|
+
marketId: number;
|
|
449
|
+
productId: number | null;
|
|
450
|
+
storefrontAccessToken: string | null;
|
|
451
|
+
includeSellingPlans: boolean;
|
|
452
|
+
includeAvailableQuantity: boolean;
|
|
453
|
+
customApiHost: string | null;
|
|
454
|
+
keepQuantityInput: boolean;
|
|
455
|
+
ignoreDeselect: boolean;
|
|
456
|
+
ignoreUnitPrice: boolean;
|
|
457
|
+
requireCustomerLogin: boolean;
|
|
458
|
+
abTestsRunning: boolean;
|
|
459
|
+
webPixel: boolean;
|
|
460
|
+
b2bCustomer: boolean;
|
|
461
|
+
isLoggedIn: boolean;
|
|
462
|
+
isDeprecatedAppEmbed?: boolean;
|
|
463
|
+
preview: boolean;
|
|
464
|
+
previewAlerts: boolean;
|
|
465
|
+
previewScratchOff: boolean;
|
|
466
|
+
defaultTranslations: {
|
|
467
|
+
"system.out_of_stock": string;
|
|
468
|
+
"system.invalid_variant": string;
|
|
469
|
+
"system.unavailable_option_value": string;
|
|
470
|
+
"system.confirm": string;
|
|
471
|
+
"system.cancel": string;
|
|
472
|
+
"system.free": string;
|
|
473
|
+
"system.search": string;
|
|
474
|
+
"system.quantity": string;
|
|
475
|
+
"system.subscription_plan": string;
|
|
476
|
+
"system.remove": string;
|
|
477
|
+
"system.sort_by": string;
|
|
478
|
+
"system.sort_relevance": string;
|
|
479
|
+
"system.sort_newest_first": string;
|
|
480
|
+
"system.sort_price_low_to_high": string;
|
|
481
|
+
"system.sort_price_high_to_low": string;
|
|
482
|
+
"system.no_results_found": string;
|
|
483
|
+
"system.no_results_description": string;
|
|
484
|
+
"system.clear_search": string;
|
|
485
|
+
"system.no_products_available": string;
|
|
486
|
+
"system.original_price": string;
|
|
487
|
+
"system.price": string;
|
|
488
|
+
"system.letters_only": string;
|
|
489
|
+
"system.numbers_only": string;
|
|
490
|
+
"system.select_variant_alert"?: string;
|
|
491
|
+
"system.select_variant_placeholder"?: string;
|
|
492
|
+
"system.personalisation_required_alert"?: string;
|
|
493
|
+
"system.deal_page_adding_to_cart"?: string;
|
|
494
|
+
"system.deal_page_add_to_cart_failed"?: string;
|
|
495
|
+
"system.deal_page_total"?: string;
|
|
496
|
+
"system.deal_page_tier_items"?: string;
|
|
497
|
+
"system.deal_page_sign_in_prompt"?: string;
|
|
498
|
+
"system.deal_page_sign_in"?: string;
|
|
499
|
+
"system.deal_page_unavailable"?: string;
|
|
500
|
+
"system.deal_page_full_price"?: string;
|
|
501
|
+
"system.deal_page_items_one"?: string;
|
|
502
|
+
"system.deal_page_items_other"?: string;
|
|
503
|
+
"system.deal_page_items_few"?: string;
|
|
504
|
+
"system.deal_page_items_many"?: string;
|
|
505
|
+
"system.deal_page_percentage_off"?: string;
|
|
506
|
+
"system.deal_page_price_each"?: string;
|
|
507
|
+
"system.deal_page_quantity_for_price"?: string;
|
|
508
|
+
"system.deal_page_save_up_to"?: string;
|
|
509
|
+
"system.deal_page_in_your_box"?: string;
|
|
510
|
+
"system.deal_page_in_your_box_count"?: string;
|
|
511
|
+
"system.deal_page_in_box_count"?: string;
|
|
512
|
+
"system.deal_page_remove_from_box"?: string;
|
|
513
|
+
"system.deal_page_remove_one"?: string;
|
|
514
|
+
"system.deal_page_box_full"?: string;
|
|
515
|
+
"system.deal_page_sold_out"?: string;
|
|
516
|
+
"system.deal_page_start_your_box"?: string;
|
|
517
|
+
"system.deal_page_not_a_full_box"?: string;
|
|
518
|
+
"system.deal_page_full_price_for_now"?: string;
|
|
519
|
+
"system.deal_page_percentage_unlocked"?: string;
|
|
520
|
+
"system.deal_page_box_of"?: string;
|
|
521
|
+
"system.deal_page_no_box_price"?: string;
|
|
522
|
+
"system.deal_page_track_box_full"?: string;
|
|
523
|
+
"system.deal_page_nudge_start_percentage_one"?: string;
|
|
524
|
+
"system.deal_page_nudge_start_percentage_other"?: string;
|
|
525
|
+
"system.deal_page_nudge_start_percentage_few"?: string;
|
|
526
|
+
"system.deal_page_nudge_start_percentage_many"?: string;
|
|
527
|
+
"system.deal_page_nudge_start_fixed_one"?: string;
|
|
528
|
+
"system.deal_page_nudge_start_fixed_other"?: string;
|
|
529
|
+
"system.deal_page_nudge_start_fixed_few"?: string;
|
|
530
|
+
"system.deal_page_nudge_start_fixed_many"?: string;
|
|
531
|
+
"system.deal_page_nudge_more_percentage_one"?: string;
|
|
532
|
+
"system.deal_page_nudge_more_percentage_other"?: string;
|
|
533
|
+
"system.deal_page_nudge_more_percentage_few"?: string;
|
|
534
|
+
"system.deal_page_nudge_more_percentage_many"?: string;
|
|
535
|
+
"system.deal_page_nudge_more_fixed_one"?: string;
|
|
536
|
+
"system.deal_page_nudge_more_fixed_other"?: string;
|
|
537
|
+
"system.deal_page_nudge_more_fixed_few"?: string;
|
|
538
|
+
"system.deal_page_nudge_more_fixed_many"?: string;
|
|
539
|
+
"system.deal_page_nudge_best_price"?: string;
|
|
540
|
+
"system.deal_page_nudge_box_full"?: string;
|
|
541
|
+
"system.deal_page_nudge_below_minimum_one"?: string;
|
|
542
|
+
"system.deal_page_nudge_below_minimum_other"?: string;
|
|
543
|
+
"system.deal_page_nudge_below_minimum_few"?: string;
|
|
544
|
+
"system.deal_page_nudge_below_minimum_many"?: string;
|
|
545
|
+
"system.deal_page_subtotal"?: string;
|
|
546
|
+
"system.deal_page_box_discount"?: string;
|
|
547
|
+
"system.deal_page_box_price_saving"?: string;
|
|
548
|
+
"system.deal_page_items_separately"?: string;
|
|
549
|
+
"system.deal_page_cheaper_separately"?: string;
|
|
550
|
+
"system.deal_page_add_item_to_start"?: string;
|
|
551
|
+
"system.deal_page_add_more_to_continue_one"?: string;
|
|
552
|
+
"system.deal_page_add_more_to_continue_other"?: string;
|
|
553
|
+
"system.deal_page_add_more_to_continue_few"?: string;
|
|
554
|
+
"system.deal_page_add_more_to_continue_many"?: string;
|
|
555
|
+
"system.deal_page_line_quantity"?: string;
|
|
556
|
+
"system.deal_page_view_box"?: string;
|
|
557
|
+
"system.deal_page_close"?: string;
|
|
558
|
+
"system.deal_page_back_to_products"?: string;
|
|
559
|
+
"system.deal_page_items_still_to_add_one"?: string;
|
|
560
|
+
"system.deal_page_items_still_to_add_other"?: string;
|
|
561
|
+
"system.deal_page_items_still_to_add_few"?: string;
|
|
562
|
+
"system.deal_page_items_still_to_add_many"?: string;
|
|
563
|
+
"system.deal_page_default_pricing_title"?: string;
|
|
564
|
+
"system.deal_page_default_pricing_note_percentage"?: string;
|
|
565
|
+
"system.deal_page_default_pricing_note_fixed"?: string;
|
|
566
|
+
"system.deal_page_default_box_title"?: string;
|
|
567
|
+
"system.deal_page_default_empty_title"?: string;
|
|
568
|
+
"system.deal_page_default_empty_note"?: string;
|
|
569
|
+
"system.deal_page_default_add_to_box"?: string;
|
|
570
|
+
"system.deal_page_default_add_box_to_cart"?: string;
|
|
571
|
+
"system.deal_page_items_range"?: string;
|
|
572
|
+
"system.deal_page_minimum"?: string;
|
|
573
|
+
"system.deal_page_tip_box_size"?: string;
|
|
574
|
+
"system.deal_page_tip_on_its_own"?: string;
|
|
575
|
+
"system.deal_page_about_this_price"?: string;
|
|
576
|
+
};
|
|
577
|
+
customSelectors: {
|
|
578
|
+
quantity: string | null;
|
|
579
|
+
addToCartButton: string | null;
|
|
580
|
+
variantPicker: string | null;
|
|
581
|
+
price?: string | null;
|
|
582
|
+
priceCompare?: string | null;
|
|
583
|
+
label?: string | null;
|
|
584
|
+
};
|
|
585
|
+
featureFlags: {
|
|
586
|
+
atc_total_price?: boolean;
|
|
587
|
+
cart_change_response_rewrite?: boolean;
|
|
588
|
+
cart_interceptor_dedupe_disabled?: boolean;
|
|
589
|
+
cart_interceptor_json_encoding?: boolean;
|
|
590
|
+
debug_cart_add?: boolean;
|
|
591
|
+
disable_nested_cart_lines?: boolean;
|
|
592
|
+
early_fetch_override?: boolean;
|
|
593
|
+
hide_missing_variants?: boolean;
|
|
594
|
+
initialize_with_form_variant?: boolean;
|
|
595
|
+
intercept_cart_request?: boolean;
|
|
596
|
+
legacy_saved_percentage?: boolean;
|
|
597
|
+
low_priority_scripts?: boolean;
|
|
598
|
+
native_swatches_disabled?: boolean;
|
|
599
|
+
observe_external_selling_plan?: boolean;
|
|
600
|
+
observe_form_selling_plan?: boolean;
|
|
601
|
+
percentage_cents_rounding_workaround?: boolean;
|
|
602
|
+
preserve_variant_selections?: boolean;
|
|
603
|
+
price_rounding_v2?: boolean;
|
|
604
|
+
propagate_line_properties?: boolean;
|
|
605
|
+
propagate_picker_option_changes?: boolean;
|
|
606
|
+
reinitialize_morphed_placeholders?: boolean;
|
|
607
|
+
remove_variant_change_delay?: boolean;
|
|
608
|
+
rever_non_returnable?: boolean;
|
|
609
|
+
show_single_variant_name?: boolean;
|
|
610
|
+
split_bxgy_items?: boolean;
|
|
611
|
+
split_quantity_break_items?: boolean;
|
|
612
|
+
storefront_metaobjects?: boolean;
|
|
613
|
+
pos_extension?: boolean;
|
|
614
|
+
variant_images?: boolean;
|
|
615
|
+
};
|
|
616
|
+
shopCustomStyles: string;
|
|
617
|
+
brandColors?: BrandColors | null;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
declare type Highlights = {
|
|
621
|
+
layout?: "vertical" | "horizontal";
|
|
622
|
+
items: string[];
|
|
623
|
+
showOnlyWhenSelected: boolean;
|
|
624
|
+
size: number;
|
|
625
|
+
iconColor: Color;
|
|
626
|
+
textColor: Color;
|
|
627
|
+
iconType?: "none" | "checkmark" | "dot" | "arrow" | "star" | "heart" | "thumbs-up" | "custom";
|
|
628
|
+
customIconGID?: string | null;
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
declare interface HydrogenV2Storefront {
|
|
632
|
+
query: (query: string, options?: {
|
|
633
|
+
variables?: Record<string, unknown>;
|
|
634
|
+
}) => Promise<unknown>;
|
|
635
|
+
i18n: {
|
|
636
|
+
country: string;
|
|
637
|
+
language: string;
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export declare interface KachingBundlesData {
|
|
642
|
+
config: GlobalConfig;
|
|
643
|
+
dealBlock: DealBlock;
|
|
644
|
+
product: Product;
|
|
645
|
+
otherProducts: Product[];
|
|
646
|
+
mediaImages: {
|
|
647
|
+
gid: string;
|
|
648
|
+
url: string;
|
|
649
|
+
}[];
|
|
650
|
+
collectionBreaksProducts: Product[];
|
|
651
|
+
translations: {
|
|
652
|
+
[key: string]: string;
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
declare type LowStockAlert = {
|
|
657
|
+
threshold: number;
|
|
658
|
+
message: string;
|
|
659
|
+
textColor: Color;
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
declare interface MixAndMatchChooseProductModal {
|
|
663
|
+
buttonSize: number;
|
|
664
|
+
textSize: number;
|
|
665
|
+
overlayColor: Color;
|
|
666
|
+
priceColor: Color;
|
|
667
|
+
compareAtPriceColor: Color;
|
|
668
|
+
textColor: Color;
|
|
669
|
+
buttonColor: Color;
|
|
670
|
+
buttonTextColor: Color;
|
|
671
|
+
productPhotoSize: number;
|
|
672
|
+
heading: string;
|
|
673
|
+
subtitle?: string;
|
|
674
|
+
buttonText: string;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
declare interface MixAndMatchDealBar extends BaseDealBar, ShowAsSoldOutFeature, RequireVariantSelectionFeature {
|
|
678
|
+
dealBarType: DealBarType.MixAndMatch;
|
|
679
|
+
discountType: DiscountType;
|
|
680
|
+
discountValue: string | number;
|
|
681
|
+
showProductsOnlyWhenSelected?: boolean;
|
|
682
|
+
showProductPrices?: boolean;
|
|
683
|
+
bundleProducts: MixAndMatchProduct[];
|
|
684
|
+
buttonText?: string;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
declare interface MixAndMatchProduct {
|
|
688
|
+
id: string;
|
|
689
|
+
productGID: string | null;
|
|
690
|
+
variantGIDs: string[] | null;
|
|
691
|
+
title?: string;
|
|
692
|
+
selectedProducts?: {
|
|
693
|
+
id: string;
|
|
694
|
+
variantGIDs: string[] | null;
|
|
695
|
+
}[];
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
declare type MostPopularBadge = BaseBadge & {
|
|
699
|
+
badgeType: "most-popular";
|
|
700
|
+
size: number;
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
declare type MultipleGiftsSelector = {
|
|
704
|
+
id: string;
|
|
705
|
+
products: {
|
|
706
|
+
id: string;
|
|
707
|
+
variantGIDs: string[] | null;
|
|
708
|
+
}[];
|
|
709
|
+
mediaImageGID: string | null;
|
|
710
|
+
imageSize: number;
|
|
711
|
+
textBeforeSelection: string;
|
|
712
|
+
textAfterSelection: string;
|
|
713
|
+
maxQuantity: number;
|
|
714
|
+
showPrice: boolean;
|
|
715
|
+
showProductPhotos?: boolean;
|
|
716
|
+
includeInCompareAt?: boolean;
|
|
717
|
+
applyOnlyForSubscriptions: boolean;
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
declare type PriceRoundingPrecision = ".99" | ".95" | ".90" | ".x9" | ".x0" | ".00";
|
|
721
|
+
|
|
722
|
+
declare interface Product {
|
|
723
|
+
id: number;
|
|
724
|
+
handle: string;
|
|
725
|
+
url: string | null;
|
|
726
|
+
availableForSale: boolean;
|
|
727
|
+
createdAt?: string;
|
|
728
|
+
title: string;
|
|
729
|
+
image: string | null;
|
|
730
|
+
selectedVariantId: number;
|
|
731
|
+
collectionIds: number[];
|
|
732
|
+
options: ProductOption[];
|
|
733
|
+
variants: Variant[];
|
|
734
|
+
requiresSellingPlan: boolean;
|
|
735
|
+
sellingPlans: SellingPlan[];
|
|
736
|
+
isNativeBundle: boolean | null;
|
|
737
|
+
metafields: {
|
|
738
|
+
text: string | null;
|
|
739
|
+
text2: string | null;
|
|
740
|
+
text3: string | null;
|
|
741
|
+
text4: string | null;
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
declare interface ProductOption {
|
|
746
|
+
defaultName: string;
|
|
747
|
+
name: string;
|
|
748
|
+
position: number;
|
|
749
|
+
optionValues: {
|
|
750
|
+
id: number;
|
|
751
|
+
defaultName: string;
|
|
752
|
+
name: string;
|
|
753
|
+
swatch: {
|
|
754
|
+
color: string | null;
|
|
755
|
+
image: string | null;
|
|
756
|
+
};
|
|
757
|
+
}[];
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
declare type ProductPersonalisation = {
|
|
761
|
+
id: string;
|
|
762
|
+
productGID: string | null;
|
|
763
|
+
variantGID: string | null;
|
|
764
|
+
pricePerItem: string;
|
|
765
|
+
pricePerItemUnitLabel: string;
|
|
766
|
+
compareAtPrice: string;
|
|
767
|
+
valueLabel?: string;
|
|
768
|
+
title: string;
|
|
769
|
+
subtitle: string;
|
|
770
|
+
mediaImageGID: string | null;
|
|
771
|
+
imageSize: number;
|
|
772
|
+
required: boolean;
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
declare type ProgressiveGift = {
|
|
776
|
+
id: string;
|
|
777
|
+
giftType: "product" | "shipping";
|
|
778
|
+
productGID: string | null;
|
|
779
|
+
variantGIDs: string[] | null;
|
|
780
|
+
mediaImageGID: string | null;
|
|
781
|
+
unlockAtBar: number;
|
|
782
|
+
unlockAtBarOnly?: boolean;
|
|
783
|
+
label: string;
|
|
784
|
+
labelCrossedOut: string;
|
|
785
|
+
title: string;
|
|
786
|
+
lockedTitle: string;
|
|
787
|
+
quantity: number;
|
|
788
|
+
differentVariantsEnabled: boolean;
|
|
789
|
+
applyOnlyForSubscriptions?: boolean;
|
|
790
|
+
excludeRatesAboveThreshold?: boolean;
|
|
791
|
+
excludeRatesAboveThresholdAmount?: number;
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
declare type ProgressiveGifts = {
|
|
795
|
+
layout: "horizontal" | "vertical" | "deal-bar";
|
|
796
|
+
title: string;
|
|
797
|
+
subtitle: string;
|
|
798
|
+
hideLockedGifts: boolean;
|
|
799
|
+
showLockedGiftLabels: boolean;
|
|
800
|
+
showLockedGiftProducts: boolean;
|
|
801
|
+
gifts: ProgressiveGift[];
|
|
802
|
+
titleColor: Color;
|
|
803
|
+
titleAlignment: "start" | "center" | "end";
|
|
804
|
+
titleStyle: FontStyle;
|
|
805
|
+
titleSize: number;
|
|
806
|
+
subtitleColor: Color;
|
|
807
|
+
subtitleAlignment: "start" | "center" | "end";
|
|
808
|
+
subtitleStyle: FontStyle;
|
|
809
|
+
subtitleSize: number;
|
|
810
|
+
inheritStyle: boolean;
|
|
811
|
+
style: ProgressiveGiftsStyle | null;
|
|
812
|
+
dealBarStyle?: DealBarProgressiveGiftStyle | null;
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
declare type ProgressiveGiftsStyle = {
|
|
816
|
+
imageSize: number;
|
|
817
|
+
cornerRadius: number;
|
|
818
|
+
labelBackgroundColor: Color;
|
|
819
|
+
labelTextColor: Color;
|
|
820
|
+
labelTextSize: number;
|
|
821
|
+
backgroundColor: Color;
|
|
822
|
+
borderColor: Color;
|
|
823
|
+
textColor: Color;
|
|
824
|
+
textSize: number;
|
|
825
|
+
lockedBackgroundColor: Color;
|
|
826
|
+
lockedBorderColor: Color;
|
|
827
|
+
lockedTextColor: Color;
|
|
828
|
+
lockedTextSize: number;
|
|
829
|
+
lockedIconColor: Color;
|
|
830
|
+
lockedMediaImageGID: string | null;
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
declare interface QuantityBreakDealBar extends BaseDealBar, ShowAsSoldOutFeature, RequireVariantSelectionFeature {
|
|
834
|
+
dealBarType?: DealBarType.QuantityBreak;
|
|
835
|
+
quantity: number | string;
|
|
836
|
+
discountType: DiscountType;
|
|
837
|
+
discountValue: string | number;
|
|
838
|
+
quantitySelector?: boolean;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare interface ReactHydrogenStorefront {
|
|
842
|
+
getStorefrontApiUrl: () => string;
|
|
843
|
+
getPublicTokenHeaders: () => Record<string, string>;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
declare type RequireItemSelectionAlert = {
|
|
847
|
+
text: string;
|
|
848
|
+
textColor: Color;
|
|
849
|
+
backgroundColor: Color;
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
declare interface RequireVariantSelectionFeature {
|
|
853
|
+
requireVariantSelectionEnabled?: boolean;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
declare type SavingsSummary = {
|
|
857
|
+
title: string;
|
|
858
|
+
backgroundColor: Color;
|
|
859
|
+
textColor: Color;
|
|
860
|
+
valueColor: Color;
|
|
861
|
+
borderColor: Color;
|
|
862
|
+
borderWidth: number;
|
|
863
|
+
borderRadius: number;
|
|
864
|
+
iconType: "none" | "checkmark" | "dot" | "arrow" | "star" | "heart" | "thumbs-up" | "custom";
|
|
865
|
+
customIconGID: string | null;
|
|
866
|
+
iconColor: Color;
|
|
867
|
+
titleAlignment: "start" | "center" | "end";
|
|
868
|
+
titleFont: Font;
|
|
869
|
+
includeGiftValue: boolean;
|
|
870
|
+
hideWhenZeroSavings: boolean;
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
declare type ScratchOff = {
|
|
874
|
+
title: string;
|
|
875
|
+
backgroundColor: Color;
|
|
876
|
+
titleColor: Color;
|
|
877
|
+
titleSize: number;
|
|
878
|
+
};
|
|
879
|
+
|
|
880
|
+
declare interface SellingPlan {
|
|
881
|
+
id: number;
|
|
882
|
+
name: string;
|
|
883
|
+
priceAdjustment: {
|
|
884
|
+
type: "percentage" | "fixed_amount" | "price";
|
|
885
|
+
value: number;
|
|
886
|
+
} | null;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
declare interface ShopifyStorefrontApiClient {
|
|
890
|
+
request: (query: string, options?: {
|
|
891
|
+
variables?: Record<string, unknown>;
|
|
892
|
+
}) => Promise<{
|
|
893
|
+
data: unknown;
|
|
894
|
+
}>;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
declare type ShowAsSoldOut = {
|
|
898
|
+
label: string;
|
|
899
|
+
opacity: number;
|
|
900
|
+
backgroundColor: Color;
|
|
901
|
+
textColor: Color;
|
|
902
|
+
textSize: number;
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
declare interface ShowAsSoldOutFeature {
|
|
906
|
+
showAsSoldOutEnabled: boolean;
|
|
907
|
+
showAsSoldOut: ShowAsSoldOut | null;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
declare type SimpleBadge = BaseBadge & {
|
|
911
|
+
badgeType: "simple";
|
|
912
|
+
textSize: number;
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
declare interface SkuDealBar extends BaseDealBar, ShowAsSoldOutFeature {
|
|
916
|
+
dealBarType: DealBarType.Sku;
|
|
917
|
+
productGID: string | null;
|
|
918
|
+
variantGIDs?: string[] | null;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
declare type StickyAtc = {
|
|
922
|
+
title: string;
|
|
923
|
+
buttonText: string;
|
|
924
|
+
backgroundColor: Color;
|
|
925
|
+
titleColor: Color;
|
|
926
|
+
buttonColor: Color;
|
|
927
|
+
buttonTextColor: Color;
|
|
928
|
+
titleFont: Font;
|
|
929
|
+
buttonFont: Font;
|
|
930
|
+
productPhotoSize: number;
|
|
931
|
+
buttonPadding: number;
|
|
932
|
+
productPhotoCornerRadius: number;
|
|
933
|
+
buttonCornerRadius: number;
|
|
934
|
+
sameSizeOnMobile?: boolean;
|
|
935
|
+
mobile?: StickyAtcMobileOverrides | null;
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
declare type StickyAtcMobileOverrides = {
|
|
939
|
+
titleFontSize: number;
|
|
940
|
+
buttonFontSize: number;
|
|
941
|
+
productPhotoSize: number;
|
|
942
|
+
buttonPadding: number;
|
|
943
|
+
productPhotoCornerRadius: number;
|
|
944
|
+
buttonCornerRadius: number;
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
export declare interface StorefrontApiClientInterface {
|
|
948
|
+
shopifyDomain: string;
|
|
949
|
+
query<T = unknown>(query: string, options?: {
|
|
950
|
+
variables?: Record<string, unknown>;
|
|
951
|
+
}): Promise<T>;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
export declare interface StorefrontCredentials {
|
|
955
|
+
shopifyDomain: string;
|
|
956
|
+
storefrontAccessToken: string;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
declare type Subscriptions = {
|
|
960
|
+
layout: SubscriptionsLayout;
|
|
961
|
+
position: "above" | "below";
|
|
962
|
+
title?: string;
|
|
963
|
+
subscribeTitle: string;
|
|
964
|
+
subscribeSubtitle: string;
|
|
965
|
+
oneTimeTitle: string;
|
|
966
|
+
oneTimeSubtitle: string;
|
|
967
|
+
subscribeByDefault: boolean;
|
|
968
|
+
showPrices?: boolean;
|
|
969
|
+
hideDealBarPrices?: boolean;
|
|
970
|
+
titleColor: Color;
|
|
971
|
+
subtitleColor: Color;
|
|
972
|
+
titleSize: number;
|
|
973
|
+
subtitleSize: number;
|
|
974
|
+
highlights?: Highlights | null;
|
|
975
|
+
};
|
|
976
|
+
|
|
977
|
+
declare type SubscriptionsLayout = "horizontal" | "vertical" | "checkbox" | "link";
|
|
978
|
+
|
|
979
|
+
declare type SwatchOption = {
|
|
980
|
+
localization?: {
|
|
981
|
+
language: string;
|
|
982
|
+
country: string;
|
|
983
|
+
};
|
|
984
|
+
name: string;
|
|
985
|
+
swatchType: SwatchType;
|
|
986
|
+
colors: {
|
|
987
|
+
name: string;
|
|
988
|
+
color: Color;
|
|
989
|
+
}[];
|
|
990
|
+
images: {
|
|
991
|
+
name: string;
|
|
992
|
+
mediaImageGID: string;
|
|
993
|
+
}[];
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
declare type SwatchShape = "square" | "rounded" | "circle";
|
|
997
|
+
|
|
998
|
+
declare type SwatchType = "default" | "colorDropdown" | "imageDropdown" | "productImageDropdown" | "mixedDropdown" | "colorButtons" | "imageButtons" | "productImageButtons" | "pillButtons";
|
|
999
|
+
|
|
1000
|
+
declare type Timer = {
|
|
1001
|
+
type: "duration" | "midnight" | "custom";
|
|
1002
|
+
minutes: number;
|
|
1003
|
+
endTimestamp: number | null;
|
|
1004
|
+
title: string;
|
|
1005
|
+
textColor: Color;
|
|
1006
|
+
backgroundColor: Color;
|
|
1007
|
+
titleAlignment: "start" | "center" | "end";
|
|
1008
|
+
titleStyle: FontStyle;
|
|
1009
|
+
titleSize: number;
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
declare type Upsell = {
|
|
1013
|
+
id: string;
|
|
1014
|
+
productSource: "selected" | "complementary";
|
|
1015
|
+
productGID: string | null;
|
|
1016
|
+
variantGIDs: string[] | null;
|
|
1017
|
+
defaultVariantGID?: string | null;
|
|
1018
|
+
mediaImageGID: string | null;
|
|
1019
|
+
discountType: DiscountType;
|
|
1020
|
+
discountValue: string | number;
|
|
1021
|
+
text: string;
|
|
1022
|
+
imageSize: number;
|
|
1023
|
+
quantity: number;
|
|
1024
|
+
preselected: boolean;
|
|
1025
|
+
visibleOnlyWhenDealBarSelected: boolean;
|
|
1026
|
+
subscriptionEnabled?: boolean;
|
|
1027
|
+
subscriptionType?: "deal" | "always";
|
|
1028
|
+
};
|
|
1029
|
+
|
|
1030
|
+
declare interface Variant {
|
|
1031
|
+
id: number;
|
|
1032
|
+
availableForSale: boolean;
|
|
1033
|
+
price: number;
|
|
1034
|
+
compareAtPrice: number | null;
|
|
1035
|
+
options: string[];
|
|
1036
|
+
imageId: number | null;
|
|
1037
|
+
image: string | null;
|
|
1038
|
+
sellingPlans: {
|
|
1039
|
+
id: number;
|
|
1040
|
+
price: number;
|
|
1041
|
+
compareAtPrice?: number;
|
|
1042
|
+
perDeliveryPrice?: number;
|
|
1043
|
+
}[];
|
|
1044
|
+
inventoryManagement: string | null;
|
|
1045
|
+
inventoryPolicy: string | null;
|
|
1046
|
+
inventoryQuantity: number | null;
|
|
1047
|
+
unitPriceMeasurement: {
|
|
1048
|
+
quantityValue: number;
|
|
1049
|
+
quantityUnit: string;
|
|
1050
|
+
referenceValue: number;
|
|
1051
|
+
referenceUnit: string;
|
|
1052
|
+
} | null;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
export { }
|