@gofynd/fdk-client-javascript 1.4.6 → 1.4.8-beta.2

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 (140) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +16 -3
  6. package/sdk/application/Cart/CartApplicationClient.js +118 -13
  7. package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
  8. package/sdk/application/Cart/CartApplicationModel.js +98 -26
  9. package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
  10. package/sdk/application/Cart/CartApplicationValidator.js +26 -0
  11. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +10 -2
  12. package/sdk/application/Catalog/CatalogApplicationModel.js +10 -2
  13. package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
  14. package/sdk/application/Content/ContentApplicationClient.js +5 -3
  15. package/sdk/application/Content/ContentApplicationModel.d.ts +7 -18
  16. package/sdk/application/Content/ContentApplicationModel.js +6 -20
  17. package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
  18. package/sdk/application/Content/ContentApplicationValidator.js +4 -0
  19. package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
  20. package/sdk/application/Lead/LeadApplicationClient.js +0 -167
  21. package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
  22. package/sdk/application/Lead/LeadApplicationModel.js +0 -126
  23. package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
  24. package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
  25. package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
  26. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
  27. package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
  28. package/sdk/application/Order/OrderApplicationModel.d.ts +72 -9
  29. package/sdk/application/Order/OrderApplicationModel.js +45 -7
  30. package/sdk/application/Payment/PaymentApplicationModel.d.ts +27 -20
  31. package/sdk/application/Payment/PaymentApplicationModel.js +23 -20
  32. package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
  33. package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
  34. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +22 -0
  35. package/sdk/application/Webhook/WebhookApplicationClient.js +115 -0
  36. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +37 -0
  37. package/sdk/application/Webhook/WebhookApplicationModel.js +46 -0
  38. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +16 -0
  39. package/sdk/application/Webhook/WebhookApplicationValidator.js +19 -0
  40. package/sdk/application/index.d.ts +1 -0
  41. package/sdk/application/index.js +2 -0
  42. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
  43. package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
  44. package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
  45. package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
  46. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
  47. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
  48. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
  49. package/sdk/partner/Logistics/LogisticsPartnerModel.js +4 -4
  50. package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
  51. package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
  52. package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
  53. package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
  54. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
  55. package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
  56. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +2 -2
  57. package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
  58. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +23 -19
  59. package/sdk/partner/Webhook/WebhookPartnerModel.js +19 -22
  60. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +43 -0
  61. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +257 -0
  62. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +39 -0
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +45 -0
  64. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +60 -0
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +57 -0
  66. package/sdk/platform/Billing/BillingPlatformClient.d.ts +304 -43
  67. package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
  68. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
  69. package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
  70. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
  71. package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
  72. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +36 -3
  73. package/sdk/platform/Cart/CartPlatformApplicationClient.js +276 -3
  74. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +93 -1
  75. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +60 -0
  76. package/sdk/platform/Cart/CartPlatformModel.d.ts +216 -40
  77. package/sdk/platform/Cart/CartPlatformModel.js +166 -24
  78. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +11 -7
  79. package/sdk/platform/Catalog/CatalogPlatformClient.js +37 -14
  80. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +122 -17
  81. package/sdk/platform/Catalog/CatalogPlatformModel.js +141 -15
  82. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -7
  83. package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -5
  84. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
  85. package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
  86. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
  87. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
  88. package/sdk/platform/Content/ContentPlatformModel.d.ts +8 -4
  89. package/sdk/platform/Content/ContentPlatformModel.js +8 -4
  90. package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
  91. package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
  92. package/sdk/platform/Finance/FinancePlatformModel.d.ts +350 -127
  93. package/sdk/platform/Finance/FinancePlatformModel.js +378 -108
  94. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
  95. package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
  96. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
  97. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
  98. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
  99. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
  100. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
  101. package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
  102. package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
  103. package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
  104. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
  105. package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
  106. package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -1
  107. package/sdk/platform/Order/OrderPlatformClient.js +82 -5
  108. package/sdk/platform/Order/OrderPlatformModel.d.ts +270 -29
  109. package/sdk/platform/Order/OrderPlatformModel.js +139 -28
  110. package/sdk/platform/Order/OrderPlatformValidator.d.ts +58 -17
  111. package/sdk/platform/Order/OrderPlatformValidator.js +28 -16
  112. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +14 -2
  113. package/sdk/platform/Payment/PaymentPlatformModel.js +7 -2
  114. package/sdk/platform/PlatformApplicationClient.d.ts +2 -0
  115. package/sdk/platform/PlatformApplicationClient.js +4 -0
  116. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -4
  117. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
  118. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
  119. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
  120. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
  121. package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
  122. package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
  123. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +24 -40
  124. package/sdk/platform/Webhook/WebhookPlatformClient.js +78 -221
  125. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +168 -167
  126. package/sdk/platform/Webhook/WebhookPlatformModel.js +180 -178
  127. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +23 -31
  128. package/sdk/platform/Webhook/WebhookPlatformValidator.js +28 -42
  129. package/sdk/platform/index.d.ts +1 -0
  130. package/sdk/platform/index.js +2 -0
  131. package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
  132. package/sdk/public/Billing/BillingPublicClient.js +156 -3
  133. package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
  134. package/sdk/public/Billing/BillingPublicModel.js +317 -18
  135. package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
  136. package/sdk/public/Billing/BillingPublicValidator.js +22 -3
  137. package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
  138. package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
  139. package/sdk/public/Webhook/WebhookPublicModel.d.ts +24 -22
  140. package/sdk/public/Webhook/WebhookPublicModel.js +24 -22
@@ -1574,7 +1574,7 @@ class Cart {
1574
1574
  * @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/).
1575
1575
  */
1576
1576
  async getCart(
1577
- { id, userId, i, b, assignCardId, buyNow, requestHeaders } = {
1577
+ { id, userId, orderType, i, b, assignCardId, buyNow, requestHeaders } = {
1578
1578
  requestHeaders: {},
1579
1579
  },
1580
1580
  { responseHeaders } = { responseHeaders: false }
@@ -1583,6 +1583,7 @@ class Cart {
1583
1583
  {
1584
1584
  id,
1585
1585
  userId,
1586
+ orderType,
1586
1587
  i,
1587
1588
  b,
1588
1589
  assignCardId,
@@ -1601,6 +1602,7 @@ class Cart {
1601
1602
  {
1602
1603
  id,
1603
1604
  userId,
1605
+ orderType,
1604
1606
  i,
1605
1607
  b,
1606
1608
  assignCardId,
@@ -1618,6 +1620,7 @@ class Cart {
1618
1620
  const query_params = {};
1619
1621
  query_params["id"] = id;
1620
1622
  query_params["user_id"] = userId;
1623
+ query_params["order_type"] = orderType;
1621
1624
  query_params["i"] = i;
1622
1625
  query_params["b"] = b;
1623
1626
  query_params["assign_card_id"] = assignCardId;
@@ -2321,6 +2324,86 @@ class Cart {
2321
2324
  return response;
2322
2325
  }
2323
2326
 
2327
+ /**
2328
+ * @param {CartPlatformApplicationValidator.GetPriceAdjustmentsParam} arg - Arg object
2329
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2330
+ * @param {import("../PlatformAPIClient").Options} - Options
2331
+ * @returns {Promise<CartPlatformModel.GetPriceAdjustmentResponse>} - Success response
2332
+ * @name getPriceAdjustments
2333
+ * @summary: Get a list of all price adjustments associated with a cart
2334
+ * @description: This API helps to get price adjustments data associated to a particular cart - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPriceAdjustments/).
2335
+ */
2336
+ async getPriceAdjustments(
2337
+ { cartId, requestHeaders } = { requestHeaders: {} },
2338
+ { responseHeaders } = { responseHeaders: false }
2339
+ ) {
2340
+ const {
2341
+ error,
2342
+ } = CartPlatformApplicationValidator.getPriceAdjustments().validate(
2343
+ {
2344
+ cartId,
2345
+ },
2346
+ { abortEarly: false, allowUnknown: true }
2347
+ );
2348
+ if (error) {
2349
+ return Promise.reject(new FDKClientValidationError(error));
2350
+ }
2351
+
2352
+ // Showing warrnings if extra unknown parameters are found
2353
+ const {
2354
+ error: warrning,
2355
+ } = CartPlatformApplicationValidator.getPriceAdjustments().validate(
2356
+ {
2357
+ cartId,
2358
+ },
2359
+ { abortEarly: false, allowUnknown: false }
2360
+ );
2361
+ if (warrning) {
2362
+ Logger({
2363
+ level: "WARN",
2364
+ message: `Parameter Validation warrnings for platform > Cart > getPriceAdjustments \n ${warrning}`,
2365
+ });
2366
+ }
2367
+
2368
+ const query_params = {};
2369
+ query_params["cart_id"] = cartId;
2370
+
2371
+ const response = await PlatformAPIClient.execute(
2372
+ this.config,
2373
+ "get",
2374
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price-adjustment`,
2375
+ query_params,
2376
+ undefined,
2377
+ requestHeaders,
2378
+ { responseHeaders }
2379
+ );
2380
+
2381
+ let responseData = response;
2382
+ if (responseHeaders) {
2383
+ responseData = response[0];
2384
+ }
2385
+
2386
+ const {
2387
+ error: res_error,
2388
+ } = CartPlatformModel.GetPriceAdjustmentResponse().validate(responseData, {
2389
+ abortEarly: false,
2390
+ allowUnknown: true,
2391
+ });
2392
+
2393
+ if (res_error) {
2394
+ if (this.config.options.strictResponseCheck === true) {
2395
+ return Promise.reject(new FDKResponseValidationError(res_error));
2396
+ } else {
2397
+ Logger({
2398
+ level: "WARN",
2399
+ message: `Response Validation Warnings for platform > Cart > getPriceAdjustments \n ${res_error}`,
2400
+ });
2401
+ }
2402
+ }
2403
+
2404
+ return response;
2405
+ }
2406
+
2324
2407
  /**
2325
2408
  * @param {CartPlatformApplicationValidator.GetPromosCouponConfigParam} arg
2326
2409
  * - Arg object
@@ -2565,6 +2648,186 @@ class Cart {
2565
2648
  return response;
2566
2649
  }
2567
2650
 
2651
+ /**
2652
+ * @param {CartPlatformApplicationValidator.GetPromotionOffersParam} arg - Arg object
2653
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2654
+ * @param {import("../PlatformAPIClient").Options} - Options
2655
+ * @returns {Promise<CartPlatformModel.PromotionOffersResponse>} - Success response
2656
+ * @name getPromotionOffers
2657
+ * @summary: List available promotion offers
2658
+ * @description: Retrieve a list of all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionOffers/).
2659
+ */
2660
+ async getPromotionOffers(
2661
+ { slug, pageSize, promotionGroup, storeId, cartType, requestHeaders } = {
2662
+ requestHeaders: {},
2663
+ },
2664
+ { responseHeaders } = { responseHeaders: false }
2665
+ ) {
2666
+ const {
2667
+ error,
2668
+ } = CartPlatformApplicationValidator.getPromotionOffers().validate(
2669
+ {
2670
+ slug,
2671
+ pageSize,
2672
+ promotionGroup,
2673
+ storeId,
2674
+ cartType,
2675
+ },
2676
+ { abortEarly: false, allowUnknown: true }
2677
+ );
2678
+ if (error) {
2679
+ return Promise.reject(new FDKClientValidationError(error));
2680
+ }
2681
+
2682
+ // Showing warrnings if extra unknown parameters are found
2683
+ const {
2684
+ error: warrning,
2685
+ } = CartPlatformApplicationValidator.getPromotionOffers().validate(
2686
+ {
2687
+ slug,
2688
+ pageSize,
2689
+ promotionGroup,
2690
+ storeId,
2691
+ cartType,
2692
+ },
2693
+ { abortEarly: false, allowUnknown: false }
2694
+ );
2695
+ if (warrning) {
2696
+ Logger({
2697
+ level: "WARN",
2698
+ message: `Parameter Validation warrnings for platform > Cart > getPromotionOffers \n ${warrning}`,
2699
+ });
2700
+ }
2701
+
2702
+ const query_params = {};
2703
+ query_params["slug"] = slug;
2704
+ query_params["page_size"] = pageSize;
2705
+ query_params["promotion_group"] = promotionGroup;
2706
+ query_params["store_id"] = storeId;
2707
+ query_params["cart_type"] = cartType;
2708
+
2709
+ const response = await PlatformAPIClient.execute(
2710
+ this.config,
2711
+ "get",
2712
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/available-promotions`,
2713
+ query_params,
2714
+ undefined,
2715
+ requestHeaders,
2716
+ { responseHeaders }
2717
+ );
2718
+
2719
+ let responseData = response;
2720
+ if (responseHeaders) {
2721
+ responseData = response[0];
2722
+ }
2723
+
2724
+ const {
2725
+ error: res_error,
2726
+ } = CartPlatformModel.PromotionOffersResponse().validate(responseData, {
2727
+ abortEarly: false,
2728
+ allowUnknown: true,
2729
+ });
2730
+
2731
+ if (res_error) {
2732
+ if (this.config.options.strictResponseCheck === true) {
2733
+ return Promise.reject(new FDKResponseValidationError(res_error));
2734
+ } else {
2735
+ Logger({
2736
+ level: "WARN",
2737
+ message: `Response Validation Warnings for platform > Cart > getPromotionOffers \n ${res_error}`,
2738
+ });
2739
+ }
2740
+ }
2741
+
2742
+ return response;
2743
+ }
2744
+
2745
+ /**
2746
+ * @param {CartPlatformApplicationValidator.GetPromotionPaymentOffersParam} arg
2747
+ * - Arg object
2748
+ *
2749
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2750
+ * @param {import("../PlatformAPIClient").Options} - Options
2751
+ * @returns {Promise<CartPlatformModel.PromotionPaymentOffersResponse>} -
2752
+ * Success response
2753
+ * @name getPromotionPaymentOffers
2754
+ * @summary: Fetch available promotions payment offers
2755
+ * @description: Use this API to get top 5 payment offers available for current product - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionPaymentOffers/).
2756
+ */
2757
+ async getPromotionPaymentOffers(
2758
+ { id, uid, requestHeaders } = { requestHeaders: {} },
2759
+ { responseHeaders } = { responseHeaders: false }
2760
+ ) {
2761
+ const {
2762
+ error,
2763
+ } = CartPlatformApplicationValidator.getPromotionPaymentOffers().validate(
2764
+ {
2765
+ id,
2766
+ uid,
2767
+ },
2768
+ { abortEarly: false, allowUnknown: true }
2769
+ );
2770
+ if (error) {
2771
+ return Promise.reject(new FDKClientValidationError(error));
2772
+ }
2773
+
2774
+ // Showing warrnings if extra unknown parameters are found
2775
+ const {
2776
+ error: warrning,
2777
+ } = CartPlatformApplicationValidator.getPromotionPaymentOffers().validate(
2778
+ {
2779
+ id,
2780
+ uid,
2781
+ },
2782
+ { abortEarly: false, allowUnknown: false }
2783
+ );
2784
+ if (warrning) {
2785
+ Logger({
2786
+ level: "WARN",
2787
+ message: `Parameter Validation warrnings for platform > Cart > getPromotionPaymentOffers \n ${warrning}`,
2788
+ });
2789
+ }
2790
+
2791
+ const query_params = {};
2792
+ query_params["id"] = id;
2793
+ query_params["uid"] = uid;
2794
+
2795
+ const response = await PlatformAPIClient.execute(
2796
+ this.config,
2797
+ "get",
2798
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/available-payment-offers`,
2799
+ query_params,
2800
+ undefined,
2801
+ requestHeaders,
2802
+ { responseHeaders }
2803
+ );
2804
+
2805
+ let responseData = response;
2806
+ if (responseHeaders) {
2807
+ responseData = response[0];
2808
+ }
2809
+
2810
+ const {
2811
+ error: res_error,
2812
+ } = CartPlatformModel.PromotionPaymentOffersResponse().validate(
2813
+ responseData,
2814
+ { abortEarly: false, allowUnknown: true }
2815
+ );
2816
+
2817
+ if (res_error) {
2818
+ if (this.config.options.strictResponseCheck === true) {
2819
+ return Promise.reject(new FDKResponseValidationError(res_error));
2820
+ } else {
2821
+ Logger({
2822
+ level: "WARN",
2823
+ message: `Response Validation Warnings for platform > Cart > getPromotionPaymentOffers \n ${res_error}`,
2824
+ });
2825
+ }
2826
+ }
2827
+
2828
+ return response;
2829
+ }
2830
+
2568
2831
  /**
2569
2832
  * @param {CartPlatformApplicationValidator.GetPromotionsParam} arg - Arg object
2570
2833
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -2953,7 +3216,9 @@ class Cart {
2953
3216
  * @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/).
2954
3217
  */
2955
3218
  async platformAddItems(
2956
- { body, i, b, buyNow, id, requestHeaders } = { requestHeaders: {} },
3219
+ { body, i, b, buyNow, orderType, id, requestHeaders } = {
3220
+ requestHeaders: {},
3221
+ },
2957
3222
  { responseHeaders } = { responseHeaders: false }
2958
3223
  ) {
2959
3224
  const {
@@ -2964,6 +3229,7 @@ class Cart {
2964
3229
  i,
2965
3230
  b,
2966
3231
  buyNow,
3232
+ orderType,
2967
3233
  id,
2968
3234
  },
2969
3235
  { abortEarly: false, allowUnknown: true }
@@ -2981,6 +3247,7 @@ class Cart {
2981
3247
  i,
2982
3248
  b,
2983
3249
  buyNow,
3250
+ orderType,
2984
3251
  id,
2985
3252
  },
2986
3253
  { abortEarly: false, allowUnknown: false }
@@ -2996,6 +3263,7 @@ class Cart {
2996
3263
  query_params["i"] = i;
2997
3264
  query_params["b"] = b;
2998
3265
  query_params["buy_now"] = buyNow;
3266
+ query_params["order_type"] = orderType;
2999
3267
  query_params["id"] = id;
3000
3268
 
3001
3269
  const response = await PlatformAPIClient.execute(
@@ -3212,7 +3480,9 @@ class Cart {
3212
3480
  * @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/).
3213
3481
  */
3214
3482
  async platformUpdateCart(
3215
- { body, id, i, b, buyNow, requestHeaders } = { requestHeaders: {} },
3483
+ { body, id, i, orderType, b, buyNow, requestHeaders } = {
3484
+ requestHeaders: {},
3485
+ },
3216
3486
  { responseHeaders } = { responseHeaders: false }
3217
3487
  ) {
3218
3488
  const {
@@ -3222,6 +3492,7 @@ class Cart {
3222
3492
  body,
3223
3493
  id,
3224
3494
  i,
3495
+ orderType,
3225
3496
  b,
3226
3497
  buyNow,
3227
3498
  },
@@ -3239,6 +3510,7 @@ class Cart {
3239
3510
  body,
3240
3511
  id,
3241
3512
  i,
3513
+ orderType,
3242
3514
  b,
3243
3515
  buyNow,
3244
3516
  },
@@ -3254,6 +3526,7 @@ class Cart {
3254
3526
  const query_params = {};
3255
3527
  query_params["id"] = id;
3256
3528
  query_params["i"] = i;
3529
+ query_params["order_type"] = orderType;
3257
3530
  query_params["b"] = b;
3258
3531
  query_params["buy_now"] = buyNow;
3259
3532
 
@@ -106,6 +106,9 @@ export = CartPlatformApplicationValidator;
106
106
  * @typedef GetCartParam
107
107
  * @property {string} [id] - The unique identifier of the cart
108
108
  * @property {string} [userId] - Option to fetch cart for the provided user_id.
109
+ * @property {string} [orderType] - The order type of shipment HomeDelivery - If
110
+ * the customer wants the order home-delivered PickAtStore - If the customer
111
+ * wants the handover of an order at the store itself.
109
112
  * @property {boolean} [i] - This is a boolean value. Select `true` to retrieve
110
113
  * all the items added in the cart.
111
114
  * @property {boolean} [b] - This is a boolean value. Select `true` to retrieve
@@ -153,6 +156,10 @@ export = CartPlatformApplicationValidator;
153
156
  * @property {string} [id] - The unique identifier of the cart.
154
157
  * @property {boolean} [buyNow] - Boolean value to get buy_now cart.
155
158
  */
159
+ /**
160
+ * @typedef GetPriceAdjustmentsParam
161
+ * @property {string} cartId - Cart Id
162
+ */
156
163
  /**
157
164
  * @typedef GetPromosCouponConfigParam
158
165
  * @property {string} [entityType] - Entity_type as promotion or coupon
@@ -166,6 +173,21 @@ export = CartPlatformApplicationValidator;
166
173
  * @typedef GetPromotionCodeExistsParam
167
174
  * @property {string} [code]
168
175
  */
176
+ /**
177
+ * @typedef GetPromotionOffersParam
178
+ * @property {string} [slug] - A short, human-readable, URL-friendly identifier
179
+ * of a product. You can get slug value from the endpoint
180
+ * /service/application/catalog/v1.0/products/
181
+ * @property {number} [pageSize] - Number of offers to be fetched to show
182
+ * @property {string} [promotionGroup] - Type of promotion groups
183
+ * @property {number} [storeId] - Store id
184
+ * @property {string} [cartType] - The type of cart
185
+ */
186
+ /**
187
+ * @typedef GetPromotionPaymentOffersParam
188
+ * @property {string} [id] - Cart id
189
+ * @property {number} [uid] - Cart uid
190
+ */
169
191
  /**
170
192
  * @typedef GetPromotionsParam
171
193
  * @property {number} [pageNo]
@@ -208,6 +230,9 @@ export = CartPlatformApplicationValidator;
208
230
  * the price breakup of cart items.
209
231
  * @property {boolean} [buyNow] - This is a boolen value. Select `true` to
210
232
  * set/initialize buy now cart
233
+ * @property {string} [orderType] - The order type of shipment HomeDelivery - If
234
+ * the customer wants the order home-delivered PickAtStore - If the customer
235
+ * wants the handover of an order at the store itself.
211
236
  * @property {string} [id] - The unique identifier of the cart
212
237
  * @property {CartPlatformModel.PlatformAddCartRequest} body
213
238
  */
@@ -226,6 +251,9 @@ export = CartPlatformApplicationValidator;
226
251
  * @property {string} [id] - The unique identifier of the cart
227
252
  * @property {boolean} [i] - This is a boolean value. Select `true` to retrieve
228
253
  * all the items added in the cart.
254
+ * @property {string} [orderType] - The order type of shipment HomeDelivery - If
255
+ * the customer wants the order home-delivered PickAtStore - If the customer
256
+ * wants the handover of an order at the store itself.
229
257
  * @property {boolean} [b] - This is a boolean value. Select `true` to retrieve
230
258
  * the price breakup of cart items.
231
259
  * @property {boolean} [buyNow] - This is a boolen value. Select `true` to
@@ -410,12 +438,18 @@ declare class CartPlatformApplicationValidator {
410
438
  static getCoupons(): GetCouponsParam;
411
439
  /** @returns {GetItemCountParam} */
412
440
  static getItemCount(): GetItemCountParam;
441
+ /** @returns {GetPriceAdjustmentsParam} */
442
+ static getPriceAdjustments(): GetPriceAdjustmentsParam;
413
443
  /** @returns {GetPromosCouponConfigParam} */
414
444
  static getPromosCouponConfig(): GetPromosCouponConfigParam;
415
445
  /** @returns {GetPromotionByIdParam} */
416
446
  static getPromotionById(): GetPromotionByIdParam;
417
447
  /** @returns {GetPromotionCodeExistsParam} */
418
448
  static getPromotionCodeExists(): GetPromotionCodeExistsParam;
449
+ /** @returns {GetPromotionOffersParam} */
450
+ static getPromotionOffers(): GetPromotionOffersParam;
451
+ /** @returns {GetPromotionPaymentOffersParam} */
452
+ static getPromotionPaymentOffers(): GetPromotionPaymentOffersParam;
419
453
  /** @returns {GetPromotionsParam} */
420
454
  static getPromotions(): GetPromotionsParam;
421
455
  /** @returns {GetShipmentsParam} */
@@ -472,7 +506,7 @@ declare class CartPlatformApplicationValidator {
472
506
  static validateCouponForPayment(): ValidateCouponForPaymentParam;
473
507
  }
474
508
  declare namespace CartPlatformApplicationValidator {
475
- 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, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, 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 };
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 };
476
510
  }
477
511
  type AddAddressParam = {
478
512
  body: CartPlatformModel.PlatformAddress;
@@ -574,6 +608,12 @@ type GetCartParam = {
574
608
  * - Option to fetch cart for the provided user_id.
575
609
  */
576
610
  userId?: string;
611
+ /**
612
+ * - The order type of shipment HomeDelivery - If
613
+ * the customer wants the order home-delivered PickAtStore - If the customer
614
+ * wants the handover of an order at the store itself.
615
+ */
616
+ orderType?: string;
577
617
  /**
578
618
  * - This is a boolean value. Select `true` to retrieve
579
619
  * all the items added in the cart.
@@ -634,6 +674,12 @@ type GetItemCountParam = {
634
674
  */
635
675
  buyNow?: boolean;
636
676
  };
677
+ type GetPriceAdjustmentsParam = {
678
+ /**
679
+ * - Cart Id
680
+ */
681
+ cartId: string;
682
+ };
637
683
  type GetPromosCouponConfigParam = {
638
684
  /**
639
685
  * - Entity_type as promotion or coupon
@@ -650,6 +696,40 @@ type GetPromotionByIdParam = {
650
696
  type GetPromotionCodeExistsParam = {
651
697
  code?: string;
652
698
  };
699
+ type GetPromotionOffersParam = {
700
+ /**
701
+ * - A short, human-readable, URL-friendly identifier
702
+ * of a product. You can get slug value from the endpoint
703
+ * /service/application/catalog/v1.0/products/
704
+ */
705
+ slug?: string;
706
+ /**
707
+ * - Number of offers to be fetched to show
708
+ */
709
+ pageSize?: number;
710
+ /**
711
+ * - Type of promotion groups
712
+ */
713
+ promotionGroup?: string;
714
+ /**
715
+ * - Store id
716
+ */
717
+ storeId?: number;
718
+ /**
719
+ * - The type of cart
720
+ */
721
+ cartType?: string;
722
+ };
723
+ type GetPromotionPaymentOffersParam = {
724
+ /**
725
+ * - Cart id
726
+ */
727
+ id?: string;
728
+ /**
729
+ * - Cart uid
730
+ */
731
+ uid?: number;
732
+ };
653
733
  type GetPromotionsParam = {
654
734
  pageNo?: number;
655
735
  pageSize?: number;
@@ -714,6 +794,12 @@ type PlatformAddItemsParam = {
714
794
  * set/initialize buy now cart
715
795
  */
716
796
  buyNow?: boolean;
797
+ /**
798
+ * - The order type of shipment HomeDelivery - If
799
+ * the customer wants the order home-delivered PickAtStore - If the customer
800
+ * wants the handover of an order at the store itself.
801
+ */
802
+ orderType?: string;
717
803
  /**
718
804
  * - The unique identifier of the cart
719
805
  */
@@ -744,6 +830,12 @@ type PlatformUpdateCartParam = {
744
830
  * all the items added in the cart.
745
831
  */
746
832
  i?: boolean;
833
+ /**
834
+ * - The order type of shipment HomeDelivery - If
835
+ * the customer wants the order home-delivered PickAtStore - If the customer
836
+ * wants the handover of an order at the store itself.
837
+ */
838
+ orderType?: string;
747
839
  /**
748
840
  * - This is a boolean value. Select `true` to retrieve
749
841
  * the price breakup of cart items.
@@ -127,6 +127,9 @@ const CartPlatformModel = require("./CartPlatformModel");
127
127
  * @typedef GetCartParam
128
128
  * @property {string} [id] - The unique identifier of the cart
129
129
  * @property {string} [userId] - Option to fetch cart for the provided user_id.
130
+ * @property {string} [orderType] - The order type of shipment HomeDelivery - If
131
+ * the customer wants the order home-delivered PickAtStore - If the customer
132
+ * wants the handover of an order at the store itself.
130
133
  * @property {boolean} [i] - This is a boolean value. Select `true` to retrieve
131
134
  * all the items added in the cart.
132
135
  * @property {boolean} [b] - This is a boolean value. Select `true` to retrieve
@@ -183,6 +186,11 @@ const CartPlatformModel = require("./CartPlatformModel");
183
186
  * @property {boolean} [buyNow] - Boolean value to get buy_now cart.
184
187
  */
185
188
 
189
+ /**
190
+ * @typedef GetPriceAdjustmentsParam
191
+ * @property {string} cartId - Cart Id
192
+ */
193
+
186
194
  /**
187
195
  * @typedef GetPromosCouponConfigParam
188
196
  * @property {string} [entityType] - Entity_type as promotion or coupon
@@ -199,6 +207,23 @@ const CartPlatformModel = require("./CartPlatformModel");
199
207
  * @property {string} [code]
200
208
  */
201
209
 
210
+ /**
211
+ * @typedef GetPromotionOffersParam
212
+ * @property {string} [slug] - A short, human-readable, URL-friendly identifier
213
+ * of a product. You can get slug value from the endpoint
214
+ * /service/application/catalog/v1.0/products/
215
+ * @property {number} [pageSize] - Number of offers to be fetched to show
216
+ * @property {string} [promotionGroup] - Type of promotion groups
217
+ * @property {number} [storeId] - Store id
218
+ * @property {string} [cartType] - The type of cart
219
+ */
220
+
221
+ /**
222
+ * @typedef GetPromotionPaymentOffersParam
223
+ * @property {string} [id] - Cart id
224
+ * @property {number} [uid] - Cart uid
225
+ */
226
+
202
227
  /**
203
228
  * @typedef GetPromotionsParam
204
229
  * @property {number} [pageNo]
@@ -245,6 +270,9 @@ const CartPlatformModel = require("./CartPlatformModel");
245
270
  * the price breakup of cart items.
246
271
  * @property {boolean} [buyNow] - This is a boolen value. Select `true` to
247
272
  * set/initialize buy now cart
273
+ * @property {string} [orderType] - The order type of shipment HomeDelivery - If
274
+ * the customer wants the order home-delivered PickAtStore - If the customer
275
+ * wants the handover of an order at the store itself.
248
276
  * @property {string} [id] - The unique identifier of the cart
249
277
  * @property {CartPlatformModel.PlatformAddCartRequest} body
250
278
  */
@@ -266,6 +294,9 @@ const CartPlatformModel = require("./CartPlatformModel");
266
294
  * @property {string} [id] - The unique identifier of the cart
267
295
  * @property {boolean} [i] - This is a boolean value. Select `true` to retrieve
268
296
  * all the items added in the cart.
297
+ * @property {string} [orderType] - The order type of shipment HomeDelivery - If
298
+ * the customer wants the order home-delivered PickAtStore - If the customer
299
+ * wants the handover of an order at the store itself.
269
300
  * @property {boolean} [b] - This is a boolean value. Select `true` to retrieve
270
301
  * the price breakup of cart items.
271
302
  * @property {boolean} [buyNow] - This is a boolen value. Select `true` to
@@ -579,6 +610,7 @@ class CartPlatformApplicationValidator {
579
610
  return Joi.object({
580
611
  id: Joi.string().allow(""),
581
612
  userId: Joi.string().allow(""),
613
+ orderType: Joi.string().allow(""),
582
614
  i: Joi.boolean(),
583
615
  b: Joi.boolean(),
584
616
  assignCardId: Joi.number(),
@@ -650,6 +682,13 @@ class CartPlatformApplicationValidator {
650
682
  }).required();
651
683
  }
652
684
 
685
+ /** @returns {GetPriceAdjustmentsParam} */
686
+ static getPriceAdjustments() {
687
+ return Joi.object({
688
+ cartId: Joi.string().allow("").required(),
689
+ }).required();
690
+ }
691
+
653
692
  /** @returns {GetPromosCouponConfigParam} */
654
693
  static getPromosCouponConfig() {
655
694
  return Joi.object({
@@ -672,6 +711,25 @@ class CartPlatformApplicationValidator {
672
711
  }).required();
673
712
  }
674
713
 
714
+ /** @returns {GetPromotionOffersParam} */
715
+ static getPromotionOffers() {
716
+ return Joi.object({
717
+ slug: Joi.string().allow(""),
718
+ pageSize: Joi.number(),
719
+ promotionGroup: Joi.string().allow(""),
720
+ storeId: Joi.number(),
721
+ cartType: Joi.string().allow(""),
722
+ }).required();
723
+ }
724
+
725
+ /** @returns {GetPromotionPaymentOffersParam} */
726
+ static getPromotionPaymentOffers() {
727
+ return Joi.object({
728
+ id: Joi.string().allow(""),
729
+ uid: Joi.number(),
730
+ }).required();
731
+ }
732
+
675
733
  /** @returns {GetPromotionsParam} */
676
734
  static getPromotions() {
677
735
  return Joi.object({
@@ -720,6 +778,7 @@ class CartPlatformApplicationValidator {
720
778
  i: Joi.boolean(),
721
779
  b: Joi.boolean(),
722
780
  buyNow: Joi.boolean(),
781
+ orderType: Joi.string().allow(""),
723
782
  id: Joi.string().allow(""),
724
783
  body: CartPlatformModel.PlatformAddCartRequest().required(),
725
784
  }).required();
@@ -746,6 +805,7 @@ class CartPlatformApplicationValidator {
746
805
  return Joi.object({
747
806
  id: Joi.string().allow(""),
748
807
  i: Joi.boolean(),
808
+ orderType: Joi.string().allow(""),
749
809
  b: Joi.boolean(),
750
810
  buyNow: Joi.boolean(),
751
811
  body: CartPlatformModel.PlatformUpdateCartRequest().required(),