@gofynd/fdk-client-javascript 1.1.6 → 1.2.0

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