@storepecker/storefront-core 2.3.5 → 2.3.6
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/api/index.d.cts +4 -6
- package/dist/api/index.d.ts +4 -6
- package/dist/{booking-BVWe8HHh.d.ts → booking-CG6tul9l.d.ts} +1 -1
- package/dist/{booking-DX9SU_qm.d.cts → booking-DNVf5ZAS.d.cts} +1 -1
- package/dist/checkout/index.d.cts +1 -3
- package/dist/checkout/index.d.ts +1 -3
- package/dist/chunk-5NUDTIQ2.js +9 -0
- package/dist/chunk-DODFO744.cjs +11 -0
- package/dist/{collections-BDSVfRNo.d.ts → collections-Bz9KD7Na.d.cts} +1 -1
- package/dist/{collections-WzvTO0OQ.d.cts → collections-CkEUi3BR.d.ts} +1 -1
- package/dist/components/index.cjs +11 -0
- package/dist/components/index.d.cts +8 -3
- package/dist/components/index.d.ts +8 -3
- package/dist/components/index.js +11 -1
- package/dist/hooks/index.d.cts +2 -4
- package/dist/hooks/index.d.ts +2 -4
- package/dist/models/index.d.cts +4 -6
- package/dist/models/index.d.ts +4 -6
- package/dist/{product-DJMdi4D4.d.cts → orders-fIdANHSl.d.cts} +265 -1
- package/dist/{product-DJMdi4D4.d.ts → orders-fIdANHSl.d.ts} +265 -1
- package/dist/pixelEvents-DYkiTkb2.d.cts +369 -0
- package/dist/pixelEvents-OVIkPw-J.d.ts +369 -0
- package/dist/store/index.cjs +5 -0
- package/dist/store/index.d.cts +11 -4
- package/dist/store/index.d.ts +11 -4
- package/dist/store/index.js +1 -0
- package/dist/utils/index.d.cts +6 -371
- package/dist/utils/index.d.ts +6 -371
- package/dist/{wishlist-DKYFZR0s.d.ts → wishlist-_bd4gLyQ.d.ts} +1 -1
- package/dist/{wishlist-CUuCTSVJ.d.cts → wishlist-stNzfvIP.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/cart-kJoawc_Z.d.cts +0 -126
- package/dist/cart-y-7RPmnQ.d.ts +0 -126
- package/dist/orders-CjNmCY5I.d.cts +0 -144
- package/dist/orders-L_8eIkUS.d.ts +0 -144
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { C as Cart, b as Category$1 } from '../cart-kJoawc_Z.cjs';
|
|
1
|
+
import { C as Cart, o as ProductDetail, O as OperatingHours, T as TimeSlot, a as Attributes } from '../orders-fIdANHSl.cjs';
|
|
2
|
+
export { p as ADDRESS_FORM_SESSION_KEY, q as ALLOWED_COUNTRIES, r as DEFAULT_TOAST_CONFIG, s as PRODUCT_STATUSES, t as SLICE_STATUS, u as USER_CART, v as USER_CREDENTIALS, w as USER_CRED_REFRESH_TOKEN, x as USER_CRED_TOKEN, y as pathNameMap } from '../orders-fIdANHSl.cjs';
|
|
4
3
|
export { S as SnapstoreConfig, g as getApiEndpoint, a as getCloudFront, b as getConfig, c as getPhonePeApiEndpoint, d as getPublicApiEndpoint, e as getSecretKey, f as getStoreId, i as initConfig } from '../index-DTyIuLuI.cjs';
|
|
5
|
-
import {
|
|
4
|
+
import { S as SectionFilters } from '../pixelEvents-DYkiTkb2.cjs';
|
|
5
|
+
export { A as AvailableFilter, B as Banner, C as Category, a as CategoryHighlights, b as Collections, c as ColorScheme, F as FilterOption, d as FilterType, e as Footer, H as HeaderCategory, f as Hero, g as HomePageContents, I as ImageWithText, L as LocationData, h as Logo, M as Menuitem, N as NavBar, i as NavElement, j as NavElementOld, P as PageHeaderProps, k as PageMeta, l as PageProps, m as PagePropsFull, n as PreFooter, o as ProductCollection, p as ProductHighlight, R as RibbonBar, q as RibbonMessage, r as Section, s as SectionType, t as SliderSettings, u as SocialLinks, v as SocialMedia, w as StoreReview, x as SubCategory, y as SubCategorySection, T as TemplateTheme, z as Theme, V as ValueHighlights, D as pixelEvents, E as preFooterContent } from '../pixelEvents-DYkiTkb2.cjs';
|
|
6
6
|
import { AxiosResponse } from 'axios';
|
|
7
7
|
import { a as PhonePe } from '../phonepe-dWMLZel6.cjs';
|
|
8
|
-
import { O as Order } from '../orders-CjNmCY5I.cjs';
|
|
9
8
|
import 'react-toastify';
|
|
9
|
+
import '../collections-Bz9KD7Na.cjs';
|
|
10
10
|
|
|
11
11
|
declare function setAuthTokenChangeCallback(callback: (token: string | undefined) => void): void;
|
|
12
12
|
declare const Auth: {
|
|
@@ -65,327 +65,6 @@ declare const cropImage: (image: string, croppedAreaPixels: any, onError: any, o
|
|
|
65
65
|
|
|
66
66
|
declare const debounce: (fn: Function, ms?: number) => (this: any, ...args: any[]) => void;
|
|
67
67
|
|
|
68
|
-
interface PageProps {
|
|
69
|
-
nav_bar: NavBar;
|
|
70
|
-
store: string;
|
|
71
|
-
store_desc: string;
|
|
72
|
-
page_meta_data: PageMeta;
|
|
73
|
-
primary_color: string;
|
|
74
|
-
social_media: SocialMedia[];
|
|
75
|
-
}
|
|
76
|
-
type PageMeta = {
|
|
77
|
-
title: string;
|
|
78
|
-
description: string;
|
|
79
|
-
image: string;
|
|
80
|
-
url: string;
|
|
81
|
-
canonical_url: string;
|
|
82
|
-
appleTouchIcon: string;
|
|
83
|
-
twitter_card_size: string;
|
|
84
|
-
favIcon: string;
|
|
85
|
-
};
|
|
86
|
-
interface TemplateTheme {
|
|
87
|
-
primary: string;
|
|
88
|
-
secondary: string;
|
|
89
|
-
}
|
|
90
|
-
interface Logo {
|
|
91
|
-
url: string;
|
|
92
|
-
title: string;
|
|
93
|
-
}
|
|
94
|
-
interface NavElementOld {
|
|
95
|
-
title: string;
|
|
96
|
-
is_dropdown: boolean;
|
|
97
|
-
link?: string;
|
|
98
|
-
menuitems?: Menuitem[];
|
|
99
|
-
}
|
|
100
|
-
interface Menuitem {
|
|
101
|
-
id: number;
|
|
102
|
-
title: string;
|
|
103
|
-
link: string;
|
|
104
|
-
sub_categories?: SubCategory[];
|
|
105
|
-
}
|
|
106
|
-
interface SubCategory {
|
|
107
|
-
id: number;
|
|
108
|
-
title: string;
|
|
109
|
-
link: string;
|
|
110
|
-
}
|
|
111
|
-
interface SocialMedia {
|
|
112
|
-
type: string;
|
|
113
|
-
link: string;
|
|
114
|
-
}
|
|
115
|
-
interface PagePropsFull {
|
|
116
|
-
store: number;
|
|
117
|
-
theme: Theme;
|
|
118
|
-
privacy_policy: any;
|
|
119
|
-
terms_and_condition: any;
|
|
120
|
-
custom_css: string;
|
|
121
|
-
custom_js: string;
|
|
122
|
-
navbar: NavBar;
|
|
123
|
-
color_scheme: ColorScheme;
|
|
124
|
-
social_links: SocialLinks;
|
|
125
|
-
hero: Hero;
|
|
126
|
-
sections: Section[];
|
|
127
|
-
footer: Footer;
|
|
128
|
-
start_head_tag: string;
|
|
129
|
-
end_head_tag: string;
|
|
130
|
-
start_body_tag: string;
|
|
131
|
-
end_body_tag: string;
|
|
132
|
-
logo: string;
|
|
133
|
-
favicon: string;
|
|
134
|
-
store_name: string;
|
|
135
|
-
store_description: string;
|
|
136
|
-
social_image: string;
|
|
137
|
-
url: string;
|
|
138
|
-
categories: HeaderCategory[];
|
|
139
|
-
store_phone: string;
|
|
140
|
-
store_email: string;
|
|
141
|
-
store_address: string;
|
|
142
|
-
google_tag_manager_id?: string;
|
|
143
|
-
}
|
|
144
|
-
type PageHeaderProps = Pick<PagePropsFull, "navbar" | "logo" | "store_name" | "store_description" | "color_scheme" | "social_image" | "social_links" | "url" | "footer" | "categories" | "store_phone" | "store_email" | "store_address" | "start_head_tag" | "end_head_tag" | "start_body_tag" | "end_body_tag" | "google_tag_manager_id"> & {
|
|
145
|
-
currency_code: string;
|
|
146
|
-
currency_symbol: string;
|
|
147
|
-
is_cod_enabled: boolean;
|
|
148
|
-
cod_amount: number;
|
|
149
|
-
store_review_enabled: boolean;
|
|
150
|
-
product_review_enabled: boolean;
|
|
151
|
-
store_review_popup_delay: number;
|
|
152
|
-
store_review_popup_delay_unit: "hours" | "days" | "weeks" | "months" | "minutes" | "seconds";
|
|
153
|
-
popup_enabled: boolean;
|
|
154
|
-
popup_heading_text: string;
|
|
155
|
-
popup_message_text: string;
|
|
156
|
-
popup_thank_you_message: string;
|
|
157
|
-
public_checkout_enabled: boolean;
|
|
158
|
-
booking_success_message: string;
|
|
159
|
-
order_success_message: string;
|
|
160
|
-
};
|
|
161
|
-
type HomePageContents = Pick<PagePropsFull, "hero" | "sections">;
|
|
162
|
-
interface Theme {
|
|
163
|
-
id: number;
|
|
164
|
-
name: string;
|
|
165
|
-
slug: string;
|
|
166
|
-
color_scheme: ColorScheme;
|
|
167
|
-
is_active: boolean;
|
|
168
|
-
}
|
|
169
|
-
interface ColorScheme {
|
|
170
|
-
primary: string;
|
|
171
|
-
secondary: string;
|
|
172
|
-
bodyBackground: string;
|
|
173
|
-
bodyBackground1: string;
|
|
174
|
-
bodyBackgroundSecondary: string;
|
|
175
|
-
bodyBackgroundDark: string;
|
|
176
|
-
borderBackground: string;
|
|
177
|
-
textPrimary: string;
|
|
178
|
-
textPrimaryLight: string;
|
|
179
|
-
textSecondary: string;
|
|
180
|
-
btnText: string;
|
|
181
|
-
}
|
|
182
|
-
interface RibbonMessage {
|
|
183
|
-
id: string;
|
|
184
|
-
message: string;
|
|
185
|
-
link: string;
|
|
186
|
-
}
|
|
187
|
-
interface RibbonBar {
|
|
188
|
-
type: "ribbon-bar";
|
|
189
|
-
messages: RibbonMessage[];
|
|
190
|
-
textColor: string;
|
|
191
|
-
id: string;
|
|
192
|
-
position: "top" | "bottom";
|
|
193
|
-
animation: string;
|
|
194
|
-
switchInterval: number;
|
|
195
|
-
}
|
|
196
|
-
interface NavBar {
|
|
197
|
-
wishlist: boolean;
|
|
198
|
-
cart: boolean;
|
|
199
|
-
navElements: NavElement[];
|
|
200
|
-
}
|
|
201
|
-
interface NavBar {
|
|
202
|
-
wishlist: boolean;
|
|
203
|
-
cart: boolean;
|
|
204
|
-
navElements: NavElement[];
|
|
205
|
-
ribbonbar: RibbonBar;
|
|
206
|
-
logoPosition: "left" | "center";
|
|
207
|
-
}
|
|
208
|
-
interface NavElement {
|
|
209
|
-
key: string;
|
|
210
|
-
title: string;
|
|
211
|
-
is_dropdown: boolean;
|
|
212
|
-
link?: string;
|
|
213
|
-
enabled?: boolean;
|
|
214
|
-
description: string;
|
|
215
|
-
}
|
|
216
|
-
interface NavElement {
|
|
217
|
-
key: string;
|
|
218
|
-
title: string;
|
|
219
|
-
is_dropdown: boolean;
|
|
220
|
-
link?: string;
|
|
221
|
-
enabled?: boolean;
|
|
222
|
-
description: string;
|
|
223
|
-
}
|
|
224
|
-
interface HeaderCategory {
|
|
225
|
-
id: number;
|
|
226
|
-
name: string;
|
|
227
|
-
link: string;
|
|
228
|
-
slug: string;
|
|
229
|
-
children?: HeaderCategory[];
|
|
230
|
-
}
|
|
231
|
-
interface SliderSettings {
|
|
232
|
-
id: string;
|
|
233
|
-
title: string;
|
|
234
|
-
description: string;
|
|
235
|
-
cta: string;
|
|
236
|
-
ctaLink: string;
|
|
237
|
-
bannerImage: string;
|
|
238
|
-
bannerImageMobile: string;
|
|
239
|
-
showContents?: boolean;
|
|
240
|
-
}
|
|
241
|
-
interface Hero {
|
|
242
|
-
title: string;
|
|
243
|
-
cta: string;
|
|
244
|
-
ctaLink: string;
|
|
245
|
-
heroImage: string;
|
|
246
|
-
description: string;
|
|
247
|
-
heroImageMobile: string;
|
|
248
|
-
showTitle: boolean;
|
|
249
|
-
showCTA: boolean;
|
|
250
|
-
bannerLink: string;
|
|
251
|
-
enableSlider: boolean;
|
|
252
|
-
sliderSettings: SliderSettings[];
|
|
253
|
-
switchInterval: number;
|
|
254
|
-
showHeroBanner: boolean;
|
|
255
|
-
}
|
|
256
|
-
type FilterType = "category" | "badge" | "title";
|
|
257
|
-
type FilterOption = "select" | "equals" | "contain" | "startWith" | "endWith";
|
|
258
|
-
type AvailableFilter = {
|
|
259
|
-
id: number;
|
|
260
|
-
label: string;
|
|
261
|
-
value: FilterType;
|
|
262
|
-
options: FilterOption[];
|
|
263
|
-
};
|
|
264
|
-
interface SectionFilters {
|
|
265
|
-
id: string;
|
|
266
|
-
type: FilterType;
|
|
267
|
-
label: string;
|
|
268
|
-
condition: FilterOption;
|
|
269
|
-
value: string | string[];
|
|
270
|
-
}
|
|
271
|
-
interface SectionFilters {
|
|
272
|
-
id: string;
|
|
273
|
-
type: FilterType;
|
|
274
|
-
label: string;
|
|
275
|
-
condition: FilterOption;
|
|
276
|
-
value: string | string[];
|
|
277
|
-
}
|
|
278
|
-
interface ProductCollection {
|
|
279
|
-
type: "product-collection";
|
|
280
|
-
title?: string;
|
|
281
|
-
filters?: SectionFilters[];
|
|
282
|
-
id: string;
|
|
283
|
-
row_count: number;
|
|
284
|
-
}
|
|
285
|
-
interface Category {
|
|
286
|
-
type: "categories";
|
|
287
|
-
title?: string;
|
|
288
|
-
id?: string;
|
|
289
|
-
categories?: Category$1.Root[];
|
|
290
|
-
selectedCategories?: string[];
|
|
291
|
-
}
|
|
292
|
-
interface Banner {
|
|
293
|
-
type: "banner";
|
|
294
|
-
title: string;
|
|
295
|
-
description?: string;
|
|
296
|
-
bannerImage: string;
|
|
297
|
-
ctaText?: string;
|
|
298
|
-
ctaLink?: string;
|
|
299
|
-
id: string;
|
|
300
|
-
bannerLink: string;
|
|
301
|
-
showContents: boolean;
|
|
302
|
-
mobileBannerImage: string;
|
|
303
|
-
}
|
|
304
|
-
interface SubCategorySection {
|
|
305
|
-
type: "sub-categories";
|
|
306
|
-
id: number;
|
|
307
|
-
title: string;
|
|
308
|
-
category?: Category$1.Root;
|
|
309
|
-
}
|
|
310
|
-
interface preFooterContent {
|
|
311
|
-
id: string;
|
|
312
|
-
image: string;
|
|
313
|
-
title: string;
|
|
314
|
-
description: string;
|
|
315
|
-
}
|
|
316
|
-
interface PreFooter {
|
|
317
|
-
type: "pre-footer";
|
|
318
|
-
id: string;
|
|
319
|
-
contents: preFooterContent[];
|
|
320
|
-
}
|
|
321
|
-
interface CategoryHighlights {
|
|
322
|
-
type: "category-highlights";
|
|
323
|
-
title?: string;
|
|
324
|
-
id?: string;
|
|
325
|
-
categories: Category$1.Root[];
|
|
326
|
-
}
|
|
327
|
-
interface StoreReview {
|
|
328
|
-
type: "store-review";
|
|
329
|
-
id: string;
|
|
330
|
-
title: string;
|
|
331
|
-
filter: string;
|
|
332
|
-
reviewsCount: number;
|
|
333
|
-
starColor: string;
|
|
334
|
-
autoPlayEnabled: boolean;
|
|
335
|
-
}
|
|
336
|
-
interface ProductHighlight {
|
|
337
|
-
type: "product-highlight";
|
|
338
|
-
id: string;
|
|
339
|
-
title: string;
|
|
340
|
-
productSlug: string;
|
|
341
|
-
}
|
|
342
|
-
interface ImageWithText {
|
|
343
|
-
type: "image-with-text";
|
|
344
|
-
id: string;
|
|
345
|
-
title: string;
|
|
346
|
-
content: string;
|
|
347
|
-
image: string;
|
|
348
|
-
showCta: boolean;
|
|
349
|
-
ctaText: string;
|
|
350
|
-
ctaLink: string;
|
|
351
|
-
imagePosition: 'left' | 'right';
|
|
352
|
-
}
|
|
353
|
-
interface Collections {
|
|
354
|
-
type: "collections";
|
|
355
|
-
id: string;
|
|
356
|
-
slug: string;
|
|
357
|
-
title?: string;
|
|
358
|
-
description?: string;
|
|
359
|
-
variants?: CollectionResponse[];
|
|
360
|
-
}
|
|
361
|
-
interface ValueHighlights {
|
|
362
|
-
type: "value-highlights";
|
|
363
|
-
id: string;
|
|
364
|
-
title: string;
|
|
365
|
-
description: string;
|
|
366
|
-
highlights: {
|
|
367
|
-
value: string;
|
|
368
|
-
label: string;
|
|
369
|
-
image: string;
|
|
370
|
-
social: null | string;
|
|
371
|
-
}[];
|
|
372
|
-
}
|
|
373
|
-
type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections" | "value-highlights";
|
|
374
|
-
type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections | ValueHighlights;
|
|
375
|
-
interface Footer {
|
|
376
|
-
showSocialLinks: boolean;
|
|
377
|
-
showContactDetails: boolean;
|
|
378
|
-
showNameWithLogo: boolean;
|
|
379
|
-
showWhatsappBubble: boolean;
|
|
380
|
-
showMadeWithStorepecker: boolean;
|
|
381
|
-
}
|
|
382
|
-
interface SocialLinks {
|
|
383
|
-
}
|
|
384
|
-
interface LocationData {
|
|
385
|
-
country_code: string;
|
|
386
|
-
city: string;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
68
|
declare function convertObjectToParams(params: {
|
|
390
69
|
[key: string]: any;
|
|
391
70
|
}): string;
|
|
@@ -425,50 +104,6 @@ declare class PhonepePayment {
|
|
|
425
104
|
checkPaymentStatus(transactionId: string): Promise<AxiosResponse<PhonePe> | undefined>;
|
|
426
105
|
}
|
|
427
106
|
|
|
428
|
-
declare global {
|
|
429
|
-
interface Window {
|
|
430
|
-
fbq: any;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
declare const pixelEvents: {
|
|
434
|
-
/**
|
|
435
|
-
* Track when a user views a product
|
|
436
|
-
*/
|
|
437
|
-
productView: (product: ProductDetail.Root) => void;
|
|
438
|
-
/**
|
|
439
|
-
* Track when a product is added to cart
|
|
440
|
-
*/
|
|
441
|
-
addToCart: (product: Product.ProductList, quantity?: number) => void;
|
|
442
|
-
removeFromCart: (product: ProductDetail.Root) => void;
|
|
443
|
-
/**
|
|
444
|
-
* Track when a product is added to wishlist
|
|
445
|
-
*/
|
|
446
|
-
addToWishlist: (product: Product.ProductList) => void;
|
|
447
|
-
/**
|
|
448
|
-
* Track when user initiates checkout
|
|
449
|
-
*/
|
|
450
|
-
initiateCheckout: (orderSummary: Order.OrderSummary, paymentMethod: string) => void;
|
|
451
|
-
/**
|
|
452
|
-
* Track successful purchases
|
|
453
|
-
*/
|
|
454
|
-
purchase: (orderSummary: Order.OrderSummary) => void;
|
|
455
|
-
/**
|
|
456
|
-
* Track search events
|
|
457
|
-
*/
|
|
458
|
-
search: (searchTerm: string, resultCount: number) => void;
|
|
459
|
-
/**
|
|
460
|
-
* Track when a user views their cart
|
|
461
|
-
*/
|
|
462
|
-
cartView: (cart: Cart.Root) => void;
|
|
463
|
-
/**
|
|
464
|
-
* Track when a user completes a checkout
|
|
465
|
-
*/
|
|
466
|
-
checkoutCompleted: (orderSummary: Order.OrderSummary) => void;
|
|
467
|
-
addressInfoSubmitted: () => void;
|
|
468
|
-
checkoutStarted: (cart: Cart.Root) => void;
|
|
469
|
-
pageViewed: () => void;
|
|
470
|
-
};
|
|
471
|
-
|
|
472
107
|
declare const protectedRoutes: string[];
|
|
473
108
|
declare const authRoutes: string[];
|
|
474
109
|
declare const publicRoutes: string[];
|
|
@@ -570,4 +205,4 @@ declare function isProductCustomized(customizationInputs: Array<{
|
|
|
570
205
|
[key: string]: any;
|
|
571
206
|
}> | undefined, productId: number): boolean;
|
|
572
207
|
|
|
573
|
-
export { Auth,
|
|
208
|
+
export { Auth, CacheManager, LocalCart, PhonepePayment, SectionFilters, authRoutes, cache, calculateDiscountPercent, clearCache, constructFilter, convertObjectToParams, convertToCurrency, cropImage, debounce, deleteCache, digestMessage, findMatchingVariant, findSimilarVariant, formatBookingDateTime, formatDateTime, formatPostalLabel, generateCacheKey, generateTimeOptions, getAddressMeta, getAvailableDaysText, getCache, getDelayInMilliseconds, getNextAvailableDate, getParamsFromURL, getQueryParams, getTimeConstraints, getUniqueId, hasCache, invalidateCache, isAvailableDay, isColorVariantType, isExpired, isProductCustomized, isVariantCombinationAvailable, pluralize, protectedRoutes, publicRoutes, pushParamsToURL, setAuthTokenChangeCallback, setCache, shareLink, timeFromNow, urls };
|