@storepecker/storefront-core 2.6.1 → 2.6.3
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 +28 -19
- package/dist/api/index.d.cts +20 -7
- package/dist/api/index.d.ts +20 -7
- package/dist/api/index.js +11 -3
- package/dist/{cart-DV1HcSC6.d.ts → cart-BGIsIZdM.d.ts} +1 -1
- package/dist/{cart-lJvJzaoH.d.cts → cart-CyN2JQTw.d.cts} +1 -1
- package/dist/checkout/index.cjs +1 -1
- package/dist/checkout/index.d.cts +3 -3
- package/dist/checkout/index.d.ts +3 -3
- package/dist/checkout/index.js +1 -1
- package/dist/{chunk-PARH5TBK.cjs → chunk-5BT3MH4A.cjs} +3 -3
- package/dist/{chunk-EGFOTJPC.js → chunk-5XVHYPOC.js} +1 -1
- package/dist/{chunk-OTMTHA5C.cjs → chunk-6LS5F4R3.cjs} +80 -0
- package/dist/{chunk-F45S7UWC.js → chunk-CBKJ3Y2I.js} +80 -1
- package/dist/{chunk-QAC72HKO.js → chunk-H32TICAM.js} +14 -13
- package/dist/{chunk-6Q7QMPOQ.js → chunk-ICKTXS6B.js} +1 -1
- package/dist/{chunk-HAQWCNDY.cjs → chunk-IG4BW3ZB.cjs} +3 -3
- package/dist/{chunk-KLNKIQQM.cjs → chunk-IVKJJLG7.cjs} +2 -2
- package/dist/{chunk-SMHJRNCR.cjs → chunk-LCMJYFHC.cjs} +14 -13
- package/dist/{chunk-6NFWEJSD.js → chunk-PGBYYKFQ.js} +5 -5
- package/dist/{chunk-CUR7CHR5.js → chunk-TY5NK7NW.js} +1 -1
- package/dist/{chunk-L43KF3AC.js → chunk-W6BDMNSU.js} +1 -1
- package/dist/{chunk-B3BXKMQA.cjs → chunk-YLLAP3H2.cjs} +2 -2
- package/dist/{chunk-DY7PNIB3.cjs → chunk-ZQOESVVE.cjs} +21 -21
- package/dist/{collections-fGX_D_Mi.d.cts → collections-8YdINtUf.d.cts} +1 -1
- package/dist/{collections-kERS_kZw.d.ts → collections-ycrA2cPL.d.ts} +1 -1
- package/dist/components/address-form.cjs +5 -4
- package/dist/components/address-form.js +4 -3
- 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.cjs +7 -7
- package/dist/components/index.d.cts +5 -5
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +5 -5
- package/dist/components/share-button.cjs +4 -3
- package/dist/components/share-button.d.cts +1 -1
- package/dist/components/share-button.d.ts +1 -1
- package/dist/components/share-button.js +3 -2
- package/dist/components/theme-data-initializer.d.cts +5 -5
- package/dist/components/theme-data-initializer.d.ts +5 -5
- package/dist/hooks/index.cjs +23 -22
- package/dist/hooks/index.d.cts +4 -4
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.js +8 -7
- package/dist/{blog-DDOl23BM.d.cts → instagram-CqJBZ-0X.d.ts} +29 -2
- package/dist/{blog-ICspYuDq.d.ts → instagram-D4JUT4ZU.d.cts} +29 -2
- package/dist/models/index.d.cts +6 -6
- package/dist/models/index.d.ts +6 -6
- package/dist/{orders-CGhcSTMg.d.ts → orders-9_scVq_M.d.cts} +3 -2
- package/dist/{orders-1vcg6whk.d.cts → orders-C1XZr8tx.d.ts} +3 -2
- package/dist/{pixelEvents-BEzVCIBj.d.ts → pixelEvents-D0sH22Er.d.ts} +4 -4
- package/dist/{pixelEvents-Bob6N-g5.d.cts → pixelEvents-uiPHbiAQ.d.cts} +4 -4
- package/dist/{product-B8elBN21.d.cts → product-CZtFWhxO.d.cts} +3 -0
- package/dist/{product-B8elBN21.d.ts → product-CZtFWhxO.d.ts} +3 -0
- package/dist/store/index.cjs +8 -8
- package/dist/store/index.d.cts +7 -7
- package/dist/store/index.d.ts +7 -7
- package/dist/store/index.js +3 -3
- package/dist/utils/index.cjs +31 -27
- package/dist/utils/index.d.cts +13 -9
- package/dist/utils/index.d.ts +13 -9
- package/dist/utils/index.js +4 -4
- package/dist/{wishlist-B-bvvOxv.d.ts → wishlist-CRNbfFIx.d.ts} +1 -1
- package/dist/{wishlist-BdpIFX5_.d.cts → wishlist-Cx9Vrszq.d.cts} +1 -1
- package/package.json +1 -1
package/dist/api/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var chunk5BT3MH4A_cjs = require('../chunk-5BT3MH4A.cjs');
|
|
5
|
+
require('../chunk-LCMJYFHC.cjs');
|
|
6
6
|
var chunkXFOUNOKO_cjs = require('../chunk-XFOUNOKO.cjs');
|
|
7
7
|
var chunkLZADKC4Y_cjs = require('../chunk-LZADKC4Y.cjs');
|
|
8
8
|
var chunkRDUT4W3B_cjs = require('../chunk-RDUT4W3B.cjs');
|
|
@@ -155,6 +155,14 @@ async function getMultipleBlogsBySlugs(slugs) {
|
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
// src/api/instagram.ts
|
|
159
|
+
async function getInstagramMedia(ids) {
|
|
160
|
+
const idsParam = Array.isArray(ids) ? ids.join(",") : ids;
|
|
161
|
+
return await chunkECHV2JSY_cjs.http_service_default.get("/marketing/instagram/media/refresh/", {
|
|
162
|
+
params: { ids: idsParam }
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
158
166
|
Object.defineProperty(exports, "getUserDetails", {
|
|
159
167
|
enumerable: true,
|
|
160
168
|
get: function () { return chunkY46EHRJQ_cjs.getUserDetails; }
|
|
@@ -165,71 +173,71 @@ Object.defineProperty(exports, "updateUserDetails", {
|
|
|
165
173
|
});
|
|
166
174
|
Object.defineProperty(exports, "addToCart", {
|
|
167
175
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunk5BT3MH4A_cjs.addToCart; }
|
|
169
177
|
});
|
|
170
178
|
Object.defineProperty(exports, "addWishlist", {
|
|
171
179
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunk5BT3MH4A_cjs.addWishlist; }
|
|
173
181
|
});
|
|
174
182
|
Object.defineProperty(exports, "getCart", {
|
|
175
183
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunk5BT3MH4A_cjs.getCart; }
|
|
177
185
|
});
|
|
178
186
|
Object.defineProperty(exports, "getCartItemQuantity", {
|
|
179
187
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunk5BT3MH4A_cjs.getCartItemQuantity; }
|
|
181
189
|
});
|
|
182
190
|
Object.defineProperty(exports, "getCategories", {
|
|
183
191
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunk5BT3MH4A_cjs.getCategories; }
|
|
185
193
|
});
|
|
186
194
|
Object.defineProperty(exports, "getDigitalProductDownloadLink", {
|
|
187
195
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunk5BT3MH4A_cjs.getDigitalProductDownloadLink; }
|
|
189
197
|
});
|
|
190
198
|
Object.defineProperty(exports, "getProductCategories", {
|
|
191
199
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunk5BT3MH4A_cjs.getProductCategories; }
|
|
193
201
|
});
|
|
194
202
|
Object.defineProperty(exports, "getProductDetail", {
|
|
195
203
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunk5BT3MH4A_cjs.getProductDetail; }
|
|
197
205
|
});
|
|
198
206
|
Object.defineProperty(exports, "getProductDetailBySlug", {
|
|
199
207
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunk5BT3MH4A_cjs.getProductDetailBySlug; }
|
|
201
209
|
});
|
|
202
210
|
Object.defineProperty(exports, "getProductList", {
|
|
203
211
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunk5BT3MH4A_cjs.getProductList; }
|
|
205
213
|
});
|
|
206
214
|
Object.defineProperty(exports, "getProducts", {
|
|
207
215
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunk5BT3MH4A_cjs.getProducts; }
|
|
209
217
|
});
|
|
210
218
|
Object.defineProperty(exports, "getWishlist", {
|
|
211
219
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunk5BT3MH4A_cjs.getWishlist; }
|
|
213
221
|
});
|
|
214
222
|
Object.defineProperty(exports, "notifyProductStock", {
|
|
215
223
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunk5BT3MH4A_cjs.notifyProductStock; }
|
|
217
225
|
});
|
|
218
226
|
Object.defineProperty(exports, "removeFromCart", {
|
|
219
227
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunk5BT3MH4A_cjs.removeFromCart; }
|
|
221
229
|
});
|
|
222
230
|
Object.defineProperty(exports, "removeFromWishlist", {
|
|
223
231
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunk5BT3MH4A_cjs.removeFromWishlist; }
|
|
225
233
|
});
|
|
226
234
|
Object.defineProperty(exports, "updateCart", {
|
|
227
235
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunk5BT3MH4A_cjs.updateCart; }
|
|
229
237
|
});
|
|
230
238
|
Object.defineProperty(exports, "updateDigitalProductDownloadLinkCount", {
|
|
231
239
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunk5BT3MH4A_cjs.updateDigitalProductDownloadLinkCount; }
|
|
233
241
|
});
|
|
234
242
|
Object.defineProperty(exports, "applyCoupon", {
|
|
235
243
|
enumerable: true,
|
|
@@ -398,6 +406,7 @@ exports.getBlogPostBySlug = getBlogPostBySlug;
|
|
|
398
406
|
exports.getBlogPostsList = getBlogPostsList;
|
|
399
407
|
exports.getCollection = getCollection;
|
|
400
408
|
exports.getFilters = getFilters;
|
|
409
|
+
exports.getInstagramMedia = getInstagramMedia;
|
|
401
410
|
exports.getLoginMethod = getLoginMethod;
|
|
402
411
|
exports.getMultipleBlogsBySlugs = getMultipleBlogsBySlugs;
|
|
403
412
|
exports.getMultipleCollections = getMultipleCollections;
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
3
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-
|
|
5
|
-
import { d as Product, f as ProductDetail } from '../product-
|
|
6
|
-
import { O as Order } from '../orders-
|
|
7
|
-
import { W as Wishlist } from '../wishlist-
|
|
8
|
-
import { C as CollectionResponse } from '../collections-
|
|
9
|
-
import { R as Review, A as Analytics, a as Booking, B as Blog } from '../
|
|
4
|
+
import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-CyN2JQTw.cjs';
|
|
5
|
+
import { d as Product, f as ProductDetail } from '../product-CZtFWhxO.cjs';
|
|
6
|
+
import { O as Order } from '../orders-9_scVq_M.cjs';
|
|
7
|
+
import { W as Wishlist } from '../wishlist-Cx9Vrszq.cjs';
|
|
8
|
+
import { C as CollectionResponse } from '../collections-8YdINtUf.cjs';
|
|
9
|
+
import { R as Review, A as Analytics, a as Booking, B as Blog, I as Instagram } from '../instagram-D4JUT4ZU.cjs';
|
|
10
10
|
import 'react-toastify';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -119,6 +119,7 @@ declare function uploadCustomizationImage(uploadForm: FormData): Promise<AxiosRe
|
|
|
119
119
|
declare function verifyTabbyPayment(orderNumber: number): Promise<AxiosResponse<{
|
|
120
120
|
order_status: string;
|
|
121
121
|
message: string;
|
|
122
|
+
status: string;
|
|
122
123
|
}>>;
|
|
123
124
|
|
|
124
125
|
declare function getProductList(url: string, filter: unknown): Promise<Product.ProductResponse>;
|
|
@@ -184,4 +185,16 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
|
|
|
184
185
|
results: Blog.Post[];
|
|
185
186
|
}>>;
|
|
186
187
|
|
|
187
|
-
|
|
188
|
+
/**
|
|
189
|
+
* Fetch live media for a set of curated Instagram post ids.
|
|
190
|
+
*
|
|
191
|
+
* Instagram CDN URLs are short-lived signed links, so this must be called
|
|
192
|
+
* client-side at render time (never cached/SSR'd). The response order is not
|
|
193
|
+
* guaranteed — re-order against the requested ids on the caller side if the
|
|
194
|
+
* merchant's curated order matters.
|
|
195
|
+
*
|
|
196
|
+
* @param ids comma-separated id string, or an array of ids
|
|
197
|
+
*/
|
|
198
|
+
declare function getInstagramMedia(ids: string | (string | number)[]): Promise<AxiosResponse<Instagram.MediaRefreshResponse>>;
|
|
199
|
+
|
|
200
|
+
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, 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, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
3
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-
|
|
5
|
-
import { d as Product, f as ProductDetail } from '../product-
|
|
6
|
-
import { O as Order } from '../orders-
|
|
7
|
-
import { W as Wishlist } from '../wishlist-
|
|
8
|
-
import { C as CollectionResponse } from '../collections-
|
|
9
|
-
import { R as Review, A as Analytics, a as Booking, B as Blog } from '../
|
|
4
|
+
import { U as User, C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-BGIsIZdM.js';
|
|
5
|
+
import { d as Product, f as ProductDetail } from '../product-CZtFWhxO.js';
|
|
6
|
+
import { O as Order } from '../orders-C1XZr8tx.js';
|
|
7
|
+
import { W as Wishlist } from '../wishlist-CRNbfFIx.js';
|
|
8
|
+
import { C as CollectionResponse } from '../collections-ycrA2cPL.js';
|
|
9
|
+
import { R as Review, A as Analytics, a as Booking, B as Blog, I as Instagram } from '../instagram-CqJBZ-0X.js';
|
|
10
10
|
import 'react-toastify';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -119,6 +119,7 @@ declare function uploadCustomizationImage(uploadForm: FormData): Promise<AxiosRe
|
|
|
119
119
|
declare function verifyTabbyPayment(orderNumber: number): Promise<AxiosResponse<{
|
|
120
120
|
order_status: string;
|
|
121
121
|
message: string;
|
|
122
|
+
status: string;
|
|
122
123
|
}>>;
|
|
123
124
|
|
|
124
125
|
declare function getProductList(url: string, filter: unknown): Promise<Product.ProductResponse>;
|
|
@@ -184,4 +185,16 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
|
|
|
184
185
|
results: Blog.Post[];
|
|
185
186
|
}>>;
|
|
186
187
|
|
|
187
|
-
|
|
188
|
+
/**
|
|
189
|
+
* Fetch live media for a set of curated Instagram post ids.
|
|
190
|
+
*
|
|
191
|
+
* Instagram CDN URLs are short-lived signed links, so this must be called
|
|
192
|
+
* client-side at render time (never cached/SSR'd). The response order is not
|
|
193
|
+
* guaranteed — re-order against the requested ids on the caller side if the
|
|
194
|
+
* merchant's curated order matters.
|
|
195
|
+
*
|
|
196
|
+
* @param ids comma-separated id string, or an array of ids
|
|
197
|
+
*/
|
|
198
|
+
declare function getInstagramMedia(ids: string | (string | number)[]): Promise<AxiosResponse<Instagram.MediaRefreshResponse>>;
|
|
199
|
+
|
|
200
|
+
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, 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, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
package/dist/api/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { getUserDetails, updateUserDetails } from '../chunk-WYXT5AAG.js';
|
|
2
|
-
export { addToCart, addWishlist, getCart, getCartItemQuantity, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
export { addToCart, addWishlist, getCart, getCartItemQuantity, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-TY5NK7NW.js';
|
|
3
|
+
import '../chunk-H32TICAM.js';
|
|
4
4
|
export { applyCoupon, getAppliedCoupon, getCoupons, removeCoupon } from '../chunk-7M5CVYZJ.js';
|
|
5
5
|
export { checkPhonepePaymentStatus, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-ME6Z7TZW.js';
|
|
6
6
|
export { addAddress, deleteAddress, getAddresses, getCountries, getSubdivisions, updateAddress } from '../chunk-ZGMLOLTC.js';
|
|
@@ -150,4 +150,12 @@ async function getMultipleBlogsBySlugs(slugs) {
|
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
// src/api/instagram.ts
|
|
154
|
+
async function getInstagramMedia(ids) {
|
|
155
|
+
const idsParam = Array.isArray(ids) ? ids.join(",") : ids;
|
|
156
|
+
return await http_service_default.get("/marketing/instagram/media/refresh/", {
|
|
157
|
+
params: { ids: idsParam }
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export { addReview, createBooking, getAffiliateRedirect, getBlogPostBySlug, getBlogPostsList, getCollection, getFilters, getInstagramMedia, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getReviewSummary, getReviews, getServerHttpService, getUserBookings, postAnalytics, sendOTP, server_http_service_default as serverHttpService, uploadReviewImages, verifyOTP };
|
package/dist/checkout/index.cjs
CHANGED
|
@@ -104,7 +104,7 @@ async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, c
|
|
|
104
104
|
async function checkTabbyReturnStatus(orderNumber, callbacks) {
|
|
105
105
|
try {
|
|
106
106
|
const response = await chunkLZADKC4Y_cjs.verifyTabbyPayment(orderNumber);
|
|
107
|
-
if (response.data.order_status === "paid" || response.data.order_status === "confirmed") {
|
|
107
|
+
if (response.data.order_status === "paid" || response.data.order_status === "confirmed" || response.data.status === "paid") {
|
|
108
108
|
try {
|
|
109
109
|
const orderResponse = await chunkLZADKC4Y_cjs.getOrderDetailsByNumber(orderNumber);
|
|
110
110
|
const order = orderResponse.data;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
|
-
import { C as Cart, c as Coupon } from '../cart-
|
|
3
|
-
import { O as Order } from '../orders-
|
|
4
|
-
import '../product-
|
|
2
|
+
import { C as Cart, c as Coupon } from '../cart-CyN2JQTw.cjs';
|
|
3
|
+
import { O as Order } from '../orders-9_scVq_M.cjs';
|
|
4
|
+
import '../product-CZtFWhxO.cjs';
|
|
5
5
|
import 'react-toastify';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/checkout/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
|
-
import { C as Cart, c as Coupon } from '../cart-
|
|
3
|
-
import { O as Order } from '../orders-
|
|
4
|
-
import '../product-
|
|
2
|
+
import { C as Cart, c as Coupon } from '../cart-BGIsIZdM.js';
|
|
3
|
+
import { O as Order } from '../orders-C1XZr8tx.js';
|
|
4
|
+
import '../product-CZtFWhxO.js';
|
|
5
5
|
import 'react-toastify';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/checkout/index.js
CHANGED
|
@@ -102,7 +102,7 @@ async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, c
|
|
|
102
102
|
async function checkTabbyReturnStatus(orderNumber, callbacks) {
|
|
103
103
|
try {
|
|
104
104
|
const response = await verifyTabbyPayment(orderNumber);
|
|
105
|
-
if (response.data.order_status === "paid" || response.data.order_status === "confirmed") {
|
|
105
|
+
if (response.data.order_status === "paid" || response.data.order_status === "confirmed" || response.data.status === "paid") {
|
|
106
106
|
try {
|
|
107
107
|
const orderResponse = await getOrderDetailsByNumber(orderNumber);
|
|
108
108
|
const order = orderResponse.data;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLCMJYFHC_cjs = require('./chunk-LCMJYFHC.cjs');
|
|
4
4
|
var chunkECHV2JSY_cjs = require('./chunk-ECHV2JSY.cjs');
|
|
5
5
|
var chunkBBRXE57K_cjs = require('./chunk-BBRXE57K.cjs');
|
|
6
6
|
|
|
7
7
|
// src/api/cart.ts
|
|
8
8
|
async function getCart(url, addressId, shippingOptionId) {
|
|
9
|
-
const localCart =
|
|
9
|
+
const localCart = chunkLCMJYFHC_cjs.cart_default.get();
|
|
10
10
|
return chunkBBRXE57K_cjs.auth_default.getUserDetails() ? (await chunkECHV2JSY_cjs.http_service_default.get(url, { params: { address_id: addressId, shipping_option_id: shippingOptionId } })).data : localCart || {
|
|
11
11
|
product_variants: [],
|
|
12
12
|
total_amount: 0,
|
|
@@ -28,7 +28,7 @@ async function getCart(url, addressId, shippingOptionId) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
async function getCartItemQuantity() {
|
|
31
|
-
const localCart =
|
|
31
|
+
const localCart = chunkLCMJYFHC_cjs.cart_default.get();
|
|
32
32
|
return chunkBBRXE57K_cjs.auth_default.getUserDetails() ? (await chunkECHV2JSY_cjs.http_service_default.get("/customer/cart/quantity/")).data : { total_quantity: localCart?.total_quantity || 0 };
|
|
33
33
|
}
|
|
34
34
|
async function addToCart(product, customizationInputs) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkBBRB475I_cjs = require('./chunk-BBRB475I.cjs');
|
|
4
|
+
|
|
3
5
|
// src/utils/misc.ts
|
|
4
6
|
function convertObjectToParams(params) {
|
|
5
7
|
const cleanedParams = Object.fromEntries(
|
|
@@ -149,6 +151,83 @@ async function getAddressMeta(countryCode) {
|
|
|
149
151
|
hasPostal: !!data.zip_name_type
|
|
150
152
|
};
|
|
151
153
|
}
|
|
154
|
+
function getOrderStatus(order) {
|
|
155
|
+
switch (order.order_status) {
|
|
156
|
+
case "pending":
|
|
157
|
+
return {
|
|
158
|
+
title: "Order yet to confirm by the seller",
|
|
159
|
+
info: "We are waiting for the seller to confirm your order. This usually takes less than 24 hours."
|
|
160
|
+
};
|
|
161
|
+
case "confirmed":
|
|
162
|
+
return {
|
|
163
|
+
title: "Order confirmed",
|
|
164
|
+
info: "Your order has been confirmed and is being processed. You will receive a notification once it is dispatched."
|
|
165
|
+
};
|
|
166
|
+
case "packed":
|
|
167
|
+
return {
|
|
168
|
+
title: "Order packed",
|
|
169
|
+
info: "Your order has been packed and is ready for dispatch. You will receive a notification once it is shipped."
|
|
170
|
+
};
|
|
171
|
+
case "shipped":
|
|
172
|
+
return {
|
|
173
|
+
title: order.delivered_at ? `Arriving by ${formatDateTime(order.delivered_at)}` : "Order shipped",
|
|
174
|
+
info: `Your order has been shipped and is on its way to you. ${order.tracking_id ? `Track your order using ${order.tracking_id}` : ""}`
|
|
175
|
+
};
|
|
176
|
+
case "delivered":
|
|
177
|
+
if (!order.delivered_at) {
|
|
178
|
+
return {
|
|
179
|
+
title: "Delivered"
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
const deliveredDate = new Date(order.delivered_at);
|
|
183
|
+
const currentDate = /* @__PURE__ */ new Date();
|
|
184
|
+
const diffTime = currentDate.getTime() - deliveredDate.getTime();
|
|
185
|
+
const difference = Math.floor(diffTime / (1e3 * 60 * 60 * 24));
|
|
186
|
+
if (difference < 3) {
|
|
187
|
+
return {
|
|
188
|
+
title: `Delivered ${chunkBBRB475I_cjs.timeFromNow(order.delivered_at)}`
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
title: `Delivered on ${formatDateTime(order.delivered_at)}`
|
|
193
|
+
};
|
|
194
|
+
case "failed":
|
|
195
|
+
return {
|
|
196
|
+
title: "Order failed",
|
|
197
|
+
info: "Your order has failed. If you have any queries, please contact customer support"
|
|
198
|
+
};
|
|
199
|
+
case "cancelled":
|
|
200
|
+
return {
|
|
201
|
+
title: "Cancelled",
|
|
202
|
+
info: "Your order has been cancelled. If you have any queries, please contact customer support"
|
|
203
|
+
};
|
|
204
|
+
case "paid":
|
|
205
|
+
return {
|
|
206
|
+
title: "Order placed, Thank you",
|
|
207
|
+
info: "Your order has been placed successfully. Order status will be updated soon."
|
|
208
|
+
};
|
|
209
|
+
case "payment_pending":
|
|
210
|
+
return {
|
|
211
|
+
title: "Payment pending",
|
|
212
|
+
info: "Your order has not been placed. Please retry your payment to proceed."
|
|
213
|
+
};
|
|
214
|
+
case "refunded":
|
|
215
|
+
return {
|
|
216
|
+
title: "Refunded",
|
|
217
|
+
info: "Your order has been refunded. If you have any queries, please contact customer support."
|
|
218
|
+
};
|
|
219
|
+
case "returned":
|
|
220
|
+
return {
|
|
221
|
+
title: "Returned",
|
|
222
|
+
info: "Your order has been returned. If you have any queries, please contact customer support."
|
|
223
|
+
};
|
|
224
|
+
default:
|
|
225
|
+
return {
|
|
226
|
+
title: "Purchase successful",
|
|
227
|
+
info: "Your order has been placed successfully. Order status will be updated soon."
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
}
|
|
152
231
|
|
|
153
232
|
exports.constructFilter = constructFilter;
|
|
154
233
|
exports.convertObjectToParams = convertObjectToParams;
|
|
@@ -158,6 +237,7 @@ exports.formatDateTime = formatDateTime;
|
|
|
158
237
|
exports.formatPostalLabel = formatPostalLabel;
|
|
159
238
|
exports.getAddressMeta = getAddressMeta;
|
|
160
239
|
exports.getDelayInMilliseconds = getDelayInMilliseconds;
|
|
240
|
+
exports.getOrderStatus = getOrderStatus;
|
|
161
241
|
exports.getParamsFromURL = getParamsFromURL;
|
|
162
242
|
exports.getQueryParams = getQueryParams;
|
|
163
243
|
exports.pluralize = pluralize;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { timeFromNow } from './chunk-HSF2D56O.js';
|
|
2
|
+
|
|
1
3
|
// src/utils/misc.ts
|
|
2
4
|
function convertObjectToParams(params) {
|
|
3
5
|
const cleanedParams = Object.fromEntries(
|
|
@@ -147,5 +149,82 @@ async function getAddressMeta(countryCode) {
|
|
|
147
149
|
hasPostal: !!data.zip_name_type
|
|
148
150
|
};
|
|
149
151
|
}
|
|
152
|
+
function getOrderStatus(order) {
|
|
153
|
+
switch (order.order_status) {
|
|
154
|
+
case "pending":
|
|
155
|
+
return {
|
|
156
|
+
title: "Order yet to confirm by the seller",
|
|
157
|
+
info: "We are waiting for the seller to confirm your order. This usually takes less than 24 hours."
|
|
158
|
+
};
|
|
159
|
+
case "confirmed":
|
|
160
|
+
return {
|
|
161
|
+
title: "Order confirmed",
|
|
162
|
+
info: "Your order has been confirmed and is being processed. You will receive a notification once it is dispatched."
|
|
163
|
+
};
|
|
164
|
+
case "packed":
|
|
165
|
+
return {
|
|
166
|
+
title: "Order packed",
|
|
167
|
+
info: "Your order has been packed and is ready for dispatch. You will receive a notification once it is shipped."
|
|
168
|
+
};
|
|
169
|
+
case "shipped":
|
|
170
|
+
return {
|
|
171
|
+
title: order.delivered_at ? `Arriving by ${formatDateTime(order.delivered_at)}` : "Order shipped",
|
|
172
|
+
info: `Your order has been shipped and is on its way to you. ${order.tracking_id ? `Track your order using ${order.tracking_id}` : ""}`
|
|
173
|
+
};
|
|
174
|
+
case "delivered":
|
|
175
|
+
if (!order.delivered_at) {
|
|
176
|
+
return {
|
|
177
|
+
title: "Delivered"
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
const deliveredDate = new Date(order.delivered_at);
|
|
181
|
+
const currentDate = /* @__PURE__ */ new Date();
|
|
182
|
+
const diffTime = currentDate.getTime() - deliveredDate.getTime();
|
|
183
|
+
const difference = Math.floor(diffTime / (1e3 * 60 * 60 * 24));
|
|
184
|
+
if (difference < 3) {
|
|
185
|
+
return {
|
|
186
|
+
title: `Delivered ${timeFromNow(order.delivered_at)}`
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
title: `Delivered on ${formatDateTime(order.delivered_at)}`
|
|
191
|
+
};
|
|
192
|
+
case "failed":
|
|
193
|
+
return {
|
|
194
|
+
title: "Order failed",
|
|
195
|
+
info: "Your order has failed. If you have any queries, please contact customer support"
|
|
196
|
+
};
|
|
197
|
+
case "cancelled":
|
|
198
|
+
return {
|
|
199
|
+
title: "Cancelled",
|
|
200
|
+
info: "Your order has been cancelled. If you have any queries, please contact customer support"
|
|
201
|
+
};
|
|
202
|
+
case "paid":
|
|
203
|
+
return {
|
|
204
|
+
title: "Order placed, Thank you",
|
|
205
|
+
info: "Your order has been placed successfully. Order status will be updated soon."
|
|
206
|
+
};
|
|
207
|
+
case "payment_pending":
|
|
208
|
+
return {
|
|
209
|
+
title: "Payment pending",
|
|
210
|
+
info: "Your order has not been placed. Please retry your payment to proceed."
|
|
211
|
+
};
|
|
212
|
+
case "refunded":
|
|
213
|
+
return {
|
|
214
|
+
title: "Refunded",
|
|
215
|
+
info: "Your order has been refunded. If you have any queries, please contact customer support."
|
|
216
|
+
};
|
|
217
|
+
case "returned":
|
|
218
|
+
return {
|
|
219
|
+
title: "Returned",
|
|
220
|
+
info: "Your order has been returned. If you have any queries, please contact customer support."
|
|
221
|
+
};
|
|
222
|
+
default:
|
|
223
|
+
return {
|
|
224
|
+
title: "Purchase successful",
|
|
225
|
+
info: "Your order has been placed successfully. Order status will be updated soon."
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
}
|
|
150
229
|
|
|
151
|
-
export { constructFilter, convertObjectToParams, convertToCurrency, digestMessage, formatDateTime, formatPostalLabel, getAddressMeta, getDelayInMilliseconds, getParamsFromURL, getQueryParams, pluralize, pushParamsToURL, shareLink };
|
|
230
|
+
export { constructFilter, convertObjectToParams, convertToCurrency, digestMessage, formatDateTime, formatPostalLabel, getAddressMeta, getDelayInMilliseconds, getOrderStatus, getParamsFromURL, getQueryParams, pluralize, pushParamsToURL, shareLink };
|
|
@@ -9,15 +9,16 @@ var LocalCart = {
|
|
|
9
9
|
set(cart) {
|
|
10
10
|
localStorage.setItem(USER_CART, JSON.stringify(cart));
|
|
11
11
|
},
|
|
12
|
-
add(product) {
|
|
12
|
+
add(product, quantity = 1) {
|
|
13
|
+
const qty = Number(quantity) || 1;
|
|
13
14
|
const cart = this.get();
|
|
14
15
|
if (!cart) {
|
|
15
16
|
this.set({
|
|
16
17
|
product_variants: [product],
|
|
17
|
-
products_quantity: { [product.id]:
|
|
18
|
-
total_quantity:
|
|
19
|
-
cart_count:
|
|
20
|
-
total_amount: product.selling_price,
|
|
18
|
+
products_quantity: { [product.id]: qty },
|
|
19
|
+
total_quantity: qty,
|
|
20
|
+
cart_count: qty,
|
|
21
|
+
total_amount: Number(product.selling_price) * qty,
|
|
21
22
|
variant_discounts: {}
|
|
22
23
|
});
|
|
23
24
|
return;
|
|
@@ -27,23 +28,23 @@ var LocalCart = {
|
|
|
27
28
|
if (existingProduct) {
|
|
28
29
|
cart.products_quantity = {
|
|
29
30
|
...cart.products_quantity,
|
|
30
|
-
[product.id]: (Number(cart.products_quantity[product.id]) || 0) +
|
|
31
|
+
[product.id]: (Number(cart.products_quantity[product.id]) || 0) + qty
|
|
31
32
|
};
|
|
32
|
-
cart.total_quantity = Number(cart.total_quantity) +
|
|
33
|
-
cart.cart_count = Number(cart.cart_count) +
|
|
34
|
-
cart.total_amount = Number(cart.total_amount) + Number(product.selling_price);
|
|
33
|
+
cart.total_quantity = Number(cart.total_quantity) + qty;
|
|
34
|
+
cart.cart_count = Number(cart.cart_count) + qty;
|
|
35
|
+
cart.total_amount = Number(cart.total_amount) + Number(product.selling_price) * qty;
|
|
35
36
|
this.set(cart);
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
39
|
newCart.push(product);
|
|
39
40
|
cart.products_quantity = {
|
|
40
41
|
...cart.products_quantity,
|
|
41
|
-
[product.id]: (cart.products_quantity[product.id] || 0) +
|
|
42
|
+
[product.id]: (cart.products_quantity[product.id] || 0) + qty
|
|
42
43
|
};
|
|
43
44
|
cart.product_variants = newCart;
|
|
44
|
-
cart.total_quantity = Number(cart.total_quantity) +
|
|
45
|
-
cart.cart_count = Number(cart.cart_count) +
|
|
46
|
-
cart.total_amount = Number(cart.total_amount) + Number(product.selling_price);
|
|
45
|
+
cart.total_quantity = Number(cart.total_quantity) + qty;
|
|
46
|
+
cart.cart_count = Number(cart.cart_count) + qty;
|
|
47
|
+
cart.total_amount = Number(cart.total_amount) + Number(product.selling_price) * qty;
|
|
47
48
|
this.set(cart);
|
|
48
49
|
},
|
|
49
50
|
remove(product) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { updateAddress, addAddress, getCountries, getSubdivisions } from './chunk-ZGMLOLTC.js';
|
|
2
2
|
import { getCache } from './chunk-OSM73ETC.js';
|
|
3
|
-
import { getAddressMeta } from './chunk-
|
|
3
|
+
import { getAddressMeta } from './chunk-CBKJ3Y2I.js';
|
|
4
4
|
import { addressFormInitialValues, IP_API_CACHE_KEY, addressValidationSchema, buildSubmitPayload } from './chunk-ELP23UGF.js';
|
|
5
5
|
import { useState, useEffect, useMemo, useCallback } from 'react';
|
|
6
6
|
import { useFormik } from 'formik';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk3YRSHPM6_cjs = require('./chunk-3YRSHPM6.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk6LS5F4R3_cjs = require('./chunk-6LS5F4R3.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
|
-
|
|
14
|
-
`Buy ${product.name} at ${
|
|
13
|
+
chunk6LS5F4R3_cjs.shareLink(
|
|
14
|
+
`Buy ${product.name} at ${chunk6LS5F4R3_cjs.convertToCurrency(
|
|
15
15
|
Number(product.selling_price)
|
|
16
16
|
)}`,
|
|
17
17
|
product.name
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkRDUT4W3B_cjs = require('./chunk-RDUT4W3B.cjs');
|
|
4
4
|
var chunkLJUGNSQQ_cjs = require('./chunk-LJUGNSQQ.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk6LS5F4R3_cjs = require('./chunk-6LS5F4R3.cjs');
|
|
6
6
|
var chunkTB72NPRM_cjs = require('./chunk-TB72NPRM.cjs');
|
|
7
7
|
var react = require('react');
|
|
8
8
|
var formik = require('formik');
|
|
@@ -97,7 +97,7 @@ function useAddressForm(options = {}) {
|
|
|
97
97
|
};
|
|
98
98
|
const fetchAddressMeta = async () => {
|
|
99
99
|
try {
|
|
100
|
-
const response = await
|
|
100
|
+
const response = await chunk6LS5F4R3_cjs.getAddressMeta(
|
|
101
101
|
selectedCountry.tld_code
|
|
102
102
|
);
|
|
103
103
|
setAddressMeta(response);
|