@liquidcommerce/elements-sdk 2.6.0-beta.41 → 2.6.0-beta.43
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 +1 -1
- package/dist/index.checkout.esm.js +6634 -6615
- package/dist/index.esm.js +11209 -11112
- package/dist/ssr-stub.checkout.esm.js +18 -0
- package/dist/ssr-stub.esm.js +269 -0
- package/dist/types/auto-initialize/shared-utils.d.ts +3 -1
- package/dist/types/clients/base.d.ts +4 -1
- package/dist/types/clients/builder.d.ts +2 -1
- package/dist/types/clients/checkout.d.ts +2 -10
- package/dist/types/clients/main.d.ts +2 -1
- package/dist/types/core/base-component.service.d.ts +2 -1
- package/dist/types/core/client/client-action.service.d.ts +1 -1
- package/dist/types/core/client/client-config.service.d.ts +1 -1
- package/dist/types/core/pubsub/pubsub.service.d.ts +0 -2
- package/dist/types/core/singleton-manager.service.d.ts +1 -1
- package/dist/types/index.checkout.d.ts +3 -2
- package/dist/types/index.checkout.umd.d.ts +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/interfaces/client.interface.d.ts +62 -0
- package/dist/types/interfaces/component.interface.d.ts +7 -0
- package/dist/types/interfaces/config.interface.d.ts +45 -0
- package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/global.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/product-list.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/product.interface.d.ts +1 -1
- package/dist/types/interfaces/injection.interface.d.ts +44 -0
- package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
- package/dist/types/modules/product/components/product-image-carousel.component.d.ts +3 -0
- package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +3 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +3 -1
- package/dist/types/modules/product-list/product-list.commands.d.ts +1 -1
- package/dist/types/modules/product-list/product-list.component.d.ts +1 -1
- package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
- package/dist/types/ssr/stub.checkout.d.ts +6 -0
- package/dist/types/ssr/stub.d.ts +10 -0
- package/dist/types/utils/dom-compat.d.ts +2 -0
- package/docs/v1/README.md +2 -2
- package/docs/v1/api/actions/address-actions.md +11 -11
- package/docs/v1/api/actions/cart-actions.md +13 -13
- package/docs/v1/api/actions/checkout-actions.md +23 -23
- package/docs/v1/api/actions/product-actions.md +6 -6
- package/docs/v1/api/client.md +11 -11
- package/docs/v1/api/ui-helpers.md +11 -11
- package/docs/v1/examples/advanced-patterns.md +1 -1
- package/docs/v1/examples/checkout-flow.md +1 -1
- package/docs/v1/getting-started/concepts.md +7 -7
- package/docs/v1/getting-started/installation.md +2 -2
- package/docs/v1/getting-started/quick-start.md +3 -3
- package/docs/v1/guides/address-component.md +11 -11
- package/docs/v1/guides/best-practices.md +14 -14
- package/docs/v1/guides/cart-component.md +23 -23
- package/docs/v1/guides/checkout-component.md +24 -24
- package/docs/v1/guides/events.md +812 -77
- package/docs/v1/guides/product-component.md +5 -5
- package/docs/v1/integration/nextjs.md +11 -2
- package/docs/v1/integration/react.md +3 -3
- package/docs/v1/integration/vanilla-js.md +1 -1
- package/docs/v1/integration/vue.md +24 -0
- package/docs/v1/reference/browser-support.md +9 -0
- package/docs/v1/reference/error-handling.md +2 -2
- package/docs/v1/reference/troubleshooting.md +10 -2
- package/package.json +13 -9
- package/dist/types/interfaces/core.interface.d.ts +0 -139
- package/docs/gitbook/actions.md +0 -160
- package/docs/gitbook/address.md +0 -48
- package/docs/gitbook/cart.md +0 -65
- package/docs/gitbook/checkout.md +0 -131
- package/docs/gitbook/events.md +0 -137
- package/docs/gitbook/overview.md +0 -166
- package/docs/gitbook/product.md +0 -64
- package/docs/gitbook/quick-start-guide.md +0 -393
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const ELEMENTS_ENV = {
|
|
2
|
+
DEVELOPMENT: 'development',
|
|
3
|
+
STAGING: 'staging',
|
|
4
|
+
PRODUCTION: 'production',
|
|
5
|
+
};
|
|
6
|
+
const DEBUG_MODE = {
|
|
7
|
+
NONE: 'none',
|
|
8
|
+
CONSOLE: 'console',
|
|
9
|
+
PANEL: 'panel',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const SSR_WARN = '[LiquidCommerce Checkout] This SDK is designed for the browser. ' + 'Calls made during SSR return null. The SDK will initialize on the client.';
|
|
13
|
+
async function ElementsCheckout(..._args) {
|
|
14
|
+
console.warn(SSR_WARN);
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { DEBUG_MODE, ELEMENTS_ENV, ElementsCheckout };
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
class SDKError extends Error {
|
|
2
|
+
constructor(message, reThrow = false) {
|
|
3
|
+
super(message);
|
|
4
|
+
this.name = 'SDKError';
|
|
5
|
+
this.isSdk = true;
|
|
6
|
+
this.reThrow = reThrow;
|
|
7
|
+
if (Error.captureStackTrace) {
|
|
8
|
+
Error.captureStackTrace(this, SDKError);
|
|
9
|
+
}
|
|
10
|
+
Object.setPrototypeOf(this, SDKError.prototype);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function isSDKError(error, source) {
|
|
14
|
+
if ((error === null || error === void 0 ? void 0 : error.isSdk) === true) {
|
|
15
|
+
if (error instanceof SDKError && error.reThrow) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
if (!error || typeof error !== 'object') {
|
|
21
|
+
return source ? isSDKSource(source) : false;
|
|
22
|
+
}
|
|
23
|
+
const message = String((error === null || error === void 0 ? void 0 : error.message) || '');
|
|
24
|
+
const hasSDKMessage = /liquidcommerce\s+elements/i.test(message);
|
|
25
|
+
const stack = String((error === null || error === void 0 ? void 0 : error.stack) || '');
|
|
26
|
+
const errorSource = (error === null || error === void 0 ? void 0 : error.source) || source || '';
|
|
27
|
+
const sdkPathPatterns = [
|
|
28
|
+
/@[/\\](?:core|modules|constants|enums|interfaces|utils|static)[/\\]/,
|
|
29
|
+
/[./]*[/\\](?:core|modules|constants|enums|interfaces|utils|static)[/\\]/,
|
|
30
|
+
/node_modules[/\\]@liquidcommerce[/\\]elements-sdk[/\\]/i,
|
|
31
|
+
/elements-sdk[/\\](?:src[/\\])?(?:core|modules)[/\\]/i,
|
|
32
|
+
/chunk-[a-z0-9]+.*elements/i,
|
|
33
|
+
];
|
|
34
|
+
const sdkClassPatterns = [
|
|
35
|
+
/\bElements\b(?!\w)/,
|
|
36
|
+
/\bElementsBuilder\b/,
|
|
37
|
+
/\bLiquidCommerceElements\b/,
|
|
38
|
+
/BaseComponent/,
|
|
39
|
+
/Elements(?:Base)?Client/,
|
|
40
|
+
/(?:Auth|Store|Command|ApiClient|Telemetry|FingerPrint|GoogleTagManager|ClientConfig|ThemeProvider|ComponentFactory|PubSub|SingletonManager|DebugPanel)Service/,
|
|
41
|
+
/(?:Cart|Product|Checkout|Address|ProductList|UI|Common)Commands/,
|
|
42
|
+
/(?:Product|Cart|Checkout|Address|ProductList).*Component/,
|
|
43
|
+
];
|
|
44
|
+
const sdkFilePatterns = [
|
|
45
|
+
/(?:service|commands|component)\.(?:ts|js)/,
|
|
46
|
+
/auto-initialize\/(?:main|checkout)\.(?:ts|js)/,
|
|
47
|
+
/elements-(?:base-|builder-)?client\.(?:ts|js)/,
|
|
48
|
+
];
|
|
49
|
+
const sdkDirPatterns = [
|
|
50
|
+
/elements-sdk[/\\]/i,
|
|
51
|
+
/modules[/\\](?:cart|product|checkout|address|product-list|theme-provider|ui-components)[/\\]/,
|
|
52
|
+
/core[/\\](?:auth|store|command|api-client|telemetry|fingerprint|google-tag-manager|client|component-factory|pubsub|singleton-manager|debug-panel)[/\\]/,
|
|
53
|
+
/@liquidcommerce[/\\]elements-sdk/i,
|
|
54
|
+
];
|
|
55
|
+
const hasSDKSource = isSDKSource(errorSource);
|
|
56
|
+
const hasSDKPathPattern = sdkPathPatterns.some((p) => p.test(stack));
|
|
57
|
+
const hasSDKClassPattern = sdkClassPatterns.some((p) => p.test(stack));
|
|
58
|
+
const hasSDKFilePattern = sdkFilePatterns.some((p) => p.test(stack));
|
|
59
|
+
const hasSDKDirPattern = sdkDirPatterns.some((p) => p.test(stack));
|
|
60
|
+
return hasSDKMessage || hasSDKSource || hasSDKPathPattern || hasSDKClassPattern || hasSDKFilePattern || hasSDKDirPattern;
|
|
61
|
+
}
|
|
62
|
+
function isSDKSource(source) {
|
|
63
|
+
if (!source || typeof source !== 'string') {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
const sdkSourcePatterns = [
|
|
67
|
+
/\/elements\.js$/i,
|
|
68
|
+
/\/index\.esm\.js$/i,
|
|
69
|
+
/@liquidcommerce\/elements-sdk/i,
|
|
70
|
+
/node_modules[/\\]@liquidcommerce[/\\]elements-sdk/i,
|
|
71
|
+
/@liquidcommerce[/\\]elements-sdk[/\\]/i,
|
|
72
|
+
/\/elements-sdk[/\\]/i,
|
|
73
|
+
/elements-sdk[/\\]src/i,
|
|
74
|
+
/elements[-.]?[a-z0-9]*\.js$/i,
|
|
75
|
+
/chunk.*elements/i,
|
|
76
|
+
/elements.*chunk/i,
|
|
77
|
+
/\?.*elements\.js/i,
|
|
78
|
+
/#.*elements\.js/i,
|
|
79
|
+
];
|
|
80
|
+
return sdkSourcePatterns.some((pattern) => pattern.test(source));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const ELEMENTS_ENV = {
|
|
84
|
+
DEVELOPMENT: 'development',
|
|
85
|
+
STAGING: 'staging',
|
|
86
|
+
PRODUCTION: 'production',
|
|
87
|
+
};
|
|
88
|
+
const ELEMENTS_ACTIONS_EVENT = {
|
|
89
|
+
CLIENT_READY: 'client_ready',
|
|
90
|
+
ADDRESS_UPDATED: 'address_updated',
|
|
91
|
+
ADDRESS_CLEARED: 'address_cleared',
|
|
92
|
+
ADDRESS_FAILED: 'address_failed',
|
|
93
|
+
PRODUCT_LOADED: 'product_loaded',
|
|
94
|
+
PRODUCT_QUANTITY_INCREASE: 'product_quantity_increase',
|
|
95
|
+
PRODUCT_QUANTITY_DECREASE: 'product_quantity_decrease',
|
|
96
|
+
PRODUCT_ADD_TO_CART: 'product_add_to_cart',
|
|
97
|
+
PRODUCT_SIZE_CHANGED: 'product_size_changed',
|
|
98
|
+
PRODUCT_FULFILLMENT_TYPE_CHANGED: 'product_fulfillment_type_changed',
|
|
99
|
+
PRODUCT_FULFILLMENT_CHANGED: 'product_fulfillment_changed',
|
|
100
|
+
CART_LOADED: 'cart_loaded',
|
|
101
|
+
CART_CLOSED: 'cart_closed',
|
|
102
|
+
CART_OPENED: 'cart_opened',
|
|
103
|
+
CART_UPDATED: 'cart_updated',
|
|
104
|
+
CART_FAILED: 'cart_failed',
|
|
105
|
+
CART_RESET: 'cart_reset',
|
|
106
|
+
CART_ITEM_ADDED: 'cart_item_added',
|
|
107
|
+
CART_ITEM_REMOVED: 'cart_item_removed',
|
|
108
|
+
CART_ITEM_QUANTITY_INCREASE: 'cart_item_quantity_increase',
|
|
109
|
+
CART_ITEM_QUANTITY_DECREASE: 'cart_item_quantity_decrease',
|
|
110
|
+
CART_ITEM_ENGRAVING_UPDATED: 'cart_item_engraving_updated',
|
|
111
|
+
CART_PROMO_CODE_APPLIED: 'cart_promo_code_applied',
|
|
112
|
+
CART_PROMO_CODE_REMOVED: 'cart_promo_code_removed',
|
|
113
|
+
CART_PROMO_CODE_FAILED: 'cart_promo_code_failed',
|
|
114
|
+
CART_PRODUCT_ADD_SUCCESS: 'cart_product_add_success',
|
|
115
|
+
CART_PRODUCT_ADD_FAILED: 'cart_product_add_failed',
|
|
116
|
+
INTERNAL_CART_TO_CHECKOUT: 'internal_cart_to_checkout',
|
|
117
|
+
CHECKOUT_LOADED: 'checkout_loaded',
|
|
118
|
+
CHECKOUT_OPENED: 'checkout_opened',
|
|
119
|
+
CHECKOUT_CLOSED: 'checkout_closed',
|
|
120
|
+
CHECKOUT_FAILED: 'checkout_failed',
|
|
121
|
+
CHECKOUT_IS_GIFT_TOGGLED: 'checkout_is_gift_toggled',
|
|
122
|
+
CHECKOUT_BILLING_SAME_AS_SHIPPING_TOGGLED: 'checkout_billing_same_as_shipping_toggled',
|
|
123
|
+
CHECKOUT_MARKETING_PREFERENCES_TOGGLED: 'checkout_marketing_preferences_toggled',
|
|
124
|
+
CHECKOUT_CUSTOMER_INFORMATION_UPDATED: 'checkout_customer_information_updated',
|
|
125
|
+
CHECKOUT_GIFT_INFORMATION_UPDATED: 'checkout_gift_information_updated',
|
|
126
|
+
CHECKOUT_BILLING_INFORMATION_UPDATED: 'checkout_billing_information_updated',
|
|
127
|
+
CHECKOUT_ITEM_REMOVED: 'checkout_item_removed',
|
|
128
|
+
CHECKOUT_ITEM_QUANTITY_INCREASE: 'checkout_item_quantity_increase',
|
|
129
|
+
CHECKOUT_ITEM_QUANTITY_DECREASE: 'checkout_item_quantity_decrease',
|
|
130
|
+
CHECKOUT_ITEM_ENGRAVING_UPDATED: 'checkout_item_engraving_updated',
|
|
131
|
+
CHECKOUT_TIP_UPDATED: 'checkout_tip_updated',
|
|
132
|
+
CHECKOUT_SUBMIT_STARTED: 'checkout_submit_started',
|
|
133
|
+
CHECKOUT_SUBMIT_COMPLETED: 'checkout_submit_completed',
|
|
134
|
+
CHECKOUT_SUBMIT_FAILED: 'checkout_submit_failed',
|
|
135
|
+
CHECKOUT_PROMO_CODE_APPLIED: 'checkout_promo_code_applied',
|
|
136
|
+
CHECKOUT_PROMO_CODE_REMOVED: 'checkout_promo_code_removed',
|
|
137
|
+
CHECKOUT_PROMO_CODE_FAILED: 'checkout_promo_code_failed',
|
|
138
|
+
CHECKOUT_GIFT_CARD_APPLIED: 'checkout_gift_card_applied',
|
|
139
|
+
CHECKOUT_GIFT_CARD_REMOVED: 'checkout_gift_card_removed',
|
|
140
|
+
CHECKOUT_GIFT_CARD_FAILED: 'checkout_gift_card_failed',
|
|
141
|
+
CHECKOUT_PRODUCT_ADD_SUCCESS: 'checkout_product_add_success',
|
|
142
|
+
CHECKOUT_PRODUCT_ADD_FAILED: 'checkout_product_add_failed',
|
|
143
|
+
};
|
|
144
|
+
const ELEMENTS_FORM = {
|
|
145
|
+
CUSTOMER: 'customer',
|
|
146
|
+
GIFT: 'gift',
|
|
147
|
+
BILLING: 'billing',
|
|
148
|
+
};
|
|
149
|
+
const COMPONENT_TYPE = {
|
|
150
|
+
DRAWER: 'drawer',
|
|
151
|
+
INPUT: 'input',
|
|
152
|
+
ENGRAVING_FORM: 'engraving-form',
|
|
153
|
+
ENGRAVING_VIEW: 'engraving-view',
|
|
154
|
+
BUTTONS_CART_OPEN: 'buttons-cart-open',
|
|
155
|
+
POWERED_BY: 'powered-by',
|
|
156
|
+
LCE_ELEMENT: 'lce-element',
|
|
157
|
+
PURCHASE_MIN_ALERT: 'purchase-min-alert',
|
|
158
|
+
ALERT: 'alert',
|
|
159
|
+
PROMO_CODE_TICKER: 'promo-code-ticker',
|
|
160
|
+
MODAL: 'modal',
|
|
161
|
+
ADDRESS: 'address',
|
|
162
|
+
ADDRESS_INPUT: 'address-input',
|
|
163
|
+
ADDRESS_DISPLAY: 'address-display',
|
|
164
|
+
PRODUCT: 'product',
|
|
165
|
+
PRODUCT_IMAGE_CAROUSEL: 'product-image-carousel',
|
|
166
|
+
PRODUCT_OPTIONS: 'product-options',
|
|
167
|
+
PRODUCT_INTERACTIONS: 'product-interactions',
|
|
168
|
+
PRODUCT_DESCRIPTION: 'product-description',
|
|
169
|
+
PRODUCT_RETAILERS: 'product-retailers',
|
|
170
|
+
PRODUCT_RETAILERS_CAROUSEL: 'product-retailers-carousel',
|
|
171
|
+
PRODUCT_RETAILERS_POPUP: 'product-retailers-popup',
|
|
172
|
+
PRODUCT_RETAILERS_POPUP_LIST: 'product-retailers-popup-list',
|
|
173
|
+
PRODUCT_PRICE: 'product-price',
|
|
174
|
+
PRODUCT_ADD_TO_CART_SECTION: 'product-add-to-cart-section',
|
|
175
|
+
PRODUCT_DRAWER: 'product-drawer',
|
|
176
|
+
PRODUCT_LOADING: 'product-loading',
|
|
177
|
+
PRODUCT_LIST: 'product-list',
|
|
178
|
+
PRODUCT_LIST_CARD: 'product-list-card',
|
|
179
|
+
PRODUCT_LIST_FILTERS: 'product-list-filters',
|
|
180
|
+
PRODUCT_LIST_SEARCH: 'product-list-search',
|
|
181
|
+
PRODUCT_LIST_CARD_LOADING: 'product-list-card-loading',
|
|
182
|
+
PRODUCT_LIST_RETAILERS: 'product-list-retailers',
|
|
183
|
+
PRODUCT_LIST_ENGRAVING_FORM: 'product-list-engraving-form',
|
|
184
|
+
PRODUCT_LIST_PRODUCT_PRE_CART: 'product-list-product-pre-cart',
|
|
185
|
+
CART: 'cart',
|
|
186
|
+
CART_RETAILER: 'cart-retailer',
|
|
187
|
+
CART_ITEM: 'cart-item',
|
|
188
|
+
CART_FOOTER: 'cart-footer',
|
|
189
|
+
CART_ITEM_QUANTITY_PRICE: 'cart-item-quantity-price',
|
|
190
|
+
CART_RETAILER_SUBTOTAL: 'cart-retailer-subtotal',
|
|
191
|
+
CART_PROMO_CODE: 'cart-promo-code',
|
|
192
|
+
CART_HEADER: 'cart-header',
|
|
193
|
+
CART_BODY: 'cart-body',
|
|
194
|
+
CART_FULFILLMENT: 'cart-fulfillment',
|
|
195
|
+
CHECKOUT: 'checkout',
|
|
196
|
+
CHECKOUT_INFORMATION: 'checkout-information',
|
|
197
|
+
CHECKOUT_STRIPE_HANDLER: 'checkout-stripe-handler',
|
|
198
|
+
CHECKOUT_STRIPE_FORM: 'checkout-stripe-form',
|
|
199
|
+
CHECKOUT_PAYMENT: 'checkout-payment',
|
|
200
|
+
CHECKOUT_PAYMENT_SUMMARY: 'checkout-payment-summary',
|
|
201
|
+
CHECKOUT_BILLING: 'checkout-billing',
|
|
202
|
+
CHECKOUT_ORDER_SUMMARY: 'checkout-order-summary',
|
|
203
|
+
CHECKOUT_PROMO_CODE: 'checkout-promo-code',
|
|
204
|
+
CHECKOUT_GIFT_CARDS: 'checkout-gift-cards',
|
|
205
|
+
CHECKOUT_AMOUNTS: 'checkout-amounts',
|
|
206
|
+
CHECKOUT_ITEMS: 'checkout-items',
|
|
207
|
+
CHECKOUT_COMPLETED: 'checkout-completed',
|
|
208
|
+
CHECKOUT_DELIVER_TO: 'checkout-deliver-to',
|
|
209
|
+
CHECKOUT_DELIVER_TO_SUMMARY: 'checkout-deliver-to-summary',
|
|
210
|
+
CHECKOUT_BUYER: 'checkout-buyer',
|
|
211
|
+
CHECKOUT_BUYER_SUMMARY: 'checkout-buyer-summary',
|
|
212
|
+
CHECKOUT_TIPS: 'checkout-tips',
|
|
213
|
+
CHECKOUT_PC_GC: 'checkout-pc-gc',
|
|
214
|
+
CHECKOUT_ITEM: 'checkout-item',
|
|
215
|
+
CHECKOUT_ITEM_QUANTITY: 'checkout-item-quantity',
|
|
216
|
+
CHECKOUT_PLACE_ORDER_BUTTON: 'checkout-place-order-button',
|
|
217
|
+
CHECKOUT_HEADER: 'checkout-header',
|
|
218
|
+
CHECKOUT_PRESALE_COUNTDOWN: 'checkout-presale-countdown',
|
|
219
|
+
CHECKOUT_PRESALE_EXPIRED: 'checkout-presale-expired',
|
|
220
|
+
CHECKOUT_SEND_AS_GIFT: 'checkout-send-as-gift',
|
|
221
|
+
};
|
|
222
|
+
const FULFILLMENT_TYPE = {
|
|
223
|
+
ON_DEMAND: 'onDemand',
|
|
224
|
+
SHIPPING: 'shipping',
|
|
225
|
+
};
|
|
226
|
+
const DEBUG_MODE = {
|
|
227
|
+
NONE: 'none',
|
|
228
|
+
CONSOLE: 'console',
|
|
229
|
+
PANEL: 'panel',
|
|
230
|
+
};
|
|
231
|
+
const CART_EVENT_TYPE = {
|
|
232
|
+
GENERIC: 'generic',
|
|
233
|
+
PROMO_CODE: 'promo-code',
|
|
234
|
+
};
|
|
235
|
+
const CART_EVENT_LEVEL = {
|
|
236
|
+
SUCCESS: 'success',
|
|
237
|
+
WARNING: 'warning',
|
|
238
|
+
ERROR: 'error',
|
|
239
|
+
};
|
|
240
|
+
const CHECKOUT_EVENT_TYPE = {
|
|
241
|
+
GENERIC: 'generic',
|
|
242
|
+
PROMO_CODE: 'promo-code',
|
|
243
|
+
GIFT_CARD: 'gift-card',
|
|
244
|
+
};
|
|
245
|
+
const CHECKOUT_EVENT_LEVEL = {
|
|
246
|
+
SUCCESS: 'success',
|
|
247
|
+
WARNING: 'warning',
|
|
248
|
+
ERROR: 'error',
|
|
249
|
+
};
|
|
250
|
+
const DISPLAY_MODE = {
|
|
251
|
+
MODAL: 'modal',
|
|
252
|
+
DRAWER: 'drawer',
|
|
253
|
+
};
|
|
254
|
+
const NAVIGATION_SOURCE = {
|
|
255
|
+
PRODUCT_CARD: 'productCard',
|
|
256
|
+
ADD_TO_CART_DRAWER: 'addToCartDrawer',
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
const SSR_WARN = '[LiquidCommerce Elements] This SDK is designed for the browser. ' + 'Calls made during SSR return null. The SDK will initialize on the client.';
|
|
260
|
+
async function Elements(..._args) {
|
|
261
|
+
console.warn(SSR_WARN);
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
async function ElementsBuilder(..._args) {
|
|
265
|
+
console.warn(SSR_WARN);
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export { CART_EVENT_LEVEL, CART_EVENT_TYPE, CHECKOUT_EVENT_LEVEL, CHECKOUT_EVENT_TYPE, COMPONENT_TYPE, DEBUG_MODE, DISPLAY_MODE, ELEMENTS_ACTIONS_EVENT, ELEMENTS_ENV, ELEMENTS_FORM, Elements, ElementsBuilder, FULFILLMENT_TYPE, NAVIGATION_SOURCE, SDKError, isSDKError };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IInjectedComponent } from '@/interfaces/component.interface';
|
|
2
|
+
import type { ILiquidCommerceElementsDevelopmentConfig } from '@/interfaces/config.interface';
|
|
3
|
+
import type { IInjectCheckoutParams } from '@/interfaces/injection.interface';
|
|
2
4
|
export declare const SHARED_ATTR: {
|
|
3
5
|
readonly SCRIPT: {
|
|
4
6
|
readonly MAIN: "data-liquid-commerce-elements";
|
|
@@ -16,7 +16,9 @@ import { LoggerFactory } from '@/core/logger/logger-factory';
|
|
|
16
16
|
import { StoreService } from '@/core/store/store.service';
|
|
17
17
|
import { TelemetryService } from '@/core/telemetry/telemetry.service';
|
|
18
18
|
import { type ComponentType } from '@/enums';
|
|
19
|
-
import type {
|
|
19
|
+
import type { ILiquidCommerceElementsActions } from '@/interfaces/client.interface';
|
|
20
|
+
import type { IInjectedComponent } from '@/interfaces/component.interface';
|
|
21
|
+
import type { IInjectProductElement, IInjectProductListFiltersParams, IInjectProductListParams, IInjectProductListSearchParams, IProcessInjectElementParams } from '@/interfaces/injection.interface';
|
|
20
22
|
import { ThemeProviderService } from '@/modules/theme-provider/theme-provider.service';
|
|
21
23
|
export declare abstract class ElementsBaseClient {
|
|
22
24
|
protected readonly authClient: AuthClientService;
|
|
@@ -51,6 +53,7 @@ export declare abstract class ElementsBaseClient {
|
|
|
51
53
|
protected ensureModalExists(): void;
|
|
52
54
|
protected ensureAllComponentsRegistered(): void;
|
|
53
55
|
protected createInjectedComponentWrapper(containerId: string, type: ComponentType, element: HTMLElement): IInjectedComponent;
|
|
56
|
+
destroy(): void;
|
|
54
57
|
protected rerenderInjectedComponentsByType(type: ComponentType): void;
|
|
55
58
|
protected isElementsEnabled(): boolean;
|
|
56
59
|
protected injectDisabledElementsError(containerId: string, componentName: ComponentType): void;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type { ILiquidCommerceElementsBuilderClient
|
|
1
|
+
import type { ILiquidCommerceElementsBuilderClient } from '@/interfaces/client.interface';
|
|
2
|
+
import type { ILiquidCommerceElementsBuilderConfig } from '@/interfaces/config.interface';
|
|
2
3
|
export declare function ElementsBuilder(apiKey: string, config: ILiquidCommerceElementsBuilderConfig): Promise<ILiquidCommerceElementsBuilderClient | null>;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import type { IElementsCheckoutClient } from '@/interfaces/client.interface';
|
|
2
|
+
import type { ILiquidCommerceElementsCheckoutClientConfig } from '@/interfaces/config.interface';
|
|
3
3
|
import '@/modules/theme-provider/styles/register-styles';
|
|
4
4
|
import '@/modules/checkout/styles/register-styles';
|
|
5
|
-
export interface IElementsCheckoutActions extends Omit<ICheckoutActions, 'openCheckout' | 'closeCheckout' | 'toggleCheckout'> {
|
|
6
|
-
}
|
|
7
|
-
export interface IElementsCheckoutClient {
|
|
8
|
-
injectCheckout: (params: IInjectCheckoutParams) => Promise<IInjectedComponent | null>;
|
|
9
|
-
actions: {
|
|
10
|
-
checkout: IElementsCheckoutActions;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
5
|
export declare function ElementsCheckout(apiKey: string, config: ILiquidCommerceElementsCheckoutClientConfig): Promise<IElementsCheckoutClient | null>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type { ILiquidCommerceElementsClient
|
|
1
|
+
import type { ILiquidCommerceElementsClient } from '@/interfaces/client.interface';
|
|
2
|
+
import type { ILiquidCommerceElementsConfig } from '@/interfaces/config.interface';
|
|
2
3
|
export declare function Elements(apiKey: string, config: ILiquidCommerceElementsConfig): Promise<ILiquidCommerceElementsClient | null>;
|
|
@@ -7,6 +7,7 @@ import { TelemetryService } from '@/core/telemetry/telemetry.service';
|
|
|
7
7
|
import type { ComponentType } from '@/enums';
|
|
8
8
|
import type { ConfigsKeyType, ConfigsType } from '@/interfaces/configs';
|
|
9
9
|
import { ThemeProviderService } from '@/modules/theme-provider/theme-provider.service';
|
|
10
|
+
import { SafeHTMLElement } from '@/utils/dom-compat';
|
|
10
11
|
import { CommandService } from './command/command.service';
|
|
11
12
|
export interface IBaseComponentConfig {
|
|
12
13
|
type: ComponentType;
|
|
@@ -25,7 +26,7 @@ export interface IOnStoreChanged {
|
|
|
25
26
|
value: any;
|
|
26
27
|
oldValue: any;
|
|
27
28
|
}
|
|
28
|
-
export declare abstract class BaseComponent<TParams = Record<string, any>, TConfig = ConfigsType> extends
|
|
29
|
+
export declare abstract class BaseComponent<TParams = Record<string, any>, TConfig = ConfigsType> extends SafeHTMLElement {
|
|
29
30
|
protected readonly store: StoreService;
|
|
30
31
|
protected readonly commands: CommandService;
|
|
31
32
|
protected readonly themeProvider: ThemeProviderService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ILiquidCommerceElementsActions } from '@/interfaces/
|
|
1
|
+
import type { ILiquidCommerceElementsActions } from '@/interfaces/client.interface';
|
|
2
2
|
export declare class ClientActionService {
|
|
3
3
|
private readonly productActionService;
|
|
4
4
|
private readonly addressActionService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DebugMode, type ElementsEnv } from '@/enums';
|
|
2
|
+
import type { IClientCustomThemeConfig, IElementsProxyConfig, ILiquidCommerceElementsCheckoutConfig } from '@/interfaces/config.interface';
|
|
2
3
|
import type { IPromoTicker } from '@/interfaces/configs';
|
|
3
|
-
import type { IClientCustomThemeConfig, IElementsProxyConfig, ILiquidCommerceElementsCheckoutConfig } from '@/interfaces/core.interface';
|
|
4
4
|
export type DeviceType = 'desktop' | 'tablet' | 'mobile';
|
|
5
5
|
export interface IClientConfigs {
|
|
6
6
|
apiKey: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { IElementsActionsEventsMap, IElementsFormsEventsMap, SpecificActionEvent, SpecificFormEvent } from '@/core/pubsub/interfaces/core.interface';
|
|
2
2
|
export declare class PubSubService {
|
|
3
3
|
private readonly logger;
|
|
4
|
-
private clientReadyEvent;
|
|
5
4
|
constructor();
|
|
6
5
|
private readonly eventPrefix;
|
|
7
6
|
static getInstance(): PubSubService;
|
|
@@ -9,5 +8,4 @@ export declare class PubSubService {
|
|
|
9
8
|
publishForm<K extends SpecificFormEvent>(eventType: K, data: IElementsFormsEventsMap[K]): void;
|
|
10
9
|
private publishSpecific;
|
|
11
10
|
private dispatchNativeEvents;
|
|
12
|
-
private setupClientReadyBuffering;
|
|
13
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IClientConfigs } from '@/core/client/client-config.service';
|
|
2
|
-
import type { LiquidCommerceElementsBuilderClientConstructor, LiquidCommerceElementsClientConstructor } from '@/interfaces/
|
|
2
|
+
import type { LiquidCommerceElementsBuilderClientConstructor, LiquidCommerceElementsClientConstructor } from '@/interfaces/client.interface';
|
|
3
3
|
export declare class SingletonManager {
|
|
4
4
|
private static clientConstructor;
|
|
5
5
|
private static regularClientInstances;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/clients/checkout';
|
|
2
1
|
import { ElementsCheckout } from '@/clients/checkout';
|
|
3
2
|
import type { DebugMode, ElementsEnv } from '@/enums';
|
|
4
3
|
import { DEBUG_MODE, ELEMENTS_ENV } from '@/enums';
|
|
5
|
-
import type {
|
|
4
|
+
import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/interfaces/client.interface';
|
|
5
|
+
import type { IInjectedComponent } from '@/interfaces/component.interface';
|
|
6
|
+
import type { ILiquidCommerceElementsCheckoutClientConfig } from '@/interfaces/config.interface';
|
|
6
7
|
export { DEBUG_MODE, ELEMENTS_ENV, ElementsCheckout };
|
|
7
8
|
export type { DebugMode, ElementsEnv, IElementsCheckoutActions, IElementsCheckoutClient, IInjectedComponent, ILiquidCommerceElementsCheckoutClientConfig, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IElementsCheckoutActions, IElementsCheckoutClient } from '
|
|
1
|
+
import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/interfaces/client.interface';
|
|
2
2
|
import { ElementsCheckout } from './clients/checkout';
|
|
3
3
|
export { ElementsCheckout };
|
|
4
4
|
export type { IElementsCheckoutActions, IElementsCheckoutClient };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,5 +2,8 @@ export * from './clients/builder';
|
|
|
2
2
|
export * from './clients/main';
|
|
3
3
|
export * from './core/sdk-error-handler';
|
|
4
4
|
export * from './enums';
|
|
5
|
+
export * from './interfaces/client.interface';
|
|
6
|
+
export * from './interfaces/component.interface';
|
|
7
|
+
export * from './interfaces/config.interface';
|
|
5
8
|
export * from './interfaces/configs';
|
|
6
|
-
export * from './interfaces/
|
|
9
|
+
export * from './interfaces/injection.interface';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { IAddressActions } from '@/core/client/actions/client-address-action.service';
|
|
2
|
+
import type { ICartActions } from '@/core/client/actions/client-cart-action.service';
|
|
3
|
+
import type { ICheckoutActions } from '@/core/client/actions/client-checkout-action.service';
|
|
4
|
+
import type { IProductActions } from '@/core/client/actions/client-product-action.service';
|
|
5
|
+
import type { IClientConfigs } from '@/core/client/client-config.service';
|
|
6
|
+
import type { IAddressOptions } from '@/modules/address/address.interface';
|
|
7
|
+
import type { IInjectedComponent } from './component.interface';
|
|
8
|
+
import type { UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from './configs';
|
|
9
|
+
import type { IBuilderInjectElementParams, IInjectCheckoutBuilderParams, IInjectCheckoutParams, IInjectProductElement, IInjectProductListFiltersParams, IInjectProductListParams, IInjectProductListSearchParams } from './injection.interface';
|
|
10
|
+
export interface ILiquidCommerceElementsUIMethod {
|
|
11
|
+
cartButton(containerId: string, showItemsCount?: boolean): void;
|
|
12
|
+
floatingCartButton(showItemsCount?: boolean): void;
|
|
13
|
+
cartSubtotal(elementId: string): void;
|
|
14
|
+
cartItemsCount(elementId: string, options?: {
|
|
15
|
+
hideZero: boolean;
|
|
16
|
+
}): void;
|
|
17
|
+
}
|
|
18
|
+
export interface ILiquidCommerceElementsActions {
|
|
19
|
+
product: IProductActions;
|
|
20
|
+
address: IAddressActions;
|
|
21
|
+
cart: ICartActions;
|
|
22
|
+
checkout: ICheckoutActions;
|
|
23
|
+
}
|
|
24
|
+
export interface IElementsCheckoutActions extends Omit<ICheckoutActions, 'openCheckout' | 'closeCheckout' | 'toggleCheckout'> {
|
|
25
|
+
}
|
|
26
|
+
export interface IElementsCheckoutClient {
|
|
27
|
+
injectCheckout: (params: IInjectCheckoutParams) => Promise<IInjectedComponent | null>;
|
|
28
|
+
actions: {
|
|
29
|
+
checkout: IElementsCheckoutActions;
|
|
30
|
+
};
|
|
31
|
+
destroy(): void;
|
|
32
|
+
}
|
|
33
|
+
export interface ILiquidCommerceElementsBuilderClient {
|
|
34
|
+
updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
|
|
35
|
+
updateProductComponent(configs: UpdateProductComponent): Promise<void>;
|
|
36
|
+
updateAddressComponent(configs: UpdateAddressComponent): void;
|
|
37
|
+
updateCartComponent(configs: UpdateCartComponent): void;
|
|
38
|
+
updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
|
|
39
|
+
injectElement(params: IBuilderInjectElementParams): Promise<IInjectedComponent | null>;
|
|
40
|
+
injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
|
|
41
|
+
injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
|
|
42
|
+
injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
|
|
43
|
+
injectCheckoutElement(params: IInjectCheckoutBuilderParams): Promise<IInjectedComponent | null>;
|
|
44
|
+
injectProductList(params: IInjectProductListParams): Promise<void>;
|
|
45
|
+
actions: ILiquidCommerceElementsActions;
|
|
46
|
+
destroy(): void;
|
|
47
|
+
}
|
|
48
|
+
export interface ILiquidCommerceElementsClient {
|
|
49
|
+
injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
|
|
50
|
+
injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
|
|
51
|
+
injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
|
|
52
|
+
injectCheckoutElement(params: IInjectCheckoutParams): Promise<IInjectedComponent | null>;
|
|
53
|
+
injectProductList(params: IInjectProductListParams): Promise<void>;
|
|
54
|
+
injectProductListSearch(params: IInjectProductListSearchParams): Promise<void>;
|
|
55
|
+
injectProductListFilters(params: IInjectProductListFiltersParams): Promise<void>;
|
|
56
|
+
ui: ILiquidCommerceElementsUIMethod;
|
|
57
|
+
actions: ILiquidCommerceElementsActions;
|
|
58
|
+
getInjectedComponents(): Map<string, IInjectedComponent>;
|
|
59
|
+
destroy(): void;
|
|
60
|
+
}
|
|
61
|
+
export type LiquidCommerceElementsClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsClient;
|
|
62
|
+
export type LiquidCommerceElementsBuilderClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsBuilderClient;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { DebugMode, ElementsEnv } from '@/enums';
|
|
2
|
+
import type { IPromoTicker, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from './configs';
|
|
3
|
+
export type DeepPartial<T> = {
|
|
4
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
5
|
+
};
|
|
6
|
+
export interface IElementsProxyConfig {
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
export interface ILiquidCommerceElementsDevelopmentConfig {
|
|
11
|
+
customApiUrl?: string;
|
|
12
|
+
paymentMethodId?: string;
|
|
13
|
+
openShadowDom?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface IClientCustomThemeConfig {
|
|
16
|
+
global?: UpdateComponentGlobalConfigs;
|
|
17
|
+
product?: UpdateProductComponent;
|
|
18
|
+
address?: UpdateAddressComponent;
|
|
19
|
+
cart?: UpdateCartComponent;
|
|
20
|
+
checkout?: UpdateCheckoutComponent;
|
|
21
|
+
}
|
|
22
|
+
export interface ILiquidCommerceElementsCheckoutConfig {
|
|
23
|
+
pageUrl: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ILiquidCommerceElementsBaseConfig {
|
|
26
|
+
env?: ElementsEnv;
|
|
27
|
+
promoTicker?: IPromoTicker[];
|
|
28
|
+
customTheme?: IClientCustomThemeConfig;
|
|
29
|
+
debugMode?: DebugMode;
|
|
30
|
+
checkout?: ILiquidCommerceElementsCheckoutConfig;
|
|
31
|
+
}
|
|
32
|
+
export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig {
|
|
33
|
+
}
|
|
34
|
+
export interface ILiquidCommerceElementsConfig extends ILiquidCommerceElementsBaseConfig {
|
|
35
|
+
proxy?: IElementsProxyConfig;
|
|
36
|
+
development?: ILiquidCommerceElementsDevelopmentConfig;
|
|
37
|
+
}
|
|
38
|
+
export interface ILiquidCommerceElementsCheckoutClientConfig {
|
|
39
|
+
env?: ElementsEnv;
|
|
40
|
+
customTheme?: IClientCustomThemeConfig;
|
|
41
|
+
debugMode?: DebugMode;
|
|
42
|
+
checkout?: ILiquidCommerceElementsCheckoutConfig;
|
|
43
|
+
proxy?: IElementsProxyConfig;
|
|
44
|
+
development?: ILiquidCommerceElementsDevelopmentConfig;
|
|
45
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { DeepPartial } from '@/interfaces/config.interface';
|
|
1
2
|
import type { IElementsConfigurations } from '@/interfaces/configs/configurations.interface';
|
|
2
|
-
import type { DeepPartial } from '@/interfaces/core.interface';
|
|
3
3
|
import type { IAddressComponent } from './address.interface';
|
|
4
4
|
import type { ICartComponent } from './cart.interface';
|
|
5
5
|
import type { ICheckoutComponent } from './checkout.interface';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DisplayModeType } from 'enums';
|
|
2
|
-
import type { DeepPartial } from '@/interfaces/
|
|
2
|
+
import type { DeepPartial } from '@/interfaces/config.interface';
|
|
3
3
|
export type ProductListCardStyle = 'card' | 'ghost';
|
|
4
4
|
export type ProductListCardCornerRadius = 'rounded' | 'sharp';
|
|
5
5
|
export interface IProductListTheme {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PRODUCT_LIST_FILTER_TYPES } from '@/constants';
|
|
2
|
+
import type { ComponentType } from '@/enums';
|
|
3
|
+
import type { IAddressOptions } from '@/modules/address/address.interface';
|
|
4
|
+
export interface IInjectProductElement {
|
|
5
|
+
containerId: string;
|
|
6
|
+
identifier: string;
|
|
7
|
+
}
|
|
8
|
+
export type ProductListFilterType = (typeof PRODUCT_LIST_FILTER_TYPES)[keyof typeof PRODUCT_LIST_FILTER_TYPES];
|
|
9
|
+
export interface IInjectProductListParams {
|
|
10
|
+
containerId: string;
|
|
11
|
+
rows?: number;
|
|
12
|
+
columns?: number;
|
|
13
|
+
filters?: ProductListFilterType[];
|
|
14
|
+
productUrl?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IInjectProductListSearchParams {
|
|
17
|
+
containerId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IInjectProductListFiltersParams {
|
|
20
|
+
containerId: string;
|
|
21
|
+
filters: ProductListFilterType[];
|
|
22
|
+
}
|
|
23
|
+
export interface IBuilderInjectElementParams {
|
|
24
|
+
type: ComponentType;
|
|
25
|
+
containerId: string;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
export interface IProcessInjectElementParams {
|
|
29
|
+
type: ComponentType;
|
|
30
|
+
containerId: string;
|
|
31
|
+
identifier?: string;
|
|
32
|
+
options?: IAddressOptions;
|
|
33
|
+
checkoutId?: string;
|
|
34
|
+
hideHeader?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface IInjectCheckoutParams {
|
|
37
|
+
containerId: string;
|
|
38
|
+
checkoutId?: string;
|
|
39
|
+
hideHeader?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface IInjectCheckoutBuilderParams extends IInjectCheckoutParams {
|
|
42
|
+
simulatePresale?: boolean;
|
|
43
|
+
presaleExpiresInMinutes?: number;
|
|
44
|
+
}
|