@gofynd/fdk-client-javascript 0.1.36 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) 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 +313 -281
  5. package/documentation/application/CATALOG.md +458 -435
  6. package/documentation/application/FILESTORAGE.md +2 -0
  7. package/documentation/application/LEAD.md +18 -18
  8. package/documentation/application/LOGISTIC.md +424 -102
  9. package/documentation/application/ORDER.md +293 -293
  10. package/documentation/application/PAYMENT.md +278 -278
  11. package/documentation/application/POSCART.md +350 -318
  12. package/documentation/application/README.md +1 -1
  13. package/documentation/application/REWARDS.md +1 -0
  14. package/documentation/application/USER.md +19 -14
  15. package/documentation/platform/AUDITTRAIL.md +2 -2
  16. package/documentation/platform/CART.md +442 -439
  17. package/documentation/platform/CATALOG.md +2925 -2641
  18. package/documentation/platform/COMPANYPROFILE.md +228 -369
  19. package/documentation/platform/DISCOUNT.md +86 -0
  20. package/documentation/platform/FILESTORAGE.md +2 -0
  21. package/documentation/platform/LEAD.md +60 -60
  22. package/documentation/platform/ORDER.md +1296 -1618
  23. package/documentation/platform/PAYMENT.md +89 -89
  24. package/documentation/platform/REWARDS.md +145 -0
  25. package/documentation/platform/USER.md +24 -14
  26. package/index.d.ts +4 -1
  27. package/index.js +6 -3
  28. package/package.json +9 -9
  29. package/platform.d.ts +2 -1
  30. package/platform.js +3 -2
  31. package/public.d.ts +1 -0
  32. package/public.js +3 -2
  33. package/sdk/application/ApplicationAPIClient.js +6 -1
  34. package/sdk/application/ApplicationClient.d.ts +17 -16
  35. package/sdk/application/ApplicationClient.js +43 -17
  36. package/sdk/application/ApplicationConfig.d.ts +1 -0
  37. package/sdk/application/ApplicationConfig.js +4 -2
  38. package/sdk/application/ApplicationModels.d.ts +0 -827
  39. package/sdk/application/ApplicationModels.js +6 -10486
  40. package/sdk/application/{client → Cart}/CartApplicationClient.d.ts +9 -3
  41. package/sdk/application/{client → Cart}/CartApplicationClient.js +14 -8
  42. package/sdk/application/Cart/CartApplicationModel.d.ts +81 -0
  43. package/sdk/application/Cart/CartApplicationModel.js +1136 -0
  44. package/sdk/application/{models/CartValidator.js → Cart/CartApplicationValidator.js} +16 -12
  45. package/sdk/application/{client → Catalog}/CatalogApplicationClient.d.ts +8 -5
  46. package/sdk/application/{client → Catalog}/CatalogApplicationClient.js +11 -8
  47. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +117 -0
  48. package/sdk/application/Catalog/CatalogApplicationModel.js +1606 -0
  49. package/sdk/application/{models/CatalogValidator.js → Catalog/CatalogApplicationValidator.js} +3 -1
  50. package/sdk/application/{client → Common}/CommonApplicationClient.js +2 -2
  51. package/sdk/application/Common/CommonApplicationModel.d.ts +20 -0
  52. package/sdk/application/Common/CommonApplicationModel.js +228 -0
  53. package/sdk/{platform/models/CommonValidator.js → application/Common/CommonApplicationValidator.js} +2 -1
  54. package/sdk/application/{client → Communication}/CommunicationApplicationClient.js +2 -2
  55. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +15 -0
  56. package/sdk/application/Communication/CommunicationApplicationModel.js +144 -0
  57. package/sdk/application/{models/CommunicationValidator.js → Communication/CommunicationApplicationValidator.js} +4 -3
  58. package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.js +2 -2
  59. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +111 -0
  60. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1182 -0
  61. package/sdk/application/{models/ConfigurationValidator.js → Configuration/ConfigurationApplicationValidator.js} +3 -2
  62. package/sdk/application/{client → Content}/ContentApplicationClient.js +2 -2
  63. package/sdk/application/Content/ContentApplicationModel.d.ts +105 -0
  64. package/sdk/application/Content/ContentApplicationModel.js +1349 -0
  65. package/sdk/application/{models/ContentValidator.js → Content/ContentApplicationValidator.js} +2 -1
  66. package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.js +2 -2
  67. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +21 -0
  68. package/sdk/application/FileStorage/FileStorageApplicationModel.js +244 -0
  69. package/sdk/application/{models/FileStorageValidator.js → FileStorage/FileStorageApplicationValidator.js} +5 -4
  70. package/sdk/application/{client → Lead}/LeadApplicationClient.js +2 -2
  71. package/sdk/application/Lead/LeadApplicationModel.d.ts +55 -0
  72. package/sdk/application/Lead/LeadApplicationModel.js +690 -0
  73. package/sdk/application/{models/LeadValidator.js → Lead/LeadApplicationValidator.js} +5 -4
  74. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +53 -0
  75. package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +64 -29
  76. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +26 -0
  77. package/sdk/application/Logistic/LogisticApplicationModel.js +286 -0
  78. package/sdk/application/{models/LogisticValidator.d.ts → Logistic/LogisticApplicationValidator.d.ts} +2 -1
  79. package/sdk/application/{models/LogisticValidator.js → Logistic/LogisticApplicationValidator.js} +13 -7
  80. package/sdk/application/{client → Order}/OrderApplicationClient.js +2 -2
  81. package/sdk/application/Order/OrderApplicationModel.d.ts +67 -0
  82. package/sdk/application/Order/OrderApplicationModel.js +872 -0
  83. package/sdk/application/{models/OrderValidator.js → Order/OrderApplicationValidator.js} +4 -3
  84. package/sdk/application/{client → Payment}/PaymentApplicationClient.js +2 -2
  85. package/sdk/application/Payment/PaymentApplicationModel.d.ts +96 -0
  86. package/sdk/application/Payment/PaymentApplicationModel.js +1318 -0
  87. package/sdk/application/{models/PaymentValidator.js → Payment/PaymentApplicationValidator.js} +24 -23
  88. package/sdk/application/{client → PosCart}/PosCartApplicationClient.d.ts +9 -3
  89. package/sdk/application/{client → PosCart}/PosCartApplicationClient.js +14 -8
  90. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +79 -0
  91. package/sdk/application/PosCart/PosCartApplicationModel.js +1132 -0
  92. package/sdk/application/{models/PosCartValidator.js → PosCart/PosCartApplicationValidator.js} +17 -13
  93. package/sdk/application/{client → Rewards}/RewardsApplicationClient.js +2 -2
  94. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +23 -0
  95. package/sdk/application/Rewards/RewardsApplicationModel.js +276 -0
  96. package/sdk/application/{models/RewardsValidator.js → Rewards/RewardsApplicationValidator.js} +5 -4
  97. package/sdk/application/{client → Share}/ShareApplicationClient.js +2 -2
  98. package/sdk/application/Share/ShareApplicationModel.d.ts +16 -0
  99. package/sdk/application/Share/ShareApplicationModel.js +178 -0
  100. package/sdk/application/{models/ShareValidator.js → Share/ShareApplicationValidator.js} +3 -2
  101. package/sdk/application/{client → Theme}/ThemeApplicationClient.js +2 -2
  102. package/sdk/application/Theme/ThemeApplicationModel.d.ts +49 -0
  103. package/sdk/application/Theme/ThemeApplicationModel.js +486 -0
  104. package/sdk/application/{models/ThemeValidator.js → Theme/ThemeApplicationValidator.js} +2 -1
  105. package/sdk/application/{client → User}/UserApplicationClient.js +2 -2
  106. package/sdk/application/User/UserApplicationModel.d.ts +95 -0
  107. package/sdk/application/User/UserApplicationModel.js +998 -0
  108. package/sdk/application/{models/UserValidator.js → User/UserApplicationValidator.js} +30 -29
  109. package/sdk/application/index.d.ts +18 -0
  110. package/sdk/application/index.js +33 -0
  111. package/sdk/common/AxiosHelper.js +23 -10
  112. package/sdk/common/Logger.d.ts +2 -0
  113. package/sdk/common/Logger.js +6 -0
  114. package/sdk/common/curlHelper.d.ts +2 -0
  115. package/sdk/common/curlHelper.js +95 -0
  116. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +101 -0
  117. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +285 -0
  118. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +11 -0
  119. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +56 -0
  120. package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.js +2 -2
  121. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +23 -0
  122. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +252 -0
  123. package/sdk/platform/{models/AnalyticsValidator.js → Analytics/AnalyticsPlatformValidator.js} +5 -4
  124. package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.js +2 -2
  125. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +18 -0
  126. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +144 -0
  127. package/sdk/platform/{models/AuditTrailValidator.js → AuditTrail/AuditTrailPlatformValidator.js} +3 -2
  128. package/sdk/platform/{client → Billing}/BillingPlatformClient.js +2 -2
  129. package/sdk/platform/Billing/BillingPlatformModel.d.ts +65 -0
  130. package/sdk/platform/Billing/BillingPlatformModel.js +906 -0
  131. package/sdk/platform/{models/BillingValidator.js → Billing/BillingPlatformValidator.js} +6 -5
  132. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +293 -0
  133. package/sdk/platform/Cart/CartPlatformApplicationClient.js +755 -0
  134. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +20 -0
  135. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +138 -0
  136. package/sdk/platform/Cart/CartPlatformModel.d.ts +104 -0
  137. package/sdk/platform/Cart/CartPlatformModel.js +1516 -0
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +856 -0
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2136 -0
  140. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +56 -0
  141. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +389 -0
  142. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.d.ts +132 -123
  143. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.js +354 -323
  144. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +316 -0
  145. package/sdk/platform/Catalog/CatalogPlatformModel.js +4690 -0
  146. package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +15 -14
  147. package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +91 -84
  148. package/sdk/platform/{client → Common}/CommonPlatformClient.js +2 -2
  149. package/sdk/platform/Common/CommonPlatformModel.d.ts +20 -0
  150. package/sdk/platform/Common/CommonPlatformModel.js +228 -0
  151. package/sdk/{application/models/CommonValidator.js → platform/Common/CommonPlatformValidator.js} +2 -1
  152. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +611 -0
  153. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1656 -0
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +43 -0
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +277 -0
  156. package/sdk/platform/{client → Communication}/CommunicationPlatformClient.js +2 -2
  157. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +102 -0
  158. package/sdk/platform/Communication/CommunicationPlatformModel.js +1312 -0
  159. package/sdk/platform/{models/CommunicationValidator.js → Communication/CommunicationPlatformValidator.js} +2 -1
  160. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.d.ts +0 -9
  161. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.js +2 -33
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +44 -0
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +706 -0
  164. package/sdk/platform/{models/CompanyProfileValidator.d.ts → CompanyProfile/CompanyProfilePlatformValidator.d.ts} +0 -1
  165. package/sdk/platform/{models/CompanyProfileValidator.js → CompanyProfile/CompanyProfilePlatformValidator.js} +9 -14
  166. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +309 -0
  167. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +940 -0
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +31 -0
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +164 -0
  170. package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.js +2 -2
  171. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +185 -0
  172. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2072 -0
  173. package/sdk/platform/{models/ConfigurationValidator.js → Configuration/ConfigurationPlatformValidator.js} +9 -8
  174. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +781 -0
  175. package/sdk/platform/Content/ContentPlatformApplicationClient.js +2208 -0
  176. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +71 -0
  177. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +422 -0
  178. package/sdk/platform/Content/ContentPlatformModel.d.ts +105 -0
  179. package/sdk/platform/Content/ContentPlatformModel.js +1349 -0
  180. package/sdk/platform/{client → Discount}/DiscountPlatformClient.d.ts +11 -0
  181. package/sdk/platform/{client → Discount}/DiscountPlatformClient.js +35 -2
  182. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +15 -0
  183. package/sdk/platform/Discount/DiscountPlatformModel.js +176 -0
  184. package/sdk/platform/{models/DiscountValidator.d.ts → Discount/DiscountPlatformValidator.d.ts} +1 -0
  185. package/sdk/platform/{models/DiscountValidator.js → Discount/DiscountPlatformValidator.js} +13 -5
  186. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +114 -0
  187. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +247 -0
  188. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +7 -0
  189. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +38 -0
  190. package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.js +2 -2
  191. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +21 -0
  192. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +244 -0
  193. package/sdk/platform/{models/FileStorageValidator.js → FileStorage/FileStoragePlatformValidator.js} +6 -5
  194. package/sdk/platform/{client → Inventory}/InventoryPlatformClient.js +2 -2
  195. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +62 -0
  196. package/sdk/platform/Inventory/InventoryPlatformModel.js +1178 -0
  197. package/sdk/platform/{models/InventoryValidator.js → Inventory/InventoryPlatformValidator.js} +5 -4
  198. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +138 -0
  199. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +397 -0
  200. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +16 -0
  201. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +90 -0
  202. package/sdk/platform/{client → Lead}/LeadPlatformClient.js +2 -2
  203. package/sdk/platform/Lead/LeadPlatformModel.d.ts +55 -0
  204. package/sdk/platform/Lead/LeadPlatformModel.js +690 -0
  205. package/sdk/platform/{models/LeadValidator.js → Lead/LeadPlatformValidator.js} +7 -6
  206. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +59 -0
  207. package/sdk/platform/Order/OrderPlatformApplicationClient.js +152 -0
  208. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +6 -0
  209. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +37 -0
  210. package/sdk/platform/{client → Order}/OrderPlatformClient.d.ts +9 -49
  211. package/sdk/platform/{client → Order}/OrderPlatformClient.js +18 -130
  212. package/sdk/platform/Order/OrderPlatformModel.d.ts +215 -0
  213. package/sdk/platform/Order/OrderPlatformModel.js +3530 -0
  214. package/sdk/platform/{models/OrderValidator.d.ts → Order/OrderPlatformValidator.d.ts} +0 -2
  215. package/sdk/platform/{models/OrderValidator.js → Order/OrderPlatformValidator.js} +22 -44
  216. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +30 -0
  217. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +74 -0
  218. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +5 -0
  219. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +20 -0
  220. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +7 -0
  221. package/sdk/platform/Partner/PartnerPlatformModel.js +54 -0
  222. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +108 -0
  223. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +333 -0
  224. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +14 -0
  225. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +73 -0
  226. package/sdk/platform/{client → Payment}/PaymentPlatformClient.js +2 -2
  227. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  228. package/sdk/platform/Payment/PaymentPlatformModel.js +552 -0
  229. package/sdk/platform/{models/PaymentValidator.js → Payment/PaymentPlatformValidator.js} +6 -5
  230. package/sdk/platform/PlatformAPIClient.js +2 -1
  231. package/sdk/platform/PlatformApplicationClient.d.ts +2884 -18377
  232. package/sdk/platform/PlatformApplicationClient.js +3750 -13814
  233. package/sdk/platform/PlatformClient.d.ts +2898 -2861
  234. package/sdk/platform/PlatformClient.js +3714 -3057
  235. package/sdk/platform/PlatformConfig.js +2 -1
  236. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +150 -0
  237. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +428 -0
  238. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +16 -0
  239. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +91 -0
  240. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +24 -0
  241. package/sdk/platform/Rewards/RewardsPlatformModel.js +294 -0
  242. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +72 -0
  243. package/sdk/platform/Share/SharePlatformApplicationClient.js +182 -0
  244. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +7 -0
  245. package/sdk/platform/Share/SharePlatformApplicationValidator.js +35 -0
  246. package/sdk/platform/Share/SharePlatformModel.d.ts +15 -0
  247. package/sdk/platform/Share/SharePlatformModel.js +170 -0
  248. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +238 -0
  249. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +704 -0
  250. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +27 -0
  251. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +155 -0
  252. package/sdk/platform/Theme/ThemePlatformModel.d.ts +49 -0
  253. package/sdk/platform/Theme/ThemePlatformModel.js +486 -0
  254. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +121 -0
  255. package/sdk/platform/User/UserPlatformApplicationClient.js +361 -0
  256. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -0
  257. package/sdk/platform/User/UserPlatformApplicationValidator.js +79 -0
  258. package/sdk/platform/User/UserPlatformModel.d.ts +95 -0
  259. package/sdk/platform/User/UserPlatformModel.js +998 -0
  260. package/sdk/platform/{client → Webhook}/WebhookPlatformClient.js +2 -2
  261. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +17 -0
  262. package/sdk/platform/Webhook/WebhookPlatformModel.js +208 -0
  263. package/sdk/platform/{models/WebhookValidator.js → Webhook/WebhookPlatformValidator.js} +4 -3
  264. package/sdk/platform/index.d.ts +24 -0
  265. package/sdk/platform/index.js +45 -0
  266. package/sdk/public/{client → Configuration}/ConfigurationPublicClient.js +1 -1
  267. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +20 -0
  268. package/sdk/public/Configuration/ConfigurationPublicModel.js +230 -0
  269. package/sdk/public/{models/ConfigurationValidator.js → Configuration/ConfigurationPublicValidator.js} +1 -1
  270. package/sdk/public/{client → Inventory}/InventoryPublicClient.js +1 -1
  271. package/sdk/public/Inventory/InventoryPublicModel.d.ts +22 -0
  272. package/sdk/public/Inventory/InventoryPublicModel.js +334 -0
  273. package/sdk/public/{models/InventoryValidator.js → Inventory/InventoryPublicValidator.js} +2 -2
  274. package/sdk/public/PublicClient.d.ts +3 -3
  275. package/sdk/public/PublicClient.js +8 -3
  276. package/sdk/public/{client → Webhook}/WebhookPublicClient.js +1 -1
  277. package/sdk/public/Webhook/WebhookPublicModel.d.ts +17 -0
  278. package/sdk/public/Webhook/WebhookPublicModel.js +208 -0
  279. package/sdk/public/{models/WebhookValidator.js → Webhook/WebhookPublicValidator.js} +2 -2
  280. package/sdk/public/index.d.ts +5 -0
  281. package/sdk/public/index.js +7 -0
  282. package/sdk/application/client/LogisticApplicationClient.d.ts +0 -42
  283. package/sdk/platform/PlatformApplicationModels.d.ts +0 -328
  284. package/sdk/platform/PlatformApplicationModels.js +0 -22522
  285. package/sdk/platform/PlatformModels.d.ts +0 -1470
  286. package/sdk/platform/PlatformModels.js +0 -20510
  287. package/sdk/platform/models/CartValidator.d.ts +0 -0
  288. package/sdk/platform/models/CartValidator.js +0 -0
  289. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  290. package/sdk/platform/models/ContentValidator.js +0 -0
  291. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  292. package/sdk/platform/models/PartnerValidator.js +0 -0
  293. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  294. package/sdk/platform/models/RewardsValidator.js +0 -0
  295. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  296. package/sdk/platform/models/ShareValidator.js +0 -0
  297. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  298. package/sdk/platform/models/ThemeValidator.js +0 -0
  299. package/sdk/platform/models/UserValidator.d.ts +0 -0
  300. package/sdk/platform/models/UserValidator.js +0 -0
  301. package/sdk/public/PublicModels.d.ts +0 -50
  302. package/sdk/public/PublicModels.js +0 -712
  303. /package/sdk/application/{models/CartValidator.d.ts → Cart/CartApplicationValidator.d.ts} +0 -0
  304. /package/sdk/application/{models/CatalogValidator.d.ts → Catalog/CatalogApplicationValidator.d.ts} +0 -0
  305. /package/sdk/application/{client → Common}/CommonApplicationClient.d.ts +0 -0
  306. /package/sdk/application/{models/CommonValidator.d.ts → Common/CommonApplicationValidator.d.ts} +0 -0
  307. /package/sdk/application/{client → Communication}/CommunicationApplicationClient.d.ts +0 -0
  308. /package/sdk/application/{models/CommunicationValidator.d.ts → Communication/CommunicationApplicationValidator.d.ts} +0 -0
  309. /package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.d.ts +0 -0
  310. /package/sdk/application/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationApplicationValidator.d.ts} +0 -0
  311. /package/sdk/application/{client → Content}/ContentApplicationClient.d.ts +0 -0
  312. /package/sdk/application/{models/ContentValidator.d.ts → Content/ContentApplicationValidator.d.ts} +0 -0
  313. /package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.d.ts +0 -0
  314. /package/sdk/application/{models/FileStorageValidator.d.ts → FileStorage/FileStorageApplicationValidator.d.ts} +0 -0
  315. /package/sdk/application/{client → Lead}/LeadApplicationClient.d.ts +0 -0
  316. /package/sdk/application/{models/LeadValidator.d.ts → Lead/LeadApplicationValidator.d.ts} +0 -0
  317. /package/sdk/application/{client → Order}/OrderApplicationClient.d.ts +0 -0
  318. /package/sdk/application/{models/OrderValidator.d.ts → Order/OrderApplicationValidator.d.ts} +0 -0
  319. /package/sdk/application/{client → Payment}/PaymentApplicationClient.d.ts +0 -0
  320. /package/sdk/application/{models/PaymentValidator.d.ts → Payment/PaymentApplicationValidator.d.ts} +0 -0
  321. /package/sdk/application/{models/PosCartValidator.d.ts → PosCart/PosCartApplicationValidator.d.ts} +0 -0
  322. /package/sdk/application/{client → Rewards}/RewardsApplicationClient.d.ts +0 -0
  323. /package/sdk/application/{models/RewardsValidator.d.ts → Rewards/RewardsApplicationValidator.d.ts} +0 -0
  324. /package/sdk/application/{client → Share}/ShareApplicationClient.d.ts +0 -0
  325. /package/sdk/application/{models/ShareValidator.d.ts → Share/ShareApplicationValidator.d.ts} +0 -0
  326. /package/sdk/application/{client → Theme}/ThemeApplicationClient.d.ts +0 -0
  327. /package/sdk/application/{models/ThemeValidator.d.ts → Theme/ThemeApplicationValidator.d.ts} +0 -0
  328. /package/sdk/application/{client → User}/UserApplicationClient.d.ts +0 -0
  329. /package/sdk/application/{models/UserValidator.d.ts → User/UserApplicationValidator.d.ts} +0 -0
  330. /package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.d.ts +0 -0
  331. /package/sdk/platform/{models/AnalyticsValidator.d.ts → Analytics/AnalyticsPlatformValidator.d.ts} +0 -0
  332. /package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.d.ts +0 -0
  333. /package/sdk/platform/{models/AuditTrailValidator.d.ts → AuditTrail/AuditTrailPlatformValidator.d.ts} +0 -0
  334. /package/sdk/platform/{client → Billing}/BillingPlatformClient.d.ts +0 -0
  335. /package/sdk/platform/{models/BillingValidator.d.ts → Billing/BillingPlatformValidator.d.ts} +0 -0
  336. /package/sdk/platform/{client → Common}/CommonPlatformClient.d.ts +0 -0
  337. /package/sdk/platform/{models/CommonValidator.d.ts → Common/CommonPlatformValidator.d.ts} +0 -0
  338. /package/sdk/platform/{client → Communication}/CommunicationPlatformClient.d.ts +0 -0
  339. /package/sdk/platform/{models/CommunicationValidator.d.ts → Communication/CommunicationPlatformValidator.d.ts} +0 -0
  340. /package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.d.ts +0 -0
  341. /package/sdk/platform/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPlatformValidator.d.ts} +0 -0
  342. /package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.d.ts +0 -0
  343. /package/sdk/platform/{models/FileStorageValidator.d.ts → FileStorage/FileStoragePlatformValidator.d.ts} +0 -0
  344. /package/sdk/platform/{client → Inventory}/InventoryPlatformClient.d.ts +0 -0
  345. /package/sdk/platform/{models/InventoryValidator.d.ts → Inventory/InventoryPlatformValidator.d.ts} +0 -0
  346. /package/sdk/platform/{client → Lead}/LeadPlatformClient.d.ts +0 -0
  347. /package/sdk/platform/{models/LeadValidator.d.ts → Lead/LeadPlatformValidator.d.ts} +0 -0
  348. /package/sdk/platform/{client → Payment}/PaymentPlatformClient.d.ts +0 -0
  349. /package/sdk/platform/{models/PaymentValidator.d.ts → Payment/PaymentPlatformValidator.d.ts} +0 -0
  350. /package/sdk/platform/{client → Webhook}/WebhookPlatformClient.d.ts +0 -0
  351. /package/sdk/platform/{models/WebhookValidator.d.ts → Webhook/WebhookPlatformValidator.d.ts} +0 -0
  352. /package/sdk/public/{client → Configuration}/ConfigurationPublicClient.d.ts +0 -0
  353. /package/sdk/public/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPublicValidator.d.ts} +0 -0
  354. /package/sdk/public/{client → Inventory}/InventoryPublicClient.d.ts +0 -0
  355. /package/sdk/public/{models/InventoryValidator.d.ts → Inventory/InventoryPublicValidator.d.ts} +0 -0
  356. /package/sdk/public/{client → Webhook}/WebhookPublicClient.d.ts +0 -0
  357. /package/sdk/public/{models/WebhookValidator.d.ts → Webhook/WebhookPublicValidator.d.ts} +0 -0
@@ -0,0 +1,2136 @@
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 delete.
16
+ * @param {CreateSearchKeyword} arg.body
17
+ * @summary: Update Search Keyword
18
+ * @description: Update Search Keyword by its id. On successful request, returns the updated collection
19
+ */
20
+ updateSearchKeywords({ id, body } = {}) {
21
+ const { error } = CatalogValidator.updateSearchKeywords().validate(
22
+ {
23
+ id,
24
+ body,
25
+ },
26
+ { abortEarly: false, allowUnknown: true }
27
+ );
28
+ if (error) {
29
+ return Promise.reject(new FDKClientValidationError(error));
30
+ }
31
+
32
+ const query_params = {};
33
+
34
+ return PlatformAPIClient.execute(
35
+ this.config,
36
+ "put",
37
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
38
+ query_params,
39
+ body
40
+ );
41
+ }
42
+
43
+ /**
44
+ * @param {Object} arg - Arg object.
45
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
46
+ * detail. Pass the `id` of the keywords which you want to retrieve.
47
+ * @summary: Get a Search Keywords Details
48
+ * @description: Get the details of a words by its `id`. If successful, returns a Collection resource in the response body specified in `GetSearchWordsDetailResponseSchema`
49
+ */
50
+ getSearchKeywords({ id } = {}) {
51
+ const { error } = CatalogValidator.getSearchKeywords().validate(
52
+ {
53
+ id,
54
+ },
55
+ { abortEarly: false, allowUnknown: true }
56
+ );
57
+ if (error) {
58
+ return Promise.reject(new FDKClientValidationError(error));
59
+ }
60
+
61
+ const query_params = {};
62
+
63
+ return PlatformAPIClient.execute(
64
+ this.config,
65
+ "get",
66
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
67
+ query_params,
68
+ undefined
69
+ );
70
+ }
71
+
72
+ /**
73
+ * @param {Object} arg - Arg object.
74
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
75
+ * detail. Pass the `id` of the keywords which you want to delete.
76
+ * @summary: Delete a Search Keywords
77
+ * @description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully
78
+ */
79
+ deleteSearchKeywords({ id } = {}) {
80
+ const { error } = CatalogValidator.deleteSearchKeywords().validate(
81
+ {
82
+ id,
83
+ },
84
+ { abortEarly: false, allowUnknown: true }
85
+ );
86
+ if (error) {
87
+ return Promise.reject(new FDKClientValidationError(error));
88
+ }
89
+
90
+ const query_params = {};
91
+
92
+ return PlatformAPIClient.execute(
93
+ this.config,
94
+ "delete",
95
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/${id}/`,
96
+ query_params,
97
+ undefined
98
+ );
99
+ }
100
+
101
+ /**
102
+ * @param {Object} arg - Arg object.
103
+ * @summary: List all Search Custom Keyword Listing
104
+ * @description: Custom Search Keyword allows you to map conditions with keywords to give you the ultimate results
105
+ */
106
+ getAllSearchKeyword({} = {}) {
107
+ const { error } = CatalogValidator.getAllSearchKeyword().validate(
108
+ {},
109
+ { abortEarly: false, allowUnknown: true }
110
+ );
111
+ if (error) {
112
+ return Promise.reject(new FDKClientValidationError(error));
113
+ }
114
+
115
+ const query_params = {};
116
+
117
+ return PlatformAPIClient.execute(
118
+ this.config,
119
+ "get",
120
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/`,
121
+ query_params,
122
+ undefined
123
+ );
124
+ }
125
+
126
+ /**
127
+ * @param {Object} arg - Arg object.
128
+ * @param {CreateSearchKeyword} arg.body
129
+ * @summary: Add a Custom Search Keywords
130
+ * @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`
131
+ */
132
+ createCustomKeyword({ body } = {}) {
133
+ const { error } = CatalogValidator.createCustomKeyword().validate(
134
+ {
135
+ body,
136
+ },
137
+ { abortEarly: false, allowUnknown: true }
138
+ );
139
+ if (error) {
140
+ return Promise.reject(new FDKClientValidationError(error));
141
+ }
142
+
143
+ const query_params = {};
144
+
145
+ return PlatformAPIClient.execute(
146
+ this.config,
147
+ "post",
148
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/keyword/`,
149
+ query_params,
150
+ body
151
+ );
152
+ }
153
+
154
+ /**
155
+ * @param {Object} arg - Arg object.
156
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
157
+ * detail. Pass the `id` of the keywords which you want to delete.
158
+ * @param {CreateAutocompleteKeyword} arg.body
159
+ * @summary: Create & Update Autocomplete Keyword
160
+ * @description: Update a mapping by it's id. On successful request, returns the updated Keyword mapping
161
+ */
162
+ updateAutocompleteKeyword({ id, body } = {}) {
163
+ const { error } = CatalogValidator.updateAutocompleteKeyword().validate(
164
+ {
165
+ id,
166
+ body,
167
+ },
168
+ { abortEarly: false, allowUnknown: true }
169
+ );
170
+ if (error) {
171
+ return Promise.reject(new FDKClientValidationError(error));
172
+ }
173
+
174
+ const query_params = {};
175
+
176
+ return PlatformAPIClient.execute(
177
+ this.config,
178
+ "put",
179
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
180
+ query_params,
181
+ body
182
+ );
183
+ }
184
+
185
+ /**
186
+ * @param {Object} arg - Arg object.
187
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
188
+ * detail. Pass the `id` of the keywords which you want to retrieve.
189
+ * @summary: Get a Autocomplete Keywords Details
190
+ * @description: Get the details of a words by its `id`. If successful, returns a keywords resource in the response body specified in `GetAutocompleteWordsResponseSchema`
191
+ */
192
+ getAutocompleteKeywordDetail({ id } = {}) {
193
+ const { error } = CatalogValidator.getAutocompleteKeywordDetail().validate(
194
+ {
195
+ id,
196
+ },
197
+ { abortEarly: false, allowUnknown: true }
198
+ );
199
+ if (error) {
200
+ return Promise.reject(new FDKClientValidationError(error));
201
+ }
202
+
203
+ const query_params = {};
204
+
205
+ return PlatformAPIClient.execute(
206
+ this.config,
207
+ "get",
208
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
209
+ query_params,
210
+ undefined
211
+ );
212
+ }
213
+
214
+ /**
215
+ * @param {Object} arg - Arg object.
216
+ * @param {string} arg.id - A `id` is a unique identifier for a particular
217
+ * detail. Pass the `id` of the keywords which you want to delete.
218
+ * @summary: Delete a Autocomplete Keywords
219
+ * @description: Delete a keywords by it's id. Returns an object that tells whether the keywords was deleted successfully
220
+ */
221
+ deleteAutocompleteKeyword({ id } = {}) {
222
+ const { error } = CatalogValidator.deleteAutocompleteKeyword().validate(
223
+ {
224
+ id,
225
+ },
226
+ { abortEarly: false, allowUnknown: true }
227
+ );
228
+ if (error) {
229
+ return Promise.reject(new FDKClientValidationError(error));
230
+ }
231
+
232
+ const query_params = {};
233
+
234
+ return PlatformAPIClient.execute(
235
+ this.config,
236
+ "delete",
237
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/${id}/`,
238
+ query_params,
239
+ undefined
240
+ );
241
+ }
242
+
243
+ /**
244
+ * @param {Object} arg - Arg object.
245
+ * @summary: List all Autocomplete Keyword Listing
246
+ * @description: Custom Autocomplete Keyword allows you to map conditions with keywords to give you the ultimate results
247
+ */
248
+ getAutocompleteConfig({} = {}) {
249
+ const { error } = CatalogValidator.getAutocompleteConfig().validate(
250
+ {},
251
+ { abortEarly: false, allowUnknown: true }
252
+ );
253
+ if (error) {
254
+ return Promise.reject(new FDKClientValidationError(error));
255
+ }
256
+
257
+ const query_params = {};
258
+
259
+ return PlatformAPIClient.execute(
260
+ this.config,
261
+ "get",
262
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/`,
263
+ query_params,
264
+ undefined
265
+ );
266
+ }
267
+
268
+ /**
269
+ * @param {Object} arg - Arg object.
270
+ * @param {CreateAutocompleteKeyword} arg.body
271
+ * @summary: Add a Custom Autocomplete Keywords
272
+ * @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`
273
+ */
274
+ createCustomAutocompleteRule({ body } = {}) {
275
+ const { error } = CatalogValidator.createCustomAutocompleteRule().validate(
276
+ {
277
+ body,
278
+ },
279
+ { abortEarly: false, allowUnknown: true }
280
+ );
281
+ if (error) {
282
+ return Promise.reject(new FDKClientValidationError(error));
283
+ }
284
+
285
+ const query_params = {};
286
+
287
+ return PlatformAPIClient.execute(
288
+ this.config,
289
+ "post",
290
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/search/autocomplete/`,
291
+ query_params,
292
+ body
293
+ );
294
+ }
295
+
296
+ /**
297
+ * @param {Object} arg - Arg object.
298
+ * @param {string} arg.itemId - Product id for which the custom_meta is associated.
299
+ * @param {ApplicationItemMeta} arg.body
300
+ * @summary: Update a single custom meta.
301
+ * @description: This API helps to update data associated to a item custom meta.
302
+ */
303
+ updateAppProduct({ itemId, body } = {}) {
304
+ const { error } = CatalogValidator.updateAppProduct().validate(
305
+ {
306
+ itemId,
307
+ body,
308
+ },
309
+ { abortEarly: false, allowUnknown: true }
310
+ );
311
+ if (error) {
312
+ return Promise.reject(new FDKClientValidationError(error));
313
+ }
314
+
315
+ const query_params = {};
316
+
317
+ return PlatformAPIClient.execute(
318
+ this.config,
319
+ "patch",
320
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product/${itemId}/`,
321
+ query_params,
322
+ body
323
+ );
324
+ }
325
+
326
+ /**
327
+ * @param {Object} arg - Arg object.
328
+ * @param {string} arg.itemId - Product id for a particular product.
329
+ * @summary: Get company application product data.
330
+ * @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.
331
+ */
332
+ getAppProduct({ itemId } = {}) {
333
+ const { error } = CatalogValidator.getAppProduct().validate(
334
+ {
335
+ itemId,
336
+ },
337
+ { abortEarly: false, allowUnknown: true }
338
+ );
339
+ if (error) {
340
+ return Promise.reject(new FDKClientValidationError(error));
341
+ }
342
+
343
+ const query_params = {};
344
+
345
+ return PlatformAPIClient.execute(
346
+ this.config,
347
+ "get",
348
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product/${itemId}/`,
349
+ query_params,
350
+ undefined
351
+ );
352
+ }
353
+
354
+ /**
355
+ * @param {Object} arg - Arg object.
356
+ * @param {string} arg.configType - A `config_type` is an identifier that
357
+ * defines a specific type of configuration.
358
+ * @param {string} [arg.templateSlug] - Get configuration list filtered by
359
+ * `template_slug` string. This is for the details and comparision groups.
360
+ * @summary: Get configuration metadata details for catalog for admin panel
361
+ * @description: Get the configuraion metadata details for catalog.
362
+ */
363
+ getConfigurationMetadata({ configType, templateSlug } = {}) {
364
+ const { error } = CatalogValidator.getConfigurationMetadata().validate(
365
+ {
366
+ configType,
367
+ templateSlug,
368
+ },
369
+ { abortEarly: false, allowUnknown: true }
370
+ );
371
+ if (error) {
372
+ return Promise.reject(new FDKClientValidationError(error));
373
+ }
374
+
375
+ const query_params = {};
376
+ query_params["template_slug"] = templateSlug;
377
+
378
+ return PlatformAPIClient.execute(
379
+ this.config,
380
+ "get",
381
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/metadata/`,
382
+ query_params,
383
+ undefined
384
+ );
385
+ }
386
+
387
+ /**
388
+ * @param {Object} arg - Arg object.
389
+ * @param {string} arg.configType - A `config_type` is an identifier that
390
+ * defines a specific type of configuration.
391
+ * @param {number} [arg.pageNo] - The page number to navigate through the
392
+ * given set of results.
393
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
394
+ * page. Default is 12.
395
+ * @param {string} [arg.search] - Get configuration list filtered by `search` string.
396
+ * @param {string} [arg.templateSlug] - Get configuration list filtered by
397
+ * `template_slug` string. This is for the details and comparision groups.
398
+ * @summary: Get the details of the application configured configurations of group config types.
399
+ * @description: Get the details of the application configured configurations of group config types.
400
+ */
401
+ getGroupConfigurations({
402
+ configType,
403
+ pageNo,
404
+ pageSize,
405
+ search,
406
+ templateSlug,
407
+ } = {}) {
408
+ const { error } = CatalogValidator.getGroupConfigurations().validate(
409
+ {
410
+ configType,
411
+ pageNo,
412
+ pageSize,
413
+ search,
414
+ templateSlug,
415
+ },
416
+ { abortEarly: false, allowUnknown: true }
417
+ );
418
+ if (error) {
419
+ return Promise.reject(new FDKClientValidationError(error));
420
+ }
421
+
422
+ const query_params = {};
423
+ query_params["page_no"] = pageNo;
424
+ query_params["page_size"] = pageSize;
425
+ query_params["search"] = search;
426
+ query_params["template_slug"] = templateSlug;
427
+
428
+ return PlatformAPIClient.execute(
429
+ this.config,
430
+ "get",
431
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups`,
432
+ query_params,
433
+ undefined
434
+ );
435
+ }
436
+
437
+ /**
438
+ * @param {Object} arg - Arg object.
439
+ * @param {string} arg.configType - A `config_type` is a unique identifier
440
+ * for a particular group configuration type.
441
+ * @param {AppConfigurationDetail} arg.body
442
+ * @summary: Create configuration for Group config types.
443
+ * @description: Create configuration for Group config types.
444
+ */
445
+ createGroupConfiguration({ configType, body } = {}) {
446
+ const { error } = CatalogValidator.createGroupConfiguration().validate(
447
+ {
448
+ configType,
449
+ body,
450
+ },
451
+ { abortEarly: false, allowUnknown: true }
452
+ );
453
+ if (error) {
454
+ return Promise.reject(new FDKClientValidationError(error));
455
+ }
456
+
457
+ const query_params = {};
458
+
459
+ return PlatformAPIClient.execute(
460
+ this.config,
461
+ "post",
462
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups`,
463
+ query_params,
464
+ body
465
+ );
466
+ }
467
+
468
+ /**
469
+ * @param {Object} arg - Arg object.
470
+ * @param {string} arg.configType - A `config_type` is a unique identifier
471
+ * for a particular group configuration type.
472
+ * @param {string} arg.groupSlug - A `group_slug` is a unique identifier of
473
+ * a particular configuration.
474
+ * @param {AppConfigurationDetail} arg.body
475
+ * @summary: Update the group configurations for the application.
476
+ * @description: Update the group configurations for the application.
477
+ */
478
+ updateGroupConfiguration({ configType, groupSlug, body } = {}) {
479
+ const { error } = CatalogValidator.updateGroupConfiguration().validate(
480
+ {
481
+ configType,
482
+ groupSlug,
483
+ body,
484
+ },
485
+ { abortEarly: false, allowUnknown: true }
486
+ );
487
+ if (error) {
488
+ return Promise.reject(new FDKClientValidationError(error));
489
+ }
490
+
491
+ const query_params = {};
492
+
493
+ return PlatformAPIClient.execute(
494
+ this.config,
495
+ "put",
496
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups/${groupSlug}`,
497
+ query_params,
498
+ body
499
+ );
500
+ }
501
+
502
+ /**
503
+ * @param {Object} arg - Arg object.
504
+ * @param {string} arg.configType - A `config_type` is a unique identifier
505
+ * for a particular group configuration type.
506
+ * @param {string} arg.groupSlug - A `group_slug` is a unique identifier of
507
+ * a particular configuration.
508
+ * @summary: Delete configuration of the product config type of the application.
509
+ * @description: Delete configuration of the product config type of the application.
510
+ */
511
+ deleteGroupConfiguration({ configType, groupSlug } = {}) {
512
+ const { error } = CatalogValidator.deleteGroupConfiguration().validate(
513
+ {
514
+ configType,
515
+ groupSlug,
516
+ },
517
+ { abortEarly: false, allowUnknown: true }
518
+ );
519
+ if (error) {
520
+ return Promise.reject(new FDKClientValidationError(error));
521
+ }
522
+
523
+ const query_params = {};
524
+
525
+ return PlatformAPIClient.execute(
526
+ this.config,
527
+ "delete",
528
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/groups/${groupSlug}`,
529
+ query_params,
530
+ undefined
531
+ );
532
+ }
533
+
534
+ /**
535
+ * @param {Object} arg - Arg object.
536
+ * @param {string} arg.configType - A `config_type` is an identifier that
537
+ * defines a specific type of configuration.
538
+ * @param {number} [arg.pageNo] - The page number to navigate through the
539
+ * given set of results.
540
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
541
+ * page. Default is 12.
542
+ * @param {string} [arg.search] - Get configuration list filtered by `search` string.
543
+ * @summary: Get the details of the application configured configurations of listing config types.
544
+ * @description: Get the details of the application configured configurations of listing config types.
545
+ */
546
+ getListingConfigurations({ configType, pageNo, pageSize, search } = {}) {
547
+ const { error } = CatalogValidator.getListingConfigurations().validate(
548
+ {
549
+ configType,
550
+ pageNo,
551
+ pageSize,
552
+ search,
553
+ },
554
+ { abortEarly: false, allowUnknown: true }
555
+ );
556
+ if (error) {
557
+ return Promise.reject(new FDKClientValidationError(error));
558
+ }
559
+
560
+ const query_params = {};
561
+ query_params["page_no"] = pageNo;
562
+ query_params["page_size"] = pageSize;
563
+ query_params["search"] = search;
564
+
565
+ return PlatformAPIClient.execute(
566
+ this.config,
567
+ "get",
568
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/`,
569
+ query_params,
570
+ undefined
571
+ );
572
+ }
573
+
574
+ /**
575
+ * @param {Object} arg - Arg object.
576
+ * @param {string} arg.configType - A `config_type` is a unique identifier
577
+ * for a particular listing configuration type.
578
+ * @param {AppConfigurationsSort} arg.body
579
+ * @summary: Add configuration for listings
580
+ * @description: Add configuration for listing.
581
+ */
582
+ createListingConfiguration({ configType, body } = {}) {
583
+ const { error } = CatalogValidator.createListingConfiguration().validate(
584
+ {
585
+ configType,
586
+ body,
587
+ },
588
+ { abortEarly: false, allowUnknown: true }
589
+ );
590
+ if (error) {
591
+ return Promise.reject(new FDKClientValidationError(error));
592
+ }
593
+
594
+ const query_params = {};
595
+
596
+ return PlatformAPIClient.execute(
597
+ this.config,
598
+ "post",
599
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/`,
600
+ query_params,
601
+ body
602
+ );
603
+ }
604
+
605
+ /**
606
+ * @param {Object} arg - Arg object.
607
+ * @param {string} arg.configType - A `config_type` is a unique identifier
608
+ * for a particular listing configuration type.
609
+ * @param {string} arg.configId - A `config_id` is a unique identifier of a
610
+ * particular configuration.
611
+ * @param {AppConfigurationsSort} arg.body
612
+ * @summary: Update configuration for listings
613
+ * @description: Update configuration for listing.
614
+ */
615
+ updateListingConfiguration({ configType, configId, body } = {}) {
616
+ const { error } = CatalogValidator.updateListingConfiguration().validate(
617
+ {
618
+ configType,
619
+ configId,
620
+ body,
621
+ },
622
+ { abortEarly: false, allowUnknown: true }
623
+ );
624
+ if (error) {
625
+ return Promise.reject(new FDKClientValidationError(error));
626
+ }
627
+
628
+ const query_params = {};
629
+
630
+ return PlatformAPIClient.execute(
631
+ this.config,
632
+ "put",
633
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/item/${configId}/`,
634
+ query_params,
635
+ body
636
+ );
637
+ }
638
+
639
+ /**
640
+ * @param {Object} arg - Arg object.
641
+ * @param {string} arg.configType - A `config_type` is a unique identifier
642
+ * for a particular listing configuration type.
643
+ * @param {string} arg.configId - A `config_id` is a unique identifier of a
644
+ * particular configuration.
645
+ * @summary: Delete configuration for listings
646
+ * @description: Delete configuration for listing.
647
+ */
648
+ deleteListingConfiguration({ configType, configId } = {}) {
649
+ const { error } = CatalogValidator.deleteListingConfiguration().validate(
650
+ {
651
+ configType,
652
+ configId,
653
+ },
654
+ { abortEarly: false, allowUnknown: true }
655
+ );
656
+ if (error) {
657
+ return Promise.reject(new FDKClientValidationError(error));
658
+ }
659
+
660
+ const query_params = {};
661
+
662
+ return PlatformAPIClient.execute(
663
+ this.config,
664
+ "delete",
665
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${configType}/item/${configId}/`,
666
+ query_params,
667
+ undefined
668
+ );
669
+ }
670
+
671
+ /**
672
+ * @param {Object} arg - Arg object.
673
+ * @param {AllowSingleRequest} arg.body
674
+ * @summary: Update allow single flag for filters of the application.
675
+ * @description: Update allow single flag for filters of the application.
676
+ */
677
+ updateAllowSingle({ body } = {}) {
678
+ const { error } = CatalogValidator.updateAllowSingle().validate(
679
+ {
680
+ body,
681
+ },
682
+ { abortEarly: false, allowUnknown: true }
683
+ );
684
+ if (error) {
685
+ return Promise.reject(new FDKClientValidationError(error));
686
+ }
687
+
688
+ const query_params = {};
689
+
690
+ return PlatformAPIClient.execute(
691
+ this.config,
692
+ "post",
693
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/filter/allow_single`,
694
+ query_params,
695
+ body
696
+ );
697
+ }
698
+
699
+ /**
700
+ * @param {Object} arg - Arg object.
701
+ * @param {DefaultKeyRequest} arg.body
702
+ * @summary: Update the default sort key configuration for the application.
703
+ * @description: Update the default sort key configuration for the application.
704
+ */
705
+ updateDefaultSort({ body } = {}) {
706
+ const { error } = CatalogValidator.updateDefaultSort().validate(
707
+ {
708
+ body,
709
+ },
710
+ { abortEarly: false, allowUnknown: true }
711
+ );
712
+ if (error) {
713
+ return Promise.reject(new FDKClientValidationError(error));
714
+ }
715
+
716
+ const query_params = {};
717
+
718
+ return PlatformAPIClient.execute(
719
+ this.config,
720
+ "post",
721
+ `/service/platform/catalog/v2.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/sort/default_key`,
722
+ query_params,
723
+ body
724
+ );
725
+ }
726
+
727
+ /**
728
+ * @param {Object} arg - Arg object.
729
+ * @summary: Get configuration meta details for catalog for admin panel
730
+ * @description: configuration meta details for catalog.
731
+ */
732
+ getCatalogConfiguration({} = {}) {
733
+ const { error } = CatalogValidator.getCatalogConfiguration().validate(
734
+ {},
735
+ { abortEarly: false, allowUnknown: true }
736
+ );
737
+ if (error) {
738
+ return Promise.reject(new FDKClientValidationError(error));
739
+ }
740
+
741
+ const query_params = {};
742
+
743
+ return PlatformAPIClient.execute(
744
+ this.config,
745
+ "get",
746
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/metadata/`,
747
+ query_params,
748
+ undefined
749
+ );
750
+ }
751
+
752
+ /**
753
+ * @param {Object} arg - Arg object.
754
+ * @summary: Get configured details for catalog
755
+ * @description: configured details for catalog.
756
+ */
757
+ getConfigurations({} = {}) {
758
+ const { error } = CatalogValidator.getConfigurations().validate(
759
+ {},
760
+ { abortEarly: false, allowUnknown: true }
761
+ );
762
+ if (error) {
763
+ return Promise.reject(new FDKClientValidationError(error));
764
+ }
765
+
766
+ const query_params = {};
767
+
768
+ return PlatformAPIClient.execute(
769
+ this.config,
770
+ "get",
771
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/`,
772
+ query_params,
773
+ undefined
774
+ );
775
+ }
776
+
777
+ /**
778
+ * @param {Object} arg - Arg object.
779
+ * @param {AppConfiguration} arg.body
780
+ * @summary: Add configuration for products & listings
781
+ * @description: Add configuration for products & listing.
782
+ */
783
+ createConfigurationProductListing({ body } = {}) {
784
+ const {
785
+ error,
786
+ } = CatalogValidator.createConfigurationProductListing().validate(
787
+ {
788
+ body,
789
+ },
790
+ { abortEarly: false, allowUnknown: true }
791
+ );
792
+ if (error) {
793
+ return Promise.reject(new FDKClientValidationError(error));
794
+ }
795
+
796
+ const query_params = {};
797
+
798
+ return PlatformAPIClient.execute(
799
+ this.config,
800
+ "post",
801
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/`,
802
+ query_params,
803
+ body
804
+ );
805
+ }
806
+
807
+ /**
808
+ * @param {Object} arg - Arg object.
809
+ * @param {string} arg.type - Type can be brands, categories etc.
810
+ * @summary: Get configured details for catalog
811
+ * @description: configured details for catalog.
812
+ */
813
+ getConfigurationByType({ type } = {}) {
814
+ const { error } = CatalogValidator.getConfigurationByType().validate(
815
+ {
816
+ type,
817
+ },
818
+ { abortEarly: false, allowUnknown: true }
819
+ );
820
+ if (error) {
821
+ return Promise.reject(new FDKClientValidationError(error));
822
+ }
823
+
824
+ const query_params = {};
825
+
826
+ return PlatformAPIClient.execute(
827
+ this.config,
828
+ "get",
829
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${type}/`,
830
+ query_params,
831
+ undefined
832
+ );
833
+ }
834
+
835
+ /**
836
+ * @param {Object} arg - Arg object.
837
+ * @param {string} arg.type - Type can be brands, categories etc.
838
+ * @param {AppConfiguration} arg.body
839
+ * @summary: Add configuration for categories and brands
840
+ * @description: Add configuration for categories & brands.
841
+ */
842
+ createConfigurationByType({ type, body } = {}) {
843
+ const { error } = CatalogValidator.createConfigurationByType().validate(
844
+ {
845
+ type,
846
+ body,
847
+ },
848
+ { abortEarly: false, allowUnknown: true }
849
+ );
850
+ if (error) {
851
+ return Promise.reject(new FDKClientValidationError(error));
852
+ }
853
+
854
+ const query_params = {};
855
+
856
+ return PlatformAPIClient.execute(
857
+ this.config,
858
+ "post",
859
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/product-configuration/${type}/`,
860
+ query_params,
861
+ body
862
+ );
863
+ }
864
+
865
+ /**
866
+ * @param {Object} arg - Arg object.
867
+ * @summary: Get query filters to configure a collection
868
+ * @description: Get query filters to configure a collection
869
+ */
870
+ getQueryFilters({} = {}) {
871
+ const { error } = CatalogValidator.getQueryFilters().validate(
872
+ {},
873
+ { abortEarly: false, allowUnknown: true }
874
+ );
875
+ if (error) {
876
+ return Promise.reject(new FDKClientValidationError(error));
877
+ }
878
+
879
+ const query_params = {};
880
+
881
+ return PlatformAPIClient.execute(
882
+ this.config,
883
+ "get",
884
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/query-options/`,
885
+ query_params,
886
+ undefined
887
+ );
888
+ }
889
+
890
+ /**
891
+ * @param {Object} arg - Arg object.
892
+ * @param {string} [arg.q] - Get collection list filtered by q string,
893
+ * @param {string} [arg.scheduleStatus] - Get collection list filtered by
894
+ * scheduled status,
895
+ * @param {string} [arg.type] - Type of the collections
896
+ * @param {string[]} [arg.tags] - Each response will contain next_id param,
897
+ * which should be sent back to make pagination work.
898
+ * @param {boolean} [arg.isActive] - Get collections filtered by active status.
899
+ * @param {number} [arg.pageNo] - The page number to navigate through the
900
+ * given set of results.
901
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
902
+ * page. Default is 12.
903
+ * @summary: List all the collections
904
+ * @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`
905
+ */
906
+ getAllCollections({
907
+ q,
908
+ scheduleStatus,
909
+ type,
910
+ tags,
911
+ isActive,
912
+ pageNo,
913
+ pageSize,
914
+ } = {}) {
915
+ const { error } = CatalogValidator.getAllCollections().validate(
916
+ {
917
+ q,
918
+ scheduleStatus,
919
+ type,
920
+ tags,
921
+ isActive,
922
+ pageNo,
923
+ pageSize,
924
+ },
925
+ { abortEarly: false, allowUnknown: true }
926
+ );
927
+ if (error) {
928
+ return Promise.reject(new FDKClientValidationError(error));
929
+ }
930
+
931
+ const query_params = {};
932
+ query_params["q"] = q;
933
+ query_params["schedule_status"] = scheduleStatus;
934
+ query_params["type"] = type;
935
+ query_params["tags"] = tags;
936
+ query_params["is_active"] = isActive;
937
+ query_params["page_no"] = pageNo;
938
+ query_params["page_size"] = pageSize;
939
+
940
+ return PlatformAPIClient.execute(
941
+ this.config,
942
+ "get",
943
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/`,
944
+ query_params,
945
+ undefined
946
+ );
947
+ }
948
+
949
+ /**
950
+ * @param {Object} arg - Arg object.
951
+ * @param {CreateCollection} arg.body
952
+ * @summary: Add a Collection
953
+ * @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`
954
+ */
955
+ createCollection({ body } = {}) {
956
+ const { error } = CatalogValidator.createCollection().validate(
957
+ {
958
+ body,
959
+ },
960
+ { abortEarly: false, allowUnknown: true }
961
+ );
962
+ if (error) {
963
+ return Promise.reject(new FDKClientValidationError(error));
964
+ }
965
+
966
+ const query_params = {};
967
+
968
+ return PlatformAPIClient.execute(
969
+ this.config,
970
+ "post",
971
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/`,
972
+ query_params,
973
+ body
974
+ );
975
+ }
976
+
977
+ /**
978
+ * @param {Object} arg - Arg object.
979
+ * @param {string} arg.slug - A `slug` is a human readable, URL friendly
980
+ * unique identifier of an object. Pass the `slug` of the collection which
981
+ * you want to retrieve.
982
+ * @summary: Get a particular collection
983
+ * @description: Get the details of a collection by its `slug`. If successful, returns a Collection resource in the response body specified in `CollectionDetailResponse`
984
+ */
985
+ getCollectionDetail({ slug } = {}) {
986
+ const { error } = CatalogValidator.getCollectionDetail().validate(
987
+ {
988
+ slug,
989
+ },
990
+ { abortEarly: false, allowUnknown: true }
991
+ );
992
+ if (error) {
993
+ return Promise.reject(new FDKClientValidationError(error));
994
+ }
995
+
996
+ const query_params = {};
997
+
998
+ return PlatformAPIClient.execute(
999
+ this.config,
1000
+ "get",
1001
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${slug}/`,
1002
+ query_params,
1003
+ undefined
1004
+ );
1005
+ }
1006
+
1007
+ /**
1008
+ * @param {Object} arg - Arg object.
1009
+ * @param {string} arg.id - A `id` is a unique identifier of a collection.
1010
+ * @param {UpdateCollection} arg.body
1011
+ * @summary: Update a collection
1012
+ * @description: Update a collection by it's id. On successful request, returns the updated collection
1013
+ */
1014
+ updateCollection({ id, body } = {}) {
1015
+ const { error } = CatalogValidator.updateCollection().validate(
1016
+ {
1017
+ id,
1018
+ body,
1019
+ },
1020
+ { abortEarly: false, allowUnknown: true }
1021
+ );
1022
+ if (error) {
1023
+ return Promise.reject(new FDKClientValidationError(error));
1024
+ }
1025
+
1026
+ const query_params = {};
1027
+
1028
+ return PlatformAPIClient.execute(
1029
+ this.config,
1030
+ "put",
1031
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/`,
1032
+ query_params,
1033
+ body
1034
+ );
1035
+ }
1036
+
1037
+ /**
1038
+ * @param {Object} arg - Arg object.
1039
+ * @param {string} arg.id - A `id` is a unique identifier of a collection.
1040
+ * @summary: Delete a Collection
1041
+ * @description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully
1042
+ */
1043
+ deleteCollection({ id } = {}) {
1044
+ const { error } = CatalogValidator.deleteCollection().validate(
1045
+ {
1046
+ id,
1047
+ },
1048
+ { abortEarly: false, allowUnknown: true }
1049
+ );
1050
+ if (error) {
1051
+ return Promise.reject(new FDKClientValidationError(error));
1052
+ }
1053
+
1054
+ const query_params = {};
1055
+
1056
+ return PlatformAPIClient.execute(
1057
+ this.config,
1058
+ "delete",
1059
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/`,
1060
+ query_params,
1061
+ undefined
1062
+ );
1063
+ }
1064
+
1065
+ /**
1066
+ * @param {Object} arg - Arg object.
1067
+ * @param {string} arg.id - A `id` is a unique identifier of a collection.
1068
+ * @param {string} [arg.sortOn] - Each response will contain sort_on param,
1069
+ * which should be sent back to make pagination work.
1070
+ * @param {string} [arg.pageId] - Each response will contain next_id param,
1071
+ * which should be sent back to make pagination work.
1072
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1073
+ * page. Default is 12.
1074
+ * @summary: Get the items for a collection
1075
+ * @description: Get items from a collection specified by its `id`.
1076
+ */
1077
+ getCollectionItems({ id, sortOn, pageId, pageSize } = {}) {
1078
+ const { error } = CatalogValidator.getCollectionItems().validate(
1079
+ {
1080
+ id,
1081
+ sortOn,
1082
+ pageId,
1083
+ pageSize,
1084
+ },
1085
+ { abortEarly: false, allowUnknown: true }
1086
+ );
1087
+ if (error) {
1088
+ return Promise.reject(new FDKClientValidationError(error));
1089
+ }
1090
+
1091
+ const query_params = {};
1092
+ query_params["sort_on"] = sortOn;
1093
+ query_params["page_id"] = pageId;
1094
+ query_params["page_size"] = pageSize;
1095
+
1096
+ return PlatformAPIClient.execute(
1097
+ this.config,
1098
+ "get",
1099
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/items/`,
1100
+ query_params,
1101
+ undefined
1102
+ );
1103
+ }
1104
+
1105
+ /**
1106
+ * @param {Object} arg - Arg object.
1107
+ * @param {string} arg.id - A `id` is a unique identifier of a collection.
1108
+ * @param {CollectionItemRequest} arg.body
1109
+ * @summary: Add items to a collection
1110
+ * @description: Adds items to a collection specified by its `id`. See `CollectionItemRequest` for the list of attributes needed to add items to an collection.
1111
+ */
1112
+ addCollectionItems({ id, body } = {}) {
1113
+ const { error } = CatalogValidator.addCollectionItems().validate(
1114
+ {
1115
+ id,
1116
+ body,
1117
+ },
1118
+ { abortEarly: false, allowUnknown: true }
1119
+ );
1120
+ if (error) {
1121
+ return Promise.reject(new FDKClientValidationError(error));
1122
+ }
1123
+
1124
+ const query_params = {};
1125
+
1126
+ return PlatformAPIClient.execute(
1127
+ this.config,
1128
+ "post",
1129
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/collections/${id}/items/`,
1130
+ query_params,
1131
+ body
1132
+ );
1133
+ }
1134
+
1135
+ /**
1136
+ * @param {Object} arg - Arg object.
1137
+ * @param {string} [arg.brand] - Brand slug
1138
+ * @summary: Analytics data of catalog and inventory.
1139
+ * @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.
1140
+ */
1141
+ getCatalogInsights({ brand } = {}) {
1142
+ const { error } = CatalogValidator.getCatalogInsights().validate(
1143
+ {
1144
+ brand,
1145
+ },
1146
+ { abortEarly: false, allowUnknown: true }
1147
+ );
1148
+ if (error) {
1149
+ return Promise.reject(new FDKClientValidationError(error));
1150
+ }
1151
+
1152
+ const query_params = {};
1153
+ query_params["brand"] = brand;
1154
+
1155
+ return PlatformAPIClient.execute(
1156
+ this.config,
1157
+ "get",
1158
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/analytics/insights/`,
1159
+ query_params,
1160
+ undefined
1161
+ );
1162
+ }
1163
+
1164
+ /**
1165
+ * @param {Object} arg - Arg object.
1166
+ * @param {number} arg.itemId - Item code of the product of which size is to be get.
1167
+ * @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier
1168
+ * or Primary Identifier) of which inventory is to get.
1169
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1170
+ * given set of results
1171
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1172
+ * page. Default is 12.
1173
+ * @param {string} [arg.q] - Search with help of store code.
1174
+ * @param {number[]} [arg.locationIds] - Search by store ids.
1175
+ * @summary: Get Inventory for company
1176
+ * @description: This API allows get Inventory data for particular company grouped by size and store.
1177
+ */
1178
+ getDiscountedInventoryBySizeIdentifier({
1179
+ itemId,
1180
+ sizeIdentifier,
1181
+ pageNo,
1182
+ pageSize,
1183
+ q,
1184
+ locationIds,
1185
+ } = {}) {
1186
+ const {
1187
+ error,
1188
+ } = CatalogValidator.getDiscountedInventoryBySizeIdentifier().validate(
1189
+ {
1190
+ itemId,
1191
+ sizeIdentifier,
1192
+ pageNo,
1193
+ pageSize,
1194
+ q,
1195
+ locationIds,
1196
+ },
1197
+ { abortEarly: false, allowUnknown: true }
1198
+ );
1199
+ if (error) {
1200
+ return Promise.reject(new FDKClientValidationError(error));
1201
+ }
1202
+
1203
+ const query_params = {};
1204
+ query_params["page_no"] = pageNo;
1205
+ query_params["page_size"] = pageSize;
1206
+ query_params["q"] = q;
1207
+ query_params["location_ids"] = locationIds;
1208
+
1209
+ return PlatformAPIClient.execute(
1210
+ this.config,
1211
+ "get",
1212
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products/${itemId}/inventory/${sizeIdentifier}`,
1213
+ query_params,
1214
+ undefined
1215
+ );
1216
+ }
1217
+
1218
+ /**
1219
+ * @param {Object} arg - Arg object.
1220
+ * @param {string} [arg.department] - The name of the department. Use this
1221
+ * parameter to filter products by a particular department. See below the
1222
+ * list of available departments. You can retrieve available departments
1223
+ * from the **v1.0/departments/** API
1224
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1225
+ * given set of results
1226
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1227
+ * page. Default is 12.
1228
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
1229
+ * to search brands by brand name.
1230
+ * @param {number[]} [arg.brandId] - Helps to sort the brands list on the
1231
+ * basis of uid list.
1232
+ * @summary: List all the brands
1233
+ * @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`
1234
+ */
1235
+ getApplicationBrands({ department, pageNo, pageSize, q, brandId } = {}) {
1236
+ const { error } = CatalogValidator.getApplicationBrands().validate(
1237
+ {
1238
+ department,
1239
+ pageNo,
1240
+ pageSize,
1241
+ q,
1242
+ brandId,
1243
+ },
1244
+ { abortEarly: false, allowUnknown: true }
1245
+ );
1246
+ if (error) {
1247
+ return Promise.reject(new FDKClientValidationError(error));
1248
+ }
1249
+
1250
+ const query_params = {};
1251
+ query_params["department"] = department;
1252
+ query_params["page_no"] = pageNo;
1253
+ query_params["page_size"] = pageSize;
1254
+ query_params["q"] = q;
1255
+ query_params["brand_id"] = brandId;
1256
+
1257
+ return PlatformAPIClient.execute(
1258
+ this.config,
1259
+ "get",
1260
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brands`,
1261
+ query_params,
1262
+ undefined
1263
+ );
1264
+ }
1265
+
1266
+ /**
1267
+ * @param {Object} arg - Arg object.
1268
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
1269
+ * a particular seller account.
1270
+ * @param {string} arg.applicationId - A `application_id` is a unique
1271
+ * identifier for a particular sale channel.
1272
+ * @param {string} [arg.department] - The name of the department. Use this
1273
+ * parameter to filter products by a particular department. See below the
1274
+ * list of available departments. You can retrieve available departments
1275
+ * from the **v1.0/departments/** API
1276
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1277
+ * page. Default is 12.
1278
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
1279
+ * to search brands by brand name.
1280
+ * @param {number[]} [arg.brandId] - Helps to sort the brands list on the
1281
+ * basis of uid list.
1282
+ * @summary: List all the brands
1283
+ * @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`
1284
+ */
1285
+ getApplicationBrandsPaginator({
1286
+ companyId,
1287
+ applicationId,
1288
+ department,
1289
+ pageSize,
1290
+ q,
1291
+ brandId,
1292
+ } = {}) {
1293
+ const paginator = new Paginator();
1294
+ const callback = async () => {
1295
+ const pageId = paginator.nextId;
1296
+ const pageNo = paginator.pageNo;
1297
+ const pageType = "number";
1298
+ const data = await this.getApplicationBrands({
1299
+ companyId: companyId,
1300
+ applicationId: applicationId,
1301
+ department: department,
1302
+ pageNo: pageNo,
1303
+ pageSize: pageSize,
1304
+ q: q,
1305
+ brandId: brandId,
1306
+ });
1307
+ paginator.setPaginator({
1308
+ hasNext: data.page.has_next ? true : false,
1309
+ nextId: data.page.next_id,
1310
+ });
1311
+ return data;
1312
+ };
1313
+ paginator.setCallback(callback.bind(this));
1314
+ return paginator;
1315
+ }
1316
+
1317
+ /**
1318
+ * @param {Object} arg - Arg object.
1319
+ * @summary: List all the departments
1320
+ * @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`
1321
+ */
1322
+ getDepartments({} = {}) {
1323
+ const { error } = CatalogValidator.getDepartments().validate(
1324
+ {},
1325
+ { abortEarly: false, allowUnknown: true }
1326
+ );
1327
+ if (error) {
1328
+ return Promise.reject(new FDKClientValidationError(error));
1329
+ }
1330
+
1331
+ const query_params = {};
1332
+
1333
+ return PlatformAPIClient.execute(
1334
+ this.config,
1335
+ "get",
1336
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/departments`,
1337
+ query_params,
1338
+ undefined
1339
+ );
1340
+ }
1341
+
1342
+ /**
1343
+ * @param {Object} arg - Arg object.
1344
+ * @param {string} [arg.department] - The name of the department. Use this
1345
+ * parameter to filter products by a particular department. See below the
1346
+ * list of available departments. You can retrieve available departments
1347
+ * from the **v1.0/departments/** API
1348
+ * @summary: List all the categories
1349
+ * @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`
1350
+ */
1351
+ getCategories({ department } = {}) {
1352
+ const { error } = CatalogValidator.getCategories().validate(
1353
+ {
1354
+ department,
1355
+ },
1356
+ { abortEarly: false, allowUnknown: true }
1357
+ );
1358
+ if (error) {
1359
+ return Promise.reject(new FDKClientValidationError(error));
1360
+ }
1361
+
1362
+ const query_params = {};
1363
+ query_params["department"] = department;
1364
+
1365
+ return PlatformAPIClient.execute(
1366
+ this.config,
1367
+ "get",
1368
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/categories`,
1369
+ query_params,
1370
+ undefined
1371
+ );
1372
+ }
1373
+
1374
+ /**
1375
+ * @param {Object} arg - Arg object.
1376
+ * @param {string} [arg.q] - The search query. This can be a partial or
1377
+ * complete name of a either a product, brand or category
1378
+ * @param {string} [arg.f] - The search filter parameters. All the parameter
1379
+ * filtered from filter parameters will be passed in **f** parameter in
1380
+ * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts**
1381
+ * @param {string} [arg.c] - The search filter parameters for collection
1382
+ * items. All the parameter filtered from filter parameters will be passed
1383
+ * in **c** parameter in this format.
1384
+ * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
1385
+ * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
1386
+ * filter details. This flag is used to fetch all filters
1387
+ * @param {string} [arg.sortOn] - The order to sort the list of products on.
1388
+ * The supported sort parameters are popularity, price, redemption and
1389
+ * discount in either ascending or descending order. See the supported
1390
+ * values below.
1391
+ * @param {string} [arg.pageId] - Each response will contain **page_id**
1392
+ * param, which should be sent back to make pagination work.
1393
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1394
+ * page. Default is 12.
1395
+ * @param {number} [arg.pageNo] - If page_type is number then pass it to
1396
+ * fetch page items. Default is 1.
1397
+ * @param {string} [arg.pageType] - For pagination type should be cursor or
1398
+ * number. Default is cursor.
1399
+ * @param {number[]} [arg.itemIds] - Item Ids of product
1400
+ * @summary: List the products
1401
+ * @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`
1402
+ */
1403
+ getAppicationProducts({
1404
+ q,
1405
+ f,
1406
+ c,
1407
+ filters,
1408
+ sortOn,
1409
+ pageId,
1410
+ pageSize,
1411
+ pageNo,
1412
+ pageType,
1413
+ itemIds,
1414
+ } = {}) {
1415
+ const { error } = CatalogValidator.getAppicationProducts().validate(
1416
+ {
1417
+ q,
1418
+ f,
1419
+ c,
1420
+ filters,
1421
+ sortOn,
1422
+ pageId,
1423
+ pageSize,
1424
+ pageNo,
1425
+ pageType,
1426
+ itemIds,
1427
+ },
1428
+ { abortEarly: false, allowUnknown: true }
1429
+ );
1430
+ if (error) {
1431
+ return Promise.reject(new FDKClientValidationError(error));
1432
+ }
1433
+
1434
+ const query_params = {};
1435
+ query_params["q"] = q;
1436
+ query_params["f"] = f;
1437
+ query_params["c"] = c;
1438
+ query_params["filters"] = filters;
1439
+ query_params["sort_on"] = sortOn;
1440
+ query_params["page_id"] = pageId;
1441
+ query_params["page_size"] = pageSize;
1442
+ query_params["page_no"] = pageNo;
1443
+ query_params["page_type"] = pageType;
1444
+ query_params["item_ids"] = itemIds;
1445
+
1446
+ return PlatformAPIClient.execute(
1447
+ this.config,
1448
+ "get",
1449
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products`,
1450
+ query_params,
1451
+ undefined
1452
+ );
1453
+ }
1454
+
1455
+ /**
1456
+ * @param {Object} arg - Arg object.
1457
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
1458
+ * a particular seller account.
1459
+ * @param {string} arg.applicationId - A `application_id` is a unique
1460
+ * identifier for a particular sale channel.
1461
+ * @param {string} [arg.q] - The search query. This can be a partial or
1462
+ * complete name of a either a product, brand or category
1463
+ * @param {string} [arg.f] - The search filter parameters. All the parameter
1464
+ * filtered from filter parameters will be passed in **f** parameter in
1465
+ * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts**
1466
+ * @param {string} [arg.c] - The search filter parameters for collection
1467
+ * items. All the parameter filtered from filter parameters will be passed
1468
+ * in **c** parameter in this format.
1469
+ * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
1470
+ * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
1471
+ * filter details. This flag is used to fetch all filters
1472
+ * @param {string} [arg.sortOn] - The order to sort the list of products on.
1473
+ * The supported sort parameters are popularity, price, redemption and
1474
+ * discount in either ascending or descending order. See the supported
1475
+ * values below.
1476
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1477
+ * page. Default is 12.
1478
+ * @param {number[]} [arg.itemIds] - Item Ids of product
1479
+ * @summary: List the products
1480
+ * @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`
1481
+ */
1482
+ getAppicationProductsPaginator({
1483
+ companyId,
1484
+ applicationId,
1485
+ q,
1486
+ f,
1487
+ c,
1488
+ filters,
1489
+ sortOn,
1490
+ pageSize,
1491
+ itemIds,
1492
+ } = {}) {
1493
+ const paginator = new Paginator();
1494
+ const callback = async () => {
1495
+ const pageId = paginator.nextId;
1496
+ const pageNo = paginator.pageNo;
1497
+ const pageType = "cursor";
1498
+ const data = await this.getAppicationProducts({
1499
+ companyId: companyId,
1500
+ applicationId: applicationId,
1501
+ q: q,
1502
+ f: f,
1503
+ c: c,
1504
+ filters: filters,
1505
+ sortOn: sortOn,
1506
+ pageId: pageId,
1507
+ pageSize: pageSize,
1508
+ pageNo: pageNo,
1509
+ pageType: pageType,
1510
+ itemIds: itemIds,
1511
+ });
1512
+ paginator.setPaginator({
1513
+ hasNext: data.page.has_next ? true : false,
1514
+ nextId: data.page.next_id,
1515
+ });
1516
+ return data;
1517
+ };
1518
+ paginator.setCallback(callback.bind(this));
1519
+ return paginator;
1520
+ }
1521
+
1522
+ /**
1523
+ * @param {Object} arg - Arg object.
1524
+ * @param {string} arg.slug - The unique identifier of a product. i.e;
1525
+ * `slug` of a product. You can retrieve these from the APIs that list
1526
+ * products like **v1.0/products/**
1527
+ * @summary: Get a product
1528
+ * @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`
1529
+ */
1530
+ getProductDetailBySlug({ slug } = {}) {
1531
+ const { error } = CatalogValidator.getProductDetailBySlug().validate(
1532
+ {
1533
+ slug,
1534
+ },
1535
+ { abortEarly: false, allowUnknown: true }
1536
+ );
1537
+ if (error) {
1538
+ return Promise.reject(new FDKClientValidationError(error));
1539
+ }
1540
+
1541
+ const query_params = {};
1542
+
1543
+ return PlatformAPIClient.execute(
1544
+ this.config,
1545
+ "get",
1546
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products/${slug}`,
1547
+ query_params,
1548
+ undefined
1549
+ );
1550
+ }
1551
+
1552
+ /**
1553
+ * @param {Object} arg - Arg object.
1554
+ * @param {number[]} [arg.brandIds] - Get multiple products filtered by Brand Ids
1555
+ * @param {number[]} [arg.categoryIds] - Get multiple products filtered by
1556
+ * Category Ids
1557
+ * @param {number[]} [arg.departmentIds] - Get multiple products filtered by
1558
+ * Department Ids
1559
+ * @param {string[]} [arg.tags] - Get multiple products filtered by tags
1560
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1561
+ * given set of results
1562
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1563
+ * page. Default is 10.
1564
+ * @param {string} [arg.q] - Search with Item Code, Name, Slug or Identifier.
1565
+ * @summary: Get applicationwise products
1566
+ * @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`
1567
+ */
1568
+ getAppProducts({
1569
+ brandIds,
1570
+ categoryIds,
1571
+ departmentIds,
1572
+ tags,
1573
+ pageNo,
1574
+ pageSize,
1575
+ q,
1576
+ } = {}) {
1577
+ const { error } = CatalogValidator.getAppProducts().validate(
1578
+ {
1579
+ brandIds,
1580
+ categoryIds,
1581
+ departmentIds,
1582
+ tags,
1583
+ pageNo,
1584
+ pageSize,
1585
+ q,
1586
+ },
1587
+ { abortEarly: false, allowUnknown: true }
1588
+ );
1589
+ if (error) {
1590
+ return Promise.reject(new FDKClientValidationError(error));
1591
+ }
1592
+
1593
+ const query_params = {};
1594
+ query_params["brand_ids"] = brandIds;
1595
+ query_params["category_ids"] = categoryIds;
1596
+ query_params["department_ids"] = departmentIds;
1597
+ query_params["tags"] = tags;
1598
+ query_params["page_no"] = pageNo;
1599
+ query_params["page_size"] = pageSize;
1600
+ query_params["q"] = q;
1601
+
1602
+ return PlatformAPIClient.execute(
1603
+ this.config,
1604
+ "get",
1605
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/raw-products/`,
1606
+ query_params,
1607
+ undefined
1608
+ );
1609
+ }
1610
+
1611
+ /**
1612
+ * @param {Object} arg - Arg object.
1613
+ * @param {number[]} [arg.itemIds] - The Item Id of the product.
1614
+ * @param {number[]} [arg.storeIds] - The Store Id of products to fetch inventory.
1615
+ * @param {number[]} [arg.brandIds] - The Brand Id of products to fetch inventory.
1616
+ * @param {string[]} [arg.sellerIdentifiers] - Unique seller_identifier of
1617
+ * the product.
1618
+ * @param {string} [arg.timestamp] - Timestamp in UTC format (2020-07-23T10:27:50Z)
1619
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
1620
+ * @param {string} [arg.pageId] - Page ID to retrieve next set of results.
1621
+ * @summary: Get the stock of a product
1622
+ * @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
1623
+ */
1624
+ getAppInventory({
1625
+ itemIds,
1626
+ storeIds,
1627
+ brandIds,
1628
+ sellerIdentifiers,
1629
+ timestamp,
1630
+ pageSize,
1631
+ pageId,
1632
+ } = {}) {
1633
+ const { error } = CatalogValidator.getAppInventory().validate(
1634
+ {
1635
+ itemIds,
1636
+ storeIds,
1637
+ brandIds,
1638
+ sellerIdentifiers,
1639
+ timestamp,
1640
+ pageSize,
1641
+ pageId,
1642
+ },
1643
+ { abortEarly: false, allowUnknown: true }
1644
+ );
1645
+ if (error) {
1646
+ return Promise.reject(new FDKClientValidationError(error));
1647
+ }
1648
+
1649
+ const query_params = {};
1650
+ query_params["item_ids"] = itemIds;
1651
+ query_params["store_ids"] = storeIds;
1652
+ query_params["brand_ids"] = brandIds;
1653
+ query_params["seller_identifiers"] = sellerIdentifiers;
1654
+ query_params["timestamp"] = timestamp;
1655
+ query_params["page_size"] = pageSize;
1656
+ query_params["page_id"] = pageId;
1657
+
1658
+ return PlatformAPIClient.execute(
1659
+ this.config,
1660
+ "get",
1661
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/inventory/`,
1662
+ query_params,
1663
+ undefined
1664
+ );
1665
+ }
1666
+
1667
+ /**
1668
+ * @param {Object} arg - Arg object.
1669
+ * @param {string} [arg.storeType] - Helps to sort the location list on the
1670
+ * basis of location type.
1671
+ * @param {number[]} [arg.uid] - Helps to sort the location list on the
1672
+ * basis of uid list.
1673
+ * @param {string} [arg.q] - Query that is to be searched.
1674
+ * @param {string} [arg.stage] - To filter companies on basis of verified or
1675
+ * unverified companies.
1676
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1677
+ * given set of results
1678
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1679
+ * page. Default is 20.
1680
+ * @summary: Get list of locations
1681
+ * @description: This API allows to view all the locations asscoiated to a application.
1682
+ */
1683
+ getAppLocations({ storeType, uid, q, stage, pageNo, pageSize } = {}) {
1684
+ const { error } = CatalogValidator.getAppLocations().validate(
1685
+ {
1686
+ storeType,
1687
+ uid,
1688
+ q,
1689
+ stage,
1690
+ pageNo,
1691
+ pageSize,
1692
+ },
1693
+ { abortEarly: false, allowUnknown: true }
1694
+ );
1695
+ if (error) {
1696
+ return Promise.reject(new FDKClientValidationError(error));
1697
+ }
1698
+
1699
+ const query_params = {};
1700
+ query_params["store_type"] = storeType;
1701
+ query_params["uid"] = uid;
1702
+ query_params["q"] = q;
1703
+ query_params["stage"] = stage;
1704
+ query_params["page_no"] = pageNo;
1705
+ query_params["page_size"] = pageSize;
1706
+
1707
+ return PlatformAPIClient.execute(
1708
+ this.config,
1709
+ "get",
1710
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/locations`,
1711
+ query_params,
1712
+ undefined
1713
+ );
1714
+ }
1715
+
1716
+ /**
1717
+ * @param {Object} arg - Arg object.
1718
+ * @param {string} arg.companyId - Id of the company whose locations are to fetched
1719
+ * @param {string} arg.applicationId - Id of the application whose locations
1720
+ * are to fetched
1721
+ * @param {string} [arg.storeType] - Helps to sort the location list on the
1722
+ * basis of location type.
1723
+ * @param {number[]} [arg.uid] - Helps to sort the location list on the
1724
+ * basis of uid list.
1725
+ * @param {string} [arg.q] - Query that is to be searched.
1726
+ * @param {string} [arg.stage] - To filter companies on basis of verified or
1727
+ * unverified companies.
1728
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1729
+ * page. Default is 20.
1730
+ * @summary: Get list of locations
1731
+ * @description: This API allows to view all the locations asscoiated to a application.
1732
+ */
1733
+ getAppLocationsPaginator({
1734
+ companyId,
1735
+ applicationId,
1736
+ storeType,
1737
+ uid,
1738
+ q,
1739
+ stage,
1740
+ pageSize,
1741
+ } = {}) {
1742
+ const paginator = new Paginator();
1743
+ const callback = async () => {
1744
+ const pageId = paginator.nextId;
1745
+ const pageNo = paginator.pageNo;
1746
+ const pageType = "number";
1747
+ const data = await this.getAppLocations({
1748
+ companyId: companyId,
1749
+ applicationId: applicationId,
1750
+ storeType: storeType,
1751
+ uid: uid,
1752
+ q: q,
1753
+ stage: stage,
1754
+ pageNo: pageNo,
1755
+ pageSize: pageSize,
1756
+ });
1757
+ paginator.setPaginator({
1758
+ hasNext: data.page.has_next ? true : false,
1759
+ nextId: data.page.next_id,
1760
+ });
1761
+ return data;
1762
+ };
1763
+ paginator.setCallback(callback.bind(this));
1764
+ return paginator;
1765
+ }
1766
+
1767
+ /**
1768
+ * @param {Object} arg - Arg object.
1769
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1770
+ * given set of results
1771
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1772
+ * page. Default is 12.
1773
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
1774
+ * to search brands by brand name.
1775
+ * @summary: List all the brands for the application
1776
+ * @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`
1777
+ */
1778
+ getApplicationBrandListing({ pageNo, pageSize, q } = {}) {
1779
+ const { error } = CatalogValidator.getApplicationBrandListing().validate(
1780
+ {
1781
+ pageNo,
1782
+ pageSize,
1783
+ q,
1784
+ },
1785
+ { abortEarly: false, allowUnknown: true }
1786
+ );
1787
+ if (error) {
1788
+ return Promise.reject(new FDKClientValidationError(error));
1789
+ }
1790
+
1791
+ const query_params = {};
1792
+ query_params["page_no"] = pageNo;
1793
+ query_params["page_size"] = pageSize;
1794
+ query_params["q"] = q;
1795
+
1796
+ return PlatformAPIClient.execute(
1797
+ this.config,
1798
+ "get",
1799
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brand`,
1800
+ query_params,
1801
+ undefined
1802
+ );
1803
+ }
1804
+
1805
+ /**
1806
+ * @param {Object} arg - Arg object.
1807
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
1808
+ * a particular seller account.
1809
+ * @param {string} arg.applicationId - A `application_id` is a unique
1810
+ * identifier for a particular sale channel.
1811
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1812
+ * page. Default is 12.
1813
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
1814
+ * to search brands by brand name.
1815
+ * @summary: List all the brands for the application
1816
+ * @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`
1817
+ */
1818
+ getApplicationBrandListingPaginator({
1819
+ companyId,
1820
+ applicationId,
1821
+ pageSize,
1822
+ q,
1823
+ } = {}) {
1824
+ const paginator = new Paginator();
1825
+ const callback = async () => {
1826
+ const pageId = paginator.nextId;
1827
+ const pageNo = paginator.pageNo;
1828
+ const pageType = "number";
1829
+ const data = await this.getApplicationBrandListing({
1830
+ companyId: companyId,
1831
+ applicationId: applicationId,
1832
+ pageNo: pageNo,
1833
+ pageSize: pageSize,
1834
+ q: q,
1835
+ });
1836
+ paginator.setPaginator({
1837
+ hasNext: data.page.has_next ? true : false,
1838
+ nextId: data.page.next_id,
1839
+ });
1840
+ return data;
1841
+ };
1842
+ paginator.setCallback(callback.bind(this));
1843
+ return paginator;
1844
+ }
1845
+
1846
+ /**
1847
+ * @param {Object} arg - Arg object.
1848
+ * @param {string} arg.brandUid - Brand id for which the custom_json is associated.
1849
+ * @param {ApplicationBrandJson} arg.body
1850
+ * @summary: Update a single custom json.
1851
+ * @description: This API helps to update data associated to a item custom meta.
1852
+ */
1853
+ updateAppBrand({ brandUid, body } = {}) {
1854
+ const { error } = CatalogValidator.updateAppBrand().validate(
1855
+ {
1856
+ brandUid,
1857
+ body,
1858
+ },
1859
+ { abortEarly: false, allowUnknown: true }
1860
+ );
1861
+ if (error) {
1862
+ return Promise.reject(new FDKClientValidationError(error));
1863
+ }
1864
+
1865
+ const query_params = {};
1866
+
1867
+ return PlatformAPIClient.execute(
1868
+ this.config,
1869
+ "patch",
1870
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/brand/${brandUid}`,
1871
+ query_params,
1872
+ body
1873
+ );
1874
+ }
1875
+
1876
+ /**
1877
+ * @param {Object} arg - Arg object.
1878
+ * @param {number} [arg.departmentId] - A `department_id` is a unique
1879
+ * identifier for a particular department.
1880
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1881
+ * given set of results
1882
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1883
+ * page. Default is 12.
1884
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
1885
+ * to search brands by brand name.
1886
+ * @summary: List all the brands for the application
1887
+ * @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`
1888
+ */
1889
+ getApplicationCategoryListing({ departmentId, pageNo, pageSize, q } = {}) {
1890
+ const { error } = CatalogValidator.getApplicationCategoryListing().validate(
1891
+ {
1892
+ departmentId,
1893
+ pageNo,
1894
+ pageSize,
1895
+ q,
1896
+ },
1897
+ { abortEarly: false, allowUnknown: true }
1898
+ );
1899
+ if (error) {
1900
+ return Promise.reject(new FDKClientValidationError(error));
1901
+ }
1902
+
1903
+ const query_params = {};
1904
+ query_params["department_id"] = departmentId;
1905
+ query_params["page_no"] = pageNo;
1906
+ query_params["page_size"] = pageSize;
1907
+ query_params["q"] = q;
1908
+
1909
+ return PlatformAPIClient.execute(
1910
+ this.config,
1911
+ "get",
1912
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/category`,
1913
+ query_params,
1914
+ undefined
1915
+ );
1916
+ }
1917
+
1918
+ /**
1919
+ * @param {Object} arg - Arg object.
1920
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
1921
+ * a particular seller account.
1922
+ * @param {string} arg.applicationId - A `application_id` is a unique
1923
+ * identifier for a particular sale channel.
1924
+ * @param {number} [arg.departmentId] - A `department_id` is a unique
1925
+ * identifier for a particular department.
1926
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1927
+ * page. Default is 12.
1928
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
1929
+ * to search brands by brand name.
1930
+ * @summary: List all the brands for the application
1931
+ * @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`
1932
+ */
1933
+ getApplicationCategoryListingPaginator({
1934
+ companyId,
1935
+ applicationId,
1936
+ departmentId,
1937
+ pageSize,
1938
+ q,
1939
+ } = {}) {
1940
+ const paginator = new Paginator();
1941
+ const callback = async () => {
1942
+ const pageId = paginator.nextId;
1943
+ const pageNo = paginator.pageNo;
1944
+ const pageType = "number";
1945
+ const data = await this.getApplicationCategoryListing({
1946
+ companyId: companyId,
1947
+ applicationId: applicationId,
1948
+ departmentId: departmentId,
1949
+ pageNo: pageNo,
1950
+ pageSize: pageSize,
1951
+ q: q,
1952
+ });
1953
+ paginator.setPaginator({
1954
+ hasNext: data.page.has_next ? true : false,
1955
+ nextId: data.page.next_id,
1956
+ });
1957
+ return data;
1958
+ };
1959
+ paginator.setCallback(callback.bind(this));
1960
+ return paginator;
1961
+ }
1962
+
1963
+ /**
1964
+ * @param {Object} arg - Arg object.
1965
+ * @param {string} arg.categoryUid - Category id for which the custom_json
1966
+ * is associated.
1967
+ * @param {ApplicationCategoryJson} arg.body
1968
+ * @summary: Update a single custom json.
1969
+ * @description: This API helps to update data associated to a item custom meta.
1970
+ */
1971
+ updateAppCategory({ categoryUid, body } = {}) {
1972
+ const { error } = CatalogValidator.updateAppCategory().validate(
1973
+ {
1974
+ categoryUid,
1975
+ body,
1976
+ },
1977
+ { abortEarly: false, allowUnknown: true }
1978
+ );
1979
+ if (error) {
1980
+ return Promise.reject(new FDKClientValidationError(error));
1981
+ }
1982
+
1983
+ const query_params = {};
1984
+
1985
+ return PlatformAPIClient.execute(
1986
+ this.config,
1987
+ "patch",
1988
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/category/${categoryUid}`,
1989
+ query_params,
1990
+ body
1991
+ );
1992
+ }
1993
+
1994
+ /**
1995
+ * @param {Object} arg - Arg object.
1996
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1997
+ * given set of results
1998
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
1999
+ * page. Default is 12.
2000
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
2001
+ * to search department by name.
2002
+ * @summary: List all the departments for the application
2003
+ * @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`
2004
+ */
2005
+ getApplicationDepartmentListing({ pageNo, pageSize, q } = {}) {
2006
+ const {
2007
+ error,
2008
+ } = CatalogValidator.getApplicationDepartmentListing().validate(
2009
+ {
2010
+ pageNo,
2011
+ pageSize,
2012
+ q,
2013
+ },
2014
+ { abortEarly: false, allowUnknown: true }
2015
+ );
2016
+ if (error) {
2017
+ return Promise.reject(new FDKClientValidationError(error));
2018
+ }
2019
+
2020
+ const query_params = {};
2021
+ query_params["page_no"] = pageNo;
2022
+ query_params["page_size"] = pageSize;
2023
+ query_params["q"] = q;
2024
+
2025
+ return PlatformAPIClient.execute(
2026
+ this.config,
2027
+ "get",
2028
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/department`,
2029
+ query_params,
2030
+ undefined
2031
+ );
2032
+ }
2033
+
2034
+ /**
2035
+ * @param {Object} arg - Arg object.
2036
+ * @param {string} arg.companyId - A `company_id` is a unique identifier for
2037
+ * a particular seller account.
2038
+ * @param {string} arg.applicationId - A `application_id` is a unique
2039
+ * identifier for a particular sale channel.
2040
+ * @param {number} [arg.pageSize] - Number of items to retrieve in each
2041
+ * page. Default is 12.
2042
+ * @param {string} [arg.q] - Search query with brand name.Use this parameter
2043
+ * to search department by name.
2044
+ * @summary: List all the departments for the application
2045
+ * @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`
2046
+ */
2047
+ getApplicationDepartmentListingPaginator({
2048
+ companyId,
2049
+ applicationId,
2050
+ pageSize,
2051
+ q,
2052
+ } = {}) {
2053
+ const paginator = new Paginator();
2054
+ const callback = async () => {
2055
+ const pageId = paginator.nextId;
2056
+ const pageNo = paginator.pageNo;
2057
+ const pageType = "number";
2058
+ const data = await this.getApplicationDepartmentListing({
2059
+ companyId: companyId,
2060
+ applicationId: applicationId,
2061
+ pageNo: pageNo,
2062
+ pageSize: pageSize,
2063
+ q: q,
2064
+ });
2065
+ paginator.setPaginator({
2066
+ hasNext: data.page.has_next ? true : false,
2067
+ nextId: data.page.next_id,
2068
+ });
2069
+ return data;
2070
+ };
2071
+ paginator.setCallback(callback.bind(this));
2072
+ return paginator;
2073
+ }
2074
+
2075
+ /**
2076
+ * @param {Object} arg - Arg object.
2077
+ * @param {string} arg.departmentUid - Department id for which the
2078
+ * custom_json is associated.
2079
+ * @param {ApplicationDepartmentJson} arg.body
2080
+ * @summary: Update a single custom json.
2081
+ * @description: This API helps to update data associated to a item custom meta.
2082
+ */
2083
+ updateAppDepartment({ departmentUid, body } = {}) {
2084
+ const { error } = CatalogValidator.updateAppDepartment().validate(
2085
+ {
2086
+ departmentUid,
2087
+ body,
2088
+ },
2089
+ { abortEarly: false, allowUnknown: true }
2090
+ );
2091
+ if (error) {
2092
+ return Promise.reject(new FDKClientValidationError(error));
2093
+ }
2094
+
2095
+ const query_params = {};
2096
+
2097
+ return PlatformAPIClient.execute(
2098
+ this.config,
2099
+ "patch",
2100
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/department/${departmentUid}`,
2101
+ query_params,
2102
+ body
2103
+ );
2104
+ }
2105
+
2106
+ /**
2107
+ * @param {Object} arg - Arg object.
2108
+ * @param {string} arg.storeUid - Store id for which the custom_json is associated.
2109
+ * @param {ApplicationStoreJson} arg.body
2110
+ * @summary: Update a single custom json.
2111
+ * @description: This API helps to update data associated to a item custom meta.
2112
+ */
2113
+ updateAppLocation({ storeUid, body } = {}) {
2114
+ const { error } = CatalogValidator.updateAppLocation().validate(
2115
+ {
2116
+ storeUid,
2117
+ body,
2118
+ },
2119
+ { abortEarly: false, allowUnknown: true }
2120
+ );
2121
+ if (error) {
2122
+ return Promise.reject(new FDKClientValidationError(error));
2123
+ }
2124
+
2125
+ const query_params = {};
2126
+
2127
+ return PlatformAPIClient.execute(
2128
+ this.config,
2129
+ "patch",
2130
+ `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/${storeUid}`,
2131
+ query_params,
2132
+ body
2133
+ );
2134
+ }
2135
+ }
2136
+ module.exports = Catalog;