@storepecker/storefront-core 2.10.0 → 2.10.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.
- package/dist/api/index.cjs +20 -20
- package/dist/api/index.d.cts +8 -15
- package/dist/api/index.d.ts +8 -15
- package/dist/api/index.js +2 -2
- package/dist/{buy-now-kII0KrhP.d.ts → buy-now-CDug6LJ_.d.ts} +1 -1
- package/dist/{buy-now-B_15RUVT.d.cts → buy-now-DrKY5_9R.d.cts} +1 -1
- package/dist/checkout/index.cjs +92 -98
- package/dist/checkout/index.d.cts +17 -30
- package/dist/checkout/index.d.ts +17 -30
- package/dist/checkout/index.js +48 -63
- package/dist/{pincode-Ch3bZSJz.d.cts → checkout-totals-CbmXM9L7.d.cts} +42 -1
- package/dist/{pincode-CHM-ZD3H.d.ts → checkout-totals-DU8l-Wyb.d.ts} +42 -1
- package/dist/{chunk-NQZ5GUOG.cjs → chunk-3YPE6UPC.cjs} +24 -16
- package/dist/{chunk-Y4RNRPBC.js → chunk-DZPK7GPG.js} +58 -2
- package/dist/{chunk-TH7OAMGC.js → chunk-E4D4XOAE.js} +24 -16
- package/dist/{chunk-NRPK5GCJ.cjs → chunk-EFYAFXIS.cjs} +3 -3
- package/dist/{chunk-NOT6VKXA.cjs → chunk-H6UZTS5O.cjs} +67 -23
- package/dist/{chunk-ZAWZ3RB6.js → chunk-NNE42NMP.js} +1 -1
- package/dist/{chunk-QED6QJZC.cjs → chunk-PN6KH5PX.cjs} +59 -1
- package/dist/{chunk-QQHQTBAM.js → chunk-QSRVMOXT.js} +48 -6
- package/dist/{collections-CXgOv5_G.d.cts → collections-CKNFcE2d.d.cts} +1 -1
- package/dist/{collections-CNh2OGbl.d.ts → collections-CtRKsWVx.d.ts} +1 -1
- package/dist/components/digital-product-download-modal.d.cts +2 -2
- package/dist/components/digital-product-download-modal.d.ts +2 -2
- package/dist/components/index.d.cts +4 -5
- package/dist/components/index.d.ts +4 -5
- package/dist/components/share-button.d.cts +1 -1
- package/dist/components/share-button.d.ts +1 -1
- package/dist/components/theme-data-initializer.d.cts +4 -5
- package/dist/components/theme-data-initializer.d.ts +4 -5
- package/dist/hooks/index.cjs +62 -58
- package/dist/hooks/index.d.cts +9 -7
- package/dist/hooks/index.d.ts +9 -7
- package/dist/hooks/index.js +8 -5
- package/dist/{instagram-DalreBu6.d.cts → instagram-CSzrxk10.d.cts} +8 -2
- package/dist/{instagram-BADLnNQ3.d.ts → instagram-CagTLmyq.d.ts} +8 -2
- package/dist/models/index.d.cts +6 -7
- package/dist/models/index.d.ts +6 -7
- package/dist/orders-B6BmHCJN.d.ts +337 -0
- package/dist/orders-ZKP0lqRN.d.cts +337 -0
- package/dist/{pixelEvents-Ds6fwS9t.d.ts → pixelEvents-DqJ_CEEr.d.ts} +3 -4
- package/dist/{pixelEvents-COqZIgTu.d.cts → pixelEvents-bahgVW4_.d.cts} +3 -4
- package/dist/{product-D9liEtl4.d.cts → product-D4kol-Z-.d.cts} +26 -2
- package/dist/{product-D9liEtl4.d.ts → product-D4kol-Z-.d.ts} +26 -2
- package/dist/store/index.cjs +20 -30
- package/dist/store/index.d.cts +21 -7
- package/dist/store/index.d.ts +21 -7
- package/dist/store/index.js +9 -26
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.d.cts +14 -8
- package/dist/utils/index.d.ts +14 -8
- package/dist/utils/index.js +1 -1
- package/dist/{wishlist-Cj0sQxiY.d.ts → wishlist-L3fM5-ie.d.ts} +1 -1
- package/dist/{wishlist-BakHvIFN.d.cts → wishlist-_0x0r1jt.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/cart-DZq1ZEnE.d.ts +0 -153
- package/dist/cart-DwMFBmpC.d.cts +0 -153
- package/dist/orders-B3G4CyhH.d.cts +0 -166
- package/dist/orders-Bl-Slh72.d.ts +0 -166
package/dist/hooks/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
|
|
4
4
|
var chunk2AHH3XBW_cjs = require('../chunk-2AHH3XBW.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var chunkH6UZTS5O_cjs = require('../chunk-H6UZTS5O.cjs');
|
|
6
|
+
var chunkEFYAFXIS_cjs = require('../chunk-EFYAFXIS.cjs');
|
|
7
|
+
var chunk3YPE6UPC_cjs = require('../chunk-3YPE6UPC.cjs');
|
|
8
|
+
var chunkPN6KH5PX_cjs = require('../chunk-PN6KH5PX.cjs');
|
|
9
9
|
var chunkKNG4OMS5_cjs = require('../chunk-KNG4OMS5.cjs');
|
|
10
10
|
require('../chunk-NSAHGMS7.cjs');
|
|
11
11
|
var chunkH6FJYRO3_cjs = require('../chunk-H6FJYRO3.cjs');
|
|
@@ -59,7 +59,7 @@ var useCart = (addressId) => {
|
|
|
59
59
|
async (addrId, shippingId) => {
|
|
60
60
|
try {
|
|
61
61
|
setIsLoading(true);
|
|
62
|
-
const result = await
|
|
62
|
+
const result = await chunkEFYAFXIS_cjs.getCart("/customer/cart/", addrId ?? addressId, shippingId);
|
|
63
63
|
setData(result);
|
|
64
64
|
setError(null);
|
|
65
65
|
} catch (err) {
|
|
@@ -131,7 +131,7 @@ function useGetProducts(initialFilter, options) {
|
|
|
131
131
|
apiParams[key] = value;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
const result = await
|
|
134
|
+
const result = await chunkEFYAFXIS_cjs.getProductList(endpoint, apiParams);
|
|
135
135
|
setData(result);
|
|
136
136
|
if (modeRef.current === "append" && isLoadMoreRef.current) {
|
|
137
137
|
setProducts((prev) => [...prev, ...result.results || []]);
|
|
@@ -199,7 +199,7 @@ var useGetProductDetails = (slug) => {
|
|
|
199
199
|
const fetchData = react.useCallback(async () => {
|
|
200
200
|
try {
|
|
201
201
|
setIsLoading(true);
|
|
202
|
-
const result = await
|
|
202
|
+
const result = await chunkEFYAFXIS_cjs.getProductDetail("/inventory/products/", slug);
|
|
203
203
|
setData(result);
|
|
204
204
|
} catch (err) {
|
|
205
205
|
} finally {
|
|
@@ -222,7 +222,7 @@ var useGetProductCategories = () => {
|
|
|
222
222
|
const fetchData = async () => {
|
|
223
223
|
try {
|
|
224
224
|
setIsLoading(true);
|
|
225
|
-
const result = await
|
|
225
|
+
const result = await chunkEFYAFXIS_cjs.getProductCategories("/store/categories");
|
|
226
226
|
setData(result || []);
|
|
227
227
|
} catch (err) {
|
|
228
228
|
setError(err);
|
|
@@ -267,7 +267,7 @@ var useWishlist = () => {
|
|
|
267
267
|
const fetchData = react.useCallback(async () => {
|
|
268
268
|
try {
|
|
269
269
|
setIsLoading(true);
|
|
270
|
-
const response = await
|
|
270
|
+
const response = await chunkEFYAFXIS_cjs.getWishlist("/customer/wishlist/");
|
|
271
271
|
if (response.data) setData(response.data);
|
|
272
272
|
setError(null);
|
|
273
273
|
} catch (err) {
|
|
@@ -325,7 +325,7 @@ function useCheckoutPayment(options) {
|
|
|
325
325
|
const [isConfirmingPayment, setIsConfirmingPayment] = react.useState(false);
|
|
326
326
|
const [showSuccessModal, setShowSuccessModal] = react.useState(false);
|
|
327
327
|
const [showFailureModal, setShowFailureModal] = react.useState(false);
|
|
328
|
-
const resetCartCount =
|
|
328
|
+
const resetCartCount = chunkH6UZTS5O_cjs.useCartStore((s) => s.resetCartCount);
|
|
329
329
|
const callbacks = {
|
|
330
330
|
onSuccess: (order) => {
|
|
331
331
|
setOrderSummary(order);
|
|
@@ -358,7 +358,7 @@ function useCheckoutPayment(options) {
|
|
|
358
358
|
);
|
|
359
359
|
const order = response.data;
|
|
360
360
|
setOrderSummary(order);
|
|
361
|
-
|
|
361
|
+
chunkPN6KH5PX_cjs.processPayment(order, paymentMethod, callbacks);
|
|
362
362
|
} catch (error) {
|
|
363
363
|
if (options.onPlaceOrderError?.(error) === true) return;
|
|
364
364
|
setShowFailureModal(true);
|
|
@@ -639,7 +639,7 @@ function useInlineCheckoutPayment(options) {
|
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
641
|
setOrderSummary(order);
|
|
642
|
-
|
|
642
|
+
chunkPN6KH5PX_cjs.processPayment(order, paymentMethod, callbacks, { isPublic });
|
|
643
643
|
} catch (error) {
|
|
644
644
|
if (options.onPlaceOrderError?.(error) === true) return;
|
|
645
645
|
setShowFailureModal(true);
|
|
@@ -727,7 +727,7 @@ function usePublicCheckout() {
|
|
|
727
727
|
preview
|
|
728
728
|
};
|
|
729
729
|
react.useEffect(() => {
|
|
730
|
-
const cart =
|
|
730
|
+
const cart = chunk3YPE6UPC_cjs.cart_default.get();
|
|
731
731
|
const items = readCartItems(cart);
|
|
732
732
|
if (Object.keys(items).length === 0) {
|
|
733
733
|
setIsEmpty(true);
|
|
@@ -744,11 +744,11 @@ function usePublicCheckout() {
|
|
|
744
744
|
const pricedIds = new Set((priced.product_variants || []).map((v) => v.id));
|
|
745
745
|
const droppedIds = missingIds.filter((id) => !pricedIds.has(id));
|
|
746
746
|
if (droppedIds.length === 0) return;
|
|
747
|
-
const cart =
|
|
747
|
+
const cart = chunk3YPE6UPC_cjs.cart_default.get();
|
|
748
748
|
if (cart) {
|
|
749
749
|
droppedIds.forEach((id) => {
|
|
750
750
|
const variant = cart.product_variants?.find((v) => v.id === id);
|
|
751
|
-
if (variant)
|
|
751
|
+
if (variant) chunk3YPE6UPC_cjs.cart_default.remove(variant);
|
|
752
752
|
});
|
|
753
753
|
}
|
|
754
754
|
setCartItems((prev) => {
|
|
@@ -791,7 +791,7 @@ function usePublicCheckout() {
|
|
|
791
791
|
const data = err?.response?.data;
|
|
792
792
|
const code = data?.error_code;
|
|
793
793
|
if (code === "CART_EMPTY") {
|
|
794
|
-
|
|
794
|
+
chunk3YPE6UPC_cjs.cart_default.clear();
|
|
795
795
|
setCartItems({});
|
|
796
796
|
setIsEmpty(true);
|
|
797
797
|
setPreview(null);
|
|
@@ -841,7 +841,7 @@ function usePublicCheckout() {
|
|
|
841
841
|
const applyCoupon2 = react.useCallback((code) => setCouponCodes([code]), []);
|
|
842
842
|
const removeCoupon2 = react.useCallback(() => setCouponCodes([]), []);
|
|
843
843
|
const clearCart = react.useCallback(() => {
|
|
844
|
-
|
|
844
|
+
chunk3YPE6UPC_cjs.cart_default.clear();
|
|
845
845
|
setCartItems({});
|
|
846
846
|
setIsEmpty(true);
|
|
847
847
|
}, []);
|
|
@@ -921,7 +921,7 @@ function useCheckoutCoupon(options) {
|
|
|
921
921
|
const refreshCoupons = react.useCallback(async () => {
|
|
922
922
|
setIsLoading(true);
|
|
923
923
|
try {
|
|
924
|
-
const coupons = await
|
|
924
|
+
const coupons = await chunkPN6KH5PX_cjs.fetchAvailableCoupons();
|
|
925
925
|
setAvailableCoupons(coupons);
|
|
926
926
|
} catch {
|
|
927
927
|
} finally {
|
|
@@ -933,7 +933,7 @@ function useCheckoutCoupon(options) {
|
|
|
933
933
|
setError(null);
|
|
934
934
|
setIsApplying(true);
|
|
935
935
|
try {
|
|
936
|
-
const coupon = await
|
|
936
|
+
const coupon = await chunkPN6KH5PX_cjs.applyCheckoutCoupon(code, callbacks);
|
|
937
937
|
setAppliedCoupon(coupon);
|
|
938
938
|
} catch (err) {
|
|
939
939
|
setError(err instanceof Error ? err.message : "Failed to apply coupon");
|
|
@@ -946,7 +946,7 @@ function useCheckoutCoupon(options) {
|
|
|
946
946
|
const removeCouponHandler = react.useCallback(async () => {
|
|
947
947
|
if (!appliedCoupon) return;
|
|
948
948
|
try {
|
|
949
|
-
await
|
|
949
|
+
await chunkPN6KH5PX_cjs.removeCheckoutCoupon(appliedCoupon.coupon_code, callbacks);
|
|
950
950
|
setAppliedCoupon(null);
|
|
951
951
|
setError(null);
|
|
952
952
|
} catch {
|
|
@@ -1045,9 +1045,9 @@ function useVariantSelector(options) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
function useShopCheckout(options) {
|
|
1047
1047
|
const { product, onNavigateToCart, onToast, onPreorderRejected } = options;
|
|
1048
|
-
const { addToCart, setCart } =
|
|
1049
|
-
const cart =
|
|
1050
|
-
const isUserAuthenticated =
|
|
1048
|
+
const { addToCart, setCart } = chunkH6UZTS5O_cjs.useCartStore();
|
|
1049
|
+
const cart = chunkH6UZTS5O_cjs.useCartStore((s) => s.cart);
|
|
1050
|
+
const isUserAuthenticated = chunkH6UZTS5O_cjs.useAuthStore((s) => s.isAuthenticated);
|
|
1051
1051
|
const [isWishlisted, setIsWishlisted] = react.useState(product.is_wishlisted);
|
|
1052
1052
|
const [isAddedToCart, setIsAddedToCart] = react.useState(false);
|
|
1053
1053
|
const [loading, setLoading] = react.useState(false);
|
|
@@ -1061,7 +1061,7 @@ function useShopCheckout(options) {
|
|
|
1061
1061
|
react.useEffect(() => {
|
|
1062
1062
|
let inCart;
|
|
1063
1063
|
if (!isUserAuthenticated) {
|
|
1064
|
-
inCart = Number(
|
|
1064
|
+
inCart = Number(chunk3YPE6UPC_cjs.cart_default.get()?.products_quantity?.[product.id]) || 0;
|
|
1065
1065
|
} else if (cart) {
|
|
1066
1066
|
inCart = cart.total_quantity > 0 ? Number(cart.products_quantity?.[product.id]) || 0 : 0;
|
|
1067
1067
|
} else if (product.cart_quantity !== void 0) {
|
|
@@ -1075,7 +1075,7 @@ function useShopCheckout(options) {
|
|
|
1075
1075
|
react.useEffect(() => {
|
|
1076
1076
|
const fetchCategories = async () => {
|
|
1077
1077
|
try {
|
|
1078
|
-
const response = await
|
|
1078
|
+
const response = await chunkEFYAFXIS_cjs.getCategories();
|
|
1079
1079
|
setCategories(response.data);
|
|
1080
1080
|
} catch (error) {
|
|
1081
1081
|
console.log(error);
|
|
@@ -1107,8 +1107,8 @@ function useShopCheckout(options) {
|
|
|
1107
1107
|
setLoading(false);
|
|
1108
1108
|
}
|
|
1109
1109
|
} else {
|
|
1110
|
-
|
|
1111
|
-
const localCartItems =
|
|
1110
|
+
chunk3YPE6UPC_cjs.cart_default.add(product, quantity);
|
|
1111
|
+
const localCartItems = chunk3YPE6UPC_cjs.cart_default.get();
|
|
1112
1112
|
if (localCartItems) {
|
|
1113
1113
|
setCart(localCartItems);
|
|
1114
1114
|
}
|
|
@@ -1154,8 +1154,8 @@ function useShopCheckout(options) {
|
|
|
1154
1154
|
setLoading(false);
|
|
1155
1155
|
}
|
|
1156
1156
|
} else {
|
|
1157
|
-
|
|
1158
|
-
const localCartItems =
|
|
1157
|
+
chunk3YPE6UPC_cjs.cart_default.add(product, quantity);
|
|
1158
|
+
const localCartItems = chunk3YPE6UPC_cjs.cart_default.get();
|
|
1159
1159
|
if (localCartItems) {
|
|
1160
1160
|
setCart(localCartItems);
|
|
1161
1161
|
}
|
|
@@ -1195,7 +1195,7 @@ function useShopCheckout(options) {
|
|
|
1195
1195
|
const handleNotifyMeFormSubmit = react.useCallback(
|
|
1196
1196
|
async (values) => {
|
|
1197
1197
|
try {
|
|
1198
|
-
const response = await
|
|
1198
|
+
const response = await chunkEFYAFXIS_cjs.notifyProductStock({
|
|
1199
1199
|
...values,
|
|
1200
1200
|
variant_slug: product.slug
|
|
1201
1201
|
});
|
|
@@ -1382,7 +1382,7 @@ function useAddressFormat(countryCode) {
|
|
|
1382
1382
|
react.useEffect(() => {
|
|
1383
1383
|
if (!countryCode) return;
|
|
1384
1384
|
let active = true;
|
|
1385
|
-
once(`address-format:${countryCode}`, () =>
|
|
1385
|
+
once(`address-format:${countryCode}`, () => chunkPN6KH5PX_cjs.loadAddressFormat(countryCode)).then(
|
|
1386
1386
|
(format) => active && setState({ code: countryCode, format }),
|
|
1387
1387
|
(error) => active && setState({ code: countryCode, error })
|
|
1388
1388
|
);
|
|
@@ -1390,7 +1390,7 @@ function useAddressFormat(countryCode) {
|
|
|
1390
1390
|
active = false;
|
|
1391
1391
|
};
|
|
1392
1392
|
}, [countryCode]);
|
|
1393
|
-
const fallback = react.useMemo(() =>
|
|
1393
|
+
const fallback = react.useMemo(() => chunkPN6KH5PX_cjs.buildAddressFormat(countryCode ?? "", null), [countryCode]);
|
|
1394
1394
|
const current = state.code === countryCode ? state : {};
|
|
1395
1395
|
return {
|
|
1396
1396
|
format: current.format ?? fallback,
|
|
@@ -1424,7 +1424,7 @@ function usePincodeLookup({
|
|
|
1424
1424
|
async (value) => {
|
|
1425
1425
|
const request = ++requestRef.current;
|
|
1426
1426
|
setLoading(true);
|
|
1427
|
-
const result = await
|
|
1427
|
+
const result = await chunkPN6KH5PX_cjs.validatePincode(value, countryCode);
|
|
1428
1428
|
if (request === requestRef.current) {
|
|
1429
1429
|
setLoading(false);
|
|
1430
1430
|
setAnswer({ key: keyFor(countryCode, value), invalid: result.status === "invalid", match: result.match });
|
|
@@ -1436,7 +1436,7 @@ function usePincodeLookup({
|
|
|
1436
1436
|
react.useEffect(() => {
|
|
1437
1437
|
if (!enabled || !ready) return;
|
|
1438
1438
|
const value = pincode.trim();
|
|
1439
|
-
const timer = setTimeout(() => lookUp(value),
|
|
1439
|
+
const timer = setTimeout(() => lookUp(value), chunkPN6KH5PX_cjs.PINCODE_DEBOUNCE_MS);
|
|
1440
1440
|
return () => {
|
|
1441
1441
|
clearTimeout(timer);
|
|
1442
1442
|
requestRef.current += 1;
|
|
@@ -1445,11 +1445,11 @@ function usePincodeLookup({
|
|
|
1445
1445
|
}, [enabled, ready, pincode, lookUp]);
|
|
1446
1446
|
const { match } = current;
|
|
1447
1447
|
react.useEffect(() => {
|
|
1448
|
-
if (match) onMatchRef.current(match,
|
|
1448
|
+
if (match) onMatchRef.current(match, chunkPN6KH5PX_cjs.findSubdivision(states, match));
|
|
1449
1449
|
}, [match, states]);
|
|
1450
1450
|
const mismatchState = react.useMemo(() => {
|
|
1451
1451
|
if (!match || !stateId) return void 0;
|
|
1452
|
-
const pincodeState =
|
|
1452
|
+
const pincodeState = chunkPN6KH5PX_cjs.findSubdivision(states, match);
|
|
1453
1453
|
return pincodeState && String(pincodeState.id) !== stateId ? pincodeState.name : void 0;
|
|
1454
1454
|
}, [match, states, stateId]);
|
|
1455
1455
|
const issue = react.useMemo(() => {
|
|
@@ -1469,7 +1469,7 @@ function usePincodeLookup({
|
|
|
1469
1469
|
const { states: currentStates, stateId: currentStateId } = latest.current;
|
|
1470
1470
|
if (result.status === "invalid") return { kind: "invalid" };
|
|
1471
1471
|
if (result.status === "valid" && currentStateId) {
|
|
1472
|
-
const pincodeState =
|
|
1472
|
+
const pincodeState = chunkPN6KH5PX_cjs.findSubdivision(currentStates, result.match);
|
|
1473
1473
|
if (pincodeState && String(pincodeState.id) !== currentStateId) {
|
|
1474
1474
|
return { kind: "mismatch", stateName: pincodeState.name };
|
|
1475
1475
|
}
|
|
@@ -1483,7 +1483,7 @@ function usePincodeLookup({
|
|
|
1483
1483
|
}),
|
|
1484
1484
|
[countryCode]
|
|
1485
1485
|
);
|
|
1486
|
-
const areaOptions = react.useMemo(() =>
|
|
1486
|
+
const areaOptions = react.useMemo(() => chunkPN6KH5PX_cjs.getAreaOptions(match), [match]);
|
|
1487
1487
|
return { enabled, loading, issue, areaOptions, checkNow, verify, setServerError };
|
|
1488
1488
|
}
|
|
1489
1489
|
var INDIA_ID = 105;
|
|
@@ -1507,36 +1507,36 @@ function toAddressPayload(values) {
|
|
|
1507
1507
|
return {
|
|
1508
1508
|
customer_name: values.customer_name.trim(),
|
|
1509
1509
|
customer_email: values.customer_email.trim(),
|
|
1510
|
-
customer_phone:
|
|
1510
|
+
customer_phone: chunkPN6KH5PX_cjs.sanitizePhoneInput(values.customer_phone, values.customer_country_code),
|
|
1511
1511
|
customer_country_code: phoneCountry ? `+${libphonenumberJs.getCountryCallingCode(phoneCountry)}` : "",
|
|
1512
|
-
address:
|
|
1512
|
+
address: chunkPN6KH5PX_cjs.joinAddressLines(values.address, values.address_line_2),
|
|
1513
1513
|
city: values.city.trim(),
|
|
1514
1514
|
state_obj: values.state_obj,
|
|
1515
1515
|
state: values.state_name,
|
|
1516
1516
|
country_obj: Number(values.country_obj),
|
|
1517
1517
|
country: values.country_name,
|
|
1518
|
-
pincode: values.pincode.trim() ||
|
|
1518
|
+
pincode: values.pincode.trim() || chunkPN6KH5PX_cjs.NO_POSTAL_CODE,
|
|
1519
1519
|
is_default: values.is_default
|
|
1520
1520
|
};
|
|
1521
1521
|
}
|
|
1522
1522
|
function isPincodeReady(format, value) {
|
|
1523
1523
|
const code = value.trim();
|
|
1524
|
-
if (!format.hasPostal || !code || code ===
|
|
1524
|
+
if (!format.hasPostal || !code || code === chunkPN6KH5PX_cjs.NO_POSTAL_CODE) return false;
|
|
1525
1525
|
if (format.postalStrict && format.postalPattern) return format.postalPattern.test(code);
|
|
1526
|
-
return code.length >=
|
|
1526
|
+
return code.length >= chunkPN6KH5PX_cjs.PINCODE_MIN_LENGTH && (!format.postalPattern || format.postalPattern.test(code));
|
|
1527
1527
|
}
|
|
1528
1528
|
function isPincodeCheckableOnBlur(format, value) {
|
|
1529
1529
|
const code = value.trim();
|
|
1530
|
-
if (!format.hasPostal || !code || code ===
|
|
1530
|
+
if (!format.hasPostal || !code || code === chunkPN6KH5PX_cjs.NO_POSTAL_CODE) return false;
|
|
1531
1531
|
if (format.postalStrict || !format.postalPattern) return false;
|
|
1532
1532
|
return format.postalPattern.test(code);
|
|
1533
1533
|
}
|
|
1534
1534
|
function describePincodeIssue(issue, format) {
|
|
1535
1535
|
if (!issue) return void 0;
|
|
1536
|
-
const postal =
|
|
1536
|
+
const postal = chunkPN6KH5PX_cjs.lowerLabel(format.postalLabel);
|
|
1537
1537
|
if (issue.kind === "server") return issue.message;
|
|
1538
1538
|
if (issue.kind === "invalid") return `We couldn't find this ${postal}. Check it and try again.`;
|
|
1539
|
-
return `This ${postal} is in ${issue.stateName}. Check the ${postal} or the ${
|
|
1539
|
+
return `This ${postal} is in ${issue.stateName}. Check the ${postal} or the ${chunkPN6KH5PX_cjs.lowerLabel(format.regionLabel)}.`;
|
|
1540
1540
|
}
|
|
1541
1541
|
var dialCode = (iso) => `+${libphonenumberJs.getCountryCallingCode(iso)}`;
|
|
1542
1542
|
function phoneIsoFromDialCode(dial, addressCountry, countries) {
|
|
@@ -1556,7 +1556,7 @@ function resolveInitialValues(countries, address, draft, defaultCountryId, locat
|
|
|
1556
1556
|
values: {
|
|
1557
1557
|
...EMPTY_ADDRESS_FORM_VALUES,
|
|
1558
1558
|
customer_name: address.customer_name ?? "",
|
|
1559
|
-
customer_email:
|
|
1559
|
+
customer_email: chunkPN6KH5PX_cjs.usableEmail(address.customer_email),
|
|
1560
1560
|
customer_phone: address.customer_phone ?? "",
|
|
1561
1561
|
customer_country_code: phoneIso,
|
|
1562
1562
|
country_obj: country2.id,
|
|
@@ -1663,7 +1663,7 @@ function useCountryAwareAddressForm({
|
|
|
1663
1663
|
const messagesRef = react.useRef(messages);
|
|
1664
1664
|
messagesRef.current = messages;
|
|
1665
1665
|
const schema = react.useMemo(
|
|
1666
|
-
() =>
|
|
1666
|
+
() => chunkPN6KH5PX_cjs.buildAddressSchema(format, { requireState, messages: messagesRef.current }),
|
|
1667
1667
|
[format, requireState]
|
|
1668
1668
|
);
|
|
1669
1669
|
schemaRef.current = schema;
|
|
@@ -1695,13 +1695,13 @@ function useCountryAwareAddressForm({
|
|
|
1695
1695
|
profileAppliedFor.current = initKey;
|
|
1696
1696
|
const next = { ...current };
|
|
1697
1697
|
if (!current.customer_name.trim() && profile.customer_name) next.customer_name = profile.customer_name.trim();
|
|
1698
|
-
if (!current.customer_email.trim()) next.customer_email =
|
|
1698
|
+
if (!current.customer_email.trim()) next.customer_email = chunkPN6KH5PX_cjs.usableEmail(profile.email);
|
|
1699
1699
|
if (!current.customer_phone.trim() && profile.phone) {
|
|
1700
1700
|
const delivery = countries.find((c) => c.id === Number(current.country_obj));
|
|
1701
1701
|
const code = profile.country_code?.trim();
|
|
1702
1702
|
const phoneIso = code && /^[A-Za-z]{2}$/.test(code) ? code.toUpperCase() : delivery ? phoneIsoFromDialCode(code, delivery, countries) : current.customer_country_code;
|
|
1703
1703
|
next.customer_country_code = phoneIso;
|
|
1704
|
-
next.customer_phone =
|
|
1704
|
+
next.customer_phone = chunkPN6KH5PX_cjs.sanitizePhoneInput(profile.phone, phoneIso);
|
|
1705
1705
|
phoneFollowsCountryRef.current = phoneIso === delivery?.tld_code;
|
|
1706
1706
|
}
|
|
1707
1707
|
setValues(next, false);
|
|
@@ -1709,14 +1709,14 @@ function useCountryAwareAddressForm({
|
|
|
1709
1709
|
react.useEffect(() => {
|
|
1710
1710
|
if (!countryCode) return;
|
|
1711
1711
|
const { pincode } = valuesRef.current;
|
|
1712
|
-
if (!format.hasPostal && pincode !==
|
|
1713
|
-
else if (format.hasPostal && pincode ===
|
|
1712
|
+
if (!format.hasPostal && pincode !== chunkPN6KH5PX_cjs.NO_POSTAL_CODE) setFieldValue("pincode", chunkPN6KH5PX_cjs.NO_POSTAL_CODE, false);
|
|
1713
|
+
else if (format.hasPostal && pincode === chunkPN6KH5PX_cjs.NO_POSTAL_CODE) setFieldValue("pincode", "", false);
|
|
1714
1714
|
}, [format, countryCode, setFieldValue]);
|
|
1715
1715
|
react.useEffect(() => {
|
|
1716
1716
|
const { state_obj, state_name } = valuesRef.current;
|
|
1717
1717
|
if (!state_obj || statesLoading || statesError || !states.length) return;
|
|
1718
1718
|
const byId = states.find((s) => String(s.id) === state_obj);
|
|
1719
|
-
const state = byId ??
|
|
1719
|
+
const state = byId ?? chunkPN6KH5PX_cjs.findStateByName(states, state_obj) ?? chunkPN6KH5PX_cjs.findStateByName(states, state_name);
|
|
1720
1720
|
if (state) {
|
|
1721
1721
|
if (String(state.id) !== state_obj || state.name !== state_name) {
|
|
1722
1722
|
setValues({ ...valuesRef.current, state_obj: String(state.id), state_name: state.name }, false);
|
|
@@ -1816,7 +1816,7 @@ function useCountryAwareAddressForm({
|
|
|
1816
1816
|
formatRef.current = format;
|
|
1817
1817
|
const changePostcode = react.useCallback(
|
|
1818
1818
|
(e) => {
|
|
1819
|
-
setFieldValue("pincode",
|
|
1819
|
+
setFieldValue("pincode", chunkPN6KH5PX_cjs.normalizePostcode(formatRef.current, e.target.value));
|
|
1820
1820
|
},
|
|
1821
1821
|
[setFieldValue]
|
|
1822
1822
|
);
|
|
@@ -1842,9 +1842,9 @@ function useCountryAwareAddressForm({
|
|
|
1842
1842
|
);
|
|
1843
1843
|
const showServerPincodeError = react.useCallback(
|
|
1844
1844
|
(error) => {
|
|
1845
|
-
const postal =
|
|
1845
|
+
const postal = chunkPN6KH5PX_cjs.lowerLabel(formatRef.current.postalLabel);
|
|
1846
1846
|
const invalidMessage = formatPincodeIssue?.({ kind: "invalid" }, formatRef.current) ?? `We couldn't find this ${postal}. Check it and try again.`;
|
|
1847
|
-
const message =
|
|
1847
|
+
const message = chunkPN6KH5PX_cjs.getPincodeError(error, invalidMessage);
|
|
1848
1848
|
if (!message) return false;
|
|
1849
1849
|
setPincodeServerError(message);
|
|
1850
1850
|
reportInvalid({ pincode: message });
|
|
@@ -1857,7 +1857,7 @@ function useCountryAwareAddressForm({
|
|
|
1857
1857
|
const changePhone = react.useCallback(
|
|
1858
1858
|
(e) => {
|
|
1859
1859
|
const current = valuesRef.current;
|
|
1860
|
-
const foreign =
|
|
1860
|
+
const foreign = chunkPN6KH5PX_cjs.detectForeignPhone(e.target.value, current.customer_country_code);
|
|
1861
1861
|
if (foreign && countries.some((c) => c.tld_code === foreign.country)) {
|
|
1862
1862
|
const deliveryIso = countries.find((c) => c.id === current.country_obj)?.tld_code;
|
|
1863
1863
|
phoneFollowsCountryRef.current = foreign.country === deliveryIso;
|
|
@@ -1867,7 +1867,7 @@ function useCountryAwareAddressForm({
|
|
|
1867
1867
|
);
|
|
1868
1868
|
return;
|
|
1869
1869
|
}
|
|
1870
|
-
setFieldValue("customer_phone",
|
|
1870
|
+
setFieldValue("customer_phone", chunkPN6KH5PX_cjs.sanitizePhoneInput(e.target.value, current.customer_country_code));
|
|
1871
1871
|
},
|
|
1872
1872
|
[countries, setValues, setFieldValue]
|
|
1873
1873
|
);
|
|
@@ -1941,6 +1941,9 @@ function useCountryAwareAddressForm({
|
|
|
1941
1941
|
submit
|
|
1942
1942
|
};
|
|
1943
1943
|
}
|
|
1944
|
+
function useCheckoutTotals(cart, customizationOverride) {
|
|
1945
|
+
return react.useMemo(() => chunkPN6KH5PX_cjs.calculateCartTotals(cart, customizationOverride), [cart, customizationOverride]);
|
|
1946
|
+
}
|
|
1944
1947
|
|
|
1945
1948
|
Object.defineProperty(exports, "useAddressForm", {
|
|
1946
1949
|
enumerable: true,
|
|
@@ -1956,6 +1959,7 @@ exports.useBuyNow = useBuyNow;
|
|
|
1956
1959
|
exports.useCart = useCart;
|
|
1957
1960
|
exports.useCheckoutCoupon = useCheckoutCoupon;
|
|
1958
1961
|
exports.useCheckoutPayment = useCheckoutPayment;
|
|
1962
|
+
exports.useCheckoutTotals = useCheckoutTotals;
|
|
1959
1963
|
exports.useCountries = useCountries;
|
|
1960
1964
|
exports.useCountryAwareAddressForm = useCountryAwareAddressForm;
|
|
1961
1965
|
exports.useCoupon = useCoupon;
|
package/dist/hooks/index.d.cts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { A as Address, a as AddressPayload } from '../address-BdIB6IuI.cjs';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { C as Cart, b as Category, U as User, c as Coupon } from '../
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { C as Checkout, B as BuyNow, P as PublicCheckout } from '../buy-now-B_15RUVT.cjs';
|
|
3
|
+
import { C as Cart, O as Order, b as Category, U as User, c as Coupon } from '../orders-ZKP0lqRN.cjs';
|
|
4
|
+
import { d as Product, f as ProductDetail, e as ProductAttribute, A as Attributes } from '../product-D4kol-Z-.cjs';
|
|
5
|
+
import { W as Wishlist } from '../wishlist-_0x0r1jt.cjs';
|
|
6
|
+
import { C as Checkout, B as BuyNow, P as PublicCheckout } from '../buy-now-DrKY5_9R.cjs';
|
|
8
7
|
export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-wleIo78M.cjs';
|
|
9
|
-
import { A as AddressFormat,
|
|
8
|
+
import { A as AddressFormat, f as PincodeMatch, a as AddressSchemaMessages, C as CartLike, b as CheckoutTotals } from '../checkout-totals-CbmXM9L7.cjs';
|
|
10
9
|
import * as formik from 'formik';
|
|
11
10
|
import 'react-toastify';
|
|
12
11
|
import 'yup';
|
|
@@ -622,4 +621,7 @@ type CountryAwareAddressFormController = ReturnType<typeof useCountryAwareAddres
|
|
|
622
621
|
/** Alias matching the name the themes' `<AddressFields controller>` prop uses. */
|
|
623
622
|
type UseCountryAwareAddressFormReturn = CountryAwareAddressFormController;
|
|
624
623
|
|
|
625
|
-
|
|
624
|
+
/** Memoised {@link calculateCartTotals} for a checkout page. */
|
|
625
|
+
declare function useCheckoutTotals(cart: CartLike, customizationOverride?: Cart.CustomizationInput[] | null): CheckoutTotals;
|
|
626
|
+
|
|
627
|
+
export { type AddressFormProfile, BUY_NOW_PAYLOAD_KEY, type BuyNowError, type BuyNowItem, type CountryAwareAddressFormController, type CountryAwareAddressFormValues, type CountryOption, EMPTY_ADDRESS_FORM_VALUES, type InlinePlaceOrderArgs, type PaginationMode, type PincodeIssue, type PublicCheckoutError, type UseBuyNowReturn, type UseCheckoutCouponOptions, type UseCheckoutCouponReturn, type UseCheckoutPaymentOptions, type UseCheckoutPaymentReturn, type UseCountryAwareAddressFormOptions, type UseCountryAwareAddressFormReturn, type UseCouponOptions, type UseCouponReturn, type UseGetProductsOptions, type UseGetProductsReturn, type UseInlineCheckoutPaymentOptions, type UseInlineCheckoutPaymentReturn, type UsePincodeLookupOptions, type UsePincodeLookupReturn, type UsePublicCheckoutReturn, type UseShopCheckoutOptions, type UseShopCheckoutReturn, type UseVariantSelectorOptions, type UseVariantSelectorReturn, describePincodeIssue, toAddressPayload, useAddress, useAddressFormat, useBuyNow, useCart, useCheckoutCoupon, useCheckoutPayment, useCheckoutTotals, useCountries, useCountryAwareAddressForm, useCoupon, useGetProductCategories, useGetProductDetails, useGetProducts, useInlineCheckoutPayment, useOrders, usePincodeLookup, useProductDetailModal, usePublicCheckout, useServiceFormModal, useShopCheckout, useSubdivisions, useUserDetails, useVariantSelector, useWishlist };
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { A as Address, a as AddressPayload } from '../address-BdIB6IuI.js';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { C as Cart, b as Category, U as User, c as Coupon } from '../
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { C as Checkout, B as BuyNow, P as PublicCheckout } from '../buy-now-kII0KrhP.js';
|
|
3
|
+
import { C as Cart, O as Order, b as Category, U as User, c as Coupon } from '../orders-B6BmHCJN.js';
|
|
4
|
+
import { d as Product, f as ProductDetail, e as ProductAttribute, A as Attributes } from '../product-D4kol-Z-.js';
|
|
5
|
+
import { W as Wishlist } from '../wishlist-L3fM5-ie.js';
|
|
6
|
+
import { C as Checkout, B as BuyNow, P as PublicCheckout } from '../buy-now-CDug6LJ_.js';
|
|
8
7
|
export { U as UseAddressFormOptions, a as UseAddressFormReturn, u as useAddressForm } from '../useAddressForm-fMOb5Z-a.js';
|
|
9
|
-
import { A as AddressFormat,
|
|
8
|
+
import { A as AddressFormat, f as PincodeMatch, a as AddressSchemaMessages, C as CartLike, b as CheckoutTotals } from '../checkout-totals-DU8l-Wyb.js';
|
|
10
9
|
import * as formik from 'formik';
|
|
11
10
|
import 'react-toastify';
|
|
12
11
|
import 'yup';
|
|
@@ -622,4 +621,7 @@ type CountryAwareAddressFormController = ReturnType<typeof useCountryAwareAddres
|
|
|
622
621
|
/** Alias matching the name the themes' `<AddressFields controller>` prop uses. */
|
|
623
622
|
type UseCountryAwareAddressFormReturn = CountryAwareAddressFormController;
|
|
624
623
|
|
|
625
|
-
|
|
624
|
+
/** Memoised {@link calculateCartTotals} for a checkout page. */
|
|
625
|
+
declare function useCheckoutTotals(cart: CartLike, customizationOverride?: Cart.CustomizationInput[] | null): CheckoutTotals;
|
|
626
|
+
|
|
627
|
+
export { type AddressFormProfile, BUY_NOW_PAYLOAD_KEY, type BuyNowError, type BuyNowItem, type CountryAwareAddressFormController, type CountryAwareAddressFormValues, type CountryOption, EMPTY_ADDRESS_FORM_VALUES, type InlinePlaceOrderArgs, type PaginationMode, type PincodeIssue, type PublicCheckoutError, type UseBuyNowReturn, type UseCheckoutCouponOptions, type UseCheckoutCouponReturn, type UseCheckoutPaymentOptions, type UseCheckoutPaymentReturn, type UseCountryAwareAddressFormOptions, type UseCountryAwareAddressFormReturn, type UseCouponOptions, type UseCouponReturn, type UseGetProductsOptions, type UseGetProductsReturn, type UseInlineCheckoutPaymentOptions, type UseInlineCheckoutPaymentReturn, type UsePincodeLookupOptions, type UsePincodeLookupReturn, type UsePublicCheckoutReturn, type UseShopCheckoutOptions, type UseShopCheckoutReturn, type UseVariantSelectorOptions, type UseVariantSelectorReturn, describePincodeIssue, toAddressPayload, useAddress, useAddressFormat, useBuyNow, useCart, useCheckoutCoupon, useCheckoutPayment, useCheckoutTotals, useCountries, useCountryAwareAddressForm, useCoupon, useGetProductCategories, useGetProductDetails, useGetProducts, useInlineCheckoutPayment, useOrders, usePincodeLookup, useProductDetailModal, usePublicCheckout, useServiceFormModal, useShopCheckout, useSubdivisions, useUserDetails, useVariantSelector, useWishlist };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getUserDetails } from '../chunk-WYXT5AAG.js';
|
|
2
2
|
import { findMatchingVariant, findSimilarVariant, isVariantCombinationAvailable, isColorVariantType } from '../chunk-HEFA67WK.js';
|
|
3
|
-
import { useCartStore, useAuthStore } from '../chunk-
|
|
4
|
-
import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-
|
|
5
|
-
import { cart_default } from '../chunk-
|
|
6
|
-
import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon, buildAddressFormat, validatePincode, PINCODE_DEBOUNCE_MS, findSubdivision, getAreaOptions, NO_POSTAL_CODE, joinAddressLines, sanitizePhoneInput, lowerLabel, buildAddressSchema, usableEmail, findStateByName, normalizePostcode, getPincodeError, detectForeignPhone, PINCODE_MIN_LENGTH, loadAddressFormat } from '../chunk-
|
|
3
|
+
import { useCartStore, useAuthStore } from '../chunk-QSRVMOXT.js';
|
|
4
|
+
import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-NNE42NMP.js';
|
|
5
|
+
import { cart_default } from '../chunk-E4D4XOAE.js';
|
|
6
|
+
import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon, buildAddressFormat, validatePincode, PINCODE_DEBOUNCE_MS, findSubdivision, getAreaOptions, NO_POSTAL_CODE, joinAddressLines, sanitizePhoneInput, lowerLabel, buildAddressSchema, usableEmail, findStateByName, normalizePostcode, getPincodeError, detectForeignPhone, calculateCartTotals, PINCODE_MIN_LENGTH, loadAddressFormat } from '../chunk-DZPK7GPG.js';
|
|
7
7
|
import { applyCoupon, removeCoupon, getCoupons, getAppliedCoupon } from '../chunk-A7EI7XLU.js';
|
|
8
8
|
import '../chunk-VAU5OL72.js';
|
|
9
9
|
import { getOrders, placeOrder, buyNowPreview, placeGuestBuyNowOrder, placeBuyNowOrder, publicCheckoutPreview, placePublicOrder } from '../chunk-KCLVR6G5.js';
|
|
@@ -1939,5 +1939,8 @@ function useCountryAwareAddressForm({
|
|
|
1939
1939
|
submit
|
|
1940
1940
|
};
|
|
1941
1941
|
}
|
|
1942
|
+
function useCheckoutTotals(cart, customizationOverride) {
|
|
1943
|
+
return useMemo(() => calculateCartTotals(cart, customizationOverride), [cart, customizationOverride]);
|
|
1944
|
+
}
|
|
1942
1945
|
|
|
1943
|
-
export { BUY_NOW_PAYLOAD_KEY, EMPTY_ADDRESS_FORM_VALUES, describePincodeIssue, toAddressPayload, useAddress, useAddressFormat, useBuyNow, useCart, useCheckoutCoupon, useCheckoutPayment, useCountries, useCountryAwareAddressForm, useCoupon, useGetProductCategories, useGetProductDetails, useGetProducts, useInlineCheckoutPayment, useOrders, usePincodeLookup, useProductDetailModal, usePublicCheckout, useServiceFormModal, useShopCheckout, useSubdivisions, useUserDetails, useVariantSelector, useWishlist };
|
|
1946
|
+
export { BUY_NOW_PAYLOAD_KEY, EMPTY_ADDRESS_FORM_VALUES, describePincodeIssue, toAddressPayload, useAddress, useAddressFormat, useBuyNow, useCart, useCheckoutCoupon, useCheckoutPayment, useCheckoutTotals, useCountries, useCountryAwareAddressForm, useCoupon, useGetProductCategories, useGetProductDetails, useGetProducts, useInlineCheckoutPayment, useOrders, usePincodeLookup, useProductDetailModal, usePublicCheckout, useServiceFormModal, useShopCheckout, useSubdivisions, useUserDetails, useVariantSelector, useWishlist };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as ProductDetail } from './product-
|
|
1
|
+
import { f as ProductDetail } from './product-D4kol-Z-.cjs';
|
|
2
2
|
|
|
3
3
|
declare namespace Review {
|
|
4
4
|
interface ReviewPayload {
|
|
@@ -88,6 +88,11 @@ interface Booking {
|
|
|
88
88
|
booking_number: number;
|
|
89
89
|
service_details: ProductDetail.Root;
|
|
90
90
|
}
|
|
91
|
+
interface BookingResponse {
|
|
92
|
+
results: Booking[];
|
|
93
|
+
total_bookings: number;
|
|
94
|
+
total_pages: number;
|
|
95
|
+
}
|
|
91
96
|
|
|
92
97
|
declare namespace Blog {
|
|
93
98
|
interface Post {
|
|
@@ -105,6 +110,7 @@ declare namespace Blog {
|
|
|
105
110
|
meta_title?: string;
|
|
106
111
|
meta_description?: string;
|
|
107
112
|
date?: string;
|
|
113
|
+
published_at: string;
|
|
108
114
|
created_at: string;
|
|
109
115
|
updated_at: string;
|
|
110
116
|
status: "draft" | "published" | "scheduled";
|
|
@@ -143,4 +149,4 @@ declare namespace Instagram {
|
|
|
143
149
|
}
|
|
144
150
|
}
|
|
145
151
|
|
|
146
|
-
export { Analytics as A, Blog as B, Instagram as I, Review as R, type Booking as a, type BookingDetails as b };
|
|
152
|
+
export { Analytics as A, Blog as B, Instagram as I, Review as R, type Booking as a, type BookingDetails as b, type BookingResponse as c };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as ProductDetail } from './product-
|
|
1
|
+
import { f as ProductDetail } from './product-D4kol-Z-.js';
|
|
2
2
|
|
|
3
3
|
declare namespace Review {
|
|
4
4
|
interface ReviewPayload {
|
|
@@ -88,6 +88,11 @@ interface Booking {
|
|
|
88
88
|
booking_number: number;
|
|
89
89
|
service_details: ProductDetail.Root;
|
|
90
90
|
}
|
|
91
|
+
interface BookingResponse {
|
|
92
|
+
results: Booking[];
|
|
93
|
+
total_bookings: number;
|
|
94
|
+
total_pages: number;
|
|
95
|
+
}
|
|
91
96
|
|
|
92
97
|
declare namespace Blog {
|
|
93
98
|
interface Post {
|
|
@@ -105,6 +110,7 @@ declare namespace Blog {
|
|
|
105
110
|
meta_title?: string;
|
|
106
111
|
meta_description?: string;
|
|
107
112
|
date?: string;
|
|
113
|
+
published_at: string;
|
|
108
114
|
created_at: string;
|
|
109
115
|
updated_at: string;
|
|
110
116
|
status: "draft" | "published" | "scheduled";
|
|
@@ -143,4 +149,4 @@ declare namespace Instagram {
|
|
|
143
149
|
}
|
|
144
150
|
}
|
|
145
151
|
|
|
146
|
-
export { Analytics as A, Blog as B, Instagram as I, Review as R, type Booking as a, type BookingDetails as b };
|
|
152
|
+
export { Analytics as A, Blog as B, Instagram as I, Review as R, type Booking as a, type BookingDetails as b, type BookingResponse as c };
|
package/dist/models/index.d.cts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export { A as Address, a as AddressPayload } from '../address-BdIB6IuI.cjs';
|
|
2
|
-
export { A as Analytics, B as Blog, a as Booking, b as BookingDetails, I as Instagram, R as Review } from '../instagram-
|
|
3
|
-
export { B as BuyNow, C as Checkout, P as PublicCheckout } from '../buy-now-
|
|
4
|
-
export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../
|
|
5
|
-
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-
|
|
6
|
-
export { O as Order } from '../orders-B3G4CyhH.cjs';
|
|
2
|
+
export { A as Analytics, B as Blog, a as Booking, b as BookingDetails, c as BookingResponse, I as Instagram, R as Review } from '../instagram-CSzrxk10.cjs';
|
|
3
|
+
export { B as BuyNow, C as Checkout, P as PublicCheckout } from '../buy-now-DrKY5_9R.cjs';
|
|
4
|
+
export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, O as Order, U as User, V as ValueType } from '../orders-ZKP0lqRN.cjs';
|
|
5
|
+
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-CKNFcE2d.cjs';
|
|
7
6
|
export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-dWMLZel6.cjs';
|
|
8
|
-
export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-
|
|
9
|
-
export { W as Wishlist } from '../wishlist-
|
|
7
|
+
export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-D4kol-Z-.cjs';
|
|
8
|
+
export { W as Wishlist } from '../wishlist-_0x0r1jt.cjs';
|
|
10
9
|
export { P as Pincode } from '../pincode-8u7yWLpQ.cjs';
|
|
11
10
|
import 'react-toastify';
|
|
12
11
|
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export { A as Address, a as AddressPayload } from '../address-BdIB6IuI.js';
|
|
2
|
-
export { A as Analytics, B as Blog, a as Booking, b as BookingDetails, I as Instagram, R as Review } from '../instagram-
|
|
3
|
-
export { B as BuyNow, C as Checkout, P as PublicCheckout } from '../buy-now-
|
|
4
|
-
export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../
|
|
5
|
-
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-
|
|
6
|
-
export { O as Order } from '../orders-Bl-Slh72.js';
|
|
2
|
+
export { A as Analytics, B as Blog, a as Booking, b as BookingDetails, c as BookingResponse, I as Instagram, R as Review } from '../instagram-CagTLmyq.js';
|
|
3
|
+
export { B as BuyNow, C as Checkout, P as PublicCheckout } from '../buy-now-CDug6LJ_.js';
|
|
4
|
+
export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, O as Order, U as User, V as ValueType } from '../orders-B6BmHCJN.js';
|
|
5
|
+
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-CtRKsWVx.js';
|
|
7
6
|
export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-dWMLZel6.js';
|
|
8
|
-
export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-
|
|
9
|
-
export { W as Wishlist } from '../wishlist-
|
|
7
|
+
export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-D4kol-Z-.js';
|
|
8
|
+
export { W as Wishlist } from '../wishlist-L3fM5-ie.js';
|
|
10
9
|
export { P as Pincode } from '../pincode-8u7yWLpQ.js';
|
|
11
10
|
import 'react-toastify';
|
|
12
11
|
|