@gofynd/fdk-client-javascript 1.4.11 → 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 (43) 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/Content/ContentApplicationModel.d.ts +3 -2
  10. package/sdk/application/Content/ContentApplicationModel.js +5 -2
  11. package/sdk/application/Logistic/LogisticApplicationModel.js +3 -3
  12. package/sdk/application/Order/OrderApplicationModel.js +1 -1
  13. package/sdk/application/Payment/PaymentApplicationModel.js +2 -2
  14. package/sdk/application/Theme/ThemeApplicationModel.d.ts +3 -2
  15. package/sdk/application/Theme/ThemeApplicationModel.js +5 -2
  16. package/sdk/common/Clickstream.js +46 -15
  17. package/sdk/common/Constant.d.ts +5 -0
  18. package/sdk/common/Constant.js +5 -0
  19. package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
  20. package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
  21. package/sdk/partner/Webhook/WebhookPartnerModel.js +1 -1
  22. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +8 -20
  23. package/sdk/platform/Cart/CartPlatformApplicationClient.js +8 -92
  24. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +1 -15
  25. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +0 -14
  26. package/sdk/platform/Cart/CartPlatformModel.d.ts +1 -87
  27. package/sdk/platform/Cart/CartPlatformModel.js +0 -88
  28. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +10 -51
  29. package/sdk/platform/Catalog/CatalogPlatformClient.js +79 -400
  30. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8 -242
  31. package/sdk/platform/Catalog/CatalogPlatformModel.js +8 -171
  32. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -61
  33. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -65
  34. package/sdk/platform/Content/ContentPlatformModel.d.ts +3 -2
  35. package/sdk/platform/Content/ContentPlatformModel.js +5 -2
  36. package/sdk/platform/Finance/FinancePlatformModel.js +1 -1
  37. package/sdk/platform/Order/OrderPlatformModel.d.ts +30 -0
  38. package/sdk/platform/Order/OrderPlatformModel.js +23 -9
  39. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +38 -4
  40. package/sdk/platform/Payment/PaymentPlatformModel.js +17 -7
  41. package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
  42. package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
  43. package/sdk/platform/Webhook/WebhookPlatformModel.js +1 -1
@@ -40,13 +40,6 @@ const CartApplicationModel = require("./CartApplicationModel");
40
40
  * @property {CartApplicationModel.RewardPointRequest} body
41
41
  */
42
42
 
43
- /**
44
- * @typedef CheckoutCartParam
45
- * @property {boolean} [buyNow] - This indicates the type of cart to checkout.
46
- * @property {string} [cartType] - The type of cart.
47
- * @property {CartApplicationModel.CartCheckoutDetailRequest} body
48
- */
49
-
50
43
  /**
51
44
  * @typedef CheckoutCartV2Param
52
45
  * @property {boolean} [buyNow] - This indicates the type of cart to checkout.
@@ -296,15 +289,6 @@ class CartApplicationValidator {
296
289
  }).required();
297
290
  }
298
291
 
299
- /** @returns {CheckoutCartParam} */
300
- static checkoutCart() {
301
- return Joi.object({
302
- buyNow: Joi.boolean(),
303
- cartType: Joi.string().allow(""),
304
- body: CartApplicationModel.CartCheckoutDetailRequest().required(),
305
- }).required();
306
- }
307
-
308
292
  /** @returns {CheckoutCartV2Param} */
309
293
  static checkoutCartV2() {
310
294
  return Joi.object({
@@ -634,7 +634,8 @@ export = ContentApplicationModel;
634
634
  * | "register"
635
635
  * | "shipping-policy"
636
636
  * | "return-policy"
637
- * | "order-status"} PageType
637
+ * | "order-status"
638
+ * | "locate-us"} PageType
638
639
  */
639
640
  declare class ContentApplicationModel {
640
641
  }
@@ -2129,4 +2130,4 @@ type ActionPage = {
2129
2130
  * @returns {PageType}
2130
2131
  */
2131
2132
  declare function PageType(): PageType;
2132
- type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status";
2133
+ type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us";
@@ -707,7 +707,8 @@ const Joi = require("joi");
707
707
  * | "register"
708
708
  * | "shipping-policy"
709
709
  * | "return-policy"
710
- * | "order-status"} PageType
710
+ * | "order-status"
711
+ * | "locate-us"} PageType
711
712
  */
712
713
 
713
714
  class ContentApplicationModel {
@@ -1579,7 +1580,9 @@ class ContentApplicationModel {
1579
1580
 
1580
1581
  "return-policy",
1581
1582
 
1582
- "order-status"
1583
+ "order-status",
1584
+
1585
+ "locate-us"
1583
1586
  );
1584
1587
  }
1585
1588
  }
@@ -964,7 +964,7 @@ class LogisticApplicationModel {
964
964
  return Joi.object({
965
965
  operation_id: Joi.string().allow(""),
966
966
  params: LogisticApplicationModel.GetOneOrAllParams(),
967
- });
967
+ }).allow(null);
968
968
  }
969
969
 
970
970
  /** @returns {LengthValidation} */
@@ -988,7 +988,7 @@ class LogisticApplicationModel {
988
988
  return Joi.object({
989
989
  type: Joi.string().allow(""),
990
990
  regex: LogisticApplicationModel.FieldValidationRegex(),
991
- });
991
+ }).allow(null);
992
992
  }
993
993
 
994
994
  /** @returns {GetCountryFieldsAddressValues} */
@@ -996,7 +996,7 @@ class LogisticApplicationModel {
996
996
  return Joi.object({
997
997
  get_one: LogisticApplicationModel.GetOneOrAll(),
998
998
  get_all: LogisticApplicationModel.GetOneOrAll(),
999
- });
999
+ }).allow(null);
1000
1000
  }
1001
1001
 
1002
1002
  /** @returns {GetCountryFieldsAddress} */
@@ -1016,7 +1016,7 @@ class OrderApplicationModel {
1016
1016
  static Article() {
1017
1017
  return Joi.object({
1018
1018
  tags: Joi.array().items(Joi.string().allow("")),
1019
- });
1019
+ }).allow(null);
1020
1020
  }
1021
1021
 
1022
1022
  /** @returns {Address} */
@@ -1597,7 +1597,7 @@ class PaymentApplicationModel {
1597
1597
  .items(Joi.string().allow("").allow(null))
1598
1598
  .allow(null, ""),
1599
1599
  allow_custom_advance_amount: Joi.boolean().allow(null),
1600
- });
1600
+ }).allow(null);
1601
1601
  }
1602
1602
 
1603
1603
  /** @returns {SplitObject} */
@@ -1606,7 +1606,7 @@ class PaymentApplicationModel {
1606
1606
  total_number_of_splits: Joi.number().allow(null),
1607
1607
  splits_remaining: Joi.number().allow(null),
1608
1608
  amount_remaining: Joi.number().allow(null),
1609
- });
1609
+ }).allow(null);
1610
1610
  }
1611
1611
 
1612
1612
  /** @returns {AdvancePaymentObject} */
@@ -549,7 +549,8 @@ export = ThemeApplicationModel;
549
549
  * | "register"
550
550
  * | "shipping-policy"
551
551
  * | "return-policy"
552
- * | "order-status"} PageType
552
+ * | "order-status"
553
+ * | "locate-us"} PageType
553
554
  */
554
555
  declare class ThemeApplicationModel {
555
556
  }
@@ -1709,4 +1710,4 @@ type ActionPage = {
1709
1710
  * @returns {PageType}
1710
1711
  */
1711
1712
  declare function PageType(): PageType;
1712
- type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status";
1713
+ type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us";
@@ -621,7 +621,8 @@ const Joi = require("joi");
621
621
  * | "register"
622
622
  * | "shipping-policy"
623
623
  * | "return-policy"
624
- * | "order-status"} PageType
624
+ * | "order-status"
625
+ * | "locate-us"} PageType
625
626
  */
626
627
 
627
628
  class ThemeApplicationModel {
@@ -1416,7 +1417,9 @@ class ThemeApplicationModel {
1416
1417
 
1417
1418
  "return-policy",
1418
1419
 
1419
- "order-status"
1420
+ "order-status",
1421
+
1422
+ "locate-us"
1420
1423
  );
1421
1424
  }
1422
1425
  }
@@ -20,40 +20,59 @@ const sg = function safeGet(fn, defaultValue = null) {
20
20
  * Safely extracts search query and click position
21
21
  *
22
22
  * @author Hitendra Singh
23
- * @param {Object} [defaultValue] - Utm_params
24
- * @returns {Object} - Query and position
23
+ * @property {string | null} query - Extracted search query if available, otherwise null
24
+ * @property {string | null} position - Click position from the decoded UTM
25
+ * content, otherwise null
26
+ * @property {string | null} utm_medium - The medium of the UTM (e.g.,
27
+ * 'product_recommendation'), otherwise null
28
+ * @property {string | null} utm_source - The source of the UTM (e.g.,
29
+ * 'product_page'), otherwise null
30
+ * @property {string | null} utm_campaign - The campaign of the UTM (e.g.,
31
+ * 'trending_products'), otherwise null
32
+ * @param {Object} [utm_params] - Object containing UTM parameters (utm_medium,
33
+ * utm_source, utm_campaign, utm_content)
34
+ * @returns {Object} - An object with the following properties:
25
35
  */
26
36
  const fetchPositionAndQuery = function (utm_params) {
27
37
  if (!utm_params || !Object.keys(utm_params).length) {
28
38
  return {
29
39
  query: null,
30
40
  position: null,
41
+ utm_medium: null,
42
+ utm_source: null,
43
+ utm_campaign: null,
31
44
  };
32
45
  }
33
46
 
34
- if (utm_params.utm_medium === "search") {
47
+ const {
48
+ utm_medium = null,
49
+ utm_source = null,
50
+ utm_campaign = null,
51
+ } = utm_params;
52
+ let query = null;
53
+ let position = null;
54
+ const queryResult = {
55
+ query,
56
+ position,
57
+ utm_medium,
58
+ utm_source,
59
+ utm_campaign,
60
+ };
61
+ if (utm_medium === "search") {
35
62
  try {
36
63
  const decodedUri = utm_params.utm_content
37
64
  ? atob(utm_params.utm_content)
38
65
  : null;
39
66
  if (decodedUri) {
40
67
  const parts = decodedUri.split(":::");
41
- return {
42
- query: parts[0] || null,
43
- position: parts[1] || null,
44
- };
68
+ queryResult.query = parts[0] || null;
69
+ queryResult.position = parts[1] || null;
45
70
  }
46
71
  } catch (err) {
47
- return {
48
- query: null,
49
- position: null,
50
- };
72
+ return queryResult;
51
73
  }
52
74
  }
53
- return {
54
- query: null,
55
- position: null,
56
- };
75
+ return queryResult;
57
76
  };
58
77
  /**
59
78
  * Safely extracts company details from window object
@@ -331,6 +350,10 @@ if (typeof window != "undefined") {
331
350
 
332
351
  window.FPI.event.on("product_list.view", (eventData) => {
333
352
  Logger({ level: "DEBUG", message: eventData });
353
+ if (eventData.user && eventData.user.user_id) {
354
+ //re identify user if the payload contains user id
355
+ Clickstream.identify(eventData.user.user_id, {}, false);
356
+ }
334
357
  Clickstream.sendEvent("product_listing", {
335
358
  event_type: "impression",
336
359
  query: sg(() => eventData.slug["q"]),
@@ -353,6 +376,10 @@ if (typeof window != "undefined") {
353
376
 
354
377
  window.FPI.event.on("product.view", (eventData) => {
355
378
  Logger({ level: "DEBUG", message: eventData });
379
+ if (eventData.user && eventData.user.user_id) {
380
+ //re identify user if the payload contains user id
381
+ Clickstream.identify(eventData.user.user_id, {}, false);
382
+ }
356
383
  const payload = {
357
384
  event_type: "click",
358
385
  product_id: sg(() => eventData.product["uid"]),
@@ -391,6 +418,10 @@ if (typeof window != "undefined") {
391
418
  };
392
419
  //filter eventData.data to find the products array and item total
393
420
  let products = [];
421
+ if (eventData.user && eventData.user.user_id) {
422
+ //re identify user if the payload contains user id
423
+ Clickstream.identify(eventData.user.user_id, {}, false);
424
+ }
394
425
  if (eventData.data && eventData.data.length > 0) {
395
426
  products = eventData.data
396
427
  .filter((item) => {
@@ -46,6 +46,7 @@ export namespace AVAILABLE_PAGE_TYPE {
46
46
  const SHIPPING_POLICY: string;
47
47
  const RETURN_POLICY: string;
48
48
  const ORDER_STATUS: string;
49
+ const LOCATE_US: string;
49
50
  }
50
51
  export const NAVIGATORS: {
51
52
  "about-us": {
@@ -296,4 +297,8 @@ export const NAVIGATORS: {
296
297
  name: string;
297
298
  link: string;
298
299
  };
300
+ "locate-us": {
301
+ name: string;
302
+ link: string;
303
+ };
299
304
  };
@@ -46,6 +46,7 @@ const AVAILABLE_PAGE_TYPE = {
46
46
  SHIPPING_POLICY: "shipping-policy",
47
47
  RETURN_POLICY: "return-policy",
48
48
  ORDER_STATUS: "order-status",
49
+ LOCATE_US: "locate-us",
49
50
  };
50
51
 
51
52
  Object.freeze(AVAILABLE_PAGE_TYPE);
@@ -329,6 +330,10 @@ const NAVIGATORS = {
329
330
  name: "Order status",
330
331
  link: "/cart/order-status",
331
332
  },
333
+ "locate-us": {
334
+ name: "Locate us",
335
+ link: "/locate-us",
336
+ },
332
337
  };
333
338
 
334
339
  module.exports = {
@@ -650,7 +650,8 @@ export = ThemePartnerModel;
650
650
  * | "register"
651
651
  * | "shipping-policy"
652
652
  * | "return-policy"
653
- * | "order-status"} PageType
653
+ * | "order-status"
654
+ * | "locate-us"} PageType
654
655
  */
655
656
  declare class ThemePartnerModel {
656
657
  }
@@ -1835,4 +1836,4 @@ type ActionPage = {
1835
1836
  * @returns {PageType}
1836
1837
  */
1837
1838
  declare function PageType(): PageType;
1838
- type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status";
1839
+ type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us";
@@ -739,7 +739,8 @@ const Joi = require("joi");
739
739
  * | "register"
740
740
  * | "shipping-policy"
741
741
  * | "return-policy"
742
- * | "order-status"} PageType
742
+ * | "order-status"
743
+ * | "locate-us"} PageType
743
744
  */
744
745
 
745
746
  class ThemePartnerModel {
@@ -1717,7 +1718,9 @@ class ThemePartnerModel {
1717
1718
 
1718
1719
  "return-policy",
1719
1720
 
1720
- "order-status"
1721
+ "order-status",
1722
+
1723
+ "locate-us"
1721
1724
  );
1722
1725
  }
1723
1726
  }
@@ -382,7 +382,7 @@ class WebhookPartnerModel {
382
382
  static UploadServiceObject() {
383
383
  return Joi.object({
384
384
  cdn: WebhookPartnerModel.CdnObject(),
385
- });
385
+ }).allow(null);
386
386
  }
387
387
 
388
388
  /** @returns {HistoryAssociation} */
@@ -9,7 +9,7 @@ declare class Cart {
9
9
  * @param {import("../PlatformAPIClient").Options} - Options
10
10
  * @returns {Promise<CartPlatformModel.SaveAddressResponse>} - Success response
11
11
  * @name addAddress
12
- * @summary: Create a new address
12
+ * @summary: Creates a new address for a customer
13
13
  * @description: Customers can 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/platform/cart/addAddress/).
14
14
  */
15
15
  addAddress({ body, requestHeaders }?: CartPlatformApplicationValidator.AddAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.SaveAddressResponse>;
@@ -159,7 +159,7 @@ declare class Cart {
159
159
  * @param {import("../PlatformAPIClient").Options} - Options
160
160
  * @returns {Promise<CartPlatformModel.PlatformAddress>} - Success response
161
161
  * @name getAddressById
162
- * @summary: Get a address
162
+ * @summary: Get details for a single customer address
163
163
  * @description: Retrieve 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/platform/cart/getAddressById/).
164
164
  */
165
165
  getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId, requestHeaders, }?: CartPlatformApplicationValidator.GetAddressByIdParam, { responseHeaders }?: object): Promise<CartPlatformModel.PlatformAddress>;
@@ -170,7 +170,7 @@ declare class Cart {
170
170
  * @returns {Promise<CartPlatformModel.PlatformGetAddressesResponse>} -
171
171
  * Success response
172
172
  * @name getAddresses
173
- * @summary: List customer addresses
173
+ * @summary: Get a list of addresses for a customer
174
174
  * @description: Retrieves a list of 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/platform/cart/getAddresses/).
175
175
  */
176
176
  getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId, requestHeaders, }?: CartPlatformApplicationValidator.GetAddressesParam, { responseHeaders }?: object): Promise<CartPlatformModel.PlatformGetAddressesResponse>;
@@ -408,18 +408,6 @@ declare class Cart {
408
408
  * @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/).
409
409
  */
410
410
  platformAddItems({ body, i, b, buyNow, orderType, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformAddItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.AddCartDetailResponse>;
411
- /**
412
- * @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg
413
- * - Arg object
414
- *
415
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
416
- * @param {import("../PlatformAPIClient").Options} - Options
417
- * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
418
- * @name platformCheckoutCart
419
- * @summary: Checkout cart
420
- * @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/).
421
- */
422
- platformCheckoutCart({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutResponse>;
423
411
  /**
424
412
  * @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg
425
413
  * - Arg object
@@ -428,8 +416,8 @@ declare class Cart {
428
416
  * @param {import("../PlatformAPIClient").Options} - Options
429
417
  * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
430
418
  * @name platformCheckoutCartV2
431
- * @summary: Cart checkout (latest)
432
- * @description: Checkout process that supports multiple MOP(mode of payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/).
419
+ * @summary: Checkout cart
420
+ * @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/).
433
421
  */
434
422
  platformCheckoutCartV2({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutResponse>;
435
423
  /**
@@ -448,7 +436,7 @@ declare class Cart {
448
436
  * @param {import("../PlatformAPIClient").Options} - Options
449
437
  * @returns {Promise<CartPlatformModel.DeleteAddressResponse>} - Success response
450
438
  * @name removeAddress
451
- * @summary: Delete a address
439
+ * @summary: Removes an address from a customer's address list
452
440
  * @description: Remove an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeAddress/).
453
441
  */
454
442
  removeAddress({ id, userId, requestHeaders }?: CartPlatformApplicationValidator.RemoveAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.DeleteAddressResponse>;
@@ -480,7 +468,7 @@ declare class Cart {
480
468
  * @param {import("../PlatformAPIClient").Options} - Options
481
469
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
482
470
  * @name selectAddress
483
- * @summary: select a delivery address
471
+ * @summary: Select customer address for order processing
484
472
  * @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/).
485
473
  */
486
474
  selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: CartPlatformApplicationValidator.SelectAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartDetailResponse>;
@@ -510,7 +498,7 @@ declare class Cart {
510
498
  * @param {import("../PlatformAPIClient").Options} - Options
511
499
  * @returns {Promise<CartPlatformModel.UpdateAddressResponse>} - Success response
512
500
  * @name updateAddress
513
- * @summary: Update address
501
+ * @summary: Updates an existing customer address
514
502
  * @description: Update the user address - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/).
515
503
  */
516
504
  updateAddress({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdateAddressParam, { responseHeaders }?: object): Promise<CartPlatformModel.UpdateAddressResponse>;
@@ -21,7 +21,7 @@ class Cart {
21
21
  * @param {import("../PlatformAPIClient").Options} - Options
22
22
  * @returns {Promise<CartPlatformModel.SaveAddressResponse>} - Success response
23
23
  * @name addAddress
24
- * @summary: Create a new address
24
+ * @summary: Creates a new address for a customer
25
25
  * @description: Customers can 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/platform/cart/addAddress/).
26
26
  */
27
27
  async addAddress(
@@ -1182,7 +1182,7 @@ class Cart {
1182
1182
  * @param {import("../PlatformAPIClient").Options} - Options
1183
1183
  * @returns {Promise<CartPlatformModel.PlatformAddress>} - Success response
1184
1184
  * @name getAddressById
1185
- * @summary: Get a address
1185
+ * @summary: Get details for a single customer address
1186
1186
  * @description: Retrieve 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/platform/cart/getAddressById/).
1187
1187
  */
1188
1188
  async getAddressById(
@@ -1293,7 +1293,7 @@ class Cart {
1293
1293
  * @returns {Promise<CartPlatformModel.PlatformGetAddressesResponse>} -
1294
1294
  * Success response
1295
1295
  * @name getAddresses
1296
- * @summary: List customer addresses
1296
+ * @summary: Get a list of addresses for a customer
1297
1297
  * @description: Retrieves a list of 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/platform/cart/getAddresses/).
1298
1298
  */
1299
1299
  async getAddresses(
@@ -3302,90 +3302,6 @@ class Cart {
3302
3302
  return response;
3303
3303
  }
3304
3304
 
3305
- /**
3306
- * @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg
3307
- * - Arg object
3308
- *
3309
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3310
- * @param {import("../PlatformAPIClient").Options} - Options
3311
- * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
3312
- * @name platformCheckoutCart
3313
- * @summary: Checkout cart
3314
- * @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/).
3315
- */
3316
- async platformCheckoutCart(
3317
- { body, id, requestHeaders } = { requestHeaders: {} },
3318
- { responseHeaders } = { responseHeaders: false }
3319
- ) {
3320
- const {
3321
- error,
3322
- } = CartPlatformApplicationValidator.platformCheckoutCart().validate(
3323
- {
3324
- body,
3325
- id,
3326
- },
3327
- { abortEarly: false, allowUnknown: true }
3328
- );
3329
- if (error) {
3330
- return Promise.reject(new FDKClientValidationError(error));
3331
- }
3332
-
3333
- // Showing warrnings if extra unknown parameters are found
3334
- const {
3335
- error: warrning,
3336
- } = CartPlatformApplicationValidator.platformCheckoutCart().validate(
3337
- {
3338
- body,
3339
- id,
3340
- },
3341
- { abortEarly: false, allowUnknown: false }
3342
- );
3343
- if (warrning) {
3344
- Logger({
3345
- level: "WARN",
3346
- message: `Parameter Validation warrnings for platform > Cart > platformCheckoutCart \n ${warrning}`,
3347
- });
3348
- }
3349
-
3350
- const query_params = {};
3351
- query_params["id"] = id;
3352
-
3353
- const response = await PlatformAPIClient.execute(
3354
- this.config,
3355
- "post",
3356
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/checkout`,
3357
- query_params,
3358
- body,
3359
- requestHeaders,
3360
- { responseHeaders }
3361
- );
3362
-
3363
- let responseData = response;
3364
- if (responseHeaders) {
3365
- responseData = response[0];
3366
- }
3367
-
3368
- const {
3369
- error: res_error,
3370
- } = CartPlatformModel.CartCheckoutResponse().validate(responseData, {
3371
- abortEarly: false,
3372
- allowUnknown: true,
3373
- });
3374
-
3375
- if (res_error) {
3376
- if (this.config.options.strictResponseCheck === true) {
3377
- return Promise.reject(new FDKResponseValidationError(res_error));
3378
- } else {
3379
- Logger({
3380
- level: "WARN",
3381
- message: `Response Validation Warnings for platform > Cart > platformCheckoutCart \n ${res_error}`,
3382
- });
3383
- }
3384
- }
3385
-
3386
- return response;
3387
- }
3388
-
3389
3305
  /**
3390
3306
  * @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg
3391
3307
  * - Arg object
@@ -3394,8 +3310,8 @@ class Cart {
3394
3310
  * @param {import("../PlatformAPIClient").Options} - Options
3395
3311
  * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
3396
3312
  * @name platformCheckoutCartV2
3397
- * @summary: Cart checkout (latest)
3398
- * @description: Checkout process that supports multiple MOP(mode of payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/).
3313
+ * @summary: Checkout cart
3314
+ * @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/).
3399
3315
  */
3400
3316
  async platformCheckoutCartV2(
3401
3317
  { body, id, requestHeaders } = { requestHeaders: {} },
@@ -3572,7 +3488,7 @@ class Cart {
3572
3488
  * @param {import("../PlatformAPIClient").Options} - Options
3573
3489
  * @returns {Promise<CartPlatformModel.DeleteAddressResponse>} - Success response
3574
3490
  * @name removeAddress
3575
- * @summary: Delete a address
3491
+ * @summary: Removes an address from a customer's address list
3576
3492
  * @description: Remove an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeAddress/).
3577
3493
  */
3578
3494
  async removeAddress(
@@ -3814,7 +3730,7 @@ class Cart {
3814
3730
  * @param {import("../PlatformAPIClient").Options} - Options
3815
3731
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
3816
3732
  * @name selectAddress
3817
- * @summary: select a delivery address
3733
+ * @summary: Select customer address for order processing
3818
3734
  * @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/).
3819
3735
  */
3820
3736
  async selectAddress(
@@ -4079,7 +3995,7 @@ class Cart {
4079
3995
  * @param {import("../PlatformAPIClient").Options} - Options
4080
3996
  * @returns {Promise<CartPlatformModel.UpdateAddressResponse>} - Success response
4081
3997
  * @name updateAddress
4082
- * @summary: Update address
3998
+ * @summary: Updates an existing customer address
4083
3999
  * @description: Update the user address - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/).
4084
4000
  */
4085
4001
  async updateAddress(
@@ -236,11 +236,6 @@ export = CartPlatformApplicationValidator;
236
236
  * @property {string} [id] - The unique identifier of the cart
237
237
  * @property {CartPlatformModel.PlatformAddCartRequest} body
238
238
  */
239
- /**
240
- * @typedef PlatformCheckoutCartParam
241
- * @property {string} [id] - The unique identifier of the cart
242
- * @property {CartPlatformModel.PlatformCartCheckoutDetailRequest} body
243
- */
244
239
  /**
245
240
  * @typedef PlatformCheckoutCartV2Param
246
241
  * @property {string} [id] - The unique identifier of the cart
@@ -460,8 +455,6 @@ declare class CartPlatformApplicationValidator {
460
455
  static overrideCart(): OverrideCartParam;
461
456
  /** @returns {PlatformAddItemsParam} */
462
457
  static platformAddItems(): PlatformAddItemsParam;
463
- /** @returns {PlatformCheckoutCartParam} */
464
- static platformCheckoutCart(): PlatformCheckoutCartParam;
465
458
  /** @returns {PlatformCheckoutCartV2Param} */
466
459
  static platformCheckoutCartV2(): PlatformCheckoutCartV2Param;
467
460
  /** @returns {PlatformUpdateCartParam} */
@@ -506,7 +499,7 @@ declare class CartPlatformApplicationValidator {
506
499
  static validateCouponForPayment(): ValidateCouponForPaymentParam;
507
500
  }
508
501
  declare namespace CartPlatformApplicationValidator {
509
- export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
502
+ export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
510
503
  }
511
504
  type AddAddressParam = {
512
505
  body: CartPlatformModel.PlatformAddress;
@@ -806,13 +799,6 @@ type PlatformAddItemsParam = {
806
799
  id?: string;
807
800
  body: CartPlatformModel.PlatformAddCartRequest;
808
801
  };
809
- type PlatformCheckoutCartParam = {
810
- /**
811
- * - The unique identifier of the cart
812
- */
813
- id?: string;
814
- body: CartPlatformModel.PlatformCartCheckoutDetailRequest;
815
- };
816
802
  type PlatformCheckoutCartV2Param = {
817
803
  /**
818
804
  * - The unique identifier of the cart