@storepecker/storefront-core 2.1.1 → 2.2.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.
Files changed (39) hide show
  1. package/dist/{address-DQEZzyUG.d.cts → address-DwBZHzbI.d.cts} +2 -2
  2. package/dist/{address-DQEZzyUG.d.ts → address-DwBZHzbI.d.ts} +2 -2
  3. package/dist/api/index.cjs +8 -0
  4. package/dist/api/index.d.cts +49 -16
  5. package/dist/api/index.d.ts +49 -16
  6. package/dist/api/index.js +8 -1
  7. package/dist/{booking-CZ59BXk3.d.ts → booking-BGvxHd-t.d.cts} +2 -2
  8. package/dist/{booking-BgZoXUBv.d.cts → booking-BSZ6NP-e.d.ts} +2 -2
  9. package/dist/{cart-BY8D8w-s.d.cts → cart-CfsntcpS.d.ts} +38 -5
  10. package/dist/{cart-GuhgeBBt.d.ts → cart-XumsY-y0.d.cts} +38 -5
  11. package/dist/checkout/index.d.cts +3 -3
  12. package/dist/checkout/index.d.ts +3 -3
  13. package/dist/collections-D4tvWcZp.d.ts +23 -0
  14. package/dist/collections-dCr3VEJo.d.cts +23 -0
  15. package/dist/components/index.d.cts +4 -4
  16. package/dist/components/index.d.ts +4 -4
  17. package/dist/hooks/index.d.cts +20 -17
  18. package/dist/hooks/index.d.ts +20 -17
  19. package/dist/models/index.d.cts +8 -8
  20. package/dist/models/index.d.ts +8 -8
  21. package/dist/{orders-DHJhJ3xz.d.cts → orders-CvCa7XWm.d.ts} +19 -17
  22. package/dist/{orders-DHJhJ3xz.d.ts → orders-Dm5Dq02y.d.cts} +19 -17
  23. package/dist/{phonepe-D7vn-9SR.d.cts → phonepe-dWMLZel6.d.cts} +3 -3
  24. package/dist/{phonepe-D7vn-9SR.d.ts → phonepe-dWMLZel6.d.ts} +3 -3
  25. package/dist/{product-Dfi0ke-4.d.cts → product-Daxj09p9.d.cts} +64 -61
  26. package/dist/{product-Dfi0ke-4.d.ts → product-Daxj09p9.d.ts} +64 -61
  27. package/dist/store/index.d.cts +8 -4
  28. package/dist/store/index.d.ts +8 -4
  29. package/dist/{useAddressForm-DgkCP1nG.d.cts → useAddressForm-DGbEn91-.d.cts} +1 -1
  30. package/dist/{useAddressForm-C-Uzug4d.d.ts → useAddressForm-cO3Au33k.d.ts} +1 -1
  31. package/dist/utils/index.d.cts +6 -6
  32. package/dist/utils/index.d.ts +6 -6
  33. package/dist/wishlist-Cow1wVqf.d.cts +10 -0
  34. package/dist/wishlist-gamNg0T1.d.ts +10 -0
  35. package/package.json +1 -1
  36. package/dist/collections-CenI9AlQ.d.cts +0 -40
  37. package/dist/collections-CenI9AlQ.d.ts +0 -40
  38. package/dist/wishlist-DHOvXmJj.d.cts +0 -41
  39. package/dist/wishlist-LfdFxddw.d.ts +0 -41
@@ -8,8 +8,8 @@ interface Address {
8
8
  customer_email: string;
9
9
  country: string;
10
10
  pincode: string;
11
- latitude: any;
12
- longitude: any;
11
+ latitude: number | null;
12
+ longitude: number | null;
13
13
  is_default: boolean;
14
14
  customer_name: string;
15
15
  customer_phone: string;
@@ -8,8 +8,8 @@ interface Address {
8
8
  customer_email: string;
9
9
  country: string;
10
10
  pincode: string;
11
- latitude: any;
12
- longitude: any;
11
+ latitude: number | null;
12
+ longitude: number | null;
13
13
  is_default: boolean;
14
14
  customer_name: string;
15
15
  customer_phone: string;
@@ -92,6 +92,13 @@ async function getFilters() {
92
92
  async function getCollection(slug) {
93
93
  return await chunkZO2HREQL_cjs.http_service_default.get(`/inventory/public/collections/${slug}/`);
94
94
  }
95
+ async function getMultipleCollections(slugs) {
96
+ return await chunkZO2HREQL_cjs.http_service_default.get(`/inventory/public/collections/multiple/`, {
97
+ params: {
98
+ slugs
99
+ }
100
+ });
101
+ }
95
102
 
96
103
  // src/api/review.ts
97
104
  async function addReview(content) {
@@ -356,6 +363,7 @@ exports.getAffiliateRedirect = getAffiliateRedirect;
356
363
  exports.getCollection = getCollection;
357
364
  exports.getFilters = getFilters;
358
365
  exports.getLoginMethod = getLoginMethod;
366
+ exports.getMultipleCollections = getMultipleCollections;
359
367
  exports.getNewToken = getNewToken;
360
368
  exports.getReviewSummary = getReviewSummary;
361
369
  exports.getReviews = getReviews;
@@ -1,12 +1,12 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance, AxiosResponse } from 'axios';
3
- import { A as Address } from '../address-DQEZzyUG.cjs';
4
- import { U as User, W as Wishlist } from '../wishlist-DHOvXmJj.cjs';
5
- import { b as Product, c as ProductDetail } from '../product-Dfi0ke-4.cjs';
6
- import { C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-BY8D8w-s.cjs';
7
- import { O as Order } from '../orders-DHJhJ3xz.cjs';
8
- import { C as CollectionResponse } from '../collections-CenI9AlQ.cjs';
9
- import { R as Review, A as Analytics, B as Booking } from '../booking-BgZoXUBv.cjs';
3
+ import { A as Address } from '../address-DwBZHzbI.cjs';
4
+ import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-XumsY-y0.cjs';
5
+ import { d as Product, f as ProductDetail } from '../product-Daxj09p9.cjs';
6
+ import { O as Order } from '../orders-Dm5Dq02y.cjs';
7
+ import { W as Wishlist } from '../wishlist-Cow1wVqf.cjs';
8
+ import { C as CollectionResponse } from '../collections-dCr3VEJo.cjs';
9
+ import { R as Review, A as Analytics, B as Booking } from '../booking-BGvxHd-t.cjs';
10
10
  import 'react-toastify';
11
11
 
12
12
  declare function getHttpService(): AxiosInstance;
@@ -21,8 +21,16 @@ declare function addAddress(addressDetails: unknown): Promise<AxiosResponse<Addr
21
21
  declare function updateAddress(addressDetails: unknown): Promise<AxiosResponse<Address>>;
22
22
  declare function deleteAddress(address_id: number): Promise<AxiosResponse<Address>>;
23
23
 
24
- declare const sendOTP: (credentials: any) => Promise<AxiosResponse<any, any, {}>>;
25
- declare const verifyOTP: (credentials: any) => Promise<AxiosResponse<User.LoginUserData>>;
24
+ interface OTPCredentials {
25
+ phone?: string;
26
+ country_code?: string;
27
+ email?: string;
28
+ }
29
+ interface VerifyOTPCredentials extends OTPCredentials {
30
+ otp: string;
31
+ }
32
+ declare const sendOTP: (credentials: OTPCredentials) => Promise<AxiosResponse<any, any, {}>>;
33
+ declare const verifyOTP: (credentials: VerifyOTPCredentials) => Promise<AxiosResponse<User.LoginUserData>>;
26
34
  declare function getNewToken(refresh: string): Promise<AxiosResponse<{
27
35
  access: string;
28
36
  refresh: string;
@@ -33,7 +41,11 @@ declare function getCart(url: string, addressId?: number): Promise<Cart.Root>;
33
41
  declare function addToCart(product: Array<{
34
42
  variant_id: number;
35
43
  quantity: number;
36
- }>, customizationInputs?: any): Promise<AxiosResponse<Cart.Root>>;
44
+ }>, customizationInputs?: Array<{
45
+ customization_option: number;
46
+ customer_input: string;
47
+ product_variant: number;
48
+ }>): Promise<AxiosResponse<Cart.Root>>;
37
49
  declare function removeFromCart(product: Array<{
38
50
  variant_id: number;
39
51
  quantity: number;
@@ -56,7 +68,16 @@ declare function getOrderDetails(orderId: number): Promise<AxiosResponse<Order.R
56
68
  declare function getOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
57
69
  declare function getPublicOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
58
70
  declare function placeOrder(address_id: number, redirect: string, isCod?: boolean, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
59
- declare function publicPlaceOrder(address: unknown, redirect: string, orderDetails: CustomObject, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
71
+ interface PublicOrderDetails {
72
+ email: string;
73
+ phone: string;
74
+ customer_country_code: string;
75
+ cart_items: {
76
+ [key: number]: number;
77
+ };
78
+ is_cod?: boolean;
79
+ }
80
+ declare function publicPlaceOrder(address: unknown, redirect: string, orderDetails: PublicOrderDetails, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
60
81
  declare function updateOrder(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
61
82
  declare function razorpayPublicOrderSuccess(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
62
83
  declare function razorpayOrderSuccess(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
@@ -85,7 +106,7 @@ declare function verifyTabbyPayment(orderNumber: number): Promise<AxiosResponse<
85
106
 
86
107
  declare function getProductList(url: string, filter: unknown): Promise<Product.ProductResponse>;
87
108
  declare function getProducts(filter: Product.ProductFilter): Promise<AxiosResponse<Product.ProductResponse>>;
88
- declare function getProductDetail(url: string, slug: string): Promise<Product.Root | AxiosResponse<Product.Root>>;
109
+ declare function getProductDetail(url: string, slug: string): Promise<Product.Root>;
89
110
  declare function getProductCategories(url: string): Promise<Category.Root[]>;
90
111
  declare function getDigitalProductDownloadLink(variantId: number): Promise<AxiosResponse<ProductDetail.DigitalProductVariant[]>>;
91
112
  declare function updateDigitalProductDownloadLinkCount(variantId: number, downloadLink: string): Promise<AxiosResponse<any, any, {}>>;
@@ -106,9 +127,15 @@ declare function updateUserDetails(userDetails: User.UserDetailsPayload): Promis
106
127
  declare function getFilters(): Promise<AxiosResponse<Product.Filter>>;
107
128
 
108
129
  declare function getCollection(slug: string): Promise<AxiosResponse<CollectionResponse>>;
130
+ declare function getMultipleCollections(slugs: string): Promise<AxiosResponse<{
131
+ results: CollectionResponse[];
132
+ }>>;
109
133
 
110
- declare function addReview(content: any): Promise<AxiosResponse<Review.ReviewItem>>;
111
- declare function getReviews(data: any): Promise<AxiosResponse<Review.GetReviewResponse>>;
134
+ declare function addReview(content: Review.ReviewPayload): Promise<AxiosResponse<Review.ReviewItem>>;
135
+ declare function getReviews(data: {
136
+ filters?: Record<string, string>;
137
+ [key: string]: unknown;
138
+ }): Promise<AxiosResponse<Review.GetReviewResponse>>;
112
139
  declare function getReviewSummary(review_type: Review.ReviewPayload["review_type"], variant_slug: string): Promise<AxiosResponse<Review.ReviewSummary>>;
113
140
  declare function uploadReviewImages(uploadForm: FormData): Promise<AxiosResponse<{
114
141
  image_paths: string[];
@@ -121,8 +148,14 @@ declare function getAffiliateRedirect(ref: string): Promise<AxiosResponse<{
121
148
  declare function postAnalytics(data: unknown): Promise<AxiosResponse<Analytics.Root>>;
122
149
 
123
150
  declare function createBooking(bookingData: unknown): Promise<AxiosResponse>;
124
- declare function getUserBookings(filter: any): Promise<AxiosResponse<{
151
+ interface BookingFilter {
152
+ status_filter?: string;
153
+ search?: string;
154
+ page?: number;
155
+ page_size?: number;
156
+ }
157
+ declare function getUserBookings(filter: BookingFilter): Promise<AxiosResponse<{
125
158
  results: Booking[];
126
159
  }>>;
127
160
 
128
- export { addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getCart, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
161
+ export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getCart, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
@@ -1,12 +1,12 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance, AxiosResponse } from 'axios';
3
- import { A as Address } from '../address-DQEZzyUG.js';
4
- import { U as User, W as Wishlist } from '../wishlist-LfdFxddw.js';
5
- import { b as Product, c as ProductDetail } from '../product-Dfi0ke-4.js';
6
- import { C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-GuhgeBBt.js';
7
- import { O as Order } from '../orders-DHJhJ3xz.js';
8
- import { C as CollectionResponse } from '../collections-CenI9AlQ.js';
9
- import { R as Review, A as Analytics, B as Booking } from '../booking-CZ59BXk3.js';
3
+ import { A as Address } from '../address-DwBZHzbI.js';
4
+ import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-CfsntcpS.js';
5
+ import { d as Product, f as ProductDetail } from '../product-Daxj09p9.js';
6
+ import { O as Order } from '../orders-CvCa7XWm.js';
7
+ import { W as Wishlist } from '../wishlist-gamNg0T1.js';
8
+ import { C as CollectionResponse } from '../collections-D4tvWcZp.js';
9
+ import { R as Review, A as Analytics, B as Booking } from '../booking-BSZ6NP-e.js';
10
10
  import 'react-toastify';
11
11
 
12
12
  declare function getHttpService(): AxiosInstance;
@@ -21,8 +21,16 @@ declare function addAddress(addressDetails: unknown): Promise<AxiosResponse<Addr
21
21
  declare function updateAddress(addressDetails: unknown): Promise<AxiosResponse<Address>>;
22
22
  declare function deleteAddress(address_id: number): Promise<AxiosResponse<Address>>;
23
23
 
24
- declare const sendOTP: (credentials: any) => Promise<AxiosResponse<any, any, {}>>;
25
- declare const verifyOTP: (credentials: any) => Promise<AxiosResponse<User.LoginUserData>>;
24
+ interface OTPCredentials {
25
+ phone?: string;
26
+ country_code?: string;
27
+ email?: string;
28
+ }
29
+ interface VerifyOTPCredentials extends OTPCredentials {
30
+ otp: string;
31
+ }
32
+ declare const sendOTP: (credentials: OTPCredentials) => Promise<AxiosResponse<any, any, {}>>;
33
+ declare const verifyOTP: (credentials: VerifyOTPCredentials) => Promise<AxiosResponse<User.LoginUserData>>;
26
34
  declare function getNewToken(refresh: string): Promise<AxiosResponse<{
27
35
  access: string;
28
36
  refresh: string;
@@ -33,7 +41,11 @@ declare function getCart(url: string, addressId?: number): Promise<Cart.Root>;
33
41
  declare function addToCart(product: Array<{
34
42
  variant_id: number;
35
43
  quantity: number;
36
- }>, customizationInputs?: any): Promise<AxiosResponse<Cart.Root>>;
44
+ }>, customizationInputs?: Array<{
45
+ customization_option: number;
46
+ customer_input: string;
47
+ product_variant: number;
48
+ }>): Promise<AxiosResponse<Cart.Root>>;
37
49
  declare function removeFromCart(product: Array<{
38
50
  variant_id: number;
39
51
  quantity: number;
@@ -56,7 +68,16 @@ declare function getOrderDetails(orderId: number): Promise<AxiosResponse<Order.R
56
68
  declare function getOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
57
69
  declare function getPublicOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
58
70
  declare function placeOrder(address_id: number, redirect: string, isCod?: boolean, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
59
- declare function publicPlaceOrder(address: unknown, redirect: string, orderDetails: CustomObject, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
71
+ interface PublicOrderDetails {
72
+ email: string;
73
+ phone: string;
74
+ customer_country_code: string;
75
+ cart_items: {
76
+ [key: number]: number;
77
+ };
78
+ is_cod?: boolean;
79
+ }
80
+ declare function publicPlaceOrder(address: unknown, redirect: string, orderDetails: PublicOrderDetails, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
60
81
  declare function updateOrder(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
61
82
  declare function razorpayPublicOrderSuccess(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
62
83
  declare function razorpayOrderSuccess(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
@@ -85,7 +106,7 @@ declare function verifyTabbyPayment(orderNumber: number): Promise<AxiosResponse<
85
106
 
86
107
  declare function getProductList(url: string, filter: unknown): Promise<Product.ProductResponse>;
87
108
  declare function getProducts(filter: Product.ProductFilter): Promise<AxiosResponse<Product.ProductResponse>>;
88
- declare function getProductDetail(url: string, slug: string): Promise<Product.Root | AxiosResponse<Product.Root>>;
109
+ declare function getProductDetail(url: string, slug: string): Promise<Product.Root>;
89
110
  declare function getProductCategories(url: string): Promise<Category.Root[]>;
90
111
  declare function getDigitalProductDownloadLink(variantId: number): Promise<AxiosResponse<ProductDetail.DigitalProductVariant[]>>;
91
112
  declare function updateDigitalProductDownloadLinkCount(variantId: number, downloadLink: string): Promise<AxiosResponse<any, any, {}>>;
@@ -106,9 +127,15 @@ declare function updateUserDetails(userDetails: User.UserDetailsPayload): Promis
106
127
  declare function getFilters(): Promise<AxiosResponse<Product.Filter>>;
107
128
 
108
129
  declare function getCollection(slug: string): Promise<AxiosResponse<CollectionResponse>>;
130
+ declare function getMultipleCollections(slugs: string): Promise<AxiosResponse<{
131
+ results: CollectionResponse[];
132
+ }>>;
109
133
 
110
- declare function addReview(content: any): Promise<AxiosResponse<Review.ReviewItem>>;
111
- declare function getReviews(data: any): Promise<AxiosResponse<Review.GetReviewResponse>>;
134
+ declare function addReview(content: Review.ReviewPayload): Promise<AxiosResponse<Review.ReviewItem>>;
135
+ declare function getReviews(data: {
136
+ filters?: Record<string, string>;
137
+ [key: string]: unknown;
138
+ }): Promise<AxiosResponse<Review.GetReviewResponse>>;
112
139
  declare function getReviewSummary(review_type: Review.ReviewPayload["review_type"], variant_slug: string): Promise<AxiosResponse<Review.ReviewSummary>>;
113
140
  declare function uploadReviewImages(uploadForm: FormData): Promise<AxiosResponse<{
114
141
  image_paths: string[];
@@ -121,8 +148,14 @@ declare function getAffiliateRedirect(ref: string): Promise<AxiosResponse<{
121
148
  declare function postAnalytics(data: unknown): Promise<AxiosResponse<Analytics.Root>>;
122
149
 
123
150
  declare function createBooking(bookingData: unknown): Promise<AxiosResponse>;
124
- declare function getUserBookings(filter: any): Promise<AxiosResponse<{
151
+ interface BookingFilter {
152
+ status_filter?: string;
153
+ search?: string;
154
+ page?: number;
155
+ page_size?: number;
156
+ }
157
+ declare function getUserBookings(filter: BookingFilter): Promise<AxiosResponse<{
125
158
  results: Booking[];
126
159
  }>>;
127
160
 
128
- export { addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getCart, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
161
+ export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getCart, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
package/dist/api/index.js CHANGED
@@ -87,6 +87,13 @@ async function getFilters() {
87
87
  async function getCollection(slug) {
88
88
  return await http_service_default.get(`/inventory/public/collections/${slug}/`);
89
89
  }
90
+ async function getMultipleCollections(slugs) {
91
+ return await http_service_default.get(`/inventory/public/collections/multiple/`, {
92
+ params: {
93
+ slugs
94
+ }
95
+ });
96
+ }
90
97
 
91
98
  // src/api/review.ts
92
99
  async function addReview(content) {
@@ -129,4 +136,4 @@ async function getUserBookings(filter) {
129
136
  });
130
137
  }
131
138
 
132
- export { addReview, createBooking, getAffiliateRedirect, getCollection, getFilters, getLoginMethod, getNewToken, getReviewSummary, getReviews, getServerHttpService, getUserBookings, postAnalytics, sendOTP, server_http_service_default as serverHttpService, uploadReviewImages, verifyOTP };
139
+ export { addReview, createBooking, getAffiliateRedirect, getCollection, getFilters, getLoginMethod, getMultipleCollections, getNewToken, getReviewSummary, getReviews, getServerHttpService, getUserBookings, postAnalytics, sendOTP, server_http_service_default as serverHttpService, uploadReviewImages, verifyOTP };
@@ -1,4 +1,4 @@
1
- import { c as ProductDetail } from './product-Dfi0ke-4.js';
1
+ import { f as ProductDetail } from './product-Daxj09p9.cjs';
2
2
 
3
3
  declare namespace Review {
4
4
  interface ReviewPayload {
@@ -17,7 +17,7 @@ declare namespace Review {
17
17
  rating: number;
18
18
  title: string;
19
19
  content: string;
20
- replied_by: any;
20
+ replied_by: string | null;
21
21
  reply_content: string;
22
22
  reply_created_at: string;
23
23
  uploaded_images: string[];
@@ -1,4 +1,4 @@
1
- import { c as ProductDetail } from './product-Dfi0ke-4.cjs';
1
+ import { f as ProductDetail } from './product-Daxj09p9.js';
2
2
 
3
3
  declare namespace Review {
4
4
  interface ReviewPayload {
@@ -17,7 +17,7 @@ declare namespace Review {
17
17
  rating: number;
18
18
  title: string;
19
19
  content: string;
20
- replied_by: any;
20
+ replied_by: string | null;
21
21
  reply_content: string;
22
22
  reply_created_at: string;
23
23
  uploaded_images: string[];
@@ -1,4 +1,35 @@
1
- import { d as SLICE_STATUS, c as ProductDetail } from './product-Dfi0ke-4.cjs';
1
+ import { g as SLICE_STATUS, d as Product, f as ProductDetail } from './product-Daxj09p9.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
+ }
2
33
 
3
34
  declare namespace Category {
4
35
  interface Root {
@@ -34,10 +65,10 @@ interface Coupon {
34
65
  usage_limit: number;
35
66
  usage_count: number;
36
67
  applicable_target: ApplicableTarget;
37
- applicable_product_variants: any[];
68
+ applicable_product_variants: Product.ProductVariant[];
38
69
  applicable_product_bundles: any[];
39
70
  applicable_product_categories: Category.Root[];
40
- applicable_customers: any[];
71
+ applicable_customers: User.Root[];
41
72
  auto_apply: boolean;
42
73
  created_at: string;
43
74
  updated_at: string;
@@ -60,7 +91,9 @@ declare namespace Cart {
60
91
  total_quantity: number;
61
92
  products_quantity: ProductsQuantity;
62
93
  cart_count: number;
63
- missing_items: Array<any>;
94
+ missing_items: {
95
+ [key: number]: number;
96
+ };
64
97
  customization_inputs: Array<CustomizationInput>;
65
98
  total_coupon_discount: number;
66
99
  variant_discounts: {
@@ -87,4 +120,4 @@ declare namespace Cart {
87
120
  }
88
121
  }
89
122
 
90
- export { type ApplicableTarget as A, Cart as C, type DiscountType as D, 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 };
123
+ 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,4 +1,35 @@
1
- import { d as SLICE_STATUS, c as ProductDetail } from './product-Dfi0ke-4.js';
1
+ import { g as SLICE_STATUS, d as Product, f as ProductDetail } from './product-Daxj09p9.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
+ }
2
33
 
3
34
  declare namespace Category {
4
35
  interface Root {
@@ -34,10 +65,10 @@ interface Coupon {
34
65
  usage_limit: number;
35
66
  usage_count: number;
36
67
  applicable_target: ApplicableTarget;
37
- applicable_product_variants: any[];
68
+ applicable_product_variants: Product.ProductVariant[];
38
69
  applicable_product_bundles: any[];
39
70
  applicable_product_categories: Category.Root[];
40
- applicable_customers: any[];
71
+ applicable_customers: User.Root[];
41
72
  auto_apply: boolean;
42
73
  created_at: string;
43
74
  updated_at: string;
@@ -60,7 +91,9 @@ declare namespace Cart {
60
91
  total_quantity: number;
61
92
  products_quantity: ProductsQuantity;
62
93
  cart_count: number;
63
- missing_items: Array<any>;
94
+ missing_items: {
95
+ [key: number]: number;
96
+ };
64
97
  customization_inputs: Array<CustomizationInput>;
65
98
  total_coupon_discount: number;
66
99
  variant_discounts: {
@@ -87,4 +120,4 @@ declare namespace Cart {
87
120
  }
88
121
  }
89
122
 
90
- export { type ApplicableTarget as A, Cart as C, type DiscountType as D, 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 };
123
+ 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,7 +1,7 @@
1
1
  import * as Yup from 'yup';
2
- import { C as Cart, c as Coupon } from '../cart-BY8D8w-s.cjs';
3
- import { O as Order } from '../orders-DHJhJ3xz.cjs';
4
- import '../product-Dfi0ke-4.cjs';
2
+ import { C as Cart, c as Coupon } from '../cart-XumsY-y0.cjs';
3
+ import { O as Order } from '../orders-Dm5Dq02y.cjs';
4
+ import '../product-Daxj09p9.cjs';
5
5
  import 'react-toastify';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import * as Yup from 'yup';
2
- import { C as Cart, c as Coupon } from '../cart-GuhgeBBt.js';
3
- import { O as Order } from '../orders-DHJhJ3xz.js';
4
- import '../product-Dfi0ke-4.js';
2
+ import { C as Cart, c as Coupon } from '../cart-CfsntcpS.js';
3
+ import { O as Order } from '../orders-CvCa7XWm.js';
4
+ import '../product-Daxj09p9.js';
5
5
  import 'react-toastify';
6
6
 
7
7
  /**
@@ -0,0 +1,23 @@
1
+ import { d as Product } from './product-Daxj09p9.js';
2
+
3
+ interface CollectionResponse {
4
+ id: number;
5
+ title: string;
6
+ description: string;
7
+ slug: string;
8
+ is_published: boolean;
9
+ image: string | null;
10
+ published_at: string | null;
11
+ variants?: Product.ProductList[];
12
+ }
13
+ interface singleCollection {
14
+ slug: string;
15
+ }
16
+ interface Attributes {
17
+ [key: string]: {
18
+ name: string;
19
+ value: string;
20
+ };
21
+ }
22
+
23
+ export type { Attributes as A, CollectionResponse as C, singleCollection as s };
@@ -0,0 +1,23 @@
1
+ import { d as Product } from './product-Daxj09p9.cjs';
2
+
3
+ interface CollectionResponse {
4
+ id: number;
5
+ title: string;
6
+ description: string;
7
+ slug: string;
8
+ is_published: boolean;
9
+ image: string | null;
10
+ published_at: string | null;
11
+ variants?: Product.ProductList[];
12
+ }
13
+ interface singleCollection {
14
+ slug: string;
15
+ }
16
+ interface Attributes {
17
+ [key: string]: {
18
+ name: string;
19
+ value: string;
20
+ };
21
+ }
22
+
23
+ export type { Attributes as A, CollectionResponse as C, singleCollection as s };
@@ -1,10 +1,10 @@
1
1
  import React$1 from 'react';
2
- import { U as UseAddressFormOptions, u as useAddressForm } from '../useAddressForm-DgkCP1nG.cjs';
3
- import { c as ProductDetail } from '../product-Dfi0ke-4.cjs';
2
+ import { U as UseAddressFormOptions, u as useAddressForm } from '../useAddressForm-DGbEn91-.cjs';
3
+ import { f as ProductDetail } from '../product-Daxj09p9.cjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { O as Order } from '../orders-DHJhJ3xz.cjs';
5
+ import { O as Order } from '../orders-Dm5Dq02y.cjs';
6
6
  import 'formik';
7
- import '../address-DQEZzyUG.cjs';
7
+ import '../address-DwBZHzbI.cjs';
8
8
  import 'react-toastify';
9
9
 
10
10
  interface SearchDropdownOption {
@@ -1,10 +1,10 @@
1
1
  import React$1 from 'react';
2
- import { U as UseAddressFormOptions, u as useAddressForm } from '../useAddressForm-C-Uzug4d.js';
3
- import { c as ProductDetail } from '../product-Dfi0ke-4.js';
2
+ import { U as UseAddressFormOptions, u as useAddressForm } from '../useAddressForm-cO3Au33k.js';
3
+ import { f as ProductDetail } from '../product-Daxj09p9.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { O as Order } from '../orders-DHJhJ3xz.js';
5
+ import { O as Order } from '../orders-CvCa7XWm.js';
6
6
  import 'formik';
7
- import '../address-DQEZzyUG.js';
7
+ import '../address-DwBZHzbI.js';
8
8
  import 'react-toastify';
9
9
 
10
10
  interface SearchDropdownOption {