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