yt-uikit 0.10.7-fixed-bundle-selector.0 → 0.10.7-fixed-bundle-selector.2

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.
@@ -21,16 +21,19 @@ export declare const getClaimableFreebieVariants: (product: any) => any[];
21
21
  export declare const getFirstClaimableVariantId: (product: any) => string | undefined;
22
22
  export declare const hasClaimableFreebieVariant: (product: any) => boolean;
23
23
  export declare const getFreebieProductTier: (product: any, freebieCouponTemplates?: any[]) => any;
24
- export declare const getSelectedCountForFreebieTier: (selectedProductIds: string[], tierId: number | undefined, freebieProducts: any[]) => number;
25
- export declare const isFreebieTierLimitReached: ({ product, selectedProductIds, freebieProducts, freebieCouponTemplates, fallbackMaxFreebies, fallbackLimitReached, }: {
24
+ type ProductSelectionKeyGetter = (product: any) => string;
25
+ export declare const getSelectedCountForFreebieTier: (selectedProductIds: string[], tierId: number | undefined, freebieProducts: any[], getProductSelectionKey?: ProductSelectionKeyGetter) => number;
26
+ export declare const isFreebieTierLimitReached: ({ product, selectedProductIds, freebieProducts, freebieCouponTemplates, fallbackMaxFreebies, fallbackLimitReached, getProductSelectionKey, }: {
26
27
  product: any;
27
28
  selectedProductIds: string[];
28
29
  freebieProducts: any[];
29
30
  freebieCouponTemplates?: any[] | undefined;
30
31
  fallbackMaxFreebies?: number | undefined;
31
32
  fallbackLimitReached?: boolean | undefined;
33
+ getProductSelectionKey?: ProductSelectionKeyGetter | undefined;
32
34
  }) => boolean;
33
35
  export declare const checkpointIncludesVariant: (checkpoint: any, variantGid?: string) => boolean;
34
36
  export declare const getTotalClaimableFreebies: (freebieProducts: any[], freebieCouponTemplates?: any[], fallbackMaxFreebies?: number) => number;
35
37
  export declare const processFreebieProduct: (product: any, freebieCouponTemplates?: any[], localVariantId?: string) => ProcessedFreebieProduct;
36
38
  export declare const getInitialVariantWithDealAmount: (availableVariants: any[], freebieCouponTemplates?: any[], claimAllowedVariants?: string[]) => string | undefined;
39
+ export {};
@@ -1,5 +1,11 @@
1
+ export type FreebieRewardContext = {
2
+ couponTemplateId?: string;
3
+ rewardKey?: string;
4
+ };
5
+ export declare const getFreebieRewardKey: (product: any) => string;
6
+ export declare const getFreebieRewardContext: (product: any) => FreebieRewardContext;
1
7
  /**
2
8
  * Shared utility function for adding freebie products to cart
3
9
  * Used by both FreebieClaimManager and FreebieClaimSection to avoid code duplication
4
10
  */
5
- export declare const addFreebieProductsToCart: (selectedProductIds: string[], freebieProductsInCart: any[], addFreebieToCart?: ((variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>) | undefined) => Promise<void>;
11
+ export declare const addFreebieProductsToCart: (selectedProductIds: string[], freebieProductsInCart: any[], addFreebieToCart?: ((variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>) | undefined) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.10.7-fixed-bundle-selector.0",
3
+ "version": "0.10.7-fixed-bundle-selector.2",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "rm -rf dist && tsc && rollup -c",