@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.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 (310) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  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 +93 -113
  6. package/sdk/application/Cart/CartApplicationClient.js +157 -530
  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 +65 -55
  16. package/sdk/application/Content/ContentApplicationClient.js +211 -341
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
  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 +32 -87
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
  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 +18 -62
  46. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
  47. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
  49. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
  50. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
  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 +15 -406
  88. package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
  89. package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
  90. package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
  98. package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
  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 +236 -376
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
  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 +314 -422
  120. package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
  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 -68
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
  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 -20
  128. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
  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 +565 -1282
  136. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
  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 -246
  140. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
  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 +2374 -877
  146. package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
  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 +421 -418
  180. package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
  181. package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
  182. package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
  183. package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
  184. package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
  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 +934 -2452
  191. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
  192. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -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 +1327 -3529
  196. package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
  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 -513
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
  213. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
  214. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
  215. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
  216. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
  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 -4
  222. package/sdk/platform/Share/SharePlatformModel.js +45 -3
  223. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
  224. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
  225. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
  226. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
  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 -2
  272. package/sdk/public/PublicClient.js +2 -2
  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 -1
  280. package/sdk/public/index.js +1 -1
  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
  305. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
  306. package/sdk/public/Billing/BillingPublicClient.js +0 -397
  307. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
  308. package/sdk/public/Billing/BillingPublicModel.js +0 -560
  309. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
  310. package/sdk/public/Billing/BillingPublicValidator.js +0 -50
@@ -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,23 +65,15 @@ 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
- * @summary: Create a new address
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/).
74
72
  */
75
73
  async addAddress(
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,40 +102,23 @@ 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/).
119
109
  */
120
110
  async addItems(
121
- {
122
- body,
123
- i,
124
- b,
125
- areaCode,
126
- buyNow,
127
- id,
128
- cartType,
129
- orderType,
130
- requestHeaders,
131
- } = { requestHeaders: {} },
111
+ { body, i, b, areaCode, buyNow, id, orderType, requestHeaders } = {
112
+ requestHeaders: {},
113
+ },
132
114
  { responseHeaders } = { responseHeaders: false }
133
115
  ) {
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
116
  const query_params = {};
143
117
  query_params["i"] = i;
144
118
  query_params["b"] = b;
145
119
  query_params["area_code"] = areaCode;
146
120
  query_params["buy_now"] = buyNow;
147
121
  query_params["id"] = id;
148
- query_params["cart_type"] = cartType;
149
122
  query_params["order_type"] = orderType;
150
123
 
151
124
  const xHeaders = {};
@@ -174,9 +147,9 @@ class Cart {
174
147
  /**
175
148
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
176
149
  * @param {import("../ApplicationAPIClient").Options} - Options
177
- * @returns {Promise<CartDetailResponse>} - Success response
150
+ * @returns {Promise<CartDetailResult>} - Success response
178
151
  * @name applyCoupon
179
- * @summary: Apply coupon.
152
+ * @summary: Apply coupon
180
153
  * @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
154
  */
182
155
  async applyCoupon(
@@ -185,14 +158,6 @@ class Cart {
185
158
  },
186
159
  { responseHeaders } = { responseHeaders: false }
187
160
  ) {
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
161
  const query_params = {};
197
162
  query_params["i"] = i;
198
163
  query_params["b"] = b;
@@ -227,31 +192,20 @@ class Cart {
227
192
  /**
228
193
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
229
194
  * @param {import("../ApplicationAPIClient").Options} - Options
230
- * @returns {Promise<CartDetailResponse>} - Success response
195
+ * @returns {Promise<CartDetailResult>} - Success response
231
196
  * @name applyRewardPoints
232
- * @summary: Use reward points.
197
+ * @summary: Use reward points
233
198
  * @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
199
  */
235
200
  async applyRewardPoints(
236
- { body, id, i, b, buyNow, cartType, requestHeaders } = {
237
- requestHeaders: {},
238
- },
201
+ { body, id, i, b, buyNow, requestHeaders } = { requestHeaders: {} },
239
202
  { responseHeaders } = { responseHeaders: false }
240
203
  ) {
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
204
  const query_params = {};
250
205
  query_params["id"] = id;
251
206
  query_params["i"] = i;
252
207
  query_params["b"] = b;
253
208
  query_params["buy_now"] = buyNow;
254
- query_params["cart_type"] = cartType;
255
209
 
256
210
  const xHeaders = {};
257
211
 
@@ -279,7 +233,7 @@ class Cart {
279
233
  /**
280
234
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
281
235
  * @param {import("../ApplicationAPIClient").Options} - Options
282
- * @returns {Promise<CartCheckoutResponse>} - Success response
236
+ * @returns {Promise<CartCheckoutResult>} - Success response
283
237
  * @name checkoutCart
284
238
  * @summary: Checkout cart
285
239
  * @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/).
@@ -288,14 +242,6 @@ class Cart {
288
242
  { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
289
243
  { responseHeaders } = { responseHeaders: false }
290
244
  ) {
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
245
  const query_params = {};
300
246
  query_params["buy_now"] = buyNow;
301
247
  query_params["cart_type"] = cartType;
@@ -326,23 +272,15 @@ class Cart {
326
272
  /**
327
273
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
328
274
  * @param {import("../ApplicationAPIClient").Options} - Options
329
- * @returns {Promise<CartCheckoutResponse>} - Success response
275
+ * @returns {Promise<CartCheckoutResult>} - Success response
330
276
  * @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/).
277
+ * @summary: Checkout cart
278
+ * @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
279
  */
334
280
  async checkoutCartV2(
335
281
  { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
336
282
  { responseHeaders } = { responseHeaders: false }
337
283
  ) {
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
284
  const query_params = {};
347
285
  query_params["buy_now"] = buyNow;
348
286
  query_params["cart_type"] = cartType;
@@ -373,26 +311,17 @@ class Cart {
373
311
  /**
374
312
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
375
313
  * @param {import("../ApplicationAPIClient").Options} - Options
376
- * @returns {Promise<DeleteCartDetailResponse>} - Success response
314
+ * @returns {Promise<DeleteCartDetailResult>} - Success response
377
315
  * @name deleteCart
378
- * @summary: Clears the cart
316
+ * @summary: Delete a cart
379
317
  * @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
318
  */
381
319
  async deleteCart(
382
- { body, id, cartType, requestHeaders } = { requestHeaders: {} },
320
+ { id, requestHeaders } = { requestHeaders: {} },
383
321
  { responseHeaders } = { responseHeaders: false }
384
322
  ) {
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
323
  const query_params = {};
394
324
  query_params["id"] = id;
395
- query_params["cart_type"] = cartType;
396
325
 
397
326
  const xHeaders = {};
398
327
 
@@ -404,7 +333,7 @@ class Cart {
404
333
  params: {},
405
334
  }),
406
335
  query_params,
407
- body,
336
+ undefined,
408
337
  { ...xHeaders, ...requestHeaders },
409
338
  { responseHeaders }
410
339
  );
@@ -422,7 +351,7 @@ class Cart {
422
351
  * @param {import("../ApplicationAPIClient").Options} - Options
423
352
  * @returns {Promise<Address>} - Success response
424
353
  * @name getAddressById
425
- * @summary: Fetch address.
354
+ * @summary: Get details for a single customer address
426
355
  * @description: Get a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
427
356
  */
428
357
  async getAddressById(
@@ -434,23 +363,16 @@ class Cart {
434
363
  checkoutMode,
435
364
  tags,
436
365
  isDefault,
437
- userId,
438
366
  requestHeaders,
439
367
  } = { requestHeaders: {} },
440
368
  { responseHeaders } = { responseHeaders: false }
441
369
  ) {
442
- let invalidInput = [];
443
-
444
- if (!id) {
445
- invalidInput.push({
446
- message: `The 'id' field is required.`,
447
- path: ["id"],
370
+ const errors = validateRequiredParams(arguments[0], ["id"]);
371
+ if (errors.length > 0) {
372
+ const error = new FDKClientValidationError({
373
+ message: "Missing required field",
374
+ details: errors,
448
375
  });
449
- }
450
- if (invalidInput.length) {
451
- const error = new Error();
452
- error.message = "Missing required field";
453
- error.details = invalidInput;
454
376
  return Promise.reject(new FDKClientValidationError(error));
455
377
  }
456
378
 
@@ -461,7 +383,6 @@ class Cart {
461
383
  query_params["checkout_mode"] = checkoutMode;
462
384
  query_params["tags"] = tags;
463
385
  query_params["is_default"] = isDefault;
464
- query_params["user_id"] = userId;
465
386
 
466
387
  const xHeaders = {};
467
388
 
@@ -489,9 +410,9 @@ class Cart {
489
410
  /**
490
411
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
491
412
  * @param {import("../ApplicationAPIClient").Options} - Options
492
- * @returns {Promise<GetAddressesResponse>} - Success response
413
+ * @returns {Promise<GetAddressesResult>} - Success response
493
414
  * @name getAddresses
494
- * @summary: Get saved addresses.
415
+ * @summary: Get a list of addresses for a customer
495
416
  * @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/).
496
417
  */
497
418
  async getAddresses(
@@ -502,19 +423,10 @@ class Cart {
502
423
  checkoutMode,
503
424
  tags,
504
425
  isDefault,
505
- userId,
506
426
  requestHeaders,
507
427
  } = { requestHeaders: {} },
508
428
  { responseHeaders } = { responseHeaders: false }
509
429
  ) {
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
430
  const query_params = {};
519
431
  query_params["cart_id"] = cartId;
520
432
  query_params["buy_now"] = buyNow;
@@ -522,7 +434,6 @@ class Cart {
522
434
  query_params["checkout_mode"] = checkoutMode;
523
435
  query_params["tags"] = tags;
524
436
  query_params["is_default"] = isDefault;
525
- query_params["user_id"] = userId;
526
437
 
527
438
  const xHeaders = {};
528
439
 
@@ -550,31 +461,20 @@ class Cart {
550
461
  /**
551
462
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
552
463
  * @param {import("../ApplicationAPIClient").Options} - Options
553
- * @returns {Promise<BulkPriceResponse>} - Success response
464
+ * @returns {Promise<BulkPriceResult>} - Success response
554
465
  * @name getBulkDiscountOffers
555
- * @summary: Bulk discounts.
466
+ * @summary: List bulk discounts
556
467
  * @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
468
  */
558
469
  async getBulkDiscountOffers(
559
- { itemId, articleId, uid, slug, cartType, requestHeaders } = {
560
- requestHeaders: {},
561
- },
470
+ { itemId, articleId, uid, slug, requestHeaders } = { requestHeaders: {} },
562
471
  { responseHeaders } = { responseHeaders: false }
563
472
  ) {
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
473
  const query_params = {};
573
474
  query_params["item_id"] = itemId;
574
475
  query_params["article_id"] = articleId;
575
476
  query_params["uid"] = uid;
576
477
  query_params["slug"] = slug;
577
- query_params["cart_type"] = cartType;
578
478
 
579
479
  const xHeaders = {};
580
480
 
@@ -602,9 +502,9 @@ class Cart {
602
502
  /**
603
503
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
604
504
  * @param {import("../ApplicationAPIClient").Options} - Options
605
- * @returns {Promise<CartDetailResponse>} - Success response
505
+ * @returns {Promise<CartDetailResult>} - Success response
606
506
  * @name getCart
607
- * @summary: Retrieve cart details.
507
+ * @summary: Get a cart
608
508
  * @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
509
  */
610
510
  async getCart(
@@ -616,20 +516,11 @@ class Cart {
616
516
  assignCardId,
617
517
  areaCode,
618
518
  buyNow,
619
- cartType,
620
519
  orderType,
621
520
  requestHeaders,
622
521
  } = { requestHeaders: {} },
623
522
  { responseHeaders } = { responseHeaders: false }
624
523
  ) {
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
524
  const query_params = {};
634
525
  query_params["id"] = id;
635
526
  query_params["i"] = i;
@@ -638,7 +529,6 @@ class Cart {
638
529
  query_params["assign_card_id"] = assignCardId;
639
530
  query_params["area_code"] = areaCode;
640
531
  query_params["buy_now"] = buyNow;
641
- query_params["cart_type"] = cartType;
642
532
  query_params["order_type"] = orderType;
643
533
 
644
534
  const xHeaders = {};
@@ -676,14 +566,6 @@ class Cart {
676
566
  { id, requestHeaders } = { requestHeaders: {} },
677
567
  { responseHeaders } = { responseHeaders: false }
678
568
  ) {
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
569
  const query_params = {};
688
570
  query_params["id"] = id;
689
571
 
@@ -713,120 +595,15 @@ class Cart {
713
595
  /**
714
596
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
715
597
  * @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
598
+ * @returns {Promise<GetShareCartLinkResult>} - Success response
814
599
  * @name getCartShareLink
815
- * @summary: Share cart link.
600
+ * @summary: Create share cart link
816
601
  * @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/).
817
602
  */
818
603
  async getCartShareLink(
819
604
  { body, requestHeaders } = { requestHeaders: {} },
820
605
  { responseHeaders } = { responseHeaders: false }
821
606
  ) {
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
607
  const query_params = {};
831
608
 
832
609
  const xHeaders = {};
@@ -855,27 +632,21 @@ class Cart {
855
632
  /**
856
633
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
857
634
  * @param {import("../ApplicationAPIClient").Options} - Options
858
- * @returns {Promise<SharedCartResponse>} - Success response
635
+ * @returns {Promise<SharedCartResult>} - Success response
859
636
  * @name getCartSharedItems
860
- * @summary: Shared cart items.
637
+ * @summary: List shared cart items
861
638
  * @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/).
862
639
  */
863
640
  async getCartSharedItems(
864
641
  { token, requestHeaders } = { requestHeaders: {} },
865
642
  { responseHeaders } = { responseHeaders: false }
866
643
  ) {
867
- let invalidInput = [];
868
-
869
- if (!token) {
870
- invalidInput.push({
871
- message: `The 'token' field is required.`,
872
- path: ["token"],
644
+ const errors = validateRequiredParams(arguments[0], ["token"]);
645
+ if (errors.length > 0) {
646
+ const error = new FDKClientValidationError({
647
+ message: "Missing required field",
648
+ details: errors,
873
649
  });
874
- }
875
- if (invalidInput.length) {
876
- const error = new Error();
877
- error.message = "Missing required field";
878
- error.details = invalidInput;
879
650
  return Promise.reject(new FDKClientValidationError(error));
880
651
  }
881
652
 
@@ -907,23 +678,15 @@ class Cart {
907
678
  /**
908
679
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
909
680
  * @param {import("../ApplicationAPIClient").Options} - Options
910
- * @returns {Promise<GetCouponResponse>} - Success response
681
+ * @returns {Promise<GetCouponResult>} - Success response
911
682
  * @name getCoupons
912
- * @summary: List available coupons.
683
+ * @summary: List available coupons
913
684
  * @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
685
  */
915
686
  async getCoupons(
916
687
  { id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
917
688
  { responseHeaders } = { responseHeaders: false }
918
689
  ) {
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
690
  const query_params = {};
928
691
  query_params["id"] = id;
929
692
  query_params["buy_now"] = buyNow;
@@ -956,23 +719,15 @@ class Cart {
956
719
  /**
957
720
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
958
721
  * @param {import("../ApplicationAPIClient").Options} - Options
959
- * @returns {Promise<CartItemCountResponse>} - Success response
722
+ * @returns {Promise<CartItemCountResult>} - Success response
960
723
  * @name getItemCount
961
- * @summary: Count cart items.
724
+ * @summary: Get a cart items count
962
725
  * @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
726
  */
964
727
  async getItemCount(
965
728
  { id, buyNow, requestHeaders } = { requestHeaders: {} },
966
729
  { responseHeaders } = { responseHeaders: false }
967
730
  ) {
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
731
  const query_params = {};
977
732
  query_params["id"] = id;
978
733
  query_params["buy_now"] = buyNow;
@@ -1000,59 +755,12 @@ class Cart {
1000
755
  return response;
1001
756
  }
1002
757
 
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
758
  /**
1051
759
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1052
760
  * @param {import("../ApplicationAPIClient").Options} - Options
1053
761
  * @returns {Promise<LadderPriceOffers>} - Success response
1054
762
  * @name getLadderOffers
1055
- * @summary: Fetches ladder offers.
763
+ * @summary: List ladder offers
1056
764
  * @description: Get ladder offers associated for the items in the cart. Ladder offers provide discounts or special pricing based on item quantity, allowing users to benefit from bulk purchases or promotional deals. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getLadderOffers/).
1057
765
  */
1058
766
  async getLadderOffers(
@@ -1061,21 +769,6 @@ class Cart {
1061
769
  },
1062
770
  { responseHeaders } = { responseHeaders: false }
1063
771
  ) {
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
772
  const query_params = {};
1080
773
  query_params["slug"] = slug;
1081
774
  query_params["store_id"] = storeId;
@@ -1108,26 +801,23 @@ class Cart {
1108
801
  /**
1109
802
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1110
803
  * @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/).
804
+ * @returns {Promise<PromotionOffersResult>} - Success response
805
+ * @name getPromotionOffers
806
+ * @summary: List available promotion offers
807
+ * @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
808
  */
1116
- async getPaymentPromotionOffers(
1117
- { id, uid, requestHeaders } = { requestHeaders: {} },
809
+ async getPromotionOffers(
810
+ { slug, pageSize, promotionGroup, storeId, cartType, requestHeaders } = {
811
+ requestHeaders: {},
812
+ },
1118
813
  { responseHeaders } = { responseHeaders: false }
1119
814
  ) {
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
815
  const query_params = {};
1129
- query_params["id"] = id;
1130
- query_params["uid"] = uid;
816
+ query_params["slug"] = slug;
817
+ query_params["page_size"] = pageSize;
818
+ query_params["promotion_group"] = promotionGroup;
819
+ query_params["store_id"] = storeId;
820
+ query_params["cart_type"] = cartType;
1131
821
 
1132
822
  const xHeaders = {};
1133
823
 
@@ -1135,7 +825,7 @@ class Cart {
1135
825
  this._conf,
1136
826
  "get",
1137
827
  constructUrl({
1138
- url: this._urls["getPaymentPromotionOffers"],
828
+ url: this._urls["getPromotionOffers"],
1139
829
  params: {},
1140
830
  }),
1141
831
  query_params,
@@ -1155,30 +845,18 @@ class Cart {
1155
845
  /**
1156
846
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1157
847
  * @param {import("../ApplicationAPIClient").Options} - Options
1158
- * @returns {Promise<PromotionOffersResponse>} - Success response
1159
- * @name getPromotionOffers
1160
- * @summary: Retrieves promotional 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/).
848
+ * @returns {Promise<PromotionPaymentOffersResult>} - Success response
849
+ * @name getPromotionPaymentOffers
850
+ * @summary: Fetch available promotions payment offers
851
+ * @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
852
  */
1163
- async getPromotionOffers(
1164
- { slug, pageSize, promotionGroup, storeId, requestHeaders } = {
1165
- requestHeaders: {},
1166
- },
853
+ async getPromotionPaymentOffers(
854
+ { id, uid, requestHeaders } = { requestHeaders: {} },
1167
855
  { responseHeaders } = { responseHeaders: false }
1168
856
  ) {
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
857
  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;
858
+ query_params["id"] = id;
859
+ query_params["uid"] = uid;
1182
860
 
1183
861
  const xHeaders = {};
1184
862
 
@@ -1186,7 +864,7 @@ class Cart {
1186
864
  this._conf,
1187
865
  "get",
1188
866
  constructUrl({
1189
- url: this._urls["getPromotionOffers"],
867
+ url: this._urls["getPromotionPaymentOffers"],
1190
868
  params: {},
1191
869
  }),
1192
870
  query_params,
@@ -1206,38 +884,18 @@ class Cart {
1206
884
  /**
1207
885
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1208
886
  * @param {import("../ApplicationAPIClient").Options} - Options
1209
- * @returns {Promise<CartShipmentsResponse>} - Success response
887
+ * @returns {Promise<CartShipmentsResult>} - Success response
1210
888
  * @name getShipments
1211
- * @summary: List shipments.
889
+ * @summary: List shipments
1212
890
  * @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
891
  */
1214
892
  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: {} },
893
+ { p, id, buyNow, addressId, areaCode, orderType, requestHeaders } = {
894
+ requestHeaders: {},
895
+ },
1227
896
  { responseHeaders } = { responseHeaders: false }
1228
897
  ) {
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
898
  const query_params = {};
1238
- query_params["pick_at_store_uid"] = pickAtStoreUid;
1239
- query_params["ordering_store_id"] = orderingStoreId;
1240
- query_params["i"] = i;
1241
899
  query_params["p"] = p;
1242
900
  query_params["id"] = id;
1243
901
  query_params["buy_now"] = buyNow;
@@ -1271,27 +929,21 @@ class Cart {
1271
929
  /**
1272
930
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1273
931
  * @param {import("../ApplicationAPIClient").Options} - Options
1274
- * @returns {Promise<DeleteAddressResponse>} - Success response
932
+ * @returns {Promise<DeleteAddressResult>} - Success response
1275
933
  * @name removeAddress
1276
- * @summary: Delete a address
934
+ * @summary: Removes an address from a customer's address list
1277
935
  * @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
1278
936
  */
1279
937
  async removeAddress(
1280
938
  { id, requestHeaders } = { requestHeaders: {} },
1281
939
  { responseHeaders } = { responseHeaders: false }
1282
940
  ) {
1283
- let invalidInput = [];
1284
-
1285
- if (!id) {
1286
- invalidInput.push({
1287
- message: `The 'id' field is required.`,
1288
- path: ["id"],
941
+ const errors = validateRequiredParams(arguments[0], ["id"]);
942
+ if (errors.length > 0) {
943
+ const error = new FDKClientValidationError({
944
+ message: "Missing required field",
945
+ details: errors,
1289
946
  });
1290
- }
1291
- if (invalidInput.length) {
1292
- const error = new Error();
1293
- error.message = "Missing required field";
1294
- error.details = invalidInput;
1295
947
  return Promise.reject(new FDKClientValidationError(error));
1296
948
  }
1297
949
 
@@ -1323,27 +975,18 @@ class Cart {
1323
975
  /**
1324
976
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1325
977
  * @param {import("../ApplicationAPIClient").Options} - Options
1326
- * @returns {Promise<CartDetailResponse>} - Success response
978
+ * @returns {Promise<CartDetailResult>} - Success response
1327
979
  * @name removeCoupon
1328
- * @summary: Remove coupon.
980
+ * @summary: Remove coupon
1329
981
  * @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
982
  */
1331
983
  async removeCoupon(
1332
- { id, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
984
+ { id, buyNow, requestHeaders } = { requestHeaders: {} },
1333
985
  { responseHeaders } = { responseHeaders: false }
1334
986
  ) {
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
987
  const query_params = {};
1344
988
  query_params["id"] = id;
1345
989
  query_params["buy_now"] = buyNow;
1346
- query_params["cart_type"] = cartType;
1347
990
 
1348
991
  const xHeaders = {};
1349
992
 
@@ -1371,23 +1014,15 @@ class Cart {
1371
1014
  /**
1372
1015
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1373
1016
  * @param {import("../ApplicationAPIClient").Options} - Options
1374
- * @returns {Promise<CartDetailResponse>} - Success response
1017
+ * @returns {Promise<CartDetailResult>} - Success response
1375
1018
  * @name selectAddress
1376
- * @summary: Select a delivery address
1019
+ * @summary: Select customer address for order processing
1377
1020
  * @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
1021
  */
1379
1022
  async selectAddress(
1380
1023
  { body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
1381
1024
  { responseHeaders } = { responseHeaders: false }
1382
1025
  ) {
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
1026
  const query_params = {};
1392
1027
  query_params["cart_id"] = cartId;
1393
1028
  query_params["buy_now"] = buyNow;
@@ -1420,27 +1055,18 @@ class Cart {
1420
1055
  /**
1421
1056
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1422
1057
  * @param {import("../ApplicationAPIClient").Options} - Options
1423
- * @returns {Promise<CartDetailResponse>} - Success response
1058
+ * @returns {Promise<CartDetailResult>} - Success response
1424
1059
  * @name selectPaymentMode
1425
- * @summary: Pick payment method.
1060
+ * @summary: Select payment mode
1426
1061
  * @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
1062
  */
1428
1063
  async selectPaymentMode(
1429
- { body, id, buyNow, orderType, requestHeaders } = { requestHeaders: {} },
1064
+ { body, id, buyNow, requestHeaders } = { requestHeaders: {} },
1430
1065
  { responseHeaders } = { responseHeaders: false }
1431
1066
  ) {
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
1067
  const query_params = {};
1441
1068
  query_params["id"] = id;
1442
1069
  query_params["buy_now"] = buyNow;
1443
- query_params["order_type"] = orderType;
1444
1070
 
1445
1071
  const xHeaders = {};
1446
1072
 
@@ -1468,27 +1094,21 @@ class Cart {
1468
1094
  /**
1469
1095
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1470
1096
  * @param {import("../ApplicationAPIClient").Options} - Options
1471
- * @returns {Promise<UpdateAddressResponse>} - Success response
1097
+ * @returns {Promise<UpdateAddressResult>} - Success response
1472
1098
  * @name updateAddress
1473
- * @summary: Update address.
1099
+ * @summary: Updates an existing customer address
1474
1100
  * @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/).
1475
1101
  */
1476
1102
  async updateAddress(
1477
1103
  { id, body, requestHeaders } = { requestHeaders: {} },
1478
1104
  { responseHeaders } = { responseHeaders: false }
1479
1105
  ) {
1480
- let invalidInput = [];
1481
-
1482
- if (!id) {
1483
- invalidInput.push({
1484
- message: `The 'id' field is required.`,
1485
- path: ["id"],
1106
+ const errors = validateRequiredParams(arguments[0], ["id"]);
1107
+ if (errors.length > 0) {
1108
+ const error = new FDKClientValidationError({
1109
+ message: "Missing required field",
1110
+ details: errors,
1486
1111
  });
1487
- }
1488
- if (invalidInput.length) {
1489
- const error = new Error();
1490
- error.message = "Missing required field";
1491
- error.details = invalidInput;
1492
1112
  return Promise.reject(new FDKClientValidationError(error));
1493
1113
  }
1494
1114
 
@@ -1520,9 +1140,9 @@ class Cart {
1520
1140
  /**
1521
1141
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1522
1142
  * @param {import("../ApplicationAPIClient").Options} - Options
1523
- * @returns {Promise<UpdateCartDetailResponse>} - Success response
1143
+ * @returns {Promise<UpdateCartDetailResult>} - Success response
1524
1144
  * @name updateCart
1525
- * @summary: Update items in the cart
1145
+ * @summary: Update cart items
1526
1146
  * @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
1147
  */
1528
1148
  async updateCart(
@@ -1539,14 +1159,6 @@ class Cart {
1539
1159
  } = { requestHeaders: {} },
1540
1160
  { responseHeaders } = { responseHeaders: false }
1541
1161
  ) {
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
1162
  const query_params = {};
1551
1163
  query_params["id"] = id;
1552
1164
  query_params["i"] = i;
@@ -1582,23 +1194,59 @@ class Cart {
1582
1194
  /**
1583
1195
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1584
1196
  * @param {import("../ApplicationAPIClient").Options} - Options
1585
- * @returns {Promise<CartMetaResponse>} - Success response
1197
+ * @returns {Promise<UpdateCartDetailResult>} - Success response
1198
+ * @name updateCartBreakup
1199
+ * @summary: Update store credits into cart and their items
1200
+ * @description: Update cart. Customers can adjust the cart breakup by applying or removing store credits as needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartBreakup/).
1201
+ */
1202
+ async updateCartBreakup(
1203
+ { body, id, i, b, buyNow, cartType, requestHeaders } = {
1204
+ requestHeaders: {},
1205
+ },
1206
+ { responseHeaders } = { responseHeaders: false }
1207
+ ) {
1208
+ const query_params = {};
1209
+ query_params["id"] = id;
1210
+ query_params["i"] = i;
1211
+ query_params["b"] = b;
1212
+ query_params["buy_now"] = buyNow;
1213
+ query_params["cart_type"] = cartType;
1214
+
1215
+ const xHeaders = {};
1216
+
1217
+ const response = await ApplicationAPIClient.execute(
1218
+ this._conf,
1219
+ "patch",
1220
+ constructUrl({
1221
+ url: this._urls["updateCartBreakup"],
1222
+ params: {},
1223
+ }),
1224
+ query_params,
1225
+ body,
1226
+ { ...xHeaders, ...requestHeaders },
1227
+ { responseHeaders }
1228
+ );
1229
+
1230
+ let responseData = response;
1231
+ if (responseHeaders) {
1232
+ responseData = response[0];
1233
+ }
1234
+
1235
+ return response;
1236
+ }
1237
+
1238
+ /**
1239
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1240
+ * @param {import("../ApplicationAPIClient").Options} - Options
1241
+ * @returns {Promise<CartMetaResult>} - Success response
1586
1242
  * @name updateCartMeta
1587
- * @summary: Update cart metadata.
1243
+ * @summary: Update cart metadata
1588
1244
  * @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
1245
  */
1590
1246
  async updateCartMeta(
1591
1247
  { body, id, buyNow, requestHeaders } = { requestHeaders: {} },
1592
1248
  { responseHeaders } = { responseHeaders: false }
1593
1249
  ) {
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
1250
  const query_params = {};
1603
1251
  query_params["id"] = id;
1604
1252
  query_params["buy_now"] = buyNow;
@@ -1629,38 +1277,25 @@ class Cart {
1629
1277
  /**
1630
1278
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1631
1279
  * @param {import("../ApplicationAPIClient").Options} - Options
1632
- * @returns {Promise<SharedCartResponse>} - Success response
1280
+ * @returns {Promise<SharedCartResult>} - Success response
1633
1281
  * @name updateCartWithSharedItems
1634
- * @summary: Merge or replace existing cart
1282
+ * @summary: Update with shared items
1635
1283
  * @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
1284
  */
1637
1285
  async updateCartWithSharedItems(
1638
- { token, action, cartId, requestHeaders } = { requestHeaders: {} },
1286
+ { token, action, requestHeaders } = { requestHeaders: {} },
1639
1287
  { responseHeaders } = { responseHeaders: false }
1640
1288
  ) {
1641
- let invalidInput = [];
1642
-
1643
- if (!token) {
1644
- invalidInput.push({
1645
- message: `The 'token' field is required.`,
1646
- path: ["token"],
1289
+ const errors = validateRequiredParams(arguments[0], ["token", "action"]);
1290
+ if (errors.length > 0) {
1291
+ const error = new FDKClientValidationError({
1292
+ message: "Missing required field",
1293
+ details: errors,
1647
1294
  });
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
1295
  return Promise.reject(new FDKClientValidationError(error));
1660
1296
  }
1661
1297
 
1662
1298
  const query_params = {};
1663
- query_params["cart_id"] = cartId;
1664
1299
 
1665
1300
  const xHeaders = {};
1666
1301
 
@@ -1690,7 +1325,7 @@ class Cart {
1690
1325
  * @param {import("../ApplicationAPIClient").Options} - Options
1691
1326
  * @returns {Promise<PaymentCouponValidate>} - Success response
1692
1327
  * @name validateCouponForPayment
1693
- * @summary: Validate coupon.
1328
+ * @summary: Validate applied coupon
1694
1329
  * @description: Validate the applicability of a coupon code for the selected payment mode for the existing cart. This ensures the coupon's validity before proceeding with the payment process, enhancing user experience and preventing potential errors during transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/validateCouponForPayment/).
1695
1330
  */
1696
1331
  async validateCouponForPayment(
@@ -1711,14 +1346,6 @@ class Cart {
1711
1346
  } = { requestHeaders: {} },
1712
1347
  { responseHeaders } = { responseHeaders: false }
1713
1348
  ) {
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
1349
  const query_params = {};
1723
1350
  query_params["id"] = id;
1724
1351
  query_params["buy_now"] = buyNow;