@gofynd/fdk-client-javascript 3.18.0 → 3.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +2 -2
  4. package/sdk/application/Cart/CartApplicationClient.js +12 -4
  5. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
  6. package/sdk/application/Order/OrderApplicationClient.js +49 -0
  7. package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
  8. package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
  9. package/sdk/common/utils.d.ts +1 -1
  10. package/sdk/common/utils.js +1 -0
  11. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +1 -1
  12. package/sdk/partner/Logistics/LogisticsPartnerClient.js +11 -3
  13. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +1 -0
  14. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +46 -0
  15. package/sdk/partner/Webhook/WebhookPartnerClient.js +334 -0
  16. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +222 -1
  17. package/sdk/partner/Webhook/WebhookPartnerModel.js +165 -0
  18. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +4 -0
  19. package/sdk/partner/Webhook/WebhookPartnerValidator.js +30 -0
  20. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +5 -5
  21. package/sdk/platform/Cart/CartPlatformApplicationClient.js +50 -7
  22. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +69 -10
  23. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +30 -5
  24. package/sdk/platform/Cart/CartPlatformModel.d.ts +97 -72
  25. package/sdk/platform/Cart/CartPlatformModel.js +54 -35
  26. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
  27. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
  28. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +17 -11
  29. package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -12
  30. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +353 -156
  31. package/sdk/platform/Catalog/CatalogPlatformModel.js +176 -87
  32. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -38
  33. package/sdk/platform/Catalog/CatalogPlatformValidator.js +22 -21
  34. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -1
  35. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1 -1
  36. package/sdk/platform/Content/ContentPlatformModel.d.ts +7 -7
  37. package/sdk/platform/Content/ContentPlatformModel.js +5 -5
  38. package/sdk/platform/Order/OrderPlatformModel.d.ts +6 -6
  39. package/sdk/platform/Order/OrderPlatformModel.js +5 -5
  40. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
  41. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +12 -3
  42. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +5 -0
  43. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -0
  44. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +4 -2
  45. package/sdk/platform/User/UserPlatformApplicationClient.js +9 -5
  46. package/sdk/platform/User/UserPlatformModel.d.ts +43 -3
  47. package/sdk/platform/User/UserPlatformModel.js +27 -3
@@ -47,9 +47,13 @@ export = CartPlatformApplicationValidator;
47
47
  * @typedef CheckoutCartParam
48
48
  * @property {string} [xOrderingSource] - Ordering source header, to be used to
49
49
  * identify source of order creation.
50
- * @property {string} [xAnonymousCart] - Anonymous cart header used to perform
51
- * operations on cross-platform anonymous cart. When enabled, the system
52
- * fetches the cart only based on cart_id instead of user_id.
50
+ * @property {string} [xAnonymousCart] - It allows operations on cross-platform
51
+ * anonymous carts. When provided, the system retrieves the cart using only
52
+ * the cart_id, ignoring the user_id. Use this when interacting with an
53
+ * anonymous or guest cart across platforms.
54
+ * @property {string} [xLocationDetail] - Location details for the cart checkout
55
+ * @property {string} [xCurrencyCode] - Currency code for transactions. Defaults
56
+ * to INR if the location is India.
53
57
  * @property {CartPlatformModel.OpenApiPlatformCheckoutReq} body
54
58
  */
55
59
  /**
@@ -89,6 +93,8 @@ export = CartPlatformApplicationValidator;
89
93
  * @typedef FetchAndvalidateCartItemsParam
90
94
  * @property {string} [xOrderingSource] - Ordering source header, to be used to
91
95
  * identify source of order creation.
96
+ * @property {string} [xLocationDetail] - Location details for the cart checkout
97
+ * @property {string} [xCurrencyCode] - Currency code for transactions.
92
98
  * @property {CartPlatformModel.OpenapiCartDetailsCreation} body
93
99
  */
94
100
  /** @typedef FetchCartMetaConfigParam */
@@ -310,6 +316,9 @@ export = CartPlatformApplicationValidator;
310
316
  * @typedef OverrideCartParam
311
317
  * @property {string} [xOrderingSource] - Ordering source header, to be used to
312
318
  * identify source of order creation.
319
+ * @property {string} [xLocationDetail] - Location details for the cart checkout
320
+ * @property {string} [xCurrencyCode] - Currency code for transactions. Defaults
321
+ * to INR if the location is India.
313
322
  * @property {CartPlatformModel.OverrideCheckoutReq} body
314
323
  */
315
324
  /**
@@ -344,8 +353,15 @@ export = CartPlatformApplicationValidator;
344
353
  /**
345
354
  * @typedef PlatformCheckoutCartV2Param
346
355
  * @property {string} [xOrderingSource] - Ordering source header, to be used to
347
- * identify source of order creation.
348
- * @property {string} [id] - The unique identifier of the cart
356
+ * identify source of order creation
357
+ * @property {string} [xAnonymousCart] - It allows operations on cross-platform
358
+ * anonymous carts. When provided, the system retrieves the cart using only
359
+ * the cart_id, ignoring the user_id. Use this when interacting with an
360
+ * anonymous or guest cart across platforms.
361
+ * @property {string} [xLocationDetail] - Location information for the cart
362
+ * @property {string} [xCurrencyCode] - Currency code for the transaction.
363
+ * Defaults to INR if the order location is India.
364
+ * @property {string} [id] - Unique identifier of the cart
349
365
  * @property {CartPlatformModel.PlatformCartCheckoutDetailV2Creation} body
350
366
  */
351
367
  /**
@@ -750,11 +766,21 @@ type CheckoutCartParam = {
750
766
  */
751
767
  xOrderingSource?: string;
752
768
  /**
753
- * - Anonymous cart header used to perform
754
- * operations on cross-platform anonymous cart. When enabled, the system
755
- * fetches the cart only based on cart_id instead of user_id.
769
+ * - It allows operations on cross-platform
770
+ * anonymous carts. When provided, the system retrieves the cart using only
771
+ * the cart_id, ignoring the user_id. Use this when interacting with an
772
+ * anonymous or guest cart across platforms.
756
773
  */
757
774
  xAnonymousCart?: string;
775
+ /**
776
+ * - Location details for the cart checkout
777
+ */
778
+ xLocationDetail?: string;
779
+ /**
780
+ * - Currency code for transactions. Defaults
781
+ * to INR if the location is India.
782
+ */
783
+ xCurrencyCode?: string;
758
784
  body: CartPlatformModel.OpenApiPlatformCheckoutReq;
759
785
  };
760
786
  type CreateCartMetaConfigParam = {
@@ -791,6 +817,14 @@ type FetchAndvalidateCartItemsParam = {
791
817
  * identify source of order creation.
792
818
  */
793
819
  xOrderingSource?: string;
820
+ /**
821
+ * - Location details for the cart checkout
822
+ */
823
+ xLocationDetail?: string;
824
+ /**
825
+ * - Currency code for transactions.
826
+ */
827
+ xCurrencyCode?: string;
794
828
  body: CartPlatformModel.OpenapiCartDetailsCreation;
795
829
  };
796
830
  type GetAbandonedCartParam = {
@@ -1122,6 +1156,15 @@ type OverrideCartParam = {
1122
1156
  * identify source of order creation.
1123
1157
  */
1124
1158
  xOrderingSource?: string;
1159
+ /**
1160
+ * - Location details for the cart checkout
1161
+ */
1162
+ xLocationDetail?: string;
1163
+ /**
1164
+ * - Currency code for transactions. Defaults
1165
+ * to INR if the location is India.
1166
+ */
1167
+ xCurrencyCode?: string;
1125
1168
  body: CartPlatformModel.OverrideCheckoutReq;
1126
1169
  };
1127
1170
  type PlatformAddItemsParam = {
@@ -1184,11 +1227,27 @@ type PlatformCheckoutCartParam = {
1184
1227
  type PlatformCheckoutCartV2Param = {
1185
1228
  /**
1186
1229
  * - Ordering source header, to be used to
1187
- * identify source of order creation.
1230
+ * identify source of order creation
1188
1231
  */
1189
1232
  xOrderingSource?: string;
1190
1233
  /**
1191
- * - The unique identifier of the cart
1234
+ * - It allows operations on cross-platform
1235
+ * anonymous carts. When provided, the system retrieves the cart using only
1236
+ * the cart_id, ignoring the user_id. Use this when interacting with an
1237
+ * anonymous or guest cart across platforms.
1238
+ */
1239
+ xAnonymousCart?: string;
1240
+ /**
1241
+ * - Location information for the cart
1242
+ */
1243
+ xLocationDetail?: string;
1244
+ /**
1245
+ * - Currency code for the transaction.
1246
+ * Defaults to INR if the order location is India.
1247
+ */
1248
+ xCurrencyCode?: string;
1249
+ /**
1250
+ * - Unique identifier of the cart
1192
1251
  */
1193
1252
  id?: string;
1194
1253
  body: CartPlatformModel.PlatformCartCheckoutDetailV2Creation;
@@ -56,9 +56,13 @@ const CartPlatformModel = require("./CartPlatformModel");
56
56
  * @typedef CheckoutCartParam
57
57
  * @property {string} [xOrderingSource] - Ordering source header, to be used to
58
58
  * identify source of order creation.
59
- * @property {string} [xAnonymousCart] - Anonymous cart header used to perform
60
- * operations on cross-platform anonymous cart. When enabled, the system
61
- * fetches the cart only based on cart_id instead of user_id.
59
+ * @property {string} [xAnonymousCart] - It allows operations on cross-platform
60
+ * anonymous carts. When provided, the system retrieves the cart using only
61
+ * the cart_id, ignoring the user_id. Use this when interacting with an
62
+ * anonymous or guest cart across platforms.
63
+ * @property {string} [xLocationDetail] - Location details for the cart checkout
64
+ * @property {string} [xCurrencyCode] - Currency code for transactions. Defaults
65
+ * to INR if the location is India.
62
66
  * @property {CartPlatformModel.OpenApiPlatformCheckoutReq} body
63
67
  */
64
68
 
@@ -107,6 +111,8 @@ const CartPlatformModel = require("./CartPlatformModel");
107
111
  * @typedef FetchAndvalidateCartItemsParam
108
112
  * @property {string} [xOrderingSource] - Ordering source header, to be used to
109
113
  * identify source of order creation.
114
+ * @property {string} [xLocationDetail] - Location details for the cart checkout
115
+ * @property {string} [xCurrencyCode] - Currency code for transactions.
110
116
  * @property {CartPlatformModel.OpenapiCartDetailsCreation} body
111
117
  */
112
118
 
@@ -356,6 +362,9 @@ const CartPlatformModel = require("./CartPlatformModel");
356
362
  * @typedef OverrideCartParam
357
363
  * @property {string} [xOrderingSource] - Ordering source header, to be used to
358
364
  * identify source of order creation.
365
+ * @property {string} [xLocationDetail] - Location details for the cart checkout
366
+ * @property {string} [xCurrencyCode] - Currency code for transactions. Defaults
367
+ * to INR if the location is India.
359
368
  * @property {CartPlatformModel.OverrideCheckoutReq} body
360
369
  */
361
370
 
@@ -393,8 +402,15 @@ const CartPlatformModel = require("./CartPlatformModel");
393
402
  /**
394
403
  * @typedef PlatformCheckoutCartV2Param
395
404
  * @property {string} [xOrderingSource] - Ordering source header, to be used to
396
- * identify source of order creation.
397
- * @property {string} [id] - The unique identifier of the cart
405
+ * identify source of order creation
406
+ * @property {string} [xAnonymousCart] - It allows operations on cross-platform
407
+ * anonymous carts. When provided, the system retrieves the cart using only
408
+ * the cart_id, ignoring the user_id. Use this when interacting with an
409
+ * anonymous or guest cart across platforms.
410
+ * @property {string} [xLocationDetail] - Location information for the cart
411
+ * @property {string} [xCurrencyCode] - Currency code for the transaction.
412
+ * Defaults to INR if the order location is India.
413
+ * @property {string} [id] - Unique identifier of the cart
398
414
  * @property {CartPlatformModel.PlatformCartCheckoutDetailV2Creation} body
399
415
  */
400
416
 
@@ -672,6 +688,8 @@ class CartPlatformApplicationValidator {
672
688
  return Joi.object({
673
689
  xOrderingSource: Joi.string().allow(""),
674
690
  xAnonymousCart: Joi.string().allow(""),
691
+ xLocationDetail: Joi.string().allow(""),
692
+ xCurrencyCode: Joi.string().allow(""),
675
693
 
676
694
  body: CartPlatformModel.OpenApiPlatformCheckoutReq().required(),
677
695
  }).required();
@@ -738,6 +756,8 @@ class CartPlatformApplicationValidator {
738
756
  static fetchAndvalidateCartItems() {
739
757
  return Joi.object({
740
758
  xOrderingSource: Joi.string().allow(""),
759
+ xLocationDetail: Joi.string().allow(""),
760
+ xCurrencyCode: Joi.string().allow(""),
741
761
 
742
762
  body: CartPlatformModel.OpenapiCartDetailsCreation().required(),
743
763
  }).required();
@@ -1028,6 +1048,8 @@ class CartPlatformApplicationValidator {
1028
1048
  static overrideCart() {
1029
1049
  return Joi.object({
1030
1050
  xOrderingSource: Joi.string().allow(""),
1051
+ xLocationDetail: Joi.string().allow(""),
1052
+ xCurrencyCode: Joi.string().allow(""),
1031
1053
 
1032
1054
  body: CartPlatformModel.OverrideCheckoutReq().required(),
1033
1055
  }).required();
@@ -1063,6 +1085,9 @@ class CartPlatformApplicationValidator {
1063
1085
  static platformCheckoutCartV2() {
1064
1086
  return Joi.object({
1065
1087
  xOrderingSource: Joi.string().allow(""),
1088
+ xAnonymousCart: Joi.string().allow(""),
1089
+ xLocationDetail: Joi.string().allow(""),
1090
+ xCurrencyCode: Joi.string().allow(""),
1066
1091
 
1067
1092
  id: Joi.string().allow(""),
1068
1093
  body: CartPlatformModel.PlatformCartCheckoutDetailV2Creation().required(),
@@ -941,6 +941,8 @@ export = CartPlatformModel;
941
941
  * @property {string} [earn_title] - Title to show how many earn points are
942
942
  * gained for this order.
943
943
  * @property {string} [title] - Unique title for loyalty program applicable.
944
+ * @property {number} [discount_amount] - Engage discount amount applied on the
945
+ * cart as payment mode
944
946
  */
945
947
  /**
946
948
  * @typedef RawBreakup
@@ -956,12 +958,13 @@ export = CartPlatformModel;
956
958
  * @property {number} [cod_charge] - Cod charge value applied to cart. This is
957
959
  * applied when user select payment mode as COD
958
960
  * @property {number} [total] - Total payable amount by the customer
959
- * @property {number} [discount] - Discount amount recieved on cart
961
+ * @property {number} [discount] - Discount amount received on cart
960
962
  * @property {number} [delivery_charge] - Delivery charge applied to cart
961
963
  * @property {number} [you_saved] - Total amount will be saved if customer
962
964
  * places the order
963
965
  * @property {number} [subtotal] - Selling price amount of all products in cart
964
966
  * @property {number} [convenience_fee] - Convenience fee amount applied to cart
967
+ * @property {number} [store_credit] - Store credit redeemed on the cart
965
968
  */
966
969
  /**
967
970
  * @typedef CartBreakup
@@ -1109,7 +1112,7 @@ export = CartPlatformModel;
1109
1112
  * @property {string[]} [product_group_tags] - List fot the unique identifier
1110
1113
  * for the product grouping.
1111
1114
  * @property {boolean} [force_new_line_item] - Flag to indicate the item as a
1112
- * seperate article in cart
1115
+ * separate article in cart
1113
1116
  * @property {Object} [identifier] - Unique identifier of the article
1114
1117
  * @property {number} [mto_quantity] - Quantity of the product which will
1115
1118
  * specially manufactured as not available in stock
@@ -1635,7 +1638,7 @@ export = CartPlatformModel;
1635
1638
  * @property {Object} [_custom_json] - Field to add custom json at article level
1636
1639
  * while add items to cart
1637
1640
  * @property {boolean} [force_new_line_item] - Field used to decide the product
1638
- * add as a seperate product in cart
1641
+ * add as a separate product in cart
1639
1642
  * @property {Object} [meta] - Field to add meta data at article level
1640
1643
  * @property {boolean} [pos] - Filed to determine whether user is making request
1641
1644
  * from pos or not
@@ -1684,7 +1687,7 @@ export = CartPlatformModel;
1684
1687
  * @property {Object} [extra_meta] - Field to update extra meta of the product in cart
1685
1688
  * @property {Object} [_custom_json] - Field to update custom json of the product in cart
1686
1689
  * @property {boolean} [force_new_line_item] - Field used to decide the product
1687
- * add as a seperate product in cart
1690
+ * add as a separate product in cart
1688
1691
  * @property {number} [item_id] - Item id of the product that needs to be updated
1689
1692
  * @property {number} [item_index] - Item index determines on which index the
1690
1693
  * product falls to be updated
@@ -2304,12 +2307,15 @@ export = CartPlatformModel;
2304
2307
  * @property {Object} [custom_cart_meta] - Custom meta details added cart
2305
2308
  * checkout API payload
2306
2309
  */
2310
+ /**
2311
+ * @typedef CartCheckoutDetailsData
2312
+ * @property {string} [order_id] - Order id generated after placing order
2313
+ */
2307
2314
  /**
2308
2315
  * @typedef CartCheckoutDetails
2309
- * @property {string} [app_intercept_url] - App intercept url which is used to
2316
+ * @property {string} [app_intercept_url] - App intercept URL which is used to
2310
2317
  * redirect on app after payment in confirmed/failed
2311
- * @property {Object} [data] - Data of the user cart checkout includes cart
2312
- * data, address, user id, order type etc
2318
+ * @property {CartCheckoutDetailsData} [data]
2313
2319
  * @property {CheckCart} [cart]
2314
2320
  * @property {boolean} [success] - Success flag of cart checkout API response
2315
2321
  * @property {string} [callback_url] - Callback url to be redirected after
@@ -2404,7 +2410,7 @@ export = CartPlatformModel;
2404
2410
  */
2405
2411
  /**
2406
2412
  * @typedef PaymentMethod
2407
- * @property {string} mode - Payment mode of payment method used to make payment
2413
+ * @property {string} mode - Payment mode used for this payment method
2408
2414
  * @property {string} [payment] - Payment name of payment method used to make payment
2409
2415
  * @property {PaymentMeta} payment_meta
2410
2416
  * @property {number} [amount] - Amount of the payment mode to be paid
@@ -2414,8 +2420,8 @@ export = CartPlatformModel;
2414
2420
  */
2415
2421
  /**
2416
2422
  * @typedef PlatformCartCheckoutDetailV2Creation
2417
- * @property {string} [address_id] - Address id of the user on which the order
2418
- * to be delivered
2423
+ * @property {string} [address_id] - Identifier for the address where the order
2424
+ * will be delivered
2419
2425
  * @property {string} [payment_identifier] - Payment identifier of the payment
2420
2426
  * mode selected to do the payment
2421
2427
  * @property {Object} [payment_params] - Payment params which includes payment
@@ -2424,22 +2430,23 @@ export = CartPlatformModel;
2424
2430
  * added in order
2425
2431
  * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
2426
2432
  * payment need not to be collected from user
2427
- * @property {string} id - Cart id of the user cart
2428
- * @property {boolean} [pos] - Filed to determine whether user is making request
2429
- * from pos or not
2430
- * @property {string} [billing_address_id] - Billing address id of the customer
2431
- * on which the invoice to be generated after the order is placed
2433
+ * @property {string} id - Cart identifier of the user cart
2434
+ * @property {boolean} [pos] - Field indicating whether the user is making the
2435
+ * request from a POS
2436
+ * @property {string} [billing_address_id] - Identifier for the customer's
2437
+ * billing address where the invoice will be generated after order placement
2432
2438
  * @property {string} [merchant_code] - Merchant code of the payment mode
2433
2439
  * selected to do the payment
2434
2440
  * @property {string} [aggregator] - Aggregator name of the payment gateway
2435
2441
  * @property {number} [pick_at_store_uid] - Store id where we have to pick product
2436
- * @property {string} [device_id] - Device id
2437
- * @property {Object} [delivery_address] - Delivery address data which includes
2438
- * customer address, customer phone, customer email, customer pincode,
2439
- * customer landmark and customer name
2442
+ * @property {string} [device_id] - Unique identifier for the device used during checkout
2443
+ * @property {Object} [delivery_address] - Complete delivery address object
2444
+ * containing customer address details, phone number, email address, pincode,
2445
+ * landmark, and full name.
2440
2446
  * @property {string} [payment_mode] - Payment mode from which the payment to be
2441
2447
  * done for the order
2442
- * @property {string} [checkout_mode] - Mode of checkout used in cart
2448
+ * @property {string} [checkout_mode] - Checkout mode for the cart, such as
2449
+ * guest and logged-in checkout
2443
2450
  * @property {CustomerDetails} [customer_details]
2444
2451
  * @property {Object} [meta] - Meta data to be added in order
2445
2452
  * @property {PaymentMethod[]} payment_methods - Payment methods list used to
@@ -2450,24 +2457,26 @@ export = CartPlatformModel;
2450
2457
  * @property {Object} [billing_address] - Billing address json which includes
2451
2458
  * customer address, customer phone, customer email, customer pincode,
2452
2459
  * customer landmark and customer name
2453
- * @property {string} [callback_url] - Callback url after payment received/failed
2454
- * @property {string} [user_id] - The user id of user cart
2460
+ * @property {string} [callback_url] - Callback URL to redirect the user after
2461
+ * payment is received or has failed
2462
+ * @property {string} [user_id] - Unique identifier of the user associated with the cart
2455
2463
  * @property {Object} [extra_meta] - Extra meta to be added while checkout in order
2456
- * @property {string} order_type - Order type of the order being placed like
2457
- * pickAtStore or HomeDelivery
2464
+ * @property {string} order_type - Order type of the order being placed
2458
2465
  * @property {Files[]} [files] - List of file url
2459
2466
  * @property {number} [ordering_store] - Ordering store id of the store from
2460
2467
  * which the order is getting placed
2461
- * @property {string} [iin] - Issuer Identification Number number of card if
2462
- * payment mode is card to do the payment
2463
- * @property {string} [network] - Network of card if payment mode is card to do
2464
- * the payment
2465
- * @property {string} [type] - Type of cart if payment mode is card to do the payment
2466
- * @property {string} [card_id] - Saved card id if payment mode is card to do the payment
2467
- * @property {string} [success_callback_url] - Success callback url to be
2468
- * redirected after payment received
2469
- * @property {string} [failure_callback_url] - Failure callback url to be
2470
- * redirected after payment failed
2468
+ * @property {string} [iin] - Issuer Identification Number (IIN) of the card to
2469
+ * be used for payment. This field is applicable when the payment mode is set to card.
2470
+ * @property {string} [network] - Card network to use for payment, relevant when
2471
+ * the selected payment mode is a card
2472
+ * @property {string} [type] - Specifies the cart type, particularly when the
2473
+ * payment mode is a card
2474
+ * @property {string} [card_id] - Identifier for the saved card to be used for
2475
+ * payment. This field is applicable when card payment mode has been selected.
2476
+ * @property {string} [success_callback_url] - URL to which the user will be
2477
+ * redirected after successful payment completion
2478
+ * @property {string} [failure_callback_url] - URL to which the user will be
2479
+ * redirected if the payment fails
2471
2480
  * @property {OrderTag[]} [order_tags] - Order tags used to identify specific
2472
2481
  * type of order which is tagged using order tags
2473
2482
  */
@@ -2847,7 +2856,7 @@ export = CartPlatformModel;
2847
2856
  declare class CartPlatformModel {
2848
2857
  }
2849
2858
  declare namespace CartPlatformModel {
2850
- 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, DiscountItemCriteria, 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, CurrencyValue, ChargesAmount, ArticleCharges, 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, UpdateCartBreakup, 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, DiscountOfferRule, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError, OfferUser, OfferItemCriteria, DiscountRuleOffer, OfferDiscountRule, OfferUsesRemaining, OfferUsesRestriction, OfferRestrictionFulfillmentOptions, OfferRestrictions, OfferDisplayMeta, OfferCouponConfiguration, OfferOwnership, OfferSchema, OfferPartialUpdate, OfferAuthor, OfferDateMeta, NextScheduleItems, OfferSchedule, OfferListItem, OfferListResult };
2859
+ 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, DiscountItemCriteria, 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, CurrencyValue, ChargesAmount, ArticleCharges, 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, UpdateCartBreakup, 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, CartCheckoutDetailsData, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, DiscountOfferRule, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError, OfferUser, OfferItemCriteria, DiscountRuleOffer, OfferDiscountRule, OfferUsesRemaining, OfferUsesRestriction, OfferRestrictionFulfillmentOptions, OfferRestrictions, OfferDisplayMeta, OfferCouponConfiguration, OfferOwnership, OfferSchema, OfferPartialUpdate, OfferAuthor, OfferDateMeta, NextScheduleItems, OfferSchedule, OfferListItem, OfferListResult };
2851
2860
  }
2852
2861
  /** @returns {RedeemLoyaltyPoints} */
2853
2862
  declare function RedeemLoyaltyPoints(): RedeemLoyaltyPoints;
@@ -5163,6 +5172,11 @@ type LoyaltyPoints = {
5163
5172
  * - Unique title for loyalty program applicable.
5164
5173
  */
5165
5174
  title?: string;
5175
+ /**
5176
+ * - Engage discount amount applied on the
5177
+ * cart as payment mode
5178
+ */
5179
+ discount_amount?: number;
5166
5180
  };
5167
5181
  /** @returns {RawBreakup} */
5168
5182
  declare function RawBreakup(): RawBreakup;
@@ -5210,7 +5224,7 @@ type RawBreakup = {
5210
5224
  */
5211
5225
  total?: number;
5212
5226
  /**
5213
- * - Discount amount recieved on cart
5227
+ * - Discount amount received on cart
5214
5228
  */
5215
5229
  discount?: number;
5216
5230
  /**
@@ -5230,6 +5244,10 @@ type RawBreakup = {
5230
5244
  * - Convenience fee amount applied to cart
5231
5245
  */
5232
5246
  convenience_fee?: number;
5247
+ /**
5248
+ * - Store credit redeemed on the cart
5249
+ */
5250
+ store_credit?: number;
5233
5251
  };
5234
5252
  /** @returns {CartBreakup} */
5235
5253
  declare function CartBreakup(): CartBreakup;
@@ -5561,7 +5579,7 @@ type ProductArticle = {
5561
5579
  product_group_tags?: string[];
5562
5580
  /**
5563
5581
  * - Flag to indicate the item as a
5564
- * seperate article in cart
5582
+ * separate article in cart
5565
5583
  */
5566
5584
  force_new_line_item?: boolean;
5567
5585
  /**
@@ -6935,7 +6953,7 @@ type AddProductCart = {
6935
6953
  _custom_json?: any;
6936
6954
  /**
6937
6955
  * - Field used to decide the product
6938
- * add as a seperate product in cart
6956
+ * add as a separate product in cart
6939
6957
  */
6940
6958
  force_new_line_item?: boolean;
6941
6959
  /**
@@ -7060,7 +7078,7 @@ type UpdateProductCart = {
7060
7078
  _custom_json?: any;
7061
7079
  /**
7062
7080
  * - Field used to decide the product
7063
- * add as a seperate product in cart
7081
+ * add as a separate product in cart
7064
7082
  */
7065
7083
  force_new_line_item?: boolean;
7066
7084
  /**
@@ -8610,19 +8628,23 @@ type CheckCart = {
8610
8628
  */
8611
8629
  custom_cart_meta?: any;
8612
8630
  };
8631
+ /** @returns {CartCheckoutDetailsData} */
8632
+ declare function CartCheckoutDetailsData(): CartCheckoutDetailsData;
8633
+ type CartCheckoutDetailsData = {
8634
+ /**
8635
+ * - Order id generated after placing order
8636
+ */
8637
+ order_id?: string;
8638
+ };
8613
8639
  /** @returns {CartCheckoutDetails} */
8614
8640
  declare function CartCheckoutDetails(): CartCheckoutDetails;
8615
8641
  type CartCheckoutDetails = {
8616
8642
  /**
8617
- * - App intercept url which is used to
8643
+ * - App intercept URL which is used to
8618
8644
  * redirect on app after payment in confirmed/failed
8619
8645
  */
8620
8646
  app_intercept_url?: string;
8621
- /**
8622
- * - Data of the user cart checkout includes cart
8623
- * data, address, user id, order type etc
8624
- */
8625
- data?: any;
8647
+ data?: CartCheckoutDetailsData;
8626
8648
  cart?: CheckCart;
8627
8649
  /**
8628
8650
  * - Success flag of cart checkout API response
@@ -8862,7 +8884,7 @@ type PaymentMeta = {
8862
8884
  declare function PaymentMethod(): PaymentMethod;
8863
8885
  type PaymentMethod = {
8864
8886
  /**
8865
- * - Payment mode of payment method used to make payment
8887
+ * - Payment mode used for this payment method
8866
8888
  */
8867
8889
  mode: string;
8868
8890
  /**
@@ -8888,8 +8910,8 @@ type PaymentMethod = {
8888
8910
  declare function PlatformCartCheckoutDetailV2Creation(): PlatformCartCheckoutDetailV2Creation;
8889
8911
  type PlatformCartCheckoutDetailV2Creation = {
8890
8912
  /**
8891
- * - Address id of the user on which the order
8892
- * to be delivered
8913
+ * - Identifier for the address where the order
8914
+ * will be delivered
8893
8915
  */
8894
8916
  address_id?: string;
8895
8917
  /**
@@ -8913,17 +8935,17 @@ type PlatformCartCheckoutDetailV2Creation = {
8913
8935
  */
8914
8936
  payment_auto_confirm?: boolean;
8915
8937
  /**
8916
- * - Cart id of the user cart
8938
+ * - Cart identifier of the user cart
8917
8939
  */
8918
8940
  id: string;
8919
8941
  /**
8920
- * - Filed to determine whether user is making request
8921
- * from pos or not
8942
+ * - Field indicating whether the user is making the
8943
+ * request from a POS
8922
8944
  */
8923
8945
  pos?: boolean;
8924
8946
  /**
8925
- * - Billing address id of the customer
8926
- * on which the invoice to be generated after the order is placed
8947
+ * - Identifier for the customer's
8948
+ * billing address where the invoice will be generated after order placement
8927
8949
  */
8928
8950
  billing_address_id?: string;
8929
8951
  /**
@@ -8940,13 +8962,13 @@ type PlatformCartCheckoutDetailV2Creation = {
8940
8962
  */
8941
8963
  pick_at_store_uid?: number;
8942
8964
  /**
8943
- * - Device id
8965
+ * - Unique identifier for the device used during checkout
8944
8966
  */
8945
8967
  device_id?: string;
8946
8968
  /**
8947
- * - Delivery address data which includes
8948
- * customer address, customer phone, customer email, customer pincode,
8949
- * customer landmark and customer name
8969
+ * - Complete delivery address object
8970
+ * containing customer address details, phone number, email address, pincode,
8971
+ * landmark, and full name.
8950
8972
  */
8951
8973
  delivery_address?: any;
8952
8974
  /**
@@ -8955,7 +8977,8 @@ type PlatformCartCheckoutDetailV2Creation = {
8955
8977
  */
8956
8978
  payment_mode?: string;
8957
8979
  /**
8958
- * - Mode of checkout used in cart
8980
+ * - Checkout mode for the cart, such as
8981
+ * guest and logged-in checkout
8959
8982
  */
8960
8983
  checkout_mode?: string;
8961
8984
  customer_details?: CustomerDetails;
@@ -8981,11 +9004,12 @@ type PlatformCartCheckoutDetailV2Creation = {
8981
9004
  */
8982
9005
  billing_address?: any;
8983
9006
  /**
8984
- * - Callback url after payment received/failed
9007
+ * - Callback URL to redirect the user after
9008
+ * payment is received or has failed
8985
9009
  */
8986
9010
  callback_url?: string;
8987
9011
  /**
8988
- * - The user id of user cart
9012
+ * - Unique identifier of the user associated with the cart
8989
9013
  */
8990
9014
  user_id?: string;
8991
9015
  /**
@@ -8993,8 +9017,7 @@ type PlatformCartCheckoutDetailV2Creation = {
8993
9017
  */
8994
9018
  extra_meta?: any;
8995
9019
  /**
8996
- * - Order type of the order being placed like
8997
- * pickAtStore or HomeDelivery
9020
+ * - Order type of the order being placed
8998
9021
  */
8999
9022
  order_type: string;
9000
9023
  /**
@@ -9007,31 +9030,33 @@ type PlatformCartCheckoutDetailV2Creation = {
9007
9030
  */
9008
9031
  ordering_store?: number;
9009
9032
  /**
9010
- * - Issuer Identification Number number of card if
9011
- * payment mode is card to do the payment
9033
+ * - Issuer Identification Number (IIN) of the card to
9034
+ * be used for payment. This field is applicable when the payment mode is set to card.
9012
9035
  */
9013
9036
  iin?: string;
9014
9037
  /**
9015
- * - Network of card if payment mode is card to do
9016
- * the payment
9038
+ * - Card network to use for payment, relevant when
9039
+ * the selected payment mode is a card
9017
9040
  */
9018
9041
  network?: string;
9019
9042
  /**
9020
- * - Type of cart if payment mode is card to do the payment
9043
+ * - Specifies the cart type, particularly when the
9044
+ * payment mode is a card
9021
9045
  */
9022
9046
  type?: string;
9023
9047
  /**
9024
- * - Saved card id if payment mode is card to do the payment
9048
+ * - Identifier for the saved card to be used for
9049
+ * payment. This field is applicable when card payment mode has been selected.
9025
9050
  */
9026
9051
  card_id?: string;
9027
9052
  /**
9028
- * - Success callback url to be
9029
- * redirected after payment received
9053
+ * - URL to which the user will be
9054
+ * redirected after successful payment completion
9030
9055
  */
9031
9056
  success_callback_url?: string;
9032
9057
  /**
9033
- * - Failure callback url to be
9034
- * redirected after payment failed
9058
+ * - URL to which the user will be
9059
+ * redirected if the payment fails
9035
9060
  */
9036
9061
  failure_callback_url?: string;
9037
9062
  /**