@gofynd/fdk-client-javascript 0.1.37 → 1.0.1

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 (353) hide show
  1. package/README.md +24 -0
  2. package/application.d.ts +2 -1
  3. package/application.js +2 -1
  4. package/documentation/application/CART.md +315 -289
  5. package/documentation/application/CATALOG.md +438 -415
  6. package/documentation/application/FILESTORAGE.md +2 -0
  7. package/documentation/application/LEAD.md +18 -18
  8. package/documentation/application/LOGISTIC.md +45 -45
  9. package/documentation/application/ORDER.md +277 -277
  10. package/documentation/application/PAYMENT.md +251 -251
  11. package/documentation/application/POSCART.md +318 -292
  12. package/documentation/application/REWARDS.md +1 -0
  13. package/documentation/application/USER.md +19 -14
  14. package/documentation/platform/CART.md +465 -462
  15. package/documentation/platform/CATALOG.md +2792 -2711
  16. package/documentation/platform/COMPANYPROFILE.md +200 -362
  17. package/documentation/platform/DISCOUNT.md +86 -0
  18. package/documentation/platform/FILESTORAGE.md +2 -0
  19. package/documentation/platform/LEAD.md +60 -60
  20. package/documentation/platform/ORDER.md +1451 -1654
  21. package/documentation/platform/PAYMENT.md +94 -94
  22. package/documentation/platform/REWARDS.md +145 -0
  23. package/documentation/platform/USER.md +24 -14
  24. package/index.d.ts +4 -1
  25. package/index.js +13 -4
  26. package/package.json +9 -9
  27. package/platform.d.ts +2 -1
  28. package/platform.js +3 -2
  29. package/public.d.ts +1 -0
  30. package/public.js +3 -2
  31. package/sdk/application/ApplicationAPIClient.js +3 -1
  32. package/sdk/application/ApplicationClient.d.ts +16 -16
  33. package/sdk/application/ApplicationClient.js +32 -16
  34. package/sdk/application/ApplicationConfig.js +3 -2
  35. package/sdk/application/ApplicationModels.d.ts +0 -832
  36. package/sdk/application/ApplicationModels.js +3 -10574
  37. package/sdk/application/{client → Cart}/CartApplicationClient.d.ts +9 -3
  38. package/sdk/application/{client → Cart}/CartApplicationClient.js +316 -8
  39. package/sdk/application/Cart/CartApplicationModel.d.ts +81 -0
  40. package/sdk/application/Cart/CartApplicationModel.js +1136 -0
  41. package/sdk/application/{models/CartValidator.js → Cart/CartApplicationValidator.js} +17 -12
  42. package/sdk/application/{client → Catalog}/CatalogApplicationClient.d.ts +8 -5
  43. package/sdk/application/{client → Catalog}/CatalogApplicationClient.js +389 -8
  44. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +117 -0
  45. package/sdk/application/Catalog/CatalogApplicationModel.js +1606 -0
  46. package/sdk/application/{models/CatalogValidator.js → Catalog/CatalogApplicationValidator.js} +4 -1
  47. package/sdk/application/{client → Common}/CommonApplicationClient.js +24 -2
  48. package/sdk/application/Common/CommonApplicationModel.d.ts +20 -0
  49. package/sdk/application/Common/CommonApplicationModel.js +228 -0
  50. package/sdk/{platform/models/CommonValidator.js → application/Common/CommonApplicationValidator.js} +3 -1
  51. package/sdk/application/{client → Communication}/CommunicationApplicationClient.js +43 -2
  52. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +15 -0
  53. package/sdk/application/Communication/CommunicationApplicationModel.js +144 -0
  54. package/sdk/application/{models/CommunicationValidator.js → Communication/CommunicationApplicationValidator.js} +5 -3
  55. package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.js +202 -2
  56. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +111 -0
  57. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1182 -0
  58. package/sdk/application/{models/ConfigurationValidator.js → Configuration/ConfigurationApplicationValidator.js} +4 -2
  59. package/sdk/application/{client → Content}/ContentApplicationClient.js +217 -2
  60. package/sdk/application/Content/ContentApplicationModel.d.ts +105 -0
  61. package/sdk/application/Content/ContentApplicationModel.js +1349 -0
  62. package/sdk/application/{models/ContentValidator.js → Content/ContentApplicationValidator.js} +3 -1
  63. package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.js +35 -2
  64. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +21 -0
  65. package/sdk/application/FileStorage/FileStorageApplicationModel.js +244 -0
  66. package/sdk/application/{models/FileStorageValidator.js → FileStorage/FileStorageApplicationValidator.js} +6 -4
  67. package/sdk/application/{client → Lead}/LeadApplicationClient.js +83 -2
  68. package/sdk/application/Lead/LeadApplicationModel.d.ts +55 -0
  69. package/sdk/application/Lead/LeadApplicationModel.js +690 -0
  70. package/sdk/application/{models/LeadValidator.js → Lead/LeadApplicationValidator.js} +6 -4
  71. package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +46 -2
  72. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +26 -0
  73. package/sdk/application/Logistic/LogisticApplicationModel.js +286 -0
  74. package/sdk/application/{models/LogisticValidator.js → Logistic/LogisticApplicationValidator.js} +5 -3
  75. package/sdk/application/{client → Order}/OrderApplicationClient.js +148 -2
  76. package/sdk/application/Order/OrderApplicationModel.d.ts +67 -0
  77. package/sdk/application/Order/OrderApplicationModel.js +872 -0
  78. package/sdk/application/{models/OrderValidator.js → Order/OrderApplicationValidator.js} +5 -3
  79. package/sdk/application/{client → Payment}/PaymentApplicationClient.js +530 -2
  80. package/sdk/application/Payment/PaymentApplicationModel.d.ts +96 -0
  81. package/sdk/application/Payment/PaymentApplicationModel.js +1318 -0
  82. package/sdk/application/{models/PaymentValidator.js → Payment/PaymentApplicationValidator.js} +25 -23
  83. package/sdk/application/{client → PosCart}/PosCartApplicationClient.d.ts +9 -3
  84. package/sdk/application/{client → PosCart}/PosCartApplicationClient.js +343 -8
  85. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +79 -0
  86. package/sdk/application/PosCart/PosCartApplicationModel.js +1132 -0
  87. package/sdk/application/{models/PosCartValidator.js → PosCart/PosCartApplicationValidator.js} +18 -13
  88. package/sdk/application/{client → Rewards}/RewardsApplicationClient.js +83 -2
  89. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +23 -0
  90. package/sdk/application/Rewards/RewardsApplicationModel.js +276 -0
  91. package/sdk/application/{models/RewardsValidator.js → Rewards/RewardsApplicationValidator.js} +6 -4
  92. package/sdk/application/{client → Share}/ShareApplicationClient.js +89 -2
  93. package/sdk/application/Share/ShareApplicationModel.d.ts +16 -0
  94. package/sdk/application/Share/ShareApplicationModel.js +178 -0
  95. package/sdk/application/{models/ShareValidator.js → Share/ShareApplicationValidator.js} +4 -2
  96. package/sdk/application/{client → Theme}/ThemeApplicationClient.js +46 -2
  97. package/sdk/application/Theme/ThemeApplicationModel.d.ts +49 -0
  98. package/sdk/application/Theme/ThemeApplicationModel.js +486 -0
  99. package/sdk/application/{models/ThemeValidator.js → Theme/ThemeApplicationValidator.js} +3 -1
  100. package/sdk/application/{client → User}/UserApplicationClient.js +407 -2
  101. package/sdk/application/User/UserApplicationModel.d.ts +95 -0
  102. package/sdk/application/User/UserApplicationModel.js +998 -0
  103. package/sdk/application/{models/UserValidator.js → User/UserApplicationValidator.js} +31 -29
  104. package/sdk/application/index.d.ts +18 -0
  105. package/sdk/application/index.js +33 -0
  106. package/sdk/common/AxiosHelper.js +23 -10
  107. package/sdk/common/Logger.d.ts +2 -0
  108. package/sdk/common/Logger.js +6 -0
  109. package/sdk/common/curlHelper.d.ts +2 -0
  110. package/sdk/common/curlHelper.js +95 -0
  111. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +101 -0
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +399 -0
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +11 -0
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +56 -0
  115. package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.js +60 -2
  116. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +23 -0
  117. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +252 -0
  118. package/sdk/platform/{models/AnalyticsValidator.js → Analytics/AnalyticsPlatformValidator.js} +5 -4
  119. package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.js +48 -2
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +18 -0
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +144 -0
  122. package/sdk/platform/{models/AuditTrailValidator.js → AuditTrail/AuditTrailPlatformValidator.js} +3 -2
  123. package/sdk/platform/{client → Billing}/BillingPlatformClient.js +162 -2
  124. package/sdk/platform/Billing/BillingPlatformModel.d.ts +65 -0
  125. package/sdk/platform/Billing/BillingPlatformModel.js +906 -0
  126. package/sdk/platform/{models/BillingValidator.js → Billing/BillingPlatformValidator.js} +6 -5
  127. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +293 -0
  128. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1001 -0
  129. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +20 -0
  130. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +138 -0
  131. package/sdk/platform/Cart/CartPlatformModel.d.ts +104 -0
  132. package/sdk/platform/Cart/CartPlatformModel.js +1516 -0
  133. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +856 -0
  134. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2927 -0
  135. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +56 -0
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +389 -0
  137. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.js +1402 -349
  138. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +317 -0
  139. package/sdk/platform/Catalog/CatalogPlatformModel.js +4702 -0
  140. package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +92 -91
  141. package/sdk/platform/{client → Common}/CommonPlatformClient.js +28 -2
  142. package/sdk/platform/Common/CommonPlatformModel.d.ts +20 -0
  143. package/sdk/platform/Common/CommonPlatformModel.js +228 -0
  144. package/sdk/{application/models/CommonValidator.js → platform/Common/CommonPlatformValidator.js} +2 -1
  145. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +611 -0
  146. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2243 -0
  147. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +43 -0
  148. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +277 -0
  149. package/sdk/platform/{client → Communication}/CommunicationPlatformClient.js +17 -2
  150. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +102 -0
  151. package/sdk/platform/Communication/CommunicationPlatformModel.js +1312 -0
  152. package/sdk/platform/{models/CommunicationValidator.js → Communication/CommunicationPlatformValidator.js} +2 -1
  153. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.d.ts +0 -9
  154. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.js +176 -28
  155. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +44 -0
  156. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +706 -0
  157. package/sdk/platform/{models/CompanyProfileValidator.d.ts → CompanyProfile/CompanyProfilePlatformValidator.d.ts} +0 -1
  158. package/sdk/platform/{models/CompanyProfileValidator.js → CompanyProfile/CompanyProfilePlatformValidator.js} +9 -14
  159. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +309 -0
  160. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1322 -0
  161. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +31 -0
  162. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +164 -0
  163. package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.js +284 -2
  164. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +185 -0
  165. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2072 -0
  166. package/sdk/platform/{models/ConfigurationValidator.js → Configuration/ConfigurationPlatformValidator.js} +9 -8
  167. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +781 -0
  168. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3074 -0
  169. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +71 -0
  170. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +422 -0
  171. package/sdk/platform/Content/ContentPlatformModel.d.ts +105 -0
  172. package/sdk/platform/Content/ContentPlatformModel.js +1349 -0
  173. package/sdk/platform/{client → Discount}/DiscountPlatformClient.d.ts +11 -0
  174. package/sdk/platform/{client → Discount}/DiscountPlatformClient.js +187 -2
  175. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +15 -0
  176. package/sdk/platform/Discount/DiscountPlatformModel.js +176 -0
  177. package/sdk/platform/{models/DiscountValidator.d.ts → Discount/DiscountPlatformValidator.d.ts} +1 -0
  178. package/sdk/platform/{models/DiscountValidator.js → Discount/DiscountPlatformValidator.js} +13 -5
  179. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +114 -0
  180. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +301 -0
  181. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +7 -0
  182. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +38 -0
  183. package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.js +78 -2
  184. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +21 -0
  185. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +244 -0
  186. package/sdk/platform/{models/FileStorageValidator.js → FileStorage/FileStoragePlatformValidator.js} +6 -5
  187. package/sdk/platform/{client → Inventory}/InventoryPlatformClient.js +163 -2
  188. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +62 -0
  189. package/sdk/platform/Inventory/InventoryPlatformModel.js +1178 -0
  190. package/sdk/platform/{models/InventoryValidator.js → Inventory/InventoryPlatformValidator.js} +5 -4
  191. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +138 -0
  192. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +559 -0
  193. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +16 -0
  194. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +90 -0
  195. package/sdk/platform/{client → Lead}/LeadPlatformClient.js +142 -2
  196. package/sdk/platform/Lead/LeadPlatformModel.d.ts +55 -0
  197. package/sdk/platform/Lead/LeadPlatformModel.js +690 -0
  198. package/sdk/platform/{models/LeadValidator.js → Lead/LeadPlatformValidator.js} +7 -6
  199. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +59 -0
  200. package/sdk/platform/Order/OrderPlatformApplicationClient.js +207 -0
  201. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +6 -0
  202. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +37 -0
  203. package/sdk/platform/{client → Order}/OrderPlatformClient.d.ts +24 -55
  204. package/sdk/platform/{client → Order}/OrderPlatformClient.js +693 -146
  205. package/sdk/platform/Order/OrderPlatformModel.d.ts +222 -0
  206. package/sdk/platform/Order/OrderPlatformModel.js +3466 -0
  207. package/sdk/platform/{models/OrderValidator.d.ts → Order/OrderPlatformValidator.d.ts} +2 -3
  208. package/sdk/platform/{models/OrderValidator.js → Order/OrderPlatformValidator.js} +32 -48
  209. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +30 -0
  210. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +100 -0
  211. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +5 -0
  212. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +20 -0
  213. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +7 -0
  214. package/sdk/platform/Partner/PartnerPlatformModel.js +54 -0
  215. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +108 -0
  216. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +498 -0
  217. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +14 -0
  218. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +73 -0
  219. package/sdk/platform/{client → Payment}/PaymentPlatformClient.js +141 -2
  220. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  221. package/sdk/platform/Payment/PaymentPlatformModel.js +552 -0
  222. package/sdk/platform/{models/PaymentValidator.js → Payment/PaymentPlatformValidator.js} +6 -5
  223. package/sdk/platform/PlatformAPIClient.js +2 -1
  224. package/sdk/platform/PlatformApplicationClient.d.ts +2824 -18486
  225. package/sdk/platform/PlatformApplicationClient.js +3772 -13928
  226. package/sdk/platform/PlatformClient.d.ts +2824 -2881
  227. package/sdk/platform/PlatformClient.js +3710 -3145
  228. package/sdk/platform/PlatformConfig.js +2 -1
  229. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +150 -0
  230. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +597 -0
  231. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +16 -0
  232. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +91 -0
  233. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +24 -0
  234. package/sdk/platform/Rewards/RewardsPlatformModel.js +294 -0
  235. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +72 -0
  236. package/sdk/platform/Share/SharePlatformApplicationClient.js +235 -0
  237. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +7 -0
  238. package/sdk/platform/Share/SharePlatformApplicationValidator.js +35 -0
  239. package/sdk/platform/Share/SharePlatformModel.d.ts +15 -0
  240. package/sdk/platform/Share/SharePlatformModel.js +170 -0
  241. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +238 -0
  242. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +997 -0
  243. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +27 -0
  244. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +155 -0
  245. package/sdk/platform/Theme/ThemePlatformModel.d.ts +49 -0
  246. package/sdk/platform/Theme/ThemePlatformModel.js +486 -0
  247. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +121 -0
  248. package/sdk/platform/User/UserPlatformApplicationClient.js +506 -0
  249. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -0
  250. package/sdk/platform/User/UserPlatformApplicationValidator.js +79 -0
  251. package/sdk/platform/User/UserPlatformModel.d.ts +95 -0
  252. package/sdk/platform/User/UserPlatformModel.js +998 -0
  253. package/sdk/platform/{client → Webhook}/WebhookPlatformClient.js +92 -2
  254. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +17 -0
  255. package/sdk/platform/Webhook/WebhookPlatformModel.js +208 -0
  256. package/sdk/platform/{models/WebhookValidator.js → Webhook/WebhookPlatformValidator.js} +4 -3
  257. package/sdk/platform/index.d.ts +24 -0
  258. package/sdk/platform/index.js +45 -0
  259. package/sdk/public/{client → Configuration}/ConfigurationPublicClient.js +26 -1
  260. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +20 -0
  261. package/sdk/public/Configuration/ConfigurationPublicModel.js +230 -0
  262. package/sdk/public/{models/ConfigurationValidator.js → Configuration/ConfigurationPublicValidator.js} +3 -1
  263. package/sdk/public/{client → Inventory}/InventoryPublicClient.js +76 -1
  264. package/sdk/public/Inventory/InventoryPublicModel.d.ts +22 -0
  265. package/sdk/public/Inventory/InventoryPublicModel.js +334 -0
  266. package/sdk/public/{models/InventoryValidator.js → Inventory/InventoryPublicValidator.js} +4 -2
  267. package/sdk/public/PublicClient.d.ts +3 -3
  268. package/sdk/public/PublicClient.js +8 -3
  269. package/sdk/public/{client → Webhook}/WebhookPublicClient.js +30 -1
  270. package/sdk/public/Webhook/WebhookPublicModel.d.ts +17 -0
  271. package/sdk/public/Webhook/WebhookPublicModel.js +208 -0
  272. package/sdk/public/{models/WebhookValidator.js → Webhook/WebhookPublicValidator.js} +4 -2
  273. package/sdk/public/index.d.ts +5 -0
  274. package/sdk/public/index.js +7 -0
  275. package/sdk/platform/PlatformApplicationModels.d.ts +0 -328
  276. package/sdk/platform/PlatformApplicationModels.js +0 -22658
  277. package/sdk/platform/PlatformModels.d.ts +0 -1477
  278. package/sdk/platform/PlatformModels.js +0 -20646
  279. package/sdk/platform/models/CartValidator.d.ts +0 -0
  280. package/sdk/platform/models/CartValidator.js +0 -0
  281. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  282. package/sdk/platform/models/ContentValidator.js +0 -0
  283. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  284. package/sdk/platform/models/PartnerValidator.js +0 -0
  285. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  286. package/sdk/platform/models/RewardsValidator.js +0 -0
  287. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  288. package/sdk/platform/models/ShareValidator.js +0 -0
  289. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  290. package/sdk/platform/models/ThemeValidator.js +0 -0
  291. package/sdk/platform/models/UserValidator.d.ts +0 -0
  292. package/sdk/platform/models/UserValidator.js +0 -0
  293. package/sdk/public/PublicModels.d.ts +0 -50
  294. package/sdk/public/PublicModels.js +0 -712
  295. package/sdk/application/{models/CartValidator.d.ts → Cart/CartApplicationValidator.d.ts} +0 -0
  296. package/sdk/application/{models/CatalogValidator.d.ts → Catalog/CatalogApplicationValidator.d.ts} +0 -0
  297. package/sdk/application/{client → Common}/CommonApplicationClient.d.ts +0 -0
  298. package/sdk/application/{models/CommonValidator.d.ts → Common/CommonApplicationValidator.d.ts} +0 -0
  299. package/sdk/application/{client → Communication}/CommunicationApplicationClient.d.ts +0 -0
  300. package/sdk/application/{models/CommunicationValidator.d.ts → Communication/CommunicationApplicationValidator.d.ts} +0 -0
  301. package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.d.ts +0 -0
  302. package/sdk/application/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationApplicationValidator.d.ts} +0 -0
  303. package/sdk/application/{client → Content}/ContentApplicationClient.d.ts +0 -0
  304. package/sdk/application/{models/ContentValidator.d.ts → Content/ContentApplicationValidator.d.ts} +0 -0
  305. package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.d.ts +0 -0
  306. package/sdk/application/{models/FileStorageValidator.d.ts → FileStorage/FileStorageApplicationValidator.d.ts} +0 -0
  307. package/sdk/application/{client → Lead}/LeadApplicationClient.d.ts +0 -0
  308. package/sdk/application/{models/LeadValidator.d.ts → Lead/LeadApplicationValidator.d.ts} +0 -0
  309. package/sdk/application/{client → Logistic}/LogisticApplicationClient.d.ts +0 -0
  310. package/sdk/application/{models/LogisticValidator.d.ts → Logistic/LogisticApplicationValidator.d.ts} +0 -0
  311. package/sdk/application/{client → Order}/OrderApplicationClient.d.ts +0 -0
  312. package/sdk/application/{models/OrderValidator.d.ts → Order/OrderApplicationValidator.d.ts} +0 -0
  313. package/sdk/application/{client → Payment}/PaymentApplicationClient.d.ts +0 -0
  314. package/sdk/application/{models/PaymentValidator.d.ts → Payment/PaymentApplicationValidator.d.ts} +0 -0
  315. package/sdk/application/{models/PosCartValidator.d.ts → PosCart/PosCartApplicationValidator.d.ts} +0 -0
  316. package/sdk/application/{client → Rewards}/RewardsApplicationClient.d.ts +0 -0
  317. package/sdk/application/{models/RewardsValidator.d.ts → Rewards/RewardsApplicationValidator.d.ts} +0 -0
  318. package/sdk/application/{client → Share}/ShareApplicationClient.d.ts +0 -0
  319. package/sdk/application/{models/ShareValidator.d.ts → Share/ShareApplicationValidator.d.ts} +0 -0
  320. package/sdk/application/{client → Theme}/ThemeApplicationClient.d.ts +0 -0
  321. package/sdk/application/{models/ThemeValidator.d.ts → Theme/ThemeApplicationValidator.d.ts} +0 -0
  322. package/sdk/application/{client → User}/UserApplicationClient.d.ts +0 -0
  323. package/sdk/application/{models/UserValidator.d.ts → User/UserApplicationValidator.d.ts} +0 -0
  324. package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.d.ts +0 -0
  325. package/sdk/platform/{models/AnalyticsValidator.d.ts → Analytics/AnalyticsPlatformValidator.d.ts} +0 -0
  326. package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.d.ts +0 -0
  327. package/sdk/platform/{models/AuditTrailValidator.d.ts → AuditTrail/AuditTrailPlatformValidator.d.ts} +0 -0
  328. package/sdk/platform/{client → Billing}/BillingPlatformClient.d.ts +0 -0
  329. package/sdk/platform/{models/BillingValidator.d.ts → Billing/BillingPlatformValidator.d.ts} +0 -0
  330. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.d.ts +149 -149
  331. package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +21 -21
  332. /package/sdk/platform/{client → Common}/CommonPlatformClient.d.ts +0 -0
  333. /package/sdk/platform/{models/CommonValidator.d.ts → Common/CommonPlatformValidator.d.ts} +0 -0
  334. /package/sdk/platform/{client → Communication}/CommunicationPlatformClient.d.ts +0 -0
  335. /package/sdk/platform/{models/CommunicationValidator.d.ts → Communication/CommunicationPlatformValidator.d.ts} +0 -0
  336. /package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.d.ts +0 -0
  337. /package/sdk/platform/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPlatformValidator.d.ts} +0 -0
  338. /package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.d.ts +0 -0
  339. /package/sdk/platform/{models/FileStorageValidator.d.ts → FileStorage/FileStoragePlatformValidator.d.ts} +0 -0
  340. /package/sdk/platform/{client → Inventory}/InventoryPlatformClient.d.ts +0 -0
  341. /package/sdk/platform/{models/InventoryValidator.d.ts → Inventory/InventoryPlatformValidator.d.ts} +0 -0
  342. /package/sdk/platform/{client → Lead}/LeadPlatformClient.d.ts +0 -0
  343. /package/sdk/platform/{models/LeadValidator.d.ts → Lead/LeadPlatformValidator.d.ts} +0 -0
  344. /package/sdk/platform/{client → Payment}/PaymentPlatformClient.d.ts +0 -0
  345. /package/sdk/platform/{models/PaymentValidator.d.ts → Payment/PaymentPlatformValidator.d.ts} +0 -0
  346. /package/sdk/platform/{client → Webhook}/WebhookPlatformClient.d.ts +0 -0
  347. /package/sdk/platform/{models/WebhookValidator.d.ts → Webhook/WebhookPlatformValidator.d.ts} +0 -0
  348. /package/sdk/public/{client → Configuration}/ConfigurationPublicClient.d.ts +0 -0
  349. /package/sdk/public/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPublicValidator.d.ts} +0 -0
  350. /package/sdk/public/{client → Inventory}/InventoryPublicClient.d.ts +0 -0
  351. /package/sdk/public/{models/InventoryValidator.d.ts → Inventory/InventoryPublicValidator.d.ts} +0 -0
  352. /package/sdk/public/{client → Webhook}/WebhookPublicClient.d.ts +0 -0
  353. /package/sdk/public/{models/WebhookValidator.d.ts → Webhook/WebhookPublicValidator.d.ts} +0 -0
@@ -0,0 +1,2927 @@
1
+ const Paginator = require("../../common/Paginator");
2
+ const PlatformAPIClient = require("../PlatformAPIClient");
3
+ const { FDKClientValidationError } = require("../../common/FDKError");
4
+ const CatalogValidator = require("./CatalogPlatformApplicationValidator");
5
+
6
+ class Catalog {
7
+ constructor(config, applicationId) {
8
+ this.config = config;
9
+ this.applicationId = applicationId;
10
+ }
11
+
12
+ /**
13
+ * @param {Object} arg - Arg object.
14
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
15
+ * detail. Pass the `id` of the keywords which you want to retrieve.
16
+ * @summary: Get a Search Keywords Details
17
+ * @description: Get the details of a words by its `id`. If successful, returns a Collection resource in the response body specified in `GetSearchWordsDetailResponseSchema`
18
+ */
19
+ getSearchKeywords({ id } = {}) {
20
+ const { error } = CatalogValidator.getSearchKeywords().validate(
21
+ {
22
+ id,
23
+ },
24
+ { abortEarly: false, allowUnknown: true }
25
+ );
26
+ if (error) {
27
+ return Promise.reject(new FDKClientValidationError(error));
28
+ }
29
+
30
+ // Showing warrnings if extra unknown parameters are found
31
+ const { error: warrning } = CatalogValidator.getSearchKeywords().validate(
32
+ {
33
+ id,
34
+ },
35
+ { abortEarly: false, allowUnknown: false }
36
+ );
37
+ if (warrning) {
38
+ console.log("Parameter Validation warrnings for getSearchKeywords");
39
+ console.log(warrning);
40
+ }
41
+
42
+ const query_params = {};
43
+
44
+ return PlatformAPIClient.execute(
45
+ this.config,
46
+ "get",
47
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
48
+ query_params,
49
+ undefined
50
+ );
51
+ }
52
+
53
+ /**
54
+ * @param {Object} arg - Arg object.
55
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
56
+ * detail. Pass the `id` of the keywords which you want to delete.
57
+ * @param {CreateSearchKeyword} arg.body
58
+ * @summary: Update Search Keyword
59
+ * @description: Update Search Keyword by its id. On successful request, returns the updated collection
60
+ */
61
+ updateSearchKeywords({ id, body } = {}) {
62
+ const { error } = CatalogValidator.updateSearchKeywords().validate(
63
+ {
64
+ id,
65
+ body,
66
+ },
67
+ { abortEarly: false, allowUnknown: true }
68
+ );
69
+ if (error) {
70
+ return Promise.reject(new FDKClientValidationError(error));
71
+ }
72
+
73
+ // Showing warrnings if extra unknown parameters are found
74
+ const {
75
+ error: warrning,
76
+ } = CatalogValidator.updateSearchKeywords().validate(
77
+ {
78
+ id,
79
+ body,
80
+ },
81
+ { abortEarly: false, allowUnknown: false }
82
+ );
83
+ if (warrning) {
84
+ console.log("Parameter Validation warrnings for updateSearchKeywords");
85
+ console.log(warrning);
86
+ }
87
+
88
+ const query_params = {};
89
+
90
+ return PlatformAPIClient.execute(
91
+ this.config,
92
+ "put",
93
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
94
+ query_params,
95
+ body
96
+ );
97
+ }
98
+
99
+ /**
100
+ * @param {Object} arg - Arg object.
101
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
102
+ * detail. Pass the `id` of the keywords which you want to delete.
103
+ * @summary: Delete a Search Keywords
104
+ * @description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully
105
+ */
106
+ deleteSearchKeywords({ id } = {}) {
107
+ const { error } = CatalogValidator.deleteSearchKeywords().validate(
108
+ {
109
+ id,
110
+ },
111
+ { abortEarly: false, allowUnknown: true }
112
+ );
113
+ if (error) {
114
+ return Promise.reject(new FDKClientValidationError(error));
115
+ }
116
+
117
+ // Showing warrnings if extra unknown parameters are found
118
+ const {
119
+ error: warrning,
120
+ } = CatalogValidator.deleteSearchKeywords().validate(
121
+ {
122
+ id,
123
+ },
124
+ { abortEarly: false, allowUnknown: false }
125
+ );
126
+ if (warrning) {
127
+ console.log("Parameter Validation warrnings for deleteSearchKeywords");
128
+ console.log(warrning);
129
+ }
130
+
131
+ const query_params = {};
132
+
133
+ return PlatformAPIClient.execute(
134
+ this.config,
135
+ "delete",
136
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
137
+ query_params,
138
+ undefined
139
+ );
140
+ }
141
+
142
+ /**
143
+ * @param {Object} arg - Arg object.
144
+ * @summary: List all Search Custom Keyword Listing
145
+ * @description: Custom Search Keyword allows you to map conditions with keywords to give you the ultimate results
146
+ */
147
+ getAllSearchKeyword({} = {}) {
148
+ const { error } = CatalogValidator.getAllSearchKeyword().validate(
149
+ {},
150
+ { abortEarly: false, allowUnknown: true }
151
+ );
152
+ if (error) {
153
+ return Promise.reject(new FDKClientValidationError(error));
154
+ }
155
+
156
+ // Showing warrnings if extra unknown parameters are found
157
+ const { error: warrning } = CatalogValidator.getAllSearchKeyword().validate(
158
+ {},
159
+ { abortEarly: false, allowUnknown: false }
160
+ );
161
+ if (warrning) {
162
+ console.log("Parameter Validation warrnings for getAllSearchKeyword");
163
+ console.log(warrning);
164
+ }
165
+
166
+ const query_params = {};
167
+
168
+ return PlatformAPIClient.execute(
169
+ this.config,
170
+ "get",
171
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/`,
172
+ query_params,
173
+ undefined
174
+ );
175
+ }
176
+
177
+ /**
178
+ * @param {Object} arg - Arg object.
179
+ * @param {CreateSearchKeyword} arg.body
180
+ * @summary: Add a Custom Search Keywords
181
+ * @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`
182
+ */
183
+ createCustomKeyword({ body } = {}) {
184
+ const { error } = CatalogValidator.createCustomKeyword().validate(
185
+ {
186
+ body,
187
+ },
188
+ { abortEarly: false, allowUnknown: true }
189
+ );
190
+ if (error) {
191
+ return Promise.reject(new FDKClientValidationError(error));
192
+ }
193
+
194
+ // Showing warrnings if extra unknown parameters are found
195
+ const { error: warrning } = CatalogValidator.createCustomKeyword().validate(
196
+ {
197
+ body,
198
+ },
199
+ { abortEarly: false, allowUnknown: false }
200
+ );
201
+ if (warrning) {
202
+ console.log("Parameter Validation warrnings for createCustomKeyword");
203
+ console.log(warrning);
204
+ }
205
+
206
+ const query_params = {};
207
+
208
+ return PlatformAPIClient.execute(
209
+ this.config,
210
+ "post",
211
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/`,
212
+ query_params,
213
+ body
214
+ );
215
+ }
216
+
217
+ /**
218
+ * @param {Object} arg - Arg object.
219
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
220
+ * detail. Pass the `id` of the keywords which you want to retrieve.
221
+ * @summary: Get a Autocomplete Keywords Details
222
+ * @description: Get the details of a words by its `id`. If successful, returns a keywords resource in the response body specified in `GetAutocompleteWordsResponseSchema`
223
+ */
224
+ getAutocompleteKeywordDetail({ id } = {}) {
225
+ const { error } = CatalogValidator.getAutocompleteKeywordDetail().validate(
226
+ {
227
+ id,
228
+ },
229
+ { abortEarly: false, allowUnknown: true }
230
+ );
231
+ if (error) {
232
+ return Promise.reject(new FDKClientValidationError(error));
233
+ }
234
+
235
+ // Showing warrnings if extra unknown parameters are found
236
+ const {
237
+ error: warrning,
238
+ } = CatalogValidator.getAutocompleteKeywordDetail().validate(
239
+ {
240
+ id,
241
+ },
242
+ { abortEarly: false, allowUnknown: false }
243
+ );
244
+ if (warrning) {
245
+ console.log(
246
+ "Parameter Validation warrnings for getAutocompleteKeywordDetail"
247
+ );
248
+ console.log(warrning);
249
+ }
250
+
251
+ const query_params = {};
252
+
253
+ return PlatformAPIClient.execute(
254
+ this.config,
255
+ "get",
256
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
257
+ query_params,
258
+ undefined
259
+ );
260
+ }
261
+
262
+ /**
263
+ * @param {Object} arg - Arg object.
264
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
265
+ * detail. Pass the `id` of the keywords which you want to delete.
266
+ * @param {CreateAutocompleteKeyword} arg.body
267
+ * @summary: Create & Update Autocomplete Keyword
268
+ * @description: Update a mapping by it's id. On successful request, returns the updated Keyword mapping
269
+ */
270
+ updateAutocompleteKeyword({ id, body } = {}) {
271
+ const { error } = CatalogValidator.updateAutocompleteKeyword().validate(
272
+ {
273
+ id,
274
+ body,
275
+ },
276
+ { abortEarly: false, allowUnknown: true }
277
+ );
278
+ if (error) {
279
+ return Promise.reject(new FDKClientValidationError(error));
280
+ }
281
+
282
+ // Showing warrnings if extra unknown parameters are found
283
+ const {
284
+ error: warrning,
285
+ } = CatalogValidator.updateAutocompleteKeyword().validate(
286
+ {
287
+ id,
288
+ body,
289
+ },
290
+ { abortEarly: false, allowUnknown: false }
291
+ );
292
+ if (warrning) {
293
+ console.log(
294
+ "Parameter Validation warrnings for updateAutocompleteKeyword"
295
+ );
296
+ console.log(warrning);
297
+ }
298
+
299
+ const query_params = {};
300
+
301
+ return PlatformAPIClient.execute(
302
+ this.config,
303
+ "put",
304
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
305
+ query_params,
306
+ body
307
+ );
308
+ }
309
+
310
+ /**
311
+ * @param {Object} arg - Arg object.
312
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
313
+ * detail. Pass the `id` of the keywords which you want to delete.
314
+ * @summary: Delete a Autocomplete Keywords
315
+ * @description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully
316
+ */
317
+ deleteAutocompleteKeyword({ id } = {}) {
318
+ const { error } = CatalogValidator.deleteAutocompleteKeyword().validate(
319
+ {
320
+ id,
321
+ },
322
+ { abortEarly: false, allowUnknown: true }
323
+ );
324
+ if (error) {
325
+ return Promise.reject(new FDKClientValidationError(error));
326
+ }
327
+
328
+ // Showing warrnings if extra unknown parameters are found
329
+ const {
330
+ error: warrning,
331
+ } = CatalogValidator.deleteAutocompleteKeyword().validate(
332
+ {
333
+ id,
334
+ },
335
+ { abortEarly: false, allowUnknown: false }
336
+ );
337
+ if (warrning) {
338
+ console.log(
339
+ "Parameter Validation warrnings for deleteAutocompleteKeyword"
340
+ );
341
+ console.log(warrning);
342
+ }
343
+
344
+ const query_params = {};
345
+
346
+ return PlatformAPIClient.execute(
347
+ this.config,
348
+ "delete",
349
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
350
+ query_params,
351
+ undefined
352
+ );
353
+ }
354
+
355
+ /**
356
+ * @param {Object} arg - Arg object.
357
+ * @summary: List all Autocomplete Keyword Listing
358
+ * @description: Custom Autocomplete Keyword allows you to map conditions with keywords to give you the ultimate results
359
+ */
360
+ getAutocompleteConfig({} = {}) {
361
+ const { error } = CatalogValidator.getAutocompleteConfig().validate(
362
+ {},
363
+ { abortEarly: false, allowUnknown: true }
364
+ );
365
+ if (error) {
366
+ return Promise.reject(new FDKClientValidationError(error));
367
+ }
368
+
369
+ // Showing warrnings if extra unknown parameters are found
370
+ const {
371
+ error: warrning,
372
+ } = CatalogValidator.getAutocompleteConfig().validate(
373
+ {},
374
+ { abortEarly: false, allowUnknown: false }
375
+ );
376
+ if (warrning) {
377
+ console.log("Parameter Validation warrnings for getAutocompleteConfig");
378
+ console.log(warrning);
379
+ }
380
+
381
+ const query_params = {};
382
+
383
+ return PlatformAPIClient.execute(
384
+ this.config,
385
+ "get",
386
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/`,
387
+ query_params,
388
+ undefined
389
+ );
390
+ }
391
+
392
+ /**
393
+ * @param {Object} arg - Arg object.
394
+ * @param {CreateAutocompleteKeyword} arg.body
395
+ * @summary: Add a Custom Autocomplete Keywords
396
+ * @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`
397
+ */
398
+ createCustomAutocompleteRule({ body } = {}) {
399
+ const { error } = CatalogValidator.createCustomAutocompleteRule().validate(
400
+ {
401
+ body,
402
+ },
403
+ { abortEarly: false, allowUnknown: true }
404
+ );
405
+ if (error) {
406
+ return Promise.reject(new FDKClientValidationError(error));
407
+ }
408
+
409
+ // Showing warrnings if extra unknown parameters are found
410
+ const {
411
+ error: warrning,
412
+ } = CatalogValidator.createCustomAutocompleteRule().validate(
413
+ {
414
+ body,
415
+ },
416
+ { abortEarly: false, allowUnknown: false }
417
+ );
418
+ if (warrning) {
419
+ console.log(
420
+ "Parameter Validation warrnings for createCustomAutocompleteRule"
421
+ );
422
+ console.log(warrning);
423
+ }
424
+
425
+ const query_params = {};
426
+
427
+ return PlatformAPIClient.execute(
428
+ this.config,
429
+ "post",
430
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/`,
431
+ query_params,
432
+ body
433
+ );
434
+ }
435
+
436
+ /**
437
+ * @param {Object} arg - Arg object.
438
+ * @param {string} arg.itemId - Product id for a particular product.
439
+ * @summary: Get company application product data.
440
+ * @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.
441
+ */
442
+ getAppProduct({ itemId } = {}) {
443
+ const { error } = CatalogValidator.getAppProduct().validate(
444
+ {
445
+ itemId,
446
+ },
447
+ { abortEarly: false, allowUnknown: true }
448
+ );
449
+ if (error) {
450
+ return Promise.reject(new FDKClientValidationError(error));
451
+ }
452
+
453
+ // Showing warrnings if extra unknown parameters are found
454
+ const { error: warrning } = CatalogValidator.getAppProduct().validate(
455
+ {
456
+ itemId,
457
+ },
458
+ { abortEarly: false, allowUnknown: false }
459
+ );
460
+ if (warrning) {
461
+ console.log("Parameter Validation warrnings for getAppProduct");
462
+ console.log(warrning);
463
+ }
464
+
465
+ const query_params = {};
466
+
467
+ return PlatformAPIClient.execute(
468
+ this.config,
469
+ "get",
470
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product/${itemId}/`,
471
+ query_params,
472
+ undefined
473
+ );
474
+ }
475
+
476
+ /**
477
+ * @param {Object} arg - Arg object.
478
+ * @param {string} arg.itemId - Product id for which the custom_meta is associated.
479
+ * @param {ApplicationItemMeta} arg.body
480
+ * @summary: Update a single custom meta.
481
+ * @description: This API helps to update data associated to a item custom meta.
482
+ */
483
+ updateAppProduct({ itemId, body } = {}) {
484
+ const { error } = CatalogValidator.updateAppProduct().validate(
485
+ {
486
+ itemId,
487
+ body,
488
+ },
489
+ { abortEarly: false, allowUnknown: true }
490
+ );
491
+ if (error) {
492
+ return Promise.reject(new FDKClientValidationError(error));
493
+ }
494
+
495
+ // Showing warrnings if extra unknown parameters are found
496
+ const { error: warrning } = CatalogValidator.updateAppProduct().validate(
497
+ {
498
+ itemId,
499
+ body,
500
+ },
501
+ { abortEarly: false, allowUnknown: false }
502
+ );
503
+ if (warrning) {
504
+ console.log("Parameter Validation warrnings for updateAppProduct");
505
+ console.log(warrning);
506
+ }
507
+
508
+ const query_params = {};
509
+
510
+ return PlatformAPIClient.execute(
511
+ this.config,
512
+ "patch",
513
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product/${itemId}/`,
514
+ query_params,
515
+ body
516
+ );
517
+ }
518
+
519
+ /**
520
+ * @param {Object} arg - Arg object.
521
+ * @param {string} arg.configType - A `config_type` is an identifier that
522
+ * defines a specific type of configuration.
523
+ * @param {string} [arg.templateSlug] - Get configuration list filtered by
524
+ * `template_slug` string. This is for the details and comparision groups.
525
+ * @summary: Get configuration metadata details for catalog for admin panel
526
+ * @description: Get the configuraion metadata details for catalog.
527
+ */
528
+ getConfigurationMetadata({ configType, templateSlug } = {}) {
529
+ const { error } = CatalogValidator.getConfigurationMetadata().validate(
530
+ {
531
+ configType,
532
+ templateSlug,
533
+ },
534
+ { abortEarly: false, allowUnknown: true }
535
+ );
536
+ if (error) {
537
+ return Promise.reject(new FDKClientValidationError(error));
538
+ }
539
+
540
+ // Showing warrnings if extra unknown parameters are found
541
+ const {
542
+ error: warrning,
543
+ } = CatalogValidator.getConfigurationMetadata().validate(
544
+ {
545
+ configType,
546
+ templateSlug,
547
+ },
548
+ { abortEarly: false, allowUnknown: false }
549
+ );
550
+ if (warrning) {
551
+ console.log(
552
+ "Parameter Validation warrnings for getConfigurationMetadata"
553
+ );
554
+ console.log(warrning);
555
+ }
556
+
557
+ const query_params = {};
558
+ query_params["template_slug"] = templateSlug;
559
+
560
+ return PlatformAPIClient.execute(
561
+ this.config,
562
+ "get",
563
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/metadata/`,
564
+ query_params,
565
+ undefined
566
+ );
567
+ }
568
+
569
+ /**
570
+ * @param {Object} arg - Arg object.
571
+ * @param {string} arg.configType - A `config_type` is an identifier that
572
+ * defines a specific type of configuration.
573
+ * @param {number} [arg.pageNo] - The page number to navigate through the
574
+ * given set of results.
575
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
576
+ * page. Default is 12.
577
+ * @param {string} [arg.search] - Get configuration list filtered by `search` string.
578
+ * @param {string} [arg.templateSlug] - Get configuration list filtered by
579
+ * `template_slug` string. This is for the details and comparision groups.
580
+ * @summary: Get the details of the application configured configurations of group config types.
581
+ * @description: Get the details of the application configured configurations of group config types.
582
+ */
583
+ getGroupConfigurations({
584
+ configType,
585
+ pageNo,
586
+ pageSize,
587
+ search,
588
+ templateSlug,
589
+ } = {}) {
590
+ const { error } = CatalogValidator.getGroupConfigurations().validate(
591
+ {
592
+ configType,
593
+ pageNo,
594
+ pageSize,
595
+ search,
596
+ templateSlug,
597
+ },
598
+ { abortEarly: false, allowUnknown: true }
599
+ );
600
+ if (error) {
601
+ return Promise.reject(new FDKClientValidationError(error));
602
+ }
603
+
604
+ // Showing warrnings if extra unknown parameters are found
605
+ const {
606
+ error: warrning,
607
+ } = CatalogValidator.getGroupConfigurations().validate(
608
+ {
609
+ configType,
610
+ pageNo,
611
+ pageSize,
612
+ search,
613
+ templateSlug,
614
+ },
615
+ { abortEarly: false, allowUnknown: false }
616
+ );
617
+ if (warrning) {
618
+ console.log("Parameter Validation warrnings for getGroupConfigurations");
619
+ console.log(warrning);
620
+ }
621
+
622
+ const query_params = {};
623
+ query_params["page_no"] = pageNo;
624
+ query_params["page_size"] = pageSize;
625
+ query_params["search"] = search;
626
+ query_params["template_slug"] = templateSlug;
627
+
628
+ return PlatformAPIClient.execute(
629
+ this.config,
630
+ "get",
631
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups`,
632
+ query_params,
633
+ undefined
634
+ );
635
+ }
636
+
637
+ /**
638
+ * @param {Object} arg - Arg object.
639
+ * @param {string} arg.configType - A `config_type` is a unique identifier
640
+ * for a particular group configuration type.
641
+ * @param {AppConfigurationDetail} arg.body
642
+ * @summary: Create configuration for Group config types.
643
+ * @description: Create configuration for Group config types.
644
+ */
645
+ createGroupConfiguration({ configType, body } = {}) {
646
+ const { error } = CatalogValidator.createGroupConfiguration().validate(
647
+ {
648
+ configType,
649
+ body,
650
+ },
651
+ { abortEarly: false, allowUnknown: true }
652
+ );
653
+ if (error) {
654
+ return Promise.reject(new FDKClientValidationError(error));
655
+ }
656
+
657
+ // Showing warrnings if extra unknown parameters are found
658
+ const {
659
+ error: warrning,
660
+ } = CatalogValidator.createGroupConfiguration().validate(
661
+ {
662
+ configType,
663
+ body,
664
+ },
665
+ { abortEarly: false, allowUnknown: false }
666
+ );
667
+ if (warrning) {
668
+ console.log(
669
+ "Parameter Validation warrnings for createGroupConfiguration"
670
+ );
671
+ console.log(warrning);
672
+ }
673
+
674
+ const query_params = {};
675
+
676
+ return PlatformAPIClient.execute(
677
+ this.config,
678
+ "post",
679
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups`,
680
+ query_params,
681
+ body
682
+ );
683
+ }
684
+
685
+ /**
686
+ * @param {Object} arg - Arg object.
687
+ * @param {string} arg.configType - A `config_type` is a unique identifier
688
+ * for a particular group configuration type.
689
+ * @param {string} arg.groupSlug - A `group_slug` is a unique identifier of
690
+ * a particular configuration.
691
+ * @param {AppConfigurationDetail} arg.body
692
+ * @summary: Update the group configurations for the application.
693
+ * @description: Update the group configurations for the application.
694
+ */
695
+ updateGroupConfiguration({ configType, groupSlug, body } = {}) {
696
+ const { error } = CatalogValidator.updateGroupConfiguration().validate(
697
+ {
698
+ configType,
699
+ groupSlug,
700
+ body,
701
+ },
702
+ { abortEarly: false, allowUnknown: true }
703
+ );
704
+ if (error) {
705
+ return Promise.reject(new FDKClientValidationError(error));
706
+ }
707
+
708
+ // Showing warrnings if extra unknown parameters are found
709
+ const {
710
+ error: warrning,
711
+ } = CatalogValidator.updateGroupConfiguration().validate(
712
+ {
713
+ configType,
714
+ groupSlug,
715
+ body,
716
+ },
717
+ { abortEarly: false, allowUnknown: false }
718
+ );
719
+ if (warrning) {
720
+ console.log(
721
+ "Parameter Validation warrnings for updateGroupConfiguration"
722
+ );
723
+ console.log(warrning);
724
+ }
725
+
726
+ const query_params = {};
727
+
728
+ return PlatformAPIClient.execute(
729
+ this.config,
730
+ "put",
731
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups/${groupSlug}`,
732
+ query_params,
733
+ body
734
+ );
735
+ }
736
+
737
+ /**
738
+ * @param {Object} arg - Arg object.
739
+ * @param {string} arg.configType - A `config_type` is a unique identifier
740
+ * for a particular group configuration type.
741
+ * @param {string} arg.groupSlug - A `group_slug` is a unique identifier of
742
+ * a particular configuration.
743
+ * @summary: Delete configuration of the product config type of the application.
744
+ * @description: Delete configuration of the product config type of the application.
745
+ */
746
+ deleteGroupConfiguration({ configType, groupSlug } = {}) {
747
+ const { error } = CatalogValidator.deleteGroupConfiguration().validate(
748
+ {
749
+ configType,
750
+ groupSlug,
751
+ },
752
+ { abortEarly: false, allowUnknown: true }
753
+ );
754
+ if (error) {
755
+ return Promise.reject(new FDKClientValidationError(error));
756
+ }
757
+
758
+ // Showing warrnings if extra unknown parameters are found
759
+ const {
760
+ error: warrning,
761
+ } = CatalogValidator.deleteGroupConfiguration().validate(
762
+ {
763
+ configType,
764
+ groupSlug,
765
+ },
766
+ { abortEarly: false, allowUnknown: false }
767
+ );
768
+ if (warrning) {
769
+ console.log(
770
+ "Parameter Validation warrnings for deleteGroupConfiguration"
771
+ );
772
+ console.log(warrning);
773
+ }
774
+
775
+ const query_params = {};
776
+
777
+ return PlatformAPIClient.execute(
778
+ this.config,
779
+ "delete",
780
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups/${groupSlug}`,
781
+ query_params,
782
+ undefined
783
+ );
784
+ }
785
+
786
+ /**
787
+ * @param {Object} arg - Arg object.
788
+ * @param {string} arg.configType - A `config_type` is an identifier that
789
+ * defines a specific type of configuration.
790
+ * @param {number} [arg.pageNo] - The page number to navigate through the
791
+ * given set of results.
792
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
793
+ * page. Default is 12.
794
+ * @param {string} [arg.search] - Get configuration list filtered by `search` string.
795
+ * @summary: Get the details of the application configured configurations of listing config types.
796
+ * @description: Get the details of the application configured configurations of listing config types.
797
+ */
798
+ getListingConfigurations({ configType, pageNo, pageSize, search } = {}) {
799
+ const { error } = CatalogValidator.getListingConfigurations().validate(
800
+ {
801
+ configType,
802
+ pageNo,
803
+ pageSize,
804
+ search,
805
+ },
806
+ { abortEarly: false, allowUnknown: true }
807
+ );
808
+ if (error) {
809
+ return Promise.reject(new FDKClientValidationError(error));
810
+ }
811
+
812
+ // Showing warrnings if extra unknown parameters are found
813
+ const {
814
+ error: warrning,
815
+ } = CatalogValidator.getListingConfigurations().validate(
816
+ {
817
+ configType,
818
+ pageNo,
819
+ pageSize,
820
+ search,
821
+ },
822
+ { abortEarly: false, allowUnknown: false }
823
+ );
824
+ if (warrning) {
825
+ console.log(
826
+ "Parameter Validation warrnings for getListingConfigurations"
827
+ );
828
+ console.log(warrning);
829
+ }
830
+
831
+ const query_params = {};
832
+ query_params["page_no"] = pageNo;
833
+ query_params["page_size"] = pageSize;
834
+ query_params["search"] = search;
835
+
836
+ return PlatformAPIClient.execute(
837
+ this.config,
838
+ "get",
839
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/`,
840
+ query_params,
841
+ undefined
842
+ );
843
+ }
844
+
845
+ /**
846
+ * @param {Object} arg - Arg object.
847
+ * @param {string} arg.configType - A `config_type` is a unique identifier
848
+ * for a particular listing configuration type.
849
+ * @param {AppConfigurationsSort} arg.body
850
+ * @summary: Add configuration for listings
851
+ * @description: Add configuration for listing.
852
+ */
853
+ createListingConfiguration({ configType, body } = {}) {
854
+ const { error } = CatalogValidator.createListingConfiguration().validate(
855
+ {
856
+ configType,
857
+ body,
858
+ },
859
+ { abortEarly: false, allowUnknown: true }
860
+ );
861
+ if (error) {
862
+ return Promise.reject(new FDKClientValidationError(error));
863
+ }
864
+
865
+ // Showing warrnings if extra unknown parameters are found
866
+ const {
867
+ error: warrning,
868
+ } = CatalogValidator.createListingConfiguration().validate(
869
+ {
870
+ configType,
871
+ body,
872
+ },
873
+ { abortEarly: false, allowUnknown: false }
874
+ );
875
+ if (warrning) {
876
+ console.log(
877
+ "Parameter Validation warrnings for createListingConfiguration"
878
+ );
879
+ console.log(warrning);
880
+ }
881
+
882
+ const query_params = {};
883
+
884
+ return PlatformAPIClient.execute(
885
+ this.config,
886
+ "post",
887
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/`,
888
+ query_params,
889
+ body
890
+ );
891
+ }
892
+
893
+ /**
894
+ * @param {Object} arg - Arg object.
895
+ * @param {string} arg.configType - A `config_type` is a unique identifier
896
+ * for a particular listing configuration type.
897
+ * @param {string} arg.configId - A `config_id` is a unique identifier of a
898
+ * particular configuration.
899
+ * @param {AppConfigurationsSort} arg.body
900
+ * @summary: Update configuration for listings
901
+ * @description: Update configuration for listing.
902
+ */
903
+ updateListingConfiguration({ configType, configId, body } = {}) {
904
+ const { error } = CatalogValidator.updateListingConfiguration().validate(
905
+ {
906
+ configType,
907
+ configId,
908
+ body,
909
+ },
910
+ { abortEarly: false, allowUnknown: true }
911
+ );
912
+ if (error) {
913
+ return Promise.reject(new FDKClientValidationError(error));
914
+ }
915
+
916
+ // Showing warrnings if extra unknown parameters are found
917
+ const {
918
+ error: warrning,
919
+ } = CatalogValidator.updateListingConfiguration().validate(
920
+ {
921
+ configType,
922
+ configId,
923
+ body,
924
+ },
925
+ { abortEarly: false, allowUnknown: false }
926
+ );
927
+ if (warrning) {
928
+ console.log(
929
+ "Parameter Validation warrnings for updateListingConfiguration"
930
+ );
931
+ console.log(warrning);
932
+ }
933
+
934
+ const query_params = {};
935
+
936
+ return PlatformAPIClient.execute(
937
+ this.config,
938
+ "put",
939
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/item/${configId}/`,
940
+ query_params,
941
+ body
942
+ );
943
+ }
944
+
945
+ /**
946
+ * @param {Object} arg - Arg object.
947
+ * @param {string} arg.configType - A `config_type` is a unique identifier
948
+ * for a particular listing configuration type.
949
+ * @param {string} arg.configId - A `config_id` is a unique identifier of a
950
+ * particular configuration.
951
+ * @summary: Delete configuration for listings
952
+ * @description: Delete configuration for listing.
953
+ */
954
+ deleteListingConfiguration({ configType, configId } = {}) {
955
+ const { error } = CatalogValidator.deleteListingConfiguration().validate(
956
+ {
957
+ configType,
958
+ configId,
959
+ },
960
+ { abortEarly: false, allowUnknown: true }
961
+ );
962
+ if (error) {
963
+ return Promise.reject(new FDKClientValidationError(error));
964
+ }
965
+
966
+ // Showing warrnings if extra unknown parameters are found
967
+ const {
968
+ error: warrning,
969
+ } = CatalogValidator.deleteListingConfiguration().validate(
970
+ {
971
+ configType,
972
+ configId,
973
+ },
974
+ { abortEarly: false, allowUnknown: false }
975
+ );
976
+ if (warrning) {
977
+ console.log(
978
+ "Parameter Validation warrnings for deleteListingConfiguration"
979
+ );
980
+ console.log(warrning);
981
+ }
982
+
983
+ const query_params = {};
984
+
985
+ return PlatformAPIClient.execute(
986
+ this.config,
987
+ "delete",
988
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/item/${configId}/`,
989
+ query_params,
990
+ undefined
991
+ );
992
+ }
993
+
994
+ /**
995
+ * @param {Object} arg - Arg object.
996
+ * @param {AllowSingleRequest} arg.body
997
+ * @summary: Update allow single flag for filters of the application.
998
+ * @description: Update allow single flag for filters of the application.
999
+ */
1000
+ updateAllowSingle({ body } = {}) {
1001
+ const { error } = CatalogValidator.updateAllowSingle().validate(
1002
+ {
1003
+ body,
1004
+ },
1005
+ { abortEarly: false, allowUnknown: true }
1006
+ );
1007
+ if (error) {
1008
+ return Promise.reject(new FDKClientValidationError(error));
1009
+ }
1010
+
1011
+ // Showing warrnings if extra unknown parameters are found
1012
+ const { error: warrning } = CatalogValidator.updateAllowSingle().validate(
1013
+ {
1014
+ body,
1015
+ },
1016
+ { abortEarly: false, allowUnknown: false }
1017
+ );
1018
+ if (warrning) {
1019
+ console.log("Parameter Validation warrnings for updateAllowSingle");
1020
+ console.log(warrning);
1021
+ }
1022
+
1023
+ const query_params = {};
1024
+
1025
+ return PlatformAPIClient.execute(
1026
+ this.config,
1027
+ "post",
1028
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/filter/allow_single`,
1029
+ query_params,
1030
+ body
1031
+ );
1032
+ }
1033
+
1034
+ /**
1035
+ * @param {Object} arg - Arg object.
1036
+ * @param {DefaultKeyRequest} arg.body
1037
+ * @summary: Update the default sort key configuration for the application.
1038
+ * @description: Update the default sort key configuration for the application.
1039
+ */
1040
+ updateDefaultSort({ body } = {}) {
1041
+ const { error } = CatalogValidator.updateDefaultSort().validate(
1042
+ {
1043
+ body,
1044
+ },
1045
+ { abortEarly: false, allowUnknown: true }
1046
+ );
1047
+ if (error) {
1048
+ return Promise.reject(new FDKClientValidationError(error));
1049
+ }
1050
+
1051
+ // Showing warrnings if extra unknown parameters are found
1052
+ const { error: warrning } = CatalogValidator.updateDefaultSort().validate(
1053
+ {
1054
+ body,
1055
+ },
1056
+ { abortEarly: false, allowUnknown: false }
1057
+ );
1058
+ if (warrning) {
1059
+ console.log("Parameter Validation warrnings for updateDefaultSort");
1060
+ console.log(warrning);
1061
+ }
1062
+
1063
+ const query_params = {};
1064
+
1065
+ return PlatformAPIClient.execute(
1066
+ this.config,
1067
+ "post",
1068
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/sort/default_key`,
1069
+ query_params,
1070
+ body
1071
+ );
1072
+ }
1073
+
1074
+ /**
1075
+ * @param {Object} arg - Arg object.
1076
+ * @summary: Get configuration meta details for catalog for admin panel
1077
+ * @description: configuration meta details for catalog.
1078
+ */
1079
+ getCatalogConfiguration({} = {}) {
1080
+ const { error } = CatalogValidator.getCatalogConfiguration().validate(
1081
+ {},
1082
+ { abortEarly: false, allowUnknown: true }
1083
+ );
1084
+ if (error) {
1085
+ return Promise.reject(new FDKClientValidationError(error));
1086
+ }
1087
+
1088
+ // Showing warrnings if extra unknown parameters are found
1089
+ const {
1090
+ error: warrning,
1091
+ } = CatalogValidator.getCatalogConfiguration().validate(
1092
+ {},
1093
+ { abortEarly: false, allowUnknown: false }
1094
+ );
1095
+ if (warrning) {
1096
+ console.log("Parameter Validation warrnings for getCatalogConfiguration");
1097
+ console.log(warrning);
1098
+ }
1099
+
1100
+ const query_params = {};
1101
+
1102
+ return PlatformAPIClient.execute(
1103
+ this.config,
1104
+ "get",
1105
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/metadata/`,
1106
+ query_params,
1107
+ undefined
1108
+ );
1109
+ }
1110
+
1111
+ /**
1112
+ * @param {Object} arg - Arg object.
1113
+ * @summary: Get configured details for catalog
1114
+ * @description: configured details for catalog.
1115
+ */
1116
+ getConfigurations({} = {}) {
1117
+ const { error } = CatalogValidator.getConfigurations().validate(
1118
+ {},
1119
+ { abortEarly: false, allowUnknown: true }
1120
+ );
1121
+ if (error) {
1122
+ return Promise.reject(new FDKClientValidationError(error));
1123
+ }
1124
+
1125
+ // Showing warrnings if extra unknown parameters are found
1126
+ const { error: warrning } = CatalogValidator.getConfigurations().validate(
1127
+ {},
1128
+ { abortEarly: false, allowUnknown: false }
1129
+ );
1130
+ if (warrning) {
1131
+ console.log("Parameter Validation warrnings for getConfigurations");
1132
+ console.log(warrning);
1133
+ }
1134
+
1135
+ const query_params = {};
1136
+
1137
+ return PlatformAPIClient.execute(
1138
+ this.config,
1139
+ "get",
1140
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/`,
1141
+ query_params,
1142
+ undefined
1143
+ );
1144
+ }
1145
+
1146
+ /**
1147
+ * @param {Object} arg - Arg object.
1148
+ * @param {AppConfiguration} arg.body
1149
+ * @summary: Add configuration for products & listings
1150
+ * @description: Add configuration for products & listing.
1151
+ */
1152
+ createConfigurationProductListing({ body } = {}) {
1153
+ const {
1154
+ error,
1155
+ } = CatalogValidator.createConfigurationProductListing().validate(
1156
+ {
1157
+ body,
1158
+ },
1159
+ { abortEarly: false, allowUnknown: true }
1160
+ );
1161
+ if (error) {
1162
+ return Promise.reject(new FDKClientValidationError(error));
1163
+ }
1164
+
1165
+ // Showing warrnings if extra unknown parameters are found
1166
+ const {
1167
+ error: warrning,
1168
+ } = CatalogValidator.createConfigurationProductListing().validate(
1169
+ {
1170
+ body,
1171
+ },
1172
+ { abortEarly: false, allowUnknown: false }
1173
+ );
1174
+ if (warrning) {
1175
+ console.log(
1176
+ "Parameter Validation warrnings for createConfigurationProductListing"
1177
+ );
1178
+ console.log(warrning);
1179
+ }
1180
+
1181
+ const query_params = {};
1182
+
1183
+ return PlatformAPIClient.execute(
1184
+ this.config,
1185
+ "post",
1186
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/`,
1187
+ query_params,
1188
+ body
1189
+ );
1190
+ }
1191
+
1192
+ /**
1193
+ * @param {Object} arg - Arg object.
1194
+ * @param {string} arg.type - Type can be brands, categories etc.
1195
+ * @summary: Get configured details for catalog
1196
+ * @description: configured details for catalog.
1197
+ */
1198
+ getConfigurationByType({ type } = {}) {
1199
+ const { error } = CatalogValidator.getConfigurationByType().validate(
1200
+ {
1201
+ type,
1202
+ },
1203
+ { abortEarly: false, allowUnknown: true }
1204
+ );
1205
+ if (error) {
1206
+ return Promise.reject(new FDKClientValidationError(error));
1207
+ }
1208
+
1209
+ // Showing warrnings if extra unknown parameters are found
1210
+ const {
1211
+ error: warrning,
1212
+ } = CatalogValidator.getConfigurationByType().validate(
1213
+ {
1214
+ type,
1215
+ },
1216
+ { abortEarly: false, allowUnknown: false }
1217
+ );
1218
+ if (warrning) {
1219
+ console.log("Parameter Validation warrnings for getConfigurationByType");
1220
+ console.log(warrning);
1221
+ }
1222
+
1223
+ const query_params = {};
1224
+
1225
+ return PlatformAPIClient.execute(
1226
+ this.config,
1227
+ "get",
1228
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${type}/`,
1229
+ query_params,
1230
+ undefined
1231
+ );
1232
+ }
1233
+
1234
+ /**
1235
+ * @param {Object} arg - Arg object.
1236
+ * @param {string} arg.type - Type can be brands, categories etc.
1237
+ * @param {AppConfiguration} arg.body
1238
+ * @summary: Add configuration for categories and brands
1239
+ * @description: Add configuration for categories & brands.
1240
+ */
1241
+ createConfigurationByType({ type, body } = {}) {
1242
+ const { error } = CatalogValidator.createConfigurationByType().validate(
1243
+ {
1244
+ type,
1245
+ body,
1246
+ },
1247
+ { abortEarly: false, allowUnknown: true }
1248
+ );
1249
+ if (error) {
1250
+ return Promise.reject(new FDKClientValidationError(error));
1251
+ }
1252
+
1253
+ // Showing warrnings if extra unknown parameters are found
1254
+ const {
1255
+ error: warrning,
1256
+ } = CatalogValidator.createConfigurationByType().validate(
1257
+ {
1258
+ type,
1259
+ body,
1260
+ },
1261
+ { abortEarly: false, allowUnknown: false }
1262
+ );
1263
+ if (warrning) {
1264
+ console.log(
1265
+ "Parameter Validation warrnings for createConfigurationByType"
1266
+ );
1267
+ console.log(warrning);
1268
+ }
1269
+
1270
+ const query_params = {};
1271
+
1272
+ return PlatformAPIClient.execute(
1273
+ this.config,
1274
+ "post",
1275
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${type}/`,
1276
+ query_params,
1277
+ body
1278
+ );
1279
+ }
1280
+
1281
+ /**
1282
+ * @param {Object} arg - Arg object.
1283
+ * @summary: Get query filters to configure a collection
1284
+ * @description: Get query filters to configure a collection
1285
+ */
1286
+ getQueryFilters({} = {}) {
1287
+ const { error } = CatalogValidator.getQueryFilters().validate(
1288
+ {},
1289
+ { abortEarly: false, allowUnknown: true }
1290
+ );
1291
+ if (error) {
1292
+ return Promise.reject(new FDKClientValidationError(error));
1293
+ }
1294
+
1295
+ // Showing warrnings if extra unknown parameters are found
1296
+ const { error: warrning } = CatalogValidator.getQueryFilters().validate(
1297
+ {},
1298
+ { abortEarly: false, allowUnknown: false }
1299
+ );
1300
+ if (warrning) {
1301
+ console.log("Parameter Validation warrnings for getQueryFilters");
1302
+ console.log(warrning);
1303
+ }
1304
+
1305
+ const query_params = {};
1306
+
1307
+ return PlatformAPIClient.execute(
1308
+ this.config,
1309
+ "get",
1310
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/query-options/`,
1311
+ query_params,
1312
+ undefined
1313
+ );
1314
+ }
1315
+
1316
+ /**
1317
+ * @param {Object} arg - Arg object.
1318
+ * @param {string} [arg.q] - Get collection list filtered by q string,
1319
+ * @param {string} [arg.scheduleStatus] - Get collection list filtered by
1320
+ * scheduled status,
1321
+ * @param {string} [arg.type] - Type of the collections
1322
+ * @param {string[]} [arg.tags] - Each response will contain next_id param,
1323
+ * which should be sent back to make pagination work.
1324
+ * @param {boolean} [arg.isActive] - Get collections filtered by active status.
1325
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1326
+ * given set of results.
1327
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1328
+ * page. Default is 12.
1329
+ * @summary: List all the collections
1330
+ * @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`
1331
+ */
1332
+ getAllCollections({
1333
+ q,
1334
+ scheduleStatus,
1335
+ type,
1336
+ tags,
1337
+ isActive,
1338
+ pageNo,
1339
+ pageSize,
1340
+ } = {}) {
1341
+ const { error } = CatalogValidator.getAllCollections().validate(
1342
+ {
1343
+ q,
1344
+ scheduleStatus,
1345
+ type,
1346
+ tags,
1347
+ isActive,
1348
+ pageNo,
1349
+ pageSize,
1350
+ },
1351
+ { abortEarly: false, allowUnknown: true }
1352
+ );
1353
+ if (error) {
1354
+ return Promise.reject(new FDKClientValidationError(error));
1355
+ }
1356
+
1357
+ // Showing warrnings if extra unknown parameters are found
1358
+ const { error: warrning } = CatalogValidator.getAllCollections().validate(
1359
+ {
1360
+ q,
1361
+ scheduleStatus,
1362
+ type,
1363
+ tags,
1364
+ isActive,
1365
+ pageNo,
1366
+ pageSize,
1367
+ },
1368
+ { abortEarly: false, allowUnknown: false }
1369
+ );
1370
+ if (warrning) {
1371
+ console.log("Parameter Validation warrnings for getAllCollections");
1372
+ console.log(warrning);
1373
+ }
1374
+
1375
+ const query_params = {};
1376
+ query_params["q"] = q;
1377
+ query_params["schedule_status"] = scheduleStatus;
1378
+ query_params["type"] = type;
1379
+ query_params["tags"] = tags;
1380
+ query_params["is_active"] = isActive;
1381
+ query_params["page_no"] = pageNo;
1382
+ query_params["page_size"] = pageSize;
1383
+
1384
+ return PlatformAPIClient.execute(
1385
+ this.config,
1386
+ "get",
1387
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/`,
1388
+ query_params,
1389
+ undefined
1390
+ );
1391
+ }
1392
+
1393
+ /**
1394
+ * @param {Object} arg - Arg object.
1395
+ * @param {CreateCollection} arg.body
1396
+ * @summary: Add a Collection
1397
+ * @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`
1398
+ */
1399
+ createCollection({ body } = {}) {
1400
+ const { error } = CatalogValidator.createCollection().validate(
1401
+ {
1402
+ body,
1403
+ },
1404
+ { abortEarly: false, allowUnknown: true }
1405
+ );
1406
+ if (error) {
1407
+ return Promise.reject(new FDKClientValidationError(error));
1408
+ }
1409
+
1410
+ // Showing warrnings if extra unknown parameters are found
1411
+ const { error: warrning } = CatalogValidator.createCollection().validate(
1412
+ {
1413
+ body,
1414
+ },
1415
+ { abortEarly: false, allowUnknown: false }
1416
+ );
1417
+ if (warrning) {
1418
+ console.log("Parameter Validation warrnings for createCollection");
1419
+ console.log(warrning);
1420
+ }
1421
+
1422
+ const query_params = {};
1423
+
1424
+ return PlatformAPIClient.execute(
1425
+ this.config,
1426
+ "post",
1427
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/`,
1428
+ query_params,
1429
+ body
1430
+ );
1431
+ }
1432
+
1433
+ /**
1434
+ * @param {Object} arg - Arg object.
1435
+ * @param {string} arg.slug - A `slug` is a human readable, URL friendly
1436
+ * unique identifier of an object. Pass the `slug` of the collection which
1437
+ * you want to retrieve.
1438
+ * @summary: Get a particular collection
1439
+ * @description: Get the details of a collection by its `slug`. If successful, returns a Collection resource in the response body specified in `CollectionDetailResponse`
1440
+ */
1441
+ getCollectionDetail({ slug } = {}) {
1442
+ const { error } = CatalogValidator.getCollectionDetail().validate(
1443
+ {
1444
+ slug,
1445
+ },
1446
+ { abortEarly: false, allowUnknown: true }
1447
+ );
1448
+ if (error) {
1449
+ return Promise.reject(new FDKClientValidationError(error));
1450
+ }
1451
+
1452
+ // Showing warrnings if extra unknown parameters are found
1453
+ const { error: warrning } = CatalogValidator.getCollectionDetail().validate(
1454
+ {
1455
+ slug,
1456
+ },
1457
+ { abortEarly: false, allowUnknown: false }
1458
+ );
1459
+ if (warrning) {
1460
+ console.log("Parameter Validation warrnings for getCollectionDetail");
1461
+ console.log(warrning);
1462
+ }
1463
+
1464
+ const query_params = {};
1465
+
1466
+ return PlatformAPIClient.execute(
1467
+ this.config,
1468
+ "get",
1469
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${slug}/`,
1470
+ query_params,
1471
+ undefined
1472
+ );
1473
+ }
1474
+
1475
+ /**
1476
+ * @param {Object} arg - Arg object.
1477
+ * @param {string} arg.id - A `id` is a unique identifier of a collection.
1478
+ * @param {UpdateCollection} arg.body
1479
+ * @summary: Update a collection
1480
+ * @description: Update a collection by it's id. On successful request, returns the updated collection
1481
+ */
1482
+ updateCollection({ id, body } = {}) {
1483
+ const { error } = CatalogValidator.updateCollection().validate(
1484
+ {
1485
+ id,
1486
+ body,
1487
+ },
1488
+ { abortEarly: false, allowUnknown: true }
1489
+ );
1490
+ if (error) {
1491
+ return Promise.reject(new FDKClientValidationError(error));
1492
+ }
1493
+
1494
+ // Showing warrnings if extra unknown parameters are found
1495
+ const { error: warrning } = CatalogValidator.updateCollection().validate(
1496
+ {
1497
+ id,
1498
+ body,
1499
+ },
1500
+ { abortEarly: false, allowUnknown: false }
1501
+ );
1502
+ if (warrning) {
1503
+ console.log("Parameter Validation warrnings for updateCollection");
1504
+ console.log(warrning);
1505
+ }
1506
+
1507
+ const query_params = {};
1508
+
1509
+ return PlatformAPIClient.execute(
1510
+ this.config,
1511
+ "put",
1512
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/`,
1513
+ query_params,
1514
+ body
1515
+ );
1516
+ }
1517
+
1518
+ /**
1519
+ * @param {Object} arg - Arg object.
1520
+ * @param {string} arg.id - A `id` is a unique identifier of a collection.
1521
+ * @summary: Delete a Collection
1522
+ * @description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully
1523
+ */
1524
+ deleteCollection({ id } = {}) {
1525
+ const { error } = CatalogValidator.deleteCollection().validate(
1526
+ {
1527
+ id,
1528
+ },
1529
+ { abortEarly: false, allowUnknown: true }
1530
+ );
1531
+ if (error) {
1532
+ return Promise.reject(new FDKClientValidationError(error));
1533
+ }
1534
+
1535
+ // Showing warrnings if extra unknown parameters are found
1536
+ const { error: warrning } = CatalogValidator.deleteCollection().validate(
1537
+ {
1538
+ id,
1539
+ },
1540
+ { abortEarly: false, allowUnknown: false }
1541
+ );
1542
+ if (warrning) {
1543
+ console.log("Parameter Validation warrnings for deleteCollection");
1544
+ console.log(warrning);
1545
+ }
1546
+
1547
+ const query_params = {};
1548
+
1549
+ return PlatformAPIClient.execute(
1550
+ this.config,
1551
+ "delete",
1552
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/`,
1553
+ query_params,
1554
+ undefined
1555
+ );
1556
+ }
1557
+
1558
+ /**
1559
+ * @param {Object} arg - Arg object.
1560
+ * @param {string} arg.id - A `id` is a unique identifier of a collection.
1561
+ * @param {string} [arg.sortOn] - Each response will contain sort_on param,
1562
+ * which should be sent back to make pagination work.
1563
+ * @param {string} [arg.pageId] - Each response will contain next_id param,
1564
+ * which should be sent back to make pagination work.
1565
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1566
+ * page. Default is 12.
1567
+ * @summary: Get the items for a collection
1568
+ * @description: Get items from a collection specified by its `id`.
1569
+ */
1570
+ getCollectionItems({ id, sortOn, pageId, pageSize } = {}) {
1571
+ const { error } = CatalogValidator.getCollectionItems().validate(
1572
+ {
1573
+ id,
1574
+ sortOn,
1575
+ pageId,
1576
+ pageSize,
1577
+ },
1578
+ { abortEarly: false, allowUnknown: true }
1579
+ );
1580
+ if (error) {
1581
+ return Promise.reject(new FDKClientValidationError(error));
1582
+ }
1583
+
1584
+ // Showing warrnings if extra unknown parameters are found
1585
+ const { error: warrning } = CatalogValidator.getCollectionItems().validate(
1586
+ {
1587
+ id,
1588
+ sortOn,
1589
+ pageId,
1590
+ pageSize,
1591
+ },
1592
+ { abortEarly: false, allowUnknown: false }
1593
+ );
1594
+ if (warrning) {
1595
+ console.log("Parameter Validation warrnings for getCollectionItems");
1596
+ console.log(warrning);
1597
+ }
1598
+
1599
+ const query_params = {};
1600
+ query_params["sort_on"] = sortOn;
1601
+ query_params["page_id"] = pageId;
1602
+ query_params["page_size"] = pageSize;
1603
+
1604
+ return PlatformAPIClient.execute(
1605
+ this.config,
1606
+ "get",
1607
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/items/`,
1608
+ query_params,
1609
+ undefined
1610
+ );
1611
+ }
1612
+
1613
+ /**
1614
+ * @param {Object} arg - Arg object.
1615
+ * @param {string} arg.id - A `id` is a unique identifier of a collection.
1616
+ * @param {CollectionItemRequest} arg.body
1617
+ * @summary: Add items to a collection
1618
+ * @description: Adds items to a collection specified by its `id`. See `CollectionItemRequest` for the list of attributes needed to add items to an collection.
1619
+ */
1620
+ addCollectionItems({ id, body } = {}) {
1621
+ const { error } = CatalogValidator.addCollectionItems().validate(
1622
+ {
1623
+ id,
1624
+ body,
1625
+ },
1626
+ { abortEarly: false, allowUnknown: true }
1627
+ );
1628
+ if (error) {
1629
+ return Promise.reject(new FDKClientValidationError(error));
1630
+ }
1631
+
1632
+ // Showing warrnings if extra unknown parameters are found
1633
+ const { error: warrning } = CatalogValidator.addCollectionItems().validate(
1634
+ {
1635
+ id,
1636
+ body,
1637
+ },
1638
+ { abortEarly: false, allowUnknown: false }
1639
+ );
1640
+ if (warrning) {
1641
+ console.log("Parameter Validation warrnings for addCollectionItems");
1642
+ console.log(warrning);
1643
+ }
1644
+
1645
+ const query_params = {};
1646
+
1647
+ return PlatformAPIClient.execute(
1648
+ this.config,
1649
+ "post",
1650
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/items/`,
1651
+ query_params,
1652
+ body
1653
+ );
1654
+ }
1655
+
1656
+ /**
1657
+ * @param {Object} arg - Arg object.
1658
+ * @param {string} [arg.brand] - Brand slug
1659
+ * @summary: Analytics data of catalog and inventory.
1660
+ * @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.
1661
+ */
1662
+ getCatalogInsights({ brand } = {}) {
1663
+ const { error } = CatalogValidator.getCatalogInsights().validate(
1664
+ {
1665
+ brand,
1666
+ },
1667
+ { abortEarly: false, allowUnknown: true }
1668
+ );
1669
+ if (error) {
1670
+ return Promise.reject(new FDKClientValidationError(error));
1671
+ }
1672
+
1673
+ // Showing warrnings if extra unknown parameters are found
1674
+ const { error: warrning } = CatalogValidator.getCatalogInsights().validate(
1675
+ {
1676
+ brand,
1677
+ },
1678
+ { abortEarly: false, allowUnknown: false }
1679
+ );
1680
+ if (warrning) {
1681
+ console.log("Parameter Validation warrnings for getCatalogInsights");
1682
+ console.log(warrning);
1683
+ }
1684
+
1685
+ const query_params = {};
1686
+ query_params["brand"] = brand;
1687
+
1688
+ return PlatformAPIClient.execute(
1689
+ this.config,
1690
+ "get",
1691
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/analytics/insights/`,
1692
+ query_params,
1693
+ undefined
1694
+ );
1695
+ }
1696
+
1697
+ /**
1698
+ * @param {Object} arg - Arg object.
1699
+ * @param {number} arg.itemId - Item code of the product of which size is to be get.
1700
+ * @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier
1701
+ * or Primary Identifier) of which inventory is to get.
1702
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1703
+ * given set of results
1704
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1705
+ * page. Default is 12.
1706
+ * @param {string} [arg.q] - Search with help of store code.
1707
+ * @param {number[]} [arg.locationIds] - Search by store ids.
1708
+ * @summary: Get Inventory for company
1709
+ * @description: This API allows get Inventory data for particular company grouped by size and store.
1710
+ */
1711
+ getDiscountedInventoryBySizeIdentifier({
1712
+ itemId,
1713
+ sizeIdentifier,
1714
+ pageNo,
1715
+ pageSize,
1716
+ q,
1717
+ locationIds,
1718
+ } = {}) {
1719
+ const {
1720
+ error,
1721
+ } = CatalogValidator.getDiscountedInventoryBySizeIdentifier().validate(
1722
+ {
1723
+ itemId,
1724
+ sizeIdentifier,
1725
+ pageNo,
1726
+ pageSize,
1727
+ q,
1728
+ locationIds,
1729
+ },
1730
+ { abortEarly: false, allowUnknown: true }
1731
+ );
1732
+ if (error) {
1733
+ return Promise.reject(new FDKClientValidationError(error));
1734
+ }
1735
+
1736
+ // Showing warrnings if extra unknown parameters are found
1737
+ const {
1738
+ error: warrning,
1739
+ } = CatalogValidator.getDiscountedInventoryBySizeIdentifier().validate(
1740
+ {
1741
+ itemId,
1742
+ sizeIdentifier,
1743
+ pageNo,
1744
+ pageSize,
1745
+ q,
1746
+ locationIds,
1747
+ },
1748
+ { abortEarly: false, allowUnknown: false }
1749
+ );
1750
+ if (warrning) {
1751
+ console.log(
1752
+ "Parameter Validation warrnings for getDiscountedInventoryBySizeIdentifier"
1753
+ );
1754
+ console.log(warrning);
1755
+ }
1756
+
1757
+ const query_params = {};
1758
+ query_params["page_no"] = pageNo;
1759
+ query_params["page_size"] = pageSize;
1760
+ query_params["q"] = q;
1761
+ query_params["location_ids"] = locationIds;
1762
+
1763
+ return PlatformAPIClient.execute(
1764
+ this.config,
1765
+ "get",
1766
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products/${itemId}/inventory/${sizeIdentifier}`,
1767
+ query_params,
1768
+ undefined
1769
+ );
1770
+ }
1771
+
1772
+ /**
1773
+ * @param {Object} arg - Arg object.
1774
+ * @param {string} [arg.department] - The name of the department. Use this
1775
+ * parameter to filter products by a particular department. See below the
1776
+ * list of available departments. You can retrieve available departments
1777
+ * from the **v1.0/departments/** API
1778
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1779
+ * given set of results
1780
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1781
+ * page. Default is 12.
1782
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
1783
+ * to search brands by brand name.
1784
+ * @param {number[]} [arg.brandId] - Helps to sort the brands list on the
1785
+ * basis of uid list.
1786
+ * @summary: List all the brands
1787
+ * @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`
1788
+ */
1789
+ getApplicationBrands({ department, pageNo, pageSize, q, brandId } = {}) {
1790
+ const { error } = CatalogValidator.getApplicationBrands().validate(
1791
+ {
1792
+ department,
1793
+ pageNo,
1794
+ pageSize,
1795
+ q,
1796
+ brandId,
1797
+ },
1798
+ { abortEarly: false, allowUnknown: true }
1799
+ );
1800
+ if (error) {
1801
+ return Promise.reject(new FDKClientValidationError(error));
1802
+ }
1803
+
1804
+ // Showing warrnings if extra unknown parameters are found
1805
+ const {
1806
+ error: warrning,
1807
+ } = CatalogValidator.getApplicationBrands().validate(
1808
+ {
1809
+ department,
1810
+ pageNo,
1811
+ pageSize,
1812
+ q,
1813
+ brandId,
1814
+ },
1815
+ { abortEarly: false, allowUnknown: false }
1816
+ );
1817
+ if (warrning) {
1818
+ console.log("Parameter Validation warrnings for getApplicationBrands");
1819
+ console.log(warrning);
1820
+ }
1821
+
1822
+ const query_params = {};
1823
+ query_params["department"] = department;
1824
+ query_params["page_no"] = pageNo;
1825
+ query_params["page_size"] = pageSize;
1826
+ query_params["q"] = q;
1827
+ query_params["brand_id"] = brandId;
1828
+
1829
+ return PlatformAPIClient.execute(
1830
+ this.config,
1831
+ "get",
1832
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brands`,
1833
+ query_params,
1834
+ undefined
1835
+ );
1836
+ }
1837
+
1838
+ /**
1839
+ * @param {Object} arg - Arg object.
1840
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
1841
+ * a particular seller account.
1842
+ * @param {string} arg.applicationId - A `application_id` is a unique
1843
+ * identifier for a particular sale channel.
1844
+ * @param {string} [arg.department] - The name of the department. Use this
1845
+ * parameter to filter products by a particular department. See below the
1846
+ * list of available departments. You can retrieve available departments
1847
+ * from the **v1.0/departments/** API
1848
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1849
+ * page. Default is 12.
1850
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
1851
+ * to search brands by brand name.
1852
+ * @param {number[]} [arg.brandId] - Helps to sort the brands list on the
1853
+ * basis of uid list.
1854
+ * @summary: List all the brands
1855
+ * @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`
1856
+ */
1857
+ getApplicationBrandsPaginator({
1858
+ companyId,
1859
+ applicationId,
1860
+ department,
1861
+ pageSize,
1862
+ q,
1863
+ brandId,
1864
+ } = {}) {
1865
+ const paginator = new Paginator();
1866
+ const callback = async () => {
1867
+ const pageId = paginator.nextId;
1868
+ const pageNo = paginator.pageNo;
1869
+ const pageType = "number";
1870
+ const data = await this.getApplicationBrands({
1871
+ companyId: companyId,
1872
+ applicationId: applicationId,
1873
+ department: department,
1874
+ pageNo: pageNo,
1875
+ pageSize: pageSize,
1876
+ q: q,
1877
+ brandId: brandId,
1878
+ });
1879
+ paginator.setPaginator({
1880
+ hasNext: data.page.has_next ? true : false,
1881
+ nextId: data.page.next_id,
1882
+ });
1883
+ return data;
1884
+ };
1885
+ paginator.setCallback(callback.bind(this));
1886
+ return paginator;
1887
+ }
1888
+
1889
+ /**
1890
+ * @param {Object} arg - Arg object.
1891
+ * @summary: List all the departments
1892
+ * @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`
1893
+ */
1894
+ getDepartments({} = {}) {
1895
+ const { error } = CatalogValidator.getDepartments().validate(
1896
+ {},
1897
+ { abortEarly: false, allowUnknown: true }
1898
+ );
1899
+ if (error) {
1900
+ return Promise.reject(new FDKClientValidationError(error));
1901
+ }
1902
+
1903
+ // Showing warrnings if extra unknown parameters are found
1904
+ const { error: warrning } = CatalogValidator.getDepartments().validate(
1905
+ {},
1906
+ { abortEarly: false, allowUnknown: false }
1907
+ );
1908
+ if (warrning) {
1909
+ console.log("Parameter Validation warrnings for getDepartments");
1910
+ console.log(warrning);
1911
+ }
1912
+
1913
+ const query_params = {};
1914
+
1915
+ return PlatformAPIClient.execute(
1916
+ this.config,
1917
+ "get",
1918
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/departments`,
1919
+ query_params,
1920
+ undefined
1921
+ );
1922
+ }
1923
+
1924
+ /**
1925
+ * @param {Object} arg - Arg object.
1926
+ * @param {string} [arg.department] - The name of the department. Use this
1927
+ * parameter to filter products by a particular department. See below the
1928
+ * list of available departments. You can retrieve available departments
1929
+ * from the **v1.0/departments/** API
1930
+ * @summary: List all the categories
1931
+ * @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`
1932
+ */
1933
+ getCategories({ department } = {}) {
1934
+ const { error } = CatalogValidator.getCategories().validate(
1935
+ {
1936
+ department,
1937
+ },
1938
+ { abortEarly: false, allowUnknown: true }
1939
+ );
1940
+ if (error) {
1941
+ return Promise.reject(new FDKClientValidationError(error));
1942
+ }
1943
+
1944
+ // Showing warrnings if extra unknown parameters are found
1945
+ const { error: warrning } = CatalogValidator.getCategories().validate(
1946
+ {
1947
+ department,
1948
+ },
1949
+ { abortEarly: false, allowUnknown: false }
1950
+ );
1951
+ if (warrning) {
1952
+ console.log("Parameter Validation warrnings for getCategories");
1953
+ console.log(warrning);
1954
+ }
1955
+
1956
+ const query_params = {};
1957
+ query_params["department"] = department;
1958
+
1959
+ return PlatformAPIClient.execute(
1960
+ this.config,
1961
+ "get",
1962
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/categories`,
1963
+ query_params,
1964
+ undefined
1965
+ );
1966
+ }
1967
+
1968
+ /**
1969
+ * @param {Object} arg - Arg object.
1970
+ * @param {string} [arg.q] - The search query. This can be a partial or
1971
+ * complete name of a either a product, brand or category
1972
+ * @param {string} [arg.f] - The search filter parameters. All the parameter
1973
+ * filtered from filter parameters will be passed in **f** parameter in
1974
+ * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts**
1975
+ * @param {string} [arg.c] - The search filter parameters for collection
1976
+ * items. All the parameter filtered from filter parameters will be passed
1977
+ * in **c** parameter in this format.
1978
+ * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
1979
+ * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
1980
+ * filter details. This flag is used to fetch all filters
1981
+ * @param {string} [arg.sortOn] - The order to sort the list of products on.
1982
+ * The supported sort parameters are popularity, price, redemption and
1983
+ * discount in either ascending or descending order. See the supported
1984
+ * values below.
1985
+ * @param {string} [arg.pageId] - Each response will contain **page_id**
1986
+ * param, which should be sent back to make pagination work.
1987
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1988
+ * page. Default is 12.
1989
+ * @param {number} [arg.pageNo] - If page_type is number then pass it to
1990
+ * fetch page items. Default is 1.
1991
+ * @param {string} [arg.pageType] - For pagination type should be cursor or
1992
+ * number. Default is cursor.
1993
+ * @param {number[]} [arg.itemIds] - Item Ids of product
1994
+ * @summary: List the products
1995
+ * @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`
1996
+ */
1997
+ getAppicationProducts({
1998
+ q,
1999
+ f,
2000
+ c,
2001
+ filters,
2002
+ sortOn,
2003
+ pageId,
2004
+ pageSize,
2005
+ pageNo,
2006
+ pageType,
2007
+ itemIds,
2008
+ } = {}) {
2009
+ const { error } = CatalogValidator.getAppicationProducts().validate(
2010
+ {
2011
+ q,
2012
+ f,
2013
+ c,
2014
+ filters,
2015
+ sortOn,
2016
+ pageId,
2017
+ pageSize,
2018
+ pageNo,
2019
+ pageType,
2020
+ itemIds,
2021
+ },
2022
+ { abortEarly: false, allowUnknown: true }
2023
+ );
2024
+ if (error) {
2025
+ return Promise.reject(new FDKClientValidationError(error));
2026
+ }
2027
+
2028
+ // Showing warrnings if extra unknown parameters are found
2029
+ const {
2030
+ error: warrning,
2031
+ } = CatalogValidator.getAppicationProducts().validate(
2032
+ {
2033
+ q,
2034
+ f,
2035
+ c,
2036
+ filters,
2037
+ sortOn,
2038
+ pageId,
2039
+ pageSize,
2040
+ pageNo,
2041
+ pageType,
2042
+ itemIds,
2043
+ },
2044
+ { abortEarly: false, allowUnknown: false }
2045
+ );
2046
+ if (warrning) {
2047
+ console.log("Parameter Validation warrnings for getAppicationProducts");
2048
+ console.log(warrning);
2049
+ }
2050
+
2051
+ const query_params = {};
2052
+ query_params["q"] = q;
2053
+ query_params["f"] = f;
2054
+ query_params["c"] = c;
2055
+ query_params["filters"] = filters;
2056
+ query_params["sort_on"] = sortOn;
2057
+ query_params["page_id"] = pageId;
2058
+ query_params["page_size"] = pageSize;
2059
+ query_params["page_no"] = pageNo;
2060
+ query_params["page_type"] = pageType;
2061
+ query_params["item_ids"] = itemIds;
2062
+
2063
+ return PlatformAPIClient.execute(
2064
+ this.config,
2065
+ "get",
2066
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products`,
2067
+ query_params,
2068
+ undefined
2069
+ );
2070
+ }
2071
+
2072
+ /**
2073
+ * @param {Object} arg - Arg object.
2074
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
2075
+ * a particular seller account.
2076
+ * @param {string} arg.applicationId - A `application_id` is a unique
2077
+ * identifier for a particular sale channel.
2078
+ * @param {string} [arg.q] - The search query. This can be a partial or
2079
+ * complete name of a either a product, brand or category
2080
+ * @param {string} [arg.f] - The search filter parameters. All the parameter
2081
+ * filtered from filter parameters will be passed in **f** parameter in
2082
+ * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts**
2083
+ * @param {string} [arg.c] - The search filter parameters for collection
2084
+ * items. All the parameter filtered from filter parameters will be passed
2085
+ * in **c** parameter in this format.
2086
+ * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
2087
+ * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
2088
+ * filter details. This flag is used to fetch all filters
2089
+ * @param {string} [arg.sortOn] - The order to sort the list of products on.
2090
+ * The supported sort parameters are popularity, price, redemption and
2091
+ * discount in either ascending or descending order. See the supported
2092
+ * values below.
2093
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2094
+ * page. Default is 12.
2095
+ * @param {number[]} [arg.itemIds] - Item Ids of product
2096
+ * @summary: List the products
2097
+ * @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`
2098
+ */
2099
+ getAppicationProductsPaginator({
2100
+ companyId,
2101
+ applicationId,
2102
+ q,
2103
+ f,
2104
+ c,
2105
+ filters,
2106
+ sortOn,
2107
+ pageSize,
2108
+ itemIds,
2109
+ } = {}) {
2110
+ const paginator = new Paginator();
2111
+ const callback = async () => {
2112
+ const pageId = paginator.nextId;
2113
+ const pageNo = paginator.pageNo;
2114
+ const pageType = "cursor";
2115
+ const data = await this.getAppicationProducts({
2116
+ companyId: companyId,
2117
+ applicationId: applicationId,
2118
+ q: q,
2119
+ f: f,
2120
+ c: c,
2121
+ filters: filters,
2122
+ sortOn: sortOn,
2123
+ pageId: pageId,
2124
+ pageSize: pageSize,
2125
+ pageNo: pageNo,
2126
+ pageType: pageType,
2127
+ itemIds: itemIds,
2128
+ });
2129
+ paginator.setPaginator({
2130
+ hasNext: data.page.has_next ? true : false,
2131
+ nextId: data.page.next_id,
2132
+ });
2133
+ return data;
2134
+ };
2135
+ paginator.setCallback(callback.bind(this));
2136
+ return paginator;
2137
+ }
2138
+
2139
+ /**
2140
+ * @param {Object} arg - Arg object.
2141
+ * @param {string} arg.slug - The unique identifier of a product. i.e;
2142
+ * `slug` of a product. You can retrieve these from the APIs that list
2143
+ * products like **v1.0/products/**
2144
+ * @summary: Get a product
2145
+ * @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`
2146
+ */
2147
+ getProductDetailBySlug({ slug } = {}) {
2148
+ const { error } = CatalogValidator.getProductDetailBySlug().validate(
2149
+ {
2150
+ slug,
2151
+ },
2152
+ { abortEarly: false, allowUnknown: true }
2153
+ );
2154
+ if (error) {
2155
+ return Promise.reject(new FDKClientValidationError(error));
2156
+ }
2157
+
2158
+ // Showing warrnings if extra unknown parameters are found
2159
+ const {
2160
+ error: warrning,
2161
+ } = CatalogValidator.getProductDetailBySlug().validate(
2162
+ {
2163
+ slug,
2164
+ },
2165
+ { abortEarly: false, allowUnknown: false }
2166
+ );
2167
+ if (warrning) {
2168
+ console.log("Parameter Validation warrnings for getProductDetailBySlug");
2169
+ console.log(warrning);
2170
+ }
2171
+
2172
+ const query_params = {};
2173
+
2174
+ return PlatformAPIClient.execute(
2175
+ this.config,
2176
+ "get",
2177
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products/${slug}`,
2178
+ query_params,
2179
+ undefined
2180
+ );
2181
+ }
2182
+
2183
+ /**
2184
+ * @param {Object} arg - Arg object.
2185
+ * @param {number[]} [arg.brandIds] - Get multiple products filtered by Brand Ids
2186
+ * @param {number[]} [arg.categoryIds] - Get multiple products filtered by
2187
+ * Category Ids
2188
+ * @param {number[]} [arg.departmentIds] - Get multiple products filtered by
2189
+ * Department Ids
2190
+ * @param {string[]} [arg.tags] - Get multiple products filtered by tags
2191
+ * @param {number} [arg.pageNo] - The page number to navigate through the
2192
+ * given set of results
2193
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2194
+ * page. Default is 10.
2195
+ * @param {string} [arg.q] - Search with Item Code, Name, Slug or Identifier.
2196
+ * @summary: Get applicationwise products
2197
+ * @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`
2198
+ */
2199
+ getAppProducts({
2200
+ brandIds,
2201
+ categoryIds,
2202
+ departmentIds,
2203
+ tags,
2204
+ pageNo,
2205
+ pageSize,
2206
+ q,
2207
+ } = {}) {
2208
+ const { error } = CatalogValidator.getAppProducts().validate(
2209
+ {
2210
+ brandIds,
2211
+ categoryIds,
2212
+ departmentIds,
2213
+ tags,
2214
+ pageNo,
2215
+ pageSize,
2216
+ q,
2217
+ },
2218
+ { abortEarly: false, allowUnknown: true }
2219
+ );
2220
+ if (error) {
2221
+ return Promise.reject(new FDKClientValidationError(error));
2222
+ }
2223
+
2224
+ // Showing warrnings if extra unknown parameters are found
2225
+ const { error: warrning } = CatalogValidator.getAppProducts().validate(
2226
+ {
2227
+ brandIds,
2228
+ categoryIds,
2229
+ departmentIds,
2230
+ tags,
2231
+ pageNo,
2232
+ pageSize,
2233
+ q,
2234
+ },
2235
+ { abortEarly: false, allowUnknown: false }
2236
+ );
2237
+ if (warrning) {
2238
+ console.log("Parameter Validation warrnings for getAppProducts");
2239
+ console.log(warrning);
2240
+ }
2241
+
2242
+ const query_params = {};
2243
+ query_params["brand_ids"] = brandIds;
2244
+ query_params["category_ids"] = categoryIds;
2245
+ query_params["department_ids"] = departmentIds;
2246
+ query_params["tags"] = tags;
2247
+ query_params["page_no"] = pageNo;
2248
+ query_params["page_size"] = pageSize;
2249
+ query_params["q"] = q;
2250
+
2251
+ return PlatformAPIClient.execute(
2252
+ this.config,
2253
+ "get",
2254
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/raw-products/`,
2255
+ query_params,
2256
+ undefined
2257
+ );
2258
+ }
2259
+
2260
+ /**
2261
+ * @param {Object} arg - Arg object.
2262
+ * @param {number[]} [arg.itemIds] - The Item Id of the product.
2263
+ * @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
2264
+ * @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
2265
+ * @param {string[]} [arg.sellerIdentifiers] - Unique seller_identifier of
2266
+ * the product.
2267
+ * @param {string} [arg.timestamp] - Timestamp in UTC format (2020-07-23T10:27:50Z)
2268
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
2269
+ * @param {string} [arg.pageId] - Page ID to retrieve next set of results.
2270
+ * @summary: Get the stock of a product
2271
+ * @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
2272
+ */
2273
+ getAppInventory({
2274
+ itemIds,
2275
+ storeIds,
2276
+ brandIds,
2277
+ sellerIdentifiers,
2278
+ timestamp,
2279
+ pageSize,
2280
+ pageId,
2281
+ } = {}) {
2282
+ const { error } = CatalogValidator.getAppInventory().validate(
2283
+ {
2284
+ itemIds,
2285
+ storeIds,
2286
+ brandIds,
2287
+ sellerIdentifiers,
2288
+ timestamp,
2289
+ pageSize,
2290
+ pageId,
2291
+ },
2292
+ { abortEarly: false, allowUnknown: true }
2293
+ );
2294
+ if (error) {
2295
+ return Promise.reject(new FDKClientValidationError(error));
2296
+ }
2297
+
2298
+ // Showing warrnings if extra unknown parameters are found
2299
+ const { error: warrning } = CatalogValidator.getAppInventory().validate(
2300
+ {
2301
+ itemIds,
2302
+ storeIds,
2303
+ brandIds,
2304
+ sellerIdentifiers,
2305
+ timestamp,
2306
+ pageSize,
2307
+ pageId,
2308
+ },
2309
+ { abortEarly: false, allowUnknown: false }
2310
+ );
2311
+ if (warrning) {
2312
+ console.log("Parameter Validation warrnings for getAppInventory");
2313
+ console.log(warrning);
2314
+ }
2315
+
2316
+ const query_params = {};
2317
+ query_params["item_ids"] = itemIds;
2318
+ query_params["store_ids"] = storeIds;
2319
+ query_params["brand_ids"] = brandIds;
2320
+ query_params["seller_identifiers"] = sellerIdentifiers;
2321
+ query_params["timestamp"] = timestamp;
2322
+ query_params["page_size"] = pageSize;
2323
+ query_params["page_id"] = pageId;
2324
+
2325
+ return PlatformAPIClient.execute(
2326
+ this.config,
2327
+ "get",
2328
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/inventory/`,
2329
+ query_params,
2330
+ undefined
2331
+ );
2332
+ }
2333
+
2334
+ /**
2335
+ * @param {Object} arg - Arg object.
2336
+ * @param {string} [arg.storeType] - Helps to sort the location list on the
2337
+ * basis of location type.
2338
+ * @param {number[]} [arg.uid] - Helps to sort the location list on the
2339
+ * basis of uid list.
2340
+ * @param {string} [arg.q] - Query that is to be searched.
2341
+ * @param {string} [arg.stage] - To filter companies on basis of verified or
2342
+ * unverified companies.
2343
+ * @param {number} [arg.pageNo] - The page number to navigate through the
2344
+ * given set of results
2345
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2346
+ * page. Default is 20.
2347
+ * @summary: Get list of locations
2348
+ * @description: This API allows to view all the locations asscoiated to a application.
2349
+ */
2350
+ getAppLocations({ storeType, uid, q, stage, pageNo, pageSize } = {}) {
2351
+ const { error } = CatalogValidator.getAppLocations().validate(
2352
+ {
2353
+ storeType,
2354
+ uid,
2355
+ q,
2356
+ stage,
2357
+ pageNo,
2358
+ pageSize,
2359
+ },
2360
+ { abortEarly: false, allowUnknown: true }
2361
+ );
2362
+ if (error) {
2363
+ return Promise.reject(new FDKClientValidationError(error));
2364
+ }
2365
+
2366
+ // Showing warrnings if extra unknown parameters are found
2367
+ const { error: warrning } = CatalogValidator.getAppLocations().validate(
2368
+ {
2369
+ storeType,
2370
+ uid,
2371
+ q,
2372
+ stage,
2373
+ pageNo,
2374
+ pageSize,
2375
+ },
2376
+ { abortEarly: false, allowUnknown: false }
2377
+ );
2378
+ if (warrning) {
2379
+ console.log("Parameter Validation warrnings for getAppLocations");
2380
+ console.log(warrning);
2381
+ }
2382
+
2383
+ const query_params = {};
2384
+ query_params["store_type"] = storeType;
2385
+ query_params["uid"] = uid;
2386
+ query_params["q"] = q;
2387
+ query_params["stage"] = stage;
2388
+ query_params["page_no"] = pageNo;
2389
+ query_params["page_size"] = pageSize;
2390
+
2391
+ return PlatformAPIClient.execute(
2392
+ this.config,
2393
+ "get",
2394
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/locations`,
2395
+ query_params,
2396
+ undefined
2397
+ );
2398
+ }
2399
+
2400
+ /**
2401
+ * @param {Object} arg - Arg object.
2402
+ * @param {string} arg.companyId - Id of the company whose locations are to fetched
2403
+ * @param {string} arg.applicationId - Id of the application whose locations
2404
+ * are to fetched
2405
+ * @param {string} [arg.storeType] - Helps to sort the location list on the
2406
+ * basis of location type.
2407
+ * @param {number[]} [arg.uid] - Helps to sort the location list on the
2408
+ * basis of uid list.
2409
+ * @param {string} [arg.q] - Query that is to be searched.
2410
+ * @param {string} [arg.stage] - To filter companies on basis of verified or
2411
+ * unverified companies.
2412
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2413
+ * page. Default is 20.
2414
+ * @summary: Get list of locations
2415
+ * @description: This API allows to view all the locations asscoiated to a application.
2416
+ */
2417
+ getAppLocationsPaginator({
2418
+ companyId,
2419
+ applicationId,
2420
+ storeType,
2421
+ uid,
2422
+ q,
2423
+ stage,
2424
+ pageSize,
2425
+ } = {}) {
2426
+ const paginator = new Paginator();
2427
+ const callback = async () => {
2428
+ const pageId = paginator.nextId;
2429
+ const pageNo = paginator.pageNo;
2430
+ const pageType = "number";
2431
+ const data = await this.getAppLocations({
2432
+ companyId: companyId,
2433
+ applicationId: applicationId,
2434
+ storeType: storeType,
2435
+ uid: uid,
2436
+ q: q,
2437
+ stage: stage,
2438
+ pageNo: pageNo,
2439
+ pageSize: pageSize,
2440
+ });
2441
+ paginator.setPaginator({
2442
+ hasNext: data.page.has_next ? true : false,
2443
+ nextId: data.page.next_id,
2444
+ });
2445
+ return data;
2446
+ };
2447
+ paginator.setCallback(callback.bind(this));
2448
+ return paginator;
2449
+ }
2450
+
2451
+ /**
2452
+ * @param {Object} arg - Arg object.
2453
+ * @param {number} [arg.pageNo] - The page number to navigate through the
2454
+ * given set of results
2455
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2456
+ * page. Default is 12.
2457
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
2458
+ * to search brands by brand name.
2459
+ * @summary: List all the brands for the application
2460
+ * @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`
2461
+ */
2462
+ getApplicationBrandListing({ pageNo, pageSize, q } = {}) {
2463
+ const { error } = CatalogValidator.getApplicationBrandListing().validate(
2464
+ {
2465
+ pageNo,
2466
+ pageSize,
2467
+ q,
2468
+ },
2469
+ { abortEarly: false, allowUnknown: true }
2470
+ );
2471
+ if (error) {
2472
+ return Promise.reject(new FDKClientValidationError(error));
2473
+ }
2474
+
2475
+ // Showing warrnings if extra unknown parameters are found
2476
+ const {
2477
+ error: warrning,
2478
+ } = CatalogValidator.getApplicationBrandListing().validate(
2479
+ {
2480
+ pageNo,
2481
+ pageSize,
2482
+ q,
2483
+ },
2484
+ { abortEarly: false, allowUnknown: false }
2485
+ );
2486
+ if (warrning) {
2487
+ console.log(
2488
+ "Parameter Validation warrnings for getApplicationBrandListing"
2489
+ );
2490
+ console.log(warrning);
2491
+ }
2492
+
2493
+ const query_params = {};
2494
+ query_params["page_no"] = pageNo;
2495
+ query_params["page_size"] = pageSize;
2496
+ query_params["q"] = q;
2497
+
2498
+ return PlatformAPIClient.execute(
2499
+ this.config,
2500
+ "get",
2501
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brand`,
2502
+ query_params,
2503
+ undefined
2504
+ );
2505
+ }
2506
+
2507
+ /**
2508
+ * @param {Object} arg - Arg object.
2509
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
2510
+ * a particular seller account.
2511
+ * @param {string} arg.applicationId - A `application_id` is a unique
2512
+ * identifier for a particular sale channel.
2513
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2514
+ * page. Default is 12.
2515
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
2516
+ * to search brands by brand name.
2517
+ * @summary: List all the brands for the application
2518
+ * @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`
2519
+ */
2520
+ getApplicationBrandListingPaginator({
2521
+ companyId,
2522
+ applicationId,
2523
+ pageSize,
2524
+ q,
2525
+ } = {}) {
2526
+ const paginator = new Paginator();
2527
+ const callback = async () => {
2528
+ const pageId = paginator.nextId;
2529
+ const pageNo = paginator.pageNo;
2530
+ const pageType = "number";
2531
+ const data = await this.getApplicationBrandListing({
2532
+ companyId: companyId,
2533
+ applicationId: applicationId,
2534
+ pageNo: pageNo,
2535
+ pageSize: pageSize,
2536
+ q: q,
2537
+ });
2538
+ paginator.setPaginator({
2539
+ hasNext: data.page.has_next ? true : false,
2540
+ nextId: data.page.next_id,
2541
+ });
2542
+ return data;
2543
+ };
2544
+ paginator.setCallback(callback.bind(this));
2545
+ return paginator;
2546
+ }
2547
+
2548
+ /**
2549
+ * @param {Object} arg - Arg object.
2550
+ * @param {string} arg.brandUid - Brand id for which the custom_json is associated.
2551
+ * @param {ApplicationBrandJson} arg.body
2552
+ * @summary: Update a single custom json.
2553
+ * @description: This API helps to update data associated to a item custom meta.
2554
+ */
2555
+ updateAppBrand({ brandUid, body } = {}) {
2556
+ const { error } = CatalogValidator.updateAppBrand().validate(
2557
+ {
2558
+ brandUid,
2559
+ body,
2560
+ },
2561
+ { abortEarly: false, allowUnknown: true }
2562
+ );
2563
+ if (error) {
2564
+ return Promise.reject(new FDKClientValidationError(error));
2565
+ }
2566
+
2567
+ // Showing warrnings if extra unknown parameters are found
2568
+ const { error: warrning } = CatalogValidator.updateAppBrand().validate(
2569
+ {
2570
+ brandUid,
2571
+ body,
2572
+ },
2573
+ { abortEarly: false, allowUnknown: false }
2574
+ );
2575
+ if (warrning) {
2576
+ console.log("Parameter Validation warrnings for updateAppBrand");
2577
+ console.log(warrning);
2578
+ }
2579
+
2580
+ const query_params = {};
2581
+
2582
+ return PlatformAPIClient.execute(
2583
+ this.config,
2584
+ "patch",
2585
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brand/${brandUid}`,
2586
+ query_params,
2587
+ body
2588
+ );
2589
+ }
2590
+
2591
+ /**
2592
+ * @param {Object} arg - Arg object.
2593
+ * @param {number} [arg.departmentId] - A `department_id` is a unique
2594
+ * identifier for a particular department.
2595
+ * @param {number} [arg.pageNo] - The page number to navigate through the
2596
+ * given set of results
2597
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2598
+ * page. Default is 12.
2599
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
2600
+ * to search brands by brand name.
2601
+ * @summary: List all the brands for the application
2602
+ * @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`
2603
+ */
2604
+ getApplicationCategoryListing({ departmentId, pageNo, pageSize, q } = {}) {
2605
+ const { error } = CatalogValidator.getApplicationCategoryListing().validate(
2606
+ {
2607
+ departmentId,
2608
+ pageNo,
2609
+ pageSize,
2610
+ q,
2611
+ },
2612
+ { abortEarly: false, allowUnknown: true }
2613
+ );
2614
+ if (error) {
2615
+ return Promise.reject(new FDKClientValidationError(error));
2616
+ }
2617
+
2618
+ // Showing warrnings if extra unknown parameters are found
2619
+ const {
2620
+ error: warrning,
2621
+ } = CatalogValidator.getApplicationCategoryListing().validate(
2622
+ {
2623
+ departmentId,
2624
+ pageNo,
2625
+ pageSize,
2626
+ q,
2627
+ },
2628
+ { abortEarly: false, allowUnknown: false }
2629
+ );
2630
+ if (warrning) {
2631
+ console.log(
2632
+ "Parameter Validation warrnings for getApplicationCategoryListing"
2633
+ );
2634
+ console.log(warrning);
2635
+ }
2636
+
2637
+ const query_params = {};
2638
+ query_params["department_id"] = departmentId;
2639
+ query_params["page_no"] = pageNo;
2640
+ query_params["page_size"] = pageSize;
2641
+ query_params["q"] = q;
2642
+
2643
+ return PlatformAPIClient.execute(
2644
+ this.config,
2645
+ "get",
2646
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/category`,
2647
+ query_params,
2648
+ undefined
2649
+ );
2650
+ }
2651
+
2652
+ /**
2653
+ * @param {Object} arg - Arg object.
2654
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
2655
+ * a particular seller account.
2656
+ * @param {string} arg.applicationId - A `application_id` is a unique
2657
+ * identifier for a particular sale channel.
2658
+ * @param {number} [arg.departmentId] - A `department_id` is a unique
2659
+ * identifier for a particular department.
2660
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2661
+ * page. Default is 12.
2662
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
2663
+ * to search brands by brand name.
2664
+ * @summary: List all the brands for the application
2665
+ * @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`
2666
+ */
2667
+ getApplicationCategoryListingPaginator({
2668
+ companyId,
2669
+ applicationId,
2670
+ departmentId,
2671
+ pageSize,
2672
+ q,
2673
+ } = {}) {
2674
+ const paginator = new Paginator();
2675
+ const callback = async () => {
2676
+ const pageId = paginator.nextId;
2677
+ const pageNo = paginator.pageNo;
2678
+ const pageType = "number";
2679
+ const data = await this.getApplicationCategoryListing({
2680
+ companyId: companyId,
2681
+ applicationId: applicationId,
2682
+ departmentId: departmentId,
2683
+ pageNo: pageNo,
2684
+ pageSize: pageSize,
2685
+ q: q,
2686
+ });
2687
+ paginator.setPaginator({
2688
+ hasNext: data.page.has_next ? true : false,
2689
+ nextId: data.page.next_id,
2690
+ });
2691
+ return data;
2692
+ };
2693
+ paginator.setCallback(callback.bind(this));
2694
+ return paginator;
2695
+ }
2696
+
2697
+ /**
2698
+ * @param {Object} arg - Arg object.
2699
+ * @param {string} arg.categoryUid - Category id for which the custom_json
2700
+ * is associated.
2701
+ * @param {ApplicationCategoryJson} arg.body
2702
+ * @summary: Update a single custom json.
2703
+ * @description: This API helps to update data associated to a item custom meta.
2704
+ */
2705
+ updateAppCategory({ categoryUid, body } = {}) {
2706
+ const { error } = CatalogValidator.updateAppCategory().validate(
2707
+ {
2708
+ categoryUid,
2709
+ body,
2710
+ },
2711
+ { abortEarly: false, allowUnknown: true }
2712
+ );
2713
+ if (error) {
2714
+ return Promise.reject(new FDKClientValidationError(error));
2715
+ }
2716
+
2717
+ // Showing warrnings if extra unknown parameters are found
2718
+ const { error: warrning } = CatalogValidator.updateAppCategory().validate(
2719
+ {
2720
+ categoryUid,
2721
+ body,
2722
+ },
2723
+ { abortEarly: false, allowUnknown: false }
2724
+ );
2725
+ if (warrning) {
2726
+ console.log("Parameter Validation warrnings for updateAppCategory");
2727
+ console.log(warrning);
2728
+ }
2729
+
2730
+ const query_params = {};
2731
+
2732
+ return PlatformAPIClient.execute(
2733
+ this.config,
2734
+ "patch",
2735
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/category/${categoryUid}`,
2736
+ query_params,
2737
+ body
2738
+ );
2739
+ }
2740
+
2741
+ /**
2742
+ * @param {Object} arg - Arg object.
2743
+ * @param {number} [arg.pageNo] - The page number to navigate through the
2744
+ * given set of results
2745
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2746
+ * page. Default is 12.
2747
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
2748
+ * to search department by name.
2749
+ * @summary: List all the departments for the application
2750
+ * @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`
2751
+ */
2752
+ getApplicationDepartmentListing({ pageNo, pageSize, q } = {}) {
2753
+ const {
2754
+ error,
2755
+ } = CatalogValidator.getApplicationDepartmentListing().validate(
2756
+ {
2757
+ pageNo,
2758
+ pageSize,
2759
+ q,
2760
+ },
2761
+ { abortEarly: false, allowUnknown: true }
2762
+ );
2763
+ if (error) {
2764
+ return Promise.reject(new FDKClientValidationError(error));
2765
+ }
2766
+
2767
+ // Showing warrnings if extra unknown parameters are found
2768
+ const {
2769
+ error: warrning,
2770
+ } = CatalogValidator.getApplicationDepartmentListing().validate(
2771
+ {
2772
+ pageNo,
2773
+ pageSize,
2774
+ q,
2775
+ },
2776
+ { abortEarly: false, allowUnknown: false }
2777
+ );
2778
+ if (warrning) {
2779
+ console.log(
2780
+ "Parameter Validation warrnings for getApplicationDepartmentListing"
2781
+ );
2782
+ console.log(warrning);
2783
+ }
2784
+
2785
+ const query_params = {};
2786
+ query_params["page_no"] = pageNo;
2787
+ query_params["page_size"] = pageSize;
2788
+ query_params["q"] = q;
2789
+
2790
+ return PlatformAPIClient.execute(
2791
+ this.config,
2792
+ "get",
2793
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/department`,
2794
+ query_params,
2795
+ undefined
2796
+ );
2797
+ }
2798
+
2799
+ /**
2800
+ * @param {Object} arg - Arg object.
2801
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
2802
+ * a particular seller account.
2803
+ * @param {string} arg.applicationId - A `application_id` is a unique
2804
+ * identifier for a particular sale channel.
2805
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2806
+ * page. Default is 12.
2807
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
2808
+ * to search department by name.
2809
+ * @summary: List all the departments for the application
2810
+ * @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`
2811
+ */
2812
+ getApplicationDepartmentListingPaginator({
2813
+ companyId,
2814
+ applicationId,
2815
+ pageSize,
2816
+ q,
2817
+ } = {}) {
2818
+ const paginator = new Paginator();
2819
+ const callback = async () => {
2820
+ const pageId = paginator.nextId;
2821
+ const pageNo = paginator.pageNo;
2822
+ const pageType = "number";
2823
+ const data = await this.getApplicationDepartmentListing({
2824
+ companyId: companyId,
2825
+ applicationId: applicationId,
2826
+ pageNo: pageNo,
2827
+ pageSize: pageSize,
2828
+ q: q,
2829
+ });
2830
+ paginator.setPaginator({
2831
+ hasNext: data.page.has_next ? true : false,
2832
+ nextId: data.page.next_id,
2833
+ });
2834
+ return data;
2835
+ };
2836
+ paginator.setCallback(callback.bind(this));
2837
+ return paginator;
2838
+ }
2839
+
2840
+ /**
2841
+ * @param {Object} arg - Arg object.
2842
+ * @param {string} arg.departmentUid - Department id for which the
2843
+ * custom_json is associated.
2844
+ * @param {ApplicationDepartmentJson} arg.body
2845
+ * @summary: Update a single custom json.
2846
+ * @description: This API helps to update data associated to a item custom meta.
2847
+ */
2848
+ updateAppDepartment({ departmentUid, body } = {}) {
2849
+ const { error } = CatalogValidator.updateAppDepartment().validate(
2850
+ {
2851
+ departmentUid,
2852
+ body,
2853
+ },
2854
+ { abortEarly: false, allowUnknown: true }
2855
+ );
2856
+ if (error) {
2857
+ return Promise.reject(new FDKClientValidationError(error));
2858
+ }
2859
+
2860
+ // Showing warrnings if extra unknown parameters are found
2861
+ const { error: warrning } = CatalogValidator.updateAppDepartment().validate(
2862
+ {
2863
+ departmentUid,
2864
+ body,
2865
+ },
2866
+ { abortEarly: false, allowUnknown: false }
2867
+ );
2868
+ if (warrning) {
2869
+ console.log("Parameter Validation warrnings for updateAppDepartment");
2870
+ console.log(warrning);
2871
+ }
2872
+
2873
+ const query_params = {};
2874
+
2875
+ return PlatformAPIClient.execute(
2876
+ this.config,
2877
+ "patch",
2878
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/department/${departmentUid}`,
2879
+ query_params,
2880
+ body
2881
+ );
2882
+ }
2883
+
2884
+ /**
2885
+ * @param {Object} arg - Arg object.
2886
+ * @param {string} arg.storeUid - Store id for which the custom_json is associated.
2887
+ * @param {ApplicationStoreJson} arg.body
2888
+ * @summary: Update a single custom json.
2889
+ * @description: This API helps to update data associated to a item custom meta.
2890
+ */
2891
+ updateAppLocation({ storeUid, body } = {}) {
2892
+ const { error } = CatalogValidator.updateAppLocation().validate(
2893
+ {
2894
+ storeUid,
2895
+ body,
2896
+ },
2897
+ { abortEarly: false, allowUnknown: true }
2898
+ );
2899
+ if (error) {
2900
+ return Promise.reject(new FDKClientValidationError(error));
2901
+ }
2902
+
2903
+ // Showing warrnings if extra unknown parameters are found
2904
+ const { error: warrning } = CatalogValidator.updateAppLocation().validate(
2905
+ {
2906
+ storeUid,
2907
+ body,
2908
+ },
2909
+ { abortEarly: false, allowUnknown: false }
2910
+ );
2911
+ if (warrning) {
2912
+ console.log("Parameter Validation warrnings for updateAppLocation");
2913
+ console.log(warrning);
2914
+ }
2915
+
2916
+ const query_params = {};
2917
+
2918
+ return PlatformAPIClient.execute(
2919
+ this.config,
2920
+ "patch",
2921
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/${storeUid}`,
2922
+ query_params,
2923
+ body
2924
+ );
2925
+ }
2926
+ }
2927
+ module.exports = Catalog;