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