@gofynd/fdk-client-javascript 1.1.6 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/README.md +52 -3
  2. package/index.js +0 -3
  3. package/package.json +1 -2
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +12 -3
  6. package/sdk/application/ApplicationClient.d.ts +36 -6
  7. package/sdk/application/ApplicationClient.js +30 -43
  8. package/sdk/application/ApplicationConfig.d.ts +92 -12
  9. package/sdk/application/ApplicationConfig.js +48 -14
  10. package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
  11. package/sdk/application/Cart/CartApplicationClient.js +711 -483
  12. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  13. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  14. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  15. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
  18. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
  19. package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
  20. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  21. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  22. package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
  23. package/sdk/application/Common/CommonApplicationClient.js +52 -33
  24. package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
  25. package/sdk/application/Common/CommonApplicationModel.js +192 -40
  26. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  28. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
  29. package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
  30. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
  31. package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
  32. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  33. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  34. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
  36. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
  38. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  40. package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
  41. package/sdk/application/Content/ContentApplicationClient.js +489 -278
  42. package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
  43. package/sdk/application/Content/ContentApplicationModel.js +737 -396
  44. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  45. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  46. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
  48. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
  50. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  52. package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
  53. package/sdk/application/Lead/LeadApplicationClient.js +188 -103
  54. package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
  55. package/sdk/application/Lead/LeadApplicationModel.js +330 -244
  56. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  57. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  58. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
  59. package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
  60. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  61. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  62. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  63. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  64. package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
  65. package/sdk/application/Order/OrderApplicationClient.js +329 -217
  66. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  67. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  68. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  69. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  70. package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
  71. package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
  72. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  73. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  74. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  75. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  76. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
  77. package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
  78. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  79. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  80. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  81. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  82. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
  83. package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
  84. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  85. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  86. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  87. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  88. package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
  89. package/sdk/application/Share/ShareApplicationClient.js +185 -97
  90. package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
  91. package/sdk/application/Share/ShareApplicationModel.js +131 -31
  92. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  93. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  94. package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
  95. package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
  96. package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
  97. package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
  98. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  99. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  100. package/sdk/application/User/UserApplicationClient.d.ts +260 -305
  101. package/sdk/application/User/UserApplicationClient.js +910 -522
  102. package/sdk/application/User/UserApplicationModel.d.ts +992 -101
  103. package/sdk/application/User/UserApplicationModel.js +699 -248
  104. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  105. package/sdk/application/User/UserApplicationValidator.js +265 -31
  106. package/sdk/common/AxiosHelper.js +7 -2
  107. package/sdk/common/FDKError.d.ts +3 -0
  108. package/sdk/common/FDKError.js +8 -0
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/common/utils.d.ts +3 -0
  113. package/sdk/common/utils.js +29 -0
  114. package/sdk/partner/PartnerAPIClient.d.ts +16 -1
  115. package/sdk/partner/PartnerAPIClient.js +12 -2
  116. package/sdk/partner/PartnerClient.d.ts +22 -3
  117. package/sdk/partner/PartnerClient.js +20 -0
  118. package/sdk/partner/PartnerConfig.d.ts +40 -14
  119. package/sdk/partner/PartnerConfig.js +31 -6
  120. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  121. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  122. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  123. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  124. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  125. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  126. package/sdk/partner/index.d.ts +3 -1
  127. package/sdk/partner/index.js +3 -1
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
  132. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
  133. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
  134. package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
  135. package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
  136. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
  137. package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
  138. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
  139. package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
  140. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
  141. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
  142. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  143. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  144. package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
  145. package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
  148. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  149. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  150. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
  151. package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
  152. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
  153. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
  154. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
  155. package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
  156. package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
  157. package/sdk/platform/Common/CommonPlatformClient.js +50 -33
  158. package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
  159. package/sdk/platform/Common/CommonPlatformModel.js +214 -40
  160. package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
  161. package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
  162. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
  163. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
  164. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
  165. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
  166. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
  167. package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
  168. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
  169. package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
  170. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  171. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  172. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
  173. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
  174. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
  175. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
  176. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
  177. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
  178. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
  179. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
  180. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
  181. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
  182. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
  183. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
  184. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
  185. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
  186. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  187. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  188. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
  189. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
  190. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  191. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  192. package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
  193. package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
  194. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
  195. package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
  196. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
  197. package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
  198. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  199. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  200. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
  201. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
  202. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
  203. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
  204. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
  205. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
  206. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
  207. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
  208. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
  209. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
  210. package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
  211. package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
  212. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
  213. package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
  214. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
  215. package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
  216. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
  217. package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
  218. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  219. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  220. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  221. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  222. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
  223. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
  224. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  225. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  226. package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
  227. package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
  228. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
  229. package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
  230. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  231. package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
  232. package/sdk/platform/OAuthClient.js +6 -2
  233. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
  234. package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
  235. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  236. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  237. package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
  238. package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
  239. package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
  240. package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
  241. package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
  242. package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
  243. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
  244. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
  245. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
  246. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
  247. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
  248. package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
  249. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
  250. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
  251. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
  252. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
  253. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
  254. package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
  255. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
  256. package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
  257. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  258. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  259. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  260. package/sdk/platform/PlatformAPIClient.js +9 -1
  261. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  262. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  263. package/sdk/platform/PlatformClient.d.ts +31 -12581
  264. package/sdk/platform/PlatformClient.js +30 -15089
  265. package/sdk/platform/PlatformConfig.d.ts +37 -11
  266. package/sdk/platform/PlatformConfig.js +32 -6
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  270. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  271. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
  272. package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
  276. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
  277. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
  278. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
  279. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
  280. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
  281. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  282. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  283. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
  284. package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
  285. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  286. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  287. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  288. package/sdk/platform/Share/SharePlatformModel.js +167 -19
  289. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
  290. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
  291. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
  292. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
  293. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  294. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  295. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
  296. package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
  297. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  298. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  299. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
  300. package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
  301. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
  302. package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
  303. package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
  304. package/sdk/platform/User/UserPlatformModel.js +467 -424
  305. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
  306. package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
  307. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
  308. package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
  309. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
  310. package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
  311. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
  312. package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
  313. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
  314. package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
  315. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  316. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  317. package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
  318. package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
  319. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  320. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  321. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  322. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  323. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  324. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  325. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  326. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  327. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  328. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  329. package/sdk/public/PublicAPIClient.d.ts +14 -1
  330. package/sdk/public/PublicAPIClient.js +7 -1
  331. package/sdk/public/PublicClient.d.ts +21 -3
  332. package/sdk/public/PublicClient.js +20 -0
  333. package/sdk/public/PublicConfig.d.ts +27 -6
  334. package/sdk/public/PublicConfig.js +17 -1
  335. package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
  336. package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
  337. package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
  338. package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
  339. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  340. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
  341. package/sdk/public/index.d.ts +1 -0
  342. package/sdk/public/index.js +2 -0
  343. package/sdk/application/ApplicationModels.d.ts +0 -3
  344. package/sdk/application/ApplicationModels.js +0 -20
  345. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
  346. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
  347. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
  348. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
@@ -1,8 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const Paginator = require("../../common/Paginator");
4
- const CatalogValidator = require("./CatalogPlatformApplicationValidator");
5
- const CatalogModel = require("./CatalogPlatformModel");
4
+ const CatalogPlatformApplicationValidator = require("./CatalogPlatformApplicationValidator");
5
+ const CatalogPlatformModel = require("./CatalogPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -13,15 +13,23 @@ class Catalog {
13
13
  }
14
14
 
15
15
  /**
16
- * @param {Object} arg - Arg object.
17
- * @param {string} arg.id - A `id` is a unique identifier of a collection.
18
- * @param {CollectionItemUpdate} arg.body
19
- * @returns {Promise<UpdatedResponse>} - Success response
16
+ * @param {CatalogPlatformApplicationValidator.AddCollectionItemsParam} arg
17
+ * - Arg object
18
+ *
19
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
20
+ * @param {import("../PlatformAPIClient").Options} - Options
21
+ * @returns {Promise<CatalogPlatformModel.UpdatedResponse>} - Success response
22
+ * @name addCollectionItems
20
23
  * @summary: Add items to a collection
21
- * @description: Adds items to a collection specified by its `id`. See `CollectionItemRequest` for the list of attributes needed to add items to an collection.
24
+ * @description: Adds items to a collection specified by its `id`. See `CollectionItemRequest` for the list of attributes needed to add items to an collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/addCollectionItems/).
22
25
  */
23
- async addCollectionItems({ id, body } = {}) {
24
- const { error } = CatalogValidator.addCollectionItems().validate(
26
+ async addCollectionItems(
27
+ { id, body, requestHeaders } = { requestHeaders: {} },
28
+ { responseHeaders } = { responseHeaders: false }
29
+ ) {
30
+ const {
31
+ error,
32
+ } = CatalogPlatformApplicationValidator.addCollectionItems().validate(
25
33
  {
26
34
  id,
27
35
  body,
@@ -33,7 +41,9 @@ class Catalog {
33
41
  }
34
42
 
35
43
  // Showing warrnings if extra unknown parameters are found
36
- const { error: warrning } = CatalogValidator.addCollectionItems().validate(
44
+ const {
45
+ error: warrning,
46
+ } = CatalogPlatformApplicationValidator.addCollectionItems().validate(
37
47
  {
38
48
  id,
39
49
  body,
@@ -43,9 +53,8 @@ class Catalog {
43
53
  if (warrning) {
44
54
  Logger({
45
55
  level: "WARN",
46
- message: "Parameter Validation warrnings for addCollectionItems",
56
+ message: `Parameter Validation warrnings for platform > Catalog > addCollectionItems \n ${warrning}`,
47
57
  });
48
- Logger({ level: "WARN", message: warrning });
49
58
  }
50
59
 
51
60
  const query_params = {};
@@ -55,12 +64,19 @@ class Catalog {
55
64
  "post",
56
65
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/items/`,
57
66
  query_params,
58
- body
67
+ body,
68
+ requestHeaders,
69
+ { responseHeaders }
59
70
  );
60
71
 
72
+ let responseData = response;
73
+ if (responseHeaders) {
74
+ responseData = response[0];
75
+ }
76
+
61
77
  const {
62
78
  error: res_error,
63
- } = CatalogModel.UpdatedResponse().validate(response, {
79
+ } = CatalogPlatformModel.UpdatedResponse().validate(responseData, {
64
80
  abortEarly: false,
65
81
  allowUnknown: false,
66
82
  });
@@ -68,23 +84,30 @@ class Catalog {
68
84
  if (res_error) {
69
85
  Logger({
70
86
  level: "WARN",
71
- message: "Response Validation Warnnings for addCollectionItems",
87
+ message: `Response Validation Warnnings for platform > Catalog > addCollectionItems \n ${res_error}`,
72
88
  });
73
- Logger({ level: "WARN", message: res_error });
74
89
  }
75
90
 
76
91
  return response;
77
92
  }
78
93
 
79
94
  /**
80
- * @param {Object} arg - Arg object.
81
- * @param {CreateCollection} arg.body
82
- * @returns {Promise<CollectionCreateResponse>} - Success response
95
+ * @param {CatalogPlatformApplicationValidator.CreateCollectionParam} arg - Arg object
96
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
97
+ * @param {import("../PlatformAPIClient").Options} - Options
98
+ * @returns {Promise<CatalogPlatformModel.CollectionCreateResponse>} -
99
+ * Success response
100
+ * @name createCollection
83
101
  * @summary: Add a Collection
84
- * @description: Create a collection. See `CreateCollectionRequestSchema` for the list of attributes needed to create a collection and collections/query-options for the available options to create a collection. On successful request, returns a paginated list of collections specified in `CollectionCreateResponse`
102
+ * @description: Create a collection. See `CreateCollectionRequestSchema` for the list of attributes needed to create a collection and collections/query-options for the available options to create a collection. On successful request, returns a paginated list of collections specified in `CollectionCreateResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createCollection/).
85
103
  */
86
- async createCollection({ body } = {}) {
87
- const { error } = CatalogValidator.createCollection().validate(
104
+ async createCollection(
105
+ { body, requestHeaders } = { requestHeaders: {} },
106
+ { responseHeaders } = { responseHeaders: false }
107
+ ) {
108
+ const {
109
+ error,
110
+ } = CatalogPlatformApplicationValidator.createCollection().validate(
88
111
  {
89
112
  body,
90
113
  },
@@ -95,7 +118,9 @@ class Catalog {
95
118
  }
96
119
 
97
120
  // Showing warrnings if extra unknown parameters are found
98
- const { error: warrning } = CatalogValidator.createCollection().validate(
121
+ const {
122
+ error: warrning,
123
+ } = CatalogPlatformApplicationValidator.createCollection().validate(
99
124
  {
100
125
  body,
101
126
  },
@@ -104,9 +129,8 @@ class Catalog {
104
129
  if (warrning) {
105
130
  Logger({
106
131
  level: "WARN",
107
- message: "Parameter Validation warrnings for createCollection",
132
+ message: `Parameter Validation warrnings for platform > Catalog > createCollection \n ${warrning}`,
108
133
  });
109
- Logger({ level: "WARN", message: warrning });
110
134
  }
111
135
 
112
136
  const query_params = {};
@@ -116,12 +140,19 @@ class Catalog {
116
140
  "post",
117
141
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/`,
118
142
  query_params,
119
- body
143
+ body,
144
+ requestHeaders,
145
+ { responseHeaders }
120
146
  );
121
147
 
148
+ let responseData = response;
149
+ if (responseHeaders) {
150
+ responseData = response[0];
151
+ }
152
+
122
153
  const {
123
154
  error: res_error,
124
- } = CatalogModel.CollectionCreateResponse().validate(response, {
155
+ } = CatalogPlatformModel.CollectionCreateResponse().validate(responseData, {
125
156
  abortEarly: false,
126
157
  allowUnknown: false,
127
158
  });
@@ -129,24 +160,32 @@ class Catalog {
129
160
  if (res_error) {
130
161
  Logger({
131
162
  level: "WARN",
132
- message: "Response Validation Warnnings for createCollection",
163
+ message: `Response Validation Warnnings for platform > Catalog > createCollection \n ${res_error}`,
133
164
  });
134
- Logger({ level: "WARN", message: res_error });
135
165
  }
136
166
 
137
167
  return response;
138
168
  }
139
169
 
140
170
  /**
141
- * @param {Object} arg - Arg object.
142
- * @param {string} arg.type - Type can be brands, categories etc.
143
- * @param {AppConfiguration} arg.body
144
- * @returns {Promise<GetAppCatalogConfiguration>} - Success response
171
+ * @param {CatalogPlatformApplicationValidator.CreateConfigurationByTypeParam} arg
172
+ * - Arg object
173
+ *
174
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
175
+ * @param {import("../PlatformAPIClient").Options} - Options
176
+ * @returns {Promise<CatalogPlatformModel.GetAppCatalogConfiguration>} -
177
+ * Success response
178
+ * @name createConfigurationByType
145
179
  * @summary: Add configuration for categories and brands
146
- * @description: Add configuration for categories & brands.
180
+ * @description: Add configuration for categories & brands. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createConfigurationByType/).
147
181
  */
148
- async createConfigurationByType({ type, body } = {}) {
149
- const { error } = CatalogValidator.createConfigurationByType().validate(
182
+ async createConfigurationByType(
183
+ { type, body, requestHeaders } = { requestHeaders: {} },
184
+ { responseHeaders } = { responseHeaders: false }
185
+ ) {
186
+ const {
187
+ error,
188
+ } = CatalogPlatformApplicationValidator.createConfigurationByType().validate(
150
189
  {
151
190
  type,
152
191
  body,
@@ -160,7 +199,7 @@ class Catalog {
160
199
  // Showing warrnings if extra unknown parameters are found
161
200
  const {
162
201
  error: warrning,
163
- } = CatalogValidator.createConfigurationByType().validate(
202
+ } = CatalogPlatformApplicationValidator.createConfigurationByType().validate(
164
203
  {
165
204
  type,
166
205
  body,
@@ -170,9 +209,8 @@ class Catalog {
170
209
  if (warrning) {
171
210
  Logger({
172
211
  level: "WARN",
173
- message: "Parameter Validation warrnings for createConfigurationByType",
212
+ message: `Parameter Validation warrnings for platform > Catalog > createConfigurationByType \n ${warrning}`,
174
213
  });
175
- Logger({ level: "WARN", message: warrning });
176
214
  }
177
215
 
178
216
  const query_params = {};
@@ -182,38 +220,52 @@ class Catalog {
182
220
  "post",
183
221
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${type}/`,
184
222
  query_params,
185
- body
223
+ body,
224
+ requestHeaders,
225
+ { responseHeaders }
186
226
  );
187
227
 
228
+ let responseData = response;
229
+ if (responseHeaders) {
230
+ responseData = response[0];
231
+ }
232
+
188
233
  const {
189
234
  error: res_error,
190
- } = CatalogModel.GetAppCatalogConfiguration().validate(response, {
191
- abortEarly: false,
192
- allowUnknown: false,
193
- });
235
+ } = CatalogPlatformModel.GetAppCatalogConfiguration().validate(
236
+ responseData,
237
+ { abortEarly: false, allowUnknown: false }
238
+ );
194
239
 
195
240
  if (res_error) {
196
241
  Logger({
197
242
  level: "WARN",
198
- message: "Response Validation Warnnings for createConfigurationByType",
243
+ message: `Response Validation Warnnings for platform > Catalog > createConfigurationByType \n ${res_error}`,
199
244
  });
200
- Logger({ level: "WARN", message: res_error });
201
245
  }
202
246
 
203
247
  return response;
204
248
  }
205
249
 
206
250
  /**
207
- * @param {Object} arg - Arg object.
208
- * @param {AppConfiguration} arg.body
209
- * @returns {Promise<GetAppCatalogConfiguration>} - Success response
251
+ * @param {CatalogPlatformApplicationValidator.CreateConfigurationProductListingParam} arg
252
+ * - Arg object
253
+ *
254
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
255
+ * @param {import("../PlatformAPIClient").Options} - Options
256
+ * @returns {Promise<CatalogPlatformModel.GetAppCatalogConfiguration>} -
257
+ * Success response
258
+ * @name createConfigurationProductListing
210
259
  * @summary: Add configuration for products & listings
211
- * @description: Add configuration for products & listing.
260
+ * @description: Add configuration for products & listing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createConfigurationProductListing/).
212
261
  */
213
- async createConfigurationProductListing({ body } = {}) {
262
+ async createConfigurationProductListing(
263
+ { body, requestHeaders } = { requestHeaders: {} },
264
+ { responseHeaders } = { responseHeaders: false }
265
+ ) {
214
266
  const {
215
267
  error,
216
- } = CatalogValidator.createConfigurationProductListing().validate(
268
+ } = CatalogPlatformApplicationValidator.createConfigurationProductListing().validate(
217
269
  {
218
270
  body,
219
271
  },
@@ -226,7 +278,7 @@ class Catalog {
226
278
  // Showing warrnings if extra unknown parameters are found
227
279
  const {
228
280
  error: warrning,
229
- } = CatalogValidator.createConfigurationProductListing().validate(
281
+ } = CatalogPlatformApplicationValidator.createConfigurationProductListing().validate(
230
282
  {
231
283
  body,
232
284
  },
@@ -235,10 +287,8 @@ class Catalog {
235
287
  if (warrning) {
236
288
  Logger({
237
289
  level: "WARN",
238
- message:
239
- "Parameter Validation warrnings for createConfigurationProductListing",
290
+ message: `Parameter Validation warrnings for platform > Catalog > createConfigurationProductListing \n ${warrning}`,
240
291
  });
241
- Logger({ level: "WARN", message: warrning });
242
292
  }
243
293
 
244
294
  const query_params = {};
@@ -248,37 +298,53 @@ class Catalog {
248
298
  "post",
249
299
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/`,
250
300
  query_params,
251
- body
301
+ body,
302
+ requestHeaders,
303
+ { responseHeaders }
252
304
  );
253
305
 
306
+ let responseData = response;
307
+ if (responseHeaders) {
308
+ responseData = response[0];
309
+ }
310
+
254
311
  const {
255
312
  error: res_error,
256
- } = CatalogModel.GetAppCatalogConfiguration().validate(response, {
257
- abortEarly: false,
258
- allowUnknown: false,
259
- });
313
+ } = CatalogPlatformModel.GetAppCatalogConfiguration().validate(
314
+ responseData,
315
+ { abortEarly: false, allowUnknown: false }
316
+ );
260
317
 
261
318
  if (res_error) {
262
319
  Logger({
263
320
  level: "WARN",
264
- message:
265
- "Response Validation Warnnings for createConfigurationProductListing",
321
+ message: `Response Validation Warnnings for platform > Catalog > createConfigurationProductListing \n ${res_error}`,
266
322
  });
267
- Logger({ level: "WARN", message: res_error });
268
323
  }
269
324
 
270
325
  return response;
271
326
  }
272
327
 
273
328
  /**
274
- * @param {Object} arg - Arg object.
275
- * @param {CreateAutocompleteKeyword} arg.body
276
- * @returns {Promise<CreateAutocompleteWordsResponse>} - Success response
329
+ * @param {CatalogPlatformApplicationValidator.CreateCustomAutocompleteRuleParam} arg
330
+ * - Arg object
331
+ *
332
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
333
+ * @param {import("../PlatformAPIClient").Options} - Options
334
+ * @returns {Promise<CatalogPlatformModel.CreateAutocompleteWordsResponse>}
335
+ * - Success response
336
+ *
337
+ * @name createCustomAutocompleteRule
277
338
  * @summary: Add a Custom Autocomplete Keywords
278
- * @description: Create a Custom Autocomplete Keywords. See `CreateAutocompleteKeywordSchema` for the list of attributes needed to create a mapping and /collections/query-options for the available options to create a rule. On successful request, returns a paginated list of collections specified in `CreateAutocompleteKeywordSchema`
339
+ * @description: Create a Custom Autocomplete Keywords. See `CreateAutocompleteKeywordSchema` for the list of attributes needed to create a mapping and /collections/query-options for the available options to create a rule. On successful request, returns a paginated list of collections specified in `CreateAutocompleteKeywordSchema` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createCustomAutocompleteRule/).
279
340
  */
280
- async createCustomAutocompleteRule({ body } = {}) {
281
- const { error } = CatalogValidator.createCustomAutocompleteRule().validate(
341
+ async createCustomAutocompleteRule(
342
+ { body, requestHeaders } = { requestHeaders: {} },
343
+ { responseHeaders } = { responseHeaders: false }
344
+ ) {
345
+ const {
346
+ error,
347
+ } = CatalogPlatformApplicationValidator.createCustomAutocompleteRule().validate(
282
348
  {
283
349
  body,
284
350
  },
@@ -291,7 +357,7 @@ class Catalog {
291
357
  // Showing warrnings if extra unknown parameters are found
292
358
  const {
293
359
  error: warrning,
294
- } = CatalogValidator.createCustomAutocompleteRule().validate(
360
+ } = CatalogPlatformApplicationValidator.createCustomAutocompleteRule().validate(
295
361
  {
296
362
  body,
297
363
  },
@@ -300,10 +366,8 @@ class Catalog {
300
366
  if (warrning) {
301
367
  Logger({
302
368
  level: "WARN",
303
- message:
304
- "Parameter Validation warrnings for createCustomAutocompleteRule",
369
+ message: `Parameter Validation warrnings for platform > Catalog > createCustomAutocompleteRule \n ${warrning}`,
305
370
  });
306
- Logger({ level: "WARN", message: warrning });
307
371
  }
308
372
 
309
373
  const query_params = {};
@@ -313,37 +377,51 @@ class Catalog {
313
377
  "post",
314
378
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/`,
315
379
  query_params,
316
- body
380
+ body,
381
+ requestHeaders,
382
+ { responseHeaders }
317
383
  );
318
384
 
385
+ let responseData = response;
386
+ if (responseHeaders) {
387
+ responseData = response[0];
388
+ }
389
+
319
390
  const {
320
391
  error: res_error,
321
- } = CatalogModel.CreateAutocompleteWordsResponse().validate(response, {
322
- abortEarly: false,
323
- allowUnknown: false,
324
- });
392
+ } = CatalogPlatformModel.CreateAutocompleteWordsResponse().validate(
393
+ responseData,
394
+ { abortEarly: false, allowUnknown: false }
395
+ );
325
396
 
326
397
  if (res_error) {
327
398
  Logger({
328
399
  level: "WARN",
329
- message:
330
- "Response Validation Warnnings for createCustomAutocompleteRule",
400
+ message: `Response Validation Warnnings for platform > Catalog > createCustomAutocompleteRule \n ${res_error}`,
331
401
  });
332
- Logger({ level: "WARN", message: res_error });
333
402
  }
334
403
 
335
404
  return response;
336
405
  }
337
406
 
338
407
  /**
339
- * @param {Object} arg - Arg object.
340
- * @param {CreateSearchKeyword} arg.body
341
- * @returns {Promise<GetSearchWordsData>} - Success response
408
+ * @param {CatalogPlatformApplicationValidator.CreateCustomKeywordParam} arg
409
+ * - Arg object
410
+ *
411
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
412
+ * @param {import("../PlatformAPIClient").Options} - Options
413
+ * @returns {Promise<CatalogPlatformModel.GetSearchWordsData>} - Success response
414
+ * @name createCustomKeyword
342
415
  * @summary: Add a Custom Search Keywords
343
- * @description: Create a Custom Search Keywords. See `CreateSearchKeywordSchema` for the list of attributes needed to create a mapping and /collections/query-options for the available options to create a rule. On successful request, returns a paginated list of collections specified in `CreateSearchKeywordSchema`
416
+ * @description: Create a Custom Search Keywords. See `CreateSearchKeywordSchema` for the list of attributes needed to create a mapping and /collections/query-options for the available options to create a rule. On successful request, returns a paginated list of collections specified in `CreateSearchKeywordSchema` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createCustomKeyword/).
344
417
  */
345
- async createCustomKeyword({ body } = {}) {
346
- const { error } = CatalogValidator.createCustomKeyword().validate(
418
+ async createCustomKeyword(
419
+ { body, requestHeaders } = { requestHeaders: {} },
420
+ { responseHeaders } = { responseHeaders: false }
421
+ ) {
422
+ const {
423
+ error,
424
+ } = CatalogPlatformApplicationValidator.createCustomKeyword().validate(
347
425
  {
348
426
  body,
349
427
  },
@@ -354,7 +432,9 @@ class Catalog {
354
432
  }
355
433
 
356
434
  // Showing warrnings if extra unknown parameters are found
357
- const { error: warrning } = CatalogValidator.createCustomKeyword().validate(
435
+ const {
436
+ error: warrning,
437
+ } = CatalogPlatformApplicationValidator.createCustomKeyword().validate(
358
438
  {
359
439
  body,
360
440
  },
@@ -363,9 +443,8 @@ class Catalog {
363
443
  if (warrning) {
364
444
  Logger({
365
445
  level: "WARN",
366
- message: "Parameter Validation warrnings for createCustomKeyword",
446
+ message: `Parameter Validation warrnings for platform > Catalog > createCustomKeyword \n ${warrning}`,
367
447
  });
368
- Logger({ level: "WARN", message: warrning });
369
448
  }
370
449
 
371
450
  const query_params = {};
@@ -375,12 +454,19 @@ class Catalog {
375
454
  "post",
376
455
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/`,
377
456
  query_params,
378
- body
457
+ body,
458
+ requestHeaders,
459
+ { responseHeaders }
379
460
  );
380
461
 
462
+ let responseData = response;
463
+ if (responseHeaders) {
464
+ responseData = response[0];
465
+ }
466
+
381
467
  const {
382
468
  error: res_error,
383
- } = CatalogModel.GetSearchWordsData().validate(response, {
469
+ } = CatalogPlatformModel.GetSearchWordsData().validate(responseData, {
384
470
  abortEarly: false,
385
471
  allowUnknown: false,
386
472
  });
@@ -388,25 +474,31 @@ class Catalog {
388
474
  if (res_error) {
389
475
  Logger({
390
476
  level: "WARN",
391
- message: "Response Validation Warnnings for createCustomKeyword",
477
+ message: `Response Validation Warnnings for platform > Catalog > createCustomKeyword \n ${res_error}`,
392
478
  });
393
- Logger({ level: "WARN", message: res_error });
394
479
  }
395
480
 
396
481
  return response;
397
482
  }
398
483
 
399
484
  /**
400
- * @param {Object} arg - Arg object.
401
- * @param {string} arg.configType - A `config_type` is a unique identifier
402
- * for a particular group configuration type.
403
- * @param {AppConfigurationDetail} arg.body
404
- * @returns {Promise<AppConfigurationDetail>} - Success response
485
+ * @param {CatalogPlatformApplicationValidator.CreateGroupConfigurationParam} arg
486
+ * - Arg object
487
+ *
488
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
489
+ * @param {import("../PlatformAPIClient").Options} - Options
490
+ * @returns {Promise<CatalogPlatformModel.AppConfigurationDetail>} - Success response
491
+ * @name createGroupConfiguration
405
492
  * @summary: Create configuration for Group config types.
406
- * @description: Create configuration for Group config types.
493
+ * @description: Create configuration for Group config types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createGroupConfiguration/).
407
494
  */
408
- async createGroupConfiguration({ configType, body } = {}) {
409
- const { error } = CatalogValidator.createGroupConfiguration().validate(
495
+ async createGroupConfiguration(
496
+ { configType, body, requestHeaders } = { requestHeaders: {} },
497
+ { responseHeaders } = { responseHeaders: false }
498
+ ) {
499
+ const {
500
+ error,
501
+ } = CatalogPlatformApplicationValidator.createGroupConfiguration().validate(
410
502
  {
411
503
  configType,
412
504
  body,
@@ -420,7 +512,7 @@ class Catalog {
420
512
  // Showing warrnings if extra unknown parameters are found
421
513
  const {
422
514
  error: warrning,
423
- } = CatalogValidator.createGroupConfiguration().validate(
515
+ } = CatalogPlatformApplicationValidator.createGroupConfiguration().validate(
424
516
  {
425
517
  configType,
426
518
  body,
@@ -430,9 +522,8 @@ class Catalog {
430
522
  if (warrning) {
431
523
  Logger({
432
524
  level: "WARN",
433
- message: "Parameter Validation warrnings for createGroupConfiguration",
525
+ message: `Parameter Validation warrnings for platform > Catalog > createGroupConfiguration \n ${warrning}`,
434
526
  });
435
- Logger({ level: "WARN", message: warrning });
436
527
  }
437
528
 
438
529
  const query_params = {};
@@ -442,12 +533,19 @@ class Catalog {
442
533
  "post",
443
534
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups`,
444
535
  query_params,
445
- body
536
+ body,
537
+ requestHeaders,
538
+ { responseHeaders }
446
539
  );
447
540
 
541
+ let responseData = response;
542
+ if (responseHeaders) {
543
+ responseData = response[0];
544
+ }
545
+
448
546
  const {
449
547
  error: res_error,
450
- } = CatalogModel.AppConfigurationDetail().validate(response, {
548
+ } = CatalogPlatformModel.AppConfigurationDetail().validate(responseData, {
451
549
  abortEarly: false,
452
550
  allowUnknown: false,
453
551
  });
@@ -455,25 +553,31 @@ class Catalog {
455
553
  if (res_error) {
456
554
  Logger({
457
555
  level: "WARN",
458
- message: "Response Validation Warnnings for createGroupConfiguration",
556
+ message: `Response Validation Warnnings for platform > Catalog > createGroupConfiguration \n ${res_error}`,
459
557
  });
460
- Logger({ level: "WARN", message: res_error });
461
558
  }
462
559
 
463
560
  return response;
464
561
  }
465
562
 
466
563
  /**
467
- * @param {Object} arg - Arg object.
468
- * @param {string} arg.configType - A `config_type` is a unique identifier
469
- * for a particular listing configuration type.
470
- * @param {AppConfigurationsSort} arg.body
471
- * @returns {Promise<AppConfigurationsSort>} - Success response
564
+ * @param {CatalogPlatformApplicationValidator.CreateListingConfigurationParam} arg
565
+ * - Arg object
566
+ *
567
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
568
+ * @param {import("../PlatformAPIClient").Options} - Options
569
+ * @returns {Promise<CatalogPlatformModel.AppConfigurationsSort>} - Success response
570
+ * @name createListingConfiguration
472
571
  * @summary: Add configuration for listings
473
- * @description: Add configuration for listing.
572
+ * @description: Add configuration for listing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createListingConfiguration/).
474
573
  */
475
- async createListingConfiguration({ configType, body } = {}) {
476
- const { error } = CatalogValidator.createListingConfiguration().validate(
574
+ async createListingConfiguration(
575
+ { configType, body, requestHeaders } = { requestHeaders: {} },
576
+ { responseHeaders } = { responseHeaders: false }
577
+ ) {
578
+ const {
579
+ error,
580
+ } = CatalogPlatformApplicationValidator.createListingConfiguration().validate(
477
581
  {
478
582
  configType,
479
583
  body,
@@ -487,7 +591,7 @@ class Catalog {
487
591
  // Showing warrnings if extra unknown parameters are found
488
592
  const {
489
593
  error: warrning,
490
- } = CatalogValidator.createListingConfiguration().validate(
594
+ } = CatalogPlatformApplicationValidator.createListingConfiguration().validate(
491
595
  {
492
596
  configType,
493
597
  body,
@@ -497,10 +601,8 @@ class Catalog {
497
601
  if (warrning) {
498
602
  Logger({
499
603
  level: "WARN",
500
- message:
501
- "Parameter Validation warrnings for createListingConfiguration",
604
+ message: `Parameter Validation warrnings for platform > Catalog > createListingConfiguration \n ${warrning}`,
502
605
  });
503
- Logger({ level: "WARN", message: warrning });
504
606
  }
505
607
 
506
608
  const query_params = {};
@@ -510,12 +612,19 @@ class Catalog {
510
612
  "post",
511
613
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/`,
512
614
  query_params,
513
- body
615
+ body,
616
+ requestHeaders,
617
+ { responseHeaders }
514
618
  );
515
619
 
620
+ let responseData = response;
621
+ if (responseHeaders) {
622
+ responseData = response[0];
623
+ }
624
+
516
625
  const {
517
626
  error: res_error,
518
- } = CatalogModel.AppConfigurationsSort().validate(response, {
627
+ } = CatalogPlatformModel.AppConfigurationsSort().validate(responseData, {
519
628
  abortEarly: false,
520
629
  allowUnknown: false,
521
630
  });
@@ -523,24 +632,31 @@ class Catalog {
523
632
  if (res_error) {
524
633
  Logger({
525
634
  level: "WARN",
526
- message: "Response Validation Warnnings for createListingConfiguration",
635
+ message: `Response Validation Warnnings for platform > Catalog > createListingConfiguration \n ${res_error}`,
527
636
  });
528
- Logger({ level: "WARN", message: res_error });
529
637
  }
530
638
 
531
639
  return response;
532
640
  }
533
641
 
534
642
  /**
535
- * @param {Object} arg - Arg object.
536
- * @param {string} arg.id - A `id` is a unique identifier for a particular
537
- * detail. Pass the `id` of the keywords which you want to delete.
538
- * @returns {Promise<DeleteResponse>} - Success response
643
+ * @param {CatalogPlatformApplicationValidator.DeleteAutocompleteKeywordParam} arg
644
+ * - Arg object
645
+ *
646
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
647
+ * @param {import("../PlatformAPIClient").Options} - Options
648
+ * @returns {Promise<CatalogPlatformModel.DeleteResponse>} - Success response
649
+ * @name deleteAutocompleteKeyword
539
650
  * @summary: Delete a Autocomplete Keywords
540
- * @description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully
651
+ * @description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteAutocompleteKeyword/).
541
652
  */
542
- async deleteAutocompleteKeyword({ id } = {}) {
543
- const { error } = CatalogValidator.deleteAutocompleteKeyword().validate(
653
+ async deleteAutocompleteKeyword(
654
+ { id, requestHeaders } = { requestHeaders: {} },
655
+ { responseHeaders } = { responseHeaders: false }
656
+ ) {
657
+ const {
658
+ error,
659
+ } = CatalogPlatformApplicationValidator.deleteAutocompleteKeyword().validate(
544
660
  {
545
661
  id,
546
662
  },
@@ -553,7 +669,7 @@ class Catalog {
553
669
  // Showing warrnings if extra unknown parameters are found
554
670
  const {
555
671
  error: warrning,
556
- } = CatalogValidator.deleteAutocompleteKeyword().validate(
672
+ } = CatalogPlatformApplicationValidator.deleteAutocompleteKeyword().validate(
557
673
  {
558
674
  id,
559
675
  },
@@ -562,9 +678,8 @@ class Catalog {
562
678
  if (warrning) {
563
679
  Logger({
564
680
  level: "WARN",
565
- message: "Parameter Validation warrnings for deleteAutocompleteKeyword",
681
+ message: `Parameter Validation warrnings for platform > Catalog > deleteAutocompleteKeyword \n ${warrning}`,
566
682
  });
567
- Logger({ level: "WARN", message: warrning });
568
683
  }
569
684
 
570
685
  const query_params = {};
@@ -574,12 +689,19 @@ class Catalog {
574
689
  "delete",
575
690
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
576
691
  query_params,
577
- undefined
692
+ undefined,
693
+ requestHeaders,
694
+ { responseHeaders }
578
695
  );
579
696
 
697
+ let responseData = response;
698
+ if (responseHeaders) {
699
+ responseData = response[0];
700
+ }
701
+
580
702
  const {
581
703
  error: res_error,
582
- } = CatalogModel.DeleteResponse().validate(response, {
704
+ } = CatalogPlatformModel.DeleteResponse().validate(responseData, {
583
705
  abortEarly: false,
584
706
  allowUnknown: false,
585
707
  });
@@ -587,23 +709,29 @@ class Catalog {
587
709
  if (res_error) {
588
710
  Logger({
589
711
  level: "WARN",
590
- message: "Response Validation Warnnings for deleteAutocompleteKeyword",
712
+ message: `Response Validation Warnnings for platform > Catalog > deleteAutocompleteKeyword \n ${res_error}`,
591
713
  });
592
- Logger({ level: "WARN", message: res_error });
593
714
  }
594
715
 
595
716
  return response;
596
717
  }
597
718
 
598
719
  /**
599
- * @param {Object} arg - Arg object.
600
- * @param {string} arg.id - A `id` is a unique identifier of a collection.
601
- * @returns {Promise<DeleteResponse>} - Success response
720
+ * @param {CatalogPlatformApplicationValidator.DeleteCollectionParam} arg - Arg object
721
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
722
+ * @param {import("../PlatformAPIClient").Options} - Options
723
+ * @returns {Promise<CatalogPlatformModel.DeleteResponse>} - Success response
724
+ * @name deleteCollection
602
725
  * @summary: Delete a Collection
603
- * @description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully
726
+ * @description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteCollection/).
604
727
  */
605
- async deleteCollection({ id } = {}) {
606
- const { error } = CatalogValidator.deleteCollection().validate(
728
+ async deleteCollection(
729
+ { id, requestHeaders } = { requestHeaders: {} },
730
+ { responseHeaders } = { responseHeaders: false }
731
+ ) {
732
+ const {
733
+ error,
734
+ } = CatalogPlatformApplicationValidator.deleteCollection().validate(
607
735
  {
608
736
  id,
609
737
  },
@@ -614,7 +742,9 @@ class Catalog {
614
742
  }
615
743
 
616
744
  // Showing warrnings if extra unknown parameters are found
617
- const { error: warrning } = CatalogValidator.deleteCollection().validate(
745
+ const {
746
+ error: warrning,
747
+ } = CatalogPlatformApplicationValidator.deleteCollection().validate(
618
748
  {
619
749
  id,
620
750
  },
@@ -623,9 +753,8 @@ class Catalog {
623
753
  if (warrning) {
624
754
  Logger({
625
755
  level: "WARN",
626
- message: "Parameter Validation warrnings for deleteCollection",
756
+ message: `Parameter Validation warrnings for platform > Catalog > deleteCollection \n ${warrning}`,
627
757
  });
628
- Logger({ level: "WARN", message: warrning });
629
758
  }
630
759
 
631
760
  const query_params = {};
@@ -635,12 +764,19 @@ class Catalog {
635
764
  "delete",
636
765
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/`,
637
766
  query_params,
638
- undefined
767
+ undefined,
768
+ requestHeaders,
769
+ { responseHeaders }
639
770
  );
640
771
 
772
+ let responseData = response;
773
+ if (responseHeaders) {
774
+ responseData = response[0];
775
+ }
776
+
641
777
  const {
642
778
  error: res_error,
643
- } = CatalogModel.DeleteResponse().validate(response, {
779
+ } = CatalogPlatformModel.DeleteResponse().validate(responseData, {
644
780
  abortEarly: false,
645
781
  allowUnknown: false,
646
782
  });
@@ -648,26 +784,31 @@ class Catalog {
648
784
  if (res_error) {
649
785
  Logger({
650
786
  level: "WARN",
651
- message: "Response Validation Warnnings for deleteCollection",
787
+ message: `Response Validation Warnnings for platform > Catalog > deleteCollection \n ${res_error}`,
652
788
  });
653
- Logger({ level: "WARN", message: res_error });
654
789
  }
655
790
 
656
791
  return response;
657
792
  }
658
793
 
659
794
  /**
660
- * @param {Object} arg - Arg object.
661
- * @param {string} arg.configType - A `config_type` is a unique identifier
662
- * for a particular group configuration type.
663
- * @param {string} arg.groupSlug - A `group_slug` is a unique identifier of
664
- * a particular configuration.
665
- * @returns {Promise<ConfigSuccessResponse>} - Success response
795
+ * @param {CatalogPlatformApplicationValidator.DeleteGroupConfigurationParam} arg
796
+ * - Arg object
797
+ *
798
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
799
+ * @param {import("../PlatformAPIClient").Options} - Options
800
+ * @returns {Promise<CatalogPlatformModel.ConfigSuccessResponse>} - Success response
801
+ * @name deleteGroupConfiguration
666
802
  * @summary: Delete configuration of the product config type of the application.
667
- * @description: Delete configuration of the product config type of the application.
803
+ * @description: Delete configuration of the product config type of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteGroupConfiguration/).
668
804
  */
669
- async deleteGroupConfiguration({ configType, groupSlug } = {}) {
670
- const { error } = CatalogValidator.deleteGroupConfiguration().validate(
805
+ async deleteGroupConfiguration(
806
+ { configType, groupSlug, requestHeaders } = { requestHeaders: {} },
807
+ { responseHeaders } = { responseHeaders: false }
808
+ ) {
809
+ const {
810
+ error,
811
+ } = CatalogPlatformApplicationValidator.deleteGroupConfiguration().validate(
671
812
  {
672
813
  configType,
673
814
  groupSlug,
@@ -681,7 +822,7 @@ class Catalog {
681
822
  // Showing warrnings if extra unknown parameters are found
682
823
  const {
683
824
  error: warrning,
684
- } = CatalogValidator.deleteGroupConfiguration().validate(
825
+ } = CatalogPlatformApplicationValidator.deleteGroupConfiguration().validate(
685
826
  {
686
827
  configType,
687
828
  groupSlug,
@@ -691,9 +832,8 @@ class Catalog {
691
832
  if (warrning) {
692
833
  Logger({
693
834
  level: "WARN",
694
- message: "Parameter Validation warrnings for deleteGroupConfiguration",
835
+ message: `Parameter Validation warrnings for platform > Catalog > deleteGroupConfiguration \n ${warrning}`,
695
836
  });
696
- Logger({ level: "WARN", message: warrning });
697
837
  }
698
838
 
699
839
  const query_params = {};
@@ -703,12 +843,19 @@ class Catalog {
703
843
  "delete",
704
844
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups/${groupSlug}`,
705
845
  query_params,
706
- undefined
846
+ undefined,
847
+ requestHeaders,
848
+ { responseHeaders }
707
849
  );
708
850
 
851
+ let responseData = response;
852
+ if (responseHeaders) {
853
+ responseData = response[0];
854
+ }
855
+
709
856
  const {
710
857
  error: res_error,
711
- } = CatalogModel.ConfigSuccessResponse().validate(response, {
858
+ } = CatalogPlatformModel.ConfigSuccessResponse().validate(responseData, {
712
859
  abortEarly: false,
713
860
  allowUnknown: false,
714
861
  });
@@ -716,26 +863,31 @@ class Catalog {
716
863
  if (res_error) {
717
864
  Logger({
718
865
  level: "WARN",
719
- message: "Response Validation Warnnings for deleteGroupConfiguration",
866
+ message: `Response Validation Warnnings for platform > Catalog > deleteGroupConfiguration \n ${res_error}`,
720
867
  });
721
- Logger({ level: "WARN", message: res_error });
722
868
  }
723
869
 
724
870
  return response;
725
871
  }
726
872
 
727
873
  /**
728
- * @param {Object} arg - Arg object.
729
- * @param {string} arg.configType - A `config_type` is a unique identifier
730
- * for a particular listing configuration type.
731
- * @param {string} arg.configId - A `config_id` is a unique identifier of a
732
- * particular configuration.
733
- * @returns {Promise<ConfigSuccessResponse>} - Success response
874
+ * @param {CatalogPlatformApplicationValidator.DeleteListingConfigurationParam} arg
875
+ * - Arg object
876
+ *
877
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
878
+ * @param {import("../PlatformAPIClient").Options} - Options
879
+ * @returns {Promise<CatalogPlatformModel.ConfigSuccessResponse>} - Success response
880
+ * @name deleteListingConfiguration
734
881
  * @summary: Delete configuration for listings
735
- * @description: Delete configuration for listing.
882
+ * @description: Delete configuration for listing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteListingConfiguration/).
736
883
  */
737
- async deleteListingConfiguration({ configType, configId } = {}) {
738
- const { error } = CatalogValidator.deleteListingConfiguration().validate(
884
+ async deleteListingConfiguration(
885
+ { configType, configId, requestHeaders } = { requestHeaders: {} },
886
+ { responseHeaders } = { responseHeaders: false }
887
+ ) {
888
+ const {
889
+ error,
890
+ } = CatalogPlatformApplicationValidator.deleteListingConfiguration().validate(
739
891
  {
740
892
  configType,
741
893
  configId,
@@ -749,7 +901,7 @@ class Catalog {
749
901
  // Showing warrnings if extra unknown parameters are found
750
902
  const {
751
903
  error: warrning,
752
- } = CatalogValidator.deleteListingConfiguration().validate(
904
+ } = CatalogPlatformApplicationValidator.deleteListingConfiguration().validate(
753
905
  {
754
906
  configType,
755
907
  configId,
@@ -759,10 +911,8 @@ class Catalog {
759
911
  if (warrning) {
760
912
  Logger({
761
913
  level: "WARN",
762
- message:
763
- "Parameter Validation warrnings for deleteListingConfiguration",
914
+ message: `Parameter Validation warrnings for platform > Catalog > deleteListingConfiguration \n ${warrning}`,
764
915
  });
765
- Logger({ level: "WARN", message: warrning });
766
916
  }
767
917
 
768
918
  const query_params = {};
@@ -772,12 +922,19 @@ class Catalog {
772
922
  "delete",
773
923
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/item/${configId}/`,
774
924
  query_params,
775
- undefined
925
+ undefined,
926
+ requestHeaders,
927
+ { responseHeaders }
776
928
  );
777
929
 
930
+ let responseData = response;
931
+ if (responseHeaders) {
932
+ responseData = response[0];
933
+ }
934
+
778
935
  const {
779
936
  error: res_error,
780
- } = CatalogModel.ConfigSuccessResponse().validate(response, {
937
+ } = CatalogPlatformModel.ConfigSuccessResponse().validate(responseData, {
781
938
  abortEarly: false,
782
939
  allowUnknown: false,
783
940
  });
@@ -785,24 +942,31 @@ class Catalog {
785
942
  if (res_error) {
786
943
  Logger({
787
944
  level: "WARN",
788
- message: "Response Validation Warnnings for deleteListingConfiguration",
945
+ message: `Response Validation Warnnings for platform > Catalog > deleteListingConfiguration \n ${res_error}`,
789
946
  });
790
- Logger({ level: "WARN", message: res_error });
791
947
  }
792
948
 
793
949
  return response;
794
950
  }
795
951
 
796
952
  /**
797
- * @param {Object} arg - Arg object.
798
- * @param {string} arg.id - A `id` is a unique identifier for a particular
799
- * detail. Pass the `id` of the keywords which you want to delete.
800
- * @returns {Promise<DeleteResponse>} - Success response
953
+ * @param {CatalogPlatformApplicationValidator.DeleteSearchKeywordsParam} arg
954
+ * - Arg object
955
+ *
956
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
957
+ * @param {import("../PlatformAPIClient").Options} - Options
958
+ * @returns {Promise<CatalogPlatformModel.DeleteResponse>} - Success response
959
+ * @name deleteSearchKeywords
801
960
  * @summary: Delete a Search Keywords
802
- * @description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully
961
+ * @description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSearchKeywords/).
803
962
  */
804
- async deleteSearchKeywords({ id } = {}) {
805
- const { error } = CatalogValidator.deleteSearchKeywords().validate(
963
+ async deleteSearchKeywords(
964
+ { id, requestHeaders } = { requestHeaders: {} },
965
+ { responseHeaders } = { responseHeaders: false }
966
+ ) {
967
+ const {
968
+ error,
969
+ } = CatalogPlatformApplicationValidator.deleteSearchKeywords().validate(
806
970
  {
807
971
  id,
808
972
  },
@@ -815,7 +979,7 @@ class Catalog {
815
979
  // Showing warrnings if extra unknown parameters are found
816
980
  const {
817
981
  error: warrning,
818
- } = CatalogValidator.deleteSearchKeywords().validate(
982
+ } = CatalogPlatformApplicationValidator.deleteSearchKeywords().validate(
819
983
  {
820
984
  id,
821
985
  },
@@ -824,9 +988,8 @@ class Catalog {
824
988
  if (warrning) {
825
989
  Logger({
826
990
  level: "WARN",
827
- message: "Parameter Validation warrnings for deleteSearchKeywords",
991
+ message: `Parameter Validation warrnings for platform > Catalog > deleteSearchKeywords \n ${warrning}`,
828
992
  });
829
- Logger({ level: "WARN", message: warrning });
830
993
  }
831
994
 
832
995
  const query_params = {};
@@ -836,12 +999,19 @@ class Catalog {
836
999
  "delete",
837
1000
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
838
1001
  query_params,
839
- undefined
1002
+ undefined,
1003
+ requestHeaders,
1004
+ { responseHeaders }
840
1005
  );
841
1006
 
1007
+ let responseData = response;
1008
+ if (responseHeaders) {
1009
+ responseData = response[0];
1010
+ }
1011
+
842
1012
  const {
843
1013
  error: res_error,
844
- } = CatalogModel.DeleteResponse().validate(response, {
1014
+ } = CatalogPlatformModel.DeleteResponse().validate(responseData, {
845
1015
  abortEarly: false,
846
1016
  allowUnknown: false,
847
1017
  });
@@ -849,41 +1019,41 @@ class Catalog {
849
1019
  if (res_error) {
850
1020
  Logger({
851
1021
  level: "WARN",
852
- message: "Response Validation Warnnings for deleteSearchKeywords",
1022
+ message: `Response Validation Warnnings for platform > Catalog > deleteSearchKeywords \n ${res_error}`,
853
1023
  });
854
- Logger({ level: "WARN", message: res_error });
855
1024
  }
856
1025
 
857
1026
  return response;
858
1027
  }
859
1028
 
860
1029
  /**
861
- * @param {Object} arg - Arg object.
862
- * @param {string} [arg.q] - Get collection list filtered by q string,
863
- * @param {string} [arg.scheduleStatus] - Get collection list filtered by
864
- * scheduled status,
865
- * @param {string} [arg.type] - Type of the collections
866
- * @param {string[]} [arg.tags] - Each response will contain next_id param,
867
- * which should be sent back to make pagination work.
868
- * @param {boolean} [arg.isActive] - Get collections filtered by active status.
869
- * @param {number} [arg.pageNo] - The page number to navigate through the
870
- * given set of results.
871
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
872
- * page. Default is 12.
873
- * @returns {Promise<GetCollectionListingResponse>} - Success response
1030
+ * @param {CatalogPlatformApplicationValidator.GetAllCollectionsParam} arg
1031
+ * - Arg object
1032
+ *
1033
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1034
+ * @param {import("../PlatformAPIClient").Options} - Options
1035
+ * @returns {Promise<CatalogPlatformModel.GetCollectionListingResponse>} -
1036
+ * Success response
1037
+ * @name getAllCollections
874
1038
  * @summary: List all the collections
875
- * @description: A Collection allows you to organize your products into hierarchical groups. For example, a dress might be in the category _Clothing_, the individual product might also be in the collection _Summer_. On successful request, returns all the collections as specified in `CollectionListingSchema`
1039
+ * @description: A Collection allows you to organize your products into hierarchical groups. For example, a dress might be in the category _Clothing_, the individual product might also be in the collection _Summer_. On successful request, returns all the collections as specified in `CollectionListingSchema` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAllCollections/).
876
1040
  */
877
- async getAllCollections({
878
- q,
879
- scheduleStatus,
880
- type,
881
- tags,
882
- isActive,
883
- pageNo,
884
- pageSize,
885
- } = {}) {
886
- const { error } = CatalogValidator.getAllCollections().validate(
1041
+ async getAllCollections(
1042
+ {
1043
+ q,
1044
+ scheduleStatus,
1045
+ type,
1046
+ tags,
1047
+ isActive,
1048
+ pageNo,
1049
+ pageSize,
1050
+ requestHeaders,
1051
+ } = { requestHeaders: {} },
1052
+ { responseHeaders } = { responseHeaders: false }
1053
+ ) {
1054
+ const {
1055
+ error,
1056
+ } = CatalogPlatformApplicationValidator.getAllCollections().validate(
887
1057
  {
888
1058
  q,
889
1059
  scheduleStatus,
@@ -900,7 +1070,9 @@ class Catalog {
900
1070
  }
901
1071
 
902
1072
  // Showing warrnings if extra unknown parameters are found
903
- const { error: warrning } = CatalogValidator.getAllCollections().validate(
1073
+ const {
1074
+ error: warrning,
1075
+ } = CatalogPlatformApplicationValidator.getAllCollections().validate(
904
1076
  {
905
1077
  q,
906
1078
  scheduleStatus,
@@ -915,9 +1087,8 @@ class Catalog {
915
1087
  if (warrning) {
916
1088
  Logger({
917
1089
  level: "WARN",
918
- message: "Parameter Validation warrnings for getAllCollections",
1090
+ message: `Parameter Validation warrnings for platform > Catalog > getAllCollections \n ${warrning}`,
919
1091
  });
920
- Logger({ level: "WARN", message: warrning });
921
1092
  }
922
1093
 
923
1094
  const query_params = {};
@@ -934,35 +1105,51 @@ class Catalog {
934
1105
  "get",
935
1106
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/`,
936
1107
  query_params,
937
- undefined
1108
+ undefined,
1109
+ requestHeaders,
1110
+ { responseHeaders }
938
1111
  );
939
1112
 
1113
+ let responseData = response;
1114
+ if (responseHeaders) {
1115
+ responseData = response[0];
1116
+ }
1117
+
940
1118
  const {
941
1119
  error: res_error,
942
- } = CatalogModel.GetCollectionListingResponse().validate(response, {
943
- abortEarly: false,
944
- allowUnknown: false,
945
- });
1120
+ } = CatalogPlatformModel.GetCollectionListingResponse().validate(
1121
+ responseData,
1122
+ { abortEarly: false, allowUnknown: false }
1123
+ );
946
1124
 
947
1125
  if (res_error) {
948
1126
  Logger({
949
1127
  level: "WARN",
950
- message: "Response Validation Warnnings for getAllCollections",
1128
+ message: `Response Validation Warnnings for platform > Catalog > getAllCollections \n ${res_error}`,
951
1129
  });
952
- Logger({ level: "WARN", message: res_error });
953
1130
  }
954
1131
 
955
1132
  return response;
956
1133
  }
957
1134
 
958
1135
  /**
959
- * @param {Object} arg - Arg object.
960
- * @returns {Promise<GetSearchWordsResponse>} - Success response
1136
+ * @param {CatalogPlatformApplicationValidator.GetAllSearchKeywordParam} arg
1137
+ * - Arg object
1138
+ *
1139
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1140
+ * @param {import("../PlatformAPIClient").Options} - Options
1141
+ * @returns {Promise<CatalogPlatformModel.GetSearchWordsResponse>} - Success response
1142
+ * @name getAllSearchKeyword
961
1143
  * @summary: List all Search Custom Keyword Listing
962
- * @description: Custom Search Keyword allows you to map conditions with keywords to give you the ultimate results
1144
+ * @description: Custom Search Keyword allows you to map conditions with keywords to give you the ultimate results - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAllSearchKeyword/).
963
1145
  */
964
- async getAllSearchKeyword({} = {}) {
965
- const { error } = CatalogValidator.getAllSearchKeyword().validate(
1146
+ async getAllSearchKeyword(
1147
+ { requestHeaders } = { requestHeaders: {} },
1148
+ { responseHeaders } = { responseHeaders: false }
1149
+ ) {
1150
+ const {
1151
+ error,
1152
+ } = CatalogPlatformApplicationValidator.getAllSearchKeyword().validate(
966
1153
  {},
967
1154
  { abortEarly: false, allowUnknown: true }
968
1155
  );
@@ -971,16 +1158,17 @@ class Catalog {
971
1158
  }
972
1159
 
973
1160
  // Showing warrnings if extra unknown parameters are found
974
- const { error: warrning } = CatalogValidator.getAllSearchKeyword().validate(
1161
+ const {
1162
+ error: warrning,
1163
+ } = CatalogPlatformApplicationValidator.getAllSearchKeyword().validate(
975
1164
  {},
976
1165
  { abortEarly: false, allowUnknown: false }
977
1166
  );
978
1167
  if (warrning) {
979
1168
  Logger({
980
1169
  level: "WARN",
981
- message: "Parameter Validation warrnings for getAllSearchKeyword",
1170
+ message: `Parameter Validation warrnings for platform > Catalog > getAllSearchKeyword \n ${warrning}`,
982
1171
  });
983
- Logger({ level: "WARN", message: warrning });
984
1172
  }
985
1173
 
986
1174
  const query_params = {};
@@ -990,12 +1178,19 @@ class Catalog {
990
1178
  "get",
991
1179
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/`,
992
1180
  query_params,
993
- undefined
1181
+ undefined,
1182
+ requestHeaders,
1183
+ { responseHeaders }
994
1184
  );
995
1185
 
1186
+ let responseData = response;
1187
+ if (responseHeaders) {
1188
+ responseData = response[0];
1189
+ }
1190
+
996
1191
  const {
997
1192
  error: res_error,
998
- } = CatalogModel.GetSearchWordsResponse().validate(response, {
1193
+ } = CatalogPlatformModel.GetSearchWordsResponse().validate(responseData, {
999
1194
  abortEarly: false,
1000
1195
  allowUnknown: false,
1001
1196
  });
@@ -1003,38 +1198,38 @@ class Catalog {
1003
1198
  if (res_error) {
1004
1199
  Logger({
1005
1200
  level: "WARN",
1006
- message: "Response Validation Warnnings for getAllSearchKeyword",
1201
+ message: `Response Validation Warnnings for platform > Catalog > getAllSearchKeyword \n ${res_error}`,
1007
1202
  });
1008
- Logger({ level: "WARN", message: res_error });
1009
1203
  }
1010
1204
 
1011
1205
  return response;
1012
1206
  }
1013
1207
 
1014
1208
  /**
1015
- * @param {Object} arg - Arg object.
1016
- * @param {number[]} [arg.itemIds] - The Item Id of the product.
1017
- * @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
1018
- * @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
1019
- * @param {string[]} [arg.sellerIdentifiers] - Unique seller_identifier of
1020
- * the product.
1021
- * @param {string} [arg.timestamp] - Timestamp in UTC format (2020-07-23T10:27:50Z)
1022
- * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
1023
- * @param {string} [arg.pageId] - Page ID to retrieve next set of results.
1024
- * @returns {Promise<InventoryStockResponse>} - Success response
1209
+ * @param {CatalogPlatformApplicationValidator.GetAppInventoryParam} arg - Arg object
1210
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1211
+ * @param {import("../PlatformAPIClient").Options} - Options
1212
+ * @returns {Promise<CatalogPlatformModel.InventoryStockResponse>} - Success response
1213
+ * @name getAppInventory
1025
1214
  * @summary: Get the stock of a product
1026
- * @description: Retrieve the available Inventory of the products. Use this API to get the Inventory status of products with the filters of timestamp, store_ids, brand_ids, item_id - Items - Pagination
1215
+ * @description: Retrieve the available Inventory of the products. Use this API to get the Inventory status of products with the filters of timestamp, store_ids, brand_ids, item_id - Items - Pagination - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppInventory/).
1027
1216
  */
1028
- async getAppInventory({
1029
- itemIds,
1030
- storeIds,
1031
- brandIds,
1032
- sellerIdentifiers,
1033
- timestamp,
1034
- pageSize,
1035
- pageId,
1036
- } = {}) {
1037
- const { error } = CatalogValidator.getAppInventory().validate(
1217
+ async getAppInventory(
1218
+ {
1219
+ itemIds,
1220
+ storeIds,
1221
+ brandIds,
1222
+ sellerIdentifiers,
1223
+ timestamp,
1224
+ pageSize,
1225
+ pageId,
1226
+ requestHeaders,
1227
+ } = { requestHeaders: {} },
1228
+ { responseHeaders } = { responseHeaders: false }
1229
+ ) {
1230
+ const {
1231
+ error,
1232
+ } = CatalogPlatformApplicationValidator.getAppInventory().validate(
1038
1233
  {
1039
1234
  itemIds,
1040
1235
  storeIds,
@@ -1051,7 +1246,9 @@ class Catalog {
1051
1246
  }
1052
1247
 
1053
1248
  // Showing warrnings if extra unknown parameters are found
1054
- const { error: warrning } = CatalogValidator.getAppInventory().validate(
1249
+ const {
1250
+ error: warrning,
1251
+ } = CatalogPlatformApplicationValidator.getAppInventory().validate(
1055
1252
  {
1056
1253
  itemIds,
1057
1254
  storeIds,
@@ -1066,9 +1263,8 @@ class Catalog {
1066
1263
  if (warrning) {
1067
1264
  Logger({
1068
1265
  level: "WARN",
1069
- message: "Parameter Validation warrnings for getAppInventory",
1266
+ message: `Parameter Validation warrnings for platform > Catalog > getAppInventory \n ${warrning}`,
1070
1267
  });
1071
- Logger({ level: "WARN", message: warrning });
1072
1268
  }
1073
1269
 
1074
1270
  const query_params = {};
@@ -1085,12 +1281,19 @@ class Catalog {
1085
1281
  "get",
1086
1282
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/inventory/`,
1087
1283
  query_params,
1088
- undefined
1284
+ undefined,
1285
+ requestHeaders,
1286
+ { responseHeaders }
1089
1287
  );
1090
1288
 
1289
+ let responseData = response;
1290
+ if (responseHeaders) {
1291
+ responseData = response[0];
1292
+ }
1293
+
1091
1294
  const {
1092
1295
  error: res_error,
1093
- } = CatalogModel.InventoryStockResponse().validate(response, {
1296
+ } = CatalogPlatformModel.InventoryStockResponse().validate(responseData, {
1094
1297
  abortEarly: false,
1095
1298
  allowUnknown: false,
1096
1299
  });
@@ -1098,33 +1301,31 @@ class Catalog {
1098
1301
  if (res_error) {
1099
1302
  Logger({
1100
1303
  level: "WARN",
1101
- message: "Response Validation Warnnings for getAppInventory",
1304
+ message: `Response Validation Warnnings for platform > Catalog > getAppInventory \n ${res_error}`,
1102
1305
  });
1103
- Logger({ level: "WARN", message: res_error });
1104
1306
  }
1105
1307
 
1106
1308
  return response;
1107
1309
  }
1108
1310
 
1109
1311
  /**
1110
- * @param {Object} arg - Arg object.
1111
- * @param {string} [arg.storeType] - Helps to sort the location list on the
1112
- * basis of location type.
1113
- * @param {number[]} [arg.uid] - Helps to sort the location list on the
1114
- * basis of uid list.
1115
- * @param {string} [arg.q] - Query that is to be searched.
1116
- * @param {string} [arg.stage] - To filter companies on basis of verified or
1117
- * unverified companies.
1118
- * @param {number} [arg.pageNo] - The page number to navigate through the
1119
- * given set of results
1120
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
1121
- * page. Default is 20.
1122
- * @returns {Promise<LocationListSerializer>} - Success response
1312
+ * @param {CatalogPlatformApplicationValidator.GetAppLocationsParam} arg - Arg object
1313
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1314
+ * @param {import("../PlatformAPIClient").Options} - Options
1315
+ * @returns {Promise<CatalogPlatformModel.LocationListSerializer>} - Success response
1316
+ * @name getAppLocations
1123
1317
  * @summary: Get list of locations
1124
- * @description: This API allows to view all the locations asscoiated to a application.
1318
+ * @description: This API allows to view all the locations asscoiated to a application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppLocations/).
1125
1319
  */
1126
- async getAppLocations({ storeType, uid, q, stage, pageNo, pageSize } = {}) {
1127
- const { error } = CatalogValidator.getAppLocations().validate(
1320
+ async getAppLocations(
1321
+ { storeType, uid, q, stage, pageNo, pageSize, requestHeaders } = {
1322
+ requestHeaders: {},
1323
+ },
1324
+ { responseHeaders } = { responseHeaders: false }
1325
+ ) {
1326
+ const {
1327
+ error,
1328
+ } = CatalogPlatformApplicationValidator.getAppLocations().validate(
1128
1329
  {
1129
1330
  storeType,
1130
1331
  uid,
@@ -1140,7 +1341,9 @@ class Catalog {
1140
1341
  }
1141
1342
 
1142
1343
  // Showing warrnings if extra unknown parameters are found
1143
- const { error: warrning } = CatalogValidator.getAppLocations().validate(
1344
+ const {
1345
+ error: warrning,
1346
+ } = CatalogPlatformApplicationValidator.getAppLocations().validate(
1144
1347
  {
1145
1348
  storeType,
1146
1349
  uid,
@@ -1154,9 +1357,8 @@ class Catalog {
1154
1357
  if (warrning) {
1155
1358
  Logger({
1156
1359
  level: "WARN",
1157
- message: "Parameter Validation warrnings for getAppLocations",
1360
+ message: `Parameter Validation warrnings for platform > Catalog > getAppLocations \n ${warrning}`,
1158
1361
  });
1159
- Logger({ level: "WARN", message: warrning });
1160
1362
  }
1161
1363
 
1162
1364
  const query_params = {};
@@ -1172,12 +1374,19 @@ class Catalog {
1172
1374
  "get",
1173
1375
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/locations`,
1174
1376
  query_params,
1175
- undefined
1377
+ undefined,
1378
+ requestHeaders,
1379
+ { responseHeaders }
1176
1380
  );
1177
1381
 
1382
+ let responseData = response;
1383
+ if (responseHeaders) {
1384
+ responseData = response[0];
1385
+ }
1386
+
1178
1387
  const {
1179
1388
  error: res_error,
1180
- } = CatalogModel.LocationListSerializer().validate(response, {
1389
+ } = CatalogPlatformModel.LocationListSerializer().validate(responseData, {
1181
1390
  abortEarly: false,
1182
1391
  allowUnknown: false,
1183
1392
  });
@@ -1185,9 +1394,8 @@ class Catalog {
1185
1394
  if (res_error) {
1186
1395
  Logger({
1187
1396
  level: "WARN",
1188
- message: "Response Validation Warnnings for getAppLocations",
1397
+ message: `Response Validation Warnnings for platform > Catalog > getAppLocations \n ${res_error}`,
1189
1398
  });
1190
- Logger({ level: "WARN", message: res_error });
1191
1399
  }
1192
1400
 
1193
1401
  return response;
@@ -1207,6 +1415,7 @@ class Catalog {
1207
1415
  * unverified companies.
1208
1416
  * @param {number} [arg.pageSize] - Number of items to retrieve in each
1209
1417
  * page. Default is 20.
1418
+ * @returns {Paginator<CatalogPlatformModel.LocationListSerializer>}
1210
1419
  * @summary: Get list of locations
1211
1420
  * @description: This API allows to view all the locations asscoiated to a application.
1212
1421
  */
@@ -1245,14 +1454,21 @@ class Catalog {
1245
1454
  }
1246
1455
 
1247
1456
  /**
1248
- * @param {Object} arg - Arg object.
1249
- * @param {string} arg.itemId - Product id for a particular product.
1250
- * @returns {Promise<OwnerAppItemResponse>} - Success response
1457
+ * @param {CatalogPlatformApplicationValidator.GetAppProductParam} arg - Arg object
1458
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1459
+ * @param {import("../PlatformAPIClient").Options} - Options
1460
+ * @returns {Promise<CatalogPlatformModel.OwnerAppItemResponse>} - Success response
1461
+ * @name getAppProduct
1251
1462
  * @summary: Get company application product data.
1252
- * @description: Products are the core resource of an application. If successful, returns a Company Application Product resource in the response body depending upon filter sent.
1463
+ * @description: Products are the core resource of an application. If successful, returns a Company Application Product resource in the response body depending upon filter sent. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppProduct/).
1253
1464
  */
1254
- async getAppProduct({ itemId } = {}) {
1255
- const { error } = CatalogValidator.getAppProduct().validate(
1465
+ async getAppProduct(
1466
+ { itemId, requestHeaders } = { requestHeaders: {} },
1467
+ { responseHeaders } = { responseHeaders: false }
1468
+ ) {
1469
+ const {
1470
+ error,
1471
+ } = CatalogPlatformApplicationValidator.getAppProduct().validate(
1256
1472
  {
1257
1473
  itemId,
1258
1474
  },
@@ -1263,7 +1479,9 @@ class Catalog {
1263
1479
  }
1264
1480
 
1265
1481
  // Showing warrnings if extra unknown parameters are found
1266
- const { error: warrning } = CatalogValidator.getAppProduct().validate(
1482
+ const {
1483
+ error: warrning,
1484
+ } = CatalogPlatformApplicationValidator.getAppProduct().validate(
1267
1485
  {
1268
1486
  itemId,
1269
1487
  },
@@ -1272,9 +1490,8 @@ class Catalog {
1272
1490
  if (warrning) {
1273
1491
  Logger({
1274
1492
  level: "WARN",
1275
- message: "Parameter Validation warrnings for getAppProduct",
1493
+ message: `Parameter Validation warrnings for platform > Catalog > getAppProduct \n ${warrning}`,
1276
1494
  });
1277
- Logger({ level: "WARN", message: warrning });
1278
1495
  }
1279
1496
 
1280
1497
  const query_params = {};
@@ -1284,12 +1501,19 @@ class Catalog {
1284
1501
  "get",
1285
1502
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product/${itemId}/`,
1286
1503
  query_params,
1287
- undefined
1504
+ undefined,
1505
+ requestHeaders,
1506
+ { responseHeaders }
1288
1507
  );
1289
1508
 
1509
+ let responseData = response;
1510
+ if (responseHeaders) {
1511
+ responseData = response[0];
1512
+ }
1513
+
1290
1514
  const {
1291
1515
  error: res_error,
1292
- } = CatalogModel.OwnerAppItemResponse().validate(response, {
1516
+ } = CatalogPlatformModel.OwnerAppItemResponse().validate(responseData, {
1293
1517
  abortEarly: false,
1294
1518
  allowUnknown: false,
1295
1519
  });
@@ -1297,43 +1521,39 @@ class Catalog {
1297
1521
  if (res_error) {
1298
1522
  Logger({
1299
1523
  level: "WARN",
1300
- message: "Response Validation Warnnings for getAppProduct",
1524
+ message: `Response Validation Warnnings for platform > Catalog > getAppProduct \n ${res_error}`,
1301
1525
  });
1302
- Logger({ level: "WARN", message: res_error });
1303
1526
  }
1304
1527
 
1305
1528
  return response;
1306
1529
  }
1307
1530
 
1308
1531
  /**
1309
- * @param {Object} arg - Arg object.
1310
- * @param {number[]} [arg.brandIds] - Get multiple products filtered by Brand Ids
1311
- * @param {number[]} [arg.categoryIds] - Get multiple products filtered by
1312
- * Category Ids
1313
- * @param {number[]} [arg.departmentIds] - Get multiple products filtered by
1314
- * Department Ids
1315
- * @param {string[]} [arg.tags] - Get multiple products filtered by tags
1316
- * @param {number[]} [arg.itemIds] - Get multiple products filtered by Item Ids
1317
- * @param {number} [arg.pageNo] - The page number to navigate through the
1318
- * given set of results
1319
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
1320
- * page. Default is 10.
1321
- * @param {string} [arg.q] - Search with Item Code, Name, Slug or Identifier.
1322
- * @returns {Promise<ProductListingResponse>} - Success response
1532
+ * @param {CatalogPlatformApplicationValidator.GetAppProductsParam} arg - Arg object
1533
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1534
+ * @param {import("../PlatformAPIClient").Options} - Options
1535
+ * @returns {Promise<CatalogPlatformModel.ProductListingResponse>} - Success response
1536
+ * @name getAppProducts
1323
1537
  * @summary: Get applicationwise products
1324
- * @description: Products are the core resource of an application. Products can be associated by categories, collections, brands and more. If successful, returns a Product resource in the response body specified in `ApplicationProductListingResponseDatabasePowered`
1538
+ * @description: Products are the core resource of an application. Products can be associated by categories, collections, brands and more. If successful, returns a Product resource in the response body specified in `ApplicationProductListingResponseDatabasePowered` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppProducts/).
1325
1539
  */
1326
- async getAppProducts({
1327
- brandIds,
1328
- categoryIds,
1329
- departmentIds,
1330
- tags,
1331
- itemIds,
1332
- pageNo,
1333
- pageSize,
1334
- q,
1335
- } = {}) {
1336
- const { error } = CatalogValidator.getAppProducts().validate(
1540
+ async getAppProducts(
1541
+ {
1542
+ brandIds,
1543
+ categoryIds,
1544
+ departmentIds,
1545
+ tags,
1546
+ itemIds,
1547
+ pageNo,
1548
+ pageSize,
1549
+ q,
1550
+ requestHeaders,
1551
+ } = { requestHeaders: {} },
1552
+ { responseHeaders } = { responseHeaders: false }
1553
+ ) {
1554
+ const {
1555
+ error,
1556
+ } = CatalogPlatformApplicationValidator.getAppProducts().validate(
1337
1557
  {
1338
1558
  brandIds,
1339
1559
  categoryIds,
@@ -1351,7 +1571,9 @@ class Catalog {
1351
1571
  }
1352
1572
 
1353
1573
  // Showing warrnings if extra unknown parameters are found
1354
- const { error: warrning } = CatalogValidator.getAppProducts().validate(
1574
+ const {
1575
+ error: warrning,
1576
+ } = CatalogPlatformApplicationValidator.getAppProducts().validate(
1355
1577
  {
1356
1578
  brandIds,
1357
1579
  categoryIds,
@@ -1367,9 +1589,8 @@ class Catalog {
1367
1589
  if (warrning) {
1368
1590
  Logger({
1369
1591
  level: "WARN",
1370
- message: "Parameter Validation warrnings for getAppProducts",
1592
+ message: `Parameter Validation warrnings for platform > Catalog > getAppProducts \n ${warrning}`,
1371
1593
  });
1372
- Logger({ level: "WARN", message: warrning });
1373
1594
  }
1374
1595
 
1375
1596
  const query_params = {};
@@ -1387,12 +1608,19 @@ class Catalog {
1387
1608
  "get",
1388
1609
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/raw-products/`,
1389
1610
  query_params,
1390
- undefined
1611
+ undefined,
1612
+ requestHeaders,
1613
+ { responseHeaders }
1391
1614
  );
1392
1615
 
1616
+ let responseData = response;
1617
+ if (responseHeaders) {
1618
+ responseData = response[0];
1619
+ }
1620
+
1393
1621
  const {
1394
1622
  error: res_error,
1395
- } = CatalogModel.ProductListingResponse().validate(response, {
1623
+ } = CatalogPlatformModel.ProductListingResponse().validate(responseData, {
1396
1624
  abortEarly: false,
1397
1625
  allowUnknown: false,
1398
1626
  });
@@ -1400,60 +1628,46 @@ class Catalog {
1400
1628
  if (res_error) {
1401
1629
  Logger({
1402
1630
  level: "WARN",
1403
- message: "Response Validation Warnnings for getAppProducts",
1631
+ message: `Response Validation Warnnings for platform > Catalog > getAppProducts \n ${res_error}`,
1404
1632
  });
1405
- Logger({ level: "WARN", message: res_error });
1406
1633
  }
1407
1634
 
1408
1635
  return response;
1409
1636
  }
1410
1637
 
1411
1638
  /**
1412
- * @param {Object} arg - Arg object.
1413
- * @param {string} [arg.q] - The search query. This can be a partial or
1414
- * complete name of a either a product, brand or category
1415
- * @param {string} [arg.f] - The search filter parameters. All the parameter
1416
- * filtered from filter parameters will be passed in **f** parameter in
1417
- * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts**
1418
- * @param {string} [arg.c] - The search filter parameters for collection
1419
- * items. All the parameter filtered from filter parameters will be passed
1420
- * in **c** parameter in this format.
1421
- * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
1422
- * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
1423
- * filter details. This flag is used to fetch all filters
1424
- * @param {boolean} [arg.isDependent] - This query parameter is used to get
1425
- * the dependent products in the listing.
1426
- * @param {string} [arg.sortOn] - The order to sort the list of products on.
1427
- * The supported sort parameters are popularity, price, redemption and
1428
- * discount in either ascending or descending order. See the supported
1429
- * values below.
1430
- * @param {string} [arg.pageId] - Each response will contain **page_id**
1431
- * param, which should be sent back to make pagination work.
1432
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
1433
- * page. Default is 12.
1434
- * @param {number} [arg.pageNo] - If page_type is number then pass it to
1435
- * fetch page items. Default is 1.
1436
- * @param {string} [arg.pageType] - For pagination type should be cursor or
1437
- * number. Default is cursor.
1438
- * @param {number[]} [arg.itemIds] - Item Ids of product
1439
- * @returns {Promise<ApplicationProductListingResponse>} - Success response
1639
+ * @param {CatalogPlatformApplicationValidator.GetAppicationProductsParam} arg
1640
+ * - Arg object
1641
+ *
1642
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1643
+ * @param {import("../PlatformAPIClient").Options} - Options
1644
+ * @returns {Promise<CatalogPlatformModel.ApplicationProductListingResponse>}
1645
+ * - Success response
1646
+ *
1647
+ * @name getAppicationProducts
1440
1648
  * @summary: List the products
1441
- * @description: List all the products associated with a brand, collection or category in a requested sort order. The API additionally supports arbitrary search queries that may refer the name of any product, brand, category or collection. If successful, returns a paginated list of products specified in `ApplicationProductListingResponse`
1649
+ * @description: List all the products associated with a brand, collection or category in a requested sort order. The API additionally supports arbitrary search queries that may refer the name of any product, brand, category or collection. If successful, returns a paginated list of products specified in `ApplicationProductListingResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppicationProducts/).
1442
1650
  */
1443
- async getAppicationProducts({
1444
- q,
1445
- f,
1446
- c,
1447
- filters,
1448
- isDependent,
1449
- sortOn,
1450
- pageId,
1451
- pageSize,
1452
- pageNo,
1453
- pageType,
1454
- itemIds,
1455
- } = {}) {
1456
- const { error } = CatalogValidator.getAppicationProducts().validate(
1651
+ async getAppicationProducts(
1652
+ {
1653
+ q,
1654
+ f,
1655
+ c,
1656
+ filters,
1657
+ isDependent,
1658
+ sortOn,
1659
+ pageId,
1660
+ pageSize,
1661
+ pageNo,
1662
+ pageType,
1663
+ itemIds,
1664
+ requestHeaders,
1665
+ } = { requestHeaders: {} },
1666
+ { responseHeaders } = { responseHeaders: false }
1667
+ ) {
1668
+ const {
1669
+ error,
1670
+ } = CatalogPlatformApplicationValidator.getAppicationProducts().validate(
1457
1671
  {
1458
1672
  q,
1459
1673
  f,
@@ -1476,7 +1690,7 @@ class Catalog {
1476
1690
  // Showing warrnings if extra unknown parameters are found
1477
1691
  const {
1478
1692
  error: warrning,
1479
- } = CatalogValidator.getAppicationProducts().validate(
1693
+ } = CatalogPlatformApplicationValidator.getAppicationProducts().validate(
1480
1694
  {
1481
1695
  q,
1482
1696
  f,
@@ -1495,9 +1709,8 @@ class Catalog {
1495
1709
  if (warrning) {
1496
1710
  Logger({
1497
1711
  level: "WARN",
1498
- message: "Parameter Validation warrnings for getAppicationProducts",
1712
+ message: `Parameter Validation warrnings for platform > Catalog > getAppicationProducts \n ${warrning}`,
1499
1713
  });
1500
- Logger({ level: "WARN", message: warrning });
1501
1714
  }
1502
1715
 
1503
1716
  const query_params = {};
@@ -1518,22 +1731,28 @@ class Catalog {
1518
1731
  "get",
1519
1732
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products`,
1520
1733
  query_params,
1521
- undefined
1734
+ undefined,
1735
+ requestHeaders,
1736
+ { responseHeaders }
1522
1737
  );
1523
1738
 
1739
+ let responseData = response;
1740
+ if (responseHeaders) {
1741
+ responseData = response[0];
1742
+ }
1743
+
1524
1744
  const {
1525
1745
  error: res_error,
1526
- } = CatalogModel.ApplicationProductListingResponse().validate(response, {
1527
- abortEarly: false,
1528
- allowUnknown: false,
1529
- });
1746
+ } = CatalogPlatformModel.ApplicationProductListingResponse().validate(
1747
+ responseData,
1748
+ { abortEarly: false, allowUnknown: false }
1749
+ );
1530
1750
 
1531
1751
  if (res_error) {
1532
1752
  Logger({
1533
1753
  level: "WARN",
1534
- message: "Response Validation Warnnings for getAppicationProducts",
1754
+ message: `Response Validation Warnnings for platform > Catalog > getAppicationProducts \n ${res_error}`,
1535
1755
  });
1536
- Logger({ level: "WARN", message: res_error });
1537
1756
  }
1538
1757
 
1539
1758
  return response;
@@ -1565,6 +1784,7 @@ class Catalog {
1565
1784
  * @param {number} [arg.pageSize] - Number of items to retrieve in each
1566
1785
  * page. Default is 12.
1567
1786
  * @param {number[]} [arg.itemIds] - Item Ids of product
1787
+ * @returns {Paginator<CatalogPlatformModel.ApplicationProductListingResponse>}
1568
1788
  * @summary: List the products
1569
1789
  * @description: List all the products associated with a brand, collection or category in a requested sort order. The API additionally supports arbitrary search queries that may refer the name of any product, brand, category or collection. If successful, returns a paginated list of products specified in `ApplicationProductListingResponse`
1570
1790
  */
@@ -1611,19 +1831,23 @@ class Catalog {
1611
1831
  }
1612
1832
 
1613
1833
  /**
1614
- * @param {Object} arg - Arg object.
1615
- * @param {number} [arg.pageNo] - The page number to navigate through the
1616
- * given set of results
1617
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
1618
- * page. Default is 12.
1619
- * @param {string} [arg.q] - Search query with brand name.Use this parameter
1620
- * to search brands by brand name.
1621
- * @returns {Promise<BrandListingResponse>} - Success response
1834
+ * @param {CatalogPlatformApplicationValidator.GetApplicationBrandListingParam} arg
1835
+ * - Arg object
1836
+ *
1837
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1838
+ * @param {import("../PlatformAPIClient").Options} - Options
1839
+ * @returns {Promise<CatalogPlatformModel.BrandListingResponse>} - Success response
1840
+ * @name getApplicationBrandListing
1622
1841
  * @summary: List all the brands for the application
1623
- * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse`
1842
+ * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationBrandListing/).
1624
1843
  */
1625
- async getApplicationBrandListing({ pageNo, pageSize, q } = {}) {
1626
- const { error } = CatalogValidator.getApplicationBrandListing().validate(
1844
+ async getApplicationBrandListing(
1845
+ { pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
1846
+ { responseHeaders } = { responseHeaders: false }
1847
+ ) {
1848
+ const {
1849
+ error,
1850
+ } = CatalogPlatformApplicationValidator.getApplicationBrandListing().validate(
1627
1851
  {
1628
1852
  pageNo,
1629
1853
  pageSize,
@@ -1638,7 +1862,7 @@ class Catalog {
1638
1862
  // Showing warrnings if extra unknown parameters are found
1639
1863
  const {
1640
1864
  error: warrning,
1641
- } = CatalogValidator.getApplicationBrandListing().validate(
1865
+ } = CatalogPlatformApplicationValidator.getApplicationBrandListing().validate(
1642
1866
  {
1643
1867
  pageNo,
1644
1868
  pageSize,
@@ -1649,10 +1873,8 @@ class Catalog {
1649
1873
  if (warrning) {
1650
1874
  Logger({
1651
1875
  level: "WARN",
1652
- message:
1653
- "Parameter Validation warrnings for getApplicationBrandListing",
1876
+ message: `Parameter Validation warrnings for platform > Catalog > getApplicationBrandListing \n ${warrning}`,
1654
1877
  });
1655
- Logger({ level: "WARN", message: warrning });
1656
1878
  }
1657
1879
 
1658
1880
  const query_params = {};
@@ -1665,12 +1887,19 @@ class Catalog {
1665
1887
  "get",
1666
1888
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brand`,
1667
1889
  query_params,
1668
- undefined
1890
+ undefined,
1891
+ requestHeaders,
1892
+ { responseHeaders }
1669
1893
  );
1670
1894
 
1895
+ let responseData = response;
1896
+ if (responseHeaders) {
1897
+ responseData = response[0];
1898
+ }
1899
+
1671
1900
  const {
1672
1901
  error: res_error,
1673
- } = CatalogModel.BrandListingResponse().validate(response, {
1902
+ } = CatalogPlatformModel.BrandListingResponse().validate(responseData, {
1674
1903
  abortEarly: false,
1675
1904
  allowUnknown: false,
1676
1905
  });
@@ -1678,9 +1907,8 @@ class Catalog {
1678
1907
  if (res_error) {
1679
1908
  Logger({
1680
1909
  level: "WARN",
1681
- message: "Response Validation Warnnings for getApplicationBrandListing",
1910
+ message: `Response Validation Warnnings for platform > Catalog > getApplicationBrandListing \n ${res_error}`,
1682
1911
  });
1683
- Logger({ level: "WARN", message: res_error });
1684
1912
  }
1685
1913
 
1686
1914
  return response;
@@ -1696,6 +1924,7 @@ class Catalog {
1696
1924
  * page. Default is 12.
1697
1925
  * @param {string} [arg.q] - Search query with brand name.Use this parameter
1698
1926
  * to search brands by brand name.
1927
+ * @returns {Paginator<CatalogPlatformModel.BrandListingResponse>}
1699
1928
  * @summary: List all the brands for the application
1700
1929
  * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse`
1701
1930
  */
@@ -1728,31 +1957,25 @@ class Catalog {
1728
1957
  }
1729
1958
 
1730
1959
  /**
1731
- * @param {Object} arg - Arg object.
1732
- * @param {string} [arg.department] - The name of the department. Use this
1733
- * parameter to filter products by a particular department. See below the
1734
- * list of available departments. You can retrieve available departments
1735
- * from the **v1.0/departments/** API
1736
- * @param {number} [arg.pageNo] - The page number to navigate through the
1737
- * given set of results
1738
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
1739
- * page. Default is 12.
1740
- * @param {string} [arg.q] - Search query with brand name.Use this parameter
1741
- * to search brands by brand name.
1742
- * @param {number[]} [arg.brandId] - Helps to sort the brands list on the
1743
- * basis of uid list.
1744
- * @returns {Promise<BrandListingResponse>} - Success response
1960
+ * @param {CatalogPlatformApplicationValidator.GetApplicationBrandsParam} arg
1961
+ * - Arg object
1962
+ *
1963
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1964
+ * @param {import("../PlatformAPIClient").Options} - Options
1965
+ * @returns {Promise<CatalogPlatformModel.BrandListingResponse>} - Success response
1966
+ * @name getApplicationBrands
1745
1967
  * @summary: List all the brands
1746
- * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse`
1968
+ * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationBrands/).
1747
1969
  */
1748
- async getApplicationBrands({
1749
- department,
1750
- pageNo,
1751
- pageSize,
1752
- q,
1753
- brandId,
1754
- } = {}) {
1755
- const { error } = CatalogValidator.getApplicationBrands().validate(
1970
+ async getApplicationBrands(
1971
+ { department, pageNo, pageSize, q, brandId, requestHeaders } = {
1972
+ requestHeaders: {},
1973
+ },
1974
+ { responseHeaders } = { responseHeaders: false }
1975
+ ) {
1976
+ const {
1977
+ error,
1978
+ } = CatalogPlatformApplicationValidator.getApplicationBrands().validate(
1756
1979
  {
1757
1980
  department,
1758
1981
  pageNo,
@@ -1769,7 +1992,7 @@ class Catalog {
1769
1992
  // Showing warrnings if extra unknown parameters are found
1770
1993
  const {
1771
1994
  error: warrning,
1772
- } = CatalogValidator.getApplicationBrands().validate(
1995
+ } = CatalogPlatformApplicationValidator.getApplicationBrands().validate(
1773
1996
  {
1774
1997
  department,
1775
1998
  pageNo,
@@ -1782,9 +2005,8 @@ class Catalog {
1782
2005
  if (warrning) {
1783
2006
  Logger({
1784
2007
  level: "WARN",
1785
- message: "Parameter Validation warrnings for getApplicationBrands",
2008
+ message: `Parameter Validation warrnings for platform > Catalog > getApplicationBrands \n ${warrning}`,
1786
2009
  });
1787
- Logger({ level: "WARN", message: warrning });
1788
2010
  }
1789
2011
 
1790
2012
  const query_params = {};
@@ -1799,12 +2021,19 @@ class Catalog {
1799
2021
  "get",
1800
2022
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brands`,
1801
2023
  query_params,
1802
- undefined
2024
+ undefined,
2025
+ requestHeaders,
2026
+ { responseHeaders }
1803
2027
  );
1804
2028
 
2029
+ let responseData = response;
2030
+ if (responseHeaders) {
2031
+ responseData = response[0];
2032
+ }
2033
+
1805
2034
  const {
1806
2035
  error: res_error,
1807
- } = CatalogModel.BrandListingResponse().validate(response, {
2036
+ } = CatalogPlatformModel.BrandListingResponse().validate(responseData, {
1808
2037
  abortEarly: false,
1809
2038
  allowUnknown: false,
1810
2039
  });
@@ -1812,9 +2041,8 @@ class Catalog {
1812
2041
  if (res_error) {
1813
2042
  Logger({
1814
2043
  level: "WARN",
1815
- message: "Response Validation Warnnings for getApplicationBrands",
2044
+ message: `Response Validation Warnnings for platform > Catalog > getApplicationBrands \n ${res_error}`,
1816
2045
  });
1817
- Logger({ level: "WARN", message: res_error });
1818
2046
  }
1819
2047
 
1820
2048
  return response;
@@ -1836,6 +2064,7 @@ class Catalog {
1836
2064
  * to search brands by brand name.
1837
2065
  * @param {number[]} [arg.brandId] - Helps to sort the brands list on the
1838
2066
  * basis of uid list.
2067
+ * @returns {Paginator<CatalogPlatformModel.BrandListingResponse>}
1839
2068
  * @summary: List all the brands
1840
2069
  * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse`
1841
2070
  */
@@ -1872,26 +2101,25 @@ class Catalog {
1872
2101
  }
1873
2102
 
1874
2103
  /**
1875
- * @param {Object} arg - Arg object.
1876
- * @param {number} [arg.departmentId] - A `department_id` is a unique
1877
- * identifier for a particular department.
1878
- * @param {number} [arg.pageNo] - The page number to navigate through the
1879
- * given set of results
1880
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
1881
- * page. Default is 12.
1882
- * @param {string} [arg.q] - Search query with brand name.Use this parameter
1883
- * to search brands by brand name.
1884
- * @returns {Promise<BrandListingResponse>} - Success response
2104
+ * @param {CatalogPlatformApplicationValidator.GetApplicationCategoryListingParam} arg
2105
+ * - Arg object
2106
+ *
2107
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2108
+ * @param {import("../PlatformAPIClient").Options} - Options
2109
+ * @returns {Promise<CatalogPlatformModel.BrandListingResponse>} - Success response
2110
+ * @name getApplicationCategoryListing
1885
2111
  * @summary: List all the brands for the application
1886
- * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse`
2112
+ * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationCategoryListing/).
1887
2113
  */
1888
- async getApplicationCategoryListing({
1889
- departmentId,
1890
- pageNo,
1891
- pageSize,
1892
- q,
1893
- } = {}) {
1894
- const { error } = CatalogValidator.getApplicationCategoryListing().validate(
2114
+ async getApplicationCategoryListing(
2115
+ { departmentId, pageNo, pageSize, q, requestHeaders } = {
2116
+ requestHeaders: {},
2117
+ },
2118
+ { responseHeaders } = { responseHeaders: false }
2119
+ ) {
2120
+ const {
2121
+ error,
2122
+ } = CatalogPlatformApplicationValidator.getApplicationCategoryListing().validate(
1895
2123
  {
1896
2124
  departmentId,
1897
2125
  pageNo,
@@ -1907,7 +2135,7 @@ class Catalog {
1907
2135
  // Showing warrnings if extra unknown parameters are found
1908
2136
  const {
1909
2137
  error: warrning,
1910
- } = CatalogValidator.getApplicationCategoryListing().validate(
2138
+ } = CatalogPlatformApplicationValidator.getApplicationCategoryListing().validate(
1911
2139
  {
1912
2140
  departmentId,
1913
2141
  pageNo,
@@ -1919,10 +2147,8 @@ class Catalog {
1919
2147
  if (warrning) {
1920
2148
  Logger({
1921
2149
  level: "WARN",
1922
- message:
1923
- "Parameter Validation warrnings for getApplicationCategoryListing",
2150
+ message: `Parameter Validation warrnings for platform > Catalog > getApplicationCategoryListing \n ${warrning}`,
1924
2151
  });
1925
- Logger({ level: "WARN", message: warrning });
1926
2152
  }
1927
2153
 
1928
2154
  const query_params = {};
@@ -1936,12 +2162,19 @@ class Catalog {
1936
2162
  "get",
1937
2163
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/category`,
1938
2164
  query_params,
1939
- undefined
2165
+ undefined,
2166
+ requestHeaders,
2167
+ { responseHeaders }
1940
2168
  );
1941
2169
 
2170
+ let responseData = response;
2171
+ if (responseHeaders) {
2172
+ responseData = response[0];
2173
+ }
2174
+
1942
2175
  const {
1943
2176
  error: res_error,
1944
- } = CatalogModel.BrandListingResponse().validate(response, {
2177
+ } = CatalogPlatformModel.BrandListingResponse().validate(responseData, {
1945
2178
  abortEarly: false,
1946
2179
  allowUnknown: false,
1947
2180
  });
@@ -1949,10 +2182,8 @@ class Catalog {
1949
2182
  if (res_error) {
1950
2183
  Logger({
1951
2184
  level: "WARN",
1952
- message:
1953
- "Response Validation Warnnings for getApplicationCategoryListing",
2185
+ message: `Response Validation Warnnings for platform > Catalog > getApplicationCategoryListing \n ${res_error}`,
1954
2186
  });
1955
- Logger({ level: "WARN", message: res_error });
1956
2187
  }
1957
2188
 
1958
2189
  return response;
@@ -1970,6 +2201,7 @@ class Catalog {
1970
2201
  * page. Default is 12.
1971
2202
  * @param {string} [arg.q] - Search query with brand name.Use this parameter
1972
2203
  * to search brands by brand name.
2204
+ * @returns {Paginator<CatalogPlatformModel.BrandListingResponse>}
1973
2205
  * @summary: List all the brands for the application
1974
2206
  * @description: A brand is the name under which a product is being sold. Use this API to list all the brands. You can pass optionally filter the brands by the department. If successful, returns a paginated list of brands specified in `BrandListingResponse`
1975
2207
  */
@@ -2004,21 +2236,25 @@ class Catalog {
2004
2236
  }
2005
2237
 
2006
2238
  /**
2007
- * @param {Object} arg - Arg object.
2008
- * @param {number} [arg.pageNo] - The page number to navigate through the
2009
- * given set of results
2010
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
2011
- * page. Default is 12.
2012
- * @param {string} [arg.q] - Search query with brand name.Use this parameter
2013
- * to search department by name.
2014
- * @returns {Promise<ApplicationDepartmentListingResponse>} - Success response
2239
+ * @param {CatalogPlatformApplicationValidator.GetApplicationDepartmentListingParam} arg
2240
+ * - Arg object
2241
+ *
2242
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2243
+ * @param {import("../PlatformAPIClient").Options} - Options
2244
+ * @returns {Promise<CatalogPlatformModel.ApplicationDepartmentListingResponse>}
2245
+ * - Success response
2246
+ *
2247
+ * @name getApplicationDepartmentListing
2015
2248
  * @summary: List all the departments for the application
2016
- * @description: Departments are a way to categorise similar products. A product can lie in multiple departments. For example, a skirt can below to the 'Women's Fashion' Department while a handbag can lie in 'Women's Accessories' Department. Use this API to list all the application departments. If successful, returns the list of departments specified in `ApplicationDepartmentListingResponse`
2249
+ * @description: Departments are a way to categorise similar products. A product can lie in multiple departments. For example, a skirt can below to the 'Women's Fashion' Department while a handbag can lie in 'Women's Accessories' Department. Use this API to list all the application departments. If successful, returns the list of departments specified in `ApplicationDepartmentListingResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationDepartmentListing/).
2017
2250
  */
2018
- async getApplicationDepartmentListing({ pageNo, pageSize, q } = {}) {
2251
+ async getApplicationDepartmentListing(
2252
+ { pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
2253
+ { responseHeaders } = { responseHeaders: false }
2254
+ ) {
2019
2255
  const {
2020
2256
  error,
2021
- } = CatalogValidator.getApplicationDepartmentListing().validate(
2257
+ } = CatalogPlatformApplicationValidator.getApplicationDepartmentListing().validate(
2022
2258
  {
2023
2259
  pageNo,
2024
2260
  pageSize,
@@ -2033,7 +2269,7 @@ class Catalog {
2033
2269
  // Showing warrnings if extra unknown parameters are found
2034
2270
  const {
2035
2271
  error: warrning,
2036
- } = CatalogValidator.getApplicationDepartmentListing().validate(
2272
+ } = CatalogPlatformApplicationValidator.getApplicationDepartmentListing().validate(
2037
2273
  {
2038
2274
  pageNo,
2039
2275
  pageSize,
@@ -2044,10 +2280,8 @@ class Catalog {
2044
2280
  if (warrning) {
2045
2281
  Logger({
2046
2282
  level: "WARN",
2047
- message:
2048
- "Parameter Validation warrnings for getApplicationDepartmentListing",
2283
+ message: `Parameter Validation warrnings for platform > Catalog > getApplicationDepartmentListing \n ${warrning}`,
2049
2284
  });
2050
- Logger({ level: "WARN", message: warrning });
2051
2285
  }
2052
2286
 
2053
2287
  const query_params = {};
@@ -2060,23 +2294,28 @@ class Catalog {
2060
2294
  "get",
2061
2295
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/department`,
2062
2296
  query_params,
2063
- undefined
2297
+ undefined,
2298
+ requestHeaders,
2299
+ { responseHeaders }
2064
2300
  );
2065
2301
 
2302
+ let responseData = response;
2303
+ if (responseHeaders) {
2304
+ responseData = response[0];
2305
+ }
2306
+
2066
2307
  const {
2067
2308
  error: res_error,
2068
- } = CatalogModel.ApplicationDepartmentListingResponse().validate(response, {
2069
- abortEarly: false,
2070
- allowUnknown: false,
2071
- });
2309
+ } = CatalogPlatformModel.ApplicationDepartmentListingResponse().validate(
2310
+ responseData,
2311
+ { abortEarly: false, allowUnknown: false }
2312
+ );
2072
2313
 
2073
2314
  if (res_error) {
2074
2315
  Logger({
2075
2316
  level: "WARN",
2076
- message:
2077
- "Response Validation Warnnings for getApplicationDepartmentListing",
2317
+ message: `Response Validation Warnnings for platform > Catalog > getApplicationDepartmentListing \n ${res_error}`,
2078
2318
  });
2079
- Logger({ level: "WARN", message: res_error });
2080
2319
  }
2081
2320
 
2082
2321
  return response;
@@ -2092,6 +2331,7 @@ class Catalog {
2092
2331
  * page. Default is 12.
2093
2332
  * @param {string} [arg.q] - Search query with brand name.Use this parameter
2094
2333
  * to search department by name.
2334
+ * @returns {Paginator<CatalogPlatformModel.ApplicationDepartmentListingResponse>}
2095
2335
  * @summary: List all the departments for the application
2096
2336
  * @description: Departments are a way to categorise similar products. A product can lie in multiple departments. For example, a skirt can below to the 'Women's Fashion' Department while a handbag can lie in 'Women's Accessories' Department. Use this API to list all the application departments. If successful, returns the list of departments specified in `ApplicationDepartmentListingResponse`
2097
2337
  */
@@ -2124,13 +2364,24 @@ class Catalog {
2124
2364
  }
2125
2365
 
2126
2366
  /**
2127
- * @param {Object} arg - Arg object.
2128
- * @returns {Promise<GetAutocompleteWordsResponse>} - Success response
2367
+ * @param {CatalogPlatformApplicationValidator.GetAutocompleteConfigParam} arg
2368
+ * - Arg object
2369
+ *
2370
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2371
+ * @param {import("../PlatformAPIClient").Options} - Options
2372
+ * @returns {Promise<CatalogPlatformModel.GetAutocompleteWordsResponse>} -
2373
+ * Success response
2374
+ * @name getAutocompleteConfig
2129
2375
  * @summary: List all Autocomplete Keyword Listing
2130
- * @description: Custom Autocomplete Keyword allows you to map conditions with keywords to give you the ultimate results
2376
+ * @description: Custom Autocomplete Keyword allows you to map conditions with keywords to give you the ultimate results - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAutocompleteConfig/).
2131
2377
  */
2132
- async getAutocompleteConfig({} = {}) {
2133
- const { error } = CatalogValidator.getAutocompleteConfig().validate(
2378
+ async getAutocompleteConfig(
2379
+ { requestHeaders } = { requestHeaders: {} },
2380
+ { responseHeaders } = { responseHeaders: false }
2381
+ ) {
2382
+ const {
2383
+ error,
2384
+ } = CatalogPlatformApplicationValidator.getAutocompleteConfig().validate(
2134
2385
  {},
2135
2386
  { abortEarly: false, allowUnknown: true }
2136
2387
  );
@@ -2141,16 +2392,15 @@ class Catalog {
2141
2392
  // Showing warrnings if extra unknown parameters are found
2142
2393
  const {
2143
2394
  error: warrning,
2144
- } = CatalogValidator.getAutocompleteConfig().validate(
2395
+ } = CatalogPlatformApplicationValidator.getAutocompleteConfig().validate(
2145
2396
  {},
2146
2397
  { abortEarly: false, allowUnknown: false }
2147
2398
  );
2148
2399
  if (warrning) {
2149
2400
  Logger({
2150
2401
  level: "WARN",
2151
- message: "Parameter Validation warrnings for getAutocompleteConfig",
2402
+ message: `Parameter Validation warrnings for platform > Catalog > getAutocompleteConfig \n ${warrning}`,
2152
2403
  });
2153
- Logger({ level: "WARN", message: warrning });
2154
2404
  }
2155
2405
 
2156
2406
  const query_params = {};
@@ -2160,37 +2410,52 @@ class Catalog {
2160
2410
  "get",
2161
2411
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/`,
2162
2412
  query_params,
2163
- undefined
2413
+ undefined,
2414
+ requestHeaders,
2415
+ { responseHeaders }
2164
2416
  );
2165
2417
 
2418
+ let responseData = response;
2419
+ if (responseHeaders) {
2420
+ responseData = response[0];
2421
+ }
2422
+
2166
2423
  const {
2167
2424
  error: res_error,
2168
- } = CatalogModel.GetAutocompleteWordsResponse().validate(response, {
2169
- abortEarly: false,
2170
- allowUnknown: false,
2171
- });
2425
+ } = CatalogPlatformModel.GetAutocompleteWordsResponse().validate(
2426
+ responseData,
2427
+ { abortEarly: false, allowUnknown: false }
2428
+ );
2172
2429
 
2173
2430
  if (res_error) {
2174
2431
  Logger({
2175
2432
  level: "WARN",
2176
- message: "Response Validation Warnnings for getAutocompleteConfig",
2433
+ message: `Response Validation Warnnings for platform > Catalog > getAutocompleteConfig \n ${res_error}`,
2177
2434
  });
2178
- Logger({ level: "WARN", message: res_error });
2179
2435
  }
2180
2436
 
2181
2437
  return response;
2182
2438
  }
2183
2439
 
2184
2440
  /**
2185
- * @param {Object} arg - Arg object.
2186
- * @param {string} arg.id - A `id` is a unique identifier for a particular
2187
- * detail. Pass the `id` of the keywords which you want to retrieve.
2188
- * @returns {Promise<GetAutocompleteWordsResponse>} - Success response
2441
+ * @param {CatalogPlatformApplicationValidator.GetAutocompleteKeywordDetailParam} arg
2442
+ * - Arg object
2443
+ *
2444
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2445
+ * @param {import("../PlatformAPIClient").Options} - Options
2446
+ * @returns {Promise<CatalogPlatformModel.GetAutocompleteWordsResponse>} -
2447
+ * Success response
2448
+ * @name getAutocompleteKeywordDetail
2189
2449
  * @summary: Get a Autocomplete Keywords Details
2190
- * @description: Get the details of a words by its `id`. If successful, returns a keywords resource in the response body specified in `GetAutocompleteWordsResponseSchema`
2450
+ * @description: Get the details of a words by its `id`. If successful, returns a keywords resource in the response body specified in `GetAutocompleteWordsResponseSchema` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAutocompleteKeywordDetail/).
2191
2451
  */
2192
- async getAutocompleteKeywordDetail({ id } = {}) {
2193
- const { error } = CatalogValidator.getAutocompleteKeywordDetail().validate(
2452
+ async getAutocompleteKeywordDetail(
2453
+ { id, requestHeaders } = { requestHeaders: {} },
2454
+ { responseHeaders } = { responseHeaders: false }
2455
+ ) {
2456
+ const {
2457
+ error,
2458
+ } = CatalogPlatformApplicationValidator.getAutocompleteKeywordDetail().validate(
2194
2459
  {
2195
2460
  id,
2196
2461
  },
@@ -2203,7 +2468,7 @@ class Catalog {
2203
2468
  // Showing warrnings if extra unknown parameters are found
2204
2469
  const {
2205
2470
  error: warrning,
2206
- } = CatalogValidator.getAutocompleteKeywordDetail().validate(
2471
+ } = CatalogPlatformApplicationValidator.getAutocompleteKeywordDetail().validate(
2207
2472
  {
2208
2473
  id,
2209
2474
  },
@@ -2212,10 +2477,8 @@ class Catalog {
2212
2477
  if (warrning) {
2213
2478
  Logger({
2214
2479
  level: "WARN",
2215
- message:
2216
- "Parameter Validation warrnings for getAutocompleteKeywordDetail",
2480
+ message: `Parameter Validation warrnings for platform > Catalog > getAutocompleteKeywordDetail \n ${warrning}`,
2217
2481
  });
2218
- Logger({ level: "WARN", message: warrning });
2219
2482
  }
2220
2483
 
2221
2484
  const query_params = {};
@@ -2225,36 +2488,53 @@ class Catalog {
2225
2488
  "get",
2226
2489
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
2227
2490
  query_params,
2228
- undefined
2491
+ undefined,
2492
+ requestHeaders,
2493
+ { responseHeaders }
2229
2494
  );
2230
2495
 
2496
+ let responseData = response;
2497
+ if (responseHeaders) {
2498
+ responseData = response[0];
2499
+ }
2500
+
2231
2501
  const {
2232
2502
  error: res_error,
2233
- } = CatalogModel.GetAutocompleteWordsResponse().validate(response, {
2234
- abortEarly: false,
2235
- allowUnknown: false,
2236
- });
2503
+ } = CatalogPlatformModel.GetAutocompleteWordsResponse().validate(
2504
+ responseData,
2505
+ { abortEarly: false, allowUnknown: false }
2506
+ );
2237
2507
 
2238
2508
  if (res_error) {
2239
2509
  Logger({
2240
2510
  level: "WARN",
2241
- message:
2242
- "Response Validation Warnnings for getAutocompleteKeywordDetail",
2511
+ message: `Response Validation Warnnings for platform > Catalog > getAutocompleteKeywordDetail \n ${res_error}`,
2243
2512
  });
2244
- Logger({ level: "WARN", message: res_error });
2245
2513
  }
2246
2514
 
2247
2515
  return response;
2248
2516
  }
2249
2517
 
2250
2518
  /**
2251
- * @param {Object} arg - Arg object.
2252
- * @returns {Promise<GetCatalogConfigurationMetaData>} - Success response
2519
+ * @param {CatalogPlatformApplicationValidator.GetCatalogConfigurationParam} arg
2520
+ * - Arg object
2521
+ *
2522
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2523
+ * @param {import("../PlatformAPIClient").Options} - Options
2524
+ * @returns {Promise<CatalogPlatformModel.GetCatalogConfigurationMetaData>}
2525
+ * - Success response
2526
+ *
2527
+ * @name getCatalogConfiguration
2253
2528
  * @summary: Get configuration meta details for catalog for admin panel
2254
- * @description: configuration meta details for catalog.
2529
+ * @description: configuration meta details for catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCatalogConfiguration/).
2255
2530
  */
2256
- async getCatalogConfiguration({} = {}) {
2257
- const { error } = CatalogValidator.getCatalogConfiguration().validate(
2531
+ async getCatalogConfiguration(
2532
+ { requestHeaders } = { requestHeaders: {} },
2533
+ { responseHeaders } = { responseHeaders: false }
2534
+ ) {
2535
+ const {
2536
+ error,
2537
+ } = CatalogPlatformApplicationValidator.getCatalogConfiguration().validate(
2258
2538
  {},
2259
2539
  { abortEarly: false, allowUnknown: true }
2260
2540
  );
@@ -2265,16 +2545,15 @@ class Catalog {
2265
2545
  // Showing warrnings if extra unknown parameters are found
2266
2546
  const {
2267
2547
  error: warrning,
2268
- } = CatalogValidator.getCatalogConfiguration().validate(
2548
+ } = CatalogPlatformApplicationValidator.getCatalogConfiguration().validate(
2269
2549
  {},
2270
2550
  { abortEarly: false, allowUnknown: false }
2271
2551
  );
2272
2552
  if (warrning) {
2273
2553
  Logger({
2274
2554
  level: "WARN",
2275
- message: "Parameter Validation warrnings for getCatalogConfiguration",
2555
+ message: `Parameter Validation warrnings for platform > Catalog > getCatalogConfiguration \n ${warrning}`,
2276
2556
  });
2277
- Logger({ level: "WARN", message: warrning });
2278
2557
  }
2279
2558
 
2280
2559
  const query_params = {};
@@ -2284,36 +2563,51 @@ class Catalog {
2284
2563
  "get",
2285
2564
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/metadata/`,
2286
2565
  query_params,
2287
- undefined
2566
+ undefined,
2567
+ requestHeaders,
2568
+ { responseHeaders }
2288
2569
  );
2289
2570
 
2571
+ let responseData = response;
2572
+ if (responseHeaders) {
2573
+ responseData = response[0];
2574
+ }
2575
+
2290
2576
  const {
2291
2577
  error: res_error,
2292
- } = CatalogModel.GetCatalogConfigurationMetaData().validate(response, {
2293
- abortEarly: false,
2294
- allowUnknown: false,
2295
- });
2578
+ } = CatalogPlatformModel.GetCatalogConfigurationMetaData().validate(
2579
+ responseData,
2580
+ { abortEarly: false, allowUnknown: false }
2581
+ );
2296
2582
 
2297
2583
  if (res_error) {
2298
2584
  Logger({
2299
2585
  level: "WARN",
2300
- message: "Response Validation Warnnings for getCatalogConfiguration",
2586
+ message: `Response Validation Warnnings for platform > Catalog > getCatalogConfiguration \n ${res_error}`,
2301
2587
  });
2302
- Logger({ level: "WARN", message: res_error });
2303
2588
  }
2304
2589
 
2305
2590
  return response;
2306
2591
  }
2307
2592
 
2308
2593
  /**
2309
- * @param {Object} arg - Arg object.
2310
- * @param {string} [arg.brand] - Brand slug
2311
- * @returns {Promise<CatalogInsightResponse>} - Success response
2594
+ * @param {CatalogPlatformApplicationValidator.GetCatalogInsightsParam} arg
2595
+ * - Arg object
2596
+ *
2597
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2598
+ * @param {import("../PlatformAPIClient").Options} - Options
2599
+ * @returns {Promise<CatalogPlatformModel.CatalogInsightResponse>} - Success response
2600
+ * @name getCatalogInsights
2312
2601
  * @summary: Analytics data of catalog and inventory.
2313
- * @description: Catalog Insights api returns the count of catalog related data like products, brands, departments and categories that have been made live as per configuration of the app.
2602
+ * @description: Catalog Insights api returns the count of catalog related data like products, brands, departments and categories that have been made live as per configuration of the app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCatalogInsights/).
2314
2603
  */
2315
- async getCatalogInsights({ brand } = {}) {
2316
- const { error } = CatalogValidator.getCatalogInsights().validate(
2604
+ async getCatalogInsights(
2605
+ { brand, requestHeaders } = { requestHeaders: {} },
2606
+ { responseHeaders } = { responseHeaders: false }
2607
+ ) {
2608
+ const {
2609
+ error,
2610
+ } = CatalogPlatformApplicationValidator.getCatalogInsights().validate(
2317
2611
  {
2318
2612
  brand,
2319
2613
  },
@@ -2324,7 +2618,9 @@ class Catalog {
2324
2618
  }
2325
2619
 
2326
2620
  // Showing warrnings if extra unknown parameters are found
2327
- const { error: warrning } = CatalogValidator.getCatalogInsights().validate(
2621
+ const {
2622
+ error: warrning,
2623
+ } = CatalogPlatformApplicationValidator.getCatalogInsights().validate(
2328
2624
  {
2329
2625
  brand,
2330
2626
  },
@@ -2333,9 +2629,8 @@ class Catalog {
2333
2629
  if (warrning) {
2334
2630
  Logger({
2335
2631
  level: "WARN",
2336
- message: "Parameter Validation warrnings for getCatalogInsights",
2632
+ message: `Parameter Validation warrnings for platform > Catalog > getCatalogInsights \n ${warrning}`,
2337
2633
  });
2338
- Logger({ level: "WARN", message: warrning });
2339
2634
  }
2340
2635
 
2341
2636
  const query_params = {};
@@ -2346,12 +2641,19 @@ class Catalog {
2346
2641
  "get",
2347
2642
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/analytics/insights/`,
2348
2643
  query_params,
2349
- undefined
2644
+ undefined,
2645
+ requestHeaders,
2646
+ { responseHeaders }
2350
2647
  );
2351
2648
 
2649
+ let responseData = response;
2650
+ if (responseHeaders) {
2651
+ responseData = response[0];
2652
+ }
2653
+
2352
2654
  const {
2353
2655
  error: res_error,
2354
- } = CatalogModel.CatalogInsightResponse().validate(response, {
2656
+ } = CatalogPlatformModel.CatalogInsightResponse().validate(responseData, {
2355
2657
  abortEarly: false,
2356
2658
  allowUnknown: false,
2357
2659
  });
@@ -2359,26 +2661,29 @@ class Catalog {
2359
2661
  if (res_error) {
2360
2662
  Logger({
2361
2663
  level: "WARN",
2362
- message: "Response Validation Warnnings for getCatalogInsights",
2664
+ message: `Response Validation Warnnings for platform > Catalog > getCatalogInsights \n ${res_error}`,
2363
2665
  });
2364
- Logger({ level: "WARN", message: res_error });
2365
2666
  }
2366
2667
 
2367
2668
  return response;
2368
2669
  }
2369
2670
 
2370
2671
  /**
2371
- * @param {Object} arg - Arg object.
2372
- * @param {string} [arg.department] - The name of the department. Use this
2373
- * parameter to filter products by a particular department. See below the
2374
- * list of available departments. You can retrieve available departments
2375
- * from the **v1.0/departments/** API
2376
- * @returns {Promise<CategoryListingResponse>} - Success response
2672
+ * @param {CatalogPlatformApplicationValidator.GetCategoriesParam} arg - Arg object
2673
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2674
+ * @param {import("../PlatformAPIClient").Options} - Options
2675
+ * @returns {Promise<CatalogPlatformModel.CategoryListingResponse>} - Success response
2676
+ * @name getCategories
2377
2677
  * @summary: List all the categories
2378
- * @description: List all the categories. You can optionally pass filter the brands by the department. If successful, returns a paginated list of brands specified in `CategoryListingResponse`
2678
+ * @description: List all the categories. You can optionally pass filter the brands by the department. If successful, returns a paginated list of brands specified in `CategoryListingResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCategories/).
2379
2679
  */
2380
- async getCategories({ department } = {}) {
2381
- const { error } = CatalogValidator.getCategories().validate(
2680
+ async getCategories(
2681
+ { department, requestHeaders } = { requestHeaders: {} },
2682
+ { responseHeaders } = { responseHeaders: false }
2683
+ ) {
2684
+ const {
2685
+ error,
2686
+ } = CatalogPlatformApplicationValidator.getCategories().validate(
2382
2687
  {
2383
2688
  department,
2384
2689
  },
@@ -2389,7 +2694,9 @@ class Catalog {
2389
2694
  }
2390
2695
 
2391
2696
  // Showing warrnings if extra unknown parameters are found
2392
- const { error: warrning } = CatalogValidator.getCategories().validate(
2697
+ const {
2698
+ error: warrning,
2699
+ } = CatalogPlatformApplicationValidator.getCategories().validate(
2393
2700
  {
2394
2701
  department,
2395
2702
  },
@@ -2398,9 +2705,8 @@ class Catalog {
2398
2705
  if (warrning) {
2399
2706
  Logger({
2400
2707
  level: "WARN",
2401
- message: "Parameter Validation warrnings for getCategories",
2708
+ message: `Parameter Validation warrnings for platform > Catalog > getCategories \n ${warrning}`,
2402
2709
  });
2403
- Logger({ level: "WARN", message: warrning });
2404
2710
  }
2405
2711
 
2406
2712
  const query_params = {};
@@ -2411,12 +2717,19 @@ class Catalog {
2411
2717
  "get",
2412
2718
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/categories`,
2413
2719
  query_params,
2414
- undefined
2720
+ undefined,
2721
+ requestHeaders,
2722
+ { responseHeaders }
2415
2723
  );
2416
2724
 
2725
+ let responseData = response;
2726
+ if (responseHeaders) {
2727
+ responseData = response[0];
2728
+ }
2729
+
2417
2730
  const {
2418
2731
  error: res_error,
2419
- } = CatalogModel.CategoryListingResponse().validate(response, {
2732
+ } = CatalogPlatformModel.CategoryListingResponse().validate(responseData, {
2420
2733
  abortEarly: false,
2421
2734
  allowUnknown: false,
2422
2735
  });
@@ -2424,25 +2737,32 @@ class Catalog {
2424
2737
  if (res_error) {
2425
2738
  Logger({
2426
2739
  level: "WARN",
2427
- message: "Response Validation Warnnings for getCategories",
2740
+ message: `Response Validation Warnnings for platform > Catalog > getCategories \n ${res_error}`,
2428
2741
  });
2429
- Logger({ level: "WARN", message: res_error });
2430
2742
  }
2431
2743
 
2432
2744
  return response;
2433
2745
  }
2434
2746
 
2435
2747
  /**
2436
- * @param {Object} arg - Arg object.
2437
- * @param {string} arg.slug - A `slug` is a human readable, URL friendly
2438
- * unique identifier of an object. Pass the `slug` of the collection which
2439
- * you want to retrieve.
2440
- * @returns {Promise<CollectionDetailResponse>} - Success response
2748
+ * @param {CatalogPlatformApplicationValidator.GetCollectionDetailParam} arg
2749
+ * - Arg object
2750
+ *
2751
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2752
+ * @param {import("../PlatformAPIClient").Options} - Options
2753
+ * @returns {Promise<CatalogPlatformModel.CollectionDetailResponse>} -
2754
+ * Success response
2755
+ * @name getCollectionDetail
2441
2756
  * @summary: Get a particular collection
2442
- * @description: Get the details of a collection by its `slug`. If successful, returns a Collection resource in the response body specified in `CollectionDetailResponse`
2757
+ * @description: Get the details of a collection by its `slug`. If successful, returns a Collection resource in the response body specified in `CollectionDetailResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCollectionDetail/).
2443
2758
  */
2444
- async getCollectionDetail({ slug } = {}) {
2445
- const { error } = CatalogValidator.getCollectionDetail().validate(
2759
+ async getCollectionDetail(
2760
+ { slug, requestHeaders } = { requestHeaders: {} },
2761
+ { responseHeaders } = { responseHeaders: false }
2762
+ ) {
2763
+ const {
2764
+ error,
2765
+ } = CatalogPlatformApplicationValidator.getCollectionDetail().validate(
2446
2766
  {
2447
2767
  slug,
2448
2768
  },
@@ -2453,7 +2773,9 @@ class Catalog {
2453
2773
  }
2454
2774
 
2455
2775
  // Showing warrnings if extra unknown parameters are found
2456
- const { error: warrning } = CatalogValidator.getCollectionDetail().validate(
2776
+ const {
2777
+ error: warrning,
2778
+ } = CatalogPlatformApplicationValidator.getCollectionDetail().validate(
2457
2779
  {
2458
2780
  slug,
2459
2781
  },
@@ -2462,9 +2784,8 @@ class Catalog {
2462
2784
  if (warrning) {
2463
2785
  Logger({
2464
2786
  level: "WARN",
2465
- message: "Parameter Validation warrnings for getCollectionDetail",
2787
+ message: `Parameter Validation warrnings for platform > Catalog > getCollectionDetail \n ${warrning}`,
2466
2788
  });
2467
- Logger({ level: "WARN", message: warrning });
2468
2789
  }
2469
2790
 
2470
2791
  const query_params = {};
@@ -2474,12 +2795,19 @@ class Catalog {
2474
2795
  "get",
2475
2796
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${slug}/`,
2476
2797
  query_params,
2477
- undefined
2798
+ undefined,
2799
+ requestHeaders,
2800
+ { responseHeaders }
2478
2801
  );
2479
2802
 
2803
+ let responseData = response;
2804
+ if (responseHeaders) {
2805
+ responseData = response[0];
2806
+ }
2807
+
2480
2808
  const {
2481
2809
  error: res_error,
2482
- } = CatalogModel.CollectionDetailResponse().validate(response, {
2810
+ } = CatalogPlatformModel.CollectionDetailResponse().validate(responseData, {
2483
2811
  abortEarly: false,
2484
2812
  allowUnknown: false,
2485
2813
  });
@@ -2487,29 +2815,32 @@ class Catalog {
2487
2815
  if (res_error) {
2488
2816
  Logger({
2489
2817
  level: "WARN",
2490
- message: "Response Validation Warnnings for getCollectionDetail",
2818
+ message: `Response Validation Warnnings for platform > Catalog > getCollectionDetail \n ${res_error}`,
2491
2819
  });
2492
- Logger({ level: "WARN", message: res_error });
2493
2820
  }
2494
2821
 
2495
2822
  return response;
2496
2823
  }
2497
2824
 
2498
2825
  /**
2499
- * @param {Object} arg - Arg object.
2500
- * @param {string} arg.id - A `id` is a unique identifier of a collection.
2501
- * @param {string} [arg.sortOn] - Each response will contain sort_on param,
2502
- * which should be sent back to make pagination work.
2503
- * @param {string} [arg.pageId] - Each response will contain next_id param,
2504
- * which should be sent back to make pagination work.
2505
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
2506
- * page. Default is 12.
2507
- * @returns {Promise<GetCollectionItemsResponse>} - Success response
2826
+ * @param {CatalogPlatformApplicationValidator.GetCollectionItemsParam} arg
2827
+ * - Arg object
2828
+ *
2829
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2830
+ * @param {import("../PlatformAPIClient").Options} - Options
2831
+ * @returns {Promise<CatalogPlatformModel.GetCollectionItemsResponse>} -
2832
+ * Success response
2833
+ * @name getCollectionItems
2508
2834
  * @summary: Get the items for a collection
2509
- * @description: Get items from a collection specified by its `id`.
2835
+ * @description: Get items from a collection specified by its `id`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCollectionItems/).
2510
2836
  */
2511
- async getCollectionItems({ id, sortOn, pageId, pageSize } = {}) {
2512
- const { error } = CatalogValidator.getCollectionItems().validate(
2837
+ async getCollectionItems(
2838
+ { id, sortOn, pageId, pageSize, requestHeaders } = { requestHeaders: {} },
2839
+ { responseHeaders } = { responseHeaders: false }
2840
+ ) {
2841
+ const {
2842
+ error,
2843
+ } = CatalogPlatformApplicationValidator.getCollectionItems().validate(
2513
2844
  {
2514
2845
  id,
2515
2846
  sortOn,
@@ -2523,7 +2854,9 @@ class Catalog {
2523
2854
  }
2524
2855
 
2525
2856
  // Showing warrnings if extra unknown parameters are found
2526
- const { error: warrning } = CatalogValidator.getCollectionItems().validate(
2857
+ const {
2858
+ error: warrning,
2859
+ } = CatalogPlatformApplicationValidator.getCollectionItems().validate(
2527
2860
  {
2528
2861
  id,
2529
2862
  sortOn,
@@ -2535,9 +2868,8 @@ class Catalog {
2535
2868
  if (warrning) {
2536
2869
  Logger({
2537
2870
  level: "WARN",
2538
- message: "Parameter Validation warrnings for getCollectionItems",
2871
+ message: `Parameter Validation warrnings for platform > Catalog > getCollectionItems \n ${warrning}`,
2539
2872
  });
2540
- Logger({ level: "WARN", message: warrning });
2541
2873
  }
2542
2874
 
2543
2875
  const query_params = {};
@@ -2550,36 +2882,53 @@ class Catalog {
2550
2882
  "get",
2551
2883
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/items/`,
2552
2884
  query_params,
2553
- undefined
2885
+ undefined,
2886
+ requestHeaders,
2887
+ { responseHeaders }
2554
2888
  );
2555
2889
 
2890
+ let responseData = response;
2891
+ if (responseHeaders) {
2892
+ responseData = response[0];
2893
+ }
2894
+
2556
2895
  const {
2557
2896
  error: res_error,
2558
- } = CatalogModel.GetCollectionItemsResponse().validate(response, {
2559
- abortEarly: false,
2560
- allowUnknown: false,
2561
- });
2897
+ } = CatalogPlatformModel.GetCollectionItemsResponse().validate(
2898
+ responseData,
2899
+ { abortEarly: false, allowUnknown: false }
2900
+ );
2562
2901
 
2563
2902
  if (res_error) {
2564
2903
  Logger({
2565
2904
  level: "WARN",
2566
- message: "Response Validation Warnnings for getCollectionItems",
2905
+ message: `Response Validation Warnnings for platform > Catalog > getCollectionItems \n ${res_error}`,
2567
2906
  });
2568
- Logger({ level: "WARN", message: res_error });
2569
2907
  }
2570
2908
 
2571
2909
  return response;
2572
2910
  }
2573
2911
 
2574
2912
  /**
2575
- * @param {Object} arg - Arg object.
2576
- * @param {string} arg.type - Type can be brands, categories etc.
2577
- * @returns {Promise<GetAppCatalogEntityConfiguration>} - Success response
2913
+ * @param {CatalogPlatformApplicationValidator.GetConfigurationByTypeParam} arg
2914
+ * - Arg object
2915
+ *
2916
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2917
+ * @param {import("../PlatformAPIClient").Options} - Options
2918
+ * @returns {Promise<CatalogPlatformModel.GetAppCatalogEntityConfiguration>}
2919
+ * - Success response
2920
+ *
2921
+ * @name getConfigurationByType
2578
2922
  * @summary: Get configured details for catalog
2579
- * @description: configured details for catalog.
2923
+ * @description: configured details for catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getConfigurationByType/).
2580
2924
  */
2581
- async getConfigurationByType({ type } = {}) {
2582
- const { error } = CatalogValidator.getConfigurationByType().validate(
2925
+ async getConfigurationByType(
2926
+ { type, requestHeaders } = { requestHeaders: {} },
2927
+ { responseHeaders } = { responseHeaders: false }
2928
+ ) {
2929
+ const {
2930
+ error,
2931
+ } = CatalogPlatformApplicationValidator.getConfigurationByType().validate(
2583
2932
  {
2584
2933
  type,
2585
2934
  },
@@ -2592,7 +2941,7 @@ class Catalog {
2592
2941
  // Showing warrnings if extra unknown parameters are found
2593
2942
  const {
2594
2943
  error: warrning,
2595
- } = CatalogValidator.getConfigurationByType().validate(
2944
+ } = CatalogPlatformApplicationValidator.getConfigurationByType().validate(
2596
2945
  {
2597
2946
  type,
2598
2947
  },
@@ -2601,9 +2950,8 @@ class Catalog {
2601
2950
  if (warrning) {
2602
2951
  Logger({
2603
2952
  level: "WARN",
2604
- message: "Parameter Validation warrnings for getConfigurationByType",
2953
+ message: `Parameter Validation warrnings for platform > Catalog > getConfigurationByType \n ${warrning}`,
2605
2954
  });
2606
- Logger({ level: "WARN", message: warrning });
2607
2955
  }
2608
2956
 
2609
2957
  const query_params = {};
@@ -2613,39 +2961,52 @@ class Catalog {
2613
2961
  "get",
2614
2962
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${type}/`,
2615
2963
  query_params,
2616
- undefined
2964
+ undefined,
2965
+ requestHeaders,
2966
+ { responseHeaders }
2617
2967
  );
2618
2968
 
2969
+ let responseData = response;
2970
+ if (responseHeaders) {
2971
+ responseData = response[0];
2972
+ }
2973
+
2619
2974
  const {
2620
2975
  error: res_error,
2621
- } = CatalogModel.GetAppCatalogEntityConfiguration().validate(response, {
2622
- abortEarly: false,
2623
- allowUnknown: false,
2624
- });
2976
+ } = CatalogPlatformModel.GetAppCatalogEntityConfiguration().validate(
2977
+ responseData,
2978
+ { abortEarly: false, allowUnknown: false }
2979
+ );
2625
2980
 
2626
2981
  if (res_error) {
2627
2982
  Logger({
2628
2983
  level: "WARN",
2629
- message: "Response Validation Warnnings for getConfigurationByType",
2984
+ message: `Response Validation Warnnings for platform > Catalog > getConfigurationByType \n ${res_error}`,
2630
2985
  });
2631
- Logger({ level: "WARN", message: res_error });
2632
2986
  }
2633
2987
 
2634
2988
  return response;
2635
2989
  }
2636
2990
 
2637
2991
  /**
2638
- * @param {Object} arg - Arg object.
2639
- * @param {string} arg.configType - A `config_type` is an identifier that
2640
- * defines a specific type of configuration.
2641
- * @param {string} [arg.templateSlug] - Get configuration list filtered by
2642
- * `template_slug` string. This is for the details and comparision groups.
2643
- * @returns {Promise<GetConfigMetadataResponse>} - Success response
2992
+ * @param {CatalogPlatformApplicationValidator.GetConfigurationMetadataParam} arg
2993
+ * - Arg object
2994
+ *
2995
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2996
+ * @param {import("../PlatformAPIClient").Options} - Options
2997
+ * @returns {Promise<CatalogPlatformModel.GetConfigMetadataResponse>} -
2998
+ * Success response
2999
+ * @name getConfigurationMetadata
2644
3000
  * @summary: Get configuration metadata details for catalog for admin panel
2645
- * @description: Get the configuraion metadata details for catalog.
3001
+ * @description: Get the configuraion metadata details for catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getConfigurationMetadata/).
2646
3002
  */
2647
- async getConfigurationMetadata({ configType, templateSlug } = {}) {
2648
- const { error } = CatalogValidator.getConfigurationMetadata().validate(
3003
+ async getConfigurationMetadata(
3004
+ { configType, templateSlug, requestHeaders } = { requestHeaders: {} },
3005
+ { responseHeaders } = { responseHeaders: false }
3006
+ ) {
3007
+ const {
3008
+ error,
3009
+ } = CatalogPlatformApplicationValidator.getConfigurationMetadata().validate(
2649
3010
  {
2650
3011
  configType,
2651
3012
  templateSlug,
@@ -2659,7 +3020,7 @@ class Catalog {
2659
3020
  // Showing warrnings if extra unknown parameters are found
2660
3021
  const {
2661
3022
  error: warrning,
2662
- } = CatalogValidator.getConfigurationMetadata().validate(
3023
+ } = CatalogPlatformApplicationValidator.getConfigurationMetadata().validate(
2663
3024
  {
2664
3025
  configType,
2665
3026
  templateSlug,
@@ -2669,9 +3030,8 @@ class Catalog {
2669
3030
  if (warrning) {
2670
3031
  Logger({
2671
3032
  level: "WARN",
2672
- message: "Parameter Validation warrnings for getConfigurationMetadata",
3033
+ message: `Parameter Validation warrnings for platform > Catalog > getConfigurationMetadata \n ${warrning}`,
2673
3034
  });
2674
- Logger({ level: "WARN", message: warrning });
2675
3035
  }
2676
3036
 
2677
3037
  const query_params = {};
@@ -2682,35 +3042,52 @@ class Catalog {
2682
3042
  "get",
2683
3043
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/metadata/`,
2684
3044
  query_params,
2685
- undefined
3045
+ undefined,
3046
+ requestHeaders,
3047
+ { responseHeaders }
2686
3048
  );
2687
3049
 
3050
+ let responseData = response;
3051
+ if (responseHeaders) {
3052
+ responseData = response[0];
3053
+ }
3054
+
2688
3055
  const {
2689
3056
  error: res_error,
2690
- } = CatalogModel.GetConfigMetadataResponse().validate(response, {
2691
- abortEarly: false,
2692
- allowUnknown: false,
2693
- });
3057
+ } = CatalogPlatformModel.GetConfigMetadataResponse().validate(
3058
+ responseData,
3059
+ { abortEarly: false, allowUnknown: false }
3060
+ );
2694
3061
 
2695
3062
  if (res_error) {
2696
3063
  Logger({
2697
3064
  level: "WARN",
2698
- message: "Response Validation Warnnings for getConfigurationMetadata",
3065
+ message: `Response Validation Warnnings for platform > Catalog > getConfigurationMetadata \n ${res_error}`,
2699
3066
  });
2700
- Logger({ level: "WARN", message: res_error });
2701
3067
  }
2702
3068
 
2703
3069
  return response;
2704
3070
  }
2705
3071
 
2706
3072
  /**
2707
- * @param {Object} arg - Arg object.
2708
- * @returns {Promise<GetAppCatalogConfiguration>} - Success response
3073
+ * @param {CatalogPlatformApplicationValidator.GetConfigurationsParam} arg
3074
+ * - Arg object
3075
+ *
3076
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3077
+ * @param {import("../PlatformAPIClient").Options} - Options
3078
+ * @returns {Promise<CatalogPlatformModel.GetAppCatalogConfiguration>} -
3079
+ * Success response
3080
+ * @name getConfigurations
2709
3081
  * @summary: Get configured details for catalog
2710
- * @description: configured details for catalog.
3082
+ * @description: configured details for catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getConfigurations/).
2711
3083
  */
2712
- async getConfigurations({} = {}) {
2713
- const { error } = CatalogValidator.getConfigurations().validate(
3084
+ async getConfigurations(
3085
+ { requestHeaders } = { requestHeaders: {} },
3086
+ { responseHeaders } = { responseHeaders: false }
3087
+ ) {
3088
+ const {
3089
+ error,
3090
+ } = CatalogPlatformApplicationValidator.getConfigurations().validate(
2714
3091
  {},
2715
3092
  { abortEarly: false, allowUnknown: true }
2716
3093
  );
@@ -2719,16 +3096,17 @@ class Catalog {
2719
3096
  }
2720
3097
 
2721
3098
  // Showing warrnings if extra unknown parameters are found
2722
- const { error: warrning } = CatalogValidator.getConfigurations().validate(
3099
+ const {
3100
+ error: warrning,
3101
+ } = CatalogPlatformApplicationValidator.getConfigurations().validate(
2723
3102
  {},
2724
3103
  { abortEarly: false, allowUnknown: false }
2725
3104
  );
2726
3105
  if (warrning) {
2727
3106
  Logger({
2728
3107
  level: "WARN",
2729
- message: "Parameter Validation warrnings for getConfigurations",
3108
+ message: `Parameter Validation warrnings for platform > Catalog > getConfigurations \n ${warrning}`,
2730
3109
  });
2731
- Logger({ level: "WARN", message: warrning });
2732
3110
  }
2733
3111
 
2734
3112
  const query_params = {};
@@ -2738,35 +3116,49 @@ class Catalog {
2738
3116
  "get",
2739
3117
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/`,
2740
3118
  query_params,
2741
- undefined
3119
+ undefined,
3120
+ requestHeaders,
3121
+ { responseHeaders }
2742
3122
  );
2743
3123
 
3124
+ let responseData = response;
3125
+ if (responseHeaders) {
3126
+ responseData = response[0];
3127
+ }
3128
+
2744
3129
  const {
2745
3130
  error: res_error,
2746
- } = CatalogModel.GetAppCatalogConfiguration().validate(response, {
2747
- abortEarly: false,
2748
- allowUnknown: false,
2749
- });
3131
+ } = CatalogPlatformModel.GetAppCatalogConfiguration().validate(
3132
+ responseData,
3133
+ { abortEarly: false, allowUnknown: false }
3134
+ );
2750
3135
 
2751
3136
  if (res_error) {
2752
3137
  Logger({
2753
3138
  level: "WARN",
2754
- message: "Response Validation Warnnings for getConfigurations",
3139
+ message: `Response Validation Warnnings for platform > Catalog > getConfigurations \n ${res_error}`,
2755
3140
  });
2756
- Logger({ level: "WARN", message: res_error });
2757
3141
  }
2758
3142
 
2759
3143
  return response;
2760
3144
  }
2761
3145
 
2762
3146
  /**
2763
- * @param {Object} arg - Arg object.
2764
- * @returns {Promise<DepartmentResponse>} - Success response
3147
+ * @param {CatalogPlatformApplicationValidator.GetDepartmentsParam} arg - Arg object
3148
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3149
+ * @param {import("../PlatformAPIClient").Options} - Options
3150
+ * @returns {Promise<CatalogPlatformModel.DepartmentResponse>} - Success response
3151
+ * @name getDepartments
2765
3152
  * @summary: List all the departments
2766
- * @description: Departments are a way to categorise similar products. A product can lie in multiple departments. For example, a skirt can below to the 'Women's Fashion' Department while a handbag can lie in 'Women's Accessories' Department. Use this API to list all the departments. If successful, returns the list of departments specified in `DepartmentResponse`
3153
+ * @description: Departments are a way to categorise similar products. A product can lie in multiple departments. For example, a skirt can below to the 'Women's Fashion' Department while a handbag can lie in 'Women's Accessories' Department. Use this API to list all the departments. If successful, returns the list of departments specified in `DepartmentResponse` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDepartments/).
2767
3154
  */
2768
- async getDepartments({} = {}) {
2769
- const { error } = CatalogValidator.getDepartments().validate(
3155
+ async getDepartments(
3156
+ { requestHeaders } = { requestHeaders: {} },
3157
+ { responseHeaders } = { responseHeaders: false }
3158
+ ) {
3159
+ const {
3160
+ error,
3161
+ } = CatalogPlatformApplicationValidator.getDepartments().validate(
2770
3162
  {},
2771
3163
  { abortEarly: false, allowUnknown: true }
2772
3164
  );
@@ -2775,16 +3167,17 @@ class Catalog {
2775
3167
  }
2776
3168
 
2777
3169
  // Showing warrnings if extra unknown parameters are found
2778
- const { error: warrning } = CatalogValidator.getDepartments().validate(
3170
+ const {
3171
+ error: warrning,
3172
+ } = CatalogPlatformApplicationValidator.getDepartments().validate(
2779
3173
  {},
2780
3174
  { abortEarly: false, allowUnknown: false }
2781
3175
  );
2782
3176
  if (warrning) {
2783
3177
  Logger({
2784
3178
  level: "WARN",
2785
- message: "Parameter Validation warrnings for getDepartments",
3179
+ message: `Parameter Validation warrnings for platform > Catalog > getDepartments \n ${warrning}`,
2786
3180
  });
2787
- Logger({ level: "WARN", message: warrning });
2788
3181
  }
2789
3182
 
2790
3183
  const query_params = {};
@@ -2794,12 +3187,19 @@ class Catalog {
2794
3187
  "get",
2795
3188
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/departments`,
2796
3189
  query_params,
2797
- undefined
3190
+ undefined,
3191
+ requestHeaders,
3192
+ { responseHeaders }
2798
3193
  );
2799
3194
 
3195
+ let responseData = response;
3196
+ if (responseHeaders) {
3197
+ responseData = response[0];
3198
+ }
3199
+
2800
3200
  const {
2801
3201
  error: res_error,
2802
- } = CatalogModel.DepartmentResponse().validate(response, {
3202
+ } = CatalogPlatformModel.DepartmentResponse().validate(responseData, {
2803
3203
  abortEarly: false,
2804
3204
  allowUnknown: false,
2805
3205
  });
@@ -2807,40 +3207,41 @@ class Catalog {
2807
3207
  if (res_error) {
2808
3208
  Logger({
2809
3209
  level: "WARN",
2810
- message: "Response Validation Warnnings for getDepartments",
3210
+ message: `Response Validation Warnnings for platform > Catalog > getDepartments \n ${res_error}`,
2811
3211
  });
2812
- Logger({ level: "WARN", message: res_error });
2813
3212
  }
2814
3213
 
2815
3214
  return response;
2816
3215
  }
2817
3216
 
2818
3217
  /**
2819
- * @param {Object} arg - Arg object.
2820
- * @param {number} arg.itemId - Item code of the product of which size is to be get.
2821
- * @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier
2822
- * or Primary Identifier) of which inventory is to get.
2823
- * @param {number} [arg.pageNo] - The page number to navigate through the
2824
- * given set of results
2825
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
2826
- * page. Default is 12.
2827
- * @param {string} [arg.q] - Search with help of store code.
2828
- * @param {number[]} [arg.locationIds] - Search by store ids.
2829
- * @returns {Promise<InventorySellerIdentifierResponsePaginated>} - Success response
3218
+ * @param {CatalogPlatformApplicationValidator.GetDiscountedInventoryBySizeIdentifierParam} arg
3219
+ * - Arg object
3220
+ *
3221
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3222
+ * @param {import("../PlatformAPIClient").Options} - Options
3223
+ * @returns {Promise<CatalogPlatformModel.InventorySellerIdentifierResponsePaginated>}
3224
+ * - Success response
3225
+ *
3226
+ * @name getDiscountedInventoryBySizeIdentifier
2830
3227
  * @summary: Get Inventory for company
2831
- * @description: This API allows get Inventory data for particular company grouped by size and store.
3228
+ * @description: This API allows get Inventory data for particular company grouped by size and store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDiscountedInventoryBySizeIdentifier/).
2832
3229
  */
2833
- async getDiscountedInventoryBySizeIdentifier({
2834
- itemId,
2835
- sizeIdentifier,
2836
- pageNo,
2837
- pageSize,
2838
- q,
2839
- locationIds,
2840
- } = {}) {
3230
+ async getDiscountedInventoryBySizeIdentifier(
3231
+ {
3232
+ itemId,
3233
+ sizeIdentifier,
3234
+ pageNo,
3235
+ pageSize,
3236
+ q,
3237
+ locationIds,
3238
+ requestHeaders,
3239
+ } = { requestHeaders: {} },
3240
+ { responseHeaders } = { responseHeaders: false }
3241
+ ) {
2841
3242
  const {
2842
3243
  error,
2843
- } = CatalogValidator.getDiscountedInventoryBySizeIdentifier().validate(
3244
+ } = CatalogPlatformApplicationValidator.getDiscountedInventoryBySizeIdentifier().validate(
2844
3245
  {
2845
3246
  itemId,
2846
3247
  sizeIdentifier,
@@ -2858,7 +3259,7 @@ class Catalog {
2858
3259
  // Showing warrnings if extra unknown parameters are found
2859
3260
  const {
2860
3261
  error: warrning,
2861
- } = CatalogValidator.getDiscountedInventoryBySizeIdentifier().validate(
3262
+ } = CatalogPlatformApplicationValidator.getDiscountedInventoryBySizeIdentifier().validate(
2862
3263
  {
2863
3264
  itemId,
2864
3265
  sizeIdentifier,
@@ -2872,10 +3273,8 @@ class Catalog {
2872
3273
  if (warrning) {
2873
3274
  Logger({
2874
3275
  level: "WARN",
2875
- message:
2876
- "Parameter Validation warrnings for getDiscountedInventoryBySizeIdentifier",
3276
+ message: `Parameter Validation warrnings for platform > Catalog > getDiscountedInventoryBySizeIdentifier \n ${warrning}`,
2877
3277
  });
2878
- Logger({ level: "WARN", message: warrning });
2879
3278
  }
2880
3279
 
2881
3280
  const query_params = {};
@@ -2889,51 +3288,53 @@ class Catalog {
2889
3288
  "get",
2890
3289
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products/${itemId}/inventory/${sizeIdentifier}`,
2891
3290
  query_params,
2892
- undefined
3291
+ undefined,
3292
+ requestHeaders,
3293
+ { responseHeaders }
2893
3294
  );
2894
3295
 
3296
+ let responseData = response;
3297
+ if (responseHeaders) {
3298
+ responseData = response[0];
3299
+ }
3300
+
2895
3301
  const {
2896
3302
  error: res_error,
2897
- } = CatalogModel.InventorySellerIdentifierResponsePaginated().validate(
2898
- response,
3303
+ } = CatalogPlatformModel.InventorySellerIdentifierResponsePaginated().validate(
3304
+ responseData,
2899
3305
  { abortEarly: false, allowUnknown: false }
2900
3306
  );
2901
3307
 
2902
3308
  if (res_error) {
2903
3309
  Logger({
2904
3310
  level: "WARN",
2905
- message:
2906
- "Response Validation Warnnings for getDiscountedInventoryBySizeIdentifier",
3311
+ message: `Response Validation Warnnings for platform > Catalog > getDiscountedInventoryBySizeIdentifier \n ${res_error}`,
2907
3312
  });
2908
- Logger({ level: "WARN", message: res_error });
2909
3313
  }
2910
3314
 
2911
3315
  return response;
2912
3316
  }
2913
3317
 
2914
3318
  /**
2915
- * @param {Object} arg - Arg object.
2916
- * @param {string} arg.configType - A `config_type` is an identifier that
2917
- * defines a specific type of configuration.
2918
- * @param {number} [arg.pageNo] - The page number to navigate through the
2919
- * given set of results.
2920
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
2921
- * page. Default is 12.
2922
- * @param {string} [arg.search] - Get configuration list filtered by `search` string.
2923
- * @param {string} [arg.templateSlug] - Get configuration list filtered by
2924
- * `template_slug` string. This is for the details and comparision groups.
2925
- * @returns {Promise<GetConfigResponse>} - Success response
3319
+ * @param {CatalogPlatformApplicationValidator.GetGroupConfigurationsParam} arg
3320
+ * - Arg object
3321
+ *
3322
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3323
+ * @param {import("../PlatformAPIClient").Options} - Options
3324
+ * @returns {Promise<CatalogPlatformModel.GetConfigResponse>} - Success response
3325
+ * @name getGroupConfigurations
2926
3326
  * @summary: Get the details of the application configured configurations of group config types.
2927
- * @description: Get the details of the application configured configurations of group config types.
3327
+ * @description: Get the details of the application configured configurations of group config types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getGroupConfigurations/).
2928
3328
  */
2929
- async getGroupConfigurations({
2930
- configType,
2931
- pageNo,
2932
- pageSize,
2933
- search,
2934
- templateSlug,
2935
- } = {}) {
2936
- const { error } = CatalogValidator.getGroupConfigurations().validate(
3329
+ async getGroupConfigurations(
3330
+ { configType, pageNo, pageSize, search, templateSlug, requestHeaders } = {
3331
+ requestHeaders: {},
3332
+ },
3333
+ { responseHeaders } = { responseHeaders: false }
3334
+ ) {
3335
+ const {
3336
+ error,
3337
+ } = CatalogPlatformApplicationValidator.getGroupConfigurations().validate(
2937
3338
  {
2938
3339
  configType,
2939
3340
  pageNo,
@@ -2950,7 +3351,7 @@ class Catalog {
2950
3351
  // Showing warrnings if extra unknown parameters are found
2951
3352
  const {
2952
3353
  error: warrning,
2953
- } = CatalogValidator.getGroupConfigurations().validate(
3354
+ } = CatalogPlatformApplicationValidator.getGroupConfigurations().validate(
2954
3355
  {
2955
3356
  configType,
2956
3357
  pageNo,
@@ -2963,9 +3364,8 @@ class Catalog {
2963
3364
  if (warrning) {
2964
3365
  Logger({
2965
3366
  level: "WARN",
2966
- message: "Parameter Validation warrnings for getGroupConfigurations",
3367
+ message: `Parameter Validation warrnings for platform > Catalog > getGroupConfigurations \n ${warrning}`,
2967
3368
  });
2968
- Logger({ level: "WARN", message: warrning });
2969
3369
  }
2970
3370
 
2971
3371
  const query_params = {};
@@ -2979,12 +3379,19 @@ class Catalog {
2979
3379
  "get",
2980
3380
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups`,
2981
3381
  query_params,
2982
- undefined
3382
+ undefined,
3383
+ requestHeaders,
3384
+ { responseHeaders }
2983
3385
  );
2984
3386
 
3387
+ let responseData = response;
3388
+ if (responseHeaders) {
3389
+ responseData = response[0];
3390
+ }
3391
+
2985
3392
  const {
2986
3393
  error: res_error,
2987
- } = CatalogModel.GetConfigResponse().validate(response, {
3394
+ } = CatalogPlatformModel.GetConfigResponse().validate(responseData, {
2988
3395
  abortEarly: false,
2989
3396
  allowUnknown: false,
2990
3397
  });
@@ -2992,34 +3399,33 @@ class Catalog {
2992
3399
  if (res_error) {
2993
3400
  Logger({
2994
3401
  level: "WARN",
2995
- message: "Response Validation Warnnings for getGroupConfigurations",
3402
+ message: `Response Validation Warnnings for platform > Catalog > getGroupConfigurations \n ${res_error}`,
2996
3403
  });
2997
- Logger({ level: "WARN", message: res_error });
2998
3404
  }
2999
3405
 
3000
3406
  return response;
3001
3407
  }
3002
3408
 
3003
3409
  /**
3004
- * @param {Object} arg - Arg object.
3005
- * @param {string} arg.configType - A `config_type` is an identifier that
3006
- * defines a specific type of configuration.
3007
- * @param {number} [arg.pageNo] - The page number to navigate through the
3008
- * given set of results.
3009
- * @param {number} [arg.pageSize] - Number of items to retrieve in each
3010
- * page. Default is 12.
3011
- * @param {string} [arg.search] - Get configuration list filtered by `search` string.
3012
- * @returns {Promise<GetConfigResponse>} - Success response
3410
+ * @param {CatalogPlatformApplicationValidator.GetListingConfigurationsParam} arg
3411
+ * - Arg object
3412
+ *
3413
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3414
+ * @param {import("../PlatformAPIClient").Options} - Options
3415
+ * @returns {Promise<CatalogPlatformModel.GetConfigResponse>} - Success response
3416
+ * @name getListingConfigurations
3013
3417
  * @summary: Get the details of the application configured configurations of listing config types.
3014
- * @description: Get the details of the application configured configurations of listing config types.
3418
+ * @description: Get the details of the application configured configurations of listing config types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getListingConfigurations/).
3015
3419
  */
3016
- async getListingConfigurations({
3017
- configType,
3018
- pageNo,
3019
- pageSize,
3020
- search,
3021
- } = {}) {
3022
- const { error } = CatalogValidator.getListingConfigurations().validate(
3420
+ async getListingConfigurations(
3421
+ { configType, pageNo, pageSize, search, requestHeaders } = {
3422
+ requestHeaders: {},
3423
+ },
3424
+ { responseHeaders } = { responseHeaders: false }
3425
+ ) {
3426
+ const {
3427
+ error,
3428
+ } = CatalogPlatformApplicationValidator.getListingConfigurations().validate(
3023
3429
  {
3024
3430
  configType,
3025
3431
  pageNo,
@@ -3035,7 +3441,7 @@ class Catalog {
3035
3441
  // Showing warrnings if extra unknown parameters are found
3036
3442
  const {
3037
3443
  error: warrning,
3038
- } = CatalogValidator.getListingConfigurations().validate(
3444
+ } = CatalogPlatformApplicationValidator.getListingConfigurations().validate(
3039
3445
  {
3040
3446
  configType,
3041
3447
  pageNo,
@@ -3047,9 +3453,8 @@ class Catalog {
3047
3453
  if (warrning) {
3048
3454
  Logger({
3049
3455
  level: "WARN",
3050
- message: "Parameter Validation warrnings for getListingConfigurations",
3456
+ message: `Parameter Validation warrnings for platform > Catalog > getListingConfigurations \n ${warrning}`,
3051
3457
  });
3052
- Logger({ level: "WARN", message: warrning });
3053
3458
  }
3054
3459
 
3055
3460
  const query_params = {};
@@ -3062,12 +3467,19 @@ class Catalog {
3062
3467
  "get",
3063
3468
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/`,
3064
3469
  query_params,
3065
- undefined
3470
+ undefined,
3471
+ requestHeaders,
3472
+ { responseHeaders }
3066
3473
  );
3067
3474
 
3475
+ let responseData = response;
3476
+ if (responseHeaders) {
3477
+ responseData = response[0];
3478
+ }
3479
+
3068
3480
  const {
3069
3481
  error: res_error,
3070
- } = CatalogModel.GetConfigResponse().validate(response, {
3482
+ } = CatalogPlatformModel.GetConfigResponse().validate(responseData, {
3071
3483
  abortEarly: false,
3072
3484
  allowUnknown: false,
3073
3485
  });
@@ -3075,25 +3487,31 @@ class Catalog {
3075
3487
  if (res_error) {
3076
3488
  Logger({
3077
3489
  level: "WARN",
3078
- message: "Response Validation Warnnings for getListingConfigurations",
3490
+ message: `Response Validation Warnnings for platform > Catalog > getListingConfigurations \n ${res_error}`,
3079
3491
  });
3080
- Logger({ level: "WARN", message: res_error });
3081
3492
  }
3082
3493
 
3083
3494
  return response;
3084
3495
  }
3085
3496
 
3086
3497
  /**
3087
- * @param {Object} arg - Arg object.
3088
- * @param {string} arg.slug - The unique identifier of a product. i.e;
3089
- * `slug` of a product. You can retrieve these from the APIs that list
3090
- * products like **v1.0/products/**
3091
- * @returns {Promise<ProductDetail>} - Success response
3498
+ * @param {CatalogPlatformApplicationValidator.GetProductDetailBySlugParam} arg
3499
+ * - Arg object
3500
+ *
3501
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3502
+ * @param {import("../PlatformAPIClient").Options} - Options
3503
+ * @returns {Promise<CatalogPlatformModel.ProductDetail>} - Success response
3504
+ * @name getProductDetailBySlug
3092
3505
  * @summary: Get a product
3093
- * @description: Products are the core resource of an application. Products can be associated by categories, collections, brands and more. This API retrieves the product specified by the given **slug**. If successful, returns a Product resource in the response body specified in `ProductDetail`
3506
+ * @description: Products are the core resource of an application. Products can be associated by categories, collections, brands and more. This API retrieves the product specified by the given **slug**. If successful, returns a Product resource in the response body specified in `ProductDetail` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductDetailBySlug/).
3094
3507
  */
3095
- async getProductDetailBySlug({ slug } = {}) {
3096
- const { error } = CatalogValidator.getProductDetailBySlug().validate(
3508
+ async getProductDetailBySlug(
3509
+ { slug, requestHeaders } = { requestHeaders: {} },
3510
+ { responseHeaders } = { responseHeaders: false }
3511
+ ) {
3512
+ const {
3513
+ error,
3514
+ } = CatalogPlatformApplicationValidator.getProductDetailBySlug().validate(
3097
3515
  {
3098
3516
  slug,
3099
3517
  },
@@ -3106,7 +3524,7 @@ class Catalog {
3106
3524
  // Showing warrnings if extra unknown parameters are found
3107
3525
  const {
3108
3526
  error: warrning,
3109
- } = CatalogValidator.getProductDetailBySlug().validate(
3527
+ } = CatalogPlatformApplicationValidator.getProductDetailBySlug().validate(
3110
3528
  {
3111
3529
  slug,
3112
3530
  },
@@ -3115,9 +3533,8 @@ class Catalog {
3115
3533
  if (warrning) {
3116
3534
  Logger({
3117
3535
  level: "WARN",
3118
- message: "Parameter Validation warrnings for getProductDetailBySlug",
3536
+ message: `Parameter Validation warrnings for platform > Catalog > getProductDetailBySlug \n ${warrning}`,
3119
3537
  });
3120
- Logger({ level: "WARN", message: warrning });
3121
3538
  }
3122
3539
 
3123
3540
  const query_params = {};
@@ -3127,33 +3544,51 @@ class Catalog {
3127
3544
  "get",
3128
3545
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products/${slug}`,
3129
3546
  query_params,
3130
- undefined
3547
+ undefined,
3548
+ requestHeaders,
3549
+ { responseHeaders }
3131
3550
  );
3132
3551
 
3133
- const { error: res_error } = CatalogModel.ProductDetail().validate(
3134
- response,
3135
- { abortEarly: false, allowUnknown: false }
3136
- );
3552
+ let responseData = response;
3553
+ if (responseHeaders) {
3554
+ responseData = response[0];
3555
+ }
3556
+
3557
+ const {
3558
+ error: res_error,
3559
+ } = CatalogPlatformModel.ProductDetail().validate(responseData, {
3560
+ abortEarly: false,
3561
+ allowUnknown: false,
3562
+ });
3137
3563
 
3138
3564
  if (res_error) {
3139
3565
  Logger({
3140
3566
  level: "WARN",
3141
- message: "Response Validation Warnnings for getProductDetailBySlug",
3567
+ message: `Response Validation Warnnings for platform > Catalog > getProductDetailBySlug \n ${res_error}`,
3142
3568
  });
3143
- Logger({ level: "WARN", message: res_error });
3144
3569
  }
3145
3570
 
3146
3571
  return response;
3147
3572
  }
3148
3573
 
3149
3574
  /**
3150
- * @param {Object} arg - Arg object.
3151
- * @returns {Promise<GetCollectionQueryOptionResponse>} - Success response
3575
+ * @param {CatalogPlatformApplicationValidator.GetQueryFiltersParam} arg - Arg object
3576
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3577
+ * @param {import("../PlatformAPIClient").Options} - Options
3578
+ * @returns {Promise<CatalogPlatformModel.GetCollectionQueryOptionResponse>}
3579
+ * - Success response
3580
+ *
3581
+ * @name getQueryFilters
3152
3582
  * @summary: Get query filters to configure a collection
3153
- * @description: Get query filters to configure a collection
3583
+ * @description: Get query filters to configure a collection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getQueryFilters/).
3154
3584
  */
3155
- async getQueryFilters({} = {}) {
3156
- const { error } = CatalogValidator.getQueryFilters().validate(
3585
+ async getQueryFilters(
3586
+ { requestHeaders } = { requestHeaders: {} },
3587
+ { responseHeaders } = { responseHeaders: false }
3588
+ ) {
3589
+ const {
3590
+ error,
3591
+ } = CatalogPlatformApplicationValidator.getQueryFilters().validate(
3157
3592
  {},
3158
3593
  { abortEarly: false, allowUnknown: true }
3159
3594
  );
@@ -3162,16 +3597,17 @@ class Catalog {
3162
3597
  }
3163
3598
 
3164
3599
  // Showing warrnings if extra unknown parameters are found
3165
- const { error: warrning } = CatalogValidator.getQueryFilters().validate(
3600
+ const {
3601
+ error: warrning,
3602
+ } = CatalogPlatformApplicationValidator.getQueryFilters().validate(
3166
3603
  {},
3167
3604
  { abortEarly: false, allowUnknown: false }
3168
3605
  );
3169
3606
  if (warrning) {
3170
3607
  Logger({
3171
3608
  level: "WARN",
3172
- message: "Parameter Validation warrnings for getQueryFilters",
3609
+ message: `Parameter Validation warrnings for platform > Catalog > getQueryFilters \n ${warrning}`,
3173
3610
  });
3174
- Logger({ level: "WARN", message: warrning });
3175
3611
  }
3176
3612
 
3177
3613
  const query_params = {};
@@ -3181,37 +3617,52 @@ class Catalog {
3181
3617
  "get",
3182
3618
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/query-options/`,
3183
3619
  query_params,
3184
- undefined
3620
+ undefined,
3621
+ requestHeaders,
3622
+ { responseHeaders }
3185
3623
  );
3186
3624
 
3625
+ let responseData = response;
3626
+ if (responseHeaders) {
3627
+ responseData = response[0];
3628
+ }
3629
+
3187
3630
  const {
3188
3631
  error: res_error,
3189
- } = CatalogModel.GetCollectionQueryOptionResponse().validate(response, {
3190
- abortEarly: false,
3191
- allowUnknown: false,
3192
- });
3632
+ } = CatalogPlatformModel.GetCollectionQueryOptionResponse().validate(
3633
+ responseData,
3634
+ { abortEarly: false, allowUnknown: false }
3635
+ );
3193
3636
 
3194
3637
  if (res_error) {
3195
3638
  Logger({
3196
3639
  level: "WARN",
3197
- message: "Response Validation Warnnings for getQueryFilters",
3640
+ message: `Response Validation Warnnings for platform > Catalog > getQueryFilters \n ${res_error}`,
3198
3641
  });
3199
- Logger({ level: "WARN", message: res_error });
3200
3642
  }
3201
3643
 
3202
3644
  return response;
3203
3645
  }
3204
3646
 
3205
3647
  /**
3206
- * @param {Object} arg - Arg object.
3207
- * @param {string} arg.id - A `id` is a unique identifier for a particular
3208
- * detail. Pass the `id` of the keywords which you want to retrieve.
3209
- * @returns {Promise<GetSearchWordsDetailResponse>} - Success response
3648
+ * @param {CatalogPlatformApplicationValidator.GetSearchKeywordsParam} arg
3649
+ * - Arg object
3650
+ *
3651
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3652
+ * @param {import("../PlatformAPIClient").Options} - Options
3653
+ * @returns {Promise<CatalogPlatformModel.GetSearchWordsDetailResponse>} -
3654
+ * Success response
3655
+ * @name getSearchKeywords
3210
3656
  * @summary: Get a Search Keywords Details
3211
- * @description: Get the details of a words by its `id`. If successful, returns a Collection resource in the response body specified in `GetSearchWordsDetailResponseSchema`
3657
+ * @description: Get the details of a words by its `id`. If successful, returns a Collection resource in the response body specified in `GetSearchWordsDetailResponseSchema` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSearchKeywords/).
3212
3658
  */
3213
- async getSearchKeywords({ id } = {}) {
3214
- const { error } = CatalogValidator.getSearchKeywords().validate(
3659
+ async getSearchKeywords(
3660
+ { id, requestHeaders } = { requestHeaders: {} },
3661
+ { responseHeaders } = { responseHeaders: false }
3662
+ ) {
3663
+ const {
3664
+ error,
3665
+ } = CatalogPlatformApplicationValidator.getSearchKeywords().validate(
3215
3666
  {
3216
3667
  id,
3217
3668
  },
@@ -3222,7 +3673,9 @@ class Catalog {
3222
3673
  }
3223
3674
 
3224
3675
  // Showing warrnings if extra unknown parameters are found
3225
- const { error: warrning } = CatalogValidator.getSearchKeywords().validate(
3676
+ const {
3677
+ error: warrning,
3678
+ } = CatalogPlatformApplicationValidator.getSearchKeywords().validate(
3226
3679
  {
3227
3680
  id,
3228
3681
  },
@@ -3231,9 +3684,8 @@ class Catalog {
3231
3684
  if (warrning) {
3232
3685
  Logger({
3233
3686
  level: "WARN",
3234
- message: "Parameter Validation warrnings for getSearchKeywords",
3687
+ message: `Parameter Validation warrnings for platform > Catalog > getSearchKeywords \n ${warrning}`,
3235
3688
  });
3236
- Logger({ level: "WARN", message: warrning });
3237
3689
  }
3238
3690
 
3239
3691
  const query_params = {};
@@ -3243,36 +3695,51 @@ class Catalog {
3243
3695
  "get",
3244
3696
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
3245
3697
  query_params,
3246
- undefined
3698
+ undefined,
3699
+ requestHeaders,
3700
+ { responseHeaders }
3247
3701
  );
3248
3702
 
3703
+ let responseData = response;
3704
+ if (responseHeaders) {
3705
+ responseData = response[0];
3706
+ }
3707
+
3249
3708
  const {
3250
3709
  error: res_error,
3251
- } = CatalogModel.GetSearchWordsDetailResponse().validate(response, {
3252
- abortEarly: false,
3253
- allowUnknown: false,
3254
- });
3710
+ } = CatalogPlatformModel.GetSearchWordsDetailResponse().validate(
3711
+ responseData,
3712
+ { abortEarly: false, allowUnknown: false }
3713
+ );
3255
3714
 
3256
3715
  if (res_error) {
3257
3716
  Logger({
3258
3717
  level: "WARN",
3259
- message: "Response Validation Warnnings for getSearchKeywords",
3718
+ message: `Response Validation Warnnings for platform > Catalog > getSearchKeywords \n ${res_error}`,
3260
3719
  });
3261
- Logger({ level: "WARN", message: res_error });
3262
3720
  }
3263
3721
 
3264
3722
  return response;
3265
3723
  }
3266
3724
 
3267
3725
  /**
3268
- * @param {Object} arg - Arg object.
3269
- * @param {AllowSingleRequest} arg.body
3270
- * @returns {Promise<ConfigSuccessResponse>} - Success response
3726
+ * @param {CatalogPlatformApplicationValidator.UpdateAllowSingleParam} arg
3727
+ * - Arg object
3728
+ *
3729
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3730
+ * @param {import("../PlatformAPIClient").Options} - Options
3731
+ * @returns {Promise<CatalogPlatformModel.ConfigSuccessResponse>} - Success response
3732
+ * @name updateAllowSingle
3271
3733
  * @summary: Update allow single flag for filters of the application.
3272
- * @description: Update allow single flag for filters of the application.
3734
+ * @description: Update allow single flag for filters of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAllowSingle/).
3273
3735
  */
3274
- async updateAllowSingle({ body } = {}) {
3275
- const { error } = CatalogValidator.updateAllowSingle().validate(
3736
+ async updateAllowSingle(
3737
+ { body, requestHeaders } = { requestHeaders: {} },
3738
+ { responseHeaders } = { responseHeaders: false }
3739
+ ) {
3740
+ const {
3741
+ error,
3742
+ } = CatalogPlatformApplicationValidator.updateAllowSingle().validate(
3276
3743
  {
3277
3744
  body,
3278
3745
  },
@@ -3283,7 +3750,9 @@ class Catalog {
3283
3750
  }
3284
3751
 
3285
3752
  // Showing warrnings if extra unknown parameters are found
3286
- const { error: warrning } = CatalogValidator.updateAllowSingle().validate(
3753
+ const {
3754
+ error: warrning,
3755
+ } = CatalogPlatformApplicationValidator.updateAllowSingle().validate(
3287
3756
  {
3288
3757
  body,
3289
3758
  },
@@ -3292,9 +3761,8 @@ class Catalog {
3292
3761
  if (warrning) {
3293
3762
  Logger({
3294
3763
  level: "WARN",
3295
- message: "Parameter Validation warrnings for updateAllowSingle",
3764
+ message: `Parameter Validation warrnings for platform > Catalog > updateAllowSingle \n ${warrning}`,
3296
3765
  });
3297
- Logger({ level: "WARN", message: warrning });
3298
3766
  }
3299
3767
 
3300
3768
  const query_params = {};
@@ -3304,12 +3772,19 @@ class Catalog {
3304
3772
  "post",
3305
3773
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/filter/allow_single`,
3306
3774
  query_params,
3307
- body
3775
+ body,
3776
+ requestHeaders,
3777
+ { responseHeaders }
3308
3778
  );
3309
3779
 
3780
+ let responseData = response;
3781
+ if (responseHeaders) {
3782
+ responseData = response[0];
3783
+ }
3784
+
3310
3785
  const {
3311
3786
  error: res_error,
3312
- } = CatalogModel.ConfigSuccessResponse().validate(response, {
3787
+ } = CatalogPlatformModel.ConfigSuccessResponse().validate(responseData, {
3313
3788
  abortEarly: false,
3314
3789
  allowUnknown: false,
3315
3790
  });
@@ -3317,24 +3792,29 @@ class Catalog {
3317
3792
  if (res_error) {
3318
3793
  Logger({
3319
3794
  level: "WARN",
3320
- message: "Response Validation Warnnings for updateAllowSingle",
3795
+ message: `Response Validation Warnnings for platform > Catalog > updateAllowSingle \n ${res_error}`,
3321
3796
  });
3322
- Logger({ level: "WARN", message: res_error });
3323
3797
  }
3324
3798
 
3325
3799
  return response;
3326
3800
  }
3327
3801
 
3328
3802
  /**
3329
- * @param {Object} arg - Arg object.
3330
- * @param {string} arg.brandUid - Brand id for which the custom_json is associated.
3331
- * @param {ApplicationBrandJson} arg.body
3332
- * @returns {Promise<SuccessResponse1>} - Success response
3803
+ * @param {CatalogPlatformApplicationValidator.UpdateAppBrandParam} arg - Arg object
3804
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3805
+ * @param {import("../PlatformAPIClient").Options} - Options
3806
+ * @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
3807
+ * @name updateAppBrand
3333
3808
  * @summary: Update a single custom json.
3334
- * @description: This API helps to update data associated to a item custom meta.
3809
+ * @description: This API helps to update data associated to a item custom meta. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppBrand/).
3335
3810
  */
3336
- async updateAppBrand({ brandUid, body } = {}) {
3337
- const { error } = CatalogValidator.updateAppBrand().validate(
3811
+ async updateAppBrand(
3812
+ { brandUid, body, requestHeaders } = { requestHeaders: {} },
3813
+ { responseHeaders } = { responseHeaders: false }
3814
+ ) {
3815
+ const {
3816
+ error,
3817
+ } = CatalogPlatformApplicationValidator.updateAppBrand().validate(
3338
3818
  {
3339
3819
  brandUid,
3340
3820
  body,
@@ -3346,7 +3826,9 @@ class Catalog {
3346
3826
  }
3347
3827
 
3348
3828
  // Showing warrnings if extra unknown parameters are found
3349
- const { error: warrning } = CatalogValidator.updateAppBrand().validate(
3829
+ const {
3830
+ error: warrning,
3831
+ } = CatalogPlatformApplicationValidator.updateAppBrand().validate(
3350
3832
  {
3351
3833
  brandUid,
3352
3834
  body,
@@ -3356,9 +3838,8 @@ class Catalog {
3356
3838
  if (warrning) {
3357
3839
  Logger({
3358
3840
  level: "WARN",
3359
- message: "Parameter Validation warrnings for updateAppBrand",
3841
+ message: `Parameter Validation warrnings for platform > Catalog > updateAppBrand \n ${warrning}`,
3360
3842
  });
3361
- Logger({ level: "WARN", message: warrning });
3362
3843
  }
3363
3844
 
3364
3845
  const query_params = {};
@@ -3368,12 +3849,19 @@ class Catalog {
3368
3849
  "patch",
3369
3850
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brand/${brandUid}`,
3370
3851
  query_params,
3371
- body
3852
+ body,
3853
+ requestHeaders,
3854
+ { responseHeaders }
3372
3855
  );
3373
3856
 
3857
+ let responseData = response;
3858
+ if (responseHeaders) {
3859
+ responseData = response[0];
3860
+ }
3861
+
3374
3862
  const {
3375
3863
  error: res_error,
3376
- } = CatalogModel.SuccessResponse1().validate(response, {
3864
+ } = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
3377
3865
  abortEarly: false,
3378
3866
  allowUnknown: false,
3379
3867
  });
@@ -3381,25 +3869,31 @@ class Catalog {
3381
3869
  if (res_error) {
3382
3870
  Logger({
3383
3871
  level: "WARN",
3384
- message: "Response Validation Warnnings for updateAppBrand",
3872
+ message: `Response Validation Warnnings for platform > Catalog > updateAppBrand \n ${res_error}`,
3385
3873
  });
3386
- Logger({ level: "WARN", message: res_error });
3387
3874
  }
3388
3875
 
3389
3876
  return response;
3390
3877
  }
3391
3878
 
3392
3879
  /**
3393
- * @param {Object} arg - Arg object.
3394
- * @param {string} arg.categoryUid - Category id for which the custom_json
3395
- * is associated.
3396
- * @param {ApplicationCategoryJson} arg.body
3397
- * @returns {Promise<SuccessResponse1>} - Success response
3880
+ * @param {CatalogPlatformApplicationValidator.UpdateAppCategoryParam} arg
3881
+ * - Arg object
3882
+ *
3883
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3884
+ * @param {import("../PlatformAPIClient").Options} - Options
3885
+ * @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
3886
+ * @name updateAppCategory
3398
3887
  * @summary: Update a single custom json.
3399
- * @description: This API helps to update data associated to a item custom meta.
3888
+ * @description: This API helps to update data associated to a item custom meta. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppCategory/).
3400
3889
  */
3401
- async updateAppCategory({ categoryUid, body } = {}) {
3402
- const { error } = CatalogValidator.updateAppCategory().validate(
3890
+ async updateAppCategory(
3891
+ { categoryUid, body, requestHeaders } = { requestHeaders: {} },
3892
+ { responseHeaders } = { responseHeaders: false }
3893
+ ) {
3894
+ const {
3895
+ error,
3896
+ } = CatalogPlatformApplicationValidator.updateAppCategory().validate(
3403
3897
  {
3404
3898
  categoryUid,
3405
3899
  body,
@@ -3411,7 +3905,9 @@ class Catalog {
3411
3905
  }
3412
3906
 
3413
3907
  // Showing warrnings if extra unknown parameters are found
3414
- const { error: warrning } = CatalogValidator.updateAppCategory().validate(
3908
+ const {
3909
+ error: warrning,
3910
+ } = CatalogPlatformApplicationValidator.updateAppCategory().validate(
3415
3911
  {
3416
3912
  categoryUid,
3417
3913
  body,
@@ -3421,9 +3917,8 @@ class Catalog {
3421
3917
  if (warrning) {
3422
3918
  Logger({
3423
3919
  level: "WARN",
3424
- message: "Parameter Validation warrnings for updateAppCategory",
3920
+ message: `Parameter Validation warrnings for platform > Catalog > updateAppCategory \n ${warrning}`,
3425
3921
  });
3426
- Logger({ level: "WARN", message: warrning });
3427
3922
  }
3428
3923
 
3429
3924
  const query_params = {};
@@ -3433,12 +3928,19 @@ class Catalog {
3433
3928
  "patch",
3434
3929
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/category/${categoryUid}`,
3435
3930
  query_params,
3436
- body
3931
+ body,
3932
+ requestHeaders,
3933
+ { responseHeaders }
3437
3934
  );
3438
3935
 
3936
+ let responseData = response;
3937
+ if (responseHeaders) {
3938
+ responseData = response[0];
3939
+ }
3940
+
3439
3941
  const {
3440
3942
  error: res_error,
3441
- } = CatalogModel.SuccessResponse1().validate(response, {
3943
+ } = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
3442
3944
  abortEarly: false,
3443
3945
  allowUnknown: false,
3444
3946
  });
@@ -3446,25 +3948,31 @@ class Catalog {
3446
3948
  if (res_error) {
3447
3949
  Logger({
3448
3950
  level: "WARN",
3449
- message: "Response Validation Warnnings for updateAppCategory",
3951
+ message: `Response Validation Warnnings for platform > Catalog > updateAppCategory \n ${res_error}`,
3450
3952
  });
3451
- Logger({ level: "WARN", message: res_error });
3452
3953
  }
3453
3954
 
3454
3955
  return response;
3455
3956
  }
3456
3957
 
3457
3958
  /**
3458
- * @param {Object} arg - Arg object.
3459
- * @param {string} arg.departmentUid - Department id for which the
3460
- * custom_json is associated.
3461
- * @param {ApplicationDepartmentJson} arg.body
3462
- * @returns {Promise<SuccessResponse1>} - Success response
3959
+ * @param {CatalogPlatformApplicationValidator.UpdateAppDepartmentParam} arg
3960
+ * - Arg object
3961
+ *
3962
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3963
+ * @param {import("../PlatformAPIClient").Options} - Options
3964
+ * @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
3965
+ * @name updateAppDepartment
3463
3966
  * @summary: Update a single custom json.
3464
- * @description: This API helps to update data associated to a item custom meta.
3967
+ * @description: This API helps to update data associated to a item custom meta. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppDepartment/).
3465
3968
  */
3466
- async updateAppDepartment({ departmentUid, body } = {}) {
3467
- const { error } = CatalogValidator.updateAppDepartment().validate(
3969
+ async updateAppDepartment(
3970
+ { departmentUid, body, requestHeaders } = { requestHeaders: {} },
3971
+ { responseHeaders } = { responseHeaders: false }
3972
+ ) {
3973
+ const {
3974
+ error,
3975
+ } = CatalogPlatformApplicationValidator.updateAppDepartment().validate(
3468
3976
  {
3469
3977
  departmentUid,
3470
3978
  body,
@@ -3476,7 +3984,9 @@ class Catalog {
3476
3984
  }
3477
3985
 
3478
3986
  // Showing warrnings if extra unknown parameters are found
3479
- const { error: warrning } = CatalogValidator.updateAppDepartment().validate(
3987
+ const {
3988
+ error: warrning,
3989
+ } = CatalogPlatformApplicationValidator.updateAppDepartment().validate(
3480
3990
  {
3481
3991
  departmentUid,
3482
3992
  body,
@@ -3486,9 +3996,8 @@ class Catalog {
3486
3996
  if (warrning) {
3487
3997
  Logger({
3488
3998
  level: "WARN",
3489
- message: "Parameter Validation warrnings for updateAppDepartment",
3999
+ message: `Parameter Validation warrnings for platform > Catalog > updateAppDepartment \n ${warrning}`,
3490
4000
  });
3491
- Logger({ level: "WARN", message: warrning });
3492
4001
  }
3493
4002
 
3494
4003
  const query_params = {};
@@ -3498,12 +4007,19 @@ class Catalog {
3498
4007
  "patch",
3499
4008
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/department/${departmentUid}`,
3500
4009
  query_params,
3501
- body
4010
+ body,
4011
+ requestHeaders,
4012
+ { responseHeaders }
3502
4013
  );
3503
4014
 
4015
+ let responseData = response;
4016
+ if (responseHeaders) {
4017
+ responseData = response[0];
4018
+ }
4019
+
3504
4020
  const {
3505
4021
  error: res_error,
3506
- } = CatalogModel.SuccessResponse1().validate(response, {
4022
+ } = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
3507
4023
  abortEarly: false,
3508
4024
  allowUnknown: false,
3509
4025
  });
@@ -3511,24 +4027,31 @@ class Catalog {
3511
4027
  if (res_error) {
3512
4028
  Logger({
3513
4029
  level: "WARN",
3514
- message: "Response Validation Warnnings for updateAppDepartment",
4030
+ message: `Response Validation Warnnings for platform > Catalog > updateAppDepartment \n ${res_error}`,
3515
4031
  });
3516
- Logger({ level: "WARN", message: res_error });
3517
4032
  }
3518
4033
 
3519
4034
  return response;
3520
4035
  }
3521
4036
 
3522
4037
  /**
3523
- * @param {Object} arg - Arg object.
3524
- * @param {string} arg.storeUid - Store id for which the custom_json is associated.
3525
- * @param {ApplicationStoreJson} arg.body
3526
- * @returns {Promise<SuccessResponse1>} - Success response
4038
+ * @param {CatalogPlatformApplicationValidator.UpdateAppLocationParam} arg
4039
+ * - Arg object
4040
+ *
4041
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4042
+ * @param {import("../PlatformAPIClient").Options} - Options
4043
+ * @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
4044
+ * @name updateAppLocation
3527
4045
  * @summary: Update a single custom json.
3528
- * @description: This API helps to update data associated to a item custom meta.
4046
+ * @description: This API helps to update data associated to a item custom meta. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppLocation/).
3529
4047
  */
3530
- async updateAppLocation({ storeUid, body } = {}) {
3531
- const { error } = CatalogValidator.updateAppLocation().validate(
4048
+ async updateAppLocation(
4049
+ { storeUid, body, requestHeaders } = { requestHeaders: {} },
4050
+ { responseHeaders } = { responseHeaders: false }
4051
+ ) {
4052
+ const {
4053
+ error,
4054
+ } = CatalogPlatformApplicationValidator.updateAppLocation().validate(
3532
4055
  {
3533
4056
  storeUid,
3534
4057
  body,
@@ -3540,7 +4063,9 @@ class Catalog {
3540
4063
  }
3541
4064
 
3542
4065
  // Showing warrnings if extra unknown parameters are found
3543
- const { error: warrning } = CatalogValidator.updateAppLocation().validate(
4066
+ const {
4067
+ error: warrning,
4068
+ } = CatalogPlatformApplicationValidator.updateAppLocation().validate(
3544
4069
  {
3545
4070
  storeUid,
3546
4071
  body,
@@ -3550,9 +4075,8 @@ class Catalog {
3550
4075
  if (warrning) {
3551
4076
  Logger({
3552
4077
  level: "WARN",
3553
- message: "Parameter Validation warrnings for updateAppLocation",
4078
+ message: `Parameter Validation warrnings for platform > Catalog > updateAppLocation \n ${warrning}`,
3554
4079
  });
3555
- Logger({ level: "WARN", message: warrning });
3556
4080
  }
3557
4081
 
3558
4082
  const query_params = {};
@@ -3562,12 +4086,19 @@ class Catalog {
3562
4086
  "patch",
3563
4087
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/${storeUid}`,
3564
4088
  query_params,
3565
- body
4089
+ body,
4090
+ requestHeaders,
4091
+ { responseHeaders }
3566
4092
  );
3567
4093
 
4094
+ let responseData = response;
4095
+ if (responseHeaders) {
4096
+ responseData = response[0];
4097
+ }
4098
+
3568
4099
  const {
3569
4100
  error: res_error,
3570
- } = CatalogModel.SuccessResponse1().validate(response, {
4101
+ } = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
3571
4102
  abortEarly: false,
3572
4103
  allowUnknown: false,
3573
4104
  });
@@ -3575,24 +4106,29 @@ class Catalog {
3575
4106
  if (res_error) {
3576
4107
  Logger({
3577
4108
  level: "WARN",
3578
- message: "Response Validation Warnnings for updateAppLocation",
4109
+ message: `Response Validation Warnnings for platform > Catalog > updateAppLocation \n ${res_error}`,
3579
4110
  });
3580
- Logger({ level: "WARN", message: res_error });
3581
4111
  }
3582
4112
 
3583
4113
  return response;
3584
4114
  }
3585
4115
 
3586
4116
  /**
3587
- * @param {Object} arg - Arg object.
3588
- * @param {string} arg.itemId - Product id for which the custom_meta is associated.
3589
- * @param {ApplicationItemMeta} arg.body
3590
- * @returns {Promise<SuccessResponse1>} - Success response
4117
+ * @param {CatalogPlatformApplicationValidator.UpdateAppProductParam} arg - Arg object
4118
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4119
+ * @param {import("../PlatformAPIClient").Options} - Options
4120
+ * @returns {Promise<CatalogPlatformModel.SuccessResponse1>} - Success response
4121
+ * @name updateAppProduct
3591
4122
  * @summary: Update a single custom meta.
3592
- * @description: This API helps to update data associated to a item custom meta.
4123
+ * @description: This API helps to update data associated to a item custom meta. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppProduct/).
3593
4124
  */
3594
- async updateAppProduct({ itemId, body } = {}) {
3595
- const { error } = CatalogValidator.updateAppProduct().validate(
4125
+ async updateAppProduct(
4126
+ { itemId, body, requestHeaders } = { requestHeaders: {} },
4127
+ { responseHeaders } = { responseHeaders: false }
4128
+ ) {
4129
+ const {
4130
+ error,
4131
+ } = CatalogPlatformApplicationValidator.updateAppProduct().validate(
3596
4132
  {
3597
4133
  itemId,
3598
4134
  body,
@@ -3604,7 +4140,9 @@ class Catalog {
3604
4140
  }
3605
4141
 
3606
4142
  // Showing warrnings if extra unknown parameters are found
3607
- const { error: warrning } = CatalogValidator.updateAppProduct().validate(
4143
+ const {
4144
+ error: warrning,
4145
+ } = CatalogPlatformApplicationValidator.updateAppProduct().validate(
3608
4146
  {
3609
4147
  itemId,
3610
4148
  body,
@@ -3614,9 +4152,8 @@ class Catalog {
3614
4152
  if (warrning) {
3615
4153
  Logger({
3616
4154
  level: "WARN",
3617
- message: "Parameter Validation warrnings for updateAppProduct",
4155
+ message: `Parameter Validation warrnings for platform > Catalog > updateAppProduct \n ${warrning}`,
3618
4156
  });
3619
- Logger({ level: "WARN", message: warrning });
3620
4157
  }
3621
4158
 
3622
4159
  const query_params = {};
@@ -3626,12 +4163,19 @@ class Catalog {
3626
4163
  "patch",
3627
4164
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product/${itemId}/`,
3628
4165
  query_params,
3629
- body
4166
+ body,
4167
+ requestHeaders,
4168
+ { responseHeaders }
3630
4169
  );
3631
4170
 
4171
+ let responseData = response;
4172
+ if (responseHeaders) {
4173
+ responseData = response[0];
4174
+ }
4175
+
3632
4176
  const {
3633
4177
  error: res_error,
3634
- } = CatalogModel.SuccessResponse1().validate(response, {
4178
+ } = CatalogPlatformModel.SuccessResponse1().validate(responseData, {
3635
4179
  abortEarly: false,
3636
4180
  allowUnknown: false,
3637
4181
  });
@@ -3639,25 +4183,32 @@ class Catalog {
3639
4183
  if (res_error) {
3640
4184
  Logger({
3641
4185
  level: "WARN",
3642
- message: "Response Validation Warnnings for updateAppProduct",
4186
+ message: `Response Validation Warnnings for platform > Catalog > updateAppProduct \n ${res_error}`,
3643
4187
  });
3644
- Logger({ level: "WARN", message: res_error });
3645
4188
  }
3646
4189
 
3647
4190
  return response;
3648
4191
  }
3649
4192
 
3650
4193
  /**
3651
- * @param {Object} arg - Arg object.
3652
- * @param {string} arg.id - A `id` is a unique identifier for a particular
3653
- * detail. Pass the `id` of the keywords which you want to delete.
3654
- * @param {CreateAutocompleteKeyword} arg.body
3655
- * @returns {Promise<GetAutocompleteWordsResponse>} - Success response
4194
+ * @param {CatalogPlatformApplicationValidator.UpdateAutocompleteKeywordParam} arg
4195
+ * - Arg object
4196
+ *
4197
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4198
+ * @param {import("../PlatformAPIClient").Options} - Options
4199
+ * @returns {Promise<CatalogPlatformModel.GetAutocompleteWordsResponse>} -
4200
+ * Success response
4201
+ * @name updateAutocompleteKeyword
3656
4202
  * @summary: Create & Update Autocomplete Keyword
3657
- * @description: Update a mapping by it's id. On successful request, returns the updated Keyword mapping
4203
+ * @description: Update a mapping by it's id. On successful request, returns the updated Keyword mapping - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAutocompleteKeyword/).
3658
4204
  */
3659
- async updateAutocompleteKeyword({ id, body } = {}) {
3660
- const { error } = CatalogValidator.updateAutocompleteKeyword().validate(
4205
+ async updateAutocompleteKeyword(
4206
+ { id, body, requestHeaders } = { requestHeaders: {} },
4207
+ { responseHeaders } = { responseHeaders: false }
4208
+ ) {
4209
+ const {
4210
+ error,
4211
+ } = CatalogPlatformApplicationValidator.updateAutocompleteKeyword().validate(
3661
4212
  {
3662
4213
  id,
3663
4214
  body,
@@ -3671,7 +4222,7 @@ class Catalog {
3671
4222
  // Showing warrnings if extra unknown parameters are found
3672
4223
  const {
3673
4224
  error: warrning,
3674
- } = CatalogValidator.updateAutocompleteKeyword().validate(
4225
+ } = CatalogPlatformApplicationValidator.updateAutocompleteKeyword().validate(
3675
4226
  {
3676
4227
  id,
3677
4228
  body,
@@ -3681,9 +4232,8 @@ class Catalog {
3681
4232
  if (warrning) {
3682
4233
  Logger({
3683
4234
  level: "WARN",
3684
- message: "Parameter Validation warrnings for updateAutocompleteKeyword",
4235
+ message: `Parameter Validation warrnings for platform > Catalog > updateAutocompleteKeyword \n ${warrning}`,
3685
4236
  });
3686
- Logger({ level: "WARN", message: warrning });
3687
4237
  }
3688
4238
 
3689
4239
  const query_params = {};
@@ -3693,37 +4243,49 @@ class Catalog {
3693
4243
  "put",
3694
4244
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
3695
4245
  query_params,
3696
- body
4246
+ body,
4247
+ requestHeaders,
4248
+ { responseHeaders }
3697
4249
  );
3698
4250
 
4251
+ let responseData = response;
4252
+ if (responseHeaders) {
4253
+ responseData = response[0];
4254
+ }
4255
+
3699
4256
  const {
3700
4257
  error: res_error,
3701
- } = CatalogModel.GetAutocompleteWordsResponse().validate(response, {
3702
- abortEarly: false,
3703
- allowUnknown: false,
3704
- });
4258
+ } = CatalogPlatformModel.GetAutocompleteWordsResponse().validate(
4259
+ responseData,
4260
+ { abortEarly: false, allowUnknown: false }
4261
+ );
3705
4262
 
3706
4263
  if (res_error) {
3707
4264
  Logger({
3708
4265
  level: "WARN",
3709
- message: "Response Validation Warnnings for updateAutocompleteKeyword",
4266
+ message: `Response Validation Warnnings for platform > Catalog > updateAutocompleteKeyword \n ${res_error}`,
3710
4267
  });
3711
- Logger({ level: "WARN", message: res_error });
3712
4268
  }
3713
4269
 
3714
4270
  return response;
3715
4271
  }
3716
4272
 
3717
4273
  /**
3718
- * @param {Object} arg - Arg object.
3719
- * @param {string} arg.id - A `id` is a unique identifier of a collection.
3720
- * @param {UpdateCollection} arg.body
3721
- * @returns {Promise<UpdateCollection>} - Success response
4274
+ * @param {CatalogPlatformApplicationValidator.UpdateCollectionParam} arg - Arg object
4275
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4276
+ * @param {import("../PlatformAPIClient").Options} - Options
4277
+ * @returns {Promise<CatalogPlatformModel.UpdateCollection>} - Success response
4278
+ * @name updateCollection
3722
4279
  * @summary: Update a collection
3723
- * @description: Update a collection by it's id. On successful request, returns the updated collection
4280
+ * @description: Update a collection by it's id. On successful request, returns the updated collection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateCollection/).
3724
4281
  */
3725
- async updateCollection({ id, body } = {}) {
3726
- const { error } = CatalogValidator.updateCollection().validate(
4282
+ async updateCollection(
4283
+ { id, body, requestHeaders } = { requestHeaders: {} },
4284
+ { responseHeaders } = { responseHeaders: false }
4285
+ ) {
4286
+ const {
4287
+ error,
4288
+ } = CatalogPlatformApplicationValidator.updateCollection().validate(
3727
4289
  {
3728
4290
  id,
3729
4291
  body,
@@ -3735,7 +4297,9 @@ class Catalog {
3735
4297
  }
3736
4298
 
3737
4299
  // Showing warrnings if extra unknown parameters are found
3738
- const { error: warrning } = CatalogValidator.updateCollection().validate(
4300
+ const {
4301
+ error: warrning,
4302
+ } = CatalogPlatformApplicationValidator.updateCollection().validate(
3739
4303
  {
3740
4304
  id,
3741
4305
  body,
@@ -3745,9 +4309,8 @@ class Catalog {
3745
4309
  if (warrning) {
3746
4310
  Logger({
3747
4311
  level: "WARN",
3748
- message: "Parameter Validation warrnings for updateCollection",
4312
+ message: `Parameter Validation warrnings for platform > Catalog > updateCollection \n ${warrning}`,
3749
4313
  });
3750
- Logger({ level: "WARN", message: warrning });
3751
4314
  }
3752
4315
 
3753
4316
  const query_params = {};
@@ -3757,12 +4320,19 @@ class Catalog {
3757
4320
  "put",
3758
4321
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/`,
3759
4322
  query_params,
3760
- body
4323
+ body,
4324
+ requestHeaders,
4325
+ { responseHeaders }
3761
4326
  );
3762
4327
 
4328
+ let responseData = response;
4329
+ if (responseHeaders) {
4330
+ responseData = response[0];
4331
+ }
4332
+
3763
4333
  const {
3764
4334
  error: res_error,
3765
- } = CatalogModel.UpdateCollection().validate(response, {
4335
+ } = CatalogPlatformModel.UpdateCollection().validate(responseData, {
3766
4336
  abortEarly: false,
3767
4337
  allowUnknown: false,
3768
4338
  });
@@ -3770,23 +4340,31 @@ class Catalog {
3770
4340
  if (res_error) {
3771
4341
  Logger({
3772
4342
  level: "WARN",
3773
- message: "Response Validation Warnnings for updateCollection",
4343
+ message: `Response Validation Warnnings for platform > Catalog > updateCollection \n ${res_error}`,
3774
4344
  });
3775
- Logger({ level: "WARN", message: res_error });
3776
4345
  }
3777
4346
 
3778
4347
  return response;
3779
4348
  }
3780
4349
 
3781
4350
  /**
3782
- * @param {Object} arg - Arg object.
3783
- * @param {DefaultKeyRequest} arg.body
3784
- * @returns {Promise<ConfigSuccessResponse>} - Success response
4351
+ * @param {CatalogPlatformApplicationValidator.UpdateDefaultSortParam} arg
4352
+ * - Arg object
4353
+ *
4354
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4355
+ * @param {import("../PlatformAPIClient").Options} - Options
4356
+ * @returns {Promise<CatalogPlatformModel.ConfigSuccessResponse>} - Success response
4357
+ * @name updateDefaultSort
3785
4358
  * @summary: Update the default sort key configuration for the application.
3786
- * @description: Update the default sort key configuration for the application.
4359
+ * @description: Update the default sort key configuration for the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateDefaultSort/).
3787
4360
  */
3788
- async updateDefaultSort({ body } = {}) {
3789
- const { error } = CatalogValidator.updateDefaultSort().validate(
4361
+ async updateDefaultSort(
4362
+ { body, requestHeaders } = { requestHeaders: {} },
4363
+ { responseHeaders } = { responseHeaders: false }
4364
+ ) {
4365
+ const {
4366
+ error,
4367
+ } = CatalogPlatformApplicationValidator.updateDefaultSort().validate(
3790
4368
  {
3791
4369
  body,
3792
4370
  },
@@ -3797,7 +4375,9 @@ class Catalog {
3797
4375
  }
3798
4376
 
3799
4377
  // Showing warrnings if extra unknown parameters are found
3800
- const { error: warrning } = CatalogValidator.updateDefaultSort().validate(
4378
+ const {
4379
+ error: warrning,
4380
+ } = CatalogPlatformApplicationValidator.updateDefaultSort().validate(
3801
4381
  {
3802
4382
  body,
3803
4383
  },
@@ -3806,9 +4386,8 @@ class Catalog {
3806
4386
  if (warrning) {
3807
4387
  Logger({
3808
4388
  level: "WARN",
3809
- message: "Parameter Validation warrnings for updateDefaultSort",
4389
+ message: `Parameter Validation warrnings for platform > Catalog > updateDefaultSort \n ${warrning}`,
3810
4390
  });
3811
- Logger({ level: "WARN", message: warrning });
3812
4391
  }
3813
4392
 
3814
4393
  const query_params = {};
@@ -3818,12 +4397,19 @@ class Catalog {
3818
4397
  "post",
3819
4398
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/sort/default_key`,
3820
4399
  query_params,
3821
- body
4400
+ body,
4401
+ requestHeaders,
4402
+ { responseHeaders }
3822
4403
  );
3823
4404
 
4405
+ let responseData = response;
4406
+ if (responseHeaders) {
4407
+ responseData = response[0];
4408
+ }
4409
+
3824
4410
  const {
3825
4411
  error: res_error,
3826
- } = CatalogModel.ConfigSuccessResponse().validate(response, {
4412
+ } = CatalogPlatformModel.ConfigSuccessResponse().validate(responseData, {
3827
4413
  abortEarly: false,
3828
4414
  allowUnknown: false,
3829
4415
  });
@@ -3831,27 +4417,31 @@ class Catalog {
3831
4417
  if (res_error) {
3832
4418
  Logger({
3833
4419
  level: "WARN",
3834
- message: "Response Validation Warnnings for updateDefaultSort",
4420
+ message: `Response Validation Warnnings for platform > Catalog > updateDefaultSort \n ${res_error}`,
3835
4421
  });
3836
- Logger({ level: "WARN", message: res_error });
3837
4422
  }
3838
4423
 
3839
4424
  return response;
3840
4425
  }
3841
4426
 
3842
4427
  /**
3843
- * @param {Object} arg - Arg object.
3844
- * @param {string} arg.configType - A `config_type` is a unique identifier
3845
- * for a particular group configuration type.
3846
- * @param {string} arg.groupSlug - A `group_slug` is a unique identifier of
3847
- * a particular configuration.
3848
- * @param {AppConfigurationDetail} arg.body
3849
- * @returns {Promise<AppConfigurationDetail>} - Success response
4428
+ * @param {CatalogPlatformApplicationValidator.UpdateGroupConfigurationParam} arg
4429
+ * - Arg object
4430
+ *
4431
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4432
+ * @param {import("../PlatformAPIClient").Options} - Options
4433
+ * @returns {Promise<CatalogPlatformModel.AppConfigurationDetail>} - Success response
4434
+ * @name updateGroupConfiguration
3850
4435
  * @summary: Update the group configurations for the application.
3851
- * @description: Update the group configurations for the application.
4436
+ * @description: Update the group configurations for the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateGroupConfiguration/).
3852
4437
  */
3853
- async updateGroupConfiguration({ configType, groupSlug, body } = {}) {
3854
- const { error } = CatalogValidator.updateGroupConfiguration().validate(
4438
+ async updateGroupConfiguration(
4439
+ { configType, groupSlug, body, requestHeaders } = { requestHeaders: {} },
4440
+ { responseHeaders } = { responseHeaders: false }
4441
+ ) {
4442
+ const {
4443
+ error,
4444
+ } = CatalogPlatformApplicationValidator.updateGroupConfiguration().validate(
3855
4445
  {
3856
4446
  configType,
3857
4447
  groupSlug,
@@ -3866,7 +4456,7 @@ class Catalog {
3866
4456
  // Showing warrnings if extra unknown parameters are found
3867
4457
  const {
3868
4458
  error: warrning,
3869
- } = CatalogValidator.updateGroupConfiguration().validate(
4459
+ } = CatalogPlatformApplicationValidator.updateGroupConfiguration().validate(
3870
4460
  {
3871
4461
  configType,
3872
4462
  groupSlug,
@@ -3877,9 +4467,8 @@ class Catalog {
3877
4467
  if (warrning) {
3878
4468
  Logger({
3879
4469
  level: "WARN",
3880
- message: "Parameter Validation warrnings for updateGroupConfiguration",
4470
+ message: `Parameter Validation warrnings for platform > Catalog > updateGroupConfiguration \n ${warrning}`,
3881
4471
  });
3882
- Logger({ level: "WARN", message: warrning });
3883
4472
  }
3884
4473
 
3885
4474
  const query_params = {};
@@ -3889,12 +4478,19 @@ class Catalog {
3889
4478
  "put",
3890
4479
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups/${groupSlug}`,
3891
4480
  query_params,
3892
- body
4481
+ body,
4482
+ requestHeaders,
4483
+ { responseHeaders }
3893
4484
  );
3894
4485
 
4486
+ let responseData = response;
4487
+ if (responseHeaders) {
4488
+ responseData = response[0];
4489
+ }
4490
+
3895
4491
  const {
3896
4492
  error: res_error,
3897
- } = CatalogModel.AppConfigurationDetail().validate(response, {
4493
+ } = CatalogPlatformModel.AppConfigurationDetail().validate(responseData, {
3898
4494
  abortEarly: false,
3899
4495
  allowUnknown: false,
3900
4496
  });
@@ -3902,27 +4498,31 @@ class Catalog {
3902
4498
  if (res_error) {
3903
4499
  Logger({
3904
4500
  level: "WARN",
3905
- message: "Response Validation Warnnings for updateGroupConfiguration",
4501
+ message: `Response Validation Warnnings for platform > Catalog > updateGroupConfiguration \n ${res_error}`,
3906
4502
  });
3907
- Logger({ level: "WARN", message: res_error });
3908
4503
  }
3909
4504
 
3910
4505
  return response;
3911
4506
  }
3912
4507
 
3913
4508
  /**
3914
- * @param {Object} arg - Arg object.
3915
- * @param {string} arg.configType - A `config_type` is a unique identifier
3916
- * for a particular listing configuration type.
3917
- * @param {string} arg.configId - A `config_id` is a unique identifier of a
3918
- * particular configuration.
3919
- * @param {AppConfigurationsSort} arg.body
3920
- * @returns {Promise<AppConfigurationsSort>} - Success response
4509
+ * @param {CatalogPlatformApplicationValidator.UpdateListingConfigurationParam} arg
4510
+ * - Arg object
4511
+ *
4512
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4513
+ * @param {import("../PlatformAPIClient").Options} - Options
4514
+ * @returns {Promise<CatalogPlatformModel.AppConfigurationsSort>} - Success response
4515
+ * @name updateListingConfiguration
3921
4516
  * @summary: Update configuration for listings
3922
- * @description: Update configuration for listing.
4517
+ * @description: Update configuration for listing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateListingConfiguration/).
3923
4518
  */
3924
- async updateListingConfiguration({ configType, configId, body } = {}) {
3925
- const { error } = CatalogValidator.updateListingConfiguration().validate(
4519
+ async updateListingConfiguration(
4520
+ { configType, configId, body, requestHeaders } = { requestHeaders: {} },
4521
+ { responseHeaders } = { responseHeaders: false }
4522
+ ) {
4523
+ const {
4524
+ error,
4525
+ } = CatalogPlatformApplicationValidator.updateListingConfiguration().validate(
3926
4526
  {
3927
4527
  configType,
3928
4528
  configId,
@@ -3937,7 +4537,7 @@ class Catalog {
3937
4537
  // Showing warrnings if extra unknown parameters are found
3938
4538
  const {
3939
4539
  error: warrning,
3940
- } = CatalogValidator.updateListingConfiguration().validate(
4540
+ } = CatalogPlatformApplicationValidator.updateListingConfiguration().validate(
3941
4541
  {
3942
4542
  configType,
3943
4543
  configId,
@@ -3948,10 +4548,8 @@ class Catalog {
3948
4548
  if (warrning) {
3949
4549
  Logger({
3950
4550
  level: "WARN",
3951
- message:
3952
- "Parameter Validation warrnings for updateListingConfiguration",
4551
+ message: `Parameter Validation warrnings for platform > Catalog > updateListingConfiguration \n ${warrning}`,
3953
4552
  });
3954
- Logger({ level: "WARN", message: warrning });
3955
4553
  }
3956
4554
 
3957
4555
  const query_params = {};
@@ -3961,12 +4559,19 @@ class Catalog {
3961
4559
  "put",
3962
4560
  `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/item/${configId}/`,
3963
4561
  query_params,
3964
- body
4562
+ body,
4563
+ requestHeaders,
4564
+ { responseHeaders }
3965
4565
  );
3966
4566
 
4567
+ let responseData = response;
4568
+ if (responseHeaders) {
4569
+ responseData = response[0];
4570
+ }
4571
+
3967
4572
  const {
3968
4573
  error: res_error,
3969
- } = CatalogModel.AppConfigurationsSort().validate(response, {
4574
+ } = CatalogPlatformModel.AppConfigurationsSort().validate(responseData, {
3970
4575
  abortEarly: false,
3971
4576
  allowUnknown: false,
3972
4577
  });
@@ -3974,25 +4579,31 @@ class Catalog {
3974
4579
  if (res_error) {
3975
4580
  Logger({
3976
4581
  level: "WARN",
3977
- message: "Response Validation Warnnings for updateListingConfiguration",
4582
+ message: `Response Validation Warnnings for platform > Catalog > updateListingConfiguration \n ${res_error}`,
3978
4583
  });
3979
- Logger({ level: "WARN", message: res_error });
3980
4584
  }
3981
4585
 
3982
4586
  return response;
3983
4587
  }
3984
4588
 
3985
4589
  /**
3986
- * @param {Object} arg - Arg object.
3987
- * @param {string} arg.id - A `id` is a unique identifier for a particular
3988
- * detail. Pass the `id` of the keywords which you want to delete.
3989
- * @param {CreateSearchKeyword} arg.body
3990
- * @returns {Promise<GetSearchWordsData>} - Success response
4590
+ * @param {CatalogPlatformApplicationValidator.UpdateSearchKeywordsParam} arg
4591
+ * - Arg object
4592
+ *
4593
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4594
+ * @param {import("../PlatformAPIClient").Options} - Options
4595
+ * @returns {Promise<CatalogPlatformModel.GetSearchWordsData>} - Success response
4596
+ * @name updateSearchKeywords
3991
4597
  * @summary: Update Search Keyword
3992
- * @description: Update Search Keyword by its id. On successful request, returns the updated collection
4598
+ * @description: Update Search Keyword by its id. On successful request, returns the updated collection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSearchKeywords/).
3993
4599
  */
3994
- async updateSearchKeywords({ id, body } = {}) {
3995
- const { error } = CatalogValidator.updateSearchKeywords().validate(
4600
+ async updateSearchKeywords(
4601
+ { id, body, requestHeaders } = { requestHeaders: {} },
4602
+ { responseHeaders } = { responseHeaders: false }
4603
+ ) {
4604
+ const {
4605
+ error,
4606
+ } = CatalogPlatformApplicationValidator.updateSearchKeywords().validate(
3996
4607
  {
3997
4608
  id,
3998
4609
  body,
@@ -4006,7 +4617,7 @@ class Catalog {
4006
4617
  // Showing warrnings if extra unknown parameters are found
4007
4618
  const {
4008
4619
  error: warrning,
4009
- } = CatalogValidator.updateSearchKeywords().validate(
4620
+ } = CatalogPlatformApplicationValidator.updateSearchKeywords().validate(
4010
4621
  {
4011
4622
  id,
4012
4623
  body,
@@ -4016,9 +4627,8 @@ class Catalog {
4016
4627
  if (warrning) {
4017
4628
  Logger({
4018
4629
  level: "WARN",
4019
- message: "Parameter Validation warrnings for updateSearchKeywords",
4630
+ message: `Parameter Validation warrnings for platform > Catalog > updateSearchKeywords \n ${warrning}`,
4020
4631
  });
4021
- Logger({ level: "WARN", message: warrning });
4022
4632
  }
4023
4633
 
4024
4634
  const query_params = {};
@@ -4028,12 +4638,19 @@ class Catalog {
4028
4638
  "put",
4029
4639
  `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
4030
4640
  query_params,
4031
- body
4641
+ body,
4642
+ requestHeaders,
4643
+ { responseHeaders }
4032
4644
  );
4033
4645
 
4646
+ let responseData = response;
4647
+ if (responseHeaders) {
4648
+ responseData = response[0];
4649
+ }
4650
+
4034
4651
  const {
4035
4652
  error: res_error,
4036
- } = CatalogModel.GetSearchWordsData().validate(response, {
4653
+ } = CatalogPlatformModel.GetSearchWordsData().validate(responseData, {
4037
4654
  abortEarly: false,
4038
4655
  allowUnknown: false,
4039
4656
  });
@@ -4041,9 +4658,8 @@ class Catalog {
4041
4658
  if (res_error) {
4042
4659
  Logger({
4043
4660
  level: "WARN",
4044
- message: "Response Validation Warnnings for updateSearchKeywords",
4661
+ message: `Response Validation Warnnings for platform > Catalog > updateSearchKeywords \n ${res_error}`,
4045
4662
  });
4046
- Logger({ level: "WARN", message: res_error });
4047
4663
  }
4048
4664
 
4049
4665
  return response;