@liquidcommerce/elements-sdk 2.2.0-beta.8 → 2.2.0-beta.9

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.
@@ -83,10 +83,34 @@ export declare class GoogleTagManagerService {
83
83
  email?: string;
84
84
  birth_date?: string;
85
85
  customer_id?: string;
86
+ }, amounts?: {
87
+ subtotal?: number;
88
+ total_before_discounts?: number;
89
+ discounts?: number;
90
+ gift_cards?: number;
91
+ net_total?: number;
86
92
  }): void;
87
93
  addPaymentInfo(items: BaseItem[], paymentType?: string, coupon?: string): void;
88
- addPaymentInfoWithoutItems(value: number, paymentType?: string, coupon?: string): void;
89
- purchase(purchaseData: PurchaseData): void;
94
+ addPaymentInfoWithoutItems(value: number, paymentType?: string, coupon?: string, amounts?: {
95
+ subtotal?: number;
96
+ total_before_discounts?: number;
97
+ discounts?: number;
98
+ gift_cards?: number;
99
+ net_total?: number;
100
+ }): void;
101
+ purchase(purchaseData: PurchaseData & {
102
+ subtotal?: number;
103
+ total_before_discounts?: number;
104
+ discounts?: number;
105
+ gift_cards?: number;
106
+ net_total?: number;
107
+ }): void;
108
+ promoCodeAttempt(code: string): void;
109
+ promoCodeApplied(code: string, discountAmount?: number): void;
110
+ promoCodeFailed(code: string, reason?: string): void;
111
+ giftCardAttempt(code: string): void;
112
+ giftCardApplied(code: string, appliedAmount?: number): void;
113
+ giftCardFailed(code: string, reason?: string): void;
90
114
  increaseQuantity(item: BaseItem): void;
91
115
  decreaseQuantity(item: BaseItem): void;
92
116
  }
@@ -1,4 +1,4 @@
1
- import type { IAddressStore, ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentStore, ICheckoutStore, IProductSizeStore, IProductStore } from '@/core/store';
1
+ import type { IAddressStore, ICartPromoCodeStore, ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutGiftRecipientStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentStore, ICheckoutPromoCodeStore, ICheckoutReadyForSubmitStore, ICheckoutStore, ICheckoutStripeFormStatusStore, IProductSizeStore, IProductStore } from '@/core/store';
2
2
  import type { ComponentType } from '@/enums';
3
3
  import type { ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from './cart.interface';
4
4
  export interface IDrawerContentConfig {
@@ -23,7 +23,7 @@ export interface IPersistedStore {
23
23
  p: string;
24
24
  c: string;
25
25
  }
26
- export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof ICartStore['promoCode']}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customer.${keyof ICheckoutCustomerStore}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferencesStore}` | `checkout.payment.${keyof ICheckoutPaymentStore}` | `checkout.billing.${keyof ICheckoutBillingStore}` | `checkout.giftRecipient.${keyof ICheckoutStore['giftRecipient']}` | `checkout.giftCards.${string}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.readyForSubmit.${keyof ICheckoutStore['readyForSubmit']}` | `checkout.onDemandFulfillmentTipInfo.${string}` | `checkout.readyForSubmit.${string}` | `checkout.stripeFormStatus.${keyof ICheckoutStore['stripeFormStatus']}`;
26
+ export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCodeStore}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customer.${keyof ICheckoutCustomerStore}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferencesStore}` | `checkout.payment.${keyof ICheckoutPaymentStore}` | `checkout.billing.${keyof ICheckoutBillingStore}` | `checkout.giftRecipient.${keyof ICheckoutGiftRecipientStore}` | `checkout.giftCards.${string}` | `checkout.promoCode.${keyof ICheckoutPromoCodeStore}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.readyForSubmit.${keyof ICheckoutReadyForSubmitStore}` | `checkout.onDemandFulfillmentTipInfo.${string}` | `checkout.readyForSubmit.${string}` | `checkout.stripeFormStatus.${keyof ICheckoutStripeFormStatusStore}`;
27
27
  interface MiddlewareContext {
28
28
  action: string;
29
29
  payload: any;
@@ -22,7 +22,7 @@ export declare class CheckoutCommands extends BaseCommand {
22
22
  applyPromoCode(code: string): Promise<void>;
23
23
  clearPromoCodeError(): Promise<void>;
24
24
  removePromoCode(): Promise<void>;
25
- applyGiftCard(code?: string): Promise<void>;
25
+ applyGiftCard(code: string): Promise<void>;
26
26
  clearGiftCardError(): Promise<void>;
27
27
  removeGiftCard(code: string): Promise<void>;
28
28
  updateCustomerInfo(fieldName: CustomerFieldName, fieldValue: string): void;
@@ -1,8 +1,8 @@
1
1
  import { BaseComponent } from '@/core/base-component.service';
2
2
  import type { ICheckoutComponent } from '@/interfaces/configs';
3
3
  export declare class CheckoutDeliveryInformationComponent extends BaseComponent<null, ICheckoutComponent> {
4
- constructor();
5
4
  get hostClasses(): string[];
5
+ constructor();
6
6
  private hasOnDemandFulfillments;
7
7
  private handleDeliveryInstructionsChange;
8
8
  private handleFirstNameChange;
@@ -16,7 +16,8 @@ export declare function buildFormattedAddressString(address: {
16
16
  zip: string;
17
17
  country?: string;
18
18
  }): string;
19
- export declare function splitCategoryPath(catPath: string): {
19
+ export declare function capitalizeFirstLetter(text: string): string;
20
+ export declare function splitCategoryPath(catPath?: string): {
20
21
  category: string;
21
22
  category2: string;
22
23
  category3: string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LiquidCommerce Elements SDK",
4
4
  "license": "UNLICENSED",
5
5
  "author": "LiquidCommerce Team",
6
- "version": "2.2.0-beta.8",
6
+ "version": "2.2.0-beta.9",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",
@@ -84,16 +84,16 @@
84
84
  "@semantic-release/npm": "^12.0.2",
85
85
  "@semantic-release/release-notes-generator": "^14.1.0",
86
86
  "@types/core-js": "^2.5.8",
87
- "@types/node": "^24.5.2",
87
+ "@types/node": "^24.6.1",
88
88
  "conventional-changelog-cli": "^5.0.0",
89
89
  "husky": "^9.1.7",
90
90
  "process": "^0.11.10",
91
- "rollup": "^4.52.2",
91
+ "rollup": "^4.52.3",
92
92
  "rollup-obfuscator": "^4.1.1",
93
93
  "rollup-plugin-typescript2": "^0.36.0",
94
94
  "semantic-release": "^24.2.9",
95
95
  "ts-node": "^10.9.2",
96
- "typescript": "^5.9.2"
96
+ "typescript": "^5.9.3"
97
97
  },
98
98
  "engines": {
99
99
  "node": ">=20"