@gofynd/fdk-client-javascript 0.1.37 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/README.md +24 -0
  2. package/application.d.ts +2 -1
  3. package/application.js +2 -1
  4. package/documentation/application/CART.md +315 -289
  5. package/documentation/application/CATALOG.md +438 -415
  6. package/documentation/application/FILESTORAGE.md +2 -0
  7. package/documentation/application/LEAD.md +18 -18
  8. package/documentation/application/LOGISTIC.md +45 -45
  9. package/documentation/application/ORDER.md +277 -277
  10. package/documentation/application/PAYMENT.md +251 -251
  11. package/documentation/application/POSCART.md +318 -292
  12. package/documentation/application/REWARDS.md +1 -0
  13. package/documentation/application/USER.md +19 -14
  14. package/documentation/platform/CART.md +465 -462
  15. package/documentation/platform/CATALOG.md +2792 -2711
  16. package/documentation/platform/COMPANYPROFILE.md +200 -362
  17. package/documentation/platform/DISCOUNT.md +86 -0
  18. package/documentation/platform/FILESTORAGE.md +2 -0
  19. package/documentation/platform/LEAD.md +60 -60
  20. package/documentation/platform/ORDER.md +1451 -1654
  21. package/documentation/platform/PAYMENT.md +94 -94
  22. package/documentation/platform/REWARDS.md +145 -0
  23. package/documentation/platform/USER.md +24 -14
  24. package/index.d.ts +4 -1
  25. package/index.js +13 -4
  26. package/package.json +9 -9
  27. package/platform.d.ts +2 -1
  28. package/platform.js +3 -2
  29. package/public.d.ts +1 -0
  30. package/public.js +3 -2
  31. package/sdk/application/ApplicationAPIClient.js +3 -1
  32. package/sdk/application/ApplicationClient.d.ts +16 -16
  33. package/sdk/application/ApplicationClient.js +32 -16
  34. package/sdk/application/ApplicationConfig.js +3 -2
  35. package/sdk/application/ApplicationModels.d.ts +0 -832
  36. package/sdk/application/ApplicationModels.js +3 -10574
  37. package/sdk/application/{client → Cart}/CartApplicationClient.d.ts +9 -3
  38. package/sdk/application/{client → Cart}/CartApplicationClient.js +316 -8
  39. package/sdk/application/Cart/CartApplicationModel.d.ts +81 -0
  40. package/sdk/application/Cart/CartApplicationModel.js +1136 -0
  41. package/sdk/application/{models/CartValidator.js → Cart/CartApplicationValidator.js} +17 -12
  42. package/sdk/application/{client → Catalog}/CatalogApplicationClient.d.ts +8 -5
  43. package/sdk/application/{client → Catalog}/CatalogApplicationClient.js +389 -8
  44. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +117 -0
  45. package/sdk/application/Catalog/CatalogApplicationModel.js +1606 -0
  46. package/sdk/application/{models/CatalogValidator.js → Catalog/CatalogApplicationValidator.js} +4 -1
  47. package/sdk/application/{client → Common}/CommonApplicationClient.js +24 -2
  48. package/sdk/application/Common/CommonApplicationModel.d.ts +20 -0
  49. package/sdk/application/Common/CommonApplicationModel.js +228 -0
  50. package/sdk/{platform/models/CommonValidator.js → application/Common/CommonApplicationValidator.js} +3 -1
  51. package/sdk/application/{client → Communication}/CommunicationApplicationClient.js +43 -2
  52. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +15 -0
  53. package/sdk/application/Communication/CommunicationApplicationModel.js +144 -0
  54. package/sdk/application/{models/CommunicationValidator.js → Communication/CommunicationApplicationValidator.js} +5 -3
  55. package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.js +202 -2
  56. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +111 -0
  57. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1182 -0
  58. package/sdk/application/{models/ConfigurationValidator.js → Configuration/ConfigurationApplicationValidator.js} +4 -2
  59. package/sdk/application/{client → Content}/ContentApplicationClient.js +217 -2
  60. package/sdk/application/Content/ContentApplicationModel.d.ts +105 -0
  61. package/sdk/application/Content/ContentApplicationModel.js +1349 -0
  62. package/sdk/application/{models/ContentValidator.js → Content/ContentApplicationValidator.js} +3 -1
  63. package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.js +35 -2
  64. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +21 -0
  65. package/sdk/application/FileStorage/FileStorageApplicationModel.js +244 -0
  66. package/sdk/application/{models/FileStorageValidator.js → FileStorage/FileStorageApplicationValidator.js} +6 -4
  67. package/sdk/application/{client → Lead}/LeadApplicationClient.js +83 -2
  68. package/sdk/application/Lead/LeadApplicationModel.d.ts +55 -0
  69. package/sdk/application/Lead/LeadApplicationModel.js +690 -0
  70. package/sdk/application/{models/LeadValidator.js → Lead/LeadApplicationValidator.js} +6 -4
  71. package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +46 -2
  72. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +26 -0
  73. package/sdk/application/Logistic/LogisticApplicationModel.js +286 -0
  74. package/sdk/application/{models/LogisticValidator.js → Logistic/LogisticApplicationValidator.js} +5 -3
  75. package/sdk/application/{client → Order}/OrderApplicationClient.js +148 -2
  76. package/sdk/application/Order/OrderApplicationModel.d.ts +67 -0
  77. package/sdk/application/Order/OrderApplicationModel.js +872 -0
  78. package/sdk/application/{models/OrderValidator.js → Order/OrderApplicationValidator.js} +5 -3
  79. package/sdk/application/{client → Payment}/PaymentApplicationClient.js +530 -2
  80. package/sdk/application/Payment/PaymentApplicationModel.d.ts +96 -0
  81. package/sdk/application/Payment/PaymentApplicationModel.js +1318 -0
  82. package/sdk/application/{models/PaymentValidator.js → Payment/PaymentApplicationValidator.js} +25 -23
  83. package/sdk/application/{client → PosCart}/PosCartApplicationClient.d.ts +9 -3
  84. package/sdk/application/{client → PosCart}/PosCartApplicationClient.js +343 -8
  85. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +79 -0
  86. package/sdk/application/PosCart/PosCartApplicationModel.js +1132 -0
  87. package/sdk/application/{models/PosCartValidator.js → PosCart/PosCartApplicationValidator.js} +18 -13
  88. package/sdk/application/{client → Rewards}/RewardsApplicationClient.js +83 -2
  89. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +23 -0
  90. package/sdk/application/Rewards/RewardsApplicationModel.js +276 -0
  91. package/sdk/application/{models/RewardsValidator.js → Rewards/RewardsApplicationValidator.js} +6 -4
  92. package/sdk/application/{client → Share}/ShareApplicationClient.js +89 -2
  93. package/sdk/application/Share/ShareApplicationModel.d.ts +16 -0
  94. package/sdk/application/Share/ShareApplicationModel.js +178 -0
  95. package/sdk/application/{models/ShareValidator.js → Share/ShareApplicationValidator.js} +4 -2
  96. package/sdk/application/{client → Theme}/ThemeApplicationClient.js +46 -2
  97. package/sdk/application/Theme/ThemeApplicationModel.d.ts +49 -0
  98. package/sdk/application/Theme/ThemeApplicationModel.js +486 -0
  99. package/sdk/application/{models/ThemeValidator.js → Theme/ThemeApplicationValidator.js} +3 -1
  100. package/sdk/application/{client → User}/UserApplicationClient.js +407 -2
  101. package/sdk/application/User/UserApplicationModel.d.ts +95 -0
  102. package/sdk/application/User/UserApplicationModel.js +998 -0
  103. package/sdk/application/{models/UserValidator.js → User/UserApplicationValidator.js} +31 -29
  104. package/sdk/application/index.d.ts +18 -0
  105. package/sdk/application/index.js +33 -0
  106. package/sdk/common/AxiosHelper.js +23 -10
  107. package/sdk/common/Logger.d.ts +2 -0
  108. package/sdk/common/Logger.js +6 -0
  109. package/sdk/common/curlHelper.d.ts +2 -0
  110. package/sdk/common/curlHelper.js +95 -0
  111. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +101 -0
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +399 -0
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +11 -0
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +56 -0
  115. package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.js +60 -2
  116. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +23 -0
  117. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +252 -0
  118. package/sdk/platform/{models/AnalyticsValidator.js → Analytics/AnalyticsPlatformValidator.js} +5 -4
  119. package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.js +48 -2
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +18 -0
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +144 -0
  122. package/sdk/platform/{models/AuditTrailValidator.js → AuditTrail/AuditTrailPlatformValidator.js} +3 -2
  123. package/sdk/platform/{client → Billing}/BillingPlatformClient.js +162 -2
  124. package/sdk/platform/Billing/BillingPlatformModel.d.ts +65 -0
  125. package/sdk/platform/Billing/BillingPlatformModel.js +906 -0
  126. package/sdk/platform/{models/BillingValidator.js → Billing/BillingPlatformValidator.js} +6 -5
  127. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +293 -0
  128. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1001 -0
  129. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +20 -0
  130. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +138 -0
  131. package/sdk/platform/Cart/CartPlatformModel.d.ts +104 -0
  132. package/sdk/platform/Cart/CartPlatformModel.js +1516 -0
  133. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +856 -0
  134. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2927 -0
  135. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +56 -0
  136. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +389 -0
  137. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.js +1402 -349
  138. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +317 -0
  139. package/sdk/platform/Catalog/CatalogPlatformModel.js +4702 -0
  140. package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +92 -91
  141. package/sdk/platform/{client → Common}/CommonPlatformClient.js +28 -2
  142. package/sdk/platform/Common/CommonPlatformModel.d.ts +20 -0
  143. package/sdk/platform/Common/CommonPlatformModel.js +228 -0
  144. package/sdk/{application/models/CommonValidator.js → platform/Common/CommonPlatformValidator.js} +2 -1
  145. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +611 -0
  146. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2243 -0
  147. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +43 -0
  148. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +277 -0
  149. package/sdk/platform/{client → Communication}/CommunicationPlatformClient.js +17 -2
  150. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +102 -0
  151. package/sdk/platform/Communication/CommunicationPlatformModel.js +1312 -0
  152. package/sdk/platform/{models/CommunicationValidator.js → Communication/CommunicationPlatformValidator.js} +2 -1
  153. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.d.ts +0 -9
  154. package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.js +176 -28
  155. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +44 -0
  156. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +706 -0
  157. package/sdk/platform/{models/CompanyProfileValidator.d.ts → CompanyProfile/CompanyProfilePlatformValidator.d.ts} +0 -1
  158. package/sdk/platform/{models/CompanyProfileValidator.js → CompanyProfile/CompanyProfilePlatformValidator.js} +9 -14
  159. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +309 -0
  160. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1322 -0
  161. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +31 -0
  162. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +164 -0
  163. package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.js +284 -2
  164. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +185 -0
  165. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2072 -0
  166. package/sdk/platform/{models/ConfigurationValidator.js → Configuration/ConfigurationPlatformValidator.js} +9 -8
  167. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +781 -0
  168. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3074 -0
  169. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +71 -0
  170. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +422 -0
  171. package/sdk/platform/Content/ContentPlatformModel.d.ts +105 -0
  172. package/sdk/platform/Content/ContentPlatformModel.js +1349 -0
  173. package/sdk/platform/{client → Discount}/DiscountPlatformClient.d.ts +11 -0
  174. package/sdk/platform/{client → Discount}/DiscountPlatformClient.js +187 -2
  175. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +15 -0
  176. package/sdk/platform/Discount/DiscountPlatformModel.js +176 -0
  177. package/sdk/platform/{models/DiscountValidator.d.ts → Discount/DiscountPlatformValidator.d.ts} +1 -0
  178. package/sdk/platform/{models/DiscountValidator.js → Discount/DiscountPlatformValidator.js} +13 -5
  179. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +114 -0
  180. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +301 -0
  181. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +7 -0
  182. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +38 -0
  183. package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.js +78 -2
  184. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +21 -0
  185. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +244 -0
  186. package/sdk/platform/{models/FileStorageValidator.js → FileStorage/FileStoragePlatformValidator.js} +6 -5
  187. package/sdk/platform/{client → Inventory}/InventoryPlatformClient.js +163 -2
  188. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +62 -0
  189. package/sdk/platform/Inventory/InventoryPlatformModel.js +1178 -0
  190. package/sdk/platform/{models/InventoryValidator.js → Inventory/InventoryPlatformValidator.js} +5 -4
  191. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +138 -0
  192. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +559 -0
  193. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +16 -0
  194. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +90 -0
  195. package/sdk/platform/{client → Lead}/LeadPlatformClient.js +142 -2
  196. package/sdk/platform/Lead/LeadPlatformModel.d.ts +55 -0
  197. package/sdk/platform/Lead/LeadPlatformModel.js +690 -0
  198. package/sdk/platform/{models/LeadValidator.js → Lead/LeadPlatformValidator.js} +7 -6
  199. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +59 -0
  200. package/sdk/platform/Order/OrderPlatformApplicationClient.js +207 -0
  201. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +6 -0
  202. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +37 -0
  203. package/sdk/platform/{client → Order}/OrderPlatformClient.d.ts +24 -55
  204. package/sdk/platform/{client → Order}/OrderPlatformClient.js +693 -146
  205. package/sdk/platform/Order/OrderPlatformModel.d.ts +222 -0
  206. package/sdk/platform/Order/OrderPlatformModel.js +3466 -0
  207. package/sdk/platform/{models/OrderValidator.d.ts → Order/OrderPlatformValidator.d.ts} +2 -3
  208. package/sdk/platform/{models/OrderValidator.js → Order/OrderPlatformValidator.js} +32 -48
  209. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +30 -0
  210. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +100 -0
  211. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +5 -0
  212. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +20 -0
  213. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +7 -0
  214. package/sdk/platform/Partner/PartnerPlatformModel.js +54 -0
  215. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +108 -0
  216. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +498 -0
  217. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +14 -0
  218. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +73 -0
  219. package/sdk/platform/{client → Payment}/PaymentPlatformClient.js +141 -2
  220. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  221. package/sdk/platform/Payment/PaymentPlatformModel.js +552 -0
  222. package/sdk/platform/{models/PaymentValidator.js → Payment/PaymentPlatformValidator.js} +6 -5
  223. package/sdk/platform/PlatformAPIClient.js +2 -1
  224. package/sdk/platform/PlatformApplicationClient.d.ts +2824 -18486
  225. package/sdk/platform/PlatformApplicationClient.js +3772 -13928
  226. package/sdk/platform/PlatformClient.d.ts +2824 -2881
  227. package/sdk/platform/PlatformClient.js +3710 -3145
  228. package/sdk/platform/PlatformConfig.js +2 -1
  229. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +150 -0
  230. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +597 -0
  231. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +16 -0
  232. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +91 -0
  233. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +24 -0
  234. package/sdk/platform/Rewards/RewardsPlatformModel.js +294 -0
  235. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +72 -0
  236. package/sdk/platform/Share/SharePlatformApplicationClient.js +235 -0
  237. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +7 -0
  238. package/sdk/platform/Share/SharePlatformApplicationValidator.js +35 -0
  239. package/sdk/platform/Share/SharePlatformModel.d.ts +15 -0
  240. package/sdk/platform/Share/SharePlatformModel.js +170 -0
  241. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +238 -0
  242. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +997 -0
  243. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +27 -0
  244. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +155 -0
  245. package/sdk/platform/Theme/ThemePlatformModel.d.ts +49 -0
  246. package/sdk/platform/Theme/ThemePlatformModel.js +486 -0
  247. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +121 -0
  248. package/sdk/platform/User/UserPlatformApplicationClient.js +506 -0
  249. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -0
  250. package/sdk/platform/User/UserPlatformApplicationValidator.js +79 -0
  251. package/sdk/platform/User/UserPlatformModel.d.ts +95 -0
  252. package/sdk/platform/User/UserPlatformModel.js +998 -0
  253. package/sdk/platform/{client → Webhook}/WebhookPlatformClient.js +92 -2
  254. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +17 -0
  255. package/sdk/platform/Webhook/WebhookPlatformModel.js +208 -0
  256. package/sdk/platform/{models/WebhookValidator.js → Webhook/WebhookPlatformValidator.js} +4 -3
  257. package/sdk/platform/index.d.ts +24 -0
  258. package/sdk/platform/index.js +45 -0
  259. package/sdk/public/{client → Configuration}/ConfigurationPublicClient.js +26 -1
  260. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +20 -0
  261. package/sdk/public/Configuration/ConfigurationPublicModel.js +230 -0
  262. package/sdk/public/{models/ConfigurationValidator.js → Configuration/ConfigurationPublicValidator.js} +3 -1
  263. package/sdk/public/{client → Inventory}/InventoryPublicClient.js +76 -1
  264. package/sdk/public/Inventory/InventoryPublicModel.d.ts +22 -0
  265. package/sdk/public/Inventory/InventoryPublicModel.js +334 -0
  266. package/sdk/public/{models/InventoryValidator.js → Inventory/InventoryPublicValidator.js} +4 -2
  267. package/sdk/public/PublicClient.d.ts +3 -3
  268. package/sdk/public/PublicClient.js +8 -3
  269. package/sdk/public/{client → Webhook}/WebhookPublicClient.js +30 -1
  270. package/sdk/public/Webhook/WebhookPublicModel.d.ts +17 -0
  271. package/sdk/public/Webhook/WebhookPublicModel.js +208 -0
  272. package/sdk/public/{models/WebhookValidator.js → Webhook/WebhookPublicValidator.js} +4 -2
  273. package/sdk/public/index.d.ts +5 -0
  274. package/sdk/public/index.js +7 -0
  275. package/sdk/platform/PlatformApplicationModels.d.ts +0 -328
  276. package/sdk/platform/PlatformApplicationModels.js +0 -22658
  277. package/sdk/platform/PlatformModels.d.ts +0 -1477
  278. package/sdk/platform/PlatformModels.js +0 -20646
  279. package/sdk/platform/models/CartValidator.d.ts +0 -0
  280. package/sdk/platform/models/CartValidator.js +0 -0
  281. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  282. package/sdk/platform/models/ContentValidator.js +0 -0
  283. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  284. package/sdk/platform/models/PartnerValidator.js +0 -0
  285. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  286. package/sdk/platform/models/RewardsValidator.js +0 -0
  287. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  288. package/sdk/platform/models/ShareValidator.js +0 -0
  289. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  290. package/sdk/platform/models/ThemeValidator.js +0 -0
  291. package/sdk/platform/models/UserValidator.d.ts +0 -0
  292. package/sdk/platform/models/UserValidator.js +0 -0
  293. package/sdk/public/PublicModels.d.ts +0 -50
  294. package/sdk/public/PublicModels.js +0 -712
  295. package/sdk/application/{models/CartValidator.d.ts → Cart/CartApplicationValidator.d.ts} +0 -0
  296. package/sdk/application/{models/CatalogValidator.d.ts → Catalog/CatalogApplicationValidator.d.ts} +0 -0
  297. package/sdk/application/{client → Common}/CommonApplicationClient.d.ts +0 -0
  298. package/sdk/application/{models/CommonValidator.d.ts → Common/CommonApplicationValidator.d.ts} +0 -0
  299. package/sdk/application/{client → Communication}/CommunicationApplicationClient.d.ts +0 -0
  300. package/sdk/application/{models/CommunicationValidator.d.ts → Communication/CommunicationApplicationValidator.d.ts} +0 -0
  301. package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.d.ts +0 -0
  302. package/sdk/application/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationApplicationValidator.d.ts} +0 -0
  303. package/sdk/application/{client → Content}/ContentApplicationClient.d.ts +0 -0
  304. package/sdk/application/{models/ContentValidator.d.ts → Content/ContentApplicationValidator.d.ts} +0 -0
  305. package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.d.ts +0 -0
  306. package/sdk/application/{models/FileStorageValidator.d.ts → FileStorage/FileStorageApplicationValidator.d.ts} +0 -0
  307. package/sdk/application/{client → Lead}/LeadApplicationClient.d.ts +0 -0
  308. package/sdk/application/{models/LeadValidator.d.ts → Lead/LeadApplicationValidator.d.ts} +0 -0
  309. package/sdk/application/{client → Logistic}/LogisticApplicationClient.d.ts +0 -0
  310. package/sdk/application/{models/LogisticValidator.d.ts → Logistic/LogisticApplicationValidator.d.ts} +0 -0
  311. package/sdk/application/{client → Order}/OrderApplicationClient.d.ts +0 -0
  312. package/sdk/application/{models/OrderValidator.d.ts → Order/OrderApplicationValidator.d.ts} +0 -0
  313. package/sdk/application/{client → Payment}/PaymentApplicationClient.d.ts +0 -0
  314. package/sdk/application/{models/PaymentValidator.d.ts → Payment/PaymentApplicationValidator.d.ts} +0 -0
  315. package/sdk/application/{models/PosCartValidator.d.ts → PosCart/PosCartApplicationValidator.d.ts} +0 -0
  316. package/sdk/application/{client → Rewards}/RewardsApplicationClient.d.ts +0 -0
  317. package/sdk/application/{models/RewardsValidator.d.ts → Rewards/RewardsApplicationValidator.d.ts} +0 -0
  318. package/sdk/application/{client → Share}/ShareApplicationClient.d.ts +0 -0
  319. package/sdk/application/{models/ShareValidator.d.ts → Share/ShareApplicationValidator.d.ts} +0 -0
  320. package/sdk/application/{client → Theme}/ThemeApplicationClient.d.ts +0 -0
  321. package/sdk/application/{models/ThemeValidator.d.ts → Theme/ThemeApplicationValidator.d.ts} +0 -0
  322. package/sdk/application/{client → User}/UserApplicationClient.d.ts +0 -0
  323. package/sdk/application/{models/UserValidator.d.ts → User/UserApplicationValidator.d.ts} +0 -0
  324. package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.d.ts +0 -0
  325. package/sdk/platform/{models/AnalyticsValidator.d.ts → Analytics/AnalyticsPlatformValidator.d.ts} +0 -0
  326. package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.d.ts +0 -0
  327. package/sdk/platform/{models/AuditTrailValidator.d.ts → AuditTrail/AuditTrailPlatformValidator.d.ts} +0 -0
  328. package/sdk/platform/{client → Billing}/BillingPlatformClient.d.ts +0 -0
  329. package/sdk/platform/{models/BillingValidator.d.ts → Billing/BillingPlatformValidator.d.ts} +0 -0
  330. package/sdk/platform/{client → Catalog}/CatalogPlatformClient.d.ts +149 -149
  331. package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +21 -21
  332. /package/sdk/platform/{client → Common}/CommonPlatformClient.d.ts +0 -0
  333. /package/sdk/platform/{models/CommonValidator.d.ts → Common/CommonPlatformValidator.d.ts} +0 -0
  334. /package/sdk/platform/{client → Communication}/CommunicationPlatformClient.d.ts +0 -0
  335. /package/sdk/platform/{models/CommunicationValidator.d.ts → Communication/CommunicationPlatformValidator.d.ts} +0 -0
  336. /package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.d.ts +0 -0
  337. /package/sdk/platform/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPlatformValidator.d.ts} +0 -0
  338. /package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.d.ts +0 -0
  339. /package/sdk/platform/{models/FileStorageValidator.d.ts → FileStorage/FileStoragePlatformValidator.d.ts} +0 -0
  340. /package/sdk/platform/{client → Inventory}/InventoryPlatformClient.d.ts +0 -0
  341. /package/sdk/platform/{models/InventoryValidator.d.ts → Inventory/InventoryPlatformValidator.d.ts} +0 -0
  342. /package/sdk/platform/{client → Lead}/LeadPlatformClient.d.ts +0 -0
  343. /package/sdk/platform/{models/LeadValidator.d.ts → Lead/LeadPlatformValidator.d.ts} +0 -0
  344. /package/sdk/platform/{client → Payment}/PaymentPlatformClient.d.ts +0 -0
  345. /package/sdk/platform/{models/PaymentValidator.d.ts → Payment/PaymentPlatformValidator.d.ts} +0 -0
  346. /package/sdk/platform/{client → Webhook}/WebhookPlatformClient.d.ts +0 -0
  347. /package/sdk/platform/{models/WebhookValidator.d.ts → Webhook/WebhookPlatformValidator.d.ts} +0 -0
  348. /package/sdk/public/{client → Configuration}/ConfigurationPublicClient.d.ts +0 -0
  349. /package/sdk/public/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPublicValidator.d.ts} +0 -0
  350. /package/sdk/public/{client → Inventory}/InventoryPublicClient.d.ts +0 -0
  351. /package/sdk/public/{models/InventoryValidator.d.ts → Inventory/InventoryPublicValidator.d.ts} +0 -0
  352. /package/sdk/public/{client → Webhook}/WebhookPublicClient.d.ts +0 -0
  353. /package/sdk/public/{models/WebhookValidator.d.ts → Webhook/WebhookPublicValidator.d.ts} +0 -0
@@ -0,0 +1,1322 @@
1
+ const Paginator = require("../../common/Paginator");
2
+ const PlatformAPIClient = require("../PlatformAPIClient");
3
+ const { FDKClientValidationError } = require("../../common/FDKError");
4
+ const ConfigurationValidator = require("./ConfigurationPlatformApplicationValidator");
5
+
6
+ class Configuration {
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.platformType - Current platform name
15
+ * @summary: Get latest build config
16
+ * @description: Get latest build config
17
+ */
18
+ getBuildConfig({ platformType } = {}) {
19
+ const { error } = ConfigurationValidator.getBuildConfig().validate(
20
+ {
21
+ platformType,
22
+ },
23
+ { abortEarly: false, allowUnknown: true }
24
+ );
25
+ if (error) {
26
+ return Promise.reject(new FDKClientValidationError(error));
27
+ }
28
+
29
+ // Showing warrnings if extra unknown parameters are found
30
+ const {
31
+ error: warrning,
32
+ } = ConfigurationValidator.getBuildConfig().validate(
33
+ {
34
+ platformType,
35
+ },
36
+ { abortEarly: false, allowUnknown: false }
37
+ );
38
+ if (warrning) {
39
+ console.log("Parameter Validation warrnings for getBuildConfig");
40
+ console.log(warrning);
41
+ }
42
+
43
+ const query_params = {};
44
+
45
+ return PlatformAPIClient.execute(
46
+ this.config,
47
+ "get",
48
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
49
+ query_params,
50
+ undefined
51
+ );
52
+ }
53
+
54
+ /**
55
+ * @param {Object} arg - Arg object.
56
+ * @param {string} arg.platformType - Current platform name
57
+ * @param {MobileAppConfigRequest} arg.body
58
+ * @summary: Update build config for next build
59
+ * @description: Update build config for next build
60
+ */
61
+ updateBuildConfig({ platformType, body } = {}) {
62
+ const { error } = ConfigurationValidator.updateBuildConfig().validate(
63
+ {
64
+ platformType,
65
+ body,
66
+ },
67
+ { abortEarly: false, allowUnknown: true }
68
+ );
69
+ if (error) {
70
+ return Promise.reject(new FDKClientValidationError(error));
71
+ }
72
+
73
+ // Showing warrnings if extra unknown parameters are found
74
+ const {
75
+ error: warrning,
76
+ } = ConfigurationValidator.updateBuildConfig().validate(
77
+ {
78
+ platformType,
79
+ body,
80
+ },
81
+ { abortEarly: false, allowUnknown: false }
82
+ );
83
+ if (warrning) {
84
+ console.log("Parameter Validation warrnings for updateBuildConfig");
85
+ console.log(warrning);
86
+ }
87
+
88
+ const query_params = {};
89
+
90
+ return PlatformAPIClient.execute(
91
+ this.config,
92
+ "put",
93
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
94
+ query_params,
95
+ body
96
+ );
97
+ }
98
+
99
+ /**
100
+ * @param {Object} arg - Arg object.
101
+ * @param {string} arg.platformType - Current platform name
102
+ * @summary: Get previous build versions
103
+ * @description: Get previous build versions
104
+ */
105
+ getPreviousVersions({ platformType } = {}) {
106
+ const { error } = ConfigurationValidator.getPreviousVersions().validate(
107
+ {
108
+ platformType,
109
+ },
110
+ { abortEarly: false, allowUnknown: true }
111
+ );
112
+ if (error) {
113
+ return Promise.reject(new FDKClientValidationError(error));
114
+ }
115
+
116
+ // Showing warrnings if extra unknown parameters are found
117
+ const {
118
+ error: warrning,
119
+ } = ConfigurationValidator.getPreviousVersions().validate(
120
+ {
121
+ platformType,
122
+ },
123
+ { abortEarly: false, allowUnknown: false }
124
+ );
125
+ if (warrning) {
126
+ console.log("Parameter Validation warrnings for getPreviousVersions");
127
+ console.log(warrning);
128
+ }
129
+
130
+ const query_params = {};
131
+
132
+ return PlatformAPIClient.execute(
133
+ this.config,
134
+ "get",
135
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/versions`,
136
+ query_params,
137
+ undefined
138
+ );
139
+ }
140
+
141
+ /**
142
+ * @param {Object} arg - Arg object.
143
+ * @summary: Get features of application
144
+ * @description: Get features of application
145
+ */
146
+ getAppFeatures({} = {}) {
147
+ const { error } = ConfigurationValidator.getAppFeatures().validate(
148
+ {},
149
+ { abortEarly: false, allowUnknown: true }
150
+ );
151
+ if (error) {
152
+ return Promise.reject(new FDKClientValidationError(error));
153
+ }
154
+
155
+ // Showing warrnings if extra unknown parameters are found
156
+ const {
157
+ error: warrning,
158
+ } = ConfigurationValidator.getAppFeatures().validate(
159
+ {},
160
+ { abortEarly: false, allowUnknown: false }
161
+ );
162
+ if (warrning) {
163
+ console.log("Parameter Validation warrnings for getAppFeatures");
164
+ console.log(warrning);
165
+ }
166
+
167
+ const query_params = {};
168
+
169
+ return PlatformAPIClient.execute(
170
+ this.config,
171
+ "get",
172
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
173
+ query_params,
174
+ undefined
175
+ );
176
+ }
177
+
178
+ /**
179
+ * @param {Object} arg - Arg object.
180
+ * @param {AppFeatureRequest} arg.body
181
+ * @summary: Update features of application
182
+ * @description: Update features of application
183
+ */
184
+ updateAppFeatures({ body } = {}) {
185
+ const { error } = ConfigurationValidator.updateAppFeatures().validate(
186
+ {
187
+ body,
188
+ },
189
+ { abortEarly: false, allowUnknown: true }
190
+ );
191
+ if (error) {
192
+ return Promise.reject(new FDKClientValidationError(error));
193
+ }
194
+
195
+ // Showing warrnings if extra unknown parameters are found
196
+ const {
197
+ error: warrning,
198
+ } = ConfigurationValidator.updateAppFeatures().validate(
199
+ {
200
+ body,
201
+ },
202
+ { abortEarly: false, allowUnknown: false }
203
+ );
204
+ if (warrning) {
205
+ console.log("Parameter Validation warrnings for updateAppFeatures");
206
+ console.log(warrning);
207
+ }
208
+
209
+ const query_params = {};
210
+
211
+ return PlatformAPIClient.execute(
212
+ this.config,
213
+ "post",
214
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
215
+ query_params,
216
+ body
217
+ );
218
+ }
219
+
220
+ /**
221
+ * @param {Object} arg - Arg object.
222
+ * @summary: Get basic application details
223
+ * @description: Get basic application details like name
224
+ */
225
+ getAppBasicDetails({} = {}) {
226
+ const { error } = ConfigurationValidator.getAppBasicDetails().validate(
227
+ {},
228
+ { abortEarly: false, allowUnknown: true }
229
+ );
230
+ if (error) {
231
+ return Promise.reject(new FDKClientValidationError(error));
232
+ }
233
+
234
+ // Showing warrnings if extra unknown parameters are found
235
+ const {
236
+ error: warrning,
237
+ } = ConfigurationValidator.getAppBasicDetails().validate(
238
+ {},
239
+ { abortEarly: false, allowUnknown: false }
240
+ );
241
+ if (warrning) {
242
+ console.log("Parameter Validation warrnings for getAppBasicDetails");
243
+ console.log(warrning);
244
+ }
245
+
246
+ const query_params = {};
247
+
248
+ return PlatformAPIClient.execute(
249
+ this.config,
250
+ "get",
251
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
252
+ query_params,
253
+ undefined
254
+ );
255
+ }
256
+
257
+ /**
258
+ * @param {Object} arg - Arg object.
259
+ * @param {ApplicationDetail} arg.body
260
+ * @summary: Add or update application's basic details
261
+ * @description: Add or update application's basic details
262
+ */
263
+ updateAppBasicDetails({ body } = {}) {
264
+ const { error } = ConfigurationValidator.updateAppBasicDetails().validate(
265
+ {
266
+ body,
267
+ },
268
+ { abortEarly: false, allowUnknown: true }
269
+ );
270
+ if (error) {
271
+ return Promise.reject(new FDKClientValidationError(error));
272
+ }
273
+
274
+ // Showing warrnings if extra unknown parameters are found
275
+ const {
276
+ error: warrning,
277
+ } = ConfigurationValidator.updateAppBasicDetails().validate(
278
+ {
279
+ body,
280
+ },
281
+ { abortEarly: false, allowUnknown: false }
282
+ );
283
+ if (warrning) {
284
+ console.log("Parameter Validation warrnings for updateAppBasicDetails");
285
+ console.log(warrning);
286
+ }
287
+
288
+ const query_params = {};
289
+
290
+ return PlatformAPIClient.execute(
291
+ this.config,
292
+ "put",
293
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
294
+ query_params,
295
+ body
296
+ );
297
+ }
298
+
299
+ /**
300
+ * @param {Object} arg - Arg object.
301
+ * @summary: Get application information
302
+ * @description: Get Application Current Information. This includes information about social links, address and contact information of company/seller/brand of the application.
303
+ */
304
+ getAppContactInfo({} = {}) {
305
+ const { error } = ConfigurationValidator.getAppContactInfo().validate(
306
+ {},
307
+ { abortEarly: false, allowUnknown: true }
308
+ );
309
+ if (error) {
310
+ return Promise.reject(new FDKClientValidationError(error));
311
+ }
312
+
313
+ // Showing warrnings if extra unknown parameters are found
314
+ const {
315
+ error: warrning,
316
+ } = ConfigurationValidator.getAppContactInfo().validate(
317
+ {},
318
+ { abortEarly: false, allowUnknown: false }
319
+ );
320
+ if (warrning) {
321
+ console.log("Parameter Validation warrnings for getAppContactInfo");
322
+ console.log(warrning);
323
+ }
324
+
325
+ const query_params = {};
326
+
327
+ return PlatformAPIClient.execute(
328
+ this.config,
329
+ "get",
330
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
331
+ query_params,
332
+ undefined
333
+ );
334
+ }
335
+
336
+ /**
337
+ * @param {Object} arg - Arg object.
338
+ * @param {ApplicationInformation} arg.body
339
+ * @summary: Get application information
340
+ * @description: Save Application Current Information. This includes information about social links, address and contact information of an application.
341
+ */
342
+ updateAppContactInfo({ body } = {}) {
343
+ const { error } = ConfigurationValidator.updateAppContactInfo().validate(
344
+ {
345
+ body,
346
+ },
347
+ { abortEarly: false, allowUnknown: true }
348
+ );
349
+ if (error) {
350
+ return Promise.reject(new FDKClientValidationError(error));
351
+ }
352
+
353
+ // Showing warrnings if extra unknown parameters are found
354
+ const {
355
+ error: warrning,
356
+ } = ConfigurationValidator.updateAppContactInfo().validate(
357
+ {
358
+ body,
359
+ },
360
+ { abortEarly: false, allowUnknown: false }
361
+ );
362
+ if (warrning) {
363
+ console.log("Parameter Validation warrnings for updateAppContactInfo");
364
+ console.log(warrning);
365
+ }
366
+
367
+ const query_params = {};
368
+
369
+ return PlatformAPIClient.execute(
370
+ this.config,
371
+ "put",
372
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
373
+ query_params,
374
+ body
375
+ );
376
+ }
377
+
378
+ /**
379
+ * @param {Object} arg - Arg object.
380
+ * @summary: Get social tokens
381
+ * @description: Get social tokens.
382
+ */
383
+ getAppApiTokens({} = {}) {
384
+ const { error } = ConfigurationValidator.getAppApiTokens().validate(
385
+ {},
386
+ { abortEarly: false, allowUnknown: true }
387
+ );
388
+ if (error) {
389
+ return Promise.reject(new FDKClientValidationError(error));
390
+ }
391
+
392
+ // Showing warrnings if extra unknown parameters are found
393
+ const {
394
+ error: warrning,
395
+ } = ConfigurationValidator.getAppApiTokens().validate(
396
+ {},
397
+ { abortEarly: false, allowUnknown: false }
398
+ );
399
+ if (warrning) {
400
+ console.log("Parameter Validation warrnings for getAppApiTokens");
401
+ console.log(warrning);
402
+ }
403
+
404
+ const query_params = {};
405
+
406
+ return PlatformAPIClient.execute(
407
+ this.config,
408
+ "get",
409
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
410
+ query_params,
411
+ undefined
412
+ );
413
+ }
414
+
415
+ /**
416
+ * @param {Object} arg - Arg object.
417
+ * @param {TokenResponse} arg.body
418
+ * @summary: Add social tokens
419
+ * @description: Add social tokens.
420
+ */
421
+ updateAppApiTokens({ body } = {}) {
422
+ const { error } = ConfigurationValidator.updateAppApiTokens().validate(
423
+ {
424
+ body,
425
+ },
426
+ { abortEarly: false, allowUnknown: true }
427
+ );
428
+ if (error) {
429
+ return Promise.reject(new FDKClientValidationError(error));
430
+ }
431
+
432
+ // Showing warrnings if extra unknown parameters are found
433
+ const {
434
+ error: warrning,
435
+ } = ConfigurationValidator.updateAppApiTokens().validate(
436
+ {
437
+ body,
438
+ },
439
+ { abortEarly: false, allowUnknown: false }
440
+ );
441
+ if (warrning) {
442
+ console.log("Parameter Validation warrnings for updateAppApiTokens");
443
+ console.log(warrning);
444
+ }
445
+
446
+ const query_params = {};
447
+
448
+ return PlatformAPIClient.execute(
449
+ this.config,
450
+ "post",
451
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
452
+ query_params,
453
+ body
454
+ );
455
+ }
456
+
457
+ /**
458
+ * @param {Object} arg - Arg object.
459
+ * @param {number} [arg.uid] - Uid of companies to be fetched
460
+ * @param {number} [arg.pageNo] - Current page no
461
+ * @param {number} [arg.pageSize] - Current request items count
462
+ * @summary: Application inventory enabled companies
463
+ * @description: Application inventory enabled companies.
464
+ */
465
+ getAppCompanies({ uid, pageNo, pageSize } = {}) {
466
+ const { error } = ConfigurationValidator.getAppCompanies().validate(
467
+ {
468
+ uid,
469
+ pageNo,
470
+ pageSize,
471
+ },
472
+ { abortEarly: false, allowUnknown: true }
473
+ );
474
+ if (error) {
475
+ return Promise.reject(new FDKClientValidationError(error));
476
+ }
477
+
478
+ // Showing warrnings if extra unknown parameters are found
479
+ const {
480
+ error: warrning,
481
+ } = ConfigurationValidator.getAppCompanies().validate(
482
+ {
483
+ uid,
484
+ pageNo,
485
+ pageSize,
486
+ },
487
+ { abortEarly: false, allowUnknown: false }
488
+ );
489
+ if (warrning) {
490
+ console.log("Parameter Validation warrnings for getAppCompanies");
491
+ console.log(warrning);
492
+ }
493
+
494
+ const query_params = {};
495
+ query_params["uid"] = uid;
496
+ query_params["page_no"] = pageNo;
497
+ query_params["page_size"] = pageSize;
498
+
499
+ return PlatformAPIClient.execute(
500
+ this.config,
501
+ "get",
502
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/companies`,
503
+ query_params,
504
+ undefined
505
+ );
506
+ }
507
+
508
+ /**
509
+ * @param {Object} arg - Arg object.
510
+ * @param {string} arg.companyId - Current company id
511
+ * @param {string} arg.applicationId - Current application id
512
+ * @param {number} [arg.uid] - Uid of companies to be fetched
513
+ * @param {number} [arg.pageSize] - Current request items count
514
+ * @summary: Application inventory enabled companies
515
+ * @description: Application inventory enabled companies.
516
+ */
517
+ getAppCompaniesPaginator({ companyId, applicationId, uid, pageSize } = {}) {
518
+ const paginator = new Paginator();
519
+ const callback = async () => {
520
+ const pageId = paginator.nextId;
521
+ const pageNo = paginator.pageNo;
522
+ const pageType = "number";
523
+ const data = await this.getAppCompanies({
524
+ companyId: companyId,
525
+ applicationId: applicationId,
526
+ uid: uid,
527
+ pageNo: pageNo,
528
+ pageSize: pageSize,
529
+ });
530
+ paginator.setPaginator({
531
+ hasNext: data.page.has_next ? true : false,
532
+ nextId: data.page.next_id,
533
+ });
534
+ return data;
535
+ };
536
+ paginator.setCallback(callback.bind(this));
537
+ return paginator;
538
+ }
539
+
540
+ /**
541
+ * @param {Object} arg - Arg object.
542
+ * @param {number} [arg.pageNo] - Current page no
543
+ * @param {number} [arg.pageSize] - Current request items count
544
+ * @summary: Application inventory enabled stores
545
+ * @description: Application inventory enabled stores.
546
+ */
547
+ getAppStores({ pageNo, pageSize } = {}) {
548
+ const { error } = ConfigurationValidator.getAppStores().validate(
549
+ {
550
+ pageNo,
551
+ pageSize,
552
+ },
553
+ { abortEarly: false, allowUnknown: true }
554
+ );
555
+ if (error) {
556
+ return Promise.reject(new FDKClientValidationError(error));
557
+ }
558
+
559
+ // Showing warrnings if extra unknown parameters are found
560
+ const { error: warrning } = ConfigurationValidator.getAppStores().validate(
561
+ {
562
+ pageNo,
563
+ pageSize,
564
+ },
565
+ { abortEarly: false, allowUnknown: false }
566
+ );
567
+ if (warrning) {
568
+ console.log("Parameter Validation warrnings for getAppStores");
569
+ console.log(warrning);
570
+ }
571
+
572
+ const query_params = {};
573
+ query_params["page_no"] = pageNo;
574
+ query_params["page_size"] = pageSize;
575
+
576
+ return PlatformAPIClient.execute(
577
+ this.config,
578
+ "get",
579
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/stores`,
580
+ query_params,
581
+ undefined
582
+ );
583
+ }
584
+
585
+ /**
586
+ * @param {Object} arg - Arg object.
587
+ * @param {string} arg.companyId - Current company id
588
+ * @param {string} arg.applicationId - Current application id
589
+ * @param {number} [arg.pageSize] - Current request items count
590
+ * @summary: Application inventory enabled stores
591
+ * @description: Application inventory enabled stores.
592
+ */
593
+ getAppStoresPaginator({ companyId, applicationId, pageSize } = {}) {
594
+ const paginator = new Paginator();
595
+ const callback = async () => {
596
+ const pageId = paginator.nextId;
597
+ const pageNo = paginator.pageNo;
598
+ const pageType = "number";
599
+ const data = await this.getAppStores({
600
+ companyId: companyId,
601
+ applicationId: applicationId,
602
+ pageNo: pageNo,
603
+ pageSize: pageSize,
604
+ });
605
+ paginator.setPaginator({
606
+ hasNext: data.page.has_next ? true : false,
607
+ nextId: data.page.next_id,
608
+ });
609
+ return data;
610
+ };
611
+ paginator.setCallback(callback.bind(this));
612
+ return paginator;
613
+ }
614
+
615
+ /**
616
+ * @param {Object} arg - Arg object.
617
+ * @summary: Get application configuration
618
+ * @description: Get application configuration for various features and data
619
+ */
620
+ getInventoryConfig({} = {}) {
621
+ const { error } = ConfigurationValidator.getInventoryConfig().validate(
622
+ {},
623
+ { abortEarly: false, allowUnknown: true }
624
+ );
625
+ if (error) {
626
+ return Promise.reject(new FDKClientValidationError(error));
627
+ }
628
+
629
+ // Showing warrnings if extra unknown parameters are found
630
+ const {
631
+ error: warrning,
632
+ } = ConfigurationValidator.getInventoryConfig().validate(
633
+ {},
634
+ { abortEarly: false, allowUnknown: false }
635
+ );
636
+ if (warrning) {
637
+ console.log("Parameter Validation warrnings for getInventoryConfig");
638
+ console.log(warrning);
639
+ }
640
+
641
+ const query_params = {};
642
+
643
+ return PlatformAPIClient.execute(
644
+ this.config,
645
+ "get",
646
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
647
+ query_params,
648
+ undefined
649
+ );
650
+ }
651
+
652
+ /**
653
+ * @param {Object} arg - Arg object.
654
+ * @param {ApplicationInventory} arg.body
655
+ * @summary: Update application configuration
656
+ * @description: Update application configuration for various features and data
657
+ */
658
+ updateInventoryConfig({ body } = {}) {
659
+ const { error } = ConfigurationValidator.updateInventoryConfig().validate(
660
+ {
661
+ body,
662
+ },
663
+ { abortEarly: false, allowUnknown: true }
664
+ );
665
+ if (error) {
666
+ return Promise.reject(new FDKClientValidationError(error));
667
+ }
668
+
669
+ // Showing warrnings if extra unknown parameters are found
670
+ const {
671
+ error: warrning,
672
+ } = ConfigurationValidator.updateInventoryConfig().validate(
673
+ {
674
+ body,
675
+ },
676
+ { abortEarly: false, allowUnknown: false }
677
+ );
678
+ if (warrning) {
679
+ console.log("Parameter Validation warrnings for updateInventoryConfig");
680
+ console.log(warrning);
681
+ }
682
+
683
+ const query_params = {};
684
+
685
+ return PlatformAPIClient.execute(
686
+ this.config,
687
+ "put",
688
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
689
+ query_params,
690
+ body
691
+ );
692
+ }
693
+
694
+ /**
695
+ * @param {Object} arg - Arg object.
696
+ * @param {AppInventoryPartialUpdate} arg.body
697
+ * @summary: Partially update application configuration
698
+ * @description: Partially update application configuration for various features and data
699
+ */
700
+ partiallyUpdateInventoryConfig({ body } = {}) {
701
+ const {
702
+ error,
703
+ } = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
704
+ {
705
+ body,
706
+ },
707
+ { abortEarly: false, allowUnknown: true }
708
+ );
709
+ if (error) {
710
+ return Promise.reject(new FDKClientValidationError(error));
711
+ }
712
+
713
+ // Showing warrnings if extra unknown parameters are found
714
+ const {
715
+ error: warrning,
716
+ } = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
717
+ {
718
+ body,
719
+ },
720
+ { abortEarly: false, allowUnknown: false }
721
+ );
722
+ if (warrning) {
723
+ console.log(
724
+ "Parameter Validation warrnings for partiallyUpdateInventoryConfig"
725
+ );
726
+ console.log(warrning);
727
+ }
728
+
729
+ const query_params = {};
730
+
731
+ return PlatformAPIClient.execute(
732
+ this.config,
733
+ "patch",
734
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
735
+ query_params,
736
+ body
737
+ );
738
+ }
739
+
740
+ /**
741
+ * @param {Object} arg - Arg object.
742
+ * @summary: Get application enabled currency list
743
+ * @description: Get application enabled currency list
744
+ */
745
+ getAppCurrencyConfig({} = {}) {
746
+ const { error } = ConfigurationValidator.getAppCurrencyConfig().validate(
747
+ {},
748
+ { abortEarly: false, allowUnknown: true }
749
+ );
750
+ if (error) {
751
+ return Promise.reject(new FDKClientValidationError(error));
752
+ }
753
+
754
+ // Showing warrnings if extra unknown parameters are found
755
+ const {
756
+ error: warrning,
757
+ } = ConfigurationValidator.getAppCurrencyConfig().validate(
758
+ {},
759
+ { abortEarly: false, allowUnknown: false }
760
+ );
761
+ if (warrning) {
762
+ console.log("Parameter Validation warrnings for getAppCurrencyConfig");
763
+ console.log(warrning);
764
+ }
765
+
766
+ const query_params = {};
767
+
768
+ return PlatformAPIClient.execute(
769
+ this.config,
770
+ "get",
771
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
772
+ query_params,
773
+ undefined
774
+ );
775
+ }
776
+
777
+ /**
778
+ * @param {Object} arg - Arg object.
779
+ * @param {AppSupportedCurrency} arg.body
780
+ * @summary: Add initial application supported currency
781
+ * @description: Add initial application supported currency for various features and data. Default INR will be enabled.
782
+ */
783
+ updateAppCurrencyConfig({ body } = {}) {
784
+ const { error } = ConfigurationValidator.updateAppCurrencyConfig().validate(
785
+ {
786
+ body,
787
+ },
788
+ { abortEarly: false, allowUnknown: true }
789
+ );
790
+ if (error) {
791
+ return Promise.reject(new FDKClientValidationError(error));
792
+ }
793
+
794
+ // Showing warrnings if extra unknown parameters are found
795
+ const {
796
+ error: warrning,
797
+ } = ConfigurationValidator.updateAppCurrencyConfig().validate(
798
+ {
799
+ body,
800
+ },
801
+ { abortEarly: false, allowUnknown: false }
802
+ );
803
+ if (warrning) {
804
+ console.log("Parameter Validation warrnings for updateAppCurrencyConfig");
805
+ console.log(warrning);
806
+ }
807
+
808
+ const query_params = {};
809
+
810
+ return PlatformAPIClient.execute(
811
+ this.config,
812
+ "post",
813
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
814
+ query_params,
815
+ body
816
+ );
817
+ }
818
+
819
+ /**
820
+ * @param {Object} arg - Arg object.
821
+ * @summary: Get currencies enabled in the application
822
+ * @description: Use this API to get a list of currencies allowed in the current application. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
823
+ */
824
+ getAppSupportedCurrency({} = {}) {
825
+ const { error } = ConfigurationValidator.getAppSupportedCurrency().validate(
826
+ {},
827
+ { abortEarly: false, allowUnknown: true }
828
+ );
829
+ if (error) {
830
+ return Promise.reject(new FDKClientValidationError(error));
831
+ }
832
+
833
+ // Showing warrnings if extra unknown parameters are found
834
+ const {
835
+ error: warrning,
836
+ } = ConfigurationValidator.getAppSupportedCurrency().validate(
837
+ {},
838
+ { abortEarly: false, allowUnknown: false }
839
+ );
840
+ if (warrning) {
841
+ console.log("Parameter Validation warrnings for getAppSupportedCurrency");
842
+ console.log(warrning);
843
+ }
844
+
845
+ const query_params = {};
846
+
847
+ return PlatformAPIClient.execute(
848
+ this.config,
849
+ "get",
850
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency/supported`,
851
+ query_params,
852
+ undefined
853
+ );
854
+ }
855
+
856
+ /**
857
+ * @param {Object} arg - Arg object.
858
+ * @param {number} [arg.pageNo] - Current page no
859
+ * @param {number} [arg.pageSize] - Current request items count
860
+ * @param {FilterOrderingStoreRequest} arg.body
861
+ * @summary: Get ordering store by filter
862
+ * @description: Get ordering store by filter
863
+ */
864
+ getOrderingStoresByFilter({ body, pageNo, pageSize } = {}) {
865
+ const {
866
+ error,
867
+ } = ConfigurationValidator.getOrderingStoresByFilter().validate(
868
+ {
869
+ body,
870
+ pageNo,
871
+ pageSize,
872
+ },
873
+ { abortEarly: false, allowUnknown: true }
874
+ );
875
+ if (error) {
876
+ return Promise.reject(new FDKClientValidationError(error));
877
+ }
878
+
879
+ // Showing warrnings if extra unknown parameters are found
880
+ const {
881
+ error: warrning,
882
+ } = ConfigurationValidator.getOrderingStoresByFilter().validate(
883
+ {
884
+ body,
885
+ pageNo,
886
+ pageSize,
887
+ },
888
+ { abortEarly: false, allowUnknown: false }
889
+ );
890
+ if (warrning) {
891
+ console.log(
892
+ "Parameter Validation warrnings for getOrderingStoresByFilter"
893
+ );
894
+ console.log(warrning);
895
+ }
896
+
897
+ const query_params = {};
898
+ query_params["page_no"] = pageNo;
899
+ query_params["page_size"] = pageSize;
900
+
901
+ return PlatformAPIClient.execute(
902
+ this.config,
903
+ "post",
904
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/stores/filter`,
905
+ query_params,
906
+ body
907
+ );
908
+ }
909
+
910
+ /**
911
+ * @param {Object} arg - Arg object.
912
+ * @param {string} arg.companyId - Current company id
913
+ * @param {string} arg.applicationId - Current application id
914
+ * @param {number} [arg.pageSize] - Current request items count
915
+ * @param {FilterOrderingStoreRequest} arg.body
916
+ * @summary: Get ordering store by filter
917
+ * @description: Get ordering store by filter
918
+ */
919
+ getOrderingStoresByFilterPaginator({
920
+ companyId,
921
+ applicationId,
922
+ pageSize,
923
+ body,
924
+ } = {}) {
925
+ const paginator = new Paginator();
926
+ const callback = async () => {
927
+ const pageId = paginator.nextId;
928
+ const pageNo = paginator.pageNo;
929
+ const pageType = "number";
930
+ const data = await this.getOrderingStoresByFilter({
931
+ companyId: companyId,
932
+ applicationId: applicationId,
933
+ body: body,
934
+ pageNo: pageNo,
935
+ pageSize: pageSize,
936
+ });
937
+ paginator.setPaginator({
938
+ hasNext: data.page.has_next ? true : false,
939
+ nextId: data.page.next_id,
940
+ });
941
+ return data;
942
+ };
943
+ paginator.setCallback(callback.bind(this));
944
+ return paginator;
945
+ }
946
+
947
+ /**
948
+ * @param {Object} arg - Arg object.
949
+ * @param {OrderingStoreConfig} arg.body
950
+ * @summary: Add/Update ordering store config
951
+ * @description: Add/Update ordering store config.
952
+ */
953
+ updateOrderingStoreConfig({ body } = {}) {
954
+ const {
955
+ error,
956
+ } = ConfigurationValidator.updateOrderingStoreConfig().validate(
957
+ {
958
+ body,
959
+ },
960
+ { abortEarly: false, allowUnknown: true }
961
+ );
962
+ if (error) {
963
+ return Promise.reject(new FDKClientValidationError(error));
964
+ }
965
+
966
+ // Showing warrnings if extra unknown parameters are found
967
+ const {
968
+ error: warrning,
969
+ } = ConfigurationValidator.updateOrderingStoreConfig().validate(
970
+ {
971
+ body,
972
+ },
973
+ { abortEarly: false, allowUnknown: false }
974
+ );
975
+ if (warrning) {
976
+ console.log(
977
+ "Parameter Validation warrnings for updateOrderingStoreConfig"
978
+ );
979
+ console.log(warrning);
980
+ }
981
+
982
+ const query_params = {};
983
+
984
+ return PlatformAPIClient.execute(
985
+ this.config,
986
+ "post",
987
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store`,
988
+ query_params,
989
+ body
990
+ );
991
+ }
992
+
993
+ /**
994
+ * @param {Object} arg - Arg object.
995
+ * @param {number} [arg.pageNo] - The page number to navigate through the
996
+ * given set of results. Default value is 1.
997
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
998
+ * page. Default value is 10.
999
+ * @param {string} [arg.q] - Store code or name of the ordering store.
1000
+ * @summary: Get deployment stores
1001
+ * @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
1002
+ */
1003
+ getStaffOrderingStores({ pageNo, pageSize, q } = {}) {
1004
+ const { error } = ConfigurationValidator.getStaffOrderingStores().validate(
1005
+ {
1006
+ pageNo,
1007
+ pageSize,
1008
+ q,
1009
+ },
1010
+ { abortEarly: false, allowUnknown: true }
1011
+ );
1012
+ if (error) {
1013
+ return Promise.reject(new FDKClientValidationError(error));
1014
+ }
1015
+
1016
+ // Showing warrnings if extra unknown parameters are found
1017
+ const {
1018
+ error: warrning,
1019
+ } = ConfigurationValidator.getStaffOrderingStores().validate(
1020
+ {
1021
+ pageNo,
1022
+ pageSize,
1023
+ q,
1024
+ },
1025
+ { abortEarly: false, allowUnknown: false }
1026
+ );
1027
+ if (warrning) {
1028
+ console.log("Parameter Validation warrnings for getStaffOrderingStores");
1029
+ console.log(warrning);
1030
+ }
1031
+
1032
+ const query_params = {};
1033
+ query_params["page_no"] = pageNo;
1034
+ query_params["page_size"] = pageSize;
1035
+ query_params["q"] = q;
1036
+
1037
+ return PlatformAPIClient.execute(
1038
+ this.config,
1039
+ "get",
1040
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/staff-stores`,
1041
+ query_params,
1042
+ undefined
1043
+ );
1044
+ }
1045
+
1046
+ /**
1047
+ * @param {Object} arg - Arg object.
1048
+ * @param {string} arg.companyId - Current company id
1049
+ * @param {string} arg.applicationId - Current application id
1050
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
1051
+ * page. Default value is 10.
1052
+ * @param {string} [arg.q] - Store code or name of the ordering store.
1053
+ * @summary: Get deployment stores
1054
+ * @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
1055
+ */
1056
+ getStaffOrderingStoresPaginator({
1057
+ companyId,
1058
+ applicationId,
1059
+ pageSize,
1060
+ q,
1061
+ } = {}) {
1062
+ const paginator = new Paginator();
1063
+ const callback = async () => {
1064
+ const pageId = paginator.nextId;
1065
+ const pageNo = paginator.pageNo;
1066
+ const pageType = "number";
1067
+ const data = await this.getStaffOrderingStores({
1068
+ companyId: companyId,
1069
+ applicationId: applicationId,
1070
+ pageNo: pageNo,
1071
+ pageSize: pageSize,
1072
+ q: q,
1073
+ });
1074
+ paginator.setPaginator({
1075
+ hasNext: data.page.has_next ? true : false,
1076
+ nextId: data.page.next_id,
1077
+ });
1078
+ return data;
1079
+ };
1080
+ paginator.setCallback(callback.bind(this));
1081
+ return paginator;
1082
+ }
1083
+
1084
+ /**
1085
+ * @param {Object} arg - Arg object.
1086
+ * @summary: Get attached domain list
1087
+ * @description: Get attached domain list.
1088
+ */
1089
+ getDomains({} = {}) {
1090
+ const { error } = ConfigurationValidator.getDomains().validate(
1091
+ {},
1092
+ { abortEarly: false, allowUnknown: true }
1093
+ );
1094
+ if (error) {
1095
+ return Promise.reject(new FDKClientValidationError(error));
1096
+ }
1097
+
1098
+ // Showing warrnings if extra unknown parameters are found
1099
+ const { error: warrning } = ConfigurationValidator.getDomains().validate(
1100
+ {},
1101
+ { abortEarly: false, allowUnknown: false }
1102
+ );
1103
+ if (warrning) {
1104
+ console.log("Parameter Validation warrnings for getDomains");
1105
+ console.log(warrning);
1106
+ }
1107
+
1108
+ const query_params = {};
1109
+
1110
+ return PlatformAPIClient.execute(
1111
+ this.config,
1112
+ "get",
1113
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
1114
+ query_params,
1115
+ undefined
1116
+ );
1117
+ }
1118
+
1119
+ /**
1120
+ * @param {Object} arg - Arg object.
1121
+ * @param {DomainAddRequest} arg.body
1122
+ * @summary: Add new domain to application
1123
+ * @description: Add new domain to application.
1124
+ */
1125
+ addDomain({ body } = {}) {
1126
+ const { error } = ConfigurationValidator.addDomain().validate(
1127
+ {
1128
+ body,
1129
+ },
1130
+ { abortEarly: false, allowUnknown: true }
1131
+ );
1132
+ if (error) {
1133
+ return Promise.reject(new FDKClientValidationError(error));
1134
+ }
1135
+
1136
+ // Showing warrnings if extra unknown parameters are found
1137
+ const { error: warrning } = ConfigurationValidator.addDomain().validate(
1138
+ {
1139
+ body,
1140
+ },
1141
+ { abortEarly: false, allowUnknown: false }
1142
+ );
1143
+ if (warrning) {
1144
+ console.log("Parameter Validation warrnings for addDomain");
1145
+ console.log(warrning);
1146
+ }
1147
+
1148
+ const query_params = {};
1149
+
1150
+ return PlatformAPIClient.execute(
1151
+ this.config,
1152
+ "post",
1153
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
1154
+ query_params,
1155
+ body
1156
+ );
1157
+ }
1158
+
1159
+ /**
1160
+ * @param {Object} arg - Arg object.
1161
+ * @param {string} arg.id - Domain _id
1162
+ * @summary: Remove attached domain
1163
+ * @description: Remove attached domain.
1164
+ */
1165
+ removeDomainById({ id } = {}) {
1166
+ const { error } = ConfigurationValidator.removeDomainById().validate(
1167
+ {
1168
+ id,
1169
+ },
1170
+ { abortEarly: false, allowUnknown: true }
1171
+ );
1172
+ if (error) {
1173
+ return Promise.reject(new FDKClientValidationError(error));
1174
+ }
1175
+
1176
+ // Showing warrnings if extra unknown parameters are found
1177
+ const {
1178
+ error: warrning,
1179
+ } = ConfigurationValidator.removeDomainById().validate(
1180
+ {
1181
+ id,
1182
+ },
1183
+ { abortEarly: false, allowUnknown: false }
1184
+ );
1185
+ if (warrning) {
1186
+ console.log("Parameter Validation warrnings for removeDomainById");
1187
+ console.log(warrning);
1188
+ }
1189
+
1190
+ const query_params = {};
1191
+
1192
+ return PlatformAPIClient.execute(
1193
+ this.config,
1194
+ "delete",
1195
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/${id}`,
1196
+ query_params,
1197
+ undefined
1198
+ );
1199
+ }
1200
+
1201
+ /**
1202
+ * @param {Object} arg - Arg object.
1203
+ * @param {UpdateDomainTypeRequest} arg.body
1204
+ * @summary: Change domain type
1205
+ * @description: Change a domain to Primary or Shortlink domain
1206
+ */
1207
+ changeDomainType({ body } = {}) {
1208
+ const { error } = ConfigurationValidator.changeDomainType().validate(
1209
+ {
1210
+ body,
1211
+ },
1212
+ { abortEarly: false, allowUnknown: true }
1213
+ );
1214
+ if (error) {
1215
+ return Promise.reject(new FDKClientValidationError(error));
1216
+ }
1217
+
1218
+ // Showing warrnings if extra unknown parameters are found
1219
+ const {
1220
+ error: warrning,
1221
+ } = ConfigurationValidator.changeDomainType().validate(
1222
+ {
1223
+ body,
1224
+ },
1225
+ { abortEarly: false, allowUnknown: false }
1226
+ );
1227
+ if (warrning) {
1228
+ console.log("Parameter Validation warrnings for changeDomainType");
1229
+ console.log(warrning);
1230
+ }
1231
+
1232
+ const query_params = {};
1233
+
1234
+ return PlatformAPIClient.execute(
1235
+ this.config,
1236
+ "post",
1237
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/set-domain`,
1238
+ query_params,
1239
+ body
1240
+ );
1241
+ }
1242
+
1243
+ /**
1244
+ * @param {Object} arg - Arg object.
1245
+ * @param {DomainStatusRequest} arg.body
1246
+ * @summary: Get domain connected status.
1247
+ * @description: Get domain connected status. Check if domain is live and mapped to appropriate IP to fynd servers.
1248
+ */
1249
+ getDomainStatus({ body } = {}) {
1250
+ const { error } = ConfigurationValidator.getDomainStatus().validate(
1251
+ {
1252
+ body,
1253
+ },
1254
+ { abortEarly: false, allowUnknown: true }
1255
+ );
1256
+ if (error) {
1257
+ return Promise.reject(new FDKClientValidationError(error));
1258
+ }
1259
+
1260
+ // Showing warrnings if extra unknown parameters are found
1261
+ const {
1262
+ error: warrning,
1263
+ } = ConfigurationValidator.getDomainStatus().validate(
1264
+ {
1265
+ body,
1266
+ },
1267
+ { abortEarly: false, allowUnknown: false }
1268
+ );
1269
+ if (warrning) {
1270
+ console.log("Parameter Validation warrnings for getDomainStatus");
1271
+ console.log(warrning);
1272
+ }
1273
+
1274
+ const query_params = {};
1275
+
1276
+ return PlatformAPIClient.execute(
1277
+ this.config,
1278
+ "post",
1279
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/domain-status`,
1280
+ query_params,
1281
+ body
1282
+ );
1283
+ }
1284
+
1285
+ /**
1286
+ * @param {Object} arg - Arg object.
1287
+ * @summary: Get application data from id
1288
+ * @description: Get application data from id
1289
+ */
1290
+ getApplicationById({} = {}) {
1291
+ const { error } = ConfigurationValidator.getApplicationById().validate(
1292
+ {},
1293
+ { abortEarly: false, allowUnknown: true }
1294
+ );
1295
+ if (error) {
1296
+ return Promise.reject(new FDKClientValidationError(error));
1297
+ }
1298
+
1299
+ // Showing warrnings if extra unknown parameters are found
1300
+ const {
1301
+ error: warrning,
1302
+ } = ConfigurationValidator.getApplicationById().validate(
1303
+ {},
1304
+ { abortEarly: false, allowUnknown: false }
1305
+ );
1306
+ if (warrning) {
1307
+ console.log("Parameter Validation warrnings for getApplicationById");
1308
+ console.log(warrning);
1309
+ }
1310
+
1311
+ const query_params = {};
1312
+
1313
+ return PlatformAPIClient.execute(
1314
+ this.config,
1315
+ "get",
1316
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
1317
+ query_params,
1318
+ undefined
1319
+ );
1320
+ }
1321
+ }
1322
+ module.exports = Configuration;