@storepecker/storefront-core 2.9.1 → 2.10.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 (65) hide show
  1. package/dist/address-BdIB6IuI.d.cts +42 -0
  2. package/dist/address-BdIB6IuI.d.ts +42 -0
  3. package/dist/api/index.cjs +16 -12
  4. package/dist/api/index.d.cts +13 -3
  5. package/dist/api/index.d.ts +13 -3
  6. package/dist/api/index.js +2 -2
  7. package/dist/{buy-now-BqVWXyy8.d.cts → buy-now-B_15RUVT.d.cts} +1 -1
  8. package/dist/{buy-now-DFdnuLjO.d.ts → buy-now-kII0KrhP.d.ts} +1 -1
  9. package/dist/checkout/index.cjs +108 -15
  10. package/dist/checkout/index.d.cts +25 -1
  11. package/dist/checkout/index.d.ts +25 -1
  12. package/dist/checkout/index.js +3 -2
  13. package/dist/{chunk-IG4BW3ZB.cjs → chunk-32X4SWN4.cjs} +3 -3
  14. package/dist/{chunk-RDUT4W3B.cjs → chunk-6APRQ2ED.cjs} +4 -1
  15. package/dist/{chunk-ICKTXS6B.js → chunk-6IXTFZFS.js} +3 -3
  16. package/dist/{chunk-7M5CVYZJ.js → chunk-A7EI7XLU.js} +8 -1
  17. package/dist/{chunk-CBKJ3Y2I.js → chunk-EWZ7TGI7.js} +11 -1
  18. package/dist/{chunk-5XVHYPOC.js → chunk-FF5N7PTB.js} +1 -1
  19. package/dist/{chunk-XFOUNOKO.cjs → chunk-KNG4OMS5.cjs} +8 -0
  20. package/dist/chunk-QED6QJZC.cjs +603 -0
  21. package/dist/{chunk-W6BDMNSU.js → chunk-QVO56X4E.js} +1 -1
  22. package/dist/{chunk-6LS5F4R3.cjs → chunk-SGJUMI3M.cjs} +11 -0
  23. package/dist/{chunk-YLLAP3H2.cjs → chunk-SGKLMS7W.cjs} +2 -2
  24. package/dist/{chunk-ZGMLOLTC.js → chunk-VRZRV2BR.js} +4 -1
  25. package/dist/{chunk-IVKJJLG7.cjs → chunk-WWJAPKRQ.cjs} +8 -8
  26. package/dist/chunk-Y4RNRPBC.js +545 -0
  27. package/dist/components/address-form.cjs +6 -6
  28. package/dist/components/address-form.d.cts +10 -6
  29. package/dist/components/address-form.d.ts +10 -6
  30. package/dist/components/address-form.js +5 -5
  31. package/dist/components/index.cjs +8 -8
  32. package/dist/components/index.d.cts +3 -3
  33. package/dist/components/index.d.ts +3 -3
  34. package/dist/components/index.js +6 -6
  35. package/dist/components/search-dropdown.d.cts +4 -4
  36. package/dist/components/search-dropdown.d.ts +4 -4
  37. package/dist/components/share-button.cjs +3 -3
  38. package/dist/components/share-button.js +2 -2
  39. package/dist/components/theme-data-initializer.d.cts +1 -1
  40. package/dist/components/theme-data-initializer.d.ts +1 -1
  41. package/dist/hooks/index.cjs +644 -20
  42. package/dist/hooks/index.d.cts +233 -9
  43. package/dist/hooks/index.d.ts +233 -9
  44. package/dist/hooks/index.js +624 -8
  45. package/dist/models/index.d.cts +3 -2
  46. package/dist/models/index.d.ts +3 -2
  47. package/dist/pincode-8u7yWLpQ.d.cts +29 -0
  48. package/dist/pincode-8u7yWLpQ.d.ts +29 -0
  49. package/dist/pincode-CHM-ZD3H.d.ts +179 -0
  50. package/dist/pincode-Ch3bZSJz.d.cts +179 -0
  51. package/dist/{pixelEvents-BtEO5QAR.d.cts → pixelEvents-COqZIgTu.d.cts} +1 -0
  52. package/dist/{pixelEvents-LsealscG.d.ts → pixelEvents-Ds6fwS9t.d.ts} +1 -0
  53. package/dist/store/index.d.cts +1 -1
  54. package/dist/store/index.d.ts +1 -1
  55. package/dist/{useAddressForm-DGbEn91-.d.cts → useAddressForm-fMOb5Z-a.d.ts} +6 -1
  56. package/dist/{useAddressForm-cO3Au33k.d.ts → useAddressForm-wleIo78M.d.cts} +6 -1
  57. package/dist/utils/index.cjs +58 -54
  58. package/dist/utils/index.d.cts +12 -3
  59. package/dist/utils/index.d.ts +12 -3
  60. package/dist/utils/index.js +3 -3
  61. package/package.json +1 -1
  62. package/dist/address-DwBZHzbI.d.cts +0 -19
  63. package/dist/address-DwBZHzbI.d.ts +0 -19
  64. package/dist/chunk-34Y7Y5FU.cjs +0 -246
  65. package/dist/chunk-VPTN4YXD.js +0 -232
@@ -0,0 +1,42 @@
1
+ interface Address {
2
+ id: number;
3
+ customer: number;
4
+ address: string;
5
+ city: string;
6
+ state: string;
7
+ state_obj: string;
8
+ customer_email: string;
9
+ country: string;
10
+ pincode: string;
11
+ latitude: number | null;
12
+ longitude: number | null;
13
+ is_default: boolean;
14
+ customer_name: string;
15
+ customer_phone: string;
16
+ customer_country_code: string;
17
+ /** Country id as sent on save; present on addresses from the country-aware form. */
18
+ country_obj?: string | number | null;
19
+ }
20
+ /**
21
+ * What the country-aware address form sends to `/store/customer_address/` and
22
+ * hands to the guest checkouts. The second address line is folded into
23
+ * `address`, not sent on its own.
24
+ */
25
+ interface AddressPayload {
26
+ customer_name: string;
27
+ customer_email: string;
28
+ customer_phone: string;
29
+ /** Dial code with the plus, e.g. "+91". */
30
+ customer_country_code: string;
31
+ address: string;
32
+ city: string;
33
+ state_obj: string;
34
+ state: string;
35
+ country_obj: number;
36
+ country: string;
37
+ /** "N/A" for countries with no postal code. */
38
+ pincode: string;
39
+ is_default: boolean;
40
+ }
41
+
42
+ export type { Address as A, AddressPayload as a };
@@ -0,0 +1,42 @@
1
+ interface Address {
2
+ id: number;
3
+ customer: number;
4
+ address: string;
5
+ city: string;
6
+ state: string;
7
+ state_obj: string;
8
+ customer_email: string;
9
+ country: string;
10
+ pincode: string;
11
+ latitude: number | null;
12
+ longitude: number | null;
13
+ is_default: boolean;
14
+ customer_name: string;
15
+ customer_phone: string;
16
+ customer_country_code: string;
17
+ /** Country id as sent on save; present on addresses from the country-aware form. */
18
+ country_obj?: string | number | null;
19
+ }
20
+ /**
21
+ * What the country-aware address form sends to `/store/customer_address/` and
22
+ * hands to the guest checkouts. The second address line is folded into
23
+ * `address`, not sent on its own.
24
+ */
25
+ interface AddressPayload {
26
+ customer_name: string;
27
+ customer_email: string;
28
+ customer_phone: string;
29
+ /** Dial code with the plus, e.g. "+91". */
30
+ customer_country_code: string;
31
+ address: string;
32
+ city: string;
33
+ state_obj: string;
34
+ state: string;
35
+ country_obj: number;
36
+ country: string;
37
+ /** "N/A" for countries with no postal code. */
38
+ pincode: string;
39
+ is_default: boolean;
40
+ }
41
+
42
+ export type { Address as A, AddressPayload as a };
@@ -3,9 +3,9 @@
3
3
  var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
4
4
  var chunkNRPK5GCJ_cjs = require('../chunk-NRPK5GCJ.cjs');
5
5
  require('../chunk-NQZ5GUOG.cjs');
6
- var chunkXFOUNOKO_cjs = require('../chunk-XFOUNOKO.cjs');
6
+ var chunkKNG4OMS5_cjs = require('../chunk-KNG4OMS5.cjs');
7
7
  var chunkH6FJYRO3_cjs = require('../chunk-H6FJYRO3.cjs');
8
- var chunkRDUT4W3B_cjs = require('../chunk-RDUT4W3B.cjs');
8
+ var chunk6APRQ2ED_cjs = require('../chunk-6APRQ2ED.cjs');
9
9
  var chunkECHV2JSY_cjs = require('../chunk-ECHV2JSY.cjs');
10
10
  require('../chunk-BBRXE57K.cjs');
11
11
  require('../chunk-NE3ZHELZ.cjs');
@@ -245,19 +245,23 @@ Object.defineProperty(exports, "updateDigitalProductDownloadLinkCount", {
245
245
  });
246
246
  Object.defineProperty(exports, "applyCoupon", {
247
247
  enumerable: true,
248
- get: function () { return chunkXFOUNOKO_cjs.applyCoupon; }
248
+ get: function () { return chunkKNG4OMS5_cjs.applyCoupon; }
249
249
  });
250
250
  Object.defineProperty(exports, "getAppliedCoupon", {
251
251
  enumerable: true,
252
- get: function () { return chunkXFOUNOKO_cjs.getAppliedCoupon; }
252
+ get: function () { return chunkKNG4OMS5_cjs.getAppliedCoupon; }
253
253
  });
254
254
  Object.defineProperty(exports, "getCoupons", {
255
255
  enumerable: true,
256
- get: function () { return chunkXFOUNOKO_cjs.getCoupons; }
256
+ get: function () { return chunkKNG4OMS5_cjs.getCoupons; }
257
+ });
258
+ Object.defineProperty(exports, "getPincodeDetails", {
259
+ enumerable: true,
260
+ get: function () { return chunkKNG4OMS5_cjs.getPincodeDetails; }
257
261
  });
258
262
  Object.defineProperty(exports, "removeCoupon", {
259
263
  enumerable: true,
260
- get: function () { return chunkXFOUNOKO_cjs.removeCoupon; }
264
+ get: function () { return chunkKNG4OMS5_cjs.removeCoupon; }
261
265
  });
262
266
  Object.defineProperty(exports, "buyNowPreview", {
263
267
  enumerable: true,
@@ -409,27 +413,27 @@ Object.defineProperty(exports, "verifyTabbyPayment", {
409
413
  });
410
414
  Object.defineProperty(exports, "addAddress", {
411
415
  enumerable: true,
412
- get: function () { return chunkRDUT4W3B_cjs.addAddress; }
416
+ get: function () { return chunk6APRQ2ED_cjs.addAddress; }
413
417
  });
414
418
  Object.defineProperty(exports, "deleteAddress", {
415
419
  enumerable: true,
416
- get: function () { return chunkRDUT4W3B_cjs.deleteAddress; }
420
+ get: function () { return chunk6APRQ2ED_cjs.deleteAddress; }
417
421
  });
418
422
  Object.defineProperty(exports, "getAddresses", {
419
423
  enumerable: true,
420
- get: function () { return chunkRDUT4W3B_cjs.getAddresses; }
424
+ get: function () { return chunk6APRQ2ED_cjs.getAddresses; }
421
425
  });
422
426
  Object.defineProperty(exports, "getCountries", {
423
427
  enumerable: true,
424
- get: function () { return chunkRDUT4W3B_cjs.getCountries; }
428
+ get: function () { return chunk6APRQ2ED_cjs.getCountries; }
425
429
  });
426
430
  Object.defineProperty(exports, "getSubdivisions", {
427
431
  enumerable: true,
428
- get: function () { return chunkRDUT4W3B_cjs.getSubdivisions; }
432
+ get: function () { return chunk6APRQ2ED_cjs.getSubdivisions; }
429
433
  });
430
434
  Object.defineProperty(exports, "updateAddress", {
431
435
  enumerable: true,
432
- get: function () { return chunkRDUT4W3B_cjs.updateAddress; }
436
+ get: function () { return chunk6APRQ2ED_cjs.updateAddress; }
433
437
  });
434
438
  Object.defineProperty(exports, "getHttpService", {
435
439
  enumerable: true,
@@ -1,13 +1,14 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance, AxiosResponse } from 'axios';
3
- import { A as Address } from '../address-DwBZHzbI.cjs';
3
+ import { A as Address } from '../address-BdIB6IuI.cjs';
4
4
  import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-DwMFBmpC.cjs';
5
5
  import { d as Product, f as ProductDetail } from '../product-D9liEtl4.cjs';
6
6
  import { O as Order } from '../orders-B3G4CyhH.cjs';
7
- import { B as BuyNow, P as PublicCheckout } from '../buy-now-BqVWXyy8.cjs';
7
+ import { B as BuyNow, P as PublicCheckout } from '../buy-now-B_15RUVT.cjs';
8
8
  import { W as Wishlist } from '../wishlist-BakHvIFN.cjs';
9
9
  import { C as CollectionResponse } from '../collections-CXgOv5_G.cjs';
10
10
  import { R as Review, A as Analytics, a as Booking, B as Blog, I as Instagram } from '../instagram-DalreBu6.cjs';
11
+ import { P as Pincode } from '../pincode-8u7yWLpQ.cjs';
11
12
  import 'react-toastify';
12
13
 
13
14
  /**
@@ -297,4 +298,13 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
297
298
  */
298
299
  declare function getInstagramMedia(ids: string | (string | number)[]): Promise<AxiosResponse<Instagram.MediaRefreshResponse>>;
299
300
 
300
- export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, mergeCart, notifyProductStock, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, postAnalytics, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
301
+ /**
302
+ * Look a pincode up against the backend's postal-code database.
303
+ *
304
+ * @param pincode The postal code to look up.
305
+ * @param country ISO2 of the selected country. Optional: the backend falls
306
+ * back to the store's country.
307
+ */
308
+ declare const getPincodeDetails: (pincode: string, country?: string) => Promise<AxiosResponse<Pincode.LookupResponse>>;
309
+
310
+ export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPincodeDetails, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, mergeCart, notifyProductStock, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, postAnalytics, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
@@ -1,13 +1,14 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance, AxiosResponse } from 'axios';
3
- import { A as Address } from '../address-DwBZHzbI.js';
3
+ import { A as Address } from '../address-BdIB6IuI.js';
4
4
  import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-DZq1ZEnE.js';
5
5
  import { d as Product, f as ProductDetail } from '../product-D9liEtl4.js';
6
6
  import { O as Order } from '../orders-Bl-Slh72.js';
7
- import { B as BuyNow, P as PublicCheckout } from '../buy-now-DFdnuLjO.js';
7
+ import { B as BuyNow, P as PublicCheckout } from '../buy-now-kII0KrhP.js';
8
8
  import { W as Wishlist } from '../wishlist-Cj0sQxiY.js';
9
9
  import { C as CollectionResponse } from '../collections-CNh2OGbl.js';
10
10
  import { R as Review, A as Analytics, a as Booking, B as Blog, I as Instagram } from '../instagram-BADLnNQ3.js';
11
+ import { P as Pincode } from '../pincode-8u7yWLpQ.js';
11
12
  import 'react-toastify';
12
13
 
13
14
  /**
@@ -297,4 +298,13 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
297
298
  */
298
299
  declare function getInstagramMedia(ids: string | (string | number)[]): Promise<AxiosResponse<Instagram.MediaRefreshResponse>>;
299
300
 
300
- export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, mergeCart, notifyProductStock, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, postAnalytics, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
301
+ /**
302
+ * Look a pincode up against the backend's postal-code database.
303
+ *
304
+ * @param pincode The postal code to look up.
305
+ * @param country ISO2 of the selected country. Optional: the backend falls
306
+ * back to the store's country.
307
+ */
308
+ declare const getPincodeDetails: (pincode: string, country?: string) => Promise<AxiosResponse<Pincode.LookupResponse>>;
309
+
310
+ export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPincodeDetails, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, mergeCart, notifyProductStock, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, postAnalytics, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
package/dist/api/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  export { getUserDetails, updateUserDetails } from '../chunk-WYXT5AAG.js';
2
2
  export { addToCart, addWishlist, getCart, getCartItemQuantity, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, mergeCart, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-ZAWZ3RB6.js';
3
3
  import '../chunk-TH7OAMGC.js';
4
- export { applyCoupon, getAppliedCoupon, getCoupons, removeCoupon } from '../chunk-7M5CVYZJ.js';
4
+ export { applyCoupon, getAppliedCoupon, getCoupons, getPincodeDetails, removeCoupon } from '../chunk-A7EI7XLU.js';
5
5
  export { buyNowPreview, checkPhonepePaymentStatus, checkPhonepePaymentStatusPublic, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePaymentFailure, phonepePublicOrderSuccess, placeBuyNowOrder, placeGuestBuyNowOrder, placeOrder, placePublicOrder, publicCheckoutPreview, publicMakeCODOrder, publicPhonepeOrderFailure, publicPlaceOrder, publicRazorpayOrderFailure, publicStripeOrderFailure, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, tabbyPaymentFailure, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-KCLVR6G5.js';
6
- export { addAddress, deleteAddress, getAddresses, getCountries, getSubdivisions, updateAddress } from '../chunk-ZGMLOLTC.js';
6
+ export { addAddress, deleteAddress, getAddresses, getCountries, getSubdivisions, updateAddress } from '../chunk-VRZRV2BR.js';
7
7
  import { http_service_default } from '../chunk-3SYYP3XV.js';
8
8
  export { getHttpService, http_service_default as httpService, resetHttpService, setSessionExpiredCallback } from '../chunk-3SYYP3XV.js';
9
9
  import '../chunk-WEMNXIRS.js';
@@ -1,4 +1,4 @@
1
- import { A as Address } from './address-DwBZHzbI.cjs';
1
+ import { A as Address } from './address-BdIB6IuI.cjs';
2
2
  import { C as Cart, c as Coupon } from './cart-DwMFBmpC.cjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { A as Address } from './address-DwBZHzbI.js';
1
+ import { A as Address } from './address-BdIB6IuI.js';
2
2
  import { C as Cart, c as Coupon } from './cart-DZq1ZEnE.js';
3
3
 
4
4
  /**
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunk34Y7Y5FU_cjs = require('../chunk-34Y7Y5FU.cjs');
4
- require('../chunk-XFOUNOKO.cjs');
3
+ var chunkQED6QJZC_cjs = require('../chunk-QED6QJZC.cjs');
4
+ require('../chunk-KNG4OMS5.cjs');
5
5
  var chunkNSAHGMS7_cjs = require('../chunk-NSAHGMS7.cjs');
6
6
  var chunkH6FJYRO3_cjs = require('../chunk-H6FJYRO3.cjs');
7
7
  var chunkTB72NPRM_cjs = require('../chunk-TB72NPRM.cjs');
8
+ require('../chunk-LJUGNSQQ.cjs');
8
9
  require('../chunk-ECHV2JSY.cjs');
9
10
  require('../chunk-BBRXE57K.cjs');
10
11
  require('../chunk-NE3ZHELZ.cjs');
@@ -169,57 +170,149 @@ async function checkTabbyReturnStatus(orderNumber, callbacks, options) {
169
170
  }
170
171
  }
171
172
 
173
+ Object.defineProperty(exports, "DEFAULT_ADDRESS_SCHEMA_MESSAGES", {
174
+ enumerable: true,
175
+ get: function () { return chunkQED6QJZC_cjs.DEFAULT_ADDRESS_SCHEMA_MESSAGES; }
176
+ });
177
+ Object.defineProperty(exports, "INVALID_PINCODE", {
178
+ enumerable: true,
179
+ get: function () { return chunkQED6QJZC_cjs.INVALID_PINCODE; }
180
+ });
181
+ Object.defineProperty(exports, "NO_POSTAL_CODE", {
182
+ enumerable: true,
183
+ get: function () { return chunkQED6QJZC_cjs.NO_POSTAL_CODE; }
184
+ });
185
+ Object.defineProperty(exports, "PINCODE_DEBOUNCE_MS", {
186
+ enumerable: true,
187
+ get: function () { return chunkQED6QJZC_cjs.PINCODE_DEBOUNCE_MS; }
188
+ });
189
+ Object.defineProperty(exports, "PINCODE_MIN_LENGTH", {
190
+ enumerable: true,
191
+ get: function () { return chunkQED6QJZC_cjs.PINCODE_MIN_LENGTH; }
192
+ });
193
+ Object.defineProperty(exports, "PINCODE_VALIDATION_UNAVAILABLE", {
194
+ enumerable: true,
195
+ get: function () { return chunkQED6QJZC_cjs.PINCODE_VALIDATION_UNAVAILABLE; }
196
+ });
172
197
  Object.defineProperty(exports, "applyCheckoutCoupon", {
173
198
  enumerable: true,
174
- get: function () { return chunk34Y7Y5FU_cjs.applyCheckoutCoupon; }
199
+ get: function () { return chunkQED6QJZC_cjs.applyCheckoutCoupon; }
200
+ });
201
+ Object.defineProperty(exports, "buildAddressFormat", {
202
+ enumerable: true,
203
+ get: function () { return chunkQED6QJZC_cjs.buildAddressFormat; }
204
+ });
205
+ Object.defineProperty(exports, "buildAddressSchema", {
206
+ enumerable: true,
207
+ get: function () { return chunkQED6QJZC_cjs.buildAddressSchema; }
208
+ });
209
+ Object.defineProperty(exports, "clearPincodeCache", {
210
+ enumerable: true,
211
+ get: function () { return chunkQED6QJZC_cjs.clearPincodeCache; }
175
212
  });
176
213
  Object.defineProperty(exports, "fetchAppliedCoupon", {
177
214
  enumerable: true,
178
- get: function () { return chunk34Y7Y5FU_cjs.fetchAppliedCoupon; }
215
+ get: function () { return chunkQED6QJZC_cjs.fetchAppliedCoupon; }
179
216
  });
180
217
  Object.defineProperty(exports, "fetchAvailableCoupons", {
181
218
  enumerable: true,
182
- get: function () { return chunk34Y7Y5FU_cjs.fetchAvailableCoupons; }
219
+ get: function () { return chunkQED6QJZC_cjs.fetchAvailableCoupons; }
220
+ });
221
+ Object.defineProperty(exports, "findStateByName", {
222
+ enumerable: true,
223
+ get: function () { return chunkQED6QJZC_cjs.findStateByName; }
224
+ });
225
+ Object.defineProperty(exports, "findSubdivision", {
226
+ enumerable: true,
227
+ get: function () { return chunkQED6QJZC_cjs.findSubdivision; }
228
+ });
229
+ Object.defineProperty(exports, "getAreaOptions", {
230
+ enumerable: true,
231
+ get: function () { return chunkQED6QJZC_cjs.getAreaOptions; }
232
+ });
233
+ Object.defineProperty(exports, "getPincodeError", {
234
+ enumerable: true,
235
+ get: function () { return chunkQED6QJZC_cjs.getPincodeError; }
236
+ });
237
+ Object.defineProperty(exports, "getPostcodeHint", {
238
+ enumerable: true,
239
+ get: function () { return chunkQED6QJZC_cjs.getPostcodeHint; }
183
240
  });
184
241
  Object.defineProperty(exports, "handleCODPayment", {
185
242
  enumerable: true,
186
- get: function () { return chunk34Y7Y5FU_cjs.handleCODPayment; }
243
+ get: function () { return chunkQED6QJZC_cjs.handleCODPayment; }
187
244
  });
188
245
  Object.defineProperty(exports, "handlePhonepePayment", {
189
246
  enumerable: true,
190
- get: function () { return chunk34Y7Y5FU_cjs.handlePhonepePayment; }
247
+ get: function () { return chunkQED6QJZC_cjs.handlePhonepePayment; }
191
248
  });
192
249
  Object.defineProperty(exports, "handleRazorpayFail", {
193
250
  enumerable: true,
194
- get: function () { return chunk34Y7Y5FU_cjs.handleRazorpayFail; }
251
+ get: function () { return chunkQED6QJZC_cjs.handleRazorpayFail; }
195
252
  });
196
253
  Object.defineProperty(exports, "handleRazorpaySuccess", {
197
254
  enumerable: true,
198
- get: function () { return chunk34Y7Y5FU_cjs.handleRazorpaySuccess; }
255
+ get: function () { return chunkQED6QJZC_cjs.handleRazorpaySuccess; }
199
256
  });
200
257
  Object.defineProperty(exports, "handleStripePayment", {
201
258
  enumerable: true,
202
- get: function () { return chunk34Y7Y5FU_cjs.handleStripePayment; }
259
+ get: function () { return chunkQED6QJZC_cjs.handleStripePayment; }
203
260
  });
204
261
  Object.defineProperty(exports, "handleStripeSuccess", {
205
262
  enumerable: true,
206
- get: function () { return chunk34Y7Y5FU_cjs.handleStripeSuccess; }
263
+ get: function () { return chunkQED6QJZC_cjs.handleStripeSuccess; }
207
264
  });
208
265
  Object.defineProperty(exports, "handleTabbyPayment", {
209
266
  enumerable: true,
210
- get: function () { return chunk34Y7Y5FU_cjs.handleTabbyPayment; }
267
+ get: function () { return chunkQED6QJZC_cjs.handleTabbyPayment; }
268
+ });
269
+ Object.defineProperty(exports, "isValidNumber", {
270
+ enumerable: true,
271
+ get: function () { return chunkQED6QJZC_cjs.isValidNumber; }
272
+ });
273
+ Object.defineProperty(exports, "joinAddressLines", {
274
+ enumerable: true,
275
+ get: function () { return chunkQED6QJZC_cjs.joinAddressLines; }
276
+ });
277
+ Object.defineProperty(exports, "loadAddressFormat", {
278
+ enumerable: true,
279
+ get: function () { return chunkQED6QJZC_cjs.loadAddressFormat; }
280
+ });
281
+ Object.defineProperty(exports, "lowerLabel", {
282
+ enumerable: true,
283
+ get: function () { return chunkQED6QJZC_cjs.lowerLabel; }
284
+ });
285
+ Object.defineProperty(exports, "normalizePostcode", {
286
+ enumerable: true,
287
+ get: function () { return chunkQED6QJZC_cjs.normalizePostcode; }
211
288
  });
212
289
  Object.defineProperty(exports, "openRazorpayCheckout", {
213
290
  enumerable: true,
214
- get: function () { return chunk34Y7Y5FU_cjs.openRazorpayCheckout; }
291
+ get: function () { return chunkQED6QJZC_cjs.openRazorpayCheckout; }
215
292
  });
216
293
  Object.defineProperty(exports, "processPayment", {
217
294
  enumerable: true,
218
- get: function () { return chunk34Y7Y5FU_cjs.processPayment; }
295
+ get: function () { return chunkQED6QJZC_cjs.processPayment; }
219
296
  });
220
297
  Object.defineProperty(exports, "removeCheckoutCoupon", {
221
298
  enumerable: true,
222
- get: function () { return chunk34Y7Y5FU_cjs.removeCheckoutCoupon; }
299
+ get: function () { return chunkQED6QJZC_cjs.removeCheckoutCoupon; }
300
+ });
301
+ Object.defineProperty(exports, "sanitizePhoneInput", {
302
+ enumerable: true,
303
+ get: function () { return chunkQED6QJZC_cjs.sanitizePhoneInput; }
304
+ });
305
+ Object.defineProperty(exports, "sanitizePincode", {
306
+ enumerable: true,
307
+ get: function () { return chunkQED6QJZC_cjs.sanitizePincode; }
308
+ });
309
+ Object.defineProperty(exports, "usableEmail", {
310
+ enumerable: true,
311
+ get: function () { return chunkQED6QJZC_cjs.usableEmail; }
312
+ });
313
+ Object.defineProperty(exports, "validatePincode", {
314
+ enumerable: true,
315
+ get: function () { return chunkQED6QJZC_cjs.validatePincode; }
223
316
  });
224
317
  Object.defineProperty(exports, "IP_API_CACHE_KEY", {
225
318
  enumerable: true,
@@ -1,6 +1,8 @@
1
1
  import * as Yup from 'yup';
2
+ export { A as AddressFormat, a as AddressSchemaMessages, D as DEFAULT_ADDRESS_SCHEMA_MESSAGES, I as INVALID_PINCODE, N as NO_POSTAL_CODE, P as PINCODE_DEBOUNCE_MS, b as PINCODE_MIN_LENGTH, c as PINCODE_VALIDATION_UNAVAILABLE, d as PincodeCheck, e as PincodeMatch, R as RawAddressData, f as buildAddressFormat, g as buildAddressSchema, h as clearPincodeCache, i as findStateByName, j as findSubdivision, k as getAreaOptions, l as getPincodeError, m as getPostcodeHint, n as joinAddressLines, o as loadAddressFormat, p as lowerLabel, q as normalizePostcode, s as sanitizePincode, u as usableEmail, v as validatePincode } from '../pincode-Ch3bZSJz.cjs';
2
3
  import { C as Cart, c as Coupon } from '../cart-DwMFBmpC.cjs';
3
4
  import { O as Order } from '../orders-B3G4CyhH.cjs';
5
+ import '../pincode-8u7yWLpQ.cjs';
4
6
  import '../product-D9liEtl4.cjs';
5
7
  import 'react-toastify';
6
8
 
@@ -24,6 +26,10 @@ declare const addressFormInitialValues: AddressFormValues;
24
26
  /**
25
27
  * Strip country calling code prefix and trim whitespace from a phone number.
26
28
  * E.g. "+919876543210" with countryCode "IN" → "9876543210"
29
+ *
30
+ * @deprecated Strips a leading calling code without checking the rest is a
31
+ * valid number, so an Indian number starting with 91 loses digits. Use
32
+ * `sanitizePhoneInput` from `/checkout`.
27
33
  */
28
34
  declare function sanitizePhoneNumber(input: string, countryCode: string): string;
29
35
  /**
@@ -127,6 +133,24 @@ declare function buildSubmitPayload(values: AddressFormValues & {
127
133
  name: string;
128
134
  }>): any;
129
135
 
136
+ /**
137
+ * Validate a national phone number for a given country (e.g. "IN").
138
+ *
139
+ * Uses libphonenumber-js's default (min) metadata, which checks the number's
140
+ * length for the country rather than its full digit pattern
141
+ */
142
+ declare function isValidNumber(input: string, code: string): boolean;
143
+ /**
144
+ * Address forms have a separate country/calling-code dropdown, but users often
145
+ * still type the code into the phone field itself (e.g. "+91 98765...",
146
+ * "0091...", "91 98765..."). This strips the code so only the national number
147
+ * is kept.
148
+ *
149
+ * @param raw The raw value typed into the phone input.
150
+ * @param countryCode The ISO code currently selected (e.g. "IN").
151
+ */
152
+ declare function sanitizePhoneInput(raw: string, countryCode: string): string;
153
+
130
154
  interface CartTotals {
131
155
  totalSellingAmount: number;
132
156
  discountAmount: number;
@@ -291,4 +315,4 @@ declare function checkTabbyReturnStatus(orderNumber: number, callbacks: PaymentS
291
315
  isPublic?: boolean;
292
316
  }): Promise<void>;
293
317
 
294
- export { type AddressFormValues, type CartTotals, type CouponCallbacks, IP_API_CACHE_KEY, type PaymentCallbacks, type PaymentStatusCallbacks, type PlacementErrorAction, type PlacementErrorInfo, addressFormInitialValues, addressValidationSchema, applyCheckoutCoupon, buildAddressPayload, buildSubmitPayload, calculateCartTotals, checkPhonepeReturnStatus, checkPhonepeReturnStatusWithOrder, checkStripeReturnStatus, checkTabbyReturnStatus, clearAddressFormSession, decodeAddress, describePlacementError, encodeAddress, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, isValidPhoneNumber, loadAddressFormFromSession, openRazorpayCheckout, parseEditAddress, processPayment, removeCheckoutCoupon, sanitizePhoneNumber, saveAddressFormToSession };
318
+ export { type AddressFormValues, type CartTotals, type CouponCallbacks, IP_API_CACHE_KEY, type PaymentCallbacks, type PaymentStatusCallbacks, type PlacementErrorAction, type PlacementErrorInfo, addressFormInitialValues, addressValidationSchema, applyCheckoutCoupon, buildAddressPayload, buildSubmitPayload, calculateCartTotals, checkPhonepeReturnStatus, checkPhonepeReturnStatusWithOrder, checkStripeReturnStatus, checkTabbyReturnStatus, clearAddressFormSession, decodeAddress, describePlacementError, encodeAddress, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, isValidNumber, isValidPhoneNumber, loadAddressFormFromSession, openRazorpayCheckout, parseEditAddress, processPayment, removeCheckoutCoupon, sanitizePhoneInput, sanitizePhoneNumber, saveAddressFormToSession };
@@ -1,6 +1,8 @@
1
1
  import * as Yup from 'yup';
2
+ export { A as AddressFormat, a as AddressSchemaMessages, D as DEFAULT_ADDRESS_SCHEMA_MESSAGES, I as INVALID_PINCODE, N as NO_POSTAL_CODE, P as PINCODE_DEBOUNCE_MS, b as PINCODE_MIN_LENGTH, c as PINCODE_VALIDATION_UNAVAILABLE, d as PincodeCheck, e as PincodeMatch, R as RawAddressData, f as buildAddressFormat, g as buildAddressSchema, h as clearPincodeCache, i as findStateByName, j as findSubdivision, k as getAreaOptions, l as getPincodeError, m as getPostcodeHint, n as joinAddressLines, o as loadAddressFormat, p as lowerLabel, q as normalizePostcode, s as sanitizePincode, u as usableEmail, v as validatePincode } from '../pincode-CHM-ZD3H.js';
2
3
  import { C as Cart, c as Coupon } from '../cart-DZq1ZEnE.js';
3
4
  import { O as Order } from '../orders-Bl-Slh72.js';
5
+ import '../pincode-8u7yWLpQ.js';
4
6
  import '../product-D9liEtl4.js';
5
7
  import 'react-toastify';
6
8
 
@@ -24,6 +26,10 @@ declare const addressFormInitialValues: AddressFormValues;
24
26
  /**
25
27
  * Strip country calling code prefix and trim whitespace from a phone number.
26
28
  * E.g. "+919876543210" with countryCode "IN" → "9876543210"
29
+ *
30
+ * @deprecated Strips a leading calling code without checking the rest is a
31
+ * valid number, so an Indian number starting with 91 loses digits. Use
32
+ * `sanitizePhoneInput` from `/checkout`.
27
33
  */
28
34
  declare function sanitizePhoneNumber(input: string, countryCode: string): string;
29
35
  /**
@@ -127,6 +133,24 @@ declare function buildSubmitPayload(values: AddressFormValues & {
127
133
  name: string;
128
134
  }>): any;
129
135
 
136
+ /**
137
+ * Validate a national phone number for a given country (e.g. "IN").
138
+ *
139
+ * Uses libphonenumber-js's default (min) metadata, which checks the number's
140
+ * length for the country rather than its full digit pattern
141
+ */
142
+ declare function isValidNumber(input: string, code: string): boolean;
143
+ /**
144
+ * Address forms have a separate country/calling-code dropdown, but users often
145
+ * still type the code into the phone field itself (e.g. "+91 98765...",
146
+ * "0091...", "91 98765..."). This strips the code so only the national number
147
+ * is kept.
148
+ *
149
+ * @param raw The raw value typed into the phone input.
150
+ * @param countryCode The ISO code currently selected (e.g. "IN").
151
+ */
152
+ declare function sanitizePhoneInput(raw: string, countryCode: string): string;
153
+
130
154
  interface CartTotals {
131
155
  totalSellingAmount: number;
132
156
  discountAmount: number;
@@ -291,4 +315,4 @@ declare function checkTabbyReturnStatus(orderNumber: number, callbacks: PaymentS
291
315
  isPublic?: boolean;
292
316
  }): Promise<void>;
293
317
 
294
- export { type AddressFormValues, type CartTotals, type CouponCallbacks, IP_API_CACHE_KEY, type PaymentCallbacks, type PaymentStatusCallbacks, type PlacementErrorAction, type PlacementErrorInfo, addressFormInitialValues, addressValidationSchema, applyCheckoutCoupon, buildAddressPayload, buildSubmitPayload, calculateCartTotals, checkPhonepeReturnStatus, checkPhonepeReturnStatusWithOrder, checkStripeReturnStatus, checkTabbyReturnStatus, clearAddressFormSession, decodeAddress, describePlacementError, encodeAddress, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, isValidPhoneNumber, loadAddressFormFromSession, openRazorpayCheckout, parseEditAddress, processPayment, removeCheckoutCoupon, sanitizePhoneNumber, saveAddressFormToSession };
318
+ export { type AddressFormValues, type CartTotals, type CouponCallbacks, IP_API_CACHE_KEY, type PaymentCallbacks, type PaymentStatusCallbacks, type PlacementErrorAction, type PlacementErrorInfo, addressFormInitialValues, addressValidationSchema, applyCheckoutCoupon, buildAddressPayload, buildSubmitPayload, calculateCartTotals, checkPhonepeReturnStatus, checkPhonepeReturnStatusWithOrder, checkStripeReturnStatus, checkTabbyReturnStatus, clearAddressFormSession, decodeAddress, describePlacementError, encodeAddress, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, isValidNumber, isValidPhoneNumber, loadAddressFormFromSession, openRazorpayCheckout, parseEditAddress, processPayment, removeCheckoutCoupon, sanitizePhoneInput, sanitizePhoneNumber, saveAddressFormToSession };
@@ -1,8 +1,9 @@
1
- export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-VPTN4YXD.js';
2
- import '../chunk-7M5CVYZJ.js';
1
+ export { DEFAULT_ADDRESS_SCHEMA_MESSAGES, INVALID_PINCODE, NO_POSTAL_CODE, PINCODE_DEBOUNCE_MS, PINCODE_MIN_LENGTH, PINCODE_VALIDATION_UNAVAILABLE, applyCheckoutCoupon, buildAddressFormat, buildAddressSchema, clearPincodeCache, fetchAppliedCoupon, fetchAvailableCoupons, findStateByName, findSubdivision, getAreaOptions, getPincodeError, getPostcodeHint, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, isValidNumber, joinAddressLines, loadAddressFormat, lowerLabel, normalizePostcode, openRazorpayCheckout, processPayment, removeCheckoutCoupon, sanitizePhoneInput, sanitizePincode, usableEmail, validatePincode } from '../chunk-Y4RNRPBC.js';
2
+ import '../chunk-A7EI7XLU.js';
3
3
  import { pixelEvents } from '../chunk-VAU5OL72.js';
4
4
  import { checkPhonepePaymentStatusPublic, checkPhonepePaymentStatus, getPublicOrderDetailsByNumber, getOrderDetailsByNumber, getStripePaymentStatusPublic, getStripePaymentStatus, verifyTabbyPayment } from '../chunk-KCLVR6G5.js';
5
5
  export { IP_API_CACHE_KEY, addressFormInitialValues, addressValidationSchema, buildAddressPayload, buildSubmitPayload, clearAddressFormSession, decodeAddress, encodeAddress, isValidPhoneNumber, loadAddressFormFromSession, parseEditAddress, sanitizePhoneNumber, saveAddressFormToSession } from '../chunk-ELP23UGF.js';
6
+ import '../chunk-OSM73ETC.js';
6
7
  import '../chunk-3SYYP3XV.js';
7
8
  import '../chunk-WEMNXIRS.js';
8
9
  import '../chunk-BQ256JKN.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk3YRSHPM6_cjs = require('./chunk-3YRSHPM6.cjs');
4
- var chunk6LS5F4R3_cjs = require('./chunk-6LS5F4R3.cjs');
4
+ var chunkSGJUMI3M_cjs = require('./chunk-SGJUMI3M.cjs');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
 
7
7
  var ShareButton = ({
@@ -10,8 +10,8 @@ var ShareButton = ({
10
10
  iconSize = 22
11
11
  }) => {
12
12
  const _handleShare = () => {
13
- chunk6LS5F4R3_cjs.shareLink(
14
- `Buy ${product.name} at ${chunk6LS5F4R3_cjs.convertToCurrency(
13
+ chunkSGJUMI3M_cjs.shareLink(
14
+ `Buy ${product.name} at ${chunkSGJUMI3M_cjs.convertToCurrency(
15
15
  Number(product.selling_price)
16
16
  )}`,
17
17
  product.name
@@ -25,7 +25,10 @@ var getCountries = async () => {
25
25
  };
26
26
  var getSubdivisions = async (countryId) => {
27
27
  return chunkECHV2JSY_cjs.http_service_default.get(`utils/subdivisions/`, {
28
- params: { country_id: countryId }
28
+ params: {
29
+ country_id: countryId,
30
+ page_size: 500
31
+ }
29
32
  });
30
33
  };
31
34
 
@@ -1,7 +1,7 @@
1
- import { updateAddress, addAddress, getCountries, getSubdivisions } from './chunk-ZGMLOLTC.js';
2
- import { getCache } from './chunk-OSM73ETC.js';
3
- import { getAddressMeta } from './chunk-CBKJ3Y2I.js';
1
+ import { updateAddress, addAddress, getCountries, getSubdivisions } from './chunk-VRZRV2BR.js';
2
+ import { getAddressMeta } from './chunk-EWZ7TGI7.js';
4
3
  import { addressFormInitialValues, IP_API_CACHE_KEY, addressValidationSchema, buildSubmitPayload } from './chunk-ELP23UGF.js';
4
+ import { getCache } from './chunk-OSM73ETC.js';
5
5
  import { useState, useEffect, useMemo, useCallback } from 'react';
6
6
  import { useFormik } from 'formik';
7
7
  import { isSupportedCountry, getCountryCallingCode } from 'libphonenumber-js';
@@ -14,4 +14,11 @@ async function removeCoupon(couponCode) {
14
14
  return http_service_default.delete("/coupon/use/");
15
15
  }
16
16
 
17
- export { applyCoupon, getAppliedCoupon, getCoupons, removeCoupon };
17
+ // src/api/pincode.ts
18
+ var getPincodeDetails = async (pincode, country) => {
19
+ return http_service_default.get("utils/pincode/", {
20
+ params: country ? { pincode, country } : { pincode }
21
+ });
22
+ };
23
+
24
+ export { applyCoupon, getAppliedCoupon, getCoupons, getPincodeDetails, removeCoupon };
@@ -226,5 +226,15 @@ function getOrderStatus(order) {
226
226
  };
227
227
  }
228
228
  }
229
+ function focusFirstInvalidField(errors, root) {
230
+ if (typeof document === "undefined") return;
231
+ const invalid = Object.keys(errors);
232
+ if (invalid.length === 0) return;
233
+ const controls = (root ?? document).querySelectorAll("input[name], select[name], textarea[name]");
234
+ const target = Array.from(controls).find((el) => invalid.includes(el.getAttribute("name") ?? ""));
235
+ if (!target) return;
236
+ target.scrollIntoView({ behavior: "smooth", block: "center" });
237
+ target.focus({ preventScroll: true });
238
+ }
229
239
 
230
- export { constructFilter, convertObjectToParams, convertToCurrency, digestMessage, formatDateTime, formatPostalLabel, getAddressMeta, getDelayInMilliseconds, getOrderStatus, getParamsFromURL, getQueryParams, pluralize, pushParamsToURL, shareLink };
240
+ export { constructFilter, convertObjectToParams, convertToCurrency, digestMessage, focusFirstInvalidField, formatDateTime, formatPostalLabel, getAddressMeta, getDelayInMilliseconds, getOrderStatus, getParamsFromURL, getQueryParams, pluralize, pushParamsToURL, shareLink };
@@ -1,5 +1,5 @@
1
1
  import { ShareIcon } from './chunk-U7EXLQCT.js';
2
- import { shareLink, convertToCurrency } from './chunk-CBKJ3Y2I.js';
2
+ import { shareLink, convertToCurrency } from './chunk-EWZ7TGI7.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  var ShareButton = ({