@storepecker/storefront-core 2.6.2 → 2.7.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.
- package/dist/api/index.cjs +55 -46
- package/dist/api/index.d.cts +18 -3
- package/dist/api/index.d.ts +18 -3
- package/dist/api/index.js +12 -4
- package/dist/checkout/index.cjs +22 -22
- package/dist/checkout/index.js +2 -2
- package/dist/{chunk-PARH5TBK.cjs → chunk-5BT3MH4A.cjs} +3 -3
- package/dist/{chunk-VYHAWRJR.js → chunk-5JD6MRVS.js} +5 -2
- package/dist/{chunk-6PF4TQXP.js → chunk-6QHEH5XE.js} +4 -4
- package/dist/{chunk-ME6Z7TZW.js → chunk-CHRTGR3G.js} +6 -2
- package/dist/{chunk-QAC72HKO.js → chunk-H32TICAM.js} +14 -13
- package/dist/{chunk-COO7PUZH.cjs → chunk-IWYO22XV.cjs} +21 -21
- package/dist/{chunk-QSHOJ3NJ.cjs → chunk-KWYFA2LJ.cjs} +9 -6
- package/dist/{chunk-SMHJRNCR.cjs → chunk-LCMJYFHC.cjs} +14 -13
- package/dist/{chunk-LZADKC4Y.cjs → chunk-RNGQUWQW.cjs} +6 -2
- package/dist/{chunk-CUR7CHR5.js → chunk-TY5NK7NW.js} +1 -1
- package/dist/hooks/index.cjs +25 -25
- package/dist/hooks/index.js +7 -7
- package/dist/{blog-kdn4wDjq.d.ts → instagram-CqJBZ-0X.d.ts} +28 -1
- package/dist/{blog-yhzC2V0C.d.cts → instagram-D4JUT4ZU.d.cts} +28 -1
- package/dist/models/index.d.cts +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/store/index.cjs +9 -9
- package/dist/store/index.js +4 -4
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
package/dist/api/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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
|
-
var
|
|
7
|
+
var chunkRNGQUWQW_cjs = require('../chunk-RNGQUWQW.cjs');
|
|
8
8
|
var chunkRDUT4W3B_cjs = require('../chunk-RDUT4W3B.cjs');
|
|
9
9
|
var chunkECHV2JSY_cjs = require('../chunk-ECHV2JSY.cjs');
|
|
10
10
|
require('../chunk-BBRXE57K.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,
|
|
@@ -249,107 +257,107 @@ Object.defineProperty(exports, "removeCoupon", {
|
|
|
249
257
|
});
|
|
250
258
|
Object.defineProperty(exports, "checkPhonepePaymentStatus", {
|
|
251
259
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkRNGQUWQW_cjs.checkPhonepePaymentStatus; }
|
|
253
261
|
});
|
|
254
262
|
Object.defineProperty(exports, "getOrderDetails", {
|
|
255
263
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkRNGQUWQW_cjs.getOrderDetails; }
|
|
257
265
|
});
|
|
258
266
|
Object.defineProperty(exports, "getOrderDetailsByNumber", {
|
|
259
267
|
enumerable: true,
|
|
260
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkRNGQUWQW_cjs.getOrderDetailsByNumber; }
|
|
261
269
|
});
|
|
262
270
|
Object.defineProperty(exports, "getOrderDetailsByRef", {
|
|
263
271
|
enumerable: true,
|
|
264
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkRNGQUWQW_cjs.getOrderDetailsByRef; }
|
|
265
273
|
});
|
|
266
274
|
Object.defineProperty(exports, "getOrderDetailsByRefV2", {
|
|
267
275
|
enumerable: true,
|
|
268
|
-
get: function () { return
|
|
276
|
+
get: function () { return chunkRNGQUWQW_cjs.getOrderDetailsByRefV2; }
|
|
269
277
|
});
|
|
270
278
|
Object.defineProperty(exports, "getOrders", {
|
|
271
279
|
enumerable: true,
|
|
272
|
-
get: function () { return
|
|
280
|
+
get: function () { return chunkRNGQUWQW_cjs.getOrders; }
|
|
273
281
|
});
|
|
274
282
|
Object.defineProperty(exports, "getPublicOrderDetailsByNumber", {
|
|
275
283
|
enumerable: true,
|
|
276
|
-
get: function () { return
|
|
284
|
+
get: function () { return chunkRNGQUWQW_cjs.getPublicOrderDetailsByNumber; }
|
|
277
285
|
});
|
|
278
286
|
Object.defineProperty(exports, "getPublicOrderDetailsByRef", {
|
|
279
287
|
enumerable: true,
|
|
280
|
-
get: function () { return
|
|
288
|
+
get: function () { return chunkRNGQUWQW_cjs.getPublicOrderDetailsByRef; }
|
|
281
289
|
});
|
|
282
290
|
Object.defineProperty(exports, "getStripePaymentStatus", {
|
|
283
291
|
enumerable: true,
|
|
284
|
-
get: function () { return
|
|
292
|
+
get: function () { return chunkRNGQUWQW_cjs.getStripePaymentStatus; }
|
|
285
293
|
});
|
|
286
294
|
Object.defineProperty(exports, "getStripePaymentStatusPublic", {
|
|
287
295
|
enumerable: true,
|
|
288
|
-
get: function () { return
|
|
296
|
+
get: function () { return chunkRNGQUWQW_cjs.getStripePaymentStatusPublic; }
|
|
289
297
|
});
|
|
290
298
|
Object.defineProperty(exports, "makeCODOrder", {
|
|
291
299
|
enumerable: true,
|
|
292
|
-
get: function () { return
|
|
300
|
+
get: function () { return chunkRNGQUWQW_cjs.makeCODOrder; }
|
|
293
301
|
});
|
|
294
302
|
Object.defineProperty(exports, "phonepeOrderSuccess", {
|
|
295
303
|
enumerable: true,
|
|
296
|
-
get: function () { return
|
|
304
|
+
get: function () { return chunkRNGQUWQW_cjs.phonepeOrderSuccess; }
|
|
297
305
|
});
|
|
298
306
|
Object.defineProperty(exports, "phonepePublicOrderSuccess", {
|
|
299
307
|
enumerable: true,
|
|
300
|
-
get: function () { return
|
|
308
|
+
get: function () { return chunkRNGQUWQW_cjs.phonepePublicOrderSuccess; }
|
|
301
309
|
});
|
|
302
310
|
Object.defineProperty(exports, "placeOrder", {
|
|
303
311
|
enumerable: true,
|
|
304
|
-
get: function () { return
|
|
312
|
+
get: function () { return chunkRNGQUWQW_cjs.placeOrder; }
|
|
305
313
|
});
|
|
306
314
|
Object.defineProperty(exports, "publicMakeCODOrder", {
|
|
307
315
|
enumerable: true,
|
|
308
|
-
get: function () { return
|
|
316
|
+
get: function () { return chunkRNGQUWQW_cjs.publicMakeCODOrder; }
|
|
309
317
|
});
|
|
310
318
|
Object.defineProperty(exports, "publicPlaceOrder", {
|
|
311
319
|
enumerable: true,
|
|
312
|
-
get: function () { return
|
|
320
|
+
get: function () { return chunkRNGQUWQW_cjs.publicPlaceOrder; }
|
|
313
321
|
});
|
|
314
322
|
Object.defineProperty(exports, "razorpayOrderFail", {
|
|
315
323
|
enumerable: true,
|
|
316
|
-
get: function () { return
|
|
324
|
+
get: function () { return chunkRNGQUWQW_cjs.razorpayOrderFail; }
|
|
317
325
|
});
|
|
318
326
|
Object.defineProperty(exports, "razorpayOrderSuccess", {
|
|
319
327
|
enumerable: true,
|
|
320
|
-
get: function () { return
|
|
328
|
+
get: function () { return chunkRNGQUWQW_cjs.razorpayOrderSuccess; }
|
|
321
329
|
});
|
|
322
330
|
Object.defineProperty(exports, "razorpayPublicOrderSuccess", {
|
|
323
331
|
enumerable: true,
|
|
324
|
-
get: function () { return
|
|
332
|
+
get: function () { return chunkRNGQUWQW_cjs.razorpayPublicOrderSuccess; }
|
|
325
333
|
});
|
|
326
334
|
Object.defineProperty(exports, "stripeOrderFail", {
|
|
327
335
|
enumerable: true,
|
|
328
|
-
get: function () { return
|
|
336
|
+
get: function () { return chunkRNGQUWQW_cjs.stripeOrderFail; }
|
|
329
337
|
});
|
|
330
338
|
Object.defineProperty(exports, "stripeOrderSuccess", {
|
|
331
339
|
enumerable: true,
|
|
332
|
-
get: function () { return
|
|
340
|
+
get: function () { return chunkRNGQUWQW_cjs.stripeOrderSuccess; }
|
|
333
341
|
});
|
|
334
342
|
Object.defineProperty(exports, "stripePublicOrderSuccess", {
|
|
335
343
|
enumerable: true,
|
|
336
|
-
get: function () { return
|
|
344
|
+
get: function () { return chunkRNGQUWQW_cjs.stripePublicOrderSuccess; }
|
|
337
345
|
});
|
|
338
346
|
Object.defineProperty(exports, "updateOrder", {
|
|
339
347
|
enumerable: true,
|
|
340
|
-
get: function () { return
|
|
348
|
+
get: function () { return chunkRNGQUWQW_cjs.updateOrder; }
|
|
341
349
|
});
|
|
342
350
|
Object.defineProperty(exports, "updateOrderCustomization", {
|
|
343
351
|
enumerable: true,
|
|
344
|
-
get: function () { return
|
|
352
|
+
get: function () { return chunkRNGQUWQW_cjs.updateOrderCustomization; }
|
|
345
353
|
});
|
|
346
354
|
Object.defineProperty(exports, "uploadCustomizationImage", {
|
|
347
355
|
enumerable: true,
|
|
348
|
-
get: function () { return
|
|
356
|
+
get: function () { return chunkRNGQUWQW_cjs.uploadCustomizationImage; }
|
|
349
357
|
});
|
|
350
358
|
Object.defineProperty(exports, "verifyTabbyPayment", {
|
|
351
359
|
enumerable: true,
|
|
352
|
-
get: function () { return
|
|
360
|
+
get: function () { return chunkRNGQUWQW_cjs.verifyTabbyPayment; }
|
|
353
361
|
});
|
|
354
362
|
Object.defineProperty(exports, "addAddress", {
|
|
355
363
|
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
|
@@ -6,7 +6,7 @@ import { d as Product, f as ProductDetail } from '../product-CZtFWhxO.cjs';
|
|
|
6
6
|
import { O as Order } from '../orders-9_scVq_M.cjs';
|
|
7
7
|
import { W as Wishlist } from '../wishlist-Cx9Vrszq.cjs';
|
|
8
8
|
import { C as CollectionResponse } from '../collections-8YdINtUf.cjs';
|
|
9
|
-
import { R as Review, A as Analytics, a as Booking, B as Blog } from '../
|
|
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
|
/**
|
|
@@ -111,7 +111,10 @@ declare function stripePublicOrderSuccess(orderDetails: unknown): Promise<AxiosR
|
|
|
111
111
|
declare function stripeOrderSuccess(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
|
|
112
112
|
declare function stripeOrderFail(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
|
|
113
113
|
declare function makeCODOrder(orderId: number): Promise<AxiosResponse<unknown>>;
|
|
114
|
-
declare function publicMakeCODOrder(orderNumber: number
|
|
114
|
+
declare function publicMakeCODOrder(orderNumber: number, ownership?: {
|
|
115
|
+
customer_phone?: string;
|
|
116
|
+
customer_email?: string;
|
|
117
|
+
}): Promise<AxiosResponse<Cart.Root>>;
|
|
115
118
|
declare function updateOrderCustomization(customizationInput: unknown): Promise<AxiosResponse<undefined>>;
|
|
116
119
|
declare function uploadCustomizationImage(uploadForm: FormData): Promise<AxiosResponse<{
|
|
117
120
|
image_paths: string[];
|
|
@@ -185,4 +188,16 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
|
|
|
185
188
|
results: Blog.Post[];
|
|
186
189
|
}>>;
|
|
187
190
|
|
|
188
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Fetch live media for a set of curated Instagram post ids.
|
|
193
|
+
*
|
|
194
|
+
* Instagram CDN URLs are short-lived signed links, so this must be called
|
|
195
|
+
* client-side at render time (never cached/SSR'd). The response order is not
|
|
196
|
+
* guaranteed — re-order against the requested ids on the caller side if the
|
|
197
|
+
* merchant's curated order matters.
|
|
198
|
+
*
|
|
199
|
+
* @param ids comma-separated id string, or an array of ids
|
|
200
|
+
*/
|
|
201
|
+
declare function getInstagramMedia(ids: string | (string | number)[]): Promise<AxiosResponse<Instagram.MediaRefreshResponse>>;
|
|
202
|
+
|
|
203
|
+
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
|
@@ -6,7 +6,7 @@ import { d as Product, f as ProductDetail } from '../product-CZtFWhxO.js';
|
|
|
6
6
|
import { O as Order } from '../orders-C1XZr8tx.js';
|
|
7
7
|
import { W as Wishlist } from '../wishlist-CRNbfFIx.js';
|
|
8
8
|
import { C as CollectionResponse } from '../collections-ycrA2cPL.js';
|
|
9
|
-
import { R as Review, A as Analytics, a as Booking, B as Blog } from '../
|
|
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
|
/**
|
|
@@ -111,7 +111,10 @@ declare function stripePublicOrderSuccess(orderDetails: unknown): Promise<AxiosR
|
|
|
111
111
|
declare function stripeOrderSuccess(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
|
|
112
112
|
declare function stripeOrderFail(orderDetails: unknown): Promise<AxiosResponse<Cart.Root>>;
|
|
113
113
|
declare function makeCODOrder(orderId: number): Promise<AxiosResponse<unknown>>;
|
|
114
|
-
declare function publicMakeCODOrder(orderNumber: number
|
|
114
|
+
declare function publicMakeCODOrder(orderNumber: number, ownership?: {
|
|
115
|
+
customer_phone?: string;
|
|
116
|
+
customer_email?: string;
|
|
117
|
+
}): Promise<AxiosResponse<Cart.Root>>;
|
|
115
118
|
declare function updateOrderCustomization(customizationInput: unknown): Promise<AxiosResponse<undefined>>;
|
|
116
119
|
declare function uploadCustomizationImage(uploadForm: FormData): Promise<AxiosResponse<{
|
|
117
120
|
image_paths: string[];
|
|
@@ -185,4 +188,16 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
|
|
|
185
188
|
results: Blog.Post[];
|
|
186
189
|
}>>;
|
|
187
190
|
|
|
188
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Fetch live media for a set of curated Instagram post ids.
|
|
193
|
+
*
|
|
194
|
+
* Instagram CDN URLs are short-lived signed links, so this must be called
|
|
195
|
+
* client-side at render time (never cached/SSR'd). The response order is not
|
|
196
|
+
* guaranteed — re-order against the requested ids on the caller side if the
|
|
197
|
+
* merchant's curated order matters.
|
|
198
|
+
*
|
|
199
|
+
* @param ids comma-separated id string, or an array of ids
|
|
200
|
+
*/
|
|
201
|
+
declare function getInstagramMedia(ids: string | (string | number)[]): Promise<AxiosResponse<Instagram.MediaRefreshResponse>>;
|
|
202
|
+
|
|
203
|
+
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,8 +1,8 @@
|
|
|
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
|
-
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-
|
|
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-CHRTGR3G.js';
|
|
6
6
|
export { addAddress, deleteAddress, getAddresses, getCountries, getSubdivisions, updateAddress } from '../chunk-ZGMLOLTC.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';
|
|
@@ -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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKWYFA2LJ_cjs = require('../chunk-KWYFA2LJ.cjs');
|
|
4
4
|
require('../chunk-XFOUNOKO.cjs');
|
|
5
5
|
var chunkK44JZ5NL_cjs = require('../chunk-K44JZ5NL.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkRNGQUWQW_cjs = require('../chunk-RNGQUWQW.cjs');
|
|
7
7
|
var chunkTB72NPRM_cjs = require('../chunk-TB72NPRM.cjs');
|
|
8
8
|
require('../chunk-ECHV2JSY.cjs');
|
|
9
9
|
require('../chunk-BBRXE57K.cjs');
|
|
@@ -49,7 +49,7 @@ function calculateCartTotals(cart) {
|
|
|
49
49
|
// src/checkout/payment-status.ts
|
|
50
50
|
async function checkPhonepeReturnStatus(transactionId, callbacks) {
|
|
51
51
|
try {
|
|
52
|
-
const response = await
|
|
52
|
+
const response = await chunkRNGQUWQW_cjs.checkPhonepePaymentStatus(transactionId);
|
|
53
53
|
if (response.data.success) {
|
|
54
54
|
callbacks.onSuccess(void 0);
|
|
55
55
|
} else {
|
|
@@ -62,8 +62,8 @@ async function checkPhonepeReturnStatus(transactionId, callbacks) {
|
|
|
62
62
|
async function checkPhonepeReturnStatusWithOrder(transactionId, orderNumber, callbacks) {
|
|
63
63
|
try {
|
|
64
64
|
const [paymentResponse, orderResponse] = await Promise.all([
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
chunkRNGQUWQW_cjs.checkPhonepePaymentStatus(transactionId),
|
|
66
|
+
chunkRNGQUWQW_cjs.getOrderDetailsByNumber(orderNumber)
|
|
67
67
|
]);
|
|
68
68
|
const order = orderResponse.data;
|
|
69
69
|
callbacks.onOrderLoaded?.(order);
|
|
@@ -80,12 +80,12 @@ async function checkPhonepeReturnStatusWithOrder(transactionId, orderNumber, cal
|
|
|
80
80
|
}
|
|
81
81
|
async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, callbacks, options) {
|
|
82
82
|
try {
|
|
83
|
-
const getStatus = options?.isPublic ?
|
|
83
|
+
const getStatus = options?.isPublic ? chunkRNGQUWQW_cjs.getStripePaymentStatusPublic : chunkRNGQUWQW_cjs.getStripePaymentStatus;
|
|
84
84
|
const response = await getStatus(sessionId, orderNumber, paymentLinkUrl);
|
|
85
85
|
const data = response.data;
|
|
86
86
|
if (data.payment_status === "paid" || data.status === "complete") {
|
|
87
87
|
try {
|
|
88
|
-
const orderResponse = await
|
|
88
|
+
const orderResponse = await chunkRNGQUWQW_cjs.getOrderDetailsByNumber(orderNumber);
|
|
89
89
|
const order = orderResponse.data;
|
|
90
90
|
callbacks.onOrderLoaded?.(order);
|
|
91
91
|
chunkK44JZ5NL_cjs.pixelEvents.purchase(order);
|
|
@@ -103,10 +103,10 @@ async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, c
|
|
|
103
103
|
}
|
|
104
104
|
async function checkTabbyReturnStatus(orderNumber, callbacks) {
|
|
105
105
|
try {
|
|
106
|
-
const response = await
|
|
106
|
+
const response = await chunkRNGQUWQW_cjs.verifyTabbyPayment(orderNumber);
|
|
107
107
|
if (response.data.order_status === "paid" || response.data.order_status === "confirmed" || response.data.status === "paid") {
|
|
108
108
|
try {
|
|
109
|
-
const orderResponse = await
|
|
109
|
+
const orderResponse = await chunkRNGQUWQW_cjs.getOrderDetailsByNumber(orderNumber);
|
|
110
110
|
const order = orderResponse.data;
|
|
111
111
|
callbacks.onOrderLoaded?.(order);
|
|
112
112
|
chunkK44JZ5NL_cjs.pixelEvents.purchase(order);
|
|
@@ -125,55 +125,55 @@ async function checkTabbyReturnStatus(orderNumber, callbacks) {
|
|
|
125
125
|
|
|
126
126
|
Object.defineProperty(exports, "applyCheckoutCoupon", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkKWYFA2LJ_cjs.applyCheckoutCoupon; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "fetchAppliedCoupon", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkKWYFA2LJ_cjs.fetchAppliedCoupon; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "fetchAvailableCoupons", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkKWYFA2LJ_cjs.fetchAvailableCoupons; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "handleCODPayment", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkKWYFA2LJ_cjs.handleCODPayment; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "handlePhonepePayment", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkKWYFA2LJ_cjs.handlePhonepePayment; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "handleRazorpayFail", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkKWYFA2LJ_cjs.handleRazorpayFail; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "handleRazorpaySuccess", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkKWYFA2LJ_cjs.handleRazorpaySuccess; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "handleStripePayment", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkKWYFA2LJ_cjs.handleStripePayment; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "handleStripeSuccess", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkKWYFA2LJ_cjs.handleStripeSuccess; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "handleTabbyPayment", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkKWYFA2LJ_cjs.handleTabbyPayment; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "openRazorpayCheckout", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkKWYFA2LJ_cjs.openRazorpayCheckout; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "processPayment", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkKWYFA2LJ_cjs.processPayment; }
|
|
173
173
|
});
|
|
174
174
|
Object.defineProperty(exports, "removeCheckoutCoupon", {
|
|
175
175
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkKWYFA2LJ_cjs.removeCheckoutCoupon; }
|
|
177
177
|
});
|
|
178
178
|
Object.defineProperty(exports, "IP_API_CACHE_KEY", {
|
|
179
179
|
enumerable: true,
|
package/dist/checkout/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-
|
|
1
|
+
export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-5JD6MRVS.js';
|
|
2
2
|
import '../chunk-7M5CVYZJ.js';
|
|
3
3
|
import { pixelEvents } from '../chunk-WFDKKOO7.js';
|
|
4
|
-
import { checkPhonepePaymentStatus, getOrderDetailsByNumber, getStripePaymentStatusPublic, getStripePaymentStatus, verifyTabbyPayment } from '../chunk-
|
|
4
|
+
import { checkPhonepePaymentStatus, getOrderDetailsByNumber, getStripePaymentStatusPublic, getStripePaymentStatus, verifyTabbyPayment } from '../chunk-CHRTGR3G.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
6
|
import '../chunk-3SYYP3XV.js';
|
|
7
7
|
import '../chunk-WEMNXIRS.js';
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import { getCoupons, getAppliedCoupon, applyCoupon, removeCoupon } from './chunk-7M5CVYZJ.js';
|
|
2
2
|
import { pixelEvents } from './chunk-WFDKKOO7.js';
|
|
3
|
-
import { razorpayOrderSuccess, razorpayOrderFail, publicMakeCODOrder, makeCODOrder, stripeOrderSuccess } from './chunk-
|
|
3
|
+
import { razorpayOrderSuccess, razorpayOrderFail, publicMakeCODOrder, makeCODOrder, stripeOrderSuccess } from './chunk-CHRTGR3G.js';
|
|
4
4
|
import { getCloudFront } from './chunk-JQMLHRWL.js';
|
|
5
5
|
import { AxiosError } from 'axios';
|
|
6
6
|
|
|
@@ -113,7 +113,10 @@ async function handleCODPayment(order, callbacks, options) {
|
|
|
113
113
|
callbacks.onPaymentStart?.();
|
|
114
114
|
pixelEvents.initiateCheckout(order, "cod");
|
|
115
115
|
if (options?.isPublic) {
|
|
116
|
-
await publicMakeCODOrder(order.order_number
|
|
116
|
+
await publicMakeCODOrder(order.order_number, {
|
|
117
|
+
customer_phone: order.customer_phone,
|
|
118
|
+
customer_email: order.customer_email
|
|
119
|
+
});
|
|
117
120
|
} else {
|
|
118
121
|
await makeCODOrder(order.id);
|
|
119
122
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { updateCart, removeFromCart, addToCart, getCart, getCartItemQuantity } from './chunk-
|
|
2
|
-
import { cart_default } from './chunk-
|
|
3
|
-
import { updateOrderCustomization } from './chunk-
|
|
1
|
+
import { updateCart, removeFromCart, addToCart, getCart, getCartItemQuantity } from './chunk-TY5NK7NW.js';
|
|
2
|
+
import { cart_default } from './chunk-H32TICAM.js';
|
|
3
|
+
import { updateOrderCustomization } from './chunk-CHRTGR3G.js';
|
|
4
4
|
import { auth_default } from './chunk-WEMNXIRS.js';
|
|
5
5
|
import { USER_CRED_TOKEN, USER_CREDENTIALS } from './chunk-BQ256JKN.js';
|
|
6
6
|
import { create } from 'zustand';
|
|
@@ -63,7 +63,7 @@ var useCartStore = create((set) => ({
|
|
|
63
63
|
(p) => p.id === item.variant_id
|
|
64
64
|
);
|
|
65
65
|
if (product) {
|
|
66
|
-
cart_default.add(product);
|
|
66
|
+
cart_default.add(product, item.quantity);
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
}
|
|
@@ -107,8 +107,12 @@ async function stripeOrderFail(orderDetails) {
|
|
|
107
107
|
async function makeCODOrder(orderId) {
|
|
108
108
|
return http_service_default.post("/customer/order_cod/", { order_id: orderId });
|
|
109
109
|
}
|
|
110
|
-
async function publicMakeCODOrder(orderNumber) {
|
|
111
|
-
return http_service_default.post("/customer/public_order_cod/", {
|
|
110
|
+
async function publicMakeCODOrder(orderNumber, ownership) {
|
|
111
|
+
return http_service_default.post("/customer/public_order_cod/", {
|
|
112
|
+
order_number: orderNumber,
|
|
113
|
+
customer_phone: ownership?.customer_phone,
|
|
114
|
+
customer_email: ownership?.customer_email
|
|
115
|
+
});
|
|
112
116
|
}
|
|
113
117
|
async function updateOrderCustomization(customizationInput) {
|
|
114
118
|
return http_service_default.post("/customer/product_personalize/", customizationInput);
|