@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.10

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 (326) hide show
  1. package/README.md +2 -2
  2. package/application.d.ts +1 -2
  3. package/application.js +2 -3
  4. package/index.d.ts +1 -2
  5. package/index.js +7 -1
  6. package/package.json +2 -3
  7. package/sdk/application/ApplicationClient.d.ts +0 -2
  8. package/sdk/application/ApplicationClient.js +0 -20
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +55 -97
  10. package/sdk/application/Cart/CartApplicationClient.js +60 -1262
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -162
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1313
  13. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -9
  14. package/sdk/application/Common/CommonApplicationClient.js +5 -90
  15. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
  16. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -80
  18. package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -725
  19. package/sdk/application/Content/ContentApplicationClient.d.ts +63 -85
  20. package/sdk/application/Content/ContentApplicationClient.js +126 -942
  21. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -15
  22. package/sdk/application/FileStorage/FileStorageApplicationClient.js +26 -130
  23. package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -17
  24. package/sdk/application/Lead/LeadApplicationClient.js +32 -201
  25. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -62
  26. package/sdk/application/Logistic/LogisticApplicationClient.js +51 -647
  27. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -56
  28. package/sdk/application/Order/OrderApplicationClient.js +86 -555
  29. package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -209
  30. package/sdk/application/Payment/PaymentApplicationClient.js +57 -2099
  31. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -26
  32. package/sdk/application/Rewards/RewardsApplicationClient.js +17 -303
  33. package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
  34. package/sdk/application/Share/ShareApplicationClient.js +34 -294
  35. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
  36. package/sdk/application/Theme/ThemeApplicationClient.js +30 -166
  37. package/sdk/application/User/UserApplicationClient.d.ts +87 -138
  38. package/sdk/application/User/UserApplicationClient.js +47 -1817
  39. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
  40. package/sdk/application/Webhook/WebhookApplicationClient.js +6 -49
  41. package/sdk/application/index.d.ts +0 -19
  42. package/sdk/application/index.js +0 -35
  43. package/sdk/common/Utility.d.ts +1 -1
  44. package/sdk/common/Utility.js +10 -7
  45. package/sdk/common/Validator.d.ts +1 -0
  46. package/sdk/common/Validator.js +20 -0
  47. package/sdk/common/utils.d.ts +0 -1
  48. package/sdk/common/utils.js +0 -14
  49. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  50. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  51. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
  52. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
  53. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  54. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  55. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  56. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  57. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  58. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  59. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  60. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  61. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +85 -767
  62. package/sdk/partner/Logistics/LogisticsPartnerModel.js +76 -429
  63. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  64. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +6 -120
  65. package/sdk/partner/OAuthClient.js +1 -0
  66. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  67. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  68. package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
  69. package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
  70. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  71. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  72. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  73. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  74. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  75. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  76. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  77. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  78. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  79. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  80. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  82. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  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 +388 -443
  90. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +112 -407
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -111
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -106
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +1328 -4975
  98. package/sdk/platform/Cart/CartPlatformModel.js +1229 -1922
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -208
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +358 -383
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +126 -122
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +68 -66
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +118 -141
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +170 -193
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1744 -1501
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +1211 -1383
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
  109. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  110. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  111. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  112. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  117. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  118. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  121. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  125. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  126. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  127. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  129. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  130. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  131. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +138 -283
  132. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +100 -219
  133. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  134. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  135. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
  137. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
  138. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
  139. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  140. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  141. package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
  142. package/sdk/platform/Content/ContentPlatformModel.js +390 -521
  143. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  144. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  145. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  146. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  147. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  148. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  149. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  150. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  151. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
  152. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
  153. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  154. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  155. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
  156. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
  157. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
  158. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
  159. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  160. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  161. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  162. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  163. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  164. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  165. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  166. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  167. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  168. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  169. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  170. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -25
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -175
  173. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -52
  174. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -34
  175. package/sdk/platform/Order/OrderPlatformClient.d.ts +103 -174
  176. package/sdk/platform/Order/OrderPlatformClient.js +275 -528
  177. package/sdk/platform/Order/OrderPlatformModel.d.ts +3078 -5449
  178. package/sdk/platform/Order/OrderPlatformModel.js +1659 -3501
  179. package/sdk/platform/Order/OrderPlatformValidator.d.ts +219 -234
  180. package/sdk/platform/Order/OrderPlatformValidator.js +118 -146
  181. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  182. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +106 -94
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +146 -131
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -64
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -62
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +507 -386
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +376 -323
  193. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +10 -10
  194. package/sdk/platform/Payment/PaymentPlatformValidator.js +10 -10
  195. package/sdk/platform/PlatformClient.d.ts +2 -0
  196. package/sdk/platform/PlatformClient.js +4 -0
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  199. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  200. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  201. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  202. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +35 -45
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +38 -117
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +13 -22
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -24
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +396 -620
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +326 -501
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +11 -11
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +10 -10
  213. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  214. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  215. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
  216. package/sdk/platform/Share/SharePlatformModel.js +4 -27
  217. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  218. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  219. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  220. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  221. package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
  222. package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  227. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  228. package/sdk/platform/User/UserPlatformModel.js +23 -23
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  235. package/sdk/platform/index.d.ts +1 -0
  236. package/sdk/platform/index.js +2 -0
  237. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  238. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -8
  239. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  240. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  241. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  242. package/sdk/public/Content/ContentPublicClient.js +19 -793
  243. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  244. package/sdk/public/Content/ContentPublicModel.js +3 -649
  245. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  246. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  247. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  248. package/sdk/public/Partner/PartnerPublicClient.js +14 -2
  249. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  250. package/sdk/public/Webhook/WebhookPublicClient.js +13 -10
  251. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  252. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  253. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  254. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  255. package/sdk/application/Cart/CartApplicationModel.d.ts +0 -4340
  256. package/sdk/application/Cart/CartApplicationModel.js +0 -2718
  257. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -788
  258. package/sdk/application/Cart/CartApplicationValidator.js +0 -546
  259. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3909
  260. package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2667
  261. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
  262. package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
  263. package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
  264. package/sdk/application/Common/CommonApplicationModel.js +0 -308
  265. package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
  266. package/sdk/application/Common/CommonApplicationValidator.js +0 -38
  267. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
  268. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
  269. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
  270. package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
  271. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2544
  272. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1875
  273. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
  274. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
  275. package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2189
  276. package/sdk/application/Content/ContentApplicationModel.js +0 -1640
  277. package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -290
  278. package/sdk/application/Content/ContentApplicationValidator.js +0 -269
  279. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -270
  280. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -188
  281. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
  282. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
  283. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -36
  284. package/sdk/application/Finance/FinanceApplicationClient.js +0 -202
  285. package/sdk/application/Finance/FinanceApplicationModel.d.ts +0 -289
  286. package/sdk/application/Finance/FinanceApplicationModel.js +0 -208
  287. package/sdk/application/Finance/FinanceApplicationValidator.d.ts +0 -25
  288. package/sdk/application/Finance/FinanceApplicationValidator.js +0 -31
  289. package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
  290. package/sdk/application/Lead/LeadApplicationModel.js +0 -480
  291. package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
  292. package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
  293. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -2034
  294. package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1391
  295. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -299
  296. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -224
  297. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2612
  298. package/sdk/application/Order/OrderApplicationModel.js +0 -1669
  299. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -279
  300. package/sdk/application/Order/OrderApplicationValidator.js +0 -210
  301. package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4062
  302. package/sdk/application/Payment/PaymentApplicationModel.js +0 -2632
  303. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
  304. package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
  305. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
  306. package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
  307. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
  308. package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
  309. package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
  310. package/sdk/application/Share/ShareApplicationModel.js +0 -234
  311. package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
  312. package/sdk/application/Share/ShareApplicationValidator.js +0 -91
  313. package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1744
  314. package/sdk/application/Theme/ThemeApplicationModel.js +0 -1446
  315. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -79
  316. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -65
  317. package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
  318. package/sdk/application/User/UserApplicationModel.js +0 -1382
  319. package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
  320. package/sdk/application/User/UserApplicationValidator.js +0 -573
  321. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -54
  322. package/sdk/application/Webhook/WebhookApplicationModel.js +0 -48
  323. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
  324. package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
  325. package/sdk/common/Clickstream.d.ts +0 -1
  326. package/sdk/common/Clickstream.js +0 -464
@@ -1,14 +1,12 @@
1
- const ApplicationAPIClient = require("../ApplicationAPIClient");
2
1
  const {
3
2
  FDKClientValidationError,
4
3
  FDKResponseValidationError,
5
4
  } = require("../../common/FDKError");
5
+
6
+ const ApplicationAPIClient = require("../ApplicationAPIClient");
6
7
  const constructUrl = require("../constructUrl");
7
8
  const Paginator = require("../../common/Paginator");
8
- const CatalogApplicationValidator = require("./CatalogApplicationValidator");
9
- const CatalogApplicationModel = require("./CatalogApplicationModel");
10
- const { Logger } = require("./../../common/Logger");
11
- const Joi = require("joi");
9
+ const { validateRequiredParams } = require("../../common/Validator");
12
10
 
13
11
  class Catalog {
14
12
  constructor(_conf) {
@@ -82,11 +80,9 @@ class Catalog {
82
80
  }
83
81
 
84
82
  /**
85
- * @param {CatalogApplicationValidator.FollowByIdParam} arg - Arg object.
86
83
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
87
84
  * @param {import("../ApplicationAPIClient").Options} - Options
88
- * @returns {Promise<CatalogApplicationModel.FollowPostResponseSchema>} -
89
- * Success response
85
+ * @returns {Promise<FollowPostResponse>} - Success response
90
86
  * @name followById
91
87
  * @summary: Create item, brand, product
92
88
  * @description: Add a product, brand, or item to the user's followed list by collection Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/followById/).
@@ -95,26 +91,16 @@ class Catalog {
95
91
  { collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
96
92
  { responseHeaders } = { responseHeaders: false }
97
93
  ) {
98
- const { error } = CatalogApplicationValidator.followById().validate(
99
- { collectionType, collectionId },
100
- { abortEarly: false, allowUnknown: true }
101
- );
102
- if (error) {
103
- return Promise.reject(new FDKClientValidationError(error));
104
- }
105
-
106
- // Showing warrnings if extra unknown parameters are found
107
- const {
108
- error: warrning,
109
- } = CatalogApplicationValidator.followById().validate(
110
- { collectionType, collectionId },
111
- { abortEarly: false, allowUnknown: false }
112
- );
113
- if (warrning) {
114
- Logger({
115
- level: "WARN",
116
- message: `Parameter Validation warrnings for application > Catalog > followById \n ${warrning}`,
94
+ const errors = validateRequiredParams(arguments[0], [
95
+ "collectionType",
96
+ "collectionId",
97
+ ]);
98
+ if (errors.length > 0) {
99
+ const error = new FDKClientValidationError({
100
+ message: "Missing required field",
101
+ details: errors,
117
102
  });
103
+ return Promise.reject(new FDKClientValidationError(error));
118
104
  }
119
105
 
120
106
  const query_params = {};
@@ -139,33 +125,13 @@ class Catalog {
139
125
  responseData = response[0];
140
126
  }
141
127
 
142
- const {
143
- error: res_error,
144
- } = CatalogApplicationModel.FollowPostResponseSchema().validate(
145
- responseData,
146
- { abortEarly: false, allowUnknown: true }
147
- );
148
-
149
- if (res_error) {
150
- if (this._conf.options.strictResponseCheck === true) {
151
- return Promise.reject(new FDKResponseValidationError(res_error));
152
- } else {
153
- Logger({
154
- level: "WARN",
155
- message: `Response Validation Warnings for application > Catalog > followById \n ${res_error}`,
156
- });
157
- }
158
- }
159
-
160
128
  return response;
161
129
  }
162
130
 
163
131
  /**
164
- * @param {CatalogApplicationValidator.GetBrandDetailBySlugParam} arg - Arg object.
165
132
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
166
133
  * @param {import("../ApplicationAPIClient").Options} - Options
167
- * @returns {Promise<CatalogApplicationModel.BrandDetailResponseSchema>} -
168
- * Success response
134
+ * @returns {Promise<BrandDetailResponse>} - Success response
169
135
  * @name getBrandDetailBySlug
170
136
  * @summary: Get a brand
171
137
  * @description: Get metadata of a brand such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrandDetailBySlug/).
@@ -174,28 +140,13 @@ class Catalog {
174
140
  { slug, requestHeaders } = { requestHeaders: {} },
175
141
  { responseHeaders } = { responseHeaders: false }
176
142
  ) {
177
- const {
178
- error,
179
- } = CatalogApplicationValidator.getBrandDetailBySlug().validate(
180
- { slug },
181
- { abortEarly: false, allowUnknown: true }
182
- );
183
- if (error) {
184
- return Promise.reject(new FDKClientValidationError(error));
185
- }
186
-
187
- // Showing warrnings if extra unknown parameters are found
188
- const {
189
- error: warrning,
190
- } = CatalogApplicationValidator.getBrandDetailBySlug().validate(
191
- { slug },
192
- { abortEarly: false, allowUnknown: false }
193
- );
194
- if (warrning) {
195
- Logger({
196
- level: "WARN",
197
- message: `Parameter Validation warrnings for application > Catalog > getBrandDetailBySlug \n ${warrning}`,
143
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
144
+ if (errors.length > 0) {
145
+ const error = new FDKClientValidationError({
146
+ message: "Missing required field",
147
+ details: errors,
198
148
  });
149
+ return Promise.reject(new FDKClientValidationError(error));
199
150
  }
200
151
 
201
152
  const query_params = {};
@@ -220,33 +171,13 @@ class Catalog {
220
171
  responseData = response[0];
221
172
  }
222
173
 
223
- const {
224
- error: res_error,
225
- } = CatalogApplicationModel.BrandDetailResponseSchema().validate(
226
- responseData,
227
- { abortEarly: false, allowUnknown: true }
228
- );
229
-
230
- if (res_error) {
231
- if (this._conf.options.strictResponseCheck === true) {
232
- return Promise.reject(new FDKResponseValidationError(res_error));
233
- } else {
234
- Logger({
235
- level: "WARN",
236
- message: `Response Validation Warnings for application > Catalog > getBrandDetailBySlug \n ${res_error}`,
237
- });
238
- }
239
- }
240
-
241
174
  return response;
242
175
  }
243
176
 
244
177
  /**
245
- * @param {CatalogApplicationValidator.GetBrandsParam} arg - Arg object.
246
178
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
247
179
  * @param {import("../ApplicationAPIClient").Options} - Options
248
- * @returns {Promise<CatalogApplicationModel.BrandListingResponseSchema>} -
249
- * Success response
180
+ * @returns {Promise<BrandListingResponse>} - Success response
250
181
  * @name getBrands
251
182
  * @summary: List brands
252
183
  * @description: Get a list of all the available brands. Filtering can be applied to the department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrands/).
@@ -255,28 +186,6 @@ class Catalog {
255
186
  { department, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
256
187
  { responseHeaders } = { responseHeaders: false }
257
188
  ) {
258
- const { error } = CatalogApplicationValidator.getBrands().validate(
259
- { department, pageNo, pageSize },
260
- { abortEarly: false, allowUnknown: true }
261
- );
262
- if (error) {
263
- return Promise.reject(new FDKClientValidationError(error));
264
- }
265
-
266
- // Showing warrnings if extra unknown parameters are found
267
- const {
268
- error: warrning,
269
- } = CatalogApplicationValidator.getBrands().validate(
270
- { department, pageNo, pageSize },
271
- { abortEarly: false, allowUnknown: false }
272
- );
273
- if (warrning) {
274
- Logger({
275
- level: "WARN",
276
- message: `Parameter Validation warrnings for application > Catalog > getBrands \n ${warrning}`,
277
- });
278
- }
279
-
280
189
  const query_params = {};
281
190
  query_params["department"] = department;
282
191
  query_params["page_no"] = pageNo;
@@ -302,24 +211,6 @@ class Catalog {
302
211
  responseData = response[0];
303
212
  }
304
213
 
305
- const {
306
- error: res_error,
307
- } = CatalogApplicationModel.BrandListingResponseSchema().validate(
308
- responseData,
309
- { abortEarly: false, allowUnknown: true }
310
- );
311
-
312
- if (res_error) {
313
- if (this._conf.options.strictResponseCheck === true) {
314
- return Promise.reject(new FDKResponseValidationError(res_error));
315
- } else {
316
- Logger({
317
- level: "WARN",
318
- message: `Response Validation Warnings for application > Catalog > getBrands \n ${res_error}`,
319
- });
320
- }
321
- }
322
-
323
214
  return response;
324
215
  }
325
216
 
@@ -330,7 +221,7 @@ class Catalog {
330
221
  * of available departments below. Also, you can get available departments
331
222
  * from the endpoint /service/application/catalog/v1.0/departments/.
332
223
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
333
- * @returns {Paginator<CatalogApplicationModel.BrandListingResponseSchema>}
224
+ * @returns {Paginator<BrandListingResponse>}
334
225
  * @summary: List brands
335
226
  * @description: Get a list of all the available brands. Filtering can be applied to the department.
336
227
  */
@@ -356,12 +247,9 @@ class Catalog {
356
247
  }
357
248
 
358
249
  /**
359
- * @param {CatalogApplicationValidator.GetCategoriesParam} arg - Arg object.
360
250
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
361
251
  * @param {import("../ApplicationAPIClient").Options} - Options
362
- * @returns {Promise<CatalogApplicationModel.CategoryListingResponseSchema>}
363
- * - Success response
364
- *
252
+ * @returns {Promise<CategoryListingResponse>} - Success response
365
253
  * @name getCategories
366
254
  * @summary: List product categories
367
255
  * @description: List all available product categories. Also, users can filter the categories by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategories/).
@@ -370,28 +258,6 @@ class Catalog {
370
258
  { department, requestHeaders } = { requestHeaders: {} },
371
259
  { responseHeaders } = { responseHeaders: false }
372
260
  ) {
373
- const { error } = CatalogApplicationValidator.getCategories().validate(
374
- { department },
375
- { abortEarly: false, allowUnknown: true }
376
- );
377
- if (error) {
378
- return Promise.reject(new FDKClientValidationError(error));
379
- }
380
-
381
- // Showing warrnings if extra unknown parameters are found
382
- const {
383
- error: warrning,
384
- } = CatalogApplicationValidator.getCategories().validate(
385
- { department },
386
- { abortEarly: false, allowUnknown: false }
387
- );
388
- if (warrning) {
389
- Logger({
390
- level: "WARN",
391
- message: `Parameter Validation warrnings for application > Catalog > getCategories \n ${warrning}`,
392
- });
393
- }
394
-
395
261
  const query_params = {};
396
262
  query_params["department"] = department;
397
263
 
@@ -415,33 +281,13 @@ class Catalog {
415
281
  responseData = response[0];
416
282
  }
417
283
 
418
- const {
419
- error: res_error,
420
- } = CatalogApplicationModel.CategoryListingResponseSchema().validate(
421
- responseData,
422
- { abortEarly: false, allowUnknown: true }
423
- );
424
-
425
- if (res_error) {
426
- if (this._conf.options.strictResponseCheck === true) {
427
- return Promise.reject(new FDKResponseValidationError(res_error));
428
- } else {
429
- Logger({
430
- level: "WARN",
431
- message: `Response Validation Warnings for application > Catalog > getCategories \n ${res_error}`,
432
- });
433
- }
434
- }
435
-
436
284
  return response;
437
285
  }
438
286
 
439
287
  /**
440
- * @param {CatalogApplicationValidator.GetCategoryDetailBySlugParam} arg - Arg object.
441
288
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
442
289
  * @param {import("../ApplicationAPIClient").Options} - Options
443
- * @returns {Promise<CatalogApplicationModel.CategoryMetaResponseSchema>} -
444
- * Success response
290
+ * @returns {Promise<CategoryMetaResponse>} - Success response
445
291
  * @name getCategoryDetailBySlug
446
292
  * @summary: Get category by slug
447
293
  * @description: Get detailed information about a specific product category using its slug and get metadata of a category such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategoryDetailBySlug/).
@@ -450,28 +296,13 @@ class Catalog {
450
296
  { slug, requestHeaders } = { requestHeaders: {} },
451
297
  { responseHeaders } = { responseHeaders: false }
452
298
  ) {
453
- const {
454
- error,
455
- } = CatalogApplicationValidator.getCategoryDetailBySlug().validate(
456
- { slug },
457
- { abortEarly: false, allowUnknown: true }
458
- );
459
- if (error) {
460
- return Promise.reject(new FDKClientValidationError(error));
461
- }
462
-
463
- // Showing warrnings if extra unknown parameters are found
464
- const {
465
- error: warrning,
466
- } = CatalogApplicationValidator.getCategoryDetailBySlug().validate(
467
- { slug },
468
- { abortEarly: false, allowUnknown: false }
469
- );
470
- if (warrning) {
471
- Logger({
472
- level: "WARN",
473
- message: `Parameter Validation warrnings for application > Catalog > getCategoryDetailBySlug \n ${warrning}`,
299
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
300
+ if (errors.length > 0) {
301
+ const error = new FDKClientValidationError({
302
+ message: "Missing required field",
303
+ details: errors,
474
304
  });
305
+ return Promise.reject(new FDKClientValidationError(error));
475
306
  }
476
307
 
477
308
  const query_params = {};
@@ -496,36 +327,13 @@ class Catalog {
496
327
  responseData = response[0];
497
328
  }
498
329
 
499
- const {
500
- error: res_error,
501
- } = CatalogApplicationModel.CategoryMetaResponseSchema().validate(
502
- responseData,
503
- { abortEarly: false, allowUnknown: true }
504
- );
505
-
506
- if (res_error) {
507
- if (this._conf.options.strictResponseCheck === true) {
508
- return Promise.reject(new FDKResponseValidationError(res_error));
509
- } else {
510
- Logger({
511
- level: "WARN",
512
- message: `Response Validation Warnings for application > Catalog > getCategoryDetailBySlug \n ${res_error}`,
513
- });
514
- }
515
- }
516
-
517
330
  return response;
518
331
  }
519
332
 
520
333
  /**
521
- * @param {CatalogApplicationValidator.GetCollectionDetailBySlugParam} arg
522
- * - Arg object.
523
- *
524
334
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
525
335
  * @param {import("../ApplicationAPIClient").Options} - Options
526
- * @returns {Promise<CatalogApplicationModel.CollectionDetailResponseSchema>}
527
- * - Success response
528
- *
336
+ * @returns {Promise<CollectionDetailResponse>} - Success response
529
337
  * @name getCollectionDetailBySlug
530
338
  * @summary: Get a collection
531
339
  * @description: Get detailed information about a specific collection using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionDetailBySlug/).
@@ -534,28 +342,13 @@ class Catalog {
534
342
  { slug, requestHeaders } = { requestHeaders: {} },
535
343
  { responseHeaders } = { responseHeaders: false }
536
344
  ) {
537
- const {
538
- error,
539
- } = CatalogApplicationValidator.getCollectionDetailBySlug().validate(
540
- { slug },
541
- { abortEarly: false, allowUnknown: true }
542
- );
543
- if (error) {
544
- return Promise.reject(new FDKClientValidationError(error));
545
- }
546
-
547
- // Showing warrnings if extra unknown parameters are found
548
- const {
549
- error: warrning,
550
- } = CatalogApplicationValidator.getCollectionDetailBySlug().validate(
551
- { slug },
552
- { abortEarly: false, allowUnknown: false }
553
- );
554
- if (warrning) {
555
- Logger({
556
- level: "WARN",
557
- message: `Parameter Validation warrnings for application > Catalog > getCollectionDetailBySlug \n ${warrning}`,
345
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
346
+ if (errors.length > 0) {
347
+ const error = new FDKClientValidationError({
348
+ message: "Missing required field",
349
+ details: errors,
558
350
  });
351
+ return Promise.reject(new FDKClientValidationError(error));
559
352
  }
560
353
 
561
354
  const query_params = {};
@@ -580,35 +373,13 @@ class Catalog {
580
373
  responseData = response[0];
581
374
  }
582
375
 
583
- const {
584
- error: res_error,
585
- } = CatalogApplicationModel.CollectionDetailResponseSchema().validate(
586
- responseData,
587
- { abortEarly: false, allowUnknown: true }
588
- );
589
-
590
- if (res_error) {
591
- if (this._conf.options.strictResponseCheck === true) {
592
- return Promise.reject(new FDKResponseValidationError(res_error));
593
- } else {
594
- Logger({
595
- level: "WARN",
596
- message: `Response Validation Warnings for application > Catalog > getCollectionDetailBySlug \n ${res_error}`,
597
- });
598
- }
599
- }
600
-
601
376
  return response;
602
377
  }
603
378
 
604
379
  /**
605
- * @param {CatalogApplicationValidator.GetCollectionItemsBySlugParam} arg -
606
- * Arg object.
607
380
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
608
381
  * @param {import("../ApplicationAPIClient").Options} - Options
609
- * @returns {Promise<CatalogApplicationModel.ProductListingResponseSchema>}
610
- * - Success response
611
- *
382
+ * @returns {Promise<ProductListingResponse>} - Success response
612
383
  * @name getCollectionItemsBySlug
613
384
  * @summary: Lists items of collection
614
385
  * @description: Fetch items within a particular collection identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionItemsBySlug/).
@@ -628,28 +399,13 @@ class Catalog {
628
399
  } = { requestHeaders: {} },
629
400
  { responseHeaders } = { responseHeaders: false }
630
401
  ) {
631
- const {
632
- error,
633
- } = CatalogApplicationValidator.getCollectionItemsBySlug().validate(
634
- { slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType },
635
- { abortEarly: false, allowUnknown: true }
636
- );
637
- if (error) {
638
- return Promise.reject(new FDKClientValidationError(error));
639
- }
640
-
641
- // Showing warrnings if extra unknown parameters are found
642
- const {
643
- error: warrning,
644
- } = CatalogApplicationValidator.getCollectionItemsBySlug().validate(
645
- { slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType },
646
- { abortEarly: false, allowUnknown: false }
647
- );
648
- if (warrning) {
649
- Logger({
650
- level: "WARN",
651
- message: `Parameter Validation warrnings for application > Catalog > getCollectionItemsBySlug \n ${warrning}`,
402
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
403
+ if (errors.length > 0) {
404
+ const error = new FDKClientValidationError({
405
+ message: "Missing required field",
406
+ details: errors,
652
407
  });
408
+ return Promise.reject(new FDKClientValidationError(error));
653
409
  }
654
410
 
655
411
  const query_params = {};
@@ -682,24 +438,6 @@ class Catalog {
682
438
  responseData = response[0];
683
439
  }
684
440
 
685
- const {
686
- error: res_error,
687
- } = CatalogApplicationModel.ProductListingResponseSchema().validate(
688
- responseData,
689
- { abortEarly: false, allowUnknown: true }
690
- );
691
-
692
- if (res_error) {
693
- if (this._conf.options.strictResponseCheck === true) {
694
- return Promise.reject(new FDKResponseValidationError(res_error));
695
- } else {
696
- Logger({
697
- level: "WARN",
698
- message: `Response Validation Warnings for application > Catalog > getCollectionItemsBySlug \n ${res_error}`,
699
- });
700
- }
701
- }
702
-
703
441
  return response;
704
442
  }
705
443
 
@@ -720,7 +458,7 @@ class Catalog {
720
458
  * should be sorted, e.g. popularity, price, latest and discount, in
721
459
  * either ascending or descending order. See the supported values below.
722
460
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
723
- * @returns {Paginator<CatalogApplicationModel.ProductListingResponseSchema>}
461
+ * @returns {Paginator<ProductListingResponse>}
724
462
  * @summary: Lists items of collection
725
463
  * @description: Fetch items within a particular collection identified by its slug.
726
464
  */
@@ -759,12 +497,9 @@ class Catalog {
759
497
  }
760
498
 
761
499
  /**
762
- * @param {CatalogApplicationValidator.GetCollectionsParam} arg - Arg object.
763
500
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
764
501
  * @param {import("../ApplicationAPIClient").Options} - Options
765
- * @returns {Promise<CatalogApplicationModel.GetCollectionListingResponseSchema>}
766
- * - Success response
767
- *
502
+ * @returns {Promise<GetCollectionListingResponse>} - Success response
768
503
  * @name getCollections
769
504
  * @summary: List collections
770
505
  * @description: List of curated product collections with filtering options based on tags and collection names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollections/).
@@ -773,28 +508,6 @@ class Catalog {
773
508
  { pageNo, pageSize, tag, q, requestHeaders } = { requestHeaders: {} },
774
509
  { responseHeaders } = { responseHeaders: false }
775
510
  ) {
776
- const { error } = CatalogApplicationValidator.getCollections().validate(
777
- { pageNo, pageSize, tag, q },
778
- { abortEarly: false, allowUnknown: true }
779
- );
780
- if (error) {
781
- return Promise.reject(new FDKClientValidationError(error));
782
- }
783
-
784
- // Showing warrnings if extra unknown parameters are found
785
- const {
786
- error: warrning,
787
- } = CatalogApplicationValidator.getCollections().validate(
788
- { pageNo, pageSize, tag, q },
789
- { abortEarly: false, allowUnknown: false }
790
- );
791
- if (warrning) {
792
- Logger({
793
- level: "WARN",
794
- message: `Parameter Validation warrnings for application > Catalog > getCollections \n ${warrning}`,
795
- });
796
- }
797
-
798
511
  const query_params = {};
799
512
  query_params["page_no"] = pageNo;
800
513
  query_params["page_size"] = pageSize;
@@ -821,24 +534,6 @@ class Catalog {
821
534
  responseData = response[0];
822
535
  }
823
536
 
824
- const {
825
- error: res_error,
826
- } = CatalogApplicationModel.GetCollectionListingResponseSchema().validate(
827
- responseData,
828
- { abortEarly: false, allowUnknown: true }
829
- );
830
-
831
- if (res_error) {
832
- if (this._conf.options.strictResponseCheck === true) {
833
- return Promise.reject(new FDKResponseValidationError(res_error));
834
- } else {
835
- Logger({
836
- level: "WARN",
837
- message: `Response Validation Warnings for application > Catalog > getCollections \n ${res_error}`,
838
- });
839
- }
840
- }
841
-
842
537
  return response;
843
538
  }
844
539
 
@@ -847,7 +542,7 @@ class Catalog {
847
542
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
848
543
  * @param {string[]} [arg.tag] - List of tags to filter collections.
849
544
  * @param {string} [arg.q] - Name of the collection to filter collection.
850
- * @returns {Paginator<CatalogApplicationModel.GetCollectionListingResponseSchema>}
545
+ * @returns {Paginator<GetCollectionListingResponse>}
851
546
  * @summary: List collections
852
547
  * @description: List of curated product collections with filtering options based on tags and collection names.
853
548
  */
@@ -874,14 +569,9 @@ class Catalog {
874
569
  }
875
570
 
876
571
  /**
877
- * @param {CatalogApplicationValidator.GetComparedFrequentlyProductBySlugParam} arg
878
- * - Arg object.
879
- *
880
572
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
881
573
  * @param {import("../ApplicationAPIClient").Options} - Options
882
- * @returns {Promise<CatalogApplicationModel.ProductFrequentlyComparedSimilarResponseSchema>}
883
- * - Success response
884
- *
574
+ * @returns {Promise<ProductFrequentlyComparedSimilarResponse>} - Success response
885
575
  * @name getComparedFrequentlyProductBySlug
886
576
  * @summary: List frequent products
887
577
  * @description: Get products that are often compared to the product specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getComparedFrequentlyProductBySlug/).
@@ -890,28 +580,13 @@ class Catalog {
890
580
  { slug, requestHeaders } = { requestHeaders: {} },
891
581
  { responseHeaders } = { responseHeaders: false }
892
582
  ) {
893
- const {
894
- error,
895
- } = CatalogApplicationValidator.getComparedFrequentlyProductBySlug().validate(
896
- { slug },
897
- { abortEarly: false, allowUnknown: true }
898
- );
899
- if (error) {
900
- return Promise.reject(new FDKClientValidationError(error));
901
- }
902
-
903
- // Showing warrnings if extra unknown parameters are found
904
- const {
905
- error: warrning,
906
- } = CatalogApplicationValidator.getComparedFrequentlyProductBySlug().validate(
907
- { slug },
908
- { abortEarly: false, allowUnknown: false }
909
- );
910
- if (warrning) {
911
- Logger({
912
- level: "WARN",
913
- message: `Parameter Validation warrnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${warrning}`,
583
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
584
+ if (errors.length > 0) {
585
+ const error = new FDKClientValidationError({
586
+ message: "Missing required field",
587
+ details: errors,
914
588
  });
589
+ return Promise.reject(new FDKClientValidationError(error));
915
590
  }
916
591
 
917
592
  const query_params = {};
@@ -936,33 +611,13 @@ class Catalog {
936
611
  responseData = response[0];
937
612
  }
938
613
 
939
- const {
940
- error: res_error,
941
- } = CatalogApplicationModel.ProductFrequentlyComparedSimilarResponseSchema().validate(
942
- responseData,
943
- { abortEarly: false, allowUnknown: true }
944
- );
945
-
946
- if (res_error) {
947
- if (this._conf.options.strictResponseCheck === true) {
948
- return Promise.reject(new FDKResponseValidationError(res_error));
949
- } else {
950
- Logger({
951
- level: "WARN",
952
- message: `Response Validation Warnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${res_error}`,
953
- });
954
- }
955
- }
956
-
957
614
  return response;
958
615
  }
959
616
 
960
617
  /**
961
- * @param {CatalogApplicationValidator.GetDepartmentsParam} arg - Arg object.
962
618
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
963
619
  * @param {import("../ApplicationAPIClient").Options} - Options
964
- * @returns {Promise<CatalogApplicationModel.DepartmentResponseSchema>} -
965
- * Success response
620
+ * @returns {Promise<DepartmentResponse>} - Success response
966
621
  * @name getDepartments
967
622
  * @summary: List departments
968
623
  * @description: List all departments associated with available products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getDepartments/).
@@ -971,28 +626,6 @@ class Catalog {
971
626
  { requestHeaders } = { requestHeaders: {} },
972
627
  { responseHeaders } = { responseHeaders: false }
973
628
  ) {
974
- const { error } = CatalogApplicationValidator.getDepartments().validate(
975
- {},
976
- { abortEarly: false, allowUnknown: true }
977
- );
978
- if (error) {
979
- return Promise.reject(new FDKClientValidationError(error));
980
- }
981
-
982
- // Showing warrnings if extra unknown parameters are found
983
- const {
984
- error: warrning,
985
- } = CatalogApplicationValidator.getDepartments().validate(
986
- {},
987
- { abortEarly: false, allowUnknown: false }
988
- );
989
- if (warrning) {
990
- Logger({
991
- level: "WARN",
992
- message: `Parameter Validation warrnings for application > Catalog > getDepartments \n ${warrning}`,
993
- });
994
- }
995
-
996
629
  const query_params = {};
997
630
 
998
631
  const xHeaders = {};
@@ -1015,33 +648,13 @@ class Catalog {
1015
648
  responseData = response[0];
1016
649
  }
1017
650
 
1018
- const {
1019
- error: res_error,
1020
- } = CatalogApplicationModel.DepartmentResponseSchema().validate(
1021
- responseData,
1022
- { abortEarly: false, allowUnknown: true }
1023
- );
1024
-
1025
- if (res_error) {
1026
- if (this._conf.options.strictResponseCheck === true) {
1027
- return Promise.reject(new FDKResponseValidationError(res_error));
1028
- } else {
1029
- Logger({
1030
- level: "WARN",
1031
- message: `Response Validation Warnings for application > Catalog > getDepartments \n ${res_error}`,
1032
- });
1033
- }
1034
- }
1035
-
1036
651
  return response;
1037
652
  }
1038
653
 
1039
654
  /**
1040
- * @param {CatalogApplicationValidator.GetFollowIdsParam} arg - Arg object.
1041
655
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1042
656
  * @param {import("../ApplicationAPIClient").Options} - Options
1043
- * @returns {Promise<CatalogApplicationModel.FollowIdsResponseSchema>} -
1044
- * Success response
657
+ * @returns {Promise<FollowIdsResponse>} - Success response
1045
658
  * @name getFollowIds
1046
659
  * @summary: List Ids of followed item, brand, product
1047
660
  * @description: Get the IDs of all items the user is currently following, such as Products, Brands, and Collections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowIds/).
@@ -1050,28 +663,6 @@ class Catalog {
1050
663
  { collectionType, requestHeaders } = { requestHeaders: {} },
1051
664
  { responseHeaders } = { responseHeaders: false }
1052
665
  ) {
1053
- const { error } = CatalogApplicationValidator.getFollowIds().validate(
1054
- { collectionType },
1055
- { abortEarly: false, allowUnknown: true }
1056
- );
1057
- if (error) {
1058
- return Promise.reject(new FDKClientValidationError(error));
1059
- }
1060
-
1061
- // Showing warrnings if extra unknown parameters are found
1062
- const {
1063
- error: warrning,
1064
- } = CatalogApplicationValidator.getFollowIds().validate(
1065
- { collectionType },
1066
- { abortEarly: false, allowUnknown: false }
1067
- );
1068
- if (warrning) {
1069
- Logger({
1070
- level: "WARN",
1071
- message: `Parameter Validation warrnings for application > Catalog > getFollowIds \n ${warrning}`,
1072
- });
1073
- }
1074
-
1075
666
  const query_params = {};
1076
667
  query_params["collection_type"] = collectionType;
1077
668
 
@@ -1095,34 +686,13 @@ class Catalog {
1095
686
  responseData = response[0];
1096
687
  }
1097
688
 
1098
- const {
1099
- error: res_error,
1100
- } = CatalogApplicationModel.FollowIdsResponseSchema().validate(
1101
- responseData,
1102
- { abortEarly: false, allowUnknown: true }
1103
- );
1104
-
1105
- if (res_error) {
1106
- if (this._conf.options.strictResponseCheck === true) {
1107
- return Promise.reject(new FDKResponseValidationError(res_error));
1108
- } else {
1109
- Logger({
1110
- level: "WARN",
1111
- message: `Response Validation Warnings for application > Catalog > getFollowIds \n ${res_error}`,
1112
- });
1113
- }
1114
- }
1115
-
1116
689
  return response;
1117
690
  }
1118
691
 
1119
692
  /**
1120
- * @param {CatalogApplicationValidator.GetFollowedListingParam} arg - Arg object.
1121
693
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1122
694
  * @param {import("../ApplicationAPIClient").Options} - Options
1123
- * @returns {Promise<CatalogApplicationModel.GetFollowListingResponseSchema>}
1124
- * - Success response
1125
- *
695
+ * @returns {Promise<GetFollowListingResponse>} - Success response
1126
696
  * @name getFollowedListing
1127
697
  * @summary: List followed products, brands
1128
698
  * @description: Get a list of products or brands the user is following. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/).
@@ -1133,26 +703,13 @@ class Catalog {
1133
703
  },
1134
704
  { responseHeaders } = { responseHeaders: false }
1135
705
  ) {
1136
- const { error } = CatalogApplicationValidator.getFollowedListing().validate(
1137
- { collectionType, pageId, pageSize },
1138
- { abortEarly: false, allowUnknown: true }
1139
- );
1140
- if (error) {
1141
- return Promise.reject(new FDKClientValidationError(error));
1142
- }
1143
-
1144
- // Showing warrnings if extra unknown parameters are found
1145
- const {
1146
- error: warrning,
1147
- } = CatalogApplicationValidator.getFollowedListing().validate(
1148
- { collectionType, pageId, pageSize },
1149
- { abortEarly: false, allowUnknown: false }
1150
- );
1151
- if (warrning) {
1152
- Logger({
1153
- level: "WARN",
1154
- message: `Parameter Validation warrnings for application > Catalog > getFollowedListing \n ${warrning}`,
706
+ const errors = validateRequiredParams(arguments[0], ["collectionType"]);
707
+ if (errors.length > 0) {
708
+ const error = new FDKClientValidationError({
709
+ message: "Missing required field",
710
+ details: errors,
1155
711
  });
712
+ return Promise.reject(new FDKClientValidationError(error));
1156
713
  }
1157
714
 
1158
715
  const query_params = {};
@@ -1179,24 +736,6 @@ class Catalog {
1179
736
  responseData = response[0];
1180
737
  }
1181
738
 
1182
- const {
1183
- error: res_error,
1184
- } = CatalogApplicationModel.GetFollowListingResponseSchema().validate(
1185
- responseData,
1186
- { abortEarly: false, allowUnknown: true }
1187
- );
1188
-
1189
- if (res_error) {
1190
- if (this._conf.options.strictResponseCheck === true) {
1191
- return Promise.reject(new FDKResponseValidationError(res_error));
1192
- } else {
1193
- Logger({
1194
- level: "WARN",
1195
- message: `Response Validation Warnings for application > Catalog > getFollowedListing \n ${res_error}`,
1196
- });
1197
- }
1198
- }
1199
-
1200
739
  return response;
1201
740
  }
1202
741
 
@@ -1205,7 +744,7 @@ class Catalog {
1205
744
  * @param {string} arg.collectionType - Type of collection followed, i.e.
1206
745
  * products, brands, or collections.
1207
746
  * @param {number} [arg.pageSize] - Page ID to retrieve next set of results.
1208
- * @returns {Paginator<CatalogApplicationModel.GetFollowListingResponseSchema>}
747
+ * @returns {Paginator<GetFollowListingResponse>}
1209
748
  * @summary: List followed products, brands
1210
749
  * @description: Get a list of products or brands the user is following.
1211
750
  */
@@ -1231,12 +770,9 @@ class Catalog {
1231
770
  }
1232
771
 
1233
772
  /**
1234
- * @param {CatalogApplicationValidator.GetFollowerCountByIdParam} arg - Arg object.
1235
773
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1236
774
  * @param {import("../ApplicationAPIClient").Options} - Options
1237
- * @returns {Promise<CatalogApplicationModel.FollowerCountResponseSchema>}
1238
- * - Success response
1239
- *
775
+ * @returns {Promise<FollowerCountResponse>} - Success response
1240
776
  * @name getFollowerCountById
1241
777
  * @summary: Get follower count
1242
778
  * @description: Get the total number of followers for a specific item by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowerCountById/).
@@ -1245,28 +781,16 @@ class Catalog {
1245
781
  { collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
1246
782
  { responseHeaders } = { responseHeaders: false }
1247
783
  ) {
1248
- const {
1249
- error,
1250
- } = CatalogApplicationValidator.getFollowerCountById().validate(
1251
- { collectionType, collectionId },
1252
- { abortEarly: false, allowUnknown: true }
1253
- );
1254
- if (error) {
1255
- return Promise.reject(new FDKClientValidationError(error));
1256
- }
1257
-
1258
- // Showing warrnings if extra unknown parameters are found
1259
- const {
1260
- error: warrning,
1261
- } = CatalogApplicationValidator.getFollowerCountById().validate(
1262
- { collectionType, collectionId },
1263
- { abortEarly: false, allowUnknown: false }
1264
- );
1265
- if (warrning) {
1266
- Logger({
1267
- level: "WARN",
1268
- message: `Parameter Validation warrnings for application > Catalog > getFollowerCountById \n ${warrning}`,
784
+ const errors = validateRequiredParams(arguments[0], [
785
+ "collectionType",
786
+ "collectionId",
787
+ ]);
788
+ if (errors.length > 0) {
789
+ const error = new FDKClientValidationError({
790
+ message: "Missing required field",
791
+ details: errors,
1269
792
  });
793
+ return Promise.reject(new FDKClientValidationError(error));
1270
794
  }
1271
795
 
1272
796
  const query_params = {};
@@ -1291,33 +815,13 @@ class Catalog {
1291
815
  responseData = response[0];
1292
816
  }
1293
817
 
1294
- const {
1295
- error: res_error,
1296
- } = CatalogApplicationModel.FollowerCountResponseSchema().validate(
1297
- responseData,
1298
- { abortEarly: false, allowUnknown: true }
1299
- );
1300
-
1301
- if (res_error) {
1302
- if (this._conf.options.strictResponseCheck === true) {
1303
- return Promise.reject(new FDKResponseValidationError(res_error));
1304
- } else {
1305
- Logger({
1306
- level: "WARN",
1307
- message: `Response Validation Warnings for application > Catalog > getFollowerCountById \n ${res_error}`,
1308
- });
1309
- }
1310
- }
1311
-
1312
818
  return response;
1313
819
  }
1314
820
 
1315
821
  /**
1316
- * @param {CatalogApplicationValidator.GetHomeProductsParam} arg - Arg object.
1317
822
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1318
823
  * @param {import("../ApplicationAPIClient").Options} - Options
1319
- * @returns {Promise<CatalogApplicationModel.HomeListingResponseSchema>} -
1320
- * Success response
824
+ * @returns {Promise<HomeListingResponse>} - Success response
1321
825
  * @name getHomeProducts
1322
826
  * @summary: List homepage-featured products
1323
827
  * @description: List all the products associated with a brand, collection or category in a random order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getHomeProducts/).
@@ -1326,28 +830,6 @@ class Catalog {
1326
830
  { sortOn, pageId, pageSize, requestHeaders } = { requestHeaders: {} },
1327
831
  { responseHeaders } = { responseHeaders: false }
1328
832
  ) {
1329
- const { error } = CatalogApplicationValidator.getHomeProducts().validate(
1330
- { sortOn, pageId, pageSize },
1331
- { abortEarly: false, allowUnknown: true }
1332
- );
1333
- if (error) {
1334
- return Promise.reject(new FDKClientValidationError(error));
1335
- }
1336
-
1337
- // Showing warrnings if extra unknown parameters are found
1338
- const {
1339
- error: warrning,
1340
- } = CatalogApplicationValidator.getHomeProducts().validate(
1341
- { sortOn, pageId, pageSize },
1342
- { abortEarly: false, allowUnknown: false }
1343
- );
1344
- if (warrning) {
1345
- Logger({
1346
- level: "WARN",
1347
- message: `Parameter Validation warrnings for application > Catalog > getHomeProducts \n ${warrning}`,
1348
- });
1349
- }
1350
-
1351
833
  const query_params = {};
1352
834
  query_params["sort_on"] = sortOn;
1353
835
  query_params["page_id"] = pageId;
@@ -1373,24 +855,6 @@ class Catalog {
1373
855
  responseData = response[0];
1374
856
  }
1375
857
 
1376
- const {
1377
- error: res_error,
1378
- } = CatalogApplicationModel.HomeListingResponseSchema().validate(
1379
- responseData,
1380
- { abortEarly: false, allowUnknown: true }
1381
- );
1382
-
1383
- if (res_error) {
1384
- if (this._conf.options.strictResponseCheck === true) {
1385
- return Promise.reject(new FDKResponseValidationError(res_error));
1386
- } else {
1387
- Logger({
1388
- level: "WARN",
1389
- message: `Response Validation Warnings for application > Catalog > getHomeProducts \n ${res_error}`,
1390
- });
1391
- }
1392
- }
1393
-
1394
858
  return response;
1395
859
  }
1396
860
 
@@ -1400,7 +864,7 @@ class Catalog {
1400
864
  * should be sorted, e.g. popularity, price, latest and discount, in
1401
865
  * either ascending or descending order.
1402
866
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
1403
- * @returns {Paginator<CatalogApplicationModel.HomeListingResponseSchema>}
867
+ * @returns {Paginator<HomeListingResponse>}
1404
868
  * @summary: List homepage-featured products
1405
869
  * @description: List all the products associated with a brand, collection or category in a random order.
1406
870
  */
@@ -1426,11 +890,9 @@ class Catalog {
1426
890
  }
1427
891
 
1428
892
  /**
1429
- * @param {CatalogApplicationValidator.GetInStockLocationsParam} arg - Arg object.
1430
893
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1431
894
  * @param {import("../ApplicationAPIClient").Options} - Options
1432
- * @returns {Promise<CatalogApplicationModel.ApplicationStoreListing>} -
1433
- * Success response
895
+ * @returns {Promise<ApplicationStoreListing>} - Success response
1434
896
  * @name getInStockLocations
1435
897
  * @summary: List stores with inventory
1436
898
  * @description: List stores where specified products are currently in stock. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getInStockLocations/).
@@ -1448,30 +910,6 @@ class Catalog {
1448
910
  } = { requestHeaders: {} },
1449
911
  { responseHeaders } = { responseHeaders: false }
1450
912
  ) {
1451
- const {
1452
- error,
1453
- } = CatalogApplicationValidator.getInStockLocations().validate(
1454
- { pageNo, pageSize, q, city, range, latitude, longitude },
1455
- { abortEarly: false, allowUnknown: true }
1456
- );
1457
- if (error) {
1458
- return Promise.reject(new FDKClientValidationError(error));
1459
- }
1460
-
1461
- // Showing warrnings if extra unknown parameters are found
1462
- const {
1463
- error: warrning,
1464
- } = CatalogApplicationValidator.getInStockLocations().validate(
1465
- { pageNo, pageSize, q, city, range, latitude, longitude },
1466
- { abortEarly: false, allowUnknown: false }
1467
- );
1468
- if (warrning) {
1469
- Logger({
1470
- level: "WARN",
1471
- message: `Parameter Validation warrnings for application > Catalog > getInStockLocations \n ${warrning}`,
1472
- });
1473
- }
1474
-
1475
913
  const query_params = {};
1476
914
  query_params["page_no"] = pageNo;
1477
915
  query_params["page_size"] = pageSize;
@@ -1501,24 +939,6 @@ class Catalog {
1501
939
  responseData = response[0];
1502
940
  }
1503
941
 
1504
- const {
1505
- error: res_error,
1506
- } = CatalogApplicationModel.ApplicationStoreListing().validate(
1507
- responseData,
1508
- { abortEarly: false, allowUnknown: true }
1509
- );
1510
-
1511
- if (res_error) {
1512
- if (this._conf.options.strictResponseCheck === true) {
1513
- return Promise.reject(new FDKResponseValidationError(res_error));
1514
- } else {
1515
- Logger({
1516
- level: "WARN",
1517
- message: `Response Validation Warnings for application > Catalog > getInStockLocations \n ${res_error}`,
1518
- });
1519
- }
1520
- }
1521
-
1522
942
  return response;
1523
943
  }
1524
944
 
@@ -1533,7 +953,7 @@ class Catalog {
1533
953
  * wants to retrieve the nearest stores, e.g. 72.8691788.
1534
954
  * @param {number} [arg.longitude] - Longitude of the location from where
1535
955
  * one wants to retrieve the nearest stores, e.g. 19.1174114.
1536
- * @returns {Paginator<CatalogApplicationModel.ApplicationStoreListing>}
956
+ * @returns {Paginator<ApplicationStoreListing>}
1537
957
  * @summary: List stores with inventory
1538
958
  * @description: List stores where specified products are currently in stock.
1539
959
  */
@@ -1570,10 +990,9 @@ class Catalog {
1570
990
  }
1571
991
 
1572
992
  /**
1573
- * @param {CatalogApplicationValidator.GetLocationDetailsByIdParam} arg - Arg object.
1574
993
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1575
994
  * @param {import("../ApplicationAPIClient").Options} - Options
1576
- * @returns {Promise<CatalogApplicationModel.StoreDetails>} - Success response
995
+ * @returns {Promise<StoreDetails>} - Success response
1577
996
  * @name getLocationDetailsById
1578
997
  * @summary: Get selling location
1579
998
  * @description: Get details about a store based on its location Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getLocationDetailsById/).
@@ -1582,28 +1001,13 @@ class Catalog {
1582
1001
  { locationId, requestHeaders } = { requestHeaders: {} },
1583
1002
  { responseHeaders } = { responseHeaders: false }
1584
1003
  ) {
1585
- const {
1586
- error,
1587
- } = CatalogApplicationValidator.getLocationDetailsById().validate(
1588
- { locationId },
1589
- { abortEarly: false, allowUnknown: true }
1590
- );
1591
- if (error) {
1592
- return Promise.reject(new FDKClientValidationError(error));
1593
- }
1594
-
1595
- // Showing warrnings if extra unknown parameters are found
1596
- const {
1597
- error: warrning,
1598
- } = CatalogApplicationValidator.getLocationDetailsById().validate(
1599
- { locationId },
1600
- { abortEarly: false, allowUnknown: false }
1601
- );
1602
- if (warrning) {
1603
- Logger({
1604
- level: "WARN",
1605
- message: `Parameter Validation warrnings for application > Catalog > getLocationDetailsById \n ${warrning}`,
1004
+ const errors = validateRequiredParams(arguments[0], ["locationId"]);
1005
+ if (errors.length > 0) {
1006
+ const error = new FDKClientValidationError({
1007
+ message: "Missing required field",
1008
+ details: errors,
1606
1009
  });
1010
+ return Promise.reject(new FDKClientValidationError(error));
1607
1011
  }
1608
1012
 
1609
1013
  const query_params = {};
@@ -1628,32 +1032,13 @@ class Catalog {
1628
1032
  responseData = response[0];
1629
1033
  }
1630
1034
 
1631
- const {
1632
- error: res_error,
1633
- } = CatalogApplicationModel.StoreDetails().validate(responseData, {
1634
- abortEarly: false,
1635
- allowUnknown: true,
1636
- });
1637
-
1638
- if (res_error) {
1639
- if (this._conf.options.strictResponseCheck === true) {
1640
- return Promise.reject(new FDKResponseValidationError(res_error));
1641
- } else {
1642
- Logger({
1643
- level: "WARN",
1644
- message: `Response Validation Warnings for application > Catalog > getLocationDetailsById \n ${res_error}`,
1645
- });
1646
- }
1647
- }
1648
-
1649
1035
  return response;
1650
1036
  }
1651
1037
 
1652
1038
  /**
1653
- * @param {CatalogApplicationValidator.GetProductBundlesBySlugParam} arg - Arg object.
1654
1039
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1655
1040
  * @param {import("../ApplicationAPIClient").Options} - Options
1656
- * @returns {Promise<CatalogApplicationModel.ProductBundle>} - Success response
1041
+ * @returns {Promise<ProductBundle>} - Success response
1657
1042
  * @name getProductBundlesBySlug
1658
1043
  * @summary: List product bundles
1659
1044
  * @description: Get products bundles to the one specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductBundlesBySlug/).
@@ -1662,30 +1047,6 @@ class Catalog {
1662
1047
  { slug, id, requestHeaders } = { requestHeaders: {} },
1663
1048
  { responseHeaders } = { responseHeaders: false }
1664
1049
  ) {
1665
- const {
1666
- error,
1667
- } = CatalogApplicationValidator.getProductBundlesBySlug().validate(
1668
- { slug, id },
1669
- { abortEarly: false, allowUnknown: true }
1670
- );
1671
- if (error) {
1672
- return Promise.reject(new FDKClientValidationError(error));
1673
- }
1674
-
1675
- // Showing warrnings if extra unknown parameters are found
1676
- const {
1677
- error: warrning,
1678
- } = CatalogApplicationValidator.getProductBundlesBySlug().validate(
1679
- { slug, id },
1680
- { abortEarly: false, allowUnknown: false }
1681
- );
1682
- if (warrning) {
1683
- Logger({
1684
- level: "WARN",
1685
- message: `Parameter Validation warrnings for application > Catalog > getProductBundlesBySlug \n ${warrning}`,
1686
- });
1687
- }
1688
-
1689
1050
  const query_params = {};
1690
1051
  query_params["slug"] = slug;
1691
1052
  query_params["id"] = id;
@@ -1710,36 +1071,13 @@ class Catalog {
1710
1071
  responseData = response[0];
1711
1072
  }
1712
1073
 
1713
- const {
1714
- error: res_error,
1715
- } = CatalogApplicationModel.ProductBundle().validate(responseData, {
1716
- abortEarly: false,
1717
- allowUnknown: true,
1718
- });
1719
-
1720
- if (res_error) {
1721
- if (this._conf.options.strictResponseCheck === true) {
1722
- return Promise.reject(new FDKResponseValidationError(res_error));
1723
- } else {
1724
- Logger({
1725
- level: "WARN",
1726
- message: `Response Validation Warnings for application > Catalog > getProductBundlesBySlug \n ${res_error}`,
1727
- });
1728
- }
1729
- }
1730
-
1731
1074
  return response;
1732
1075
  }
1733
1076
 
1734
1077
  /**
1735
- * @param {CatalogApplicationValidator.GetProductComparisonBySlugsParam} arg
1736
- * - Arg object.
1737
- *
1738
1078
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1739
1079
  * @param {import("../ApplicationAPIClient").Options} - Options
1740
- * @returns {Promise<CatalogApplicationModel.ProductsComparisonResponseSchema>}
1741
- * - Success response
1742
- *
1080
+ * @returns {Promise<ProductsComparisonResponse>} - Success response
1743
1081
  * @name getProductComparisonBySlugs
1744
1082
  * @summary: List products for comparison
1745
1083
  * @description: Get all the products that have the same category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductComparisonBySlugs/).
@@ -1748,30 +1086,6 @@ class Catalog {
1748
1086
  { slug, requestHeaders } = { requestHeaders: {} },
1749
1087
  { responseHeaders } = { responseHeaders: false }
1750
1088
  ) {
1751
- const {
1752
- error,
1753
- } = CatalogApplicationValidator.getProductComparisonBySlugs().validate(
1754
- { slug },
1755
- { abortEarly: false, allowUnknown: true }
1756
- );
1757
- if (error) {
1758
- return Promise.reject(new FDKClientValidationError(error));
1759
- }
1760
-
1761
- // Showing warrnings if extra unknown parameters are found
1762
- const {
1763
- error: warrning,
1764
- } = CatalogApplicationValidator.getProductComparisonBySlugs().validate(
1765
- { slug },
1766
- { abortEarly: false, allowUnknown: false }
1767
- );
1768
- if (warrning) {
1769
- Logger({
1770
- level: "WARN",
1771
- message: `Parameter Validation warrnings for application > Catalog > getProductComparisonBySlugs \n ${warrning}`,
1772
- });
1773
- }
1774
-
1775
1089
  const query_params = {};
1776
1090
  query_params["slug"] = slug;
1777
1091
 
@@ -1795,32 +1109,13 @@ class Catalog {
1795
1109
  responseData = response[0];
1796
1110
  }
1797
1111
 
1798
- const {
1799
- error: res_error,
1800
- } = CatalogApplicationModel.ProductsComparisonResponseSchema().validate(
1801
- responseData,
1802
- { abortEarly: false, allowUnknown: true }
1803
- );
1804
-
1805
- if (res_error) {
1806
- if (this._conf.options.strictResponseCheck === true) {
1807
- return Promise.reject(new FDKResponseValidationError(res_error));
1808
- } else {
1809
- Logger({
1810
- level: "WARN",
1811
- message: `Response Validation Warnings for application > Catalog > getProductComparisonBySlugs \n ${res_error}`,
1812
- });
1813
- }
1814
- }
1815
-
1816
1112
  return response;
1817
1113
  }
1818
1114
 
1819
1115
  /**
1820
- * @param {CatalogApplicationValidator.GetProductDetailBySlugParam} arg - Arg object.
1821
1116
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1822
1117
  * @param {import("../ApplicationAPIClient").Options} - Options
1823
- * @returns {Promise<CatalogApplicationModel.ProductDetail>} - Success response
1118
+ * @returns {Promise<ProductDetail>} - Success response
1824
1119
  * @name getProductDetailBySlug
1825
1120
  * @summary: Get a product
1826
1121
  * @description: Get product details such as price, attributes, HSN code, SKU code, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductDetailBySlug/).
@@ -1829,28 +1124,13 @@ class Catalog {
1829
1124
  { slug, requestHeaders } = { requestHeaders: {} },
1830
1125
  { responseHeaders } = { responseHeaders: false }
1831
1126
  ) {
1832
- const {
1833
- error,
1834
- } = CatalogApplicationValidator.getProductDetailBySlug().validate(
1835
- { slug },
1836
- { abortEarly: false, allowUnknown: true }
1837
- );
1838
- if (error) {
1839
- return Promise.reject(new FDKClientValidationError(error));
1840
- }
1841
-
1842
- // Showing warrnings if extra unknown parameters are found
1843
- const {
1844
- error: warrning,
1845
- } = CatalogApplicationValidator.getProductDetailBySlug().validate(
1846
- { slug },
1847
- { abortEarly: false, allowUnknown: false }
1848
- );
1849
- if (warrning) {
1850
- Logger({
1851
- level: "WARN",
1852
- message: `Parameter Validation warrnings for application > Catalog > getProductDetailBySlug \n ${warrning}`,
1127
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
1128
+ if (errors.length > 0) {
1129
+ const error = new FDKClientValidationError({
1130
+ message: "Missing required field",
1131
+ details: errors,
1853
1132
  });
1133
+ return Promise.reject(new FDKClientValidationError(error));
1854
1134
  }
1855
1135
 
1856
1136
  const query_params = {};
@@ -1875,33 +1155,13 @@ class Catalog {
1875
1155
  responseData = response[0];
1876
1156
  }
1877
1157
 
1878
- const {
1879
- error: res_error,
1880
- } = CatalogApplicationModel.ProductDetail().validate(responseData, {
1881
- abortEarly: false,
1882
- allowUnknown: true,
1883
- });
1884
-
1885
- if (res_error) {
1886
- if (this._conf.options.strictResponseCheck === true) {
1887
- return Promise.reject(new FDKResponseValidationError(res_error));
1888
- } else {
1889
- Logger({
1890
- level: "WARN",
1891
- message: `Response Validation Warnings for application > Catalog > getProductDetailBySlug \n ${res_error}`,
1892
- });
1893
- }
1894
- }
1895
-
1896
1158
  return response;
1897
1159
  }
1898
1160
 
1899
1161
  /**
1900
- * @param {CatalogApplicationValidator.GetProductPriceBySlugParam} arg - Arg object.
1901
1162
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1902
1163
  * @param {import("../ApplicationAPIClient").Options} - Options
1903
- * @returns {Promise<CatalogApplicationModel.ProductSizePriceResponseV3>} -
1904
- * Success response
1164
+ * @returns {Promise<ProductSizePriceResponseV3>} - Success response
1905
1165
  * @name getProductPriceBySlug
1906
1166
  * @summary: Get product price
1907
1167
  * @description: Get the price of a product size at all the selling locations near to a PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductPriceBySlug/).
@@ -1910,28 +1170,13 @@ class Catalog {
1910
1170
  { slug, size, storeId, moq, requestHeaders } = { requestHeaders: {} },
1911
1171
  { responseHeaders } = { responseHeaders: false }
1912
1172
  ) {
1913
- const {
1914
- error,
1915
- } = CatalogApplicationValidator.getProductPriceBySlug().validate(
1916
- { slug, size, storeId, moq },
1917
- { abortEarly: false, allowUnknown: true }
1918
- );
1919
- if (error) {
1920
- return Promise.reject(new FDKClientValidationError(error));
1921
- }
1922
-
1923
- // Showing warrnings if extra unknown parameters are found
1924
- const {
1925
- error: warrning,
1926
- } = CatalogApplicationValidator.getProductPriceBySlug().validate(
1927
- { slug, size, storeId, moq },
1928
- { abortEarly: false, allowUnknown: false }
1929
- );
1930
- if (warrning) {
1931
- Logger({
1932
- level: "WARN",
1933
- message: `Parameter Validation warrnings for application > Catalog > getProductPriceBySlug \n ${warrning}`,
1173
+ const errors = validateRequiredParams(arguments[0], ["slug", "size"]);
1174
+ if (errors.length > 0) {
1175
+ const error = new FDKClientValidationError({
1176
+ message: "Missing required field",
1177
+ details: errors,
1934
1178
  });
1179
+ return Promise.reject(new FDKClientValidationError(error));
1935
1180
  }
1936
1181
 
1937
1182
  const query_params = {};
@@ -1958,34 +1203,13 @@ class Catalog {
1958
1203
  responseData = response[0];
1959
1204
  }
1960
1205
 
1961
- const {
1962
- error: res_error,
1963
- } = CatalogApplicationModel.ProductSizePriceResponseV3().validate(
1964
- responseData,
1965
- { abortEarly: false, allowUnknown: true }
1966
- );
1967
-
1968
- if (res_error) {
1969
- if (this._conf.options.strictResponseCheck === true) {
1970
- return Promise.reject(new FDKResponseValidationError(res_error));
1971
- } else {
1972
- Logger({
1973
- level: "WARN",
1974
- message: `Response Validation Warnings for application > Catalog > getProductPriceBySlug \n ${res_error}`,
1975
- });
1976
- }
1977
- }
1978
-
1979
1206
  return response;
1980
1207
  }
1981
1208
 
1982
1209
  /**
1983
- * @param {CatalogApplicationValidator.GetProductSellersBySlugParam} arg - Arg object.
1984
1210
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1985
1211
  * @param {import("../ApplicationAPIClient").Options} - Options
1986
- * @returns {Promise<CatalogApplicationModel.ProductSizeSellersResponseV3>}
1987
- * - Success response
1988
- *
1212
+ * @returns {Promise<ProductSizeSellersResponseV3>} - Success response
1989
1213
  * @name getProductSellersBySlug
1990
1214
  * @summary: List sellers
1991
1215
  * @description: List all sellers offering a specific product identified by its slug and size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSellersBySlug/).
@@ -1996,28 +1220,13 @@ class Catalog {
1996
1220
  },
1997
1221
  { responseHeaders } = { responseHeaders: false }
1998
1222
  ) {
1999
- const {
2000
- error,
2001
- } = CatalogApplicationValidator.getProductSellersBySlug().validate(
2002
- { slug, size, strategy, pageNo, pageSize },
2003
- { abortEarly: false, allowUnknown: true }
2004
- );
2005
- if (error) {
2006
- return Promise.reject(new FDKClientValidationError(error));
2007
- }
2008
-
2009
- // Showing warrnings if extra unknown parameters are found
2010
- const {
2011
- error: warrning,
2012
- } = CatalogApplicationValidator.getProductSellersBySlug().validate(
2013
- { slug, size, strategy, pageNo, pageSize },
2014
- { abortEarly: false, allowUnknown: false }
2015
- );
2016
- if (warrning) {
2017
- Logger({
2018
- level: "WARN",
2019
- message: `Parameter Validation warrnings for application > Catalog > getProductSellersBySlug \n ${warrning}`,
1223
+ const errors = validateRequiredParams(arguments[0], ["slug", "size"]);
1224
+ if (errors.length > 0) {
1225
+ const error = new FDKClientValidationError({
1226
+ message: "Missing required field",
1227
+ details: errors,
2020
1228
  });
1229
+ return Promise.reject(new FDKClientValidationError(error));
2021
1230
  }
2022
1231
 
2023
1232
  const query_params = {};
@@ -2045,24 +1254,6 @@ class Catalog {
2045
1254
  responseData = response[0];
2046
1255
  }
2047
1256
 
2048
- const {
2049
- error: res_error,
2050
- } = CatalogApplicationModel.ProductSizeSellersResponseV3().validate(
2051
- responseData,
2052
- { abortEarly: false, allowUnknown: true }
2053
- );
2054
-
2055
- if (res_error) {
2056
- if (this._conf.options.strictResponseCheck === true) {
2057
- return Promise.reject(new FDKResponseValidationError(res_error));
2058
- } else {
2059
- Logger({
2060
- level: "WARN",
2061
- message: `Response Validation Warnings for application > Catalog > getProductSellersBySlug \n ${res_error}`,
2062
- });
2063
- }
2064
- }
2065
-
2066
1257
  return response;
2067
1258
  }
2068
1259
 
@@ -2077,7 +1268,7 @@ class Catalog {
2077
1268
  * @param {string} [arg.strategy] - Sort stores on the basis of strategy.
2078
1269
  * eg, fast-delivery, low-price, optimal.
2079
1270
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
2080
- * @returns {Paginator<CatalogApplicationModel.ProductSizeSellersResponseV3>}
1271
+ * @returns {Paginator<ProductSizeSellersResponseV3>}
2081
1272
  * @summary: List sellers
2082
1273
  * @description: List all sellers offering a specific product identified by its slug and size.
2083
1274
  */
@@ -2105,10 +1296,9 @@ class Catalog {
2105
1296
  }
2106
1297
 
2107
1298
  /**
2108
- * @param {CatalogApplicationValidator.GetProductSizesBySlugParam} arg - Arg object.
2109
1299
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2110
1300
  * @param {import("../ApplicationAPIClient").Options} - Options
2111
- * @returns {Promise<CatalogApplicationModel.ProductSizes>} - Success response
1301
+ * @returns {Promise<ProductSizes>} - Success response
2112
1302
  * @name getProductSizesBySlug
2113
1303
  * @summary: List sizes
2114
1304
  * @description: Provides detailed information about a product, including its availability (sellable), available sizes with quantities, dimensions, weight, availability status, price details (marked, effective, selling), minimum order quantity (MOQ). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSizesBySlug/).
@@ -2117,28 +1307,13 @@ class Catalog {
2117
1307
  { slug, storeId, requestHeaders } = { requestHeaders: {} },
2118
1308
  { responseHeaders } = { responseHeaders: false }
2119
1309
  ) {
2120
- const {
2121
- error,
2122
- } = CatalogApplicationValidator.getProductSizesBySlug().validate(
2123
- { slug, storeId },
2124
- { abortEarly: false, allowUnknown: true }
2125
- );
2126
- if (error) {
2127
- return Promise.reject(new FDKClientValidationError(error));
2128
- }
2129
-
2130
- // Showing warrnings if extra unknown parameters are found
2131
- const {
2132
- error: warrning,
2133
- } = CatalogApplicationValidator.getProductSizesBySlug().validate(
2134
- { slug, storeId },
2135
- { abortEarly: false, allowUnknown: false }
2136
- );
2137
- if (warrning) {
2138
- Logger({
2139
- level: "WARN",
2140
- message: `Parameter Validation warrnings for application > Catalog > getProductSizesBySlug \n ${warrning}`,
1310
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
1311
+ if (errors.length > 0) {
1312
+ const error = new FDKClientValidationError({
1313
+ message: "Missing required field",
1314
+ details: errors,
2141
1315
  });
1316
+ return Promise.reject(new FDKClientValidationError(error));
2142
1317
  }
2143
1318
 
2144
1319
  const query_params = {};
@@ -2164,34 +1339,13 @@ class Catalog {
2164
1339
  responseData = response[0];
2165
1340
  }
2166
1341
 
2167
- const {
2168
- error: res_error,
2169
- } = CatalogApplicationModel.ProductSizes().validate(responseData, {
2170
- abortEarly: false,
2171
- allowUnknown: true,
2172
- });
2173
-
2174
- if (res_error) {
2175
- if (this._conf.options.strictResponseCheck === true) {
2176
- return Promise.reject(new FDKResponseValidationError(res_error));
2177
- } else {
2178
- Logger({
2179
- level: "WARN",
2180
- message: `Response Validation Warnings for application > Catalog > getProductSizesBySlug \n ${res_error}`,
2181
- });
2182
- }
2183
- }
2184
-
2185
1342
  return response;
2186
1343
  }
2187
1344
 
2188
1345
  /**
2189
- * @param {CatalogApplicationValidator.GetProductStockByIdsParam} arg - Arg object.
2190
1346
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2191
1347
  * @param {import("../ApplicationAPIClient").Options} - Options
2192
- * @returns {Promise<CatalogApplicationModel.ProductStockStatusResponseSchema>}
2193
- * - Success response
2194
- *
1348
+ * @returns {Promise<ProductStockStatusResponse>} - Success response
2195
1349
  * @name getProductStockByIds
2196
1350
  * @summary: Get product stocks
2197
1351
  * @description: Get the current stock status for products identified by their IDs, such as SKU, ALU, EAN, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockByIds/).
@@ -2200,30 +1354,6 @@ class Catalog {
2200
1354
  { itemId, alu, skuCode, ean, upc, requestHeaders } = { requestHeaders: {} },
2201
1355
  { responseHeaders } = { responseHeaders: false }
2202
1356
  ) {
2203
- const {
2204
- error,
2205
- } = CatalogApplicationValidator.getProductStockByIds().validate(
2206
- { itemId, alu, skuCode, ean, upc },
2207
- { abortEarly: false, allowUnknown: true }
2208
- );
2209
- if (error) {
2210
- return Promise.reject(new FDKClientValidationError(error));
2211
- }
2212
-
2213
- // Showing warrnings if extra unknown parameters are found
2214
- const {
2215
- error: warrning,
2216
- } = CatalogApplicationValidator.getProductStockByIds().validate(
2217
- { itemId, alu, skuCode, ean, upc },
2218
- { abortEarly: false, allowUnknown: false }
2219
- );
2220
- if (warrning) {
2221
- Logger({
2222
- level: "WARN",
2223
- message: `Parameter Validation warrnings for application > Catalog > getProductStockByIds \n ${warrning}`,
2224
- });
2225
- }
2226
-
2227
1357
  const query_params = {};
2228
1358
  query_params["item_id"] = itemId;
2229
1359
  query_params["alu"] = alu;
@@ -2251,34 +1381,13 @@ class Catalog {
2251
1381
  responseData = response[0];
2252
1382
  }
2253
1383
 
2254
- const {
2255
- error: res_error,
2256
- } = CatalogApplicationModel.ProductStockStatusResponseSchema().validate(
2257
- responseData,
2258
- { abortEarly: false, allowUnknown: true }
2259
- );
2260
-
2261
- if (res_error) {
2262
- if (this._conf.options.strictResponseCheck === true) {
2263
- return Promise.reject(new FDKResponseValidationError(res_error));
2264
- } else {
2265
- Logger({
2266
- level: "WARN",
2267
- message: `Response Validation Warnings for application > Catalog > getProductStockByIds \n ${res_error}`,
2268
- });
2269
- }
2270
- }
2271
-
2272
1384
  return response;
2273
1385
  }
2274
1386
 
2275
1387
  /**
2276
- * @param {CatalogApplicationValidator.GetProductStockForTimeByIdsParam} arg
2277
- * - Arg object.
2278
- *
2279
1388
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2280
1389
  * @param {import("../ApplicationAPIClient").Options} - Options
2281
- * @returns {Promise<CatalogApplicationModel.ProductStockPolling>} - Success response
1390
+ * @returns {Promise<ProductStockPolling>} - Success response
2282
1391
  * @name getProductStockForTimeByIds
2283
1392
  * @summary: List future stock
2284
1393
  * @description: Get the available stock levels for all products associated with a particular sales channel at a specified future time. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockForTimeByIds/).
@@ -2287,30 +1396,6 @@ class Catalog {
2287
1396
  { timestamp, pageSize, pageId, requestHeaders } = { requestHeaders: {} },
2288
1397
  { responseHeaders } = { responseHeaders: false }
2289
1398
  ) {
2290
- const {
2291
- error,
2292
- } = CatalogApplicationValidator.getProductStockForTimeByIds().validate(
2293
- { timestamp, pageSize, pageId },
2294
- { abortEarly: false, allowUnknown: true }
2295
- );
2296
- if (error) {
2297
- return Promise.reject(new FDKClientValidationError(error));
2298
- }
2299
-
2300
- // Showing warrnings if extra unknown parameters are found
2301
- const {
2302
- error: warrning,
2303
- } = CatalogApplicationValidator.getProductStockForTimeByIds().validate(
2304
- { timestamp, pageSize, pageId },
2305
- { abortEarly: false, allowUnknown: false }
2306
- );
2307
- if (warrning) {
2308
- Logger({
2309
- level: "WARN",
2310
- message: `Parameter Validation warrnings for application > Catalog > getProductStockForTimeByIds \n ${warrning}`,
2311
- });
2312
- }
2313
-
2314
1399
  const query_params = {};
2315
1400
  query_params["timestamp"] = timestamp;
2316
1401
  query_params["page_size"] = pageSize;
@@ -2336,24 +1421,6 @@ class Catalog {
2336
1421
  responseData = response[0];
2337
1422
  }
2338
1423
 
2339
- const {
2340
- error: res_error,
2341
- } = CatalogApplicationModel.ProductStockPolling().validate(responseData, {
2342
- abortEarly: false,
2343
- allowUnknown: true,
2344
- });
2345
-
2346
- if (res_error) {
2347
- if (this._conf.options.strictResponseCheck === true) {
2348
- return Promise.reject(new FDKResponseValidationError(res_error));
2349
- } else {
2350
- Logger({
2351
- level: "WARN",
2352
- message: `Response Validation Warnings for application > Catalog > getProductStockForTimeByIds \n ${res_error}`,
2353
- });
2354
- }
2355
- }
2356
-
2357
1424
  return response;
2358
1425
  }
2359
1426
 
@@ -2361,7 +1428,7 @@ class Catalog {
2361
1428
  * @param {Object} arg - Arg object.
2362
1429
  * @param {string} arg.timestamp - Timestamp in UTC format (2020-07-23T10:27:50Z).
2363
1430
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
2364
- * @returns {Paginator<CatalogApplicationModel.ProductStockPolling>}
1431
+ * @returns {Paginator<ProductStockPolling>}
2365
1432
  * @summary: List future stock
2366
1433
  * @description: Get the available stock levels for all products associated with a particular sales channel at a specified future time.
2367
1434
  */
@@ -2387,13 +1454,9 @@ class Catalog {
2387
1454
  }
2388
1455
 
2389
1456
  /**
2390
- * @param {CatalogApplicationValidator.GetProductVariantsBySlugParam} arg -
2391
- * Arg object.
2392
1457
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2393
1458
  * @param {import("../ApplicationAPIClient").Options} - Options
2394
- * @returns {Promise<CatalogApplicationModel.ProductVariantsResponseSchema>}
2395
- * - Success response
2396
- *
1459
+ * @returns {Promise<ProductVariantsResponse>} - Success response
2397
1460
  * @name getProductVariantsBySlug
2398
1461
  * @summary: List product variants
2399
1462
  * @description: Get all available variants of a specific product identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductVariantsBySlug/).
@@ -2402,28 +1465,13 @@ class Catalog {
2402
1465
  { slug, requestHeaders } = { requestHeaders: {} },
2403
1466
  { responseHeaders } = { responseHeaders: false }
2404
1467
  ) {
2405
- const {
2406
- error,
2407
- } = CatalogApplicationValidator.getProductVariantsBySlug().validate(
2408
- { slug },
2409
- { abortEarly: false, allowUnknown: true }
2410
- );
2411
- if (error) {
2412
- return Promise.reject(new FDKClientValidationError(error));
2413
- }
2414
-
2415
- // Showing warrnings if extra unknown parameters are found
2416
- const {
2417
- error: warrning,
2418
- } = CatalogApplicationValidator.getProductVariantsBySlug().validate(
2419
- { slug },
2420
- { abortEarly: false, allowUnknown: false }
2421
- );
2422
- if (warrning) {
2423
- Logger({
2424
- level: "WARN",
2425
- message: `Parameter Validation warrnings for application > Catalog > getProductVariantsBySlug \n ${warrning}`,
1468
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
1469
+ if (errors.length > 0) {
1470
+ const error = new FDKClientValidationError({
1471
+ message: "Missing required field",
1472
+ details: errors,
2426
1473
  });
1474
+ return Promise.reject(new FDKClientValidationError(error));
2427
1475
  }
2428
1476
 
2429
1477
  const query_params = {};
@@ -2448,34 +1496,13 @@ class Catalog {
2448
1496
  responseData = response[0];
2449
1497
  }
2450
1498
 
2451
- const {
2452
- error: res_error,
2453
- } = CatalogApplicationModel.ProductVariantsResponseSchema().validate(
2454
- responseData,
2455
- { abortEarly: false, allowUnknown: true }
2456
- );
2457
-
2458
- if (res_error) {
2459
- if (this._conf.options.strictResponseCheck === true) {
2460
- return Promise.reject(new FDKResponseValidationError(res_error));
2461
- } else {
2462
- Logger({
2463
- level: "WARN",
2464
- message: `Response Validation Warnings for application > Catalog > getProductVariantsBySlug \n ${res_error}`,
2465
- });
2466
- }
2467
- }
2468
-
2469
1499
  return response;
2470
1500
  }
2471
1501
 
2472
1502
  /**
2473
- * @param {CatalogApplicationValidator.GetProductsParam} arg - Arg object.
2474
1503
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2475
1504
  * @param {import("../ApplicationAPIClient").Options} - Options
2476
- * @returns {Promise<CatalogApplicationModel.ProductListingResponseSchema>}
2477
- * - Success response
2478
- *
1505
+ * @returns {Promise<ProductListingResponse>} - Success response
2479
1506
  * @name getProducts
2480
1507
  * @summary: List products
2481
1508
  * @description: List all products available in the catalog. It supports filtering based on product name, brand, department, category, collection, and more, while also offering sorting options based on factors like price, ratings, discounts, and other relevant criteria. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProducts/).
@@ -2494,28 +1521,6 @@ class Catalog {
2494
1521
  } = { requestHeaders: {} },
2495
1522
  { responseHeaders } = { responseHeaders: false }
2496
1523
  ) {
2497
- const { error } = CatalogApplicationValidator.getProducts().validate(
2498
- { q, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
2499
- { abortEarly: false, allowUnknown: true }
2500
- );
2501
- if (error) {
2502
- return Promise.reject(new FDKClientValidationError(error));
2503
- }
2504
-
2505
- // Showing warrnings if extra unknown parameters are found
2506
- const {
2507
- error: warrning,
2508
- } = CatalogApplicationValidator.getProducts().validate(
2509
- { q, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
2510
- { abortEarly: false, allowUnknown: false }
2511
- );
2512
- if (warrning) {
2513
- Logger({
2514
- level: "WARN",
2515
- message: `Parameter Validation warrnings for application > Catalog > getProducts \n ${warrning}`,
2516
- });
2517
- }
2518
-
2519
1524
  const query_params = {};
2520
1525
  query_params["q"] = q;
2521
1526
  query_params["f"] = f;
@@ -2546,24 +1551,6 @@ class Catalog {
2546
1551
  responseData = response[0];
2547
1552
  }
2548
1553
 
2549
- const {
2550
- error: res_error,
2551
- } = CatalogApplicationModel.ProductListingResponseSchema().validate(
2552
- responseData,
2553
- { abortEarly: false, allowUnknown: true }
2554
- );
2555
-
2556
- if (res_error) {
2557
- if (this._conf.options.strictResponseCheck === true) {
2558
- return Promise.reject(new FDKResponseValidationError(res_error));
2559
- } else {
2560
- Logger({
2561
- level: "WARN",
2562
- message: `Response Validation Warnings for application > Catalog > getProducts \n ${res_error}`,
2563
- });
2564
- }
2565
- }
2566
-
2567
1554
  return response;
2568
1555
  }
2569
1556
 
@@ -2581,7 +1568,7 @@ class Catalog {
2581
1568
  * should be sorted, e.g. popularity, price, latest and discount, in
2582
1569
  * either ascending or descending order. See the supported values below.
2583
1570
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
2584
- * @returns {Paginator<CatalogApplicationModel.ProductListingResponseSchema>}
1571
+ * @returns {Paginator<ProductListingResponse>}
2585
1572
  * @summary: List products
2586
1573
  * @description: List all products available in the catalog. It supports filtering based on product name, brand, department, category, collection, and more, while also offering sorting options based on factors like price, ratings, discounts, and other relevant criteria.
2587
1574
  */
@@ -2612,11 +1599,9 @@ class Catalog {
2612
1599
  }
2613
1600
 
2614
1601
  /**
2615
- * @param {CatalogApplicationValidator.GetSearchResultsParam} arg - Arg object.
2616
1602
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2617
1603
  * @param {import("../ApplicationAPIClient").Options} - Options
2618
- * @returns {Promise<CatalogApplicationModel.AutoCompleteResponseSchema>} -
2619
- * Success response
1604
+ * @returns {Promise<AutoCompleteResponse>} - Success response
2620
1605
  * @name getSearchResults
2621
1606
  * @summary: List product, brand, category
2622
1607
  * @description: Get products, brands, or categories based on a search query, which can be a partial or full name match. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSearchResults/).
@@ -2625,28 +1610,6 @@ class Catalog {
2625
1610
  { q, requestHeaders } = { requestHeaders: {} },
2626
1611
  { responseHeaders } = { responseHeaders: false }
2627
1612
  ) {
2628
- const { error } = CatalogApplicationValidator.getSearchResults().validate(
2629
- { q },
2630
- { abortEarly: false, allowUnknown: true }
2631
- );
2632
- if (error) {
2633
- return Promise.reject(new FDKClientValidationError(error));
2634
- }
2635
-
2636
- // Showing warrnings if extra unknown parameters are found
2637
- const {
2638
- error: warrning,
2639
- } = CatalogApplicationValidator.getSearchResults().validate(
2640
- { q },
2641
- { abortEarly: false, allowUnknown: false }
2642
- );
2643
- if (warrning) {
2644
- Logger({
2645
- level: "WARN",
2646
- message: `Parameter Validation warrnings for application > Catalog > getSearchResults \n ${warrning}`,
2647
- });
2648
- }
2649
-
2650
1613
  const query_params = {};
2651
1614
  query_params["q"] = q;
2652
1615
 
@@ -2670,36 +1633,13 @@ class Catalog {
2670
1633
  responseData = response[0];
2671
1634
  }
2672
1635
 
2673
- const {
2674
- error: res_error,
2675
- } = CatalogApplicationModel.AutoCompleteResponseSchema().validate(
2676
- responseData,
2677
- { abortEarly: false, allowUnknown: true }
2678
- );
2679
-
2680
- if (res_error) {
2681
- if (this._conf.options.strictResponseCheck === true) {
2682
- return Promise.reject(new FDKResponseValidationError(res_error));
2683
- } else {
2684
- Logger({
2685
- level: "WARN",
2686
- message: `Response Validation Warnings for application > Catalog > getSearchResults \n ${res_error}`,
2687
- });
2688
- }
2689
- }
2690
-
2691
1636
  return response;
2692
1637
  }
2693
1638
 
2694
1639
  /**
2695
- * @param {CatalogApplicationValidator.GetSimilarComparisonProductBySlugParam} arg
2696
- * - Arg object.
2697
- *
2698
1640
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2699
1641
  * @param {import("../ApplicationAPIClient").Options} - Options
2700
- * @returns {Promise<CatalogApplicationModel.ProductCompareResponseSchema>}
2701
- * - Success response
2702
- *
1642
+ * @returns {Promise<ProductCompareResponse>} - Success response
2703
1643
  * @name getSimilarComparisonProductBySlug
2704
1644
  * @summary: List similar products
2705
1645
  * @description: Get all products within the same category as the one specified by the provided slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSimilarComparisonProductBySlug/).
@@ -2708,28 +1648,13 @@ class Catalog {
2708
1648
  { slug, requestHeaders } = { requestHeaders: {} },
2709
1649
  { responseHeaders } = { responseHeaders: false }
2710
1650
  ) {
2711
- const {
2712
- error,
2713
- } = CatalogApplicationValidator.getSimilarComparisonProductBySlug().validate(
2714
- { slug },
2715
- { abortEarly: false, allowUnknown: true }
2716
- );
2717
- if (error) {
2718
- return Promise.reject(new FDKClientValidationError(error));
2719
- }
2720
-
2721
- // Showing warrnings if extra unknown parameters are found
2722
- const {
2723
- error: warrning,
2724
- } = CatalogApplicationValidator.getSimilarComparisonProductBySlug().validate(
2725
- { slug },
2726
- { abortEarly: false, allowUnknown: false }
2727
- );
2728
- if (warrning) {
2729
- Logger({
2730
- level: "WARN",
2731
- message: `Parameter Validation warrnings for application > Catalog > getSimilarComparisonProductBySlug \n ${warrning}`,
1651
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
1652
+ if (errors.length > 0) {
1653
+ const error = new FDKClientValidationError({
1654
+ message: "Missing required field",
1655
+ details: errors,
2732
1656
  });
1657
+ return Promise.reject(new FDKClientValidationError(error));
2733
1658
  }
2734
1659
 
2735
1660
  const query_params = {};
@@ -2754,33 +1679,13 @@ class Catalog {
2754
1679
  responseData = response[0];
2755
1680
  }
2756
1681
 
2757
- const {
2758
- error: res_error,
2759
- } = CatalogApplicationModel.ProductCompareResponseSchema().validate(
2760
- responseData,
2761
- { abortEarly: false, allowUnknown: true }
2762
- );
2763
-
2764
- if (res_error) {
2765
- if (this._conf.options.strictResponseCheck === true) {
2766
- return Promise.reject(new FDKResponseValidationError(res_error));
2767
- } else {
2768
- Logger({
2769
- level: "WARN",
2770
- message: `Response Validation Warnings for application > Catalog > getSimilarComparisonProductBySlug \n ${res_error}`,
2771
- });
2772
- }
2773
- }
2774
-
2775
1682
  return response;
2776
1683
  }
2777
1684
 
2778
1685
  /**
2779
- * @param {CatalogApplicationValidator.GetStoresParam} arg - Arg object.
2780
1686
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2781
1687
  * @param {import("../ApplicationAPIClient").Options} - Options
2782
- * @returns {Promise<CatalogApplicationModel.StoreListingResponseSchema>} -
2783
- * Success response
1688
+ * @returns {Promise<StoreListingResponse>} - Success response
2784
1689
  * @name getStores
2785
1690
  * @summary: List available stores
2786
1691
  * @description: List all stores associated with the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getStores/).
@@ -2799,28 +1704,6 @@ class Catalog {
2799
1704
  } = { requestHeaders: {} },
2800
1705
  { responseHeaders } = { responseHeaders: false }
2801
1706
  ) {
2802
- const { error } = CatalogApplicationValidator.getStores().validate(
2803
- { pageNo, pageSize, q, city, range, latitude, longitude, tags },
2804
- { abortEarly: false, allowUnknown: true }
2805
- );
2806
- if (error) {
2807
- return Promise.reject(new FDKClientValidationError(error));
2808
- }
2809
-
2810
- // Showing warrnings if extra unknown parameters are found
2811
- const {
2812
- error: warrning,
2813
- } = CatalogApplicationValidator.getStores().validate(
2814
- { pageNo, pageSize, q, city, range, latitude, longitude, tags },
2815
- { abortEarly: false, allowUnknown: false }
2816
- );
2817
- if (warrning) {
2818
- Logger({
2819
- level: "WARN",
2820
- message: `Parameter Validation warrnings for application > Catalog > getStores \n ${warrning}`,
2821
- });
2822
- }
2823
-
2824
1707
  const query_params = {};
2825
1708
  query_params["page_no"] = pageNo;
2826
1709
  query_params["page_size"] = pageSize;
@@ -2851,24 +1734,6 @@ class Catalog {
2851
1734
  responseData = response[0];
2852
1735
  }
2853
1736
 
2854
- const {
2855
- error: res_error,
2856
- } = CatalogApplicationModel.StoreListingResponseSchema().validate(
2857
- responseData,
2858
- { abortEarly: false, allowUnknown: true }
2859
- );
2860
-
2861
- if (res_error) {
2862
- if (this._conf.options.strictResponseCheck === true) {
2863
- return Promise.reject(new FDKResponseValidationError(res_error));
2864
- } else {
2865
- Logger({
2866
- level: "WARN",
2867
- message: `Response Validation Warnings for application > Catalog > getStores \n ${res_error}`,
2868
- });
2869
- }
2870
- }
2871
-
2872
1737
  return response;
2873
1738
  }
2874
1739
 
@@ -2884,7 +1749,7 @@ class Catalog {
2884
1749
  * @param {number} [arg.longitude] - Longitude of the location from where
2885
1750
  * one wants to retrieve the nearest stores, e.g. 19.1174114.
2886
1751
  * @param {string} [arg.tags] - Search stores based on tags.
2887
- * @returns {Paginator<CatalogApplicationModel.StoreListingResponseSchema>}
1752
+ * @returns {Paginator<StoreListingResponse>}
2888
1753
  * @summary: List available stores
2889
1754
  * @description: List all stores associated with the sales channel.
2890
1755
  */
@@ -2923,11 +1788,9 @@ class Catalog {
2923
1788
  }
2924
1789
 
2925
1790
  /**
2926
- * @param {CatalogApplicationValidator.UnfollowByIdParam} arg - Arg object.
2927
1791
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2928
1792
  * @param {import("../ApplicationAPIClient").Options} - Options
2929
- * @returns {Promise<CatalogApplicationModel.FollowPostResponseSchema>} -
2930
- * Success response
1793
+ * @returns {Promise<FollowPostResponse>} - Success response
2931
1794
  * @name unfollowById
2932
1795
  * @summary: Delete item, brand, product
2933
1796
  * @description: Remove a followed item, brand, or product using its collection ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/unfollowById/).
@@ -2936,26 +1799,16 @@ class Catalog {
2936
1799
  { collectionType, collectionId, requestHeaders } = { requestHeaders: {} },
2937
1800
  { responseHeaders } = { responseHeaders: false }
2938
1801
  ) {
2939
- const { error } = CatalogApplicationValidator.unfollowById().validate(
2940
- { collectionType, collectionId },
2941
- { abortEarly: false, allowUnknown: true }
2942
- );
2943
- if (error) {
2944
- return Promise.reject(new FDKClientValidationError(error));
2945
- }
2946
-
2947
- // Showing warrnings if extra unknown parameters are found
2948
- const {
2949
- error: warrning,
2950
- } = CatalogApplicationValidator.unfollowById().validate(
2951
- { collectionType, collectionId },
2952
- { abortEarly: false, allowUnknown: false }
2953
- );
2954
- if (warrning) {
2955
- Logger({
2956
- level: "WARN",
2957
- message: `Parameter Validation warrnings for application > Catalog > unfollowById \n ${warrning}`,
1802
+ const errors = validateRequiredParams(arguments[0], [
1803
+ "collectionType",
1804
+ "collectionId",
1805
+ ]);
1806
+ if (errors.length > 0) {
1807
+ const error = new FDKClientValidationError({
1808
+ message: "Missing required field",
1809
+ details: errors,
2958
1810
  });
1811
+ return Promise.reject(new FDKClientValidationError(error));
2959
1812
  }
2960
1813
 
2961
1814
  const query_params = {};
@@ -2980,24 +1833,6 @@ class Catalog {
2980
1833
  responseData = response[0];
2981
1834
  }
2982
1835
 
2983
- const {
2984
- error: res_error,
2985
- } = CatalogApplicationModel.FollowPostResponseSchema().validate(
2986
- responseData,
2987
- { abortEarly: false, allowUnknown: true }
2988
- );
2989
-
2990
- if (res_error) {
2991
- if (this._conf.options.strictResponseCheck === true) {
2992
- return Promise.reject(new FDKResponseValidationError(res_error));
2993
- } else {
2994
- Logger({
2995
- level: "WARN",
2996
- message: `Response Validation Warnings for application > Catalog > unfollowById \n ${res_error}`,
2997
- });
2998
- }
2999
- }
3000
-
3001
1836
  return response;
3002
1837
  }
3003
1838
  }