@storepecker/storefront-core 2.1.1 → 2.2.1

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 (47) 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 +25 -17
  4. package/dist/api/index.d.cts +50 -17
  5. package/dist/api/index.d.ts +50 -17
  6. package/dist/api/index.js +9 -2
  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/{chunk-26A3EBZI.cjs → chunk-A67PCF55.cjs} +1 -2
  14. package/dist/{chunk-Y6NFUWTH.js → chunk-ERLBPVFK.js} +1 -2
  15. package/dist/{chunk-PWYWNRVO.cjs → chunk-JVSR6THX.cjs} +6 -6
  16. package/dist/{chunk-UOFTDL4D.js → chunk-ZKHQPHT5.js} +1 -1
  17. package/dist/collections-D4tvWcZp.d.ts +23 -0
  18. package/dist/collections-dCr3VEJo.d.cts +23 -0
  19. package/dist/components/index.d.cts +11 -11
  20. package/dist/components/index.d.ts +11 -11
  21. package/dist/hooks/index.cjs +16 -16
  22. package/dist/hooks/index.d.cts +24 -18
  23. package/dist/hooks/index.d.ts +24 -18
  24. package/dist/hooks/index.js +7 -7
  25. package/dist/models/index.d.cts +8 -8
  26. package/dist/models/index.d.ts +8 -8
  27. package/dist/{orders-DHJhJ3xz.d.cts → orders-CvCa7XWm.d.ts} +19 -17
  28. package/dist/{orders-DHJhJ3xz.d.ts → orders-Dm5Dq02y.d.cts} +19 -17
  29. package/dist/{phonepe-D7vn-9SR.d.cts → phonepe-dWMLZel6.d.cts} +3 -3
  30. package/dist/{phonepe-D7vn-9SR.d.ts → phonepe-dWMLZel6.d.ts} +3 -3
  31. package/dist/{product-Dfi0ke-4.d.cts → product-Daxj09p9.d.cts} +64 -61
  32. package/dist/{product-Dfi0ke-4.d.ts → product-Daxj09p9.d.ts} +64 -61
  33. package/dist/store/index.cjs +10 -10
  34. package/dist/store/index.d.cts +8 -4
  35. package/dist/store/index.d.ts +8 -4
  36. package/dist/store/index.js +5 -5
  37. package/dist/{useAddressForm-DgkCP1nG.d.cts → useAddressForm-DGbEn91-.d.cts} +1 -1
  38. package/dist/{useAddressForm-C-Uzug4d.d.ts → useAddressForm-cO3Au33k.d.ts} +1 -1
  39. package/dist/utils/index.d.cts +6 -6
  40. package/dist/utils/index.d.ts +6 -6
  41. package/dist/wishlist-Cow1wVqf.d.cts +10 -0
  42. package/dist/wishlist-gamNg0T1.d.ts +10 -0
  43. package/package.json +1 -1
  44. package/dist/collections-CenI9AlQ.d.cts +0 -40
  45. package/dist/collections-CenI9AlQ.d.ts +0 -40
  46. package/dist/wishlist-DHOvXmJj.d.cts +0 -41
  47. 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;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKKQKHG26_cjs = require('../chunk-KKQKHG26.cjs');
4
- var chunk26A3EBZI_cjs = require('../chunk-26A3EBZI.cjs');
4
+ var chunkA67PCF55_cjs = require('../chunk-A67PCF55.cjs');
5
5
  require('../chunk-SMHJRNCR.cjs');
6
6
  var chunkFMHR5ABF_cjs = require('../chunk-FMHR5ABF.cjs');
7
7
  var chunkG3R7ZVAG_cjs = require('../chunk-G3R7ZVAG.cjs');
@@ -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) {
@@ -144,67 +151,67 @@ Object.defineProperty(exports, "updateUserDetails", {
144
151
  });
145
152
  Object.defineProperty(exports, "addToCart", {
146
153
  enumerable: true,
147
- get: function () { return chunk26A3EBZI_cjs.addToCart; }
154
+ get: function () { return chunkA67PCF55_cjs.addToCart; }
148
155
  });
149
156
  Object.defineProperty(exports, "addWishlist", {
150
157
  enumerable: true,
151
- get: function () { return chunk26A3EBZI_cjs.addWishlist; }
158
+ get: function () { return chunkA67PCF55_cjs.addWishlist; }
152
159
  });
153
160
  Object.defineProperty(exports, "getCart", {
154
161
  enumerable: true,
155
- get: function () { return chunk26A3EBZI_cjs.getCart; }
162
+ get: function () { return chunkA67PCF55_cjs.getCart; }
156
163
  });
157
164
  Object.defineProperty(exports, "getCategories", {
158
165
  enumerable: true,
159
- get: function () { return chunk26A3EBZI_cjs.getCategories; }
166
+ get: function () { return chunkA67PCF55_cjs.getCategories; }
160
167
  });
161
168
  Object.defineProperty(exports, "getDigitalProductDownloadLink", {
162
169
  enumerable: true,
163
- get: function () { return chunk26A3EBZI_cjs.getDigitalProductDownloadLink; }
170
+ get: function () { return chunkA67PCF55_cjs.getDigitalProductDownloadLink; }
164
171
  });
165
172
  Object.defineProperty(exports, "getProductCategories", {
166
173
  enumerable: true,
167
- get: function () { return chunk26A3EBZI_cjs.getProductCategories; }
174
+ get: function () { return chunkA67PCF55_cjs.getProductCategories; }
168
175
  });
169
176
  Object.defineProperty(exports, "getProductDetail", {
170
177
  enumerable: true,
171
- get: function () { return chunk26A3EBZI_cjs.getProductDetail; }
178
+ get: function () { return chunkA67PCF55_cjs.getProductDetail; }
172
179
  });
173
180
  Object.defineProperty(exports, "getProductDetailBySlug", {
174
181
  enumerable: true,
175
- get: function () { return chunk26A3EBZI_cjs.getProductDetailBySlug; }
182
+ get: function () { return chunkA67PCF55_cjs.getProductDetailBySlug; }
176
183
  });
177
184
  Object.defineProperty(exports, "getProductList", {
178
185
  enumerable: true,
179
- get: function () { return chunk26A3EBZI_cjs.getProductList; }
186
+ get: function () { return chunkA67PCF55_cjs.getProductList; }
180
187
  });
181
188
  Object.defineProperty(exports, "getProducts", {
182
189
  enumerable: true,
183
- get: function () { return chunk26A3EBZI_cjs.getProducts; }
190
+ get: function () { return chunkA67PCF55_cjs.getProducts; }
184
191
  });
185
192
  Object.defineProperty(exports, "getWishlist", {
186
193
  enumerable: true,
187
- get: function () { return chunk26A3EBZI_cjs.getWishlist; }
194
+ get: function () { return chunkA67PCF55_cjs.getWishlist; }
188
195
  });
189
196
  Object.defineProperty(exports, "notifyProductStock", {
190
197
  enumerable: true,
191
- get: function () { return chunk26A3EBZI_cjs.notifyProductStock; }
198
+ get: function () { return chunkA67PCF55_cjs.notifyProductStock; }
192
199
  });
193
200
  Object.defineProperty(exports, "removeFromCart", {
194
201
  enumerable: true,
195
- get: function () { return chunk26A3EBZI_cjs.removeFromCart; }
202
+ get: function () { return chunkA67PCF55_cjs.removeFromCart; }
196
203
  });
197
204
  Object.defineProperty(exports, "removeFromWishlist", {
198
205
  enumerable: true,
199
- get: function () { return chunk26A3EBZI_cjs.removeFromWishlist; }
206
+ get: function () { return chunkA67PCF55_cjs.removeFromWishlist; }
200
207
  });
201
208
  Object.defineProperty(exports, "updateCart", {
202
209
  enumerable: true,
203
- get: function () { return chunk26A3EBZI_cjs.updateCart; }
210
+ get: function () { return chunkA67PCF55_cjs.updateCart; }
204
211
  });
205
212
  Object.defineProperty(exports, "updateDigitalProductDownloadLinkCount", {
206
213
  enumerable: true,
207
- get: function () { return chunk26A3EBZI_cjs.updateDigitalProductDownloadLinkCount; }
214
+ get: function () { return chunkA67PCF55_cjs.updateDigitalProductDownloadLinkCount; }
208
215
  });
209
216
  Object.defineProperty(exports, "applyCoupon", {
210
217
  enumerable: true,
@@ -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, {}>>;
@@ -93,7 +114,7 @@ declare function getCategories(responseType?: "flat" | "nested"): Promise<AxiosR
93
114
  declare function getProductDetailBySlug(url: string, slug: string): Promise<ProductDetail.Root | null>;
94
115
  declare function notifyProductStock(userDetails: unknown): Promise<AxiosResponse<any, any, {}>>;
95
116
 
96
- declare function getWishlist(url: string): Promise<Wishlist.Root>;
117
+ declare function getWishlist(url: string): Promise<AxiosResponse<Wishlist.Root>>;
97
118
  declare function addWishlist(productDetails: {
98
119
  action: "add" | "remove";
99
120
  product_variants: number[];
@@ -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, {}>>;
@@ -93,7 +114,7 @@ declare function getCategories(responseType?: "flat" | "nested"): Promise<AxiosR
93
114
  declare function getProductDetailBySlug(url: string, slug: string): Promise<ProductDetail.Root | null>;
94
115
  declare function notifyProductStock(userDetails: unknown): Promise<AxiosResponse<any, any, {}>>;
95
116
 
96
- declare function getWishlist(url: string): Promise<Wishlist.Root>;
117
+ declare function getWishlist(url: string): Promise<AxiosResponse<Wishlist.Root>>;
97
118
  declare function addWishlist(productDetails: {
98
119
  action: "add" | "remove";
99
120
  product_variants: number[];
@@ -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
@@ -1,5 +1,5 @@
1
1
  export { getUserDetails, updateUserDetails } from '../chunk-C7ZJZEEN.js';
2
- export { addToCart, addWishlist, getCart, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-Y6NFUWTH.js';
2
+ export { addToCart, addWishlist, getCart, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-ERLBPVFK.js';
3
3
  import '../chunk-QAC72HKO.js';
4
4
  export { applyCoupon, checkPhonepePaymentStatus, getAppliedCoupon, getCoupons, getOrderDetails, getOrderDetailsByNumber, getOrders, getPublicOrderDetailsByNumber, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-GHABOHLA.js';
5
5
  export { addAddress, deleteAddress, getAddresses, getCountries, getSubdivisions, updateAddress } from '../chunk-YY77CUWX.js';
@@ -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
  /**
@@ -101,8 +101,7 @@ async function notifyProductStock(userDetails) {
101
101
 
102
102
  // src/api/wishlist.ts
103
103
  async function getWishlist(url) {
104
- const response = await chunkZO2HREQL_cjs.http_service_default.get(url);
105
- return response.data;
104
+ return await chunkZO2HREQL_cjs.http_service_default.get(url);
106
105
  }
107
106
  async function addWishlist(productDetails) {
108
107
  return chunkZO2HREQL_cjs.http_service_default.post("/customer/wishlist/", productDetails);
@@ -99,8 +99,7 @@ async function notifyProductStock(userDetails) {
99
99
 
100
100
  // src/api/wishlist.ts
101
101
  async function getWishlist(url) {
102
- const response = await http_service_default.get(url);
103
- return response.data;
102
+ return await http_service_default.get(url);
104
103
  }
105
104
  async function addWishlist(productDetails) {
106
105
  return http_service_default.post("/customer/wishlist/", productDetails);