@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.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 (304) 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 +81 -101
  6. package/sdk/application/Cart/CartApplicationClient.js +173 -511
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -19
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
  16. package/sdk/application/Content/ContentApplicationClient.js +183 -366
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
  22. package/sdk/application/Lead/LeadApplicationClient.js +24 -55
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
  26. package/sdk/application/Order/OrderApplicationClient.js +89 -293
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
  28. package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
  29. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
  30. package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
  31. package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
  32. package/sdk/application/Share/ShareApplicationClient.js +35 -89
  33. package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
  34. package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
  35. package/sdk/application/User/UserApplicationClient.d.ts +23 -13
  36. package/sdk/application/User/UserApplicationClient.js +49 -407
  37. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  38. package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
  39. package/sdk/common/Utility.d.ts +1 -1
  40. package/sdk/common/Utility.js +10 -7
  41. package/sdk/common/Validator.d.ts +1 -0
  42. package/sdk/common/Validator.js +20 -0
  43. package/sdk/common/utils.d.ts +0 -1
  44. package/sdk/common/utils.js +0 -14
  45. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
  46. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
  47. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
  49. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
  50. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
  51. package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
  52. package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
  53. package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
  54. package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
  55. package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
  56. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
  57. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
  58. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
  59. package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
  60. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
  61. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
  62. package/sdk/partner/PartnerClient.d.ts +0 -6
  63. package/sdk/partner/PartnerClient.js +0 -9
  64. package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
  65. package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
  66. package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
  67. package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
  68. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
  69. package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
  70. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
  71. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
  72. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
  73. package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
  74. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
  75. package/sdk/partner/index.d.ts +0 -3
  76. package/sdk/partner/index.js +0 -6
  77. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  78. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  79. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
  80. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  82. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  87. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  88. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  89. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  90. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +172 -251
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
  98. package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
  109. package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
  110. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  111. package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
  112. package/sdk/platform/Common/CommonPlatformModel.js +11 -14
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
  117. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
  118. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
  119. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
  120. package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
  121. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
  122. package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
  128. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
  132. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
  134. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
  136. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
  137. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
  138. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
  139. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
  140. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
  141. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
  142. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
  143. package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
  144. package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
  145. package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
  146. package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
  147. package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
  148. package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
  149. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
  150. package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
  151. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
  152. package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
  153. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  154. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  155. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
  156. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
  157. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
  158. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
  159. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
  160. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
  161. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
  162. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
  163. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  164. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  165. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
  166. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
  167. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
  168. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
  169. package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
  170. package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
  171. package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
  172. package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
  173. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
  174. package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
  175. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
  176. package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
  177. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
  178. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
  179. package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
  180. package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
  181. package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
  182. package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
  183. package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
  184. package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
  185. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  186. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  187. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
  188. package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
  189. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
  190. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
  191. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
  192. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
  193. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
  194. package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
  195. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
  196. package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
  197. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
  198. package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
  199. package/sdk/platform/PlatformClient.d.ts +0 -2
  200. package/sdk/platform/PlatformClient.js +0 -4
  201. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  202. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  203. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  204. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  205. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
  206. package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
  213. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
  214. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
  215. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
  216. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
  217. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
  218. package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
  219. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
  220. package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
  221. package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
  222. package/sdk/platform/Share/SharePlatformModel.js +45 -5
  223. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
  224. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
  225. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
  226. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
  227. package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
  228. package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
  229. package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
  230. package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
  231. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
  232. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
  233. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
  234. package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
  235. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
  236. package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
  237. package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
  238. package/sdk/platform/User/UserPlatformModel.js +253 -210
  239. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  240. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  241. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
  242. package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
  243. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  244. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  245. package/sdk/platform/index.d.ts +0 -1
  246. package/sdk/platform/index.js +0 -2
  247. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  248. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  249. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  250. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  251. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  252. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  253. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
  254. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
  255. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
  256. package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
  257. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
  258. package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
  259. package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
  260. package/sdk/public/Content/ContentPublicClient.js +254 -280
  261. package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
  262. package/sdk/public/Content/ContentPublicModel.js +98 -44
  263. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
  264. package/sdk/public/Content/ContentPublicValidator.js +26 -19
  265. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  266. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  267. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  268. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  269. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  270. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  271. package/sdk/public/PublicClient.d.ts +2 -0
  272. package/sdk/public/PublicClient.js +4 -0
  273. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  274. package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
  275. package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
  276. package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
  277. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  278. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  279. package/sdk/public/index.d.ts +1 -0
  280. package/sdk/public/index.js +2 -0
  281. package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
  282. package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
  283. package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
  284. package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
  285. package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
  286. package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
  287. package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
  288. package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
  289. package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
  290. package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
  291. package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
  292. package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
  293. package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
  294. package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
  295. package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
  296. package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
  297. package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
  298. package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
  299. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  300. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  301. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
  302. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
  303. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  304. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
@@ -6,6 +6,7 @@ const {
6
6
  const ApplicationAPIClient = require("../ApplicationAPIClient");
7
7
  const constructUrl = require("../constructUrl");
8
8
  const Paginator = require("../../common/Paginator");
9
+ const { validateRequiredParams } = require("../../common/Validator");
9
10
 
10
11
  class Cart {
11
12
  constructor(_conf) {
@@ -23,18 +24,14 @@ class Cart {
23
24
  getBulkDiscountOffers: "/service/application/cart/v1.0/bulk-price",
24
25
  getCart: "/service/application/cart/v1.0/detail",
25
26
  getCartLastModified: "/service/application/cart/v1.0/detail",
26
- getCartMetaConfig:
27
- "/service/application/cart/v1.0/cart/configuration/{cart_meta_id}",
28
- getCartMetaConfigs: "/service/application/cart/v1.0/cart/configuration",
29
27
  getCartShareLink: "/service/application/cart/v1.0/share-cart",
30
28
  getCartSharedItems: "/service/application/cart/v1.0/share-cart/{token}",
31
29
  getCoupons: "/service/application/cart/v1.0/coupon",
32
30
  getItemCount: "/service/application/cart/v1.0/basic",
33
- getItemCountV2: "/service/application/cart/v2.0/basic",
34
31
  getLadderOffers: "/service/application/cart/v1.0/available-ladder-prices",
35
- getPaymentPromotionOffers:
36
- "/service/application/cart/v1.0/available-payment-offers",
37
32
  getPromotionOffers: "/service/application/cart/v1.0/available-promotions",
33
+ getPromotionPaymentOffers:
34
+ "/service/application/cart/v1.0/available-payment-offers",
38
35
  getShipments: "/service/application/cart/v1.0/shipment",
39
36
  removeAddress: "/service/application/cart/v1.0/address/{id}",
40
37
  removeCoupon: "/service/application/cart/v1.0/coupon",
@@ -42,6 +39,7 @@ class Cart {
42
39
  selectPaymentMode: "/service/application/cart/v1.0/payment",
43
40
  updateAddress: "/service/application/cart/v1.0/address/{id}",
44
41
  updateCart: "/service/application/cart/v1.0/detail",
42
+ updateCartBreakup: "/service/application/cart/v1.0/detail",
45
43
  updateCartMeta: "/service/application/cart/v1.0/meta",
46
44
  updateCartWithSharedItems:
47
45
  "/service/application/cart/v1.0/share-cart/{token}/{action}",
@@ -67,7 +65,7 @@ class Cart {
67
65
  /**
68
66
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
69
67
  * @param {import("../ApplicationAPIClient").Options} - Options
70
- * @returns {Promise<SaveAddressResponse>} - Success response
68
+ * @returns {Promise<SaveAddressResult>} - Success response
71
69
  * @name addAddress
72
70
  * @summary: Creates a new address for a customer
73
71
  * @description: Add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/).
@@ -76,14 +74,6 @@ class Cart {
76
74
  { body, requestHeaders } = { requestHeaders: {} },
77
75
  { responseHeaders } = { responseHeaders: false }
78
76
  ) {
79
- let invalidInput = [];
80
- if (invalidInput.length) {
81
- const error = new Error();
82
- error.message = "Missing required field";
83
- error.details = invalidInput;
84
- return Promise.reject(new FDKClientValidationError(error));
85
- }
86
-
87
77
  const query_params = {};
88
78
 
89
79
  const xHeaders = {};
@@ -112,7 +102,7 @@ class Cart {
112
102
  /**
113
103
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
114
104
  * @param {import("../ApplicationAPIClient").Options} - Options
115
- * @returns {Promise<AddCartDetailResponse>} - Success response
105
+ * @returns {Promise<AddCartDetailResult>} - Success response
116
106
  * @name addItems
117
107
  * @summary: Add items to a cart
118
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/).
@@ -120,35 +110,27 @@ class Cart {
120
110
  async addItems(
121
111
  {
122
112
  body,
113
+ xOrderingSource,
123
114
  i,
124
115
  b,
125
116
  areaCode,
126
117
  buyNow,
127
118
  id,
128
- cartType,
129
119
  orderType,
130
120
  requestHeaders,
131
121
  } = { requestHeaders: {} },
132
122
  { responseHeaders } = { responseHeaders: false }
133
123
  ) {
134
- let invalidInput = [];
135
- if (invalidInput.length) {
136
- const error = new Error();
137
- error.message = "Missing required field";
138
- error.details = invalidInput;
139
- return Promise.reject(new FDKClientValidationError(error));
140
- }
141
-
142
124
  const query_params = {};
143
125
  query_params["i"] = i;
144
126
  query_params["b"] = b;
145
127
  query_params["area_code"] = areaCode;
146
128
  query_params["buy_now"] = buyNow;
147
129
  query_params["id"] = id;
148
- query_params["cart_type"] = cartType;
149
130
  query_params["order_type"] = orderType;
150
131
 
151
132
  const xHeaders = {};
133
+ xHeaders["x-ordering-source"] = xOrderingSource;
152
134
 
153
135
  const response = await ApplicationAPIClient.execute(
154
136
  this._conf,
@@ -174,25 +156,17 @@ class Cart {
174
156
  /**
175
157
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
176
158
  * @param {import("../ApplicationAPIClient").Options} - Options
177
- * @returns {Promise<CartDetailResponse>} - Success response
159
+ * @returns {Promise<CartDetailResult>} - Success response
178
160
  * @name applyCoupon
179
- * @summary: Apply coupon.
161
+ * @summary: Apply coupon
180
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/).
181
163
  */
182
164
  async applyCoupon(
183
- { body, i, b, p, id, buyNow, cartType, requestHeaders } = {
165
+ { body, xOrderingSource, i, b, p, id, buyNow, cartType, requestHeaders } = {
184
166
  requestHeaders: {},
185
167
  },
186
168
  { responseHeaders } = { responseHeaders: false }
187
169
  ) {
188
- let invalidInput = [];
189
- if (invalidInput.length) {
190
- const error = new Error();
191
- error.message = "Missing required field";
192
- error.details = invalidInput;
193
- return Promise.reject(new FDKClientValidationError(error));
194
- }
195
-
196
170
  const query_params = {};
197
171
  query_params["i"] = i;
198
172
  query_params["b"] = b;
@@ -202,6 +176,7 @@ class Cart {
202
176
  query_params["cart_type"] = cartType;
203
177
 
204
178
  const xHeaders = {};
179
+ xHeaders["x-ordering-source"] = xOrderingSource;
205
180
 
206
181
  const response = await ApplicationAPIClient.execute(
207
182
  this._conf,
@@ -227,33 +202,25 @@ class Cart {
227
202
  /**
228
203
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
229
204
  * @param {import("../ApplicationAPIClient").Options} - Options
230
- * @returns {Promise<CartDetailResponse>} - Success response
205
+ * @returns {Promise<CartDetailResult>} - Success response
231
206
  * @name applyRewardPoints
232
- * @summary: Use reward points.
207
+ * @summary: Use reward points
233
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/).
234
209
  */
235
210
  async applyRewardPoints(
236
- { body, id, i, b, buyNow, cartType, requestHeaders } = {
211
+ { body, xOrderingSource, id, i, b, buyNow, requestHeaders } = {
237
212
  requestHeaders: {},
238
213
  },
239
214
  { responseHeaders } = { responseHeaders: false }
240
215
  ) {
241
- let invalidInput = [];
242
- if (invalidInput.length) {
243
- const error = new Error();
244
- error.message = "Missing required field";
245
- error.details = invalidInput;
246
- return Promise.reject(new FDKClientValidationError(error));
247
- }
248
-
249
216
  const query_params = {};
250
217
  query_params["id"] = id;
251
218
  query_params["i"] = i;
252
219
  query_params["b"] = b;
253
220
  query_params["buy_now"] = buyNow;
254
- query_params["cart_type"] = cartType;
255
221
 
256
222
  const xHeaders = {};
223
+ xHeaders["x-ordering-source"] = xOrderingSource;
257
224
 
258
225
  const response = await ApplicationAPIClient.execute(
259
226
  this._conf,
@@ -279,28 +246,23 @@ class Cart {
279
246
  /**
280
247
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
281
248
  * @param {import("../ApplicationAPIClient").Options} - Options
282
- * @returns {Promise<CartCheckoutResponse>} - Success response
249
+ * @returns {Promise<CartCheckoutResult>} - Success response
283
250
  * @name checkoutCart
284
251
  * @summary: Checkout cart
285
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/).
286
253
  */
287
254
  async checkoutCart(
288
- { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
255
+ { body, xOrderingSource, buyNow, cartType, requestHeaders } = {
256
+ requestHeaders: {},
257
+ },
289
258
  { responseHeaders } = { responseHeaders: false }
290
259
  ) {
291
- let invalidInput = [];
292
- if (invalidInput.length) {
293
- const error = new Error();
294
- error.message = "Missing required field";
295
- error.details = invalidInput;
296
- return Promise.reject(new FDKClientValidationError(error));
297
- }
298
-
299
260
  const query_params = {};
300
261
  query_params["buy_now"] = buyNow;
301
262
  query_params["cart_type"] = cartType;
302
263
 
303
264
  const xHeaders = {};
265
+ xHeaders["x-ordering-source"] = xOrderingSource;
304
266
 
305
267
  const response = await ApplicationAPIClient.execute(
306
268
  this._conf,
@@ -326,28 +288,23 @@ class Cart {
326
288
  /**
327
289
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
328
290
  * @param {import("../ApplicationAPIClient").Options} - Options
329
- * @returns {Promise<CartCheckoutResponse>} - Success response
291
+ * @returns {Promise<CartCheckoutResult>} - Success response
330
292
  * @name checkoutCartV2
331
- * @summary: Enhanced cart checkout process
332
- * @description: Enhanced version of checkout process that supports multiple mode of payment(MOP). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/).
293
+ * @summary: Checkout cart
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/).
333
295
  */
334
296
  async checkoutCartV2(
335
- { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
297
+ { body, xOrderingSource, buyNow, cartType, requestHeaders } = {
298
+ requestHeaders: {},
299
+ },
336
300
  { responseHeaders } = { responseHeaders: false }
337
301
  ) {
338
- let invalidInput = [];
339
- if (invalidInput.length) {
340
- const error = new Error();
341
- error.message = "Missing required field";
342
- error.details = invalidInput;
343
- return Promise.reject(new FDKClientValidationError(error));
344
- }
345
-
346
302
  const query_params = {};
347
303
  query_params["buy_now"] = buyNow;
348
304
  query_params["cart_type"] = cartType;
349
305
 
350
306
  const xHeaders = {};
307
+ xHeaders["x-ordering-source"] = xOrderingSource;
351
308
 
352
309
  const response = await ApplicationAPIClient.execute(
353
310
  this._conf,
@@ -373,26 +330,17 @@ class Cart {
373
330
  /**
374
331
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
375
332
  * @param {import("../ApplicationAPIClient").Options} - Options
376
- * @returns {Promise<DeleteCartDetailResponse>} - Success response
333
+ * @returns {Promise<DeleteCartDetailResult>} - Success response
377
334
  * @name deleteCart
378
- * @summary: Clears the cart
335
+ * @summary: Delete a cart
379
336
  * @description: Delete all items from the user's cart and resets it to its initial state, providing a clean slate for new selections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/deleteCart/).
380
337
  */
381
338
  async deleteCart(
382
- { body, id, cartType, requestHeaders } = { requestHeaders: {} },
339
+ { id, requestHeaders } = { requestHeaders: {} },
383
340
  { responseHeaders } = { responseHeaders: false }
384
341
  ) {
385
- let invalidInput = [];
386
- if (invalidInput.length) {
387
- const error = new Error();
388
- error.message = "Missing required field";
389
- error.details = invalidInput;
390
- return Promise.reject(new FDKClientValidationError(error));
391
- }
392
-
393
342
  const query_params = {};
394
343
  query_params["id"] = id;
395
- query_params["cart_type"] = cartType;
396
344
 
397
345
  const xHeaders = {};
398
346
 
@@ -404,7 +352,7 @@ class Cart {
404
352
  params: {},
405
353
  }),
406
354
  query_params,
407
- body,
355
+ undefined,
408
356
  { ...xHeaders, ...requestHeaders },
409
357
  { responseHeaders }
410
358
  );
@@ -434,23 +382,16 @@ class Cart {
434
382
  checkoutMode,
435
383
  tags,
436
384
  isDefault,
437
- userId,
438
385
  requestHeaders,
439
386
  } = { requestHeaders: {} },
440
387
  { responseHeaders } = { responseHeaders: false }
441
388
  ) {
442
- let invalidInput = [];
443
-
444
- if (!id) {
445
- invalidInput.push({
446
- message: `The 'id' field is required.`,
447
- path: ["id"],
389
+ const errors = validateRequiredParams(arguments[0], ["id"]);
390
+ if (errors.length > 0) {
391
+ const error = new FDKClientValidationError({
392
+ message: "Missing required field",
393
+ details: errors,
448
394
  });
449
- }
450
- if (invalidInput.length) {
451
- const error = new Error();
452
- error.message = "Missing required field";
453
- error.details = invalidInput;
454
395
  return Promise.reject(new FDKClientValidationError(error));
455
396
  }
456
397
 
@@ -461,7 +402,6 @@ class Cart {
461
402
  query_params["checkout_mode"] = checkoutMode;
462
403
  query_params["tags"] = tags;
463
404
  query_params["is_default"] = isDefault;
464
- query_params["user_id"] = userId;
465
405
 
466
406
  const xHeaders = {};
467
407
 
@@ -489,7 +429,7 @@ class Cart {
489
429
  /**
490
430
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
491
431
  * @param {import("../ApplicationAPIClient").Options} - Options
492
- * @returns {Promise<GetAddressesResponse>} - Success response
432
+ * @returns {Promise<GetAddressesResult>} - Success response
493
433
  * @name getAddresses
494
434
  * @summary: Get a list of addresses for a customer
495
435
  * @description: List all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/).
@@ -502,19 +442,10 @@ class Cart {
502
442
  checkoutMode,
503
443
  tags,
504
444
  isDefault,
505
- userId,
506
445
  requestHeaders,
507
446
  } = { requestHeaders: {} },
508
447
  { responseHeaders } = { responseHeaders: false }
509
448
  ) {
510
- let invalidInput = [];
511
- if (invalidInput.length) {
512
- const error = new Error();
513
- error.message = "Missing required field";
514
- error.details = invalidInput;
515
- return Promise.reject(new FDKClientValidationError(error));
516
- }
517
-
518
449
  const query_params = {};
519
450
  query_params["cart_id"] = cartId;
520
451
  query_params["buy_now"] = buyNow;
@@ -522,7 +453,6 @@ class Cart {
522
453
  query_params["checkout_mode"] = checkoutMode;
523
454
  query_params["tags"] = tags;
524
455
  query_params["is_default"] = isDefault;
525
- query_params["user_id"] = userId;
526
456
 
527
457
  const xHeaders = {};
528
458
 
@@ -550,31 +480,20 @@ class Cart {
550
480
  /**
551
481
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
552
482
  * @param {import("../ApplicationAPIClient").Options} - Options
553
- * @returns {Promise<BulkPriceResponse>} - Success response
483
+ * @returns {Promise<BulkPriceResult>} - Success response
554
484
  * @name getBulkDiscountOffers
555
485
  * @summary: List bulk discounts
556
486
  * @description: List offer discounts with information about quantity and seller. One offer is marked with a "best" flag, indicating it as the best offer among the list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getBulkDiscountOffers/).
557
487
  */
558
488
  async getBulkDiscountOffers(
559
- { itemId, articleId, uid, slug, cartType, requestHeaders } = {
560
- requestHeaders: {},
561
- },
489
+ { itemId, articleId, uid, slug, requestHeaders } = { requestHeaders: {} },
562
490
  { responseHeaders } = { responseHeaders: false }
563
491
  ) {
564
- let invalidInput = [];
565
- if (invalidInput.length) {
566
- const error = new Error();
567
- error.message = "Missing required field";
568
- error.details = invalidInput;
569
- return Promise.reject(new FDKClientValidationError(error));
570
- }
571
-
572
492
  const query_params = {};
573
493
  query_params["item_id"] = itemId;
574
494
  query_params["article_id"] = articleId;
575
495
  query_params["uid"] = uid;
576
496
  query_params["slug"] = slug;
577
- query_params["cart_type"] = cartType;
578
497
 
579
498
  const xHeaders = {};
580
499
 
@@ -602,13 +521,14 @@ class Cart {
602
521
  /**
603
522
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
604
523
  * @param {import("../ApplicationAPIClient").Options} - Options
605
- * @returns {Promise<CartDetailResponse>} - Success response
524
+ * @returns {Promise<CartDetailResult>} - Success response
606
525
  * @name getCart
607
- * @summary: Retrieve cart details.
526
+ * @summary: Get a cart
608
527
  * @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/).
609
528
  */
610
529
  async getCart(
611
530
  {
531
+ xOrderingSource,
612
532
  id,
613
533
  i,
614
534
  b,
@@ -616,20 +536,11 @@ class Cart {
616
536
  assignCardId,
617
537
  areaCode,
618
538
  buyNow,
619
- cartType,
620
539
  orderType,
621
540
  requestHeaders,
622
541
  } = { requestHeaders: {} },
623
542
  { responseHeaders } = { responseHeaders: false }
624
543
  ) {
625
- let invalidInput = [];
626
- if (invalidInput.length) {
627
- const error = new Error();
628
- error.message = "Missing required field";
629
- error.details = invalidInput;
630
- return Promise.reject(new FDKClientValidationError(error));
631
- }
632
-
633
544
  const query_params = {};
634
545
  query_params["id"] = id;
635
546
  query_params["i"] = i;
@@ -638,10 +549,10 @@ class Cart {
638
549
  query_params["assign_card_id"] = assignCardId;
639
550
  query_params["area_code"] = areaCode;
640
551
  query_params["buy_now"] = buyNow;
641
- query_params["cart_type"] = cartType;
642
552
  query_params["order_type"] = orderType;
643
553
 
644
554
  const xHeaders = {};
555
+ xHeaders["x-ordering-source"] = xOrderingSource;
645
556
 
646
557
  const response = await ApplicationAPIClient.execute(
647
558
  this._conf,
@@ -676,14 +587,6 @@ class Cart {
676
587
  { id, requestHeaders } = { requestHeaders: {} },
677
588
  { responseHeaders } = { responseHeaders: false }
678
589
  ) {
679
- let invalidInput = [];
680
- if (invalidInput.length) {
681
- const error = new Error();
682
- error.message = "Missing required field";
683
- error.details = invalidInput;
684
- return Promise.reject(new FDKClientValidationError(error));
685
- }
686
-
687
590
  const query_params = {};
688
591
  query_params["id"] = id;
689
592
 
@@ -713,104 +616,7 @@ class Cart {
713
616
  /**
714
617
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
715
618
  * @param {import("../ApplicationAPIClient").Options} - Options
716
- * @returns {Promise<CartConfigDetailResponse>} - Success response
717
- * @name getCartMetaConfig
718
- * @summary: Get cart configuration by id
719
- * @description: Get cart configuration by id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartMetaConfig/).
720
- */
721
- async getCartMetaConfig(
722
- { cartMetaId, requestHeaders } = { requestHeaders: {} },
723
- { responseHeaders } = { responseHeaders: false }
724
- ) {
725
- let invalidInput = [];
726
-
727
- if (!cartMetaId) {
728
- invalidInput.push({
729
- message: `The 'cartMetaId' field is required.`,
730
- path: ["cartMetaId"],
731
- });
732
- }
733
- if (invalidInput.length) {
734
- const error = new Error();
735
- error.message = "Missing required field";
736
- error.details = invalidInput;
737
- return Promise.reject(new FDKClientValidationError(error));
738
- }
739
-
740
- const query_params = {};
741
-
742
- const xHeaders = {};
743
-
744
- const response = await ApplicationAPIClient.execute(
745
- this._conf,
746
- "get",
747
- constructUrl({
748
- url: this._urls["getCartMetaConfig"],
749
- params: { cartMetaId },
750
- }),
751
- query_params,
752
- undefined,
753
- { ...xHeaders, ...requestHeaders },
754
- { responseHeaders }
755
- );
756
-
757
- let responseData = response;
758
- if (responseHeaders) {
759
- responseData = response[0];
760
- }
761
-
762
- return response;
763
- }
764
-
765
- /**
766
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
767
- * @param {import("../ApplicationAPIClient").Options} - Options
768
- * @returns {Promise<CartMetaConfigListResponse>} - Success response
769
- * @name getCartMetaConfigs
770
- * @summary: Get cart configuration
771
- * @description: Get cart configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartMetaConfigs/).
772
- */
773
- async getCartMetaConfigs(
774
- { requestHeaders } = { requestHeaders: {} },
775
- { responseHeaders } = { responseHeaders: false }
776
- ) {
777
- let invalidInput = [];
778
- if (invalidInput.length) {
779
- const error = new Error();
780
- error.message = "Missing required field";
781
- error.details = invalidInput;
782
- return Promise.reject(new FDKClientValidationError(error));
783
- }
784
-
785
- const query_params = {};
786
-
787
- const xHeaders = {};
788
-
789
- const response = await ApplicationAPIClient.execute(
790
- this._conf,
791
- "get",
792
- constructUrl({
793
- url: this._urls["getCartMetaConfigs"],
794
- params: {},
795
- }),
796
- query_params,
797
- undefined,
798
- { ...xHeaders, ...requestHeaders },
799
- { responseHeaders }
800
- );
801
-
802
- let responseData = response;
803
- if (responseHeaders) {
804
- responseData = response[0];
805
- }
806
-
807
- return response;
808
- }
809
-
810
- /**
811
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
812
- * @param {import("../ApplicationAPIClient").Options} - Options
813
- * @returns {Promise<GetShareCartLinkResponse>} - Success response
619
+ * @returns {Promise<GetShareCartLinkResult>} - Success response
814
620
  * @name getCartShareLink
815
621
  * @summary: Create share cart link
816
622
  * @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartShareLink/).
@@ -819,14 +625,6 @@ class Cart {
819
625
  { body, requestHeaders } = { requestHeaders: {} },
820
626
  { responseHeaders } = { responseHeaders: false }
821
627
  ) {
822
- let invalidInput = [];
823
- if (invalidInput.length) {
824
- const error = new Error();
825
- error.message = "Missing required field";
826
- error.details = invalidInput;
827
- return Promise.reject(new FDKClientValidationError(error));
828
- }
829
-
830
628
  const query_params = {};
831
629
 
832
630
  const xHeaders = {};
@@ -855,7 +653,7 @@ class Cart {
855
653
  /**
856
654
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
857
655
  * @param {import("../ApplicationAPIClient").Options} - Options
858
- * @returns {Promise<SharedCartResponse>} - Success response
656
+ * @returns {Promise<SharedCartResult>} - Success response
859
657
  * @name getCartSharedItems
860
658
  * @summary: List shared cart items
861
659
  * @description: Get cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/).
@@ -864,18 +662,12 @@ class Cart {
864
662
  { token, requestHeaders } = { requestHeaders: {} },
865
663
  { responseHeaders } = { responseHeaders: false }
866
664
  ) {
867
- let invalidInput = [];
868
-
869
- if (!token) {
870
- invalidInput.push({
871
- message: `The 'token' field is required.`,
872
- path: ["token"],
665
+ const errors = validateRequiredParams(arguments[0], ["token"]);
666
+ if (errors.length > 0) {
667
+ const error = new FDKClientValidationError({
668
+ message: "Missing required field",
669
+ details: errors,
873
670
  });
874
- }
875
- if (invalidInput.length) {
876
- const error = new Error();
877
- error.message = "Missing required field";
878
- error.details = invalidInput;
879
671
  return Promise.reject(new FDKClientValidationError(error));
880
672
  }
881
673
 
@@ -907,27 +699,21 @@ class Cart {
907
699
  /**
908
700
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
909
701
  * @param {import("../ApplicationAPIClient").Options} - Options
910
- * @returns {Promise<GetCouponResponse>} - Success response
702
+ * @returns {Promise<GetCouponResult>} - Success response
911
703
  * @name getCoupons
912
- * @summary: List available coupons.
704
+ * @summary: List available coupons
913
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/).
914
706
  */
915
707
  async getCoupons(
916
- { id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
708
+ { id, buyNow, productSlug, storeId, requestHeaders } = {
709
+ requestHeaders: {},
710
+ },
917
711
  { responseHeaders } = { responseHeaders: false }
918
712
  ) {
919
- let invalidInput = [];
920
- if (invalidInput.length) {
921
- const error = new Error();
922
- error.message = "Missing required field";
923
- error.details = invalidInput;
924
- return Promise.reject(new FDKClientValidationError(error));
925
- }
926
-
927
713
  const query_params = {};
928
714
  query_params["id"] = id;
929
715
  query_params["buy_now"] = buyNow;
930
- query_params["slug"] = slug;
716
+ query_params["product_slug"] = productSlug;
931
717
  query_params["store_id"] = storeId;
932
718
 
933
719
  const xHeaders = {};
@@ -956,23 +742,15 @@ class Cart {
956
742
  /**
957
743
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
958
744
  * @param {import("../ApplicationAPIClient").Options} - Options
959
- * @returns {Promise<CartItemCountResponse>} - Success response
745
+ * @returns {Promise<CartItemCountResult>} - Success response
960
746
  * @name getItemCount
961
- * @summary: Count cart items.
747
+ * @summary: Get a cart items count
962
748
  * @description: Get total count of items currently present in the customer's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getItemCount/).
963
749
  */
964
750
  async getItemCount(
965
751
  { id, buyNow, requestHeaders } = { requestHeaders: {} },
966
752
  { responseHeaders } = { responseHeaders: false }
967
753
  ) {
968
- let invalidInput = [];
969
- if (invalidInput.length) {
970
- const error = new Error();
971
- error.message = "Missing required field";
972
- error.details = invalidInput;
973
- return Promise.reject(new FDKClientValidationError(error));
974
- }
975
-
976
754
  const query_params = {};
977
755
  query_params["id"] = id;
978
756
  query_params["buy_now"] = buyNow;
@@ -1000,53 +778,6 @@ class Cart {
1000
778
  return response;
1001
779
  }
1002
780
 
1003
- /**
1004
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1005
- * @param {import("../ApplicationAPIClient").Options} - Options
1006
- * @returns {Promise<CartItemCountResponseV2>} - Success response
1007
- * @name getItemCountV2
1008
- * @summary: Count items in the cart according to cart_type
1009
- * @description: Use this API to get the total number of items present in cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getItemCountV2/).
1010
- */
1011
- async getItemCountV2(
1012
- { id, buyNow, requestHeaders } = { requestHeaders: {} },
1013
- { responseHeaders } = { responseHeaders: false }
1014
- ) {
1015
- let invalidInput = [];
1016
- if (invalidInput.length) {
1017
- const error = new Error();
1018
- error.message = "Missing required field";
1019
- error.details = invalidInput;
1020
- return Promise.reject(new FDKClientValidationError(error));
1021
- }
1022
-
1023
- const query_params = {};
1024
- query_params["id"] = id;
1025
- query_params["buy_now"] = buyNow;
1026
-
1027
- const xHeaders = {};
1028
-
1029
- const response = await ApplicationAPIClient.execute(
1030
- this._conf,
1031
- "get",
1032
- constructUrl({
1033
- url: this._urls["getItemCountV2"],
1034
- params: {},
1035
- }),
1036
- query_params,
1037
- undefined,
1038
- { ...xHeaders, ...requestHeaders },
1039
- { responseHeaders }
1040
- );
1041
-
1042
- let responseData = response;
1043
- if (responseHeaders) {
1044
- responseData = response[0];
1045
- }
1046
-
1047
- return response;
1048
- }
1049
-
1050
781
  /**
1051
782
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1052
783
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -1061,21 +792,6 @@ class Cart {
1061
792
  },
1062
793
  { responseHeaders } = { responseHeaders: false }
1063
794
  ) {
1064
- let invalidInput = [];
1065
-
1066
- if (!slug) {
1067
- invalidInput.push({
1068
- message: `The 'slug' field is required.`,
1069
- path: ["slug"],
1070
- });
1071
- }
1072
- if (invalidInput.length) {
1073
- const error = new Error();
1074
- error.message = "Missing required field";
1075
- error.details = invalidInput;
1076
- return Promise.reject(new FDKClientValidationError(error));
1077
- }
1078
-
1079
795
  const query_params = {};
1080
796
  query_params["slug"] = slug;
1081
797
  query_params["store_id"] = storeId;
@@ -1108,26 +824,23 @@ class Cart {
1108
824
  /**
1109
825
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1110
826
  * @param {import("../ApplicationAPIClient").Options} - Options
1111
- * @returns {Promise<PromotionPaymentOffersResponse>} - Success response
1112
- * @name getPaymentPromotionOffers
1113
- * @summary: Fetch available promotions payment offers
1114
- * @description: Use this API to get top 5 payment offers available for current cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPaymentPromotionOffers/).
827
+ * @returns {Promise<PromotionOffersResult>} - Success response
828
+ * @name getPromotionOffers
829
+ * @summary: List available promotion offers
830
+ * @description: List 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/application/cart/getPromotionOffers/).
1115
831
  */
1116
- async getPaymentPromotionOffers(
1117
- { id, uid, requestHeaders } = { requestHeaders: {} },
832
+ async getPromotionOffers(
833
+ { slug, pageSize, promotionGroup, storeId, cartType, requestHeaders } = {
834
+ requestHeaders: {},
835
+ },
1118
836
  { responseHeaders } = { responseHeaders: false }
1119
837
  ) {
1120
- let invalidInput = [];
1121
- if (invalidInput.length) {
1122
- const error = new Error();
1123
- error.message = "Missing required field";
1124
- error.details = invalidInput;
1125
- return Promise.reject(new FDKClientValidationError(error));
1126
- }
1127
-
1128
838
  const query_params = {};
1129
- query_params["id"] = id;
1130
- query_params["uid"] = uid;
839
+ query_params["slug"] = slug;
840
+ query_params["page_size"] = pageSize;
841
+ query_params["promotion_group"] = promotionGroup;
842
+ query_params["store_id"] = storeId;
843
+ query_params["cart_type"] = cartType;
1131
844
 
1132
845
  const xHeaders = {};
1133
846
 
@@ -1135,7 +848,7 @@ class Cart {
1135
848
  this._conf,
1136
849
  "get",
1137
850
  constructUrl({
1138
- url: this._urls["getPaymentPromotionOffers"],
851
+ url: this._urls["getPromotionOffers"],
1139
852
  params: {},
1140
853
  }),
1141
854
  query_params,
@@ -1155,30 +868,18 @@ class Cart {
1155
868
  /**
1156
869
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1157
870
  * @param {import("../ApplicationAPIClient").Options} - Options
1158
- * @returns {Promise<PromotionOffersResponse>} - Success response
1159
- * @name getPromotionOffers
1160
- * @summary: List available promotion offers
1161
- * @description: List 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/application/cart/getPromotionOffers/).
871
+ * @returns {Promise<PromotionPaymentOffersResult>} - Success response
872
+ * @name getPromotionPaymentOffers
873
+ * @summary: Fetch available promotions payment offers
874
+ * @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/application/cart/getPromotionPaymentOffers/).
1162
875
  */
1163
- async getPromotionOffers(
1164
- { slug, pageSize, promotionGroup, storeId, requestHeaders } = {
1165
- requestHeaders: {},
1166
- },
876
+ async getPromotionPaymentOffers(
877
+ { id, uid, requestHeaders } = { requestHeaders: {} },
1167
878
  { responseHeaders } = { responseHeaders: false }
1168
879
  ) {
1169
- let invalidInput = [];
1170
- if (invalidInput.length) {
1171
- const error = new Error();
1172
- error.message = "Missing required field";
1173
- error.details = invalidInput;
1174
- return Promise.reject(new FDKClientValidationError(error));
1175
- }
1176
-
1177
880
  const query_params = {};
1178
- query_params["slug"] = slug;
1179
- query_params["page_size"] = pageSize;
1180
- query_params["promotion_group"] = promotionGroup;
1181
- query_params["store_id"] = storeId;
881
+ query_params["id"] = id;
882
+ query_params["uid"] = uid;
1182
883
 
1183
884
  const xHeaders = {};
1184
885
 
@@ -1186,7 +887,7 @@ class Cart {
1186
887
  this._conf,
1187
888
  "get",
1188
889
  constructUrl({
1189
- url: this._urls["getPromotionOffers"],
890
+ url: this._urls["getPromotionPaymentOffers"],
1190
891
  params: {},
1191
892
  }),
1192
893
  query_params,
@@ -1206,38 +907,18 @@ class Cart {
1206
907
  /**
1207
908
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1208
909
  * @param {import("../ApplicationAPIClient").Options} - Options
1209
- * @returns {Promise<CartShipmentsResponse>} - Success response
910
+ * @returns {Promise<CartShipmentsResult>} - Success response
1210
911
  * @name getShipments
1211
- * @summary: List shipments.
912
+ * @summary: List shipments
1212
913
  * @description: Get shipment details for the items in a cart, specific to the selected address. Shipment details include delivery promises, seller information, item details, and other relevant information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getShipments/).
1213
914
  */
1214
915
  async getShipments(
1215
- {
1216
- pickAtStoreUid,
1217
- orderingStoreId,
1218
- i,
1219
- p,
1220
- id,
1221
- buyNow,
1222
- addressId,
1223
- areaCode,
1224
- orderType,
1225
- requestHeaders,
1226
- } = { requestHeaders: {} },
916
+ { p, id, buyNow, addressId, areaCode, orderType, requestHeaders } = {
917
+ requestHeaders: {},
918
+ },
1227
919
  { responseHeaders } = { responseHeaders: false }
1228
920
  ) {
1229
- let invalidInput = [];
1230
- if (invalidInput.length) {
1231
- const error = new Error();
1232
- error.message = "Missing required field";
1233
- error.details = invalidInput;
1234
- return Promise.reject(new FDKClientValidationError(error));
1235
- }
1236
-
1237
921
  const query_params = {};
1238
- query_params["pick_at_store_uid"] = pickAtStoreUid;
1239
- query_params["ordering_store_id"] = orderingStoreId;
1240
- query_params["i"] = i;
1241
922
  query_params["p"] = p;
1242
923
  query_params["id"] = id;
1243
924
  query_params["buy_now"] = buyNow;
@@ -1271,7 +952,7 @@ class Cart {
1271
952
  /**
1272
953
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1273
954
  * @param {import("../ApplicationAPIClient").Options} - Options
1274
- * @returns {Promise<DeleteAddressResponse>} - Success response
955
+ * @returns {Promise<DeleteAddressResult>} - Success response
1275
956
  * @name removeAddress
1276
957
  * @summary: Removes an address from a customer's address list
1277
958
  * @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
@@ -1280,18 +961,12 @@ class Cart {
1280
961
  { id, requestHeaders } = { requestHeaders: {} },
1281
962
  { responseHeaders } = { responseHeaders: false }
1282
963
  ) {
1283
- let invalidInput = [];
1284
-
1285
- if (!id) {
1286
- invalidInput.push({
1287
- message: `The 'id' field is required.`,
1288
- path: ["id"],
964
+ const errors = validateRequiredParams(arguments[0], ["id"]);
965
+ if (errors.length > 0) {
966
+ const error = new FDKClientValidationError({
967
+ message: "Missing required field",
968
+ details: errors,
1289
969
  });
1290
- }
1291
- if (invalidInput.length) {
1292
- const error = new Error();
1293
- error.message = "Missing required field";
1294
- error.details = invalidInput;
1295
970
  return Promise.reject(new FDKClientValidationError(error));
1296
971
  }
1297
972
 
@@ -1323,29 +998,21 @@ class Cart {
1323
998
  /**
1324
999
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1325
1000
  * @param {import("../ApplicationAPIClient").Options} - Options
1326
- * @returns {Promise<CartDetailResponse>} - Success response
1001
+ * @returns {Promise<CartDetailResult>} - Success response
1327
1002
  * @name removeCoupon
1328
- * @summary: Remove coupon.
1003
+ * @summary: Remove coupon
1329
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/).
1330
1005
  */
1331
1006
  async removeCoupon(
1332
- { id, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
1007
+ { xOrderingSource, id, buyNow, requestHeaders } = { requestHeaders: {} },
1333
1008
  { responseHeaders } = { responseHeaders: false }
1334
1009
  ) {
1335
- let invalidInput = [];
1336
- if (invalidInput.length) {
1337
- const error = new Error();
1338
- error.message = "Missing required field";
1339
- error.details = invalidInput;
1340
- return Promise.reject(new FDKClientValidationError(error));
1341
- }
1342
-
1343
1010
  const query_params = {};
1344
1011
  query_params["id"] = id;
1345
1012
  query_params["buy_now"] = buyNow;
1346
- query_params["cart_type"] = cartType;
1347
1013
 
1348
1014
  const xHeaders = {};
1015
+ xHeaders["x-ordering-source"] = xOrderingSource;
1349
1016
 
1350
1017
  const response = await ApplicationAPIClient.execute(
1351
1018
  this._conf,
@@ -1371,23 +1038,17 @@ class Cart {
1371
1038
  /**
1372
1039
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1373
1040
  * @param {import("../ApplicationAPIClient").Options} - Options
1374
- * @returns {Promise<CartDetailResponse>} - Success response
1041
+ * @returns {Promise<CartDetailResult>} - Success response
1375
1042
  * @name selectAddress
1376
1043
  * @summary: Select customer address for order processing
1377
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/).
1378
1045
  */
1379
1046
  async selectAddress(
1380
- { body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
1047
+ { body, xOrderingSource, cartId, buyNow, i, b, requestHeaders } = {
1048
+ requestHeaders: {},
1049
+ },
1381
1050
  { responseHeaders } = { responseHeaders: false }
1382
1051
  ) {
1383
- let invalidInput = [];
1384
- if (invalidInput.length) {
1385
- const error = new Error();
1386
- error.message = "Missing required field";
1387
- error.details = invalidInput;
1388
- return Promise.reject(new FDKClientValidationError(error));
1389
- }
1390
-
1391
1052
  const query_params = {};
1392
1053
  query_params["cart_id"] = cartId;
1393
1054
  query_params["buy_now"] = buyNow;
@@ -1395,6 +1056,7 @@ class Cart {
1395
1056
  query_params["b"] = b;
1396
1057
 
1397
1058
  const xHeaders = {};
1059
+ xHeaders["x-ordering-source"] = xOrderingSource;
1398
1060
 
1399
1061
  const response = await ApplicationAPIClient.execute(
1400
1062
  this._conf,
@@ -1420,29 +1082,23 @@ class Cart {
1420
1082
  /**
1421
1083
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1422
1084
  * @param {import("../ApplicationAPIClient").Options} - Options
1423
- * @returns {Promise<CartDetailResponse>} - Success response
1085
+ * @returns {Promise<CartDetailResult>} - Success response
1424
1086
  * @name selectPaymentMode
1425
1087
  * @summary: Select payment mode
1426
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/).
1427
1089
  */
1428
1090
  async selectPaymentMode(
1429
- { body, id, buyNow, orderType, requestHeaders } = { requestHeaders: {} },
1091
+ { body, xOrderingSource, id, buyNow, requestHeaders } = {
1092
+ requestHeaders: {},
1093
+ },
1430
1094
  { responseHeaders } = { responseHeaders: false }
1431
1095
  ) {
1432
- let invalidInput = [];
1433
- if (invalidInput.length) {
1434
- const error = new Error();
1435
- error.message = "Missing required field";
1436
- error.details = invalidInput;
1437
- return Promise.reject(new FDKClientValidationError(error));
1438
- }
1439
-
1440
1096
  const query_params = {};
1441
1097
  query_params["id"] = id;
1442
1098
  query_params["buy_now"] = buyNow;
1443
- query_params["order_type"] = orderType;
1444
1099
 
1445
1100
  const xHeaders = {};
1101
+ xHeaders["x-ordering-source"] = xOrderingSource;
1446
1102
 
1447
1103
  const response = await ApplicationAPIClient.execute(
1448
1104
  this._conf,
@@ -1468,7 +1124,7 @@ class Cart {
1468
1124
  /**
1469
1125
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1470
1126
  * @param {import("../ApplicationAPIClient").Options} - Options
1471
- * @returns {Promise<UpdateAddressResponse>} - Success response
1127
+ * @returns {Promise<UpdateAddressResult>} - Success response
1472
1128
  * @name updateAddress
1473
1129
  * @summary: Updates an existing customer address
1474
1130
  * @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
@@ -1477,18 +1133,12 @@ class Cart {
1477
1133
  { id, body, requestHeaders } = { requestHeaders: {} },
1478
1134
  { responseHeaders } = { responseHeaders: false }
1479
1135
  ) {
1480
- let invalidInput = [];
1481
-
1482
- if (!id) {
1483
- invalidInput.push({
1484
- message: `The 'id' field is required.`,
1485
- path: ["id"],
1136
+ const errors = validateRequiredParams(arguments[0], ["id"]);
1137
+ if (errors.length > 0) {
1138
+ const error = new FDKClientValidationError({
1139
+ message: "Missing required field",
1140
+ details: errors,
1486
1141
  });
1487
- }
1488
- if (invalidInput.length) {
1489
- const error = new Error();
1490
- error.message = "Missing required field";
1491
- error.details = invalidInput;
1492
1142
  return Promise.reject(new FDKClientValidationError(error));
1493
1143
  }
1494
1144
 
@@ -1520,14 +1170,15 @@ class Cart {
1520
1170
  /**
1521
1171
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1522
1172
  * @param {import("../ApplicationAPIClient").Options} - Options
1523
- * @returns {Promise<UpdateCartDetailResponse>} - Success response
1173
+ * @returns {Promise<UpdateCartDetailResult>} - Success response
1524
1174
  * @name updateCart
1525
- * @summary: Update items in the cart
1175
+ * @summary: Update cart items
1526
1176
  * @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/).
1527
1177
  */
1528
1178
  async updateCart(
1529
1179
  {
1530
1180
  body,
1181
+ xOrderingSource,
1531
1182
  id,
1532
1183
  i,
1533
1184
  b,
@@ -1539,14 +1190,6 @@ class Cart {
1539
1190
  } = { requestHeaders: {} },
1540
1191
  { responseHeaders } = { responseHeaders: false }
1541
1192
  ) {
1542
- let invalidInput = [];
1543
- if (invalidInput.length) {
1544
- const error = new Error();
1545
- error.message = "Missing required field";
1546
- error.details = invalidInput;
1547
- return Promise.reject(new FDKClientValidationError(error));
1548
- }
1549
-
1550
1193
  const query_params = {};
1551
1194
  query_params["id"] = id;
1552
1195
  query_params["i"] = i;
@@ -1557,6 +1200,7 @@ class Cart {
1557
1200
  query_params["order_type"] = orderType;
1558
1201
 
1559
1202
  const xHeaders = {};
1203
+ xHeaders["x-ordering-source"] = xOrderingSource;
1560
1204
 
1561
1205
  const response = await ApplicationAPIClient.execute(
1562
1206
  this._conf,
@@ -1582,23 +1226,60 @@ class Cart {
1582
1226
  /**
1583
1227
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1584
1228
  * @param {import("../ApplicationAPIClient").Options} - Options
1585
- * @returns {Promise<CartMetaResponse>} - Success response
1229
+ * @returns {Promise<UpdateCartDetailResult>} - Success response
1230
+ * @name updateCartBreakup
1231
+ * @summary: Update store credits into cart and their items
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/).
1233
+ */
1234
+ async updateCartBreakup(
1235
+ { body, xOrderingSource, id, i, b, buyNow, cartType, requestHeaders } = {
1236
+ requestHeaders: {},
1237
+ },
1238
+ { responseHeaders } = { responseHeaders: false }
1239
+ ) {
1240
+ const query_params = {};
1241
+ query_params["id"] = id;
1242
+ query_params["i"] = i;
1243
+ query_params["b"] = b;
1244
+ query_params["buy_now"] = buyNow;
1245
+ query_params["cart_type"] = cartType;
1246
+
1247
+ const xHeaders = {};
1248
+ xHeaders["x-ordering-source"] = xOrderingSource;
1249
+
1250
+ const response = await ApplicationAPIClient.execute(
1251
+ this._conf,
1252
+ "patch",
1253
+ constructUrl({
1254
+ url: this._urls["updateCartBreakup"],
1255
+ params: {},
1256
+ }),
1257
+ query_params,
1258
+ body,
1259
+ { ...xHeaders, ...requestHeaders },
1260
+ { responseHeaders }
1261
+ );
1262
+
1263
+ let responseData = response;
1264
+ if (responseHeaders) {
1265
+ responseData = response[0];
1266
+ }
1267
+
1268
+ return response;
1269
+ }
1270
+
1271
+ /**
1272
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1273
+ * @param {import("../ApplicationAPIClient").Options} - Options
1274
+ * @returns {Promise<CartMetaResult>} - Success response
1586
1275
  * @name updateCartMeta
1587
- * @summary: Update cart metadata.
1276
+ * @summary: Update cart metadata
1588
1277
  * @description: Update metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartMeta/).
1589
1278
  */
1590
1279
  async updateCartMeta(
1591
1280
  { body, id, buyNow, requestHeaders } = { requestHeaders: {} },
1592
1281
  { responseHeaders } = { responseHeaders: false }
1593
1282
  ) {
1594
- let invalidInput = [];
1595
- if (invalidInput.length) {
1596
- const error = new Error();
1597
- error.message = "Missing required field";
1598
- error.details = invalidInput;
1599
- return Promise.reject(new FDKClientValidationError(error));
1600
- }
1601
-
1602
1283
  const query_params = {};
1603
1284
  query_params["id"] = id;
1604
1285
  query_params["buy_now"] = buyNow;
@@ -1629,38 +1310,25 @@ class Cart {
1629
1310
  /**
1630
1311
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1631
1312
  * @param {import("../ApplicationAPIClient").Options} - Options
1632
- * @returns {Promise<SharedCartResponse>} - Success response
1313
+ * @returns {Promise<SharedCartResult>} - Success response
1633
1314
  * @name updateCartWithSharedItems
1634
1315
  * @summary: Update with shared items
1635
1316
  * @description: Merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/).
1636
1317
  */
1637
1318
  async updateCartWithSharedItems(
1638
- { token, action, cartId, requestHeaders } = { requestHeaders: {} },
1319
+ { token, action, requestHeaders } = { requestHeaders: {} },
1639
1320
  { responseHeaders } = { responseHeaders: false }
1640
1321
  ) {
1641
- let invalidInput = [];
1642
-
1643
- if (!token) {
1644
- invalidInput.push({
1645
- message: `The 'token' field is required.`,
1646
- path: ["token"],
1322
+ const errors = validateRequiredParams(arguments[0], ["token", "action"]);
1323
+ if (errors.length > 0) {
1324
+ const error = new FDKClientValidationError({
1325
+ message: "Missing required field",
1326
+ details: errors,
1647
1327
  });
1648
- }
1649
- if (!action) {
1650
- invalidInput.push({
1651
- message: `The 'action' field is required.`,
1652
- path: ["action"],
1653
- });
1654
- }
1655
- if (invalidInput.length) {
1656
- const error = new Error();
1657
- error.message = "Missing required field";
1658
- error.details = invalidInput;
1659
1328
  return Promise.reject(new FDKClientValidationError(error));
1660
1329
  }
1661
1330
 
1662
1331
  const query_params = {};
1663
- query_params["cart_id"] = cartId;
1664
1332
 
1665
1333
  const xHeaders = {};
1666
1334
 
@@ -1695,6 +1363,7 @@ class Cart {
1695
1363
  */
1696
1364
  async validateCouponForPayment(
1697
1365
  {
1366
+ xOrderingSource,
1698
1367
  id,
1699
1368
  buyNow,
1700
1369
  addressId,
@@ -1711,14 +1380,6 @@ class Cart {
1711
1380
  } = { requestHeaders: {} },
1712
1381
  { responseHeaders } = { responseHeaders: false }
1713
1382
  ) {
1714
- let invalidInput = [];
1715
- if (invalidInput.length) {
1716
- const error = new Error();
1717
- error.message = "Missing required field";
1718
- error.details = invalidInput;
1719
- return Promise.reject(new FDKClientValidationError(error));
1720
- }
1721
-
1722
1383
  const query_params = {};
1723
1384
  query_params["id"] = id;
1724
1385
  query_params["buy_now"] = buyNow;
@@ -1734,6 +1395,7 @@ class Cart {
1734
1395
  query_params["cart_type"] = cartType;
1735
1396
 
1736
1397
  const xHeaders = {};
1398
+ xHeaders["x-ordering-source"] = xOrderingSource;
1737
1399
 
1738
1400
  const response = await ApplicationAPIClient.execute(
1739
1401
  this._conf,