@gofynd/fdk-client-javascript 3.8.0 → 3.9.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/README.md CHANGED
@@ -234,7 +234,7 @@ console.log("Active Theme: ", response.information.name);
234
234
  The above code will log the curl command in the console
235
235
 
236
236
  ```bash
237
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.8.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
237
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.9.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
238
238
  Active Theme: Emerge
239
239
  ```
240
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,7 +6,7 @@ declare class Cart {
6
6
  addAddress: string;
7
7
  addItems: string;
8
8
  applyCoupon: string;
9
- applyRewardPoints: string;
9
+ applyLoyaltyPoints: string;
10
10
  checkoutCart: string;
11
11
  checkoutCartV2: string;
12
12
  deleteCart: string;
@@ -67,11 +67,11 @@ declare class Cart {
67
67
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
68
68
  * @param {import("../ApplicationAPIClient").Options} - Options
69
69
  * @returns {Promise<CartDetailResult>} - Success response
70
- * @name applyRewardPoints
71
- * @summary: Use reward points
72
- * @description: Users can redeem their accumulated reward points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/applyRewardPoints/).
70
+ * @name applyLoyaltyPoints
71
+ * @summary: Use loyalty points
72
+ * @description: Users can redeem their accumulated loyalty points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/applyLoyaltyPoints/).
73
73
  */
74
- applyRewardPoints({ body, xOrderingSource, id, i, b, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
74
+ applyLoyaltyPoints({ body, xOrderingSource, id, i, b, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
75
75
  /**
76
76
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
77
77
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -87,7 +87,7 @@ declare class Cart {
87
87
  * @returns {Promise<CartCheckoutResult>} - Success response
88
88
  * @name checkoutCartV2
89
89
  * @summary: Checkout cart
90
- * @description: The checkout cart initiates the order creation process based on the items in the user's cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/checkoutCartV2/).
90
+ * @description: The checkout cart initiates the order creation process based on the items in the user's cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/checkoutCartV2/).
91
91
  */
92
92
  checkoutCartV2({ body, xOrderingSource, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartCheckoutResult>;
93
93
  /**
@@ -276,7 +276,7 @@ declare class Cart {
276
276
  * @returns {Promise<UpdateCartDetailResult>} - Success response
277
277
  * @name updateCartBreakup
278
278
  * @summary: Update store credits into cart and their items
279
- * @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/updateCartBreakup/).
279
+ * @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/updateCartBreakup/).
280
280
  */
281
281
  updateCartBreakup({ body, xOrderingSource, id, i, b, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateCartDetailResult>;
282
282
  /**
@@ -15,7 +15,7 @@ class Cart {
15
15
  addAddress: "/service/application/cart/v1.0/address",
16
16
  addItems: "/service/application/cart/v1.0/detail",
17
17
  applyCoupon: "/service/application/cart/v1.0/coupon",
18
- applyRewardPoints: "/service/application/cart/v1.0/redeem/points/",
18
+ applyLoyaltyPoints: "/service/application/cart/v1.0/redeem",
19
19
  checkoutCart: "/service/application/cart/v1.0/checkout",
20
20
  checkoutCartV2: "/service/application/cart/v2.0/checkout",
21
21
  deleteCart: "/service/application/cart/v1.0/cart_archive",
@@ -203,11 +203,11 @@ class Cart {
203
203
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
204
204
  * @param {import("../ApplicationAPIClient").Options} - Options
205
205
  * @returns {Promise<CartDetailResult>} - Success response
206
- * @name applyRewardPoints
207
- * @summary: Use reward points
208
- * @description: Users can redeem their accumulated reward points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/applyRewardPoints/).
206
+ * @name applyLoyaltyPoints
207
+ * @summary: Use loyalty points
208
+ * @description: Users can redeem their accumulated loyalty points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/applyLoyaltyPoints/).
209
209
  */
210
- async applyRewardPoints(
210
+ async applyLoyaltyPoints(
211
211
  { body, xOrderingSource, id, i, b, buyNow, requestHeaders } = {
212
212
  requestHeaders: {},
213
213
  },
@@ -226,7 +226,7 @@ class Cart {
226
226
  this._conf,
227
227
  "post",
228
228
  constructUrl({
229
- url: this._urls["applyRewardPoints"],
229
+ url: this._urls["applyLoyaltyPoints"],
230
230
  params: {},
231
231
  }),
232
232
  query_params,
@@ -291,7 +291,7 @@ class Cart {
291
291
  * @returns {Promise<CartCheckoutResult>} - Success response
292
292
  * @name checkoutCartV2
293
293
  * @summary: Checkout cart
294
- * @description: The checkout cart initiates the order creation process based on the items in the user's cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/checkoutCartV2/).
294
+ * @description: The checkout cart initiates the order creation process based on the items in the user's cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/checkoutCartV2/).
295
295
  */
296
296
  async checkoutCartV2(
297
297
  { body, xOrderingSource, buyNow, cartType, requestHeaders } = {
@@ -1240,7 +1240,7 @@ class Cart {
1240
1240
  * @returns {Promise<UpdateCartDetailResult>} - Success response
1241
1241
  * @name updateCartBreakup
1242
1242
  * @summary: Update store credits into cart and their items
1243
- * @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/updateCartBreakup/).
1243
+ * @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/cart/updateCartBreakup/).
1244
1244
  */
1245
1245
  async updateCartBreakup(
1246
1246
  { body, xOrderingSource, id, i, b, buyNow, cartType, requestHeaders } = {
@@ -34,9 +34,9 @@ declare class Theme {
34
34
  * @returns {Promise<AvailablePageSchema>} - Success response
35
35
  * @name getPage
36
36
  * @summary: Get theme page
37
- * @description: Get page level configurations, applied sections and seo data of a page by `page_value` received from list pages api. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/theme/getPage/).
37
+ * @description: Get page level configurations, applied sections and seo data of a page by `page_value` received from list pages api. Supports dynamic URL parameter for custom sections. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/theme/getPage/).
38
38
  */
39
- getPage({ themeId, pageValue, filters, sectionPreviewHash, company, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<AvailablePageSchema>;
39
+ getPage({ themeId, pageValue, filters, sectionPreviewHash, company, urlParams, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<AvailablePageSchema>;
40
40
  /**
41
41
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
42
42
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -123,7 +123,7 @@ class Theme {
123
123
  * @returns {Promise<AvailablePageSchema>} - Success response
124
124
  * @name getPage
125
125
  * @summary: Get theme page
126
- * @description: Get page level configurations, applied sections and seo data of a page by `page_value` received from list pages api. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/theme/getPage/).
126
+ * @description: Get page level configurations, applied sections and seo data of a page by `page_value` received from list pages api. Supports dynamic URL parameter for custom sections. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/theme/getPage/).
127
127
  */
128
128
  async getPage(
129
129
  {
@@ -132,6 +132,7 @@ class Theme {
132
132
  filters,
133
133
  sectionPreviewHash,
134
134
  company,
135
+ urlParams,
135
136
  requestHeaders,
136
137
  } = { requestHeaders: {} },
137
138
  { responseHeaders } = { responseHeaders: false }
@@ -152,6 +153,7 @@ class Theme {
152
153
  query_params["filters"] = filters;
153
154
  query_params["section_preview_hash"] = sectionPreviewHash;
154
155
  query_params["company"] = company;
156
+ query_params["url_params"] = urlParams;
155
157
 
156
158
  const xHeaders = {};
157
159
 
@@ -43,6 +43,16 @@ declare class Cart {
43
43
  * @description: Apply a coupon code to the customer's cart to trigger discounts on eligible items - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/applyCoupon/).
44
44
  */
45
45
  applyCoupon({ body, xOrderingSource, i, b, p, id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.ApplyCouponParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
46
+ /**
47
+ * @param {CartPlatformApplicationValidator.ApplyLoyaltyPointsParam} arg - Arg object
48
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
49
+ * @param {import("../PlatformAPIClient").Options} - Options
50
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
51
+ * @name applyLoyaltyPoints
52
+ * @summary: Redeem loyalty points.
53
+ * @description: Users can redeem their accumulated loyalty points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/applyLoyaltyPoints/).
54
+ */
55
+ applyLoyaltyPoints({ body, xOrderingSource, id, i, b, buyNow, requestHeaders }?: CartPlatformApplicationValidator.ApplyLoyaltyPointsParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
46
56
  /**
47
57
  * @param {CartPlatformApplicationValidator.CheckCartServiceabilityParam} arg
48
58
  * - Arg object
@@ -448,7 +458,7 @@ declare class Cart {
448
458
  * @returns {Promise<CartPlatformModel.CartCheckoutDetails>} - Success response
449
459
  * @name platformCheckoutCartV2
450
460
  * @summary: Checkout cart
451
- * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
461
+ * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
452
462
  */
453
463
  platformCheckoutCartV2({ body, xOrderingSource, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutDetails>;
454
464
  /**
@@ -349,6 +349,101 @@ class Cart {
349
349
  return response;
350
350
  }
351
351
 
352
+ /**
353
+ * @param {CartPlatformApplicationValidator.ApplyLoyaltyPointsParam} arg - Arg object
354
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
355
+ * @param {import("../PlatformAPIClient").Options} - Options
356
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
357
+ * @name applyLoyaltyPoints
358
+ * @summary: Redeem loyalty points.
359
+ * @description: Users can redeem their accumulated loyalty points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/applyLoyaltyPoints/).
360
+ */
361
+ async applyLoyaltyPoints(
362
+ { body, xOrderingSource, id, i, b, buyNow, requestHeaders } = {
363
+ requestHeaders: {},
364
+ },
365
+ { responseHeaders } = { responseHeaders: false }
366
+ ) {
367
+ const {
368
+ error,
369
+ } = CartPlatformApplicationValidator.applyLoyaltyPoints().validate(
370
+ {
371
+ body,
372
+ xOrderingSource,
373
+ id,
374
+ i,
375
+ b,
376
+ buyNow,
377
+ },
378
+ { abortEarly: false, allowUnknown: true }
379
+ );
380
+ if (error) {
381
+ return Promise.reject(new FDKClientValidationError(error));
382
+ }
383
+
384
+ // Showing warrnings if extra unknown parameters are found
385
+ const {
386
+ error: warrning,
387
+ } = CartPlatformApplicationValidator.applyLoyaltyPoints().validate(
388
+ {
389
+ body,
390
+ xOrderingSource,
391
+ id,
392
+ i,
393
+ b,
394
+ buyNow,
395
+ },
396
+ { abortEarly: false, allowUnknown: false }
397
+ );
398
+ if (warrning) {
399
+ Logger({
400
+ level: "WARN",
401
+ message: `Parameter Validation warrnings for platform > Cart > applyLoyaltyPoints \n ${warrning}`,
402
+ });
403
+ }
404
+
405
+ const query_params = {};
406
+ query_params["id"] = id;
407
+ query_params["i"] = i;
408
+ query_params["b"] = b;
409
+ query_params["buy_now"] = buyNow;
410
+
411
+ const response = await PlatformAPIClient.execute(
412
+ this.config,
413
+ "post",
414
+ `/service/platform/cart/v2.0/company/${this.config.companyId}/application/${this.applicationId}/redeem`,
415
+ query_params,
416
+ body,
417
+ requestHeaders,
418
+ { responseHeaders }
419
+ );
420
+
421
+ let responseData = response;
422
+ if (responseHeaders) {
423
+ responseData = response[0];
424
+ }
425
+
426
+ const {
427
+ error: res_error,
428
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
429
+ abortEarly: false,
430
+ allowUnknown: true,
431
+ });
432
+
433
+ if (res_error) {
434
+ if (this.config.options.strictResponseCheck === true) {
435
+ return Promise.reject(new FDKResponseValidationError(res_error));
436
+ } else {
437
+ Logger({
438
+ level: "WARN",
439
+ message: `Response Validation Warnings for platform > Cart > applyLoyaltyPoints \n ${res_error}`,
440
+ });
441
+ }
442
+ }
443
+
444
+ return response;
445
+ }
446
+
352
447
  /**
353
448
  * @param {CartPlatformApplicationValidator.CheckCartServiceabilityParam} arg
354
449
  * - Arg object
@@ -3649,7 +3744,7 @@ class Cart {
3649
3744
  * @returns {Promise<CartPlatformModel.CartCheckoutDetails>} - Success response
3650
3745
  * @name platformCheckoutCartV2
3651
3746
  * @summary: Checkout cart
3652
- * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
3747
+ * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
3653
3748
  */
3654
3749
  async platformCheckoutCartV2(
3655
3750
  { body, xOrderingSource, id, requestHeaders } = { requestHeaders: {} },
@@ -24,6 +24,16 @@ export = CartPlatformApplicationValidator;
24
24
  * @property {boolean} [buyNow]
25
25
  * @property {CartPlatformModel.ApplyCouponDetails} body
26
26
  */
27
+ /**
28
+ * @typedef ApplyLoyaltyPointsParam
29
+ * @property {CartPlatformModel.OrderingSource} [xOrderingSource] - Ordering
30
+ * source header, to be used to identify source of order creation.
31
+ * @property {string} [id] - The unique identifier of the cart.
32
+ * @property {boolean} [i] - Select `true` to retrieve all the items added in the cart.
33
+ * @property {boolean} [b] - Select `true` to retrieve the price breakup of cart items.
34
+ * @property {boolean} [buyNow] - This is boolean to get buy_now cart.
35
+ * @property {CartPlatformModel.RedeemLoyaltyPoints} body
36
+ */
27
37
  /**
28
38
  * @typedef CheckCartServiceabilityParam
29
39
  * @property {CartPlatformModel.OrderingSource} [xOrderingSource] - Ordering
@@ -444,6 +454,8 @@ declare class CartPlatformApplicationValidator {
444
454
  static addPriceAdjustment(): AddPriceAdjustmentParam;
445
455
  /** @returns {ApplyCouponParam} */
446
456
  static applyCoupon(): ApplyCouponParam;
457
+ /** @returns {ApplyLoyaltyPointsParam} */
458
+ static applyLoyaltyPoints(): ApplyLoyaltyPointsParam;
447
459
  /** @returns {CheckCartServiceabilityParam} */
448
460
  static checkCartServiceability(): CheckCartServiceabilityParam;
449
461
  /** @returns {CheckoutCartParam} */
@@ -562,7 +574,7 @@ declare class CartPlatformApplicationValidator {
562
574
  static validateCouponForPayment(): ValidateCouponForPaymentParam;
563
575
  }
564
576
  declare namespace CartPlatformApplicationValidator {
565
- export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, DeleteCouponParam, DeletePromotionParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
577
+ export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, ApplyLoyaltyPointsParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, DeleteCouponParam, DeletePromotionParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
566
578
  }
567
579
  type AddAddressParam = {
568
580
  body: CartPlatformModel.PlatformAddress;
@@ -591,6 +603,30 @@ type ApplyCouponParam = {
591
603
  buyNow?: boolean;
592
604
  body: CartPlatformModel.ApplyCouponDetails;
593
605
  };
606
+ type ApplyLoyaltyPointsParam = {
607
+ /**
608
+ * - Ordering
609
+ * source header, to be used to identify source of order creation.
610
+ */
611
+ xOrderingSource?: CartPlatformModel.OrderingSource;
612
+ /**
613
+ * - The unique identifier of the cart.
614
+ */
615
+ id?: string;
616
+ /**
617
+ * - Select `true` to retrieve all the items added in the cart.
618
+ */
619
+ i?: boolean;
620
+ /**
621
+ * - Select `true` to retrieve the price breakup of cart items.
622
+ */
623
+ b?: boolean;
624
+ /**
625
+ * - This is boolean to get buy_now cart.
626
+ */
627
+ buyNow?: boolean;
628
+ body: CartPlatformModel.RedeemLoyaltyPoints;
629
+ };
594
630
  type CheckCartServiceabilityParam = {
595
631
  /**
596
632
  * - Ordering
@@ -31,6 +31,17 @@ const CartPlatformModel = require("./CartPlatformModel");
31
31
  * @property {CartPlatformModel.ApplyCouponDetails} body
32
32
  */
33
33
 
34
+ /**
35
+ * @typedef ApplyLoyaltyPointsParam
36
+ * @property {CartPlatformModel.OrderingSource} [xOrderingSource] - Ordering
37
+ * source header, to be used to identify source of order creation.
38
+ * @property {string} [id] - The unique identifier of the cart.
39
+ * @property {boolean} [i] - Select `true` to retrieve all the items added in the cart.
40
+ * @property {boolean} [b] - Select `true` to retrieve the price breakup of cart items.
41
+ * @property {boolean} [buyNow] - This is boolean to get buy_now cart.
42
+ * @property {CartPlatformModel.RedeemLoyaltyPoints} body
43
+ */
44
+
34
45
  /**
35
46
  * @typedef CheckCartServiceabilityParam
36
47
  * @property {CartPlatformModel.OrderingSource} [xOrderingSource] - Ordering
@@ -538,6 +549,19 @@ class CartPlatformApplicationValidator {
538
549
  }).required();
539
550
  }
540
551
 
552
+ /** @returns {ApplyLoyaltyPointsParam} */
553
+ static applyLoyaltyPoints() {
554
+ return Joi.object({
555
+ xOrderingSource: CartPlatformModel.OrderingSource(),
556
+
557
+ id: Joi.string().allow(""),
558
+ i: Joi.boolean(),
559
+ b: Joi.boolean(),
560
+ buyNow: Joi.boolean(),
561
+ body: CartPlatformModel.RedeemLoyaltyPoints().required(),
562
+ }).required();
563
+ }
564
+
541
565
  /** @returns {CheckCartServiceabilityParam} */
542
566
  static checkCartServiceability() {
543
567
  return Joi.object({
@@ -1,4 +1,9 @@
1
1
  export = CartPlatformModel;
2
+ /**
3
+ * @typedef RedeemLoyaltyPoints
4
+ * @property {boolean} redeem_points - Marks if engage points are to be redeemed
5
+ * for the given cart.
6
+ */
2
7
  /**
3
8
  * @typedef CouponDateMeta
4
9
  * @property {string} [modified_on] - Date time format when the coupon last modified
@@ -725,6 +730,7 @@ export = CartPlatformModel;
725
730
  * @property {Object} [meta] - Meta data related to article
726
731
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
727
732
  * allowed at article level
733
+ * @property {number} [article_index] - Index of the line item in the cart
728
734
  * @property {number} [min_price_threshold] - Minimum allowed net price for the
729
735
  * article. If the article's price after all discounts and adjustments falls
730
736
  * below this threshold, the price adjustment will be automatically removed.
@@ -885,12 +891,26 @@ export = CartPlatformModel;
885
891
  * @property {number} [applicable] - Whether the loyalty points are applicable
886
892
  * for the cart
887
893
  * @property {string} [description] - Description for loyalty points
894
+ * @property {number} [total_points] - Total engage points available.
895
+ * @property {number} [points] - Engage points applied on the cart.
896
+ * @property {number} [amount] - Engage points amount applied on the cart.
897
+ * @property {number} [mop_amount] - Engage discount amount applied on the cart
898
+ * as payment mode.
899
+ * @property {number} [earn_points] - Engage points that can be earned on the
900
+ * cart. for ex. (You’ll earn 56 points from this order!)
901
+ * @property {number} [earn_points_amount] - Engage points amount that can be
902
+ * earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
903
+ * @property {string} [earn_title] - Title to show how many earn points are
904
+ * gained for this order.
905
+ * @property {string} [title] - Unique title for loyalty program applicable.
888
906
  */
889
907
  /**
890
908
  * @typedef RawBreakup
891
909
  * @property {number} [coupon] - Coupon amount applied to cart
892
910
  * @property {number} [gst_charges] - GST charges applied on cart
893
911
  * @property {number} [mrp_total] - Maximum price total amount of all products in cart
912
+ * @property {number} [engage_amount] - Engage points amount applied on the cart.
913
+ * @property {number} [engage_mop_amount] - Engage mop amount applied on the cart.
894
914
  * @property {number} [fynd_cash] - Loyalty points applied on cart
895
915
  * @property {number} [vog] - Total value of goods after all discount, coupons
896
916
  * and promotion applied of all products in cart
@@ -1636,7 +1656,7 @@ export = CartPlatformModel;
1636
1656
  * @property {string} promo_id - Promotion id applied on product
1637
1657
  * @property {string} promo_amount - Promotion amount applied on product
1638
1658
  * @property {string} [promo_desc] - Promotion description applied on product
1639
- * @property {string} [rwrd_tndr]
1659
+ * @property {string} [rwrd_tndr] _Deprecated_*
1640
1660
  * @property {Object[]} [item_list] - List of items
1641
1661
  * @property {string} [parent_promo_id] - Parent promotion unique identifier
1642
1662
  */
@@ -1659,9 +1679,7 @@ export = CartPlatformModel;
1659
1679
  * @property {string} cart_id - The cart id of user cart
1660
1680
  * @property {string} payment_mode - Payment mode from which the payment to be
1661
1681
  * done for the order
1662
- * @property {Object} [billing_address] - Billing address json which includes
1663
- * customer address, customer phone, customer email, customer pincode,
1664
- * customer landmark and customer name
1682
+ * @property {ShippingAddress} [billing_address]
1665
1683
  * @property {string} merchant_code - Merchant code of the payment mode selected
1666
1684
  * to do the payment
1667
1685
  * @property {string} payment_identifier - Payment identifier of the payment
@@ -1676,15 +1694,29 @@ export = CartPlatformModel;
1676
1694
  * their size, id, discount and promo details
1677
1695
  * @property {number} [ordering_store] - Ordering store id of the store from
1678
1696
  * which the order is getting placed
1679
- * @property {Object} [shipping_address] - Shipping address json which includes
1680
- * name, area, address, phone, area_code, state, country, country code and email
1697
+ * @property {string} [device_id] - A unique identifier for the EDC (Electronic
1698
+ * Data Capture) machine. This value may be null if the identifier is not available.
1699
+ * @property {ShippingAddress} [shipping_address]
1700
+ */
1701
+ /**
1702
+ * @typedef OverrideCheckoutData
1703
+ * @property {number} [amount] - Amount for the order in smallest currency unit
1704
+ * (e.g., paise for INR)
1705
+ * @property {string} [order_id] - Order id generated at the payment gateway
1706
+ * @property {string} [email] - Customer email used for the payment
1707
+ * @property {string} [contact] - Customer contact number used for the payment
1708
+ * @property {string} [currency] - Currency code for the transaction
1709
+ * @property {string} [customer_id] - Customer id generated/linked at the payment gateway
1710
+ * @property {string} [callback_url] - Callback URL where the payment status
1711
+ * will be posted
1712
+ * @property {string} [bank] - Bank code used for the payment (if method is netbanking)
1713
+ * @property {string} [method] - Payment method used for the transaction
1714
+ * @property {string} [vpa] - Virtual Payment Address used for UPI transactions
1681
1715
  */
1682
1716
  /**
1683
1717
  * @typedef OverrideCheckoutResult
1684
- * @property {Object} data - Data of the user cart checkout includes cart data,
1685
- * address, user id, order type etc
1686
- * @property {Object} cart - Cart details in API response which included cart
1687
- * id, items in cart, promise, order type, breakup values etc.
1718
+ * @property {OverrideCheckoutData} data
1719
+ * @property {CheckCart} cart
1688
1720
  * @property {string} success - Success flag of cart override checkout API response
1689
1721
  * @property {string} order_id - Order id generated after placing order
1690
1722
  * @property {string} message - Message of the cart override checkout API response
@@ -2464,8 +2496,17 @@ export = CartPlatformModel;
2464
2496
  declare class CartPlatformModel {
2465
2497
  }
2466
2498
  declare namespace CartPlatformModel {
2467
- export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResult, SuccessMessage, OperationErrorResult, CouponUpdate, CouponPartialUpdate, CouponCreateResult, DisplayMeta1, Ownership1, CompareObject, ItemSizeMapping, ItemCriteria, BuyRuleItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResult, PromotionAdd, PromotionAddResult, PromotionUpdate, PromotionUpdateResult, PromotionPartialUpdate, ActivePromosResult, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResult, GetPriceAdjustmentResult, PriceAdjustmentAdd, DistributionRule, Distribution, DistributionLogic, CartItem, OpenapiCartDetailsCreation, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductActionParams, ProductActionPage, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, FulfillmentOptionSchema, StoreTimingSchema, StoreHoursSchema, PickupStoreDetailSchema, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, ProductMaxQuantityInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResult, OpenApiErrorResult, ShippingAddress, OpenApiCartServiceabilityCreation, OpenApiCartServiceabilityResult, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResult, AbandonedCart, AbandonedCartResult, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, PlatformAlternatePickupPerson, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, CartItemInfo, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, DiscountRules, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, OrderTag, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError, OrderingSource };
2499
+ export { RedeemLoyaltyPoints, CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResult, SuccessMessage, OperationErrorResult, CouponUpdate, CouponPartialUpdate, CouponCreateResult, DisplayMeta1, Ownership1, CompareObject, ItemSizeMapping, ItemCriteria, BuyRuleItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResult, PromotionAdd, PromotionAddResult, PromotionUpdate, PromotionUpdateResult, PromotionPartialUpdate, ActivePromosResult, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResult, GetPriceAdjustmentResult, PriceAdjustmentAdd, DistributionRule, Distribution, DistributionLogic, CartItem, OpenapiCartDetailsCreation, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductActionParams, ProductActionPage, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, FulfillmentOptionSchema, StoreTimingSchema, StoreHoursSchema, PickupStoreDetailSchema, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, ProductMaxQuantityInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResult, OpenApiErrorResult, ShippingAddress, OpenApiCartServiceabilityCreation, OpenApiCartServiceabilityResult, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResult, AbandonedCart, AbandonedCartResult, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, PlatformAlternatePickupPerson, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, CartItemInfo, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutData, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, DiscountRules, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, OrderTag, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError, OrderingSource };
2468
2500
  }
2501
+ /** @returns {RedeemLoyaltyPoints} */
2502
+ declare function RedeemLoyaltyPoints(): RedeemLoyaltyPoints;
2503
+ type RedeemLoyaltyPoints = {
2504
+ /**
2505
+ * - Marks if engage points are to be redeemed
2506
+ * for the given cart.
2507
+ */
2508
+ redeem_points: boolean;
2509
+ };
2469
2510
  /** @returns {CouponDateMeta} */
2470
2511
  declare function CouponDateMeta(): CouponDateMeta;
2471
2512
  type CouponDateMeta = {
@@ -4238,6 +4279,10 @@ type Article = {
4238
4279
  * allowed at article level
4239
4280
  */
4240
4281
  allowed_refund?: boolean;
4282
+ /**
4283
+ * - Index of the line item in the cart
4284
+ */
4285
+ article_index?: number;
4241
4286
  /**
4242
4287
  * - Minimum allowed net price for the
4243
4288
  * article. If the article's price after all discounts and adjustments falls
@@ -4635,6 +4680,42 @@ type LoyaltyPoints = {
4635
4680
  * - Description for loyalty points
4636
4681
  */
4637
4682
  description?: string;
4683
+ /**
4684
+ * - Total engage points available.
4685
+ */
4686
+ total_points?: number;
4687
+ /**
4688
+ * - Engage points applied on the cart.
4689
+ */
4690
+ points?: number;
4691
+ /**
4692
+ * - Engage points amount applied on the cart.
4693
+ */
4694
+ amount?: number;
4695
+ /**
4696
+ * - Engage discount amount applied on the cart
4697
+ * as payment mode.
4698
+ */
4699
+ mop_amount?: number;
4700
+ /**
4701
+ * - Engage points that can be earned on the
4702
+ * cart. for ex. (You’ll earn 56 points from this order!)
4703
+ */
4704
+ earn_points?: number;
4705
+ /**
4706
+ * - Engage points amount that can be
4707
+ * earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
4708
+ */
4709
+ earn_points_amount?: number;
4710
+ /**
4711
+ * - Title to show how many earn points are
4712
+ * gained for this order.
4713
+ */
4714
+ earn_title?: string;
4715
+ /**
4716
+ * - Unique title for loyalty program applicable.
4717
+ */
4718
+ title?: string;
4638
4719
  };
4639
4720
  /** @returns {RawBreakup} */
4640
4721
  declare function RawBreakup(): RawBreakup;
@@ -4651,6 +4732,14 @@ type RawBreakup = {
4651
4732
  * - Maximum price total amount of all products in cart
4652
4733
  */
4653
4734
  mrp_total?: number;
4735
+ /**
4736
+ * - Engage points amount applied on the cart.
4737
+ */
4738
+ engage_amount?: number;
4739
+ /**
4740
+ * - Engage mop amount applied on the cart.
4741
+ */
4742
+ engage_mop_amount?: number;
4654
4743
  /**
4655
4744
  * - Loyalty points applied on cart
4656
4745
  */
@@ -6555,6 +6644,9 @@ type OverrideCartItemPromo = {
6555
6644
  * - Promotion description applied on product
6556
6645
  */
6557
6646
  promo_desc?: string;
6647
+ /**
6648
+ * _Deprecated_*
6649
+ */
6558
6650
  rwrd_tndr?: string;
6559
6651
  /**
6560
6652
  * - List of items
@@ -6622,12 +6714,7 @@ type OverrideCheckoutReq = {
6622
6714
  * done for the order
6623
6715
  */
6624
6716
  payment_mode: string;
6625
- /**
6626
- * - Billing address json which includes
6627
- * customer address, customer phone, customer email, customer pincode,
6628
- * customer landmark and customer name
6629
- */
6630
- billing_address?: any;
6717
+ billing_address?: ShippingAddress;
6631
6718
  /**
6632
6719
  * - Merchant code of the payment mode selected
6633
6720
  * to do the payment
@@ -6667,24 +6754,63 @@ type OverrideCheckoutReq = {
6667
6754
  */
6668
6755
  ordering_store?: number;
6669
6756
  /**
6670
- * - Shipping address json which includes
6671
- * name, area, address, phone, area_code, state, country, country code and email
6757
+ * - A unique identifier for the EDC (Electronic
6758
+ * Data Capture) machine. This value may be null if the identifier is not available.
6672
6759
  */
6673
- shipping_address?: any;
6760
+ device_id?: string;
6761
+ shipping_address?: ShippingAddress;
6674
6762
  };
6675
- /** @returns {OverrideCheckoutResult} */
6676
- declare function OverrideCheckoutResult(): OverrideCheckoutResult;
6677
- type OverrideCheckoutResult = {
6763
+ /** @returns {OverrideCheckoutData} */
6764
+ declare function OverrideCheckoutData(): OverrideCheckoutData;
6765
+ type OverrideCheckoutData = {
6678
6766
  /**
6679
- * - Data of the user cart checkout includes cart data,
6680
- * address, user id, order type etc
6767
+ * - Amount for the order in smallest currency unit
6768
+ * (e.g., paise for INR)
6681
6769
  */
6682
- data: any;
6770
+ amount?: number;
6771
+ /**
6772
+ * - Order id generated at the payment gateway
6773
+ */
6774
+ order_id?: string;
6683
6775
  /**
6684
- * - Cart details in API response which included cart
6685
- * id, items in cart, promise, order type, breakup values etc.
6776
+ * - Customer email used for the payment
6686
6777
  */
6687
- cart: any;
6778
+ email?: string;
6779
+ /**
6780
+ * - Customer contact number used for the payment
6781
+ */
6782
+ contact?: string;
6783
+ /**
6784
+ * - Currency code for the transaction
6785
+ */
6786
+ currency?: string;
6787
+ /**
6788
+ * - Customer id generated/linked at the payment gateway
6789
+ */
6790
+ customer_id?: string;
6791
+ /**
6792
+ * - Callback URL where the payment status
6793
+ * will be posted
6794
+ */
6795
+ callback_url?: string;
6796
+ /**
6797
+ * - Bank code used for the payment (if method is netbanking)
6798
+ */
6799
+ bank?: string;
6800
+ /**
6801
+ * - Payment method used for the transaction
6802
+ */
6803
+ method?: string;
6804
+ /**
6805
+ * - Virtual Payment Address used for UPI transactions
6806
+ */
6807
+ vpa?: string;
6808
+ };
6809
+ /** @returns {OverrideCheckoutResult} */
6810
+ declare function OverrideCheckoutResult(): OverrideCheckoutResult;
6811
+ type OverrideCheckoutResult = {
6812
+ data: OverrideCheckoutData;
6813
+ cart: CheckCart;
6688
6814
  /**
6689
6815
  * - Success flag of cart override checkout API response
6690
6816
  */
@@ -1,5 +1,11 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef RedeemLoyaltyPoints
5
+ * @property {boolean} redeem_points - Marks if engage points are to be redeemed
6
+ * for the given cart.
7
+ */
8
+
3
9
  /**
4
10
  * @typedef CouponDateMeta
5
11
  * @property {string} [modified_on] - Date time format when the coupon last modified
@@ -787,6 +793,7 @@ const Joi = require("joi");
787
793
  * @property {Object} [meta] - Meta data related to article
788
794
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
789
795
  * allowed at article level
796
+ * @property {number} [article_index] - Index of the line item in the cart
790
797
  * @property {number} [min_price_threshold] - Minimum allowed net price for the
791
798
  * article. If the article's price after all discounts and adjustments falls
792
799
  * below this threshold, the price adjustment will be automatically removed.
@@ -962,6 +969,18 @@ const Joi = require("joi");
962
969
  * @property {number} [applicable] - Whether the loyalty points are applicable
963
970
  * for the cart
964
971
  * @property {string} [description] - Description for loyalty points
972
+ * @property {number} [total_points] - Total engage points available.
973
+ * @property {number} [points] - Engage points applied on the cart.
974
+ * @property {number} [amount] - Engage points amount applied on the cart.
975
+ * @property {number} [mop_amount] - Engage discount amount applied on the cart
976
+ * as payment mode.
977
+ * @property {number} [earn_points] - Engage points that can be earned on the
978
+ * cart. for ex. (You’ll earn 56 points from this order!)
979
+ * @property {number} [earn_points_amount] - Engage points amount that can be
980
+ * earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
981
+ * @property {string} [earn_title] - Title to show how many earn points are
982
+ * gained for this order.
983
+ * @property {string} [title] - Unique title for loyalty program applicable.
965
984
  */
966
985
 
967
986
  /**
@@ -969,6 +988,8 @@ const Joi = require("joi");
969
988
  * @property {number} [coupon] - Coupon amount applied to cart
970
989
  * @property {number} [gst_charges] - GST charges applied on cart
971
990
  * @property {number} [mrp_total] - Maximum price total amount of all products in cart
991
+ * @property {number} [engage_amount] - Engage points amount applied on the cart.
992
+ * @property {number} [engage_mop_amount] - Engage mop amount applied on the cart.
972
993
  * @property {number} [fynd_cash] - Loyalty points applied on cart
973
994
  * @property {number} [vog] - Total value of goods after all discount, coupons
974
995
  * and promotion applied of all products in cart
@@ -1781,7 +1802,7 @@ const Joi = require("joi");
1781
1802
  * @property {string} promo_id - Promotion id applied on product
1782
1803
  * @property {string} promo_amount - Promotion amount applied on product
1783
1804
  * @property {string} [promo_desc] - Promotion description applied on product
1784
- * @property {string} [rwrd_tndr]
1805
+ * @property {string} [rwrd_tndr] _Deprecated_*
1785
1806
  * @property {Object[]} [item_list] - List of items
1786
1807
  * @property {string} [parent_promo_id] - Parent promotion unique identifier
1787
1808
  */
@@ -1806,9 +1827,7 @@ const Joi = require("joi");
1806
1827
  * @property {string} cart_id - The cart id of user cart
1807
1828
  * @property {string} payment_mode - Payment mode from which the payment to be
1808
1829
  * done for the order
1809
- * @property {Object} [billing_address] - Billing address json which includes
1810
- * customer address, customer phone, customer email, customer pincode,
1811
- * customer landmark and customer name
1830
+ * @property {ShippingAddress} [billing_address]
1812
1831
  * @property {string} merchant_code - Merchant code of the payment mode selected
1813
1832
  * to do the payment
1814
1833
  * @property {string} payment_identifier - Payment identifier of the payment
@@ -1823,16 +1842,31 @@ const Joi = require("joi");
1823
1842
  * their size, id, discount and promo details
1824
1843
  * @property {number} [ordering_store] - Ordering store id of the store from
1825
1844
  * which the order is getting placed
1826
- * @property {Object} [shipping_address] - Shipping address json which includes
1827
- * name, area, address, phone, area_code, state, country, country code and email
1845
+ * @property {string} [device_id] - A unique identifier for the EDC (Electronic
1846
+ * Data Capture) machine. This value may be null if the identifier is not available.
1847
+ * @property {ShippingAddress} [shipping_address]
1848
+ */
1849
+
1850
+ /**
1851
+ * @typedef OverrideCheckoutData
1852
+ * @property {number} [amount] - Amount for the order in smallest currency unit
1853
+ * (e.g., paise for INR)
1854
+ * @property {string} [order_id] - Order id generated at the payment gateway
1855
+ * @property {string} [email] - Customer email used for the payment
1856
+ * @property {string} [contact] - Customer contact number used for the payment
1857
+ * @property {string} [currency] - Currency code for the transaction
1858
+ * @property {string} [customer_id] - Customer id generated/linked at the payment gateway
1859
+ * @property {string} [callback_url] - Callback URL where the payment status
1860
+ * will be posted
1861
+ * @property {string} [bank] - Bank code used for the payment (if method is netbanking)
1862
+ * @property {string} [method] - Payment method used for the transaction
1863
+ * @property {string} [vpa] - Virtual Payment Address used for UPI transactions
1828
1864
  */
1829
1865
 
1830
1866
  /**
1831
1867
  * @typedef OverrideCheckoutResult
1832
- * @property {Object} data - Data of the user cart checkout includes cart data,
1833
- * address, user id, order type etc
1834
- * @property {Object} cart - Cart details in API response which included cart
1835
- * id, items in cart, promise, order type, breakup values etc.
1868
+ * @property {OverrideCheckoutData} data
1869
+ * @property {CheckCart} cart
1836
1870
  * @property {string} success - Success flag of cart override checkout API response
1837
1871
  * @property {string} order_id - Order id generated after placing order
1838
1872
  * @property {string} message - Message of the cart override checkout API response
@@ -2676,6 +2710,13 @@ const Joi = require("joi");
2676
2710
  */
2677
2711
 
2678
2712
  class CartPlatformModel {
2713
+ /** @returns {RedeemLoyaltyPoints} */
2714
+ static RedeemLoyaltyPoints() {
2715
+ return Joi.object({
2716
+ redeem_points: Joi.boolean().required(),
2717
+ });
2718
+ }
2719
+
2679
2720
  /** @returns {CouponDateMeta} */
2680
2721
  static CouponDateMeta() {
2681
2722
  return Joi.object({
@@ -3485,6 +3526,7 @@ class CartPlatformModel {
3485
3526
  quantity: Joi.number(),
3486
3527
  meta: Joi.object().pattern(/\S/, Joi.any()),
3487
3528
  allowed_refund: Joi.boolean(),
3529
+ article_index: Joi.number(),
3488
3530
  min_price_threshold: Joi.number(),
3489
3531
  });
3490
3532
  }
@@ -3659,6 +3701,14 @@ class CartPlatformModel {
3659
3701
  total: Joi.number(),
3660
3702
  applicable: Joi.number(),
3661
3703
  description: Joi.string().allow(""),
3704
+ total_points: Joi.number(),
3705
+ points: Joi.number(),
3706
+ amount: Joi.number(),
3707
+ mop_amount: Joi.number(),
3708
+ earn_points: Joi.number(),
3709
+ earn_points_amount: Joi.number(),
3710
+ earn_title: Joi.string().allow(""),
3711
+ title: Joi.string().allow(""),
3662
3712
  });
3663
3713
  }
3664
3714
 
@@ -3668,6 +3718,8 @@ class CartPlatformModel {
3668
3718
  coupon: Joi.number(),
3669
3719
  gst_charges: Joi.number(),
3670
3720
  mrp_total: Joi.number(),
3721
+ engage_amount: Joi.number(),
3722
+ engage_mop_amount: Joi.number(),
3671
3723
  fynd_cash: Joi.number(),
3672
3724
  vog: Joi.number(),
3673
3725
  gift_card: Joi.number(),
@@ -4536,7 +4588,7 @@ class CartPlatformModel {
4536
4588
  return Joi.object({
4537
4589
  cart_id: Joi.string().allow("").required(),
4538
4590
  payment_mode: Joi.string().allow("").required(),
4539
- billing_address: Joi.object().pattern(/\S/, Joi.any()),
4591
+ billing_address: CartPlatformModel.ShippingAddress(),
4540
4592
  merchant_code: Joi.string().allow("").required(),
4541
4593
  payment_identifier: Joi.string().allow("").required(),
4542
4594
  currency_code: Joi.string().allow("").required(),
@@ -4547,15 +4599,32 @@ class CartPlatformModel {
4547
4599
  .items(CartPlatformModel.OverrideCartItem())
4548
4600
  .required(),
4549
4601
  ordering_store: Joi.number().allow(null),
4550
- shipping_address: Joi.object().pattern(/\S/, Joi.any()),
4602
+ device_id: Joi.string().allow("").allow(null),
4603
+ shipping_address: CartPlatformModel.ShippingAddress(),
4604
+ });
4605
+ }
4606
+
4607
+ /** @returns {OverrideCheckoutData} */
4608
+ static OverrideCheckoutData() {
4609
+ return Joi.object({
4610
+ amount: Joi.number(),
4611
+ order_id: Joi.string().allow(""),
4612
+ email: Joi.string().allow(""),
4613
+ contact: Joi.string().allow(""),
4614
+ currency: Joi.string().allow(""),
4615
+ customer_id: Joi.string().allow(""),
4616
+ callback_url: Joi.string().allow(""),
4617
+ bank: Joi.string().allow(""),
4618
+ method: Joi.string().allow(""),
4619
+ vpa: Joi.string().allow(""),
4551
4620
  });
4552
4621
  }
4553
4622
 
4554
4623
  /** @returns {OverrideCheckoutResult} */
4555
4624
  static OverrideCheckoutResult() {
4556
4625
  return Joi.object({
4557
- data: Joi.object().pattern(/\S/, Joi.any()).required(),
4558
- cart: Joi.object().pattern(/\S/, Joi.any()).required(),
4626
+ data: CartPlatformModel.OverrideCheckoutData().required(),
4627
+ cart: CartPlatformModel.CheckCart().required(),
4559
4628
  success: Joi.string().allow("").required(),
4560
4629
  order_id: Joi.string().allow("").required(),
4561
4630
  message: Joi.string().allow("").required(),
@@ -796,7 +796,7 @@ declare class Order {
796
796
  *
797
797
  * @name updateShipmentStatus
798
798
  * @summary: Update a shipment's status
799
- * @description: Used for updating a shipment and its status. Can also be used for updating bags present in that shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentStatus/).
799
+ * @description: It is used for updating the shipment in the following scenarios:\n• Full Confirmation\n• Partial Confirmation\n• Change the status of a shipment\n• Full Cancellation\n• Partial Cancellation\n• Assign the shipment to DP. Click <a href=\"https://docs.fynd.com/partners/commerce/miscellaneous/updateShipmentStatus\">here</a> to get the example payload. Also, refer to the <a href=\"https://docs.fynd.com/partners/commerce/getting-started/oms-states/\">OMS Sates</a> for the complete status list. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentStatus/).
800
800
  */
801
801
  updateShipmentStatus({ body, requestHeaders }?: OrderPlatformValidator.UpdateShipmentStatusParam, { responseHeaders }?: object): Promise<OrderPlatformModel.UpdateShipmentStatusResponseBody>;
802
802
  /**
@@ -5251,7 +5251,7 @@ class Order {
5251
5251
  *
5252
5252
  * @name updateShipmentStatus
5253
5253
  * @summary: Update a shipment's status
5254
- * @description: Used for updating a shipment and its status. Can also be used for updating bags present in that shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentStatus/).
5254
+ * @description: It is used for updating the shipment in the following scenarios:\n• Full Confirmation\n• Partial Confirmation\n• Change the status of a shipment\n• Full Cancellation\n• Partial Cancellation\n• Assign the shipment to DP. Click <a href=\"https://docs.fynd.com/partners/commerce/miscellaneous/updateShipmentStatus\">here</a> to get the example payload. Also, refer to the <a href=\"https://docs.fynd.com/partners/commerce/getting-started/oms-states/\">OMS Sates</a> for the complete status list. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentStatus/).
5255
5255
  */
5256
5256
  async updateShipmentStatus(
5257
5257
  { body, requestHeaders } = { requestHeaders: {} },
@@ -1243,7 +1243,9 @@ export = OrderPlatformModel;
1243
1243
  * @typedef PaymentMethod
1244
1244
  * @property {string} collect_by - A string indicating the entity responsible
1245
1245
  * for collecting the payment.
1246
- * @property {string} mode - A string that specifies the mode of payment.
1246
+ * @property {string} mode - A string that specifies the mode of payment. Refer
1247
+ * to [API & references (in Nav bar) → Payment Modes] for a list of valid
1248
+ * payment methods.
1247
1249
  * @property {string} refund_by - A string that indicates the entity responsible
1248
1250
  * for processing refunds.
1249
1251
  * @property {string} name - A string representing the name of the payment method.
@@ -7558,7 +7560,9 @@ type PaymentMethod = {
7558
7560
  */
7559
7561
  collect_by: string;
7560
7562
  /**
7561
- * - A string that specifies the mode of payment.
7563
+ * - A string that specifies the mode of payment. Refer
7564
+ * to [API & references (in Nav bar) → Payment Modes] for a list of valid
7565
+ * payment methods.
7562
7566
  */
7563
7567
  mode: string;
7564
7568
  /**
@@ -1353,7 +1353,9 @@ const Joi = require("joi");
1353
1353
  * @typedef PaymentMethod
1354
1354
  * @property {string} collect_by - A string indicating the entity responsible
1355
1355
  * for collecting the payment.
1356
- * @property {string} mode - A string that specifies the mode of payment.
1356
+ * @property {string} mode - A string that specifies the mode of payment. Refer
1357
+ * to [API & references (in Nav bar) → Payment Modes] for a list of valid
1358
+ * payment methods.
1357
1359
  * @property {string} refund_by - A string that indicates the entity responsible
1358
1360
  * for processing refunds.
1359
1361
  * @property {string} name - A string representing the name of the payment method.
@@ -29,7 +29,7 @@ declare class Content {
29
29
  * @summary: Get All Languages
30
30
  * @description: Fetches complete list of languages supported by the platform with their locale codes and text directions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getAllLanguages/).
31
31
  */
32
- getAllLanguages({ requestHeaders }?: any, { responseHeaders }?: object): Promise<any>;
32
+ getAllLanguages({ isEnabled, requestHeaders }?: ContentPublicValidator.GetAllLanguagesParam, { responseHeaders }?: object): Promise<any>;
33
33
  /**
34
34
  * @param {ContentPublicValidator.GetAllTagsParam} arg - Arg object.
35
35
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -161,5 +161,5 @@ declare class Content {
161
161
  */
162
162
  getPricingBanner({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ContentPublicModel.PricingBannerSchema>;
163
163
  }
164
- import ContentPublicModel = require("./ContentPublicModel");
165
164
  import ContentPublicValidator = require("./ContentPublicValidator");
165
+ import ContentPublicModel = require("./ContentPublicModel");
@@ -60,11 +60,11 @@ class Content {
60
60
  * @description: Fetches complete list of languages supported by the platform with their locale codes and text directions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getAllLanguages/).
61
61
  */
62
62
  async getAllLanguages(
63
- { requestHeaders } = { requestHeaders: {} },
63
+ { isEnabled, requestHeaders } = { requestHeaders: {} },
64
64
  { responseHeaders } = { responseHeaders: false }
65
65
  ) {
66
66
  const { error } = ContentPublicValidator.getAllLanguages().validate(
67
- {},
67
+ { isEnabled },
68
68
  { abortEarly: false, allowUnknown: true }
69
69
  );
70
70
  if (error) {
@@ -75,7 +75,7 @@ class Content {
75
75
  const {
76
76
  error: warrning,
77
77
  } = ContentPublicValidator.getAllLanguages().validate(
78
- {},
78
+ { isEnabled },
79
79
  { abortEarly: false, allowUnknown: false }
80
80
  );
81
81
  if (warrning) {
@@ -86,6 +86,7 @@ class Content {
86
86
  }
87
87
 
88
88
  const query_params = {};
89
+ query_params["is_enabled"] = isEnabled;
89
90
 
90
91
  const xHeaders = {};
91
92
 
@@ -290,6 +290,7 @@ export = ContentPublicModel;
290
290
  * reference and display at the merchant panel.
291
291
  * @property {string} [display_name] - Translated name of the language in
292
292
  * English for easy reference and display at the website.
293
+ * @property {boolean} [is_enabled] - Indicates whether the language is enabled for use.
293
294
  */
294
295
  /**
295
296
  * @typedef Error
@@ -672,6 +673,10 @@ type Language = {
672
673
  * English for easy reference and display at the website.
673
674
  */
674
675
  display_name?: string;
676
+ /**
677
+ * - Indicates whether the language is enabled for use.
678
+ */
679
+ is_enabled?: boolean;
675
680
  };
676
681
  /** @returns {Error} */
677
682
  declare function Error(): Error;
@@ -326,6 +326,7 @@ const Joi = require("joi");
326
326
  * reference and display at the merchant panel.
327
327
  * @property {string} [display_name] - Translated name of the language in
328
328
  * English for easy reference and display at the website.
329
+ * @property {boolean} [is_enabled] - Indicates whether the language is enabled for use.
329
330
  */
330
331
 
331
332
  /**
@@ -763,6 +764,7 @@ class ContentPublicModel {
763
764
  direction: Joi.string().allow("").required(),
764
765
  name: Joi.string().allow("").required(),
765
766
  display_name: Joi.string().allow(""),
767
+ is_enabled: Joi.boolean(),
766
768
  });
767
769
  }
768
770
 
@@ -1,5 +1,8 @@
1
1
  export = ContentPublicValidator;
2
- /** @typedef GetAllLanguagesParam */
2
+ /**
3
+ * @typedef GetAllLanguagesParam
4
+ * @property {boolean} [isEnabled] - Filter languages by enabled status.
5
+ */
3
6
  /** @typedef GetAllTagsParam */
4
7
  /** @typedef GetAllTranslatableResourcesParam */
5
8
  /** @typedef GetAnalyticsTagsParam */
@@ -31,7 +34,7 @@ export = ContentPublicValidator;
31
34
  /** @typedef GetPricingBannerParam */
32
35
  declare class ContentPublicValidator {
33
36
  /** @returns {GetAllLanguagesParam} */
34
- static getAllLanguages(): any;
37
+ static getAllLanguages(): GetAllLanguagesParam;
35
38
  /** @returns {GetAllTagsParam} */
36
39
  static getAllTags(): any;
37
40
  /** @returns {GetAllTranslatableResourcesParam} */
@@ -62,6 +65,12 @@ declare class ContentPublicValidator {
62
65
  declare namespace ContentPublicValidator {
63
66
  export { GetAllLanguagesParam, GetAllTagsParam, GetAllTranslatableResourcesParam, GetAnalyticsTagsParam, GetBasicDetailsParam, GetCredentialsByEntityParam, GetCustomPageParam, GetFooterContentParam, GetHomePageContentParam, GetLanguageByLocaleParam, GetMenuContentParam, GetMenuContentByTypeParam, GetNavbarParam, GetPricingBannerParam };
64
67
  }
68
+ type GetAllLanguagesParam = {
69
+ /**
70
+ * - Filter languages by enabled status.
71
+ */
72
+ isEnabled?: boolean;
73
+ };
65
74
  type GetCredentialsByEntityParam = {
66
75
  /**
67
76
  * - Server Type
@@ -90,7 +99,6 @@ type GetMenuContentByTypeParam = {
90
99
  */
91
100
  type: string;
92
101
  };
93
- type GetAllLanguagesParam = any;
94
102
  type GetAllTagsParam = any;
95
103
  type GetAllTranslatableResourcesParam = any;
96
104
  type GetAnalyticsTagsParam = any;
@@ -2,7 +2,10 @@ const Joi = require("joi");
2
2
 
3
3
  const ContentPublicModel = require("./ContentPublicModel");
4
4
 
5
- /** @typedef GetAllLanguagesParam */
5
+ /**
6
+ * @typedef GetAllLanguagesParam
7
+ * @property {boolean} [isEnabled] - Filter languages by enabled status.
8
+ */
6
9
 
7
10
  /** @typedef GetAllTagsParam */
8
11
 
@@ -49,7 +52,9 @@ const ContentPublicModel = require("./ContentPublicModel");
49
52
  class ContentPublicValidator {
50
53
  /** @returns {GetAllLanguagesParam} */
51
54
  static getAllLanguages() {
52
- return Joi.object({});
55
+ return Joi.object({
56
+ isEnabled: Joi.boolean(),
57
+ });
53
58
  }
54
59
 
55
60
  /** @returns {GetAllTagsParam} */