@liquidcommerce/elements-sdk 2.6.0-beta.2 → 2.6.0-beta.21
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 +7 -7
- package/dist/index.esm.js +11602 -11122
- package/dist/types/constants/core.constant.d.ts +11 -0
- package/dist/types/core/api/api-client.service.d.ts +15 -15
- package/dist/types/core/api/auth-client.service.d.ts +34 -23
- package/dist/types/core/api/http-client.service.d.ts +0 -1
- package/dist/types/core/client/client-action.service.d.ts +18 -12
- package/dist/types/core/client/client-config.service.d.ts +3 -0
- package/dist/types/core/command/base-command.service.d.ts +2 -2
- package/dist/types/core/command/common-command.service.d.ts +2 -1
- package/dist/types/core/google-tag-manager.service.d.ts +14 -11
- package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -12
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
- package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
- package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +16 -107
- package/dist/types/core/store/interfaces/core.interface.d.ts +7 -5
- package/dist/types/core/store/interfaces/product.interface.d.ts +12 -66
- package/dist/types/core/store/store.constant.d.ts +1 -1
- package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
- package/dist/types/elements-base-client.d.ts +1 -1
- package/dist/types/enums/cloud.enum.d.ts +19 -76
- package/dist/types/enums/core.enum.d.ts +25 -0
- package/dist/types/interfaces/api/address.interface.d.ts +28 -0
- package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
- package/dist/types/interfaces/api/checkout.interface.d.ts +213 -0
- package/dist/types/interfaces/api/product-list.interface.d.ts +30 -0
- package/dist/types/interfaces/api/product.interface.d.ts +106 -0
- package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
- package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
- package/dist/types/interfaces/core.interface.d.ts +7 -1
- package/dist/types/modules/address/address.command.d.ts +3 -3
- package/dist/types/modules/address/address.interface.d.ts +0 -7
- package/dist/types/modules/cart/cart.commands.d.ts +4 -5
- package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
- package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
- package/dist/types/modules/checkout/checkout.commands.d.ts +18 -9
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
- package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
- package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
- package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
- package/dist/types/modules/checkout/constant.d.ts +3 -0
- package/dist/types/modules/product/components/components.d.ts +2 -4
- package/dist/types/modules/product/product.commands.d.ts +3 -2
- package/dist/types/modules/product-list/components/index.d.ts +2 -0
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -2
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +6 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +1 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts +7 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +16 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-price-filter.components.d.ts +22 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +16 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +18 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +27 -5
- package/dist/types/modules/product-list/product-list.commands.d.ts +4 -2
- package/dist/types/modules/product-list/product-list.component.d.ts +13 -5
- package/dist/types/modules/product-list/product-list.interface.d.ts +77 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
- package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
- package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
- package/dist/types/static/icon/filter.icon.d.ts +2 -0
- package/dist/types/static/icon/index.d.ts +1 -0
- package/dist/types/utils/format.d.ts +0 -13
- package/docs/ACTIONS.md +13 -13
- package/docs/EVENTS.md +7 -7
- package/package.json +8 -9
- package/umd/elements.js +1 -1
- package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
- package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
- package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
- package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
- package/dist/types/interfaces/cloud/index.d.ts +0 -7
- package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
- package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
- package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
- package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
- package/dist/types/modules/product/utils/helpers.d.ts +0 -3
- package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
- package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
- package/dist/types/utils/helper.d.ts +0 -27
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { AddressType } from '@/enums';
|
|
2
|
-
import type { ICoreParams } from '@/interfaces/cloud/core.interface';
|
|
3
|
-
export interface IUserSessionOb {
|
|
4
|
-
values?: [string, string[]];
|
|
5
|
-
createdAt: Date;
|
|
6
|
-
}
|
|
7
|
-
export interface IUserSession {
|
|
8
|
-
key: string | null;
|
|
9
|
-
secret: string | null;
|
|
10
|
-
createdAt: Date;
|
|
11
|
-
}
|
|
12
|
-
export interface IUserAddressBase {
|
|
13
|
-
placesId: string;
|
|
14
|
-
one: string;
|
|
15
|
-
two: string;
|
|
16
|
-
city: string;
|
|
17
|
-
state: string;
|
|
18
|
-
zip: string;
|
|
19
|
-
country: string;
|
|
20
|
-
lat: number;
|
|
21
|
-
long: number;
|
|
22
|
-
}
|
|
23
|
-
export interface IUserAddress extends IUserAddressBase {
|
|
24
|
-
id: string;
|
|
25
|
-
createdAt: Date;
|
|
26
|
-
updatedAt: Date;
|
|
27
|
-
isDefault?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface ISavedCard {
|
|
30
|
-
brand: string | null;
|
|
31
|
-
country: string | null;
|
|
32
|
-
expMonth: number | null;
|
|
33
|
-
expYear: number | null;
|
|
34
|
-
last4: string | null;
|
|
35
|
-
funding: string | null;
|
|
36
|
-
}
|
|
37
|
-
export interface IUserPayment {
|
|
38
|
-
id: string;
|
|
39
|
-
type: string;
|
|
40
|
-
isDefault: boolean;
|
|
41
|
-
card?: ISavedCard;
|
|
42
|
-
createdAt: Date;
|
|
43
|
-
}
|
|
44
|
-
export interface IUser {
|
|
45
|
-
id: string;
|
|
46
|
-
email: string;
|
|
47
|
-
firstName: string | null;
|
|
48
|
-
lastName: string | null;
|
|
49
|
-
phone: string | null;
|
|
50
|
-
company: string | null;
|
|
51
|
-
profileImage: string | null;
|
|
52
|
-
birthDate: string | null;
|
|
53
|
-
createdAt: Date;
|
|
54
|
-
updatedAt: Date;
|
|
55
|
-
addresses: IUserAddress[];
|
|
56
|
-
savedPayments: IUserPayment[];
|
|
57
|
-
session: IUserSession;
|
|
58
|
-
}
|
|
59
|
-
export type BaseUser = Omit<IUser, 'session'>;
|
|
60
|
-
export interface IUserSessionParams extends ICoreParams {
|
|
61
|
-
id?: string;
|
|
62
|
-
email?: string;
|
|
63
|
-
firstName?: string | null;
|
|
64
|
-
lastName?: string | null;
|
|
65
|
-
phone?: string | null;
|
|
66
|
-
company?: string | null;
|
|
67
|
-
profileImage?: string | null;
|
|
68
|
-
birthDate?: string | null;
|
|
69
|
-
}
|
|
70
|
-
export interface IUserPaymentSession {
|
|
71
|
-
cartId?: string;
|
|
72
|
-
checkoutToken?: string;
|
|
73
|
-
customerId?: string;
|
|
74
|
-
customerEmail?: string;
|
|
75
|
-
}
|
|
76
|
-
export interface IPurgeResponse {
|
|
77
|
-
deleted: boolean;
|
|
78
|
-
message: string;
|
|
79
|
-
}
|
|
80
|
-
export interface IUserAddressParams extends ICoreParams {
|
|
81
|
-
customerId: string;
|
|
82
|
-
placesId?: string;
|
|
83
|
-
one?: string;
|
|
84
|
-
two?: string;
|
|
85
|
-
city?: string;
|
|
86
|
-
state?: string;
|
|
87
|
-
zip?: string;
|
|
88
|
-
country?: string;
|
|
89
|
-
lat?: number;
|
|
90
|
-
long?: number;
|
|
91
|
-
type: AddressType;
|
|
92
|
-
isDefault?: boolean;
|
|
93
|
-
}
|
|
94
|
-
export interface IUserPaymentParams extends ICoreParams {
|
|
95
|
-
customerId: string;
|
|
96
|
-
paymentMethodId: string;
|
|
97
|
-
}
|
|
98
|
-
export interface IUserPaymentAddParams extends IUserPaymentParams {
|
|
99
|
-
isDefault?: boolean;
|
|
100
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
|
|
2
|
-
import type { IAddressStore } from '@/core/store/interfaces/address.interface';
|
|
3
|
-
import type { ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from '@/core/store/interfaces/cart.interface';
|
|
4
|
-
import type { ICart, ICartItem, ICartRetailer, IRetailerFulfillments } from '@/interfaces/cloud';
|
|
5
|
-
export declare function buildCartItemStore(apiItem: ICartItem): ICartItemStore;
|
|
6
|
-
export declare function buildCartTotals(cart: ICart): ICartTotalsStore;
|
|
7
|
-
export declare function buildRetailerStore(retailer: ICartRetailer): IRetailerStore;
|
|
8
|
-
export declare function buildFulfillmentStore(fulfillment: IRetailerFulfillments, retailer: ICartRetailer): IRetailerFulfillmentStore;
|
|
9
|
-
export declare function cartDataForEventFromStore(cartStore: ICartStore, addressStore: IAddressStore): IBaseCartEventData;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { billingFormFields, customerFormFields, giftFormFields } from '@/modules/checkout/constant';
|
|
2
|
-
export type BillingFieldName = (typeof billingFormFields)[keyof typeof billingFormFields];
|
|
3
|
-
export type CustomerFieldName = (typeof customerFormFields)[keyof typeof customerFormFields];
|
|
4
|
-
export type GiftFieldName = (typeof giftFormFields)[keyof typeof giftFormFields];
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { IProductFulfillmentStore } from '@/core/store/interfaces/product.interface';
|
|
2
|
-
import { type FulfillmentType } from '@/enums';
|
|
3
|
-
export declare function fulfillmentAddress(address: IProductFulfillmentStore['retailerAddress'], selectedFulfillmentType: FulfillmentType): string;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IProductFulfillmentStore } from '@/core/store/interfaces/product.interface';
|
|
2
|
-
export interface RetailerStatus {
|
|
3
|
-
message: string | null;
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
openTime?: string;
|
|
6
|
-
closeTime?: string;
|
|
7
|
-
isClosed: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function getRetailerOffHours(fulfillment: IProductFulfillmentStore): RetailerStatus;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { IRetailerFulfillmentStore } from '@/core/store/interfaces/cart.interface';
|
|
2
|
-
export declare const shouldShowMinimumPurchaseAlert: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => boolean;
|
|
3
|
-
export declare const getMinimumPurchaseMessage: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => {
|
|
4
|
-
message: string;
|
|
5
|
-
type: "warning" | "info";
|
|
6
|
-
};
|
|
7
|
-
export declare const hasUnmetMinimum: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => boolean;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { CartEventEnum, CheckoutEventEnum } from 'enums';
|
|
2
|
-
import type { ICartEvent, ICheckoutEvents } from 'interfaces/cloud';
|
|
3
|
-
export type ElementEventLevel = 'success' | 'warning' | 'error';
|
|
4
|
-
export interface IElementsCartEvent {
|
|
5
|
-
type: CartEventEnum;
|
|
6
|
-
message: string;
|
|
7
|
-
level: ElementEventLevel;
|
|
8
|
-
}
|
|
9
|
-
export interface IElementsCheckoutEvents {
|
|
10
|
-
type: CheckoutEventEnum;
|
|
11
|
-
message: string;
|
|
12
|
-
level: ElementEventLevel;
|
|
13
|
-
}
|
|
14
|
-
export declare const includeCartEvents: (events: ICartEvent[], eventTypes: CartEventEnum[]) => ICartEvent[];
|
|
15
|
-
export declare const excludeCartEvents: (events: ICartEvent[], eventTypes: CartEventEnum[]) => ICartEvent[];
|
|
16
|
-
export declare const eventsForCart: (events: ICartEvent[]) => ICartEvent[];
|
|
17
|
-
export declare const hasCartAnyPromoCodeEvents: (events: ICartEvent[]) => boolean;
|
|
18
|
-
export declare const includeCheckoutEvents: (events: ICheckoutEvents[], eventTypes: CheckoutEventEnum[]) => ICheckoutEvents[];
|
|
19
|
-
export declare const excludeCheckoutEvents: (events: ICheckoutEvents[], eventTypes: CheckoutEventEnum[]) => ICheckoutEvents[];
|
|
20
|
-
export declare const eventsForCheckout: (events: ICheckoutEvents[]) => ICheckoutEvents[];
|
|
21
|
-
export declare const promoCodeCheckoutEvents: (events: ICheckoutEvents[]) => ICheckoutEvents[];
|
|
22
|
-
export declare const giftCardCheckoutEvents: (events: ICheckoutEvents[]) => ICheckoutEvents[];
|
|
23
|
-
export declare const hasAnyRetailerGiftCardRestriction: (events: ICheckoutEvents[]) => boolean;
|
|
24
|
-
export declare const transformEventsForCart: (events: ICartEvent[]) => IElementsCartEvent[];
|
|
25
|
-
export declare const transformEventsForCheckout: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];
|
|
26
|
-
export declare const transformPromoCodeCheckoutEvents: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];
|
|
27
|
-
export declare const transformGiftCardCheckoutEvents: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];
|