@gofynd/fdk-client-javascript 3.0.0 → 3.1.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 (26) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +13 -13
  4. package/sdk/application/Cart/CartApplicationClient.js +48 -13
  5. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +15 -15
  6. package/sdk/platform/Cart/CartPlatformApplicationClient.js +63 -16
  7. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +105 -0
  8. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +60 -0
  9. package/sdk/platform/Cart/CartPlatformModel.d.ts +18 -1
  10. package/sdk/platform/Cart/CartPlatformModel.js +36 -0
  11. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6 -11
  12. package/sdk/platform/Catalog/CatalogPlatformModel.js +2 -19
  13. package/sdk/platform/Order/OrderPlatformClient.d.ts +3 -3
  14. package/sdk/platform/Order/OrderPlatformClient.js +18 -5
  15. package/sdk/platform/Order/OrderPlatformModel.d.ts +64 -12
  16. package/sdk/platform/Order/OrderPlatformModel.js +29 -7
  17. package/sdk/platform/Order/OrderPlatformValidator.d.ts +28 -3
  18. package/sdk/platform/Order/OrderPlatformValidator.js +13 -2
  19. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +1 -1
  20. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +3 -0
  21. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -0
  22. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +4 -0
  23. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +1 -1
  24. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -3
  25. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +13 -3
  26. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +8 -2
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: 3.0.0' --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: 3.1.0' --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": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -53,7 +53,7 @@ declare class Cart {
53
53
  * @summary: Add items to a cart
54
54
  * @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addItems/).
55
55
  */
56
- addItems({ body, i, b, areaCode, buyNow, id, orderType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<AddCartDetailResult>;
56
+ addItems({ body, xOrderingSource, i, b, areaCode, buyNow, id, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<AddCartDetailResult>;
57
57
  /**
58
58
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
59
59
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -62,7 +62,7 @@ declare class Cart {
62
62
  * @summary: Apply coupon
63
63
  * @description: Apply a coupon code to the cart to trigger discounts on eligible items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyCoupon/).
64
64
  */
65
- applyCoupon({ body, i, b, p, id, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
65
+ applyCoupon({ body, xOrderingSource, i, b, p, id, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
66
66
  /**
67
67
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
68
68
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -71,7 +71,7 @@ declare class Cart {
71
71
  * @summary: Use reward points
72
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://partners.fynd.com/help/docs/sdk/application/cart/applyRewardPoints/).
73
73
  */
74
- applyRewardPoints({ body, id, i, b, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
74
+ applyRewardPoints({ 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
@@ -80,7 +80,7 @@ declare class Cart {
80
80
  * @summary: Checkout cart
81
81
  * @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/).
82
82
  */
83
- checkoutCart({ body, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartCheckoutResult>;
83
+ checkoutCart({ body, xOrderingSource, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartCheckoutResult>;
84
84
  /**
85
85
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
86
86
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -89,7 +89,7 @@ declare class Cart {
89
89
  * @summary: Checkout cart
90
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://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
91
91
  */
92
- checkoutCartV2({ body, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartCheckoutResult>;
92
+ checkoutCartV2({ body, xOrderingSource, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartCheckoutResult>;
93
93
  /**
94
94
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
95
95
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -134,7 +134,7 @@ declare class Cart {
134
134
  * @summary: Get a cart
135
135
  * @description: Get details of a cart linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCart/).
136
136
  */
137
- getCart({ id, i, b, c, assignCardId, areaCode, buyNow, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
137
+ getCart({ xOrderingSource, id, i, b, c, assignCardId, areaCode, buyNow, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
138
138
  /**
139
139
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
140
140
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -170,7 +170,7 @@ declare class Cart {
170
170
  * @summary: List available coupons
171
171
  * @description: List all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCoupons/).
172
172
  */
173
- getCoupons({ id, buyNow, slug, storeId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetCouponResult>;
173
+ getCoupons({ id, buyNow, productSlug, storeId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetCouponResult>;
174
174
  /**
175
175
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
176
176
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -233,7 +233,7 @@ declare class Cart {
233
233
  * @summary: Remove coupon
234
234
  * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeCoupon/).
235
235
  */
236
- removeCoupon({ id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
236
+ removeCoupon({ xOrderingSource, id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
237
237
  /**
238
238
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
239
239
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -242,7 +242,7 @@ declare class Cart {
242
242
  * @summary: Select customer address for order processing
243
243
  * @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/).
244
244
  */
245
- selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
245
+ selectAddress({ body, xOrderingSource, cartId, buyNow, i, b, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
246
246
  /**
247
247
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
248
248
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -251,7 +251,7 @@ declare class Cart {
251
251
  * @summary: Select payment mode
252
252
  * @description: Select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectPaymentMode/).
253
253
  */
254
- selectPaymentMode({ body, id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
254
+ selectPaymentMode({ body, xOrderingSource, id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResult>;
255
255
  /**
256
256
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
257
257
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -269,7 +269,7 @@ declare class Cart {
269
269
  * @summary: Update cart items
270
270
  * @description: Update cart. Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCart/).
271
271
  */
272
- updateCart({ body, id, i, b, areaCode, buyNow, cartType, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateCartDetailResult>;
272
+ updateCart({ body, xOrderingSource, id, i, b, areaCode, buyNow, cartType, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateCartDetailResult>;
273
273
  /**
274
274
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
275
275
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -278,7 +278,7 @@ declare class Cart {
278
278
  * @summary: Update store credits into cart and their items
279
279
  * @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartBreakup/).
280
280
  */
281
- updateCartBreakup({ body, id, i, b, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateCartDetailResult>;
281
+ updateCartBreakup({ body, xOrderingSource, id, i, b, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateCartDetailResult>;
282
282
  /**
283
283
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
284
284
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -305,5 +305,5 @@ declare class Cart {
305
305
  * @summary: Validate applied coupon
306
306
  * @description: Validate the applicability of a coupon code for the selected payment mode for the existing cart. This ensures the coupon's validity before proceeding with the payment process, enhancing user experience and preventing potential errors during transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/validateCouponForPayment/).
307
307
  */
308
- validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, iin, network, type, cardId, cartType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PaymentCouponValidate>;
308
+ validateCouponForPayment({ xOrderingSource, id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, iin, network, type, cardId, cartType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PaymentCouponValidate>;
309
309
  }
@@ -108,9 +108,17 @@ class Cart {
108
108
  * @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addItems/).
109
109
  */
110
110
  async addItems(
111
- { body, i, b, areaCode, buyNow, id, orderType, requestHeaders } = {
112
- requestHeaders: {},
113
- },
111
+ {
112
+ body,
113
+ xOrderingSource,
114
+ i,
115
+ b,
116
+ areaCode,
117
+ buyNow,
118
+ id,
119
+ orderType,
120
+ requestHeaders,
121
+ } = { requestHeaders: {} },
114
122
  { responseHeaders } = { responseHeaders: false }
115
123
  ) {
116
124
  const query_params = {};
@@ -122,6 +130,7 @@ class Cart {
122
130
  query_params["order_type"] = orderType;
123
131
 
124
132
  const xHeaders = {};
133
+ xHeaders["x-ordering-source"] = xOrderingSource;
125
134
 
126
135
  const response = await ApplicationAPIClient.execute(
127
136
  this._conf,
@@ -153,7 +162,7 @@ class Cart {
153
162
  * @description: Apply a coupon code to the cart to trigger discounts on eligible items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyCoupon/).
154
163
  */
155
164
  async applyCoupon(
156
- { body, i, b, p, id, buyNow, cartType, requestHeaders } = {
165
+ { body, xOrderingSource, i, b, p, id, buyNow, cartType, requestHeaders } = {
157
166
  requestHeaders: {},
158
167
  },
159
168
  { responseHeaders } = { responseHeaders: false }
@@ -167,6 +176,7 @@ class Cart {
167
176
  query_params["cart_type"] = cartType;
168
177
 
169
178
  const xHeaders = {};
179
+ xHeaders["x-ordering-source"] = xOrderingSource;
170
180
 
171
181
  const response = await ApplicationAPIClient.execute(
172
182
  this._conf,
@@ -198,7 +208,9 @@ class Cart {
198
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://partners.fynd.com/help/docs/sdk/application/cart/applyRewardPoints/).
199
209
  */
200
210
  async applyRewardPoints(
201
- { body, id, i, b, buyNow, requestHeaders } = { requestHeaders: {} },
211
+ { body, xOrderingSource, id, i, b, buyNow, requestHeaders } = {
212
+ requestHeaders: {},
213
+ },
202
214
  { responseHeaders } = { responseHeaders: false }
203
215
  ) {
204
216
  const query_params = {};
@@ -208,6 +220,7 @@ class Cart {
208
220
  query_params["buy_now"] = buyNow;
209
221
 
210
222
  const xHeaders = {};
223
+ xHeaders["x-ordering-source"] = xOrderingSource;
211
224
 
212
225
  const response = await ApplicationAPIClient.execute(
213
226
  this._conf,
@@ -239,7 +252,9 @@ class Cart {
239
252
  * @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/).
240
253
  */
241
254
  async checkoutCart(
242
- { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
255
+ { body, xOrderingSource, buyNow, cartType, requestHeaders } = {
256
+ requestHeaders: {},
257
+ },
243
258
  { responseHeaders } = { responseHeaders: false }
244
259
  ) {
245
260
  const query_params = {};
@@ -247,6 +262,7 @@ class Cart {
247
262
  query_params["cart_type"] = cartType;
248
263
 
249
264
  const xHeaders = {};
265
+ xHeaders["x-ordering-source"] = xOrderingSource;
250
266
 
251
267
  const response = await ApplicationAPIClient.execute(
252
268
  this._conf,
@@ -278,7 +294,9 @@ class Cart {
278
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://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
279
295
  */
280
296
  async checkoutCartV2(
281
- { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
297
+ { body, xOrderingSource, buyNow, cartType, requestHeaders } = {
298
+ requestHeaders: {},
299
+ },
282
300
  { responseHeaders } = { responseHeaders: false }
283
301
  ) {
284
302
  const query_params = {};
@@ -286,6 +304,7 @@ class Cart {
286
304
  query_params["cart_type"] = cartType;
287
305
 
288
306
  const xHeaders = {};
307
+ xHeaders["x-ordering-source"] = xOrderingSource;
289
308
 
290
309
  const response = await ApplicationAPIClient.execute(
291
310
  this._conf,
@@ -509,6 +528,7 @@ class Cart {
509
528
  */
510
529
  async getCart(
511
530
  {
531
+ xOrderingSource,
512
532
  id,
513
533
  i,
514
534
  b,
@@ -532,6 +552,7 @@ class Cart {
532
552
  query_params["order_type"] = orderType;
533
553
 
534
554
  const xHeaders = {};
555
+ xHeaders["x-ordering-source"] = xOrderingSource;
535
556
 
536
557
  const response = await ApplicationAPIClient.execute(
537
558
  this._conf,
@@ -684,13 +705,15 @@ class Cart {
684
705
  * @description: List all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCoupons/).
685
706
  */
686
707
  async getCoupons(
687
- { id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
708
+ { id, buyNow, productSlug, storeId, requestHeaders } = {
709
+ requestHeaders: {},
710
+ },
688
711
  { responseHeaders } = { responseHeaders: false }
689
712
  ) {
690
713
  const query_params = {};
691
714
  query_params["id"] = id;
692
715
  query_params["buy_now"] = buyNow;
693
- query_params["slug"] = slug;
716
+ query_params["product_slug"] = productSlug;
694
717
  query_params["store_id"] = storeId;
695
718
 
696
719
  const xHeaders = {};
@@ -981,7 +1004,7 @@ class Cart {
981
1004
  * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeCoupon/).
982
1005
  */
983
1006
  async removeCoupon(
984
- { id, buyNow, requestHeaders } = { requestHeaders: {} },
1007
+ { xOrderingSource, id, buyNow, requestHeaders } = { requestHeaders: {} },
985
1008
  { responseHeaders } = { responseHeaders: false }
986
1009
  ) {
987
1010
  const query_params = {};
@@ -989,6 +1012,7 @@ class Cart {
989
1012
  query_params["buy_now"] = buyNow;
990
1013
 
991
1014
  const xHeaders = {};
1015
+ xHeaders["x-ordering-source"] = xOrderingSource;
992
1016
 
993
1017
  const response = await ApplicationAPIClient.execute(
994
1018
  this._conf,
@@ -1020,7 +1044,9 @@ class Cart {
1020
1044
  * @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/).
1021
1045
  */
1022
1046
  async selectAddress(
1023
- { body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
1047
+ { body, xOrderingSource, cartId, buyNow, i, b, requestHeaders } = {
1048
+ requestHeaders: {},
1049
+ },
1024
1050
  { responseHeaders } = { responseHeaders: false }
1025
1051
  ) {
1026
1052
  const query_params = {};
@@ -1030,6 +1056,7 @@ class Cart {
1030
1056
  query_params["b"] = b;
1031
1057
 
1032
1058
  const xHeaders = {};
1059
+ xHeaders["x-ordering-source"] = xOrderingSource;
1033
1060
 
1034
1061
  const response = await ApplicationAPIClient.execute(
1035
1062
  this._conf,
@@ -1061,7 +1088,9 @@ class Cart {
1061
1088
  * @description: Select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectPaymentMode/).
1062
1089
  */
1063
1090
  async selectPaymentMode(
1064
- { body, id, buyNow, requestHeaders } = { requestHeaders: {} },
1091
+ { body, xOrderingSource, id, buyNow, requestHeaders } = {
1092
+ requestHeaders: {},
1093
+ },
1065
1094
  { responseHeaders } = { responseHeaders: false }
1066
1095
  ) {
1067
1096
  const query_params = {};
@@ -1069,6 +1098,7 @@ class Cart {
1069
1098
  query_params["buy_now"] = buyNow;
1070
1099
 
1071
1100
  const xHeaders = {};
1101
+ xHeaders["x-ordering-source"] = xOrderingSource;
1072
1102
 
1073
1103
  const response = await ApplicationAPIClient.execute(
1074
1104
  this._conf,
@@ -1148,6 +1178,7 @@ class Cart {
1148
1178
  async updateCart(
1149
1179
  {
1150
1180
  body,
1181
+ xOrderingSource,
1151
1182
  id,
1152
1183
  i,
1153
1184
  b,
@@ -1169,6 +1200,7 @@ class Cart {
1169
1200
  query_params["order_type"] = orderType;
1170
1201
 
1171
1202
  const xHeaders = {};
1203
+ xHeaders["x-ordering-source"] = xOrderingSource;
1172
1204
 
1173
1205
  const response = await ApplicationAPIClient.execute(
1174
1206
  this._conf,
@@ -1200,7 +1232,7 @@ class Cart {
1200
1232
  * @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartBreakup/).
1201
1233
  */
1202
1234
  async updateCartBreakup(
1203
- { body, id, i, b, buyNow, cartType, requestHeaders } = {
1235
+ { body, xOrderingSource, id, i, b, buyNow, cartType, requestHeaders } = {
1204
1236
  requestHeaders: {},
1205
1237
  },
1206
1238
  { responseHeaders } = { responseHeaders: false }
@@ -1213,6 +1245,7 @@ class Cart {
1213
1245
  query_params["cart_type"] = cartType;
1214
1246
 
1215
1247
  const xHeaders = {};
1248
+ xHeaders["x-ordering-source"] = xOrderingSource;
1216
1249
 
1217
1250
  const response = await ApplicationAPIClient.execute(
1218
1251
  this._conf,
@@ -1330,6 +1363,7 @@ class Cart {
1330
1363
  */
1331
1364
  async validateCouponForPayment(
1332
1365
  {
1366
+ xOrderingSource,
1333
1367
  id,
1334
1368
  buyNow,
1335
1369
  addressId,
@@ -1361,6 +1395,7 @@ class Cart {
1361
1395
  query_params["cart_type"] = cartType;
1362
1396
 
1363
1397
  const xHeaders = {};
1398
+ xHeaders["x-ordering-source"] = xOrderingSource;
1364
1399
 
1365
1400
  const response = await ApplicationAPIClient.execute(
1366
1401
  this._conf,
@@ -42,7 +42,7 @@ declare class Cart {
42
42
  * @summary: Apply coupon
43
43
  * @description: Apply a coupon code to the customer's cart to trigger discounts on eligible items - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/applyCoupon/).
44
44
  */
45
- applyCoupon({ body, i, b, p, id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.ApplyCouponParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
45
+ applyCoupon({ body, xOrderingSource, i, b, p, id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.ApplyCouponParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
46
46
  /**
47
47
  * @param {CartPlatformApplicationValidator.CheckCartServiceabilityParam} arg
48
48
  * - Arg object
@@ -55,7 +55,7 @@ declare class Cart {
55
55
  * @summary: Check cart serviceability
56
56
  * @description: Verify the serviceability of items in the cart at a specific pin code and ensure accurate delivery promises. System checks each item's availability and delivery feasibility, providing real-time information on serviceability and estimated delivery times. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkCartServiceability/).
57
57
  */
58
- checkCartServiceability({ body, requestHeaders }?: CartPlatformApplicationValidator.CheckCartServiceabilityParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenApiCartServiceabilityResult>;
58
+ checkCartServiceability({ body, xOrderingSource, requestHeaders }?: CartPlatformApplicationValidator.CheckCartServiceabilityParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenApiCartServiceabilityResult>;
59
59
  /**
60
60
  * @param {CartPlatformApplicationValidator.CheckoutCartParam} arg - Arg object
61
61
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -65,7 +65,7 @@ declare class Cart {
65
65
  * @summary: Checkout cart
66
66
  * @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/platform/cart/checkoutCart/).
67
67
  */
68
- checkoutCart({ body, requestHeaders }?: CartPlatformApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenApiCheckoutResult>;
68
+ checkoutCart({ body, xOrderingSource, requestHeaders }?: CartPlatformApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenApiCheckoutResult>;
69
69
  /**
70
70
  * @param {CartPlatformApplicationValidator.CreateCartMetaConfigParam} arg
71
71
  * - Arg object
@@ -139,7 +139,7 @@ declare class Cart {
139
139
  * @summary: Get and validate cart items
140
140
  * @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchAndvalidateCartItems/).
141
141
  */
142
- fetchAndvalidateCartItems({ body, requestHeaders }?: CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenapiCartDetailsResult>;
142
+ fetchAndvalidateCartItems({ body, xOrderingSource, requestHeaders }?: CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenapiCartDetailsResult>;
143
143
  /**
144
144
  * @param {CartPlatformApplicationValidator.FetchCartMetaConfigParam} arg - Arg object
145
145
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -224,7 +224,7 @@ declare class Cart {
224
224
  * @summary: Get a cart
225
225
  * @description: Retrieve details of a cart linked to a specific customer using either the customer's ID or a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCart/).
226
226
  */
227
- getCart({ id, userId, orderType, i, b, assignCardId, buyNow, requestHeaders }?: CartPlatformApplicationValidator.GetCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
227
+ getCart({ xOrderingSource, id, userId, orderType, i, b, assignCardId, buyNow, requestHeaders, }?: CartPlatformApplicationValidator.GetCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
228
228
  /**
229
229
  * @param {CartPlatformApplicationValidator.GetCartListParam} arg - Arg object
230
230
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -416,7 +416,7 @@ declare class Cart {
416
416
  * @summary: Update cart checkout
417
417
  * @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/overrideCart/).
418
418
  */
419
- overrideCart({ body, requestHeaders }?: CartPlatformApplicationValidator.OverrideCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OverrideCheckoutResult>;
419
+ overrideCart({ body, xOrderingSource, requestHeaders }?: CartPlatformApplicationValidator.OverrideCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OverrideCheckoutResult>;
420
420
  /**
421
421
  * @param {CartPlatformApplicationValidator.PlatformAddItemsParam} arg - Arg object
422
422
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -426,7 +426,7 @@ declare class Cart {
426
426
  * @summary: Add items to cart
427
427
  * @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformAddItems/).
428
428
  */
429
- platformAddItems({ body, i, b, buyNow, orderType, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformAddItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.AddCartDetailResult>;
429
+ platformAddItems({ body, xOrderingSource, i, b, buyNow, orderType, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformAddItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.AddCartDetailResult>;
430
430
  /**
431
431
  * @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg
432
432
  * - Arg object
@@ -438,7 +438,7 @@ declare class Cart {
438
438
  * @summary: Checkout cart
439
439
  * @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/platform/cart/platformCheckoutCart/).
440
440
  */
441
- platformCheckoutCart({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutResult>;
441
+ platformCheckoutCart({ body, xOrderingSource, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutResult>;
442
442
  /**
443
443
  * @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg
444
444
  * - Arg object
@@ -450,7 +450,7 @@ declare class Cart {
450
450
  * @summary: Checkout cart
451
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://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/).
452
452
  */
453
- platformCheckoutCartV2({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutDetails>;
453
+ platformCheckoutCartV2({ body, xOrderingSource, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutDetails>;
454
454
  /**
455
455
  * @param {CartPlatformApplicationValidator.PlatformUpdateCartParam} arg - Arg object
456
456
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -460,7 +460,7 @@ declare class Cart {
460
460
  * @summary: Update cart items
461
461
  * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformUpdateCart/).
462
462
  */
463
- platformUpdateCart({ body, id, i, orderType, b, buyNow, requestHeaders }?: CartPlatformApplicationValidator.PlatformUpdateCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.UpdateCartDetailResult>;
463
+ platformUpdateCart({ body, xOrderingSource, id, i, orderType, b, buyNow, requestHeaders }?: CartPlatformApplicationValidator.PlatformUpdateCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.UpdateCartDetailResult>;
464
464
  /**
465
465
  * @param {CartPlatformApplicationValidator.RemoveAddressParam} arg - Arg object
466
466
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -480,7 +480,7 @@ declare class Cart {
480
480
  * @summary: Remove coupon
481
481
  * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeCoupon/).
482
482
  */
483
- removeCoupon({ uid, buyNow, requestHeaders }?: CartPlatformApplicationValidator.RemoveCouponParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
483
+ removeCoupon({ xOrderingSource, uid, buyNow, requestHeaders }?: CartPlatformApplicationValidator.RemoveCouponParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
484
484
  /**
485
485
  * @param {CartPlatformApplicationValidator.RemovePriceAdjustmentParam} arg
486
486
  * - Arg object
@@ -502,7 +502,7 @@ declare class Cart {
502
502
  * @summary: Select customer address for order processing
503
503
  * @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/platform/cart/selectAddress/).
504
504
  */
505
- selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: CartPlatformApplicationValidator.SelectAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
505
+ selectAddress({ body, xOrderingSource, cartId, buyNow, i, b, requestHeaders }?: CartPlatformApplicationValidator.SelectAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
506
506
  /**
507
507
  * @param {CartPlatformApplicationValidator.SelectPaymentModeParam} arg - Arg object
508
508
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -512,7 +512,7 @@ declare class Cart {
512
512
  * @summary: Select payment mode
513
513
  * @description: Customers can select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentMode/).
514
514
  */
515
- selectPaymentMode({ body, id, buyNow, orderType, requestHeaders }?: CartPlatformApplicationValidator.SelectPaymentModeParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
515
+ selectPaymentMode({ body, xOrderingSource, id, buyNow, orderType, requestHeaders }?: CartPlatformApplicationValidator.SelectPaymentModeParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
516
516
  /**
517
517
  * @param {CartPlatformApplicationValidator.SelectPaymentModeV2Param} arg - Arg object
518
518
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -522,7 +522,7 @@ declare class Cart {
522
522
  * @summary: Select payment mode (latest)
523
523
  * @description: Selection of payment mode that supports multiple MOP(mode of payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentModeV2/).
524
524
  */
525
- selectPaymentModeV2({ body, id, buyNow, orderType, requestHeaders }?: CartPlatformApplicationValidator.SelectPaymentModeV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
525
+ selectPaymentModeV2({ body, xOrderingSource, id, buyNow, orderType, requestHeaders }?: CartPlatformApplicationValidator.SelectPaymentModeV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResult>;
526
526
  /**
527
527
  * @param {CartPlatformApplicationValidator.UpdateAddressParam} arg - Arg object
528
528
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -665,7 +665,7 @@ declare class Cart {
665
665
  * @summary: Validate applied coupon
666
666
  * @description: Validates the applicability of a coupon code for the selected payment mode for the existing cart. This ensures the coupon's validity before proceeding with the payment process, enhancing user experience and preventing potential errors during transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/validateCouponForPayment/).
667
667
  */
668
- validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, requestHeaders, }?: CartPlatformApplicationValidator.ValidateCouponForPaymentParam, { responseHeaders }?: object): Promise<CartPlatformModel.PaymentCouponValidate>;
668
+ validateCouponForPayment({ xOrderingSource, id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, requestHeaders, }?: CartPlatformApplicationValidator.ValidateCouponForPaymentParam, { responseHeaders }?: object): Promise<CartPlatformModel.PaymentCouponValidate>;
669
669
  }
670
670
  import CartPlatformApplicationValidator = require("./CartPlatformApplicationValidator");
671
671
  import CartPlatformModel = require("./CartPlatformModel");