@gofynd/fdk-client-javascript 1.4.10 → 1.4.12-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +8 -19
  4. package/sdk/application/Cart/CartApplicationClient.js +8 -89
  5. package/sdk/application/Cart/CartApplicationModel.d.ts +1 -178
  6. package/sdk/application/Cart/CartApplicationModel.js +0 -92
  7. package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -20
  8. package/sdk/application/Cart/CartApplicationValidator.js +0 -16
  9. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +5 -0
  10. package/sdk/application/Configuration/ConfigurationApplicationModel.js +2 -0
  11. package/sdk/application/Content/ContentApplicationModel.d.ts +3 -2
  12. package/sdk/application/Content/ContentApplicationModel.js +5 -2
  13. package/sdk/application/Logistic/LogisticApplicationModel.js +3 -3
  14. package/sdk/application/Order/OrderApplicationModel.js +1 -1
  15. package/sdk/application/Payment/PaymentApplicationModel.js +2 -2
  16. package/sdk/application/Theme/ThemeApplicationModel.d.ts +3 -2
  17. package/sdk/application/Theme/ThemeApplicationModel.js +5 -2
  18. package/sdk/common/Clickstream.js +46 -15
  19. package/sdk/common/Constant.d.ts +5 -0
  20. package/sdk/common/Constant.js +5 -0
  21. package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
  22. package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
  23. package/sdk/partner/Webhook/WebhookPartnerModel.js +1 -1
  24. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +8 -20
  25. package/sdk/platform/Cart/CartPlatformApplicationClient.js +8 -92
  26. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +1 -15
  27. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +0 -14
  28. package/sdk/platform/Cart/CartPlatformModel.d.ts +1 -87
  29. package/sdk/platform/Cart/CartPlatformModel.js +0 -88
  30. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
  31. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +14 -3
  32. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -3
  33. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +14 -2
  34. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +10 -51
  35. package/sdk/platform/Catalog/CatalogPlatformClient.js +79 -400
  36. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8 -242
  37. package/sdk/platform/Catalog/CatalogPlatformModel.js +8 -171
  38. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -61
  39. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -65
  40. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +5 -0
  41. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2 -0
  42. package/sdk/platform/Content/ContentPlatformModel.d.ts +3 -2
  43. package/sdk/platform/Content/ContentPlatformModel.js +5 -2
  44. package/sdk/platform/Finance/FinancePlatformModel.js +1 -1
  45. package/sdk/platform/Order/OrderPlatformModel.d.ts +120 -39
  46. package/sdk/platform/Order/OrderPlatformModel.js +88 -38
  47. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +38 -4
  48. package/sdk/platform/Payment/PaymentPlatformModel.js +17 -7
  49. package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
  50. package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
  51. package/sdk/platform/Webhook/WebhookPlatformModel.js +1 -1
package/README.md CHANGED
@@ -237,7 +237,7 @@ console.log("Active Theme: ", response.information.name);
237
237
  The above code will log the curl command in the console
238
238
 
239
239
  ```bash
240
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.10' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
240
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.12-beta.1' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
241
241
  Active Theme: Emerge
242
242
  ```
243
243
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.4.10",
3
+ "version": "1.4.12-beta.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,7 +19,7 @@
19
19
  "loglevel": "^1.8.1",
20
20
  "query-string": "^7.1.3",
21
21
  "@gofynd/fp-signature": "^1.0.1",
22
- "@gofynd/flick": "^1.0.8"
22
+ "@gofynd/flick": "^1.0.9"
23
23
  },
24
24
  "devDependencies": {
25
25
  "axios-cookiejar-support": "^4.0.6",
@@ -7,7 +7,6 @@ declare class Cart {
7
7
  addItems: string;
8
8
  applyCoupon: string;
9
9
  applyRewardPoints: string;
10
- checkoutCart: string;
11
10
  checkoutCartV2: string;
12
11
  deleteCart: string;
13
12
  getAddressById: string;
@@ -41,7 +40,7 @@ declare class Cart {
41
40
  * @param {import("../ApplicationAPIClient").Options} - Options
42
41
  * @returns {Promise<CartApplicationModel.SaveAddressResponse>} - Success response
43
42
  * @name addAddress
44
- * @summary: Create a new address
43
+ * @summary: Creates a new address for a customer
45
44
  * @description: Add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/).
46
45
  */
47
46
  addAddress({ body, requestHeaders }?: CartApplicationValidator.AddAddressParam, { responseHeaders }?: object): Promise<CartApplicationModel.SaveAddressResponse>;
@@ -75,24 +74,14 @@ declare class Cart {
75
74
  * @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://partners.fynd.com/help/docs/sdk/application/cart/applyRewardPoints/).
76
75
  */
77
76
  applyRewardPoints({ body, id, i, b, buyNow, requestHeaders }?: CartApplicationValidator.ApplyRewardPointsParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
78
- /**
79
- * @param {CartApplicationValidator.CheckoutCartParam} arg - Arg object.
80
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
81
- * @param {import("../ApplicationAPIClient").Options} - Options
82
- * @returns {Promise<CartApplicationModel.CartCheckoutResponse>} - Success response
83
- * @name checkoutCart
84
- * @summary: Checkout cart
85
- * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCart/).
86
- */
87
- checkoutCart({ body, buyNow, cartType, requestHeaders }?: CartApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartCheckoutResponse>;
88
77
  /**
89
78
  * @param {CartApplicationValidator.CheckoutCartV2Param} arg - Arg object.
90
79
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
91
80
  * @param {import("../ApplicationAPIClient").Options} - Options
92
81
  * @returns {Promise<CartApplicationModel.CartCheckoutResponse>} - Success response
93
82
  * @name checkoutCartV2
94
- * @summary: Start cart checkout (latest)
95
- * @description: Enhanced version of checkout process that supports multiple mode of payment(MOP). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
83
+ * @summary: Checkout cart
84
+ * @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://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
96
85
  */
97
86
  checkoutCartV2({ body, buyNow, cartType, requestHeaders }?: CartApplicationValidator.CheckoutCartV2Param, { responseHeaders }?: object): Promise<CartApplicationModel.CartCheckoutResponse>;
98
87
  /**
@@ -112,7 +101,7 @@ declare class Cart {
112
101
  * @param {import("../ApplicationAPIClient").Options} - Options
113
102
  * @returns {Promise<CartApplicationModel.Address>} - Success response
114
103
  * @name getAddressById
115
- * @summary: Get a address
104
+ * @summary: Get details for a single customer address
116
105
  * @description: Get a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
117
106
  */
118
107
  getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: CartApplicationValidator.GetAddressByIdParam, { responseHeaders }?: object): Promise<CartApplicationModel.Address>;
@@ -122,7 +111,7 @@ declare class Cart {
122
111
  * @param {import("../ApplicationAPIClient").Options} - Options
123
112
  * @returns {Promise<CartApplicationModel.GetAddressesResponse>} - Success response
124
113
  * @name getAddresses
125
- * @summary: List customer addresses
114
+ * @summary: Get a list of addresses for a customer
126
115
  * @description: List all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/).
127
116
  */
128
117
  getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: CartApplicationValidator.GetAddressesParam, { responseHeaders }?: object): Promise<CartApplicationModel.GetAddressesResponse>;
@@ -245,7 +234,7 @@ declare class Cart {
245
234
  * @param {import("../ApplicationAPIClient").Options} - Options
246
235
  * @returns {Promise<CartApplicationModel.DeleteAddressResponse>} - Success response
247
236
  * @name removeAddress
248
- * @summary: Delete a address
237
+ * @summary: Removes an address from a customer's address list
249
238
  * @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
250
239
  */
251
240
  removeAddress({ id, requestHeaders }?: CartApplicationValidator.RemoveAddressParam, { responseHeaders }?: object): Promise<CartApplicationModel.DeleteAddressResponse>;
@@ -265,7 +254,7 @@ declare class Cart {
265
254
  * @param {import("../ApplicationAPIClient").Options} - Options
266
255
  * @returns {Promise<CartApplicationModel.CartDetailResponse>} - Success response
267
256
  * @name selectAddress
268
- * @summary: Select a delivery address
257
+ * @summary: Select customer address for order processing
269
258
  * @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectAddress/).
270
259
  */
271
260
  selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: CartApplicationValidator.SelectAddressParam, { responseHeaders }?: object): Promise<CartApplicationModel.CartDetailResponse>;
@@ -285,7 +274,7 @@ declare class Cart {
285
274
  * @param {import("../ApplicationAPIClient").Options} - Options
286
275
  * @returns {Promise<CartApplicationModel.UpdateAddressResponse>} - Success response
287
276
  * @name updateAddress
288
- * @summary: Update a address
277
+ * @summary: Updates an existing customer address
289
278
  * @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
290
279
  */
291
280
  updateAddress({ id, body, requestHeaders }?: CartApplicationValidator.UpdateAddressParam, { responseHeaders }?: object): Promise<CartApplicationModel.UpdateAddressResponse>;
@@ -18,7 +18,6 @@ class Cart {
18
18
  addItems: "/service/application/cart/v1.0/detail",
19
19
  applyCoupon: "/service/application/cart/v1.0/coupon",
20
20
  applyRewardPoints: "/service/application/cart/v1.0/redeem/points/",
21
- checkoutCart: "/service/application/cart/v1.0/checkout",
22
21
  checkoutCartV2: "/service/application/cart/v2.0/checkout",
23
22
  deleteCart: "/service/application/cart/v1.0/cart_archive",
24
23
  getAddressById: "/service/application/cart/v1.0/address/{id}",
@@ -69,7 +68,7 @@ class Cart {
69
68
  * @param {import("../ApplicationAPIClient").Options} - Options
70
69
  * @returns {Promise<CartApplicationModel.SaveAddressResponse>} - Success response
71
70
  * @name addAddress
72
- * @summary: Create a new address
71
+ * @summary: Creates a new address for a customer
73
72
  * @description: Add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/).
74
73
  */
75
74
  async addAddress(
@@ -389,94 +388,14 @@ class Cart {
389
388
  return response;
390
389
  }
391
390
 
392
- /**
393
- * @param {CartApplicationValidator.CheckoutCartParam} arg - Arg object.
394
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
395
- * @param {import("../ApplicationAPIClient").Options} - Options
396
- * @returns {Promise<CartApplicationModel.CartCheckoutResponse>} - Success response
397
- * @name checkoutCart
398
- * @summary: Checkout cart
399
- * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCart/).
400
- */
401
- async checkoutCart(
402
- { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
403
- { responseHeaders } = { responseHeaders: false }
404
- ) {
405
- const { error } = CartApplicationValidator.checkoutCart().validate(
406
- { body, buyNow, cartType },
407
- { abortEarly: false, allowUnknown: true }
408
- );
409
- if (error) {
410
- return Promise.reject(new FDKClientValidationError(error));
411
- }
412
-
413
- // Showing warrnings if extra unknown parameters are found
414
- const {
415
- error: warrning,
416
- } = CartApplicationValidator.checkoutCart().validate(
417
- { body, buyNow, cartType },
418
- { abortEarly: false, allowUnknown: false }
419
- );
420
- if (warrning) {
421
- Logger({
422
- level: "WARN",
423
- message: `Parameter Validation warrnings for application > Cart > checkoutCart \n ${warrning}`,
424
- });
425
- }
426
-
427
- const query_params = {};
428
- query_params["buy_now"] = buyNow;
429
- query_params["cart_type"] = cartType;
430
-
431
- const xHeaders = {};
432
-
433
- const response = await ApplicationAPIClient.execute(
434
- this._conf,
435
- "post",
436
- constructUrl({
437
- url: this._urls["checkoutCart"],
438
- params: {},
439
- }),
440
- query_params,
441
- body,
442
- { ...xHeaders, ...requestHeaders },
443
- { responseHeaders }
444
- );
445
-
446
- let responseData = response;
447
- if (responseHeaders) {
448
- responseData = response[0];
449
- }
450
-
451
- const {
452
- error: res_error,
453
- } = CartApplicationModel.CartCheckoutResponse().validate(responseData, {
454
- abortEarly: false,
455
- allowUnknown: true,
456
- });
457
-
458
- if (res_error) {
459
- if (this._conf.options.strictResponseCheck === true) {
460
- return Promise.reject(new FDKResponseValidationError(res_error));
461
- } else {
462
- Logger({
463
- level: "WARN",
464
- message: `Response Validation Warnings for application > Cart > checkoutCart \n ${res_error}`,
465
- });
466
- }
467
- }
468
-
469
- return response;
470
- }
471
-
472
391
  /**
473
392
  * @param {CartApplicationValidator.CheckoutCartV2Param} arg - Arg object.
474
393
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
475
394
  * @param {import("../ApplicationAPIClient").Options} - Options
476
395
  * @returns {Promise<CartApplicationModel.CartCheckoutResponse>} - Success response
477
396
  * @name checkoutCartV2
478
- * @summary: Start cart checkout (latest)
479
- * @description: Enhanced version of checkout process that supports multiple mode of payment(MOP). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
397
+ * @summary: Checkout cart
398
+ * @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://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
480
399
  */
481
400
  async checkoutCartV2(
482
401
  { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
@@ -633,7 +552,7 @@ class Cart {
633
552
  * @param {import("../ApplicationAPIClient").Options} - Options
634
553
  * @returns {Promise<CartApplicationModel.Address>} - Success response
635
554
  * @name getAddressById
636
- * @summary: Get a address
555
+ * @summary: Get details for a single customer address
637
556
  * @description: Get a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
638
557
  */
639
558
  async getAddressById(
@@ -726,7 +645,7 @@ class Cart {
726
645
  * @param {import("../ApplicationAPIClient").Options} - Options
727
646
  * @returns {Promise<CartApplicationModel.GetAddressesResponse>} - Success response
728
647
  * @name getAddresses
729
- * @summary: List customer addresses
648
+ * @summary: Get a list of addresses for a customer
730
649
  * @description: List all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/).
731
650
  */
732
651
  async getAddresses(
@@ -1726,7 +1645,7 @@ class Cart {
1726
1645
  * @param {import("../ApplicationAPIClient").Options} - Options
1727
1646
  * @returns {Promise<CartApplicationModel.DeleteAddressResponse>} - Success response
1728
1647
  * @name removeAddress
1729
- * @summary: Delete a address
1648
+ * @summary: Removes an address from a customer's address list
1730
1649
  * @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
1731
1650
  */
1732
1651
  async removeAddress(
@@ -1884,7 +1803,7 @@ class Cart {
1884
1803
  * @param {import("../ApplicationAPIClient").Options} - Options
1885
1804
  * @returns {Promise<CartApplicationModel.CartDetailResponse>} - Success response
1886
1805
  * @name selectAddress
1887
- * @summary: Select a delivery address
1806
+ * @summary: Select customer address for order processing
1888
1807
  * @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectAddress/).
1889
1808
  */
1890
1809
  async selectAddress(
@@ -2046,7 +1965,7 @@ class Cart {
2046
1965
  * @param {import("../ApplicationAPIClient").Options} - Options
2047
1966
  * @returns {Promise<CartApplicationModel.UpdateAddressResponse>} - Success response
2048
1967
  * @name updateAddress
2049
- * @summary: Update a address
1968
+ * @summary: Updates an existing customer address
2050
1969
  * @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
2051
1970
  */
2052
1971
  async updateAddress(
@@ -785,11 +785,6 @@ export = CartApplicationModel;
785
785
  * @property {Object} [custom_cart_meta] - Custom meta details added cart
786
786
  * checkout API payload.
787
787
  */
788
- /**
789
- * @typedef CartCheckoutCustomMeta
790
- * @property {string} key - Key name of custom meta.
791
- * @property {string} value - Value to be added in key.
792
- */
793
788
  /**
794
789
  * @typedef CustomerDetails
795
790
  * @property {string} [email] - Email address of the customer to be added in
@@ -811,51 +806,6 @@ export = CartApplicationModel;
811
806
  * on behalf of customer.
812
807
  * @property {string} _id - Id of staff who does checkout on behalf of customer.
813
808
  */
814
- /**
815
- * @typedef CartCheckoutDetailRequest
816
- * @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
817
- * added in order.
818
- * @property {Object} [customer_details] - Customer details to be added in order.
819
- * @property {string} [merchant_code] - Merchant code of the payment mode
820
- * selected to do the payment.
821
- * @property {string} [id] - Cart id of the user cart.
822
- * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
823
- * payment need not to be collected from user.
824
- * @property {string} payment_mode - Payment mode from which the payment to be
825
- * done for the order.
826
- * @property {string} [aggregator] - Aggregator name of the payment gateway.
827
- * @property {string} [address_id] - Address id of the user on which the order
828
- * to be delivered.
829
- * @property {string} [callback_url] - Callback url to be redirected after
830
- * payment received/failed.
831
- * @property {Object} [delivery_address] - Delivery address data which includes
832
- * customer address, customer phone, customer email, customer pincode,
833
- * customer landmark and customer name.
834
- * @property {StaffCheckout} [staff]
835
- * @property {string} [order_type] - Order type of the order being placed like
836
- * pickAtStore or HomeDelivery.
837
- * @property {number} [ordering_store] - Ordering store id of the store from
838
- * which the order is getting placed.
839
- * @property {Object} [extra_meta] - Extra meta to be added while checkout in order.
840
- * @property {string} [payment_identifier] - Payment identifier of the payment
841
- * mode selected to do the payment.
842
- * @property {Object} [billing_address] - Billing address json which includes
843
- * customer address, customer phone, customer email, customer pincode,
844
- * customer landmark and customer name.
845
- * @property {Object} [payment_params] - Payment params which includes payment
846
- * identifier and merchant code.
847
- * @property {string} [billing_address_id] - Billing address id of the customer
848
- * on which the invoice to be generated after the order is placed.
849
- * @property {Object} [meta] - Meta data to be added in order.
850
- * @property {Object} [payment_extra_identifiers] - Payment extra identifier for
851
- * the payment mode to do the payment.
852
- * @property {string} [iin] - Issuer Identification Number' number of card if
853
- * payment mode is card.
854
- * @property {string} [network] - Network of card if payment mode is card to do
855
- * the payment.
856
- * @property {string} [type] - Type of cart if payment mode is card to do the payment.
857
- * @property {string} [card_id] - Saved card id if payment mode is card to do the payment.
858
- */
859
809
  /**
860
810
  * @typedef CheckCart
861
811
  * @property {string} [checkout_mode] - Checkout mode of user cart.
@@ -1196,7 +1146,7 @@ export = CartApplicationModel;
1196
1146
  declare class CartApplicationModel {
1197
1147
  }
1198
1148
  declare namespace CartApplicationModel {
1199
- export { BuyRules, DiscountRulesApp, Ownership, AppliedFreeArticles, AppliedPromotion, PaymentSelectionLock, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, BasePrice, ArticlePriceInfo, BaseInfo, StoreInfo, ProductArticle, CartProductIdentifer, PromoMeta, ChargesAmount, Charges, ProductPrice, ProductPriceInfo, ProductPricePerUnit, ProductPricePerUnitInfo, ProductAvailabilitySize, ProductAvailability, ActionQuery, ProductAction, Tags, ProductImage, CategoryInfo, CartProduct, CouponDetails, CartProductInfo, DisplayBreakup, RawBreakup, CouponBreakup, LoyaltyPoints, CartBreakup, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResponse, AddProductCart, AddCartRequest, AddCartDetailResponse, UpdateProductCart, UpdateCartRequest, UpdateCartDetailResponse, DeleteCartDetailResponse, CartItemCountResponse, PageCoupon, Coupon, GetCouponResponse, ApplyCouponRequest, OfferPrice, OfferItem, OfferSeller, BulkPriceOffer, BulkPriceResponse, RewardPointRequest, GeoLocation, Address, GetAddressesResponse, SaveAddressResponse, UpdateAddressResponse, DeleteAddressResponse, SelectCartAddressRequest, UpdateCartPaymentRequest, CouponValidity, PaymentCouponValidate, ShipmentResponse, CartShipmentsResponse, CartCheckoutCustomMeta, CustomerDetails, StaffCheckout, CartCheckoutDetailRequest, CheckCart, CartCheckoutResponse, GiftDetail, ArticleGiftDetail, CartMetaRequest, CartMetaResponse, CartMetaMissingResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, SharedCartDetails, SharedCart, SharedCartResponse, PriceMinMax, ItemPriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersResponse, PromotionPaymentOffer, PromotionPaymentOffersResponse, OperationErrorResponse, LadderPrice, LadderOfferItem, LadderPriceOffer, CurrencyInfo, LadderPriceOffers, PaymentMeta, PaymentMethod, CartCheckoutDetailV2Request };
1149
+ export { BuyRules, DiscountRulesApp, Ownership, AppliedFreeArticles, AppliedPromotion, PaymentSelectionLock, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, BasePrice, ArticlePriceInfo, BaseInfo, StoreInfo, ProductArticle, CartProductIdentifer, PromoMeta, ChargesAmount, Charges, ProductPrice, ProductPriceInfo, ProductPricePerUnit, ProductPricePerUnitInfo, ProductAvailabilitySize, ProductAvailability, ActionQuery, ProductAction, Tags, ProductImage, CategoryInfo, CartProduct, CouponDetails, CartProductInfo, DisplayBreakup, RawBreakup, CouponBreakup, LoyaltyPoints, CartBreakup, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResponse, AddProductCart, AddCartRequest, AddCartDetailResponse, UpdateProductCart, UpdateCartRequest, UpdateCartDetailResponse, DeleteCartDetailResponse, CartItemCountResponse, PageCoupon, Coupon, GetCouponResponse, ApplyCouponRequest, OfferPrice, OfferItem, OfferSeller, BulkPriceOffer, BulkPriceResponse, RewardPointRequest, GeoLocation, Address, GetAddressesResponse, SaveAddressResponse, UpdateAddressResponse, DeleteAddressResponse, SelectCartAddressRequest, UpdateCartPaymentRequest, CouponValidity, PaymentCouponValidate, ShipmentResponse, CartShipmentsResponse, CustomerDetails, StaffCheckout, CheckCart, CartCheckoutResponse, GiftDetail, ArticleGiftDetail, CartMetaRequest, CartMetaResponse, CartMetaMissingResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, SharedCartDetails, SharedCart, SharedCartResponse, PriceMinMax, ItemPriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersResponse, PromotionPaymentOffer, PromotionPaymentOffersResponse, OperationErrorResponse, LadderPrice, LadderOfferItem, LadderPriceOffer, CurrencyInfo, LadderPriceOffers, PaymentMeta, PaymentMethod, CartCheckoutDetailV2Request };
1200
1150
  }
1201
1151
  /** @returns {BuyRules} */
1202
1152
  declare function BuyRules(): BuyRules;
@@ -3159,18 +3109,6 @@ type CartShipmentsResponse = {
3159
3109
  */
3160
3110
  custom_cart_meta?: any;
3161
3111
  };
3162
- /** @returns {CartCheckoutCustomMeta} */
3163
- declare function CartCheckoutCustomMeta(): CartCheckoutCustomMeta;
3164
- type CartCheckoutCustomMeta = {
3165
- /**
3166
- * - Key name of custom meta.
3167
- */
3168
- key: string;
3169
- /**
3170
- * - Value to be added in key.
3171
- */
3172
- value: string;
3173
- };
3174
3112
  /** @returns {CustomerDetails} */
3175
3113
  declare function CustomerDetails(): CustomerDetails;
3176
3114
  type CustomerDetails = {
@@ -3218,121 +3156,6 @@ type StaffCheckout = {
3218
3156
  */
3219
3157
  _id: string;
3220
3158
  };
3221
- /** @returns {CartCheckoutDetailRequest} */
3222
- declare function CartCheckoutDetailRequest(): CartCheckoutDetailRequest;
3223
- type CartCheckoutDetailRequest = {
3224
- /**
3225
- * - Custom meta data to be
3226
- * added in order.
3227
- */
3228
- custom_meta?: CartCheckoutCustomMeta[];
3229
- /**
3230
- * - Customer details to be added in order.
3231
- */
3232
- customer_details?: any;
3233
- /**
3234
- * - Merchant code of the payment mode
3235
- * selected to do the payment.
3236
- */
3237
- merchant_code?: string;
3238
- /**
3239
- * - Cart id of the user cart.
3240
- */
3241
- id?: string;
3242
- /**
3243
- * - Payment auto confirm flag if
3244
- * payment need not to be collected from user.
3245
- */
3246
- payment_auto_confirm?: boolean;
3247
- /**
3248
- * - Payment mode from which the payment to be
3249
- * done for the order.
3250
- */
3251
- payment_mode: string;
3252
- /**
3253
- * - Aggregator name of the payment gateway.
3254
- */
3255
- aggregator?: string;
3256
- /**
3257
- * - Address id of the user on which the order
3258
- * to be delivered.
3259
- */
3260
- address_id?: string;
3261
- /**
3262
- * - Callback url to be redirected after
3263
- * payment received/failed.
3264
- */
3265
- callback_url?: string;
3266
- /**
3267
- * - Delivery address data which includes
3268
- * customer address, customer phone, customer email, customer pincode,
3269
- * customer landmark and customer name.
3270
- */
3271
- delivery_address?: any;
3272
- staff?: StaffCheckout;
3273
- /**
3274
- * - Order type of the order being placed like
3275
- * pickAtStore or HomeDelivery.
3276
- */
3277
- order_type?: string;
3278
- /**
3279
- * - Ordering store id of the store from
3280
- * which the order is getting placed.
3281
- */
3282
- ordering_store?: number;
3283
- /**
3284
- * - Extra meta to be added while checkout in order.
3285
- */
3286
- extra_meta?: any;
3287
- /**
3288
- * - Payment identifier of the payment
3289
- * mode selected to do the payment.
3290
- */
3291
- payment_identifier?: string;
3292
- /**
3293
- * - Billing address json which includes
3294
- * customer address, customer phone, customer email, customer pincode,
3295
- * customer landmark and customer name.
3296
- */
3297
- billing_address?: any;
3298
- /**
3299
- * - Payment params which includes payment
3300
- * identifier and merchant code.
3301
- */
3302
- payment_params?: any;
3303
- /**
3304
- * - Billing address id of the customer
3305
- * on which the invoice to be generated after the order is placed.
3306
- */
3307
- billing_address_id?: string;
3308
- /**
3309
- * - Meta data to be added in order.
3310
- */
3311
- meta?: any;
3312
- /**
3313
- * - Payment extra identifier for
3314
- * the payment mode to do the payment.
3315
- */
3316
- payment_extra_identifiers?: any;
3317
- /**
3318
- * - Issuer Identification Number' number of card if
3319
- * payment mode is card.
3320
- */
3321
- iin?: string;
3322
- /**
3323
- * - Network of card if payment mode is card to do
3324
- * the payment.
3325
- */
3326
- network?: string;
3327
- /**
3328
- * - Type of cart if payment mode is card to do the payment.
3329
- */
3330
- type?: string;
3331
- /**
3332
- * - Saved card id if payment mode is card to do the payment.
3333
- */
3334
- card_id?: string;
3335
- };
3336
3159
  /** @returns {CheckCart} */
3337
3160
  declare function CheckCart(): CheckCart;
3338
3161
  type CheckCart = {
@@ -860,12 +860,6 @@ const Joi = require("joi");
860
860
  * checkout API payload.
861
861
  */
862
862
 
863
- /**
864
- * @typedef CartCheckoutCustomMeta
865
- * @property {string} key - Key name of custom meta.
866
- * @property {string} value - Value to be added in key.
867
- */
868
-
869
863
  /**
870
864
  * @typedef CustomerDetails
871
865
  * @property {string} [email] - Email address of the customer to be added in
@@ -889,52 +883,6 @@ const Joi = require("joi");
889
883
  * @property {string} _id - Id of staff who does checkout on behalf of customer.
890
884
  */
891
885
 
892
- /**
893
- * @typedef CartCheckoutDetailRequest
894
- * @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be
895
- * added in order.
896
- * @property {Object} [customer_details] - Customer details to be added in order.
897
- * @property {string} [merchant_code] - Merchant code of the payment mode
898
- * selected to do the payment.
899
- * @property {string} [id] - Cart id of the user cart.
900
- * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if
901
- * payment need not to be collected from user.
902
- * @property {string} payment_mode - Payment mode from which the payment to be
903
- * done for the order.
904
- * @property {string} [aggregator] - Aggregator name of the payment gateway.
905
- * @property {string} [address_id] - Address id of the user on which the order
906
- * to be delivered.
907
- * @property {string} [callback_url] - Callback url to be redirected after
908
- * payment received/failed.
909
- * @property {Object} [delivery_address] - Delivery address data which includes
910
- * customer address, customer phone, customer email, customer pincode,
911
- * customer landmark and customer name.
912
- * @property {StaffCheckout} [staff]
913
- * @property {string} [order_type] - Order type of the order being placed like
914
- * pickAtStore or HomeDelivery.
915
- * @property {number} [ordering_store] - Ordering store id of the store from
916
- * which the order is getting placed.
917
- * @property {Object} [extra_meta] - Extra meta to be added while checkout in order.
918
- * @property {string} [payment_identifier] - Payment identifier of the payment
919
- * mode selected to do the payment.
920
- * @property {Object} [billing_address] - Billing address json which includes
921
- * customer address, customer phone, customer email, customer pincode,
922
- * customer landmark and customer name.
923
- * @property {Object} [payment_params] - Payment params which includes payment
924
- * identifier and merchant code.
925
- * @property {string} [billing_address_id] - Billing address id of the customer
926
- * on which the invoice to be generated after the order is placed.
927
- * @property {Object} [meta] - Meta data to be added in order.
928
- * @property {Object} [payment_extra_identifiers] - Payment extra identifier for
929
- * the payment mode to do the payment.
930
- * @property {string} [iin] - Issuer Identification Number' number of card if
931
- * payment mode is card.
932
- * @property {string} [network] - Network of card if payment mode is card to do
933
- * the payment.
934
- * @property {string} [type] - Type of cart if payment mode is card to do the payment.
935
- * @property {string} [card_id] - Saved card id if payment mode is card to do the payment.
936
- */
937
-
938
886
  /**
939
887
  * @typedef CheckCart
940
888
  * @property {string} [checkout_mode] - Checkout mode of user cart.
@@ -2173,14 +2121,6 @@ class CartApplicationModel {
2173
2121
  });
2174
2122
  }
2175
2123
 
2176
- /** @returns {CartCheckoutCustomMeta} */
2177
- static CartCheckoutCustomMeta() {
2178
- return Joi.object({
2179
- key: Joi.string().allow("").required(),
2180
- value: Joi.string().allow("").required(),
2181
- });
2182
- }
2183
-
2184
2124
  /** @returns {CustomerDetails} */
2185
2125
  static CustomerDetails() {
2186
2126
  return Joi.object({
@@ -2201,38 +2141,6 @@ class CartApplicationModel {
2201
2141
  });
2202
2142
  }
2203
2143
 
2204
- /** @returns {CartCheckoutDetailRequest} */
2205
- static CartCheckoutDetailRequest() {
2206
- return Joi.object({
2207
- custom_meta: Joi.array().items(
2208
- CartApplicationModel.CartCheckoutCustomMeta()
2209
- ),
2210
- customer_details: Joi.any(),
2211
- merchant_code: Joi.string().allow(""),
2212
- id: Joi.string().allow(""),
2213
- payment_auto_confirm: Joi.boolean(),
2214
- payment_mode: Joi.string().allow("").required(),
2215
- aggregator: Joi.string().allow(""),
2216
- address_id: Joi.string().allow(""),
2217
- callback_url: Joi.string().allow(""),
2218
- delivery_address: Joi.any(),
2219
- staff: CartApplicationModel.StaffCheckout(),
2220
- order_type: Joi.string().allow(""),
2221
- ordering_store: Joi.number(),
2222
- extra_meta: Joi.any(),
2223
- payment_identifier: Joi.string().allow(""),
2224
- billing_address: Joi.any(),
2225
- payment_params: Joi.any(),
2226
- billing_address_id: Joi.string().allow(""),
2227
- meta: Joi.any(),
2228
- payment_extra_identifiers: Joi.any(),
2229
- iin: Joi.string().allow(""),
2230
- network: Joi.string().allow(""),
2231
- type: Joi.string().allow(""),
2232
- card_id: Joi.string().allow(""),
2233
- });
2234
- }
2235
-
2236
2144
  /** @returns {CheckCart} */
2237
2145
  static CheckCart() {
2238
2146
  return Joi.object({
@@ -33,12 +33,6 @@ export = CartApplicationValidator;
33
33
  * @property {boolean} [buyNow] - This is boolean to get buy_now cart.
34
34
  * @property {CartApplicationModel.RewardPointRequest} body
35
35
  */
36
- /**
37
- * @typedef CheckoutCartParam
38
- * @property {boolean} [buyNow] - This indicates the type of cart to checkout.
39
- * @property {string} [cartType] - The type of cart.
40
- * @property {CartApplicationModel.CartCheckoutDetailRequest} body
41
- */
42
36
  /**
43
37
  * @typedef CheckoutCartV2Param
44
38
  * @property {boolean} [buyNow] - This indicates the type of cart to checkout.
@@ -228,8 +222,6 @@ declare class CartApplicationValidator {
228
222
  static applyCoupon(): ApplyCouponParam;
229
223
  /** @returns {ApplyRewardPointsParam} */
230
224
  static applyRewardPoints(): ApplyRewardPointsParam;
231
- /** @returns {CheckoutCartParam} */
232
- static checkoutCart(): CheckoutCartParam;
233
225
  /** @returns {CheckoutCartV2Param} */
234
226
  static checkoutCartV2(): CheckoutCartV2Param;
235
227
  /** @returns {DeleteCartParam} */
@@ -280,7 +272,7 @@ declare class CartApplicationValidator {
280
272
  static validateCouponForPayment(): ValidateCouponForPaymentParam;
281
273
  }
282
274
  declare namespace CartApplicationValidator {
283
- export { AddAddressParam, AddItemsParam, ApplyCouponParam, ApplyRewardPointsParam, CheckoutCartParam, CheckoutCartV2Param, DeleteCartParam, GetAddressByIdParam, GetAddressesParam, GetBulkDiscountOffersParam, GetCartParam, GetCartLastModifiedParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponsParam, GetItemCountParam, GetLadderOffersParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetShipmentsParam, RemoveAddressParam, RemoveCouponParam, SelectAddressParam, SelectPaymentModeParam, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartWithSharedItemsParam, ValidateCouponForPaymentParam };
275
+ export { AddAddressParam, AddItemsParam, ApplyCouponParam, ApplyRewardPointsParam, CheckoutCartV2Param, DeleteCartParam, GetAddressByIdParam, GetAddressesParam, GetBulkDiscountOffersParam, GetCartParam, GetCartLastModifiedParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponsParam, GetItemCountParam, GetLadderOffersParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetShipmentsParam, RemoveAddressParam, RemoveCouponParam, SelectAddressParam, SelectPaymentModeParam, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartWithSharedItemsParam, ValidateCouponForPaymentParam };
284
276
  }
285
277
  type AddAddressParam = {
286
278
  body: CartApplicationModel.Address;
@@ -360,17 +352,6 @@ type ApplyRewardPointsParam = {
360
352
  buyNow?: boolean;
361
353
  body: CartApplicationModel.RewardPointRequest;
362
354
  };
363
- type CheckoutCartParam = {
364
- /**
365
- * - This indicates the type of cart to checkout.
366
- */
367
- buyNow?: boolean;
368
- /**
369
- * - The type of cart.
370
- */
371
- cartType?: string;
372
- body: CartApplicationModel.CartCheckoutDetailRequest;
373
- };
374
355
  type CheckoutCartV2Param = {
375
356
  /**
376
357
  * - This indicates the type of cart to checkout.