@storepecker/storefront-core 1.0.0
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/address-DQEZzyUG.d.cts +19 -0
- package/dist/address-DQEZzyUG.d.ts +19 -0
- package/dist/api/index.cjs +367 -0
- package/dist/api/index.d.cts +127 -0
- package/dist/api/index.d.ts +127 -0
- package/dist/api/index.js +131 -0
- package/dist/booking-ClX-dhX7.d.ts +131 -0
- package/dist/booking-Drl7-IL7.d.cts +131 -0
- package/dist/cart-DVrn8hD0.d.cts +367 -0
- package/dist/cart-DVrn8hD0.d.ts +367 -0
- package/dist/checkout/index.cjs +228 -0
- package/dist/checkout/index.d.cts +251 -0
- package/dist/checkout/index.d.ts +251 -0
- package/dist/checkout/index.js +122 -0
- package/dist/chunk-4CVKE6CC.cjs +312 -0
- package/dist/chunk-4MJMNIAB.js +123 -0
- package/dist/chunk-57ZBPAXU.js +114 -0
- package/dist/chunk-7MQOVWLW.js +40 -0
- package/dist/chunk-7UH6REGV.js +12 -0
- package/dist/chunk-A6IO3HIN.cjs +151 -0
- package/dist/chunk-CFF632IQ.cjs +100 -0
- package/dist/chunk-CSISWBZZ.js +121 -0
- package/dist/chunk-E7WPE3PV.js +98 -0
- package/dist/chunk-FLBJKM6G.js +83 -0
- package/dist/chunk-GB3HW6DM.js +61 -0
- package/dist/chunk-GH75WUO2.cjs +42 -0
- package/dist/chunk-GQTO5ZE2.cjs +96 -0
- package/dist/chunk-JHGXIIBZ.cjs +37 -0
- package/dist/chunk-JQMLHRWL.js +21 -0
- package/dist/chunk-K44JZ5NL.cjs +212 -0
- package/dist/chunk-K5B62JZO.cjs +154 -0
- package/dist/chunk-KWKHHRRJ.cjs +15 -0
- package/dist/chunk-LBGIUNM6.js +30 -0
- package/dist/chunk-LC5ZAUKL.cjs +220 -0
- package/dist/chunk-N3CTXRFT.cjs +30 -0
- package/dist/chunk-QCQCFYYR.js +206 -0
- package/dist/chunk-QM73PI5L.cjs +218 -0
- package/dist/chunk-RCXQJ6XC.cjs +131 -0
- package/dist/chunk-UM24VDYB.js +216 -0
- package/dist/chunk-UXLUE3HW.cjs +69 -0
- package/dist/chunk-WFDKKOO7.js +210 -0
- package/dist/chunk-YUPBTD4M.js +289 -0
- package/dist/components/index.cjs +576 -0
- package/dist/components/index.css +329 -0
- package/dist/components/index.d.cts +58 -0
- package/dist/components/index.d.ts +58 -0
- package/dist/components/index.js +569 -0
- package/dist/coupons-C7iJ-1cy.d.cts +37 -0
- package/dist/coupons-CnfTKL1i.d.ts +37 -0
- package/dist/hooks/index.cjs +381 -0
- package/dist/hooks/index.d.cts +123 -0
- package/dist/hooks/index.d.ts +123 -0
- package/dist/hooks/index.js +364 -0
- package/dist/index-DTyIuLuI.d.cts +18 -0
- package/dist/index-DTyIuLuI.d.ts +18 -0
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/index.cjs +2 -0
- package/dist/models/index.d.cts +53 -0
- package/dist/models/index.d.ts +53 -0
- package/dist/models/index.js +1 -0
- package/dist/orders-CkUzv5Xh.d.ts +159 -0
- package/dist/orders-D0oC9ugD.d.cts +159 -0
- package/dist/phonepe-D7vn-9SR.d.cts +27 -0
- package/dist/phonepe-D7vn-9SR.d.ts +27 -0
- package/dist/store/index.cjs +149 -0
- package/dist/store/index.d.cts +46 -0
- package/dist/store/index.d.ts +46 -0
- package/dist/store/index.js +141 -0
- package/dist/useAddressForm-C-Uzug4d.d.ts +42 -0
- package/dist/useAddressForm-DgkCP1nG.d.cts +42 -0
- package/dist/utils/index.cjs +535 -0
- package/dist/utils/index.d.cts +507 -0
- package/dist/utils/index.d.ts +507 -0
- package/dist/utils/index.js +342 -0
- package/dist/wishlist-BzhnCAQD.d.ts +41 -0
- package/dist/wishlist-CBCZD66Y.d.cts +41 -0
- package/package.json +134 -0
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { C as Cart, e as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot } from '../cart-DVrn8hD0.js';
|
|
2
|
+
export { g as ADDRESS_FORM_SESSION_KEY, h as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, i as PRODUCT_STATUSES, f as SLICE_STATUS, U as USER_CART, j as USER_CREDENTIALS, k as USER_CRED_REFRESH_TOKEN, l as USER_CRED_TOKEN, p as pathNameMap } from '../cart-DVrn8hD0.js';
|
|
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.js';
|
|
4
|
+
import { C as Category$1, O as Order } from '../orders-CkUzv5Xh.js';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
import { a as PhonePe } from '../phonepe-D7vn-9SR.js';
|
|
7
|
+
import 'react-toastify';
|
|
8
|
+
|
|
9
|
+
declare function setAuthTokenChangeCallback(callback: (token: string | undefined) => void): void;
|
|
10
|
+
declare const Auth: {
|
|
11
|
+
isAuthenticated: boolean;
|
|
12
|
+
getUserDetails(): string | false | undefined;
|
|
13
|
+
setUserDetails(data: any): void;
|
|
14
|
+
setAccessToken(token: string): void;
|
|
15
|
+
getAccessToken(): string | undefined;
|
|
16
|
+
setRefreshToken(token: string): void;
|
|
17
|
+
getRefreshToken(): string | undefined;
|
|
18
|
+
removeTokens(): void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
interface CacheOptions {
|
|
22
|
+
expiryHours?: number;
|
|
23
|
+
key?: string;
|
|
24
|
+
}
|
|
25
|
+
declare class CacheManager {
|
|
26
|
+
private static instance;
|
|
27
|
+
private cache;
|
|
28
|
+
private constructor();
|
|
29
|
+
static getInstance(): CacheManager;
|
|
30
|
+
private loadFromStorage;
|
|
31
|
+
private saveToStorage;
|
|
32
|
+
private cleanExpired;
|
|
33
|
+
set<T>(key: string, data: T, options?: CacheOptions): void;
|
|
34
|
+
get<T>(key: string): T | null;
|
|
35
|
+
has(key: string): boolean;
|
|
36
|
+
delete(key: string): void;
|
|
37
|
+
clear(): void;
|
|
38
|
+
getCacheInfo(): {
|
|
39
|
+
size: number;
|
|
40
|
+
keys: string[];
|
|
41
|
+
};
|
|
42
|
+
invalidateCache(pattern?: string): void;
|
|
43
|
+
}
|
|
44
|
+
declare const cache: CacheManager;
|
|
45
|
+
declare function setCache<T>(key: string, data: T, options?: CacheOptions): void;
|
|
46
|
+
declare function getCache<T>(key: string): T | null;
|
|
47
|
+
declare function hasCache(key: string): boolean;
|
|
48
|
+
declare function deleteCache(key: string): void;
|
|
49
|
+
declare function clearCache(): void;
|
|
50
|
+
declare function invalidateCache(pattern?: string): void;
|
|
51
|
+
declare function generateCacheKey(endpoint: string, params?: Record<string, any>): string;
|
|
52
|
+
|
|
53
|
+
declare const LocalCart: {
|
|
54
|
+
get(): Cart.Root | null;
|
|
55
|
+
set(cart: any): void;
|
|
56
|
+
add(product: ProductDetail.Root): void;
|
|
57
|
+
remove(product: ProductDetail.Root): void;
|
|
58
|
+
updateQuantity(product: ProductDetail.Root, quantity: number): void;
|
|
59
|
+
clear(): void;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
declare const cropImage: (image: string, croppedAreaPixels: any, onError: any, onBlob: (blob: Blob | null) => void) => Promise<null | undefined>;
|
|
63
|
+
|
|
64
|
+
declare const debounce: (fn: Function, ms?: number) => (this: any, ...args: any[]) => void;
|
|
65
|
+
|
|
66
|
+
interface PageProps {
|
|
67
|
+
nav_bar: NavBar;
|
|
68
|
+
store: string;
|
|
69
|
+
store_desc: string;
|
|
70
|
+
page_meta_data: PageMeta;
|
|
71
|
+
primary_color: string;
|
|
72
|
+
social_media: SocialMedia[];
|
|
73
|
+
}
|
|
74
|
+
type PageMeta = {
|
|
75
|
+
title: string;
|
|
76
|
+
description: string;
|
|
77
|
+
image: string;
|
|
78
|
+
url: string;
|
|
79
|
+
canonical_url: string;
|
|
80
|
+
appleTouchIcon: string;
|
|
81
|
+
twitter_card_size: string;
|
|
82
|
+
favIcon: string;
|
|
83
|
+
};
|
|
84
|
+
interface TemplateTheme {
|
|
85
|
+
primary: string;
|
|
86
|
+
secondary: string;
|
|
87
|
+
}
|
|
88
|
+
interface Logo {
|
|
89
|
+
url: string;
|
|
90
|
+
title: string;
|
|
91
|
+
}
|
|
92
|
+
interface NavElementOld {
|
|
93
|
+
title: string;
|
|
94
|
+
is_dropdown: boolean;
|
|
95
|
+
link?: string;
|
|
96
|
+
menuitems?: Menuitem[];
|
|
97
|
+
}
|
|
98
|
+
interface Menuitem {
|
|
99
|
+
id: number;
|
|
100
|
+
title: string;
|
|
101
|
+
link: string;
|
|
102
|
+
sub_categories?: SubCategory[];
|
|
103
|
+
}
|
|
104
|
+
interface SubCategory {
|
|
105
|
+
id: number;
|
|
106
|
+
title: string;
|
|
107
|
+
link: string;
|
|
108
|
+
}
|
|
109
|
+
interface SocialMedia {
|
|
110
|
+
type: string;
|
|
111
|
+
link: string;
|
|
112
|
+
}
|
|
113
|
+
interface PagePropsFull {
|
|
114
|
+
store: number;
|
|
115
|
+
theme: Theme;
|
|
116
|
+
privacy_policy: any;
|
|
117
|
+
terms_and_condition: any;
|
|
118
|
+
custom_css: string;
|
|
119
|
+
custom_js: string;
|
|
120
|
+
navbar: NavBar;
|
|
121
|
+
color_scheme: ColorScheme;
|
|
122
|
+
social_links: SocialLinks;
|
|
123
|
+
hero: Hero;
|
|
124
|
+
sections: Section[];
|
|
125
|
+
footer: Footer;
|
|
126
|
+
start_head_tag: string;
|
|
127
|
+
end_head_tag: string;
|
|
128
|
+
start_body_tag: string;
|
|
129
|
+
end_body_tag: string;
|
|
130
|
+
logo: string;
|
|
131
|
+
favicon: string;
|
|
132
|
+
store_name: string;
|
|
133
|
+
store_description: string;
|
|
134
|
+
social_image: string;
|
|
135
|
+
url: string;
|
|
136
|
+
categories: HeaderCategory[];
|
|
137
|
+
store_phone: string;
|
|
138
|
+
store_email: string;
|
|
139
|
+
store_address: string;
|
|
140
|
+
google_tag_manager_id?: string;
|
|
141
|
+
}
|
|
142
|
+
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"> & {
|
|
143
|
+
currency_code: string;
|
|
144
|
+
currency_symbol: string;
|
|
145
|
+
is_cod_enabled: boolean;
|
|
146
|
+
cod_amount: number;
|
|
147
|
+
store_review_enabled: boolean;
|
|
148
|
+
product_review_enabled: boolean;
|
|
149
|
+
store_review_popup_delay: number;
|
|
150
|
+
store_review_popup_delay_unit: "hours" | "days" | "weeks" | "months" | "minutes" | "seconds";
|
|
151
|
+
popup_enabled: boolean;
|
|
152
|
+
popup_heading_text: string;
|
|
153
|
+
popup_message_text: string;
|
|
154
|
+
popup_thank_you_message: string;
|
|
155
|
+
public_checkout_enabled: boolean;
|
|
156
|
+
booking_success_message: string;
|
|
157
|
+
order_success_message: string;
|
|
158
|
+
};
|
|
159
|
+
type HomePageContents = Pick<PagePropsFull, "hero" | "sections">;
|
|
160
|
+
interface Theme {
|
|
161
|
+
id: number;
|
|
162
|
+
name: string;
|
|
163
|
+
slug: string;
|
|
164
|
+
color_scheme: ColorScheme;
|
|
165
|
+
is_active: boolean;
|
|
166
|
+
}
|
|
167
|
+
interface ColorScheme {
|
|
168
|
+
primary: string;
|
|
169
|
+
secondary: string;
|
|
170
|
+
bodyBackground: string;
|
|
171
|
+
bodyBackground1: string;
|
|
172
|
+
bodyBackgroundSecondary: string;
|
|
173
|
+
bodyBackgroundDark: string;
|
|
174
|
+
borderBackground: string;
|
|
175
|
+
textPrimary: string;
|
|
176
|
+
textPrimaryLight: string;
|
|
177
|
+
textSecondary: string;
|
|
178
|
+
btnText: string;
|
|
179
|
+
}
|
|
180
|
+
interface RibbonMessage {
|
|
181
|
+
id: string;
|
|
182
|
+
message: string;
|
|
183
|
+
link: string;
|
|
184
|
+
}
|
|
185
|
+
interface RibbonBar {
|
|
186
|
+
type: "ribbon-bar";
|
|
187
|
+
messages: RibbonMessage[];
|
|
188
|
+
textColor: string;
|
|
189
|
+
id: string;
|
|
190
|
+
position: "top" | "bottom";
|
|
191
|
+
animation: string;
|
|
192
|
+
switchInterval: number;
|
|
193
|
+
}
|
|
194
|
+
interface NavBar {
|
|
195
|
+
wishlist: boolean;
|
|
196
|
+
cart: boolean;
|
|
197
|
+
navElements: NavElement[];
|
|
198
|
+
}
|
|
199
|
+
interface NavBar {
|
|
200
|
+
wishlist: boolean;
|
|
201
|
+
cart: boolean;
|
|
202
|
+
navElements: NavElement[];
|
|
203
|
+
ribbonbar: RibbonBar;
|
|
204
|
+
logoPosition: "left" | "center";
|
|
205
|
+
}
|
|
206
|
+
interface NavElement {
|
|
207
|
+
key: string;
|
|
208
|
+
title: string;
|
|
209
|
+
is_dropdown: boolean;
|
|
210
|
+
link?: string;
|
|
211
|
+
enabled?: boolean;
|
|
212
|
+
description: string;
|
|
213
|
+
}
|
|
214
|
+
interface NavElement {
|
|
215
|
+
key: string;
|
|
216
|
+
title: string;
|
|
217
|
+
is_dropdown: boolean;
|
|
218
|
+
link?: string;
|
|
219
|
+
enabled?: boolean;
|
|
220
|
+
description: string;
|
|
221
|
+
}
|
|
222
|
+
interface HeaderCategory {
|
|
223
|
+
id: number;
|
|
224
|
+
name: string;
|
|
225
|
+
link: string;
|
|
226
|
+
slug: string;
|
|
227
|
+
children?: HeaderCategory[];
|
|
228
|
+
}
|
|
229
|
+
interface SliderSettings {
|
|
230
|
+
id: string;
|
|
231
|
+
title: string;
|
|
232
|
+
description: string;
|
|
233
|
+
cta: string;
|
|
234
|
+
ctaLink: string;
|
|
235
|
+
bannerImage: string;
|
|
236
|
+
bannerImageMobile: string;
|
|
237
|
+
showContents?: boolean;
|
|
238
|
+
}
|
|
239
|
+
interface Hero {
|
|
240
|
+
title: string;
|
|
241
|
+
cta: string;
|
|
242
|
+
ctaLink: string;
|
|
243
|
+
heroImage: string;
|
|
244
|
+
description: string;
|
|
245
|
+
heroImageMobile: string;
|
|
246
|
+
showTitle: boolean;
|
|
247
|
+
showCTA: boolean;
|
|
248
|
+
bannerLink: string;
|
|
249
|
+
enableSlider: boolean;
|
|
250
|
+
sliderSettings: SliderSettings[];
|
|
251
|
+
switchInterval: number;
|
|
252
|
+
showHeroBanner: boolean;
|
|
253
|
+
}
|
|
254
|
+
type FilterType = "category" | "badge" | "title";
|
|
255
|
+
type FilterOption = "select" | "equals" | "contain" | "startWith" | "endWith";
|
|
256
|
+
type AvailableFilter = {
|
|
257
|
+
id: number;
|
|
258
|
+
label: string;
|
|
259
|
+
value: FilterType;
|
|
260
|
+
options: FilterOption[];
|
|
261
|
+
};
|
|
262
|
+
interface SectionFilters {
|
|
263
|
+
id: string;
|
|
264
|
+
type: FilterType;
|
|
265
|
+
label: string;
|
|
266
|
+
condition: FilterOption;
|
|
267
|
+
value: string | string[];
|
|
268
|
+
}
|
|
269
|
+
interface SectionFilters {
|
|
270
|
+
id: string;
|
|
271
|
+
type: FilterType;
|
|
272
|
+
label: string;
|
|
273
|
+
condition: FilterOption;
|
|
274
|
+
value: string | string[];
|
|
275
|
+
}
|
|
276
|
+
interface ProductCollection {
|
|
277
|
+
type: "product-collection";
|
|
278
|
+
title?: string;
|
|
279
|
+
filters?: SectionFilters[];
|
|
280
|
+
id: string;
|
|
281
|
+
row_count: number;
|
|
282
|
+
}
|
|
283
|
+
interface Category {
|
|
284
|
+
type: "categories";
|
|
285
|
+
title?: string;
|
|
286
|
+
id?: string;
|
|
287
|
+
categories?: Category$1.Root[];
|
|
288
|
+
selectedCategories?: string[];
|
|
289
|
+
}
|
|
290
|
+
interface Banner {
|
|
291
|
+
type: "banner";
|
|
292
|
+
title: string;
|
|
293
|
+
description?: string;
|
|
294
|
+
bannerImage: string;
|
|
295
|
+
ctaText?: string;
|
|
296
|
+
ctaLink?: string;
|
|
297
|
+
id: string;
|
|
298
|
+
bannerLink: string;
|
|
299
|
+
showContents: boolean;
|
|
300
|
+
mobileBannerImage: string;
|
|
301
|
+
}
|
|
302
|
+
interface SubCategorySection {
|
|
303
|
+
type: "sub-categories";
|
|
304
|
+
id: number;
|
|
305
|
+
title: string;
|
|
306
|
+
category?: Category$1.Root;
|
|
307
|
+
}
|
|
308
|
+
interface preFooterContent {
|
|
309
|
+
id: string;
|
|
310
|
+
image: string;
|
|
311
|
+
title: string;
|
|
312
|
+
description: string;
|
|
313
|
+
}
|
|
314
|
+
interface PreFooter {
|
|
315
|
+
type: "pre-footer";
|
|
316
|
+
id: string;
|
|
317
|
+
contents: preFooterContent[];
|
|
318
|
+
}
|
|
319
|
+
interface CategoryHighlights {
|
|
320
|
+
type: "category-highlights";
|
|
321
|
+
title?: string;
|
|
322
|
+
id?: string;
|
|
323
|
+
categories: Category$1.Root[];
|
|
324
|
+
}
|
|
325
|
+
interface StoreReview {
|
|
326
|
+
type: "store-review";
|
|
327
|
+
id: string;
|
|
328
|
+
title: string;
|
|
329
|
+
filter: string;
|
|
330
|
+
reviewsCount: number;
|
|
331
|
+
starColor: string;
|
|
332
|
+
autoPlayEnabled: boolean;
|
|
333
|
+
}
|
|
334
|
+
interface ProductHighlight {
|
|
335
|
+
type: "product-highlight";
|
|
336
|
+
id: string;
|
|
337
|
+
title: string;
|
|
338
|
+
productSlug: string;
|
|
339
|
+
}
|
|
340
|
+
interface ImageWithText {
|
|
341
|
+
type: "image-with-text";
|
|
342
|
+
id: string;
|
|
343
|
+
title: string;
|
|
344
|
+
content: string;
|
|
345
|
+
image: string;
|
|
346
|
+
showCta: boolean;
|
|
347
|
+
ctaText: string;
|
|
348
|
+
ctaLink: string;
|
|
349
|
+
}
|
|
350
|
+
interface Collections {
|
|
351
|
+
type: "collections";
|
|
352
|
+
id: string;
|
|
353
|
+
title: string;
|
|
354
|
+
slug: string;
|
|
355
|
+
items: string[];
|
|
356
|
+
}
|
|
357
|
+
type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections";
|
|
358
|
+
type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections;
|
|
359
|
+
interface Footer {
|
|
360
|
+
showSocialLinks: boolean;
|
|
361
|
+
showContactDetails: boolean;
|
|
362
|
+
showNameWithLogo: boolean;
|
|
363
|
+
showWhatsappBubble: boolean;
|
|
364
|
+
showMadeWithStorepecker: boolean;
|
|
365
|
+
}
|
|
366
|
+
interface SocialLinks {
|
|
367
|
+
}
|
|
368
|
+
interface LocationData {
|
|
369
|
+
country_code: string;
|
|
370
|
+
city: string;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
declare function convertObjectToParams(params: {
|
|
374
|
+
[key: string]: any;
|
|
375
|
+
}): string;
|
|
376
|
+
declare function getParamsFromURL(): {
|
|
377
|
+
[key: string]: any;
|
|
378
|
+
};
|
|
379
|
+
declare function pushParamsToURL(params: {
|
|
380
|
+
[key: string]: any;
|
|
381
|
+
}): string;
|
|
382
|
+
declare function convertToCurrency(amount: number, fraction?: number, currency?: string): string;
|
|
383
|
+
declare function formatDateTime(date: string): string;
|
|
384
|
+
declare const getQueryParams: (params: CustomObject, filterKeys?: string[]) => CustomObject;
|
|
385
|
+
declare const shareLink: (shareData: string, title: string, url?: string) => void;
|
|
386
|
+
declare function pluralize(strings: TemplateStringsArray, count: number, singular: string, plural: string): string;
|
|
387
|
+
declare function digestMessage(message: string): Promise<string>;
|
|
388
|
+
declare const constructFilter: (filter: SectionFilters[]) => CustomObject;
|
|
389
|
+
declare const getDelayInMilliseconds: (value: number, unit: "hours" | "days" | "weeks" | "months" | "minutes" | "seconds") => number;
|
|
390
|
+
declare function formatPostalLabel(zipNameType?: string): string;
|
|
391
|
+
declare function getAddressMeta(countryCode: string): Promise<{
|
|
392
|
+
regionLabel: any;
|
|
393
|
+
postalLabel: string;
|
|
394
|
+
hasPostal: boolean;
|
|
395
|
+
}>;
|
|
396
|
+
|
|
397
|
+
declare class PhonepePayment {
|
|
398
|
+
private readonly amount;
|
|
399
|
+
private readonly orderId;
|
|
400
|
+
private readonly userId;
|
|
401
|
+
private readonly phoneNumber;
|
|
402
|
+
private readonly merchantId;
|
|
403
|
+
private readonly saltKey;
|
|
404
|
+
private readonly saltIndex;
|
|
405
|
+
private payload;
|
|
406
|
+
constructor(amount: number, orderId: string, userId: number, phoneNumber: string, merchantId: string, saltKey: string, saltIndex: number);
|
|
407
|
+
init(): Promise<void>;
|
|
408
|
+
getPaymentUrl(): Promise<any>;
|
|
409
|
+
checkPaymentStatus(transactionId: string): Promise<AxiosResponse<PhonePe> | undefined>;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
declare global {
|
|
413
|
+
interface Window {
|
|
414
|
+
fbq: any;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
declare const pixelEvents: {
|
|
418
|
+
/**
|
|
419
|
+
* Track when a user views a product
|
|
420
|
+
*/
|
|
421
|
+
productView: (product: ProductDetail.Root) => void;
|
|
422
|
+
/**
|
|
423
|
+
* Track when a product is added to cart
|
|
424
|
+
*/
|
|
425
|
+
addToCart: (product: Product.ProductList, quantity?: number) => void;
|
|
426
|
+
removeFromCart: (product: ProductDetail.Root) => void;
|
|
427
|
+
/**
|
|
428
|
+
* Track when a product is added to wishlist
|
|
429
|
+
*/
|
|
430
|
+
addToWishlist: (product: Product.ProductList) => void;
|
|
431
|
+
/**
|
|
432
|
+
* Track when user initiates checkout
|
|
433
|
+
*/
|
|
434
|
+
initiateCheckout: (orderSummary: Order.OrderSummary, paymentMethod: string) => void;
|
|
435
|
+
/**
|
|
436
|
+
* Track successful purchases
|
|
437
|
+
*/
|
|
438
|
+
purchase: (orderSummary: Order.OrderSummary) => void;
|
|
439
|
+
/**
|
|
440
|
+
* Track search events
|
|
441
|
+
*/
|
|
442
|
+
search: (searchTerm: string, resultCount: number) => void;
|
|
443
|
+
/**
|
|
444
|
+
* Track when a user views their cart
|
|
445
|
+
*/
|
|
446
|
+
cartView: (cart: Cart.Root) => void;
|
|
447
|
+
/**
|
|
448
|
+
* Track when a user completes a checkout
|
|
449
|
+
*/
|
|
450
|
+
checkoutCompleted: (orderSummary: Order.OrderSummary) => void;
|
|
451
|
+
addressInfoSubmitted: () => void;
|
|
452
|
+
checkoutStarted: (cart: Cart.Root) => void;
|
|
453
|
+
pageViewed: () => void;
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
declare const protectedRoutes: string[];
|
|
457
|
+
declare const authRoutes: string[];
|
|
458
|
+
declare const publicRoutes: string[];
|
|
459
|
+
declare const urls: {
|
|
460
|
+
dashboard: string;
|
|
461
|
+
profile: string;
|
|
462
|
+
orders: string;
|
|
463
|
+
orderDetail: string;
|
|
464
|
+
deleteAccount: string;
|
|
465
|
+
addresses: string;
|
|
466
|
+
bookings: string;
|
|
467
|
+
login: string;
|
|
468
|
+
signup: string;
|
|
469
|
+
about: string;
|
|
470
|
+
home: string;
|
|
471
|
+
searchProducts: string;
|
|
472
|
+
shop: string;
|
|
473
|
+
shopDetails: string;
|
|
474
|
+
cart: string;
|
|
475
|
+
address: string;
|
|
476
|
+
payment: string;
|
|
477
|
+
wishlist: string;
|
|
478
|
+
privacyPolicy: string;
|
|
479
|
+
faq: string;
|
|
480
|
+
contactUs: string;
|
|
481
|
+
services: string;
|
|
482
|
+
storeReview: string;
|
|
483
|
+
returnAndRefund: string;
|
|
484
|
+
shippingPolicy: string;
|
|
485
|
+
termsOfService: string;
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
declare const getUniqueId: () => string | {
|
|
489
|
+
[property: string]: string;
|
|
490
|
+
} | undefined;
|
|
491
|
+
|
|
492
|
+
declare const isAvailableDay: (date: Date, availableDays: string[], advanceBookingWindow: number) => boolean;
|
|
493
|
+
declare const getAvailableDaysText: (availableDays: string[]) => string;
|
|
494
|
+
declare const getTimeConstraints: (date: Date | null, operatingHours: OperatingHours) => {
|
|
495
|
+
minTime: string;
|
|
496
|
+
maxTime: string;
|
|
497
|
+
timeSlots?: undefined;
|
|
498
|
+
} | {
|
|
499
|
+
minTime: string;
|
|
500
|
+
maxTime: string;
|
|
501
|
+
timeSlots: TimeSlot[];
|
|
502
|
+
};
|
|
503
|
+
declare const generateTimeOptions: (minTime: string, maxTime: string) => string[];
|
|
504
|
+
declare const getNextAvailableDate: (availableDays: string[], advanceBookingWindow: number) => Date | null;
|
|
505
|
+
declare const formatBookingDateTime: (date: Date | null, time: string) => string;
|
|
506
|
+
|
|
507
|
+
export { Auth, type AvailableFilter, type Banner, CacheManager, type Category, type CategoryHighlights, type Collections, type ColorScheme, type FilterOption, type FilterType, type Footer, type HeaderCategory, type Hero, type HomePageContents, type ImageWithText, LocalCart, type LocationData, type Logo, type Menuitem, type NavBar, type NavElement, type NavElementOld, type PageHeaderProps, type PageMeta, type PageProps, type PagePropsFull, PhonepePayment, type PreFooter, type ProductCollection, type ProductHighlight, type RibbonBar, type RibbonMessage, type Section, type SectionFilters, type SectionType, type SliderSettings, type SocialLinks, type SocialMedia, type StoreReview, type SubCategory, type SubCategorySection, type TemplateTheme, type Theme, authRoutes, cache, clearCache, constructFilter, convertObjectToParams, convertToCurrency, cropImage, debounce, deleteCache, digestMessage, formatBookingDateTime, formatDateTime, formatPostalLabel, generateCacheKey, generateTimeOptions, getAddressMeta, getAvailableDaysText, getCache, getDelayInMilliseconds, getNextAvailableDate, getParamsFromURL, getQueryParams, getTimeConstraints, getUniqueId, hasCache, invalidateCache, isAvailableDay, pixelEvents, pluralize, type preFooterContent, protectedRoutes, publicRoutes, pushParamsToURL, setAuthTokenChangeCallback, setCache, shareLink, urls };
|