@storepecker/storefront-core 2.3.4 → 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.
Files changed (39) hide show
  1. package/dist/api/index.d.cts +4 -6
  2. package/dist/api/index.d.ts +4 -6
  3. package/dist/{booking-BVWe8HHh.d.ts → booking-CG6tul9l.d.ts} +1 -1
  4. package/dist/{booking-DX9SU_qm.d.cts → booking-DNVf5ZAS.d.cts} +1 -1
  5. package/dist/checkout/index.d.cts +1 -3
  6. package/dist/checkout/index.d.ts +1 -3
  7. package/dist/chunk-5NUDTIQ2.js +9 -0
  8. package/dist/chunk-DODFO744.cjs +11 -0
  9. package/dist/{chunk-SITQV6WZ.cjs → chunk-JH4JJBXE.cjs} +2 -2
  10. package/dist/{chunk-XGRX4LHO.js → chunk-TF2KMTB6.js} +2 -2
  11. package/dist/{collections-BDSVfRNo.d.ts → collections-Bz9KD7Na.d.cts} +1 -1
  12. package/dist/{collections-WzvTO0OQ.d.cts → collections-CkEUi3BR.d.ts} +1 -1
  13. package/dist/components/index.cjs +11 -0
  14. package/dist/components/index.d.cts +8 -3
  15. package/dist/components/index.d.ts +8 -3
  16. package/dist/components/index.js +11 -1
  17. package/dist/hooks/index.cjs +4 -4
  18. package/dist/hooks/index.d.cts +2 -4
  19. package/dist/hooks/index.d.ts +2 -4
  20. package/dist/hooks/index.js +1 -1
  21. package/dist/models/index.d.cts +4 -6
  22. package/dist/models/index.d.ts +4 -6
  23. package/dist/{product-DJMdi4D4.d.cts → orders-fIdANHSl.d.cts} +265 -1
  24. package/dist/{product-DJMdi4D4.d.ts → orders-fIdANHSl.d.ts} +265 -1
  25. package/dist/pixelEvents-DYkiTkb2.d.cts +369 -0
  26. package/dist/pixelEvents-OVIkPw-J.d.ts +369 -0
  27. package/dist/store/index.cjs +9 -4
  28. package/dist/store/index.d.cts +14 -8
  29. package/dist/store/index.d.ts +14 -8
  30. package/dist/store/index.js +2 -1
  31. package/dist/utils/index.d.cts +6 -371
  32. package/dist/utils/index.d.ts +6 -371
  33. package/dist/{wishlist-DKYFZR0s.d.ts → wishlist-_bd4gLyQ.d.ts} +1 -1
  34. package/dist/{wishlist-CUuCTSVJ.d.cts → wishlist-stNzfvIP.d.cts} +1 -1
  35. package/package.json +1 -1
  36. package/dist/cart-kJoawc_Z.d.cts +0 -126
  37. package/dist/cart-y-7RPmnQ.d.ts +0 -126
  38. package/dist/orders-CjNmCY5I.d.cts +0 -144
  39. package/dist/orders-L_8eIkUS.d.ts +0 -144
@@ -1,12 +1,12 @@
1
- import { f as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-DJMdi4D4.js';
2
- export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-DJMdi4D4.js';
3
- import { C as Cart, b as Category$1 } from '../cart-y-7RPmnQ.js';
1
+ import { C as Cart, o as ProductDetail, O as OperatingHours, T as TimeSlot, a as Attributes } from '../orders-fIdANHSl.js';
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.js';
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.js';
5
- import { C as CollectionResponse } from '../collections-BDSVfRNo.js';
4
+ import { S as SectionFilters } from '../pixelEvents-OVIkPw-J.js';
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-OVIkPw-J.js';
6
6
  import { AxiosResponse } from 'axios';
7
7
  import { a as PhonePe } from '../phonepe-dWMLZel6.js';
8
- import { O as Order } from '../orders-L_8eIkUS.js';
9
8
  import 'react-toastify';
9
+ import '../collections-CkEUi3BR.js';
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, 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, type ValueHighlights, 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, pixelEvents, pluralize, type preFooterContent, protectedRoutes, publicRoutes, pushParamsToURL, setAuthTokenChangeCallback, setCache, shareLink, timeFromNow, urls };
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 };
@@ -1,4 +1,4 @@
1
- import { f as ProductDetail } from './product-DJMdi4D4.js';
1
+ import { o as ProductDetail } from './orders-fIdANHSl.js';
2
2
 
3
3
  declare namespace Wishlist {
4
4
  interface Root {
@@ -1,4 +1,4 @@
1
- import { f as ProductDetail } from './product-DJMdi4D4.cjs';
1
+ import { o as ProductDetail } from './orders-fIdANHSl.cjs';
2
2
 
3
3
  declare namespace Wishlist {
4
4
  interface Root {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storepecker/storefront-core",
3
- "version": "2.3.4",
3
+ "version": "2.3.6",
4
4
  "description": "Shared logic and utilities for Snapstore themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,126 +0,0 @@
1
- import { g as SLICE_STATUS, d as Product, f as ProductDetail } from './product-DJMdi4D4.cjs';
2
-
3
- declare namespace User {
4
- interface Root {
5
- customer_name: string;
6
- phone: string;
7
- email: string;
8
- date_of_birth: string;
9
- country_code: string;
10
- gender: string;
11
- }
12
- interface UserState {
13
- user: LoginUserData | null;
14
- isAuthenticated: boolean;
15
- status: SLICE_STATUS;
16
- }
17
- interface LoginUserData {
18
- email: string;
19
- first_name: string;
20
- last_name: string;
21
- access: string;
22
- refresh: string;
23
- user_id: number;
24
- phone_number: string;
25
- }
26
- interface UserDetailsPayload {
27
- customer_name: string;
28
- gender: string;
29
- date_of_birth: string;
30
- }
31
- type LoginMethod = "email_otp" | "phone_otp";
32
- }
33
-
34
- declare namespace Category {
35
- interface Root {
36
- id: number;
37
- name: string;
38
- photo: string;
39
- slug: string;
40
- description: string;
41
- children?: Root[];
42
- }
43
- interface CategoriesState {
44
- data: Root[];
45
- status: SLICE_STATUS;
46
- }
47
- }
48
-
49
- type DiscountType = "discount";
50
- type ValueType = "percentage" | "fixed";
51
- type ApplicableTarget = "product_category" | "product_variant" | "product_bundle" | "customer";
52
- type CouponStatus = "active" | "inactive" | "expired";
53
- interface Coupon {
54
- id: number;
55
- coupon_code: string;
56
- discount_type: DiscountType;
57
- value: string;
58
- value_type: ValueType;
59
- min_order_amount: string;
60
- max_discount_amount: string;
61
- start_date: string;
62
- end_date: string;
63
- status: CouponStatus;
64
- is_deleted: boolean;
65
- usage_limit: number;
66
- usage_count: number;
67
- applicable_target: ApplicableTarget;
68
- applicable_product_variants: Product.ProductVariant[];
69
- applicable_product_bundles: any[];
70
- applicable_product_categories: Category.Root[];
71
- applicable_customers: User.Root[];
72
- auto_apply: boolean;
73
- created_at: string;
74
- updated_at: string;
75
- is_cart_applicable: boolean;
76
- coupon_message: string;
77
- }
78
- type Coupons = Coupon[];
79
- interface CouponResponse {
80
- coupon: Coupon;
81
- }
82
-
83
- interface CartState {
84
- cart: Cart.Root | null;
85
- status: SLICE_STATUS;
86
- }
87
- declare namespace Cart {
88
- interface Root {
89
- product_variants: ProductDetail.Root[];
90
- total_amount: number;
91
- total_quantity: number;
92
- products_quantity: ProductsQuantity;
93
- cart_count: number;
94
- missing_items: {
95
- [key: number]: number;
96
- };
97
- missing_cart_items: {
98
- [key: string]: number;
99
- };
100
- customization_inputs: Array<CustomizationInput>;
101
- total_coupon_discount: number;
102
- variant_discounts: {
103
- [key: number]: number;
104
- };
105
- total_shipping: number;
106
- total_tax_amount: number;
107
- applied_coupon: Coupon | {};
108
- }
109
- interface CustomizationInput {
110
- id: number;
111
- product_variant: number;
112
- customization_option: number;
113
- customer_wishlist: null;
114
- customer_order: null;
115
- customer_cart: number;
116
- customer_input: string;
117
- customization_option_name: string;
118
- customization_option_type: string;
119
- is_mandatory: boolean;
120
- }
121
- interface ProductsQuantity {
122
- [key: number]: number;
123
- }
124
- }
125
-
126
- export { type ApplicableTarget as A, Cart as C, type DiscountType as D, User as U, type ValueType as V, type CartState as a, Category as b, type Coupon as c, type CouponResponse as d, type CouponStatus as e, type Coupons as f };
@@ -1,126 +0,0 @@
1
- import { g as SLICE_STATUS, d as Product, f as ProductDetail } from './product-DJMdi4D4.js';
2
-
3
- declare namespace User {
4
- interface Root {
5
- customer_name: string;
6
- phone: string;
7
- email: string;
8
- date_of_birth: string;
9
- country_code: string;
10
- gender: string;
11
- }
12
- interface UserState {
13
- user: LoginUserData | null;
14
- isAuthenticated: boolean;
15
- status: SLICE_STATUS;
16
- }
17
- interface LoginUserData {
18
- email: string;
19
- first_name: string;
20
- last_name: string;
21
- access: string;
22
- refresh: string;
23
- user_id: number;
24
- phone_number: string;
25
- }
26
- interface UserDetailsPayload {
27
- customer_name: string;
28
- gender: string;
29
- date_of_birth: string;
30
- }
31
- type LoginMethod = "email_otp" | "phone_otp";
32
- }
33
-
34
- declare namespace Category {
35
- interface Root {
36
- id: number;
37
- name: string;
38
- photo: string;
39
- slug: string;
40
- description: string;
41
- children?: Root[];
42
- }
43
- interface CategoriesState {
44
- data: Root[];
45
- status: SLICE_STATUS;
46
- }
47
- }
48
-
49
- type DiscountType = "discount";
50
- type ValueType = "percentage" | "fixed";
51
- type ApplicableTarget = "product_category" | "product_variant" | "product_bundle" | "customer";
52
- type CouponStatus = "active" | "inactive" | "expired";
53
- interface Coupon {
54
- id: number;
55
- coupon_code: string;
56
- discount_type: DiscountType;
57
- value: string;
58
- value_type: ValueType;
59
- min_order_amount: string;
60
- max_discount_amount: string;
61
- start_date: string;
62
- end_date: string;
63
- status: CouponStatus;
64
- is_deleted: boolean;
65
- usage_limit: number;
66
- usage_count: number;
67
- applicable_target: ApplicableTarget;
68
- applicable_product_variants: Product.ProductVariant[];
69
- applicable_product_bundles: any[];
70
- applicable_product_categories: Category.Root[];
71
- applicable_customers: User.Root[];
72
- auto_apply: boolean;
73
- created_at: string;
74
- updated_at: string;
75
- is_cart_applicable: boolean;
76
- coupon_message: string;
77
- }
78
- type Coupons = Coupon[];
79
- interface CouponResponse {
80
- coupon: Coupon;
81
- }
82
-
83
- interface CartState {
84
- cart: Cart.Root | null;
85
- status: SLICE_STATUS;
86
- }
87
- declare namespace Cart {
88
- interface Root {
89
- product_variants: ProductDetail.Root[];
90
- total_amount: number;
91
- total_quantity: number;
92
- products_quantity: ProductsQuantity;
93
- cart_count: number;
94
- missing_items: {
95
- [key: number]: number;
96
- };
97
- missing_cart_items: {
98
- [key: string]: number;
99
- };
100
- customization_inputs: Array<CustomizationInput>;
101
- total_coupon_discount: number;
102
- variant_discounts: {
103
- [key: number]: number;
104
- };
105
- total_shipping: number;
106
- total_tax_amount: number;
107
- applied_coupon: Coupon | {};
108
- }
109
- interface CustomizationInput {
110
- id: number;
111
- product_variant: number;
112
- customization_option: number;
113
- customer_wishlist: null;
114
- customer_order: null;
115
- customer_cart: number;
116
- customer_input: string;
117
- customization_option_name: string;
118
- customization_option_type: string;
119
- is_mandatory: boolean;
120
- }
121
- interface ProductsQuantity {
122
- [key: number]: number;
123
- }
124
- }
125
-
126
- export { type ApplicableTarget as A, Cart as C, type DiscountType as D, User as U, type ValueType as V, type CartState as a, Category as b, type Coupon as c, type CouponResponse as d, type CouponStatus as e, type Coupons as f };