@gofynd/fdk-client-javascript 1.0.1 → 1.0.3

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 (318) hide show
  1. package/documentation/application/CART.md +5934 -4502
  2. package/documentation/application/CATALOG.md +6338 -7245
  3. package/documentation/application/COMMON.md +95 -222
  4. package/documentation/application/COMMUNICATION.md +106 -186
  5. package/documentation/application/CONFIGURATION.md +903 -1597
  6. package/documentation/application/CONTENT.md +562 -1270
  7. package/documentation/application/FILESTORAGE.md +84 -220
  8. package/documentation/application/LEAD.md +314 -660
  9. package/documentation/application/LOGISTIC.md +229 -305
  10. package/documentation/application/ORDER.md +642 -1137
  11. package/documentation/application/PAYMENT.md +2285 -3031
  12. package/documentation/application/POSCART.md +6079 -4642
  13. package/documentation/application/REWARDS.md +94 -248
  14. package/documentation/application/SHARE.md +152 -250
  15. package/documentation/application/THEME.md +952 -1235
  16. package/documentation/application/USER.md +1228 -1765
  17. package/documentation/platform/ANALYTICS.md +207 -349
  18. package/documentation/platform/AUDITTRAIL.md +121 -204
  19. package/documentation/platform/BILLING.md +865 -1376
  20. package/documentation/platform/CART.md +2814 -3662
  21. package/documentation/platform/CATALOG.md +15266 -17619
  22. package/documentation/platform/COMMON.md +95 -222
  23. package/documentation/platform/COMMUNICATION.md +1632 -2380
  24. package/documentation/platform/COMPANYPROFILE.md +572 -957
  25. package/documentation/platform/CONFIGURATION.md +3050 -4073
  26. package/documentation/platform/CONTENT.md +3509 -4121
  27. package/documentation/platform/DISCOUNT.md +140 -236
  28. package/documentation/platform/FILESTORAGE.md +187 -323
  29. package/documentation/platform/INVENTORY.md +268 -911
  30. package/documentation/platform/LEAD.md +2195 -2541
  31. package/documentation/platform/ORDER.md +3750 -5636
  32. package/documentation/platform/PARTNER.md +9 -36
  33. package/documentation/platform/PAYMENT.md +903 -1213
  34. package/documentation/platform/REWARDS.md +183 -347
  35. package/documentation/platform/SHARE.md +120 -213
  36. package/documentation/platform/THEME.md +12956 -13239
  37. package/documentation/platform/USER.md +975 -1120
  38. package/documentation/platform/WEBHOOK.md +78 -184
  39. package/documentation/public/CONFIGURATION.md +95 -222
  40. package/documentation/public/INVENTORY.md +100 -282
  41. package/documentation/public/WEBHOOK.md +27 -133
  42. package/package.json +1 -1
  43. package/sdk/application/ApplicationConfig.js +1 -1
  44. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  45. package/sdk/application/Cart/CartApplicationClient.js +1058 -547
  46. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  47. package/sdk/application/Cart/CartApplicationModel.js +489 -886
  48. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  49. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  50. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  51. package/sdk/application/Catalog/CatalogApplicationClient.js +1545 -949
  52. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  53. package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
  54. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  55. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  56. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  57. package/sdk/application/Common/CommonApplicationClient.js +76 -36
  58. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  59. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  60. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  61. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  62. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  63. package/sdk/application/Communication/CommunicationApplicationClient.js +92 -31
  64. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  65. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  66. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  67. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  68. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  69. package/sdk/application/Configuration/ConfigurationApplicationClient.js +638 -312
  70. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  71. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  72. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  73. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  74. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  75. package/sdk/application/Content/ContentApplicationClient.js +581 -213
  76. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
  77. package/sdk/application/Content/ContentApplicationModel.js +468 -875
  78. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  79. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  80. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  81. package/sdk/application/FileStorage/FileStorageApplicationClient.js +121 -59
  82. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  83. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  84. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  85. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  86. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  87. package/sdk/application/Lead/LeadApplicationClient.js +230 -96
  88. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  89. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  90. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  91. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  92. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
  93. package/sdk/application/Logistic/LogisticApplicationClient.js +196 -47
  94. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  95. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  96. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  97. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
  98. package/sdk/application/Order/OrderApplicationClient.d.ts +86 -86
  99. package/sdk/application/Order/OrderApplicationClient.js +448 -215
  100. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  101. package/sdk/application/Order/OrderApplicationModel.js +357 -661
  102. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  103. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  104. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  105. package/sdk/application/Payment/PaymentApplicationClient.js +1525 -750
  106. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  107. package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
  108. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  109. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  110. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  111. package/sdk/application/PosCart/PosCartApplicationClient.js +1137 -606
  112. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
  113. package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
  114. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  115. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  116. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  117. package/sdk/application/Rewards/RewardsApplicationClient.js +253 -113
  118. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  119. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  120. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  121. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  122. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  123. package/sdk/application/Share/ShareApplicationClient.js +221 -96
  124. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  125. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  126. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  127. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  128. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  129. package/sdk/application/Theme/ThemeApplicationClient.js +115 -37
  130. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  131. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  132. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  133. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  134. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  135. package/sdk/application/User/UserApplicationClient.js +1201 -543
  136. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  137. package/sdk/application/User/UserApplicationModel.js +440 -689
  138. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  139. package/sdk/application/User/UserApplicationValidator.js +89 -89
  140. package/sdk/common/AxiosHelper.js +1 -1
  141. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +55 -47
  142. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
  143. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  144. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
  145. package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
  146. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
  147. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  148. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  149. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
  150. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
  151. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  152. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  153. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  154. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
  155. package/sdk/platform/Billing/BillingPlatformClient.d.ts +68 -56
  156. package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
  157. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  158. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  159. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  160. package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
  161. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +176 -159
  162. package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
  163. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
  164. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
  165. package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
  166. package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
  167. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
  168. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
  169. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  170. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  171. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
  172. package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
  173. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
  174. package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
  175. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
  176. package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
  177. package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
  178. package/sdk/platform/Common/CommonPlatformClient.js +80 -37
  179. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  180. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  181. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  182. package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
  183. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +333 -293
  184. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
  185. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  186. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
  187. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  188. package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
  189. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  190. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  191. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
  192. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
  193. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
  194. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
  195. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  196. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
  197. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
  198. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
  199. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  200. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
  201. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
  202. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
  203. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  204. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  205. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  206. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
  207. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +542 -461
  208. package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
  209. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
  210. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
  211. package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
  212. package/sdk/platform/Content/ContentPlatformModel.js +486 -867
  213. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
  214. package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
  215. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  216. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  217. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  218. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
  219. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +26 -22
  220. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
  221. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  222. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
  223. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
  224. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
  225. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  226. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  227. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  228. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
  229. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +76 -63
  230. package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
  231. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  232. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  233. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  234. package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
  235. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +84 -71
  236. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
  237. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  238. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
  239. package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
  240. package/sdk/platform/Lead/LeadPlatformClient.js +434 -212
  241. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  242. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  243. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  244. package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
  245. package/sdk/platform/OAuthClient.js +8 -8
  246. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
  247. package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
  248. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  249. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
  250. package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
  251. package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
  252. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
  253. package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
  254. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  255. package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
  256. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
  257. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
  258. package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
  259. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
  260. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
  261. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  262. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
  263. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
  264. package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
  265. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  266. package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
  267. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  268. package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
  269. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
  270. package/sdk/platform/PlatformApplicationClient.js +1584 -13691
  271. package/sdk/platform/PlatformClient.d.ts +7918 -7666
  272. package/sdk/platform/PlatformClient.js +8701 -9926
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  279. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -12
  280. package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
  281. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  282. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
  283. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  284. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  285. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +148 -124
  286. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
  287. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  288. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
  289. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  290. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  291. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +146 -67
  292. package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
  293. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  294. package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
  295. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  296. package/sdk/platform/User/UserPlatformModel.js +440 -689
  297. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +35 -29
  298. package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
  299. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  300. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  301. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  302. package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
  303. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  304. package/sdk/public/Configuration/ConfigurationPublicClient.js +81 -38
  305. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  306. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  307. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  308. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  309. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  310. package/sdk/public/Inventory/InventoryPublicClient.js +228 -105
  311. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  312. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  313. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  314. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  315. package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
  316. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  317. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  318. package/tests/application/catalog.spec.js +7 -0
@@ -2,6 +2,8 @@ const Paginator = require("../../common/Paginator");
2
2
  const PlatformAPIClient = require("../PlatformAPIClient");
3
3
  const { FDKClientValidationError } = require("../../common/FDKError");
4
4
  const ConfigurationValidator = require("./ConfigurationPlatformApplicationValidator");
5
+ const ConfigurationModel = require("./ConfigurationPlatformModel");
6
+ const { Logger } = require("./../../common/Logger");
5
7
 
6
8
  class Configuration {
7
9
  constructor(config, applicationId) {
@@ -11,14 +13,15 @@ class Configuration {
11
13
 
12
14
  /**
13
15
  * @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
16
+ * @param {DomainAddRequest} arg.body
17
+ * @returns {Promise<Domain>} - Success response
18
+ * @summary: Add new domain to application
19
+ * @description: Add new domain to application.
17
20
  */
18
- getBuildConfig({ platformType } = {}) {
19
- const { error } = ConfigurationValidator.getBuildConfig().validate(
21
+ async addDomain({ body } = {}) {
22
+ const { error } = ConfigurationValidator.addDomain().validate(
20
23
  {
21
- platformType,
24
+ body,
22
25
  },
23
26
  { abortEarly: false, allowUnknown: true }
24
27
  );
@@ -27,41 +30,56 @@ class Configuration {
27
30
  }
28
31
 
29
32
  // Showing warrnings if extra unknown parameters are found
30
- const {
31
- error: warrning,
32
- } = ConfigurationValidator.getBuildConfig().validate(
33
+ const { error: warrning } = ConfigurationValidator.addDomain().validate(
33
34
  {
34
- platformType,
35
+ body,
35
36
  },
36
37
  { abortEarly: false, allowUnknown: false }
37
38
  );
38
39
  if (warrning) {
39
- console.log("Parameter Validation warrnings for getBuildConfig");
40
- console.log(warrning);
40
+ Logger({
41
+ level: "WARN",
42
+ message: "Parameter Validation warrnings for addDomain",
43
+ });
44
+ Logger({ level: "WARN", message: warrning });
41
45
  }
42
46
 
43
47
  const query_params = {};
44
48
 
45
- return PlatformAPIClient.execute(
49
+ const response = await PlatformAPIClient.execute(
46
50
  this.config,
47
- "get",
48
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
51
+ "post",
52
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
49
53
  query_params,
50
- undefined
54
+ body
55
+ );
56
+
57
+ const { error: res_error } = ConfigurationModel.Domain().validate(
58
+ response,
59
+ { abortEarly: false, allowUnknown: false }
51
60
  );
61
+
62
+ if (res_error) {
63
+ Logger({
64
+ level: "WARN",
65
+ message: "Response Validation Warnnings for addDomain",
66
+ });
67
+ Logger({ level: "WARN", message: res_error });
68
+ }
69
+
70
+ return response;
52
71
  }
53
72
 
54
73
  /**
55
74
  * @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
75
+ * @param {UpdateDomainTypeRequest} arg.body
76
+ * @returns {Promise<DomainsResponse>} - Success response
77
+ * @summary: Change domain type
78
+ * @description: Change a domain to Primary or Shortlink domain
60
79
  */
61
- updateBuildConfig({ platformType, body } = {}) {
62
- const { error } = ConfigurationValidator.updateBuildConfig().validate(
80
+ async changeDomainType({ body } = {}) {
81
+ const { error } = ConfigurationValidator.changeDomainType().validate(
63
82
  {
64
- platformType,
65
83
  body,
66
84
  },
67
85
  { abortEarly: false, allowUnknown: true }
@@ -73,40 +91,57 @@ class Configuration {
73
91
  // Showing warrnings if extra unknown parameters are found
74
92
  const {
75
93
  error: warrning,
76
- } = ConfigurationValidator.updateBuildConfig().validate(
94
+ } = ConfigurationValidator.changeDomainType().validate(
77
95
  {
78
- platformType,
79
96
  body,
80
97
  },
81
98
  { abortEarly: false, allowUnknown: false }
82
99
  );
83
100
  if (warrning) {
84
- console.log("Parameter Validation warrnings for updateBuildConfig");
85
- console.log(warrning);
101
+ Logger({
102
+ level: "WARN",
103
+ message: "Parameter Validation warrnings for changeDomainType",
104
+ });
105
+ Logger({ level: "WARN", message: warrning });
86
106
  }
87
107
 
88
108
  const query_params = {};
89
109
 
90
- return PlatformAPIClient.execute(
110
+ const response = await PlatformAPIClient.execute(
91
111
  this.config,
92
- "put",
93
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
112
+ "post",
113
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/set-domain`,
94
114
  query_params,
95
115
  body
96
116
  );
117
+
118
+ const {
119
+ error: res_error,
120
+ } = ConfigurationModel.DomainsResponse().validate(response, {
121
+ abortEarly: false,
122
+ allowUnknown: false,
123
+ });
124
+
125
+ if (res_error) {
126
+ Logger({
127
+ level: "WARN",
128
+ message: "Response Validation Warnnings for changeDomainType",
129
+ });
130
+ Logger({ level: "WARN", message: res_error });
131
+ }
132
+
133
+ return response;
97
134
  }
98
135
 
99
136
  /**
100
137
  * @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
138
+ * @returns {Promise<TokenResponse>} - Success response
139
+ * @summary: Get social tokens
140
+ * @description: Get social tokens.
104
141
  */
105
- getPreviousVersions({ platformType } = {}) {
106
- const { error } = ConfigurationValidator.getPreviousVersions().validate(
107
- {
108
- platformType,
109
- },
142
+ async getAppApiTokens({} = {}) {
143
+ const { error } = ConfigurationValidator.getAppApiTokens().validate(
144
+ {},
110
145
  { abortEarly: false, allowUnknown: true }
111
146
  );
112
147
  if (error) {
@@ -116,35 +151,54 @@ class Configuration {
116
151
  // Showing warrnings if extra unknown parameters are found
117
152
  const {
118
153
  error: warrning,
119
- } = ConfigurationValidator.getPreviousVersions().validate(
120
- {
121
- platformType,
122
- },
154
+ } = ConfigurationValidator.getAppApiTokens().validate(
155
+ {},
123
156
  { abortEarly: false, allowUnknown: false }
124
157
  );
125
158
  if (warrning) {
126
- console.log("Parameter Validation warrnings for getPreviousVersions");
127
- console.log(warrning);
159
+ Logger({
160
+ level: "WARN",
161
+ message: "Parameter Validation warrnings for getAppApiTokens",
162
+ });
163
+ Logger({ level: "WARN", message: warrning });
128
164
  }
129
165
 
130
166
  const query_params = {};
131
167
 
132
- return PlatformAPIClient.execute(
168
+ const response = await PlatformAPIClient.execute(
133
169
  this.config,
134
170
  "get",
135
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/versions`,
171
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
136
172
  query_params,
137
173
  undefined
138
174
  );
175
+
176
+ const {
177
+ error: res_error,
178
+ } = ConfigurationModel.TokenResponse().validate(response, {
179
+ abortEarly: false,
180
+ allowUnknown: false,
181
+ });
182
+
183
+ if (res_error) {
184
+ Logger({
185
+ level: "WARN",
186
+ message: "Response Validation Warnnings for getAppApiTokens",
187
+ });
188
+ Logger({ level: "WARN", message: res_error });
189
+ }
190
+
191
+ return response;
139
192
  }
140
193
 
141
194
  /**
142
195
  * @param {Object} arg - Arg object.
143
- * @summary: Get features of application
144
- * @description: Get features of application
196
+ * @returns {Promise<ApplicationDetail>} - Success response
197
+ * @summary: Get basic application details
198
+ * @description: Get basic application details like name
145
199
  */
146
- getAppFeatures({} = {}) {
147
- const { error } = ConfigurationValidator.getAppFeatures().validate(
200
+ async getAppBasicDetails({} = {}) {
201
+ const { error } = ConfigurationValidator.getAppBasicDetails().validate(
148
202
  {},
149
203
  { abortEarly: false, allowUnknown: true }
150
204
  );
@@ -155,36 +209,61 @@ class Configuration {
155
209
  // Showing warrnings if extra unknown parameters are found
156
210
  const {
157
211
  error: warrning,
158
- } = ConfigurationValidator.getAppFeatures().validate(
212
+ } = ConfigurationValidator.getAppBasicDetails().validate(
159
213
  {},
160
214
  { abortEarly: false, allowUnknown: false }
161
215
  );
162
216
  if (warrning) {
163
- console.log("Parameter Validation warrnings for getAppFeatures");
164
- console.log(warrning);
217
+ Logger({
218
+ level: "WARN",
219
+ message: "Parameter Validation warrnings for getAppBasicDetails",
220
+ });
221
+ Logger({ level: "WARN", message: warrning });
165
222
  }
166
223
 
167
224
  const query_params = {};
168
225
 
169
- return PlatformAPIClient.execute(
226
+ const response = await PlatformAPIClient.execute(
170
227
  this.config,
171
228
  "get",
172
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
229
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
173
230
  query_params,
174
231
  undefined
175
232
  );
233
+
234
+ const {
235
+ error: res_error,
236
+ } = ConfigurationModel.ApplicationDetail().validate(response, {
237
+ abortEarly: false,
238
+ allowUnknown: false,
239
+ });
240
+
241
+ if (res_error) {
242
+ Logger({
243
+ level: "WARN",
244
+ message: "Response Validation Warnnings for getAppBasicDetails",
245
+ });
246
+ Logger({ level: "WARN", message: res_error });
247
+ }
248
+
249
+ return response;
176
250
  }
177
251
 
178
252
  /**
179
253
  * @param {Object} arg - Arg object.
180
- * @param {AppFeatureRequest} arg.body
181
- * @summary: Update features of application
182
- * @description: Update features of application
254
+ * @param {number} [arg.uid] - Uid of companies to be fetched
255
+ * @param {number} [arg.pageNo] - Current page no
256
+ * @param {number} [arg.pageSize] - Current request items count
257
+ * @returns {Promise<CompaniesResponse>} - Success response
258
+ * @summary: Application inventory enabled companies
259
+ * @description: Application inventory enabled companies.
183
260
  */
184
- updateAppFeatures({ body } = {}) {
185
- const { error } = ConfigurationValidator.updateAppFeatures().validate(
261
+ async getAppCompanies({ uid, pageNo, pageSize } = {}) {
262
+ const { error } = ConfigurationValidator.getAppCompanies().validate(
186
263
  {
187
- body,
264
+ uid,
265
+ pageNo,
266
+ pageSize,
188
267
  },
189
268
  { abortEarly: false, allowUnknown: true }
190
269
  );
@@ -195,35 +274,93 @@ class Configuration {
195
274
  // Showing warrnings if extra unknown parameters are found
196
275
  const {
197
276
  error: warrning,
198
- } = ConfigurationValidator.updateAppFeatures().validate(
277
+ } = ConfigurationValidator.getAppCompanies().validate(
199
278
  {
200
- body,
279
+ uid,
280
+ pageNo,
281
+ pageSize,
201
282
  },
202
283
  { abortEarly: false, allowUnknown: false }
203
284
  );
204
285
  if (warrning) {
205
- console.log("Parameter Validation warrnings for updateAppFeatures");
206
- console.log(warrning);
286
+ Logger({
287
+ level: "WARN",
288
+ message: "Parameter Validation warrnings for getAppCompanies",
289
+ });
290
+ Logger({ level: "WARN", message: warrning });
207
291
  }
208
292
 
209
293
  const query_params = {};
294
+ query_params["uid"] = uid;
295
+ query_params["page_no"] = pageNo;
296
+ query_params["page_size"] = pageSize;
210
297
 
211
- return PlatformAPIClient.execute(
298
+ const response = await PlatformAPIClient.execute(
212
299
  this.config,
213
- "post",
214
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
300
+ "get",
301
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/companies`,
215
302
  query_params,
216
- body
303
+ undefined
217
304
  );
305
+
306
+ const {
307
+ error: res_error,
308
+ } = ConfigurationModel.CompaniesResponse().validate(response, {
309
+ abortEarly: false,
310
+ allowUnknown: false,
311
+ });
312
+
313
+ if (res_error) {
314
+ Logger({
315
+ level: "WARN",
316
+ message: "Response Validation Warnnings for getAppCompanies",
317
+ });
318
+ Logger({ level: "WARN", message: res_error });
319
+ }
320
+
321
+ return response;
218
322
  }
219
323
 
220
324
  /**
221
325
  * @param {Object} arg - Arg object.
222
- * @summary: Get basic application details
223
- * @description: Get basic application details like name
326
+ * @param {string} arg.companyId - Current company id
327
+ * @param {string} arg.applicationId - Current application id
328
+ * @param {number} [arg.uid] - Uid of companies to be fetched
329
+ * @param {number} [arg.pageSize] - Current request items count
330
+ * @summary: Application inventory enabled companies
331
+ * @description: Application inventory enabled companies.
224
332
  */
225
- getAppBasicDetails({} = {}) {
226
- const { error } = ConfigurationValidator.getAppBasicDetails().validate(
333
+ getAppCompaniesPaginator({ companyId, applicationId, uid, pageSize } = {}) {
334
+ const paginator = new Paginator();
335
+ const callback = async () => {
336
+ const pageId = paginator.nextId;
337
+ const pageNo = paginator.pageNo;
338
+ const pageType = "number";
339
+ const data = await this.getAppCompanies({
340
+ companyId: companyId,
341
+ applicationId: applicationId,
342
+ uid: uid,
343
+ pageNo: pageNo,
344
+ pageSize: pageSize,
345
+ });
346
+ paginator.setPaginator({
347
+ hasNext: data.page.has_next ? true : false,
348
+ nextId: data.page.next_id,
349
+ });
350
+ return data;
351
+ };
352
+ paginator.setCallback(callback.bind(this));
353
+ return paginator;
354
+ }
355
+
356
+ /**
357
+ * @param {Object} arg - Arg object.
358
+ * @returns {Promise<ApplicationInformation>} - Success response
359
+ * @summary: Get application information
360
+ * @description: Get Application Current Information. This includes information about social links, address and contact information of company/seller/brand of the application.
361
+ */
362
+ async getAppContactInfo({} = {}) {
363
+ const { error } = ConfigurationValidator.getAppContactInfo().validate(
227
364
  {},
228
365
  { abortEarly: false, allowUnknown: true }
229
366
  );
@@ -234,37 +371,55 @@ class Configuration {
234
371
  // Showing warrnings if extra unknown parameters are found
235
372
  const {
236
373
  error: warrning,
237
- } = ConfigurationValidator.getAppBasicDetails().validate(
374
+ } = ConfigurationValidator.getAppContactInfo().validate(
238
375
  {},
239
376
  { abortEarly: false, allowUnknown: false }
240
377
  );
241
378
  if (warrning) {
242
- console.log("Parameter Validation warrnings for getAppBasicDetails");
243
- console.log(warrning);
379
+ Logger({
380
+ level: "WARN",
381
+ message: "Parameter Validation warrnings for getAppContactInfo",
382
+ });
383
+ Logger({ level: "WARN", message: warrning });
244
384
  }
245
385
 
246
386
  const query_params = {};
247
387
 
248
- return PlatformAPIClient.execute(
388
+ const response = await PlatformAPIClient.execute(
249
389
  this.config,
250
390
  "get",
251
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
391
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
252
392
  query_params,
253
393
  undefined
254
394
  );
395
+
396
+ const {
397
+ error: res_error,
398
+ } = ConfigurationModel.ApplicationInformation().validate(response, {
399
+ abortEarly: false,
400
+ allowUnknown: false,
401
+ });
402
+
403
+ if (res_error) {
404
+ Logger({
405
+ level: "WARN",
406
+ message: "Response Validation Warnnings for getAppContactInfo",
407
+ });
408
+ Logger({ level: "WARN", message: res_error });
409
+ }
410
+
411
+ return response;
255
412
  }
256
413
 
257
414
  /**
258
415
  * @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
416
+ * @returns {Promise<AppSupportedCurrency>} - Success response
417
+ * @summary: Get application enabled currency list
418
+ * @description: Get application enabled currency list
262
419
  */
263
- updateAppBasicDetails({ body } = {}) {
264
- const { error } = ConfigurationValidator.updateAppBasicDetails().validate(
265
- {
266
- body,
267
- },
420
+ async getAppCurrencyConfig({} = {}) {
421
+ const { error } = ConfigurationValidator.getAppCurrencyConfig().validate(
422
+ {},
268
423
  { abortEarly: false, allowUnknown: true }
269
424
  );
270
425
  if (error) {
@@ -274,35 +429,54 @@ class Configuration {
274
429
  // Showing warrnings if extra unknown parameters are found
275
430
  const {
276
431
  error: warrning,
277
- } = ConfigurationValidator.updateAppBasicDetails().validate(
278
- {
279
- body,
280
- },
432
+ } = ConfigurationValidator.getAppCurrencyConfig().validate(
433
+ {},
281
434
  { abortEarly: false, allowUnknown: false }
282
435
  );
283
436
  if (warrning) {
284
- console.log("Parameter Validation warrnings for updateAppBasicDetails");
285
- console.log(warrning);
437
+ Logger({
438
+ level: "WARN",
439
+ message: "Parameter Validation warrnings for getAppCurrencyConfig",
440
+ });
441
+ Logger({ level: "WARN", message: warrning });
286
442
  }
287
443
 
288
444
  const query_params = {};
289
445
 
290
- return PlatformAPIClient.execute(
446
+ const response = await PlatformAPIClient.execute(
291
447
  this.config,
292
- "put",
293
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
448
+ "get",
449
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
294
450
  query_params,
295
- body
451
+ undefined
296
452
  );
453
+
454
+ const {
455
+ error: res_error,
456
+ } = ConfigurationModel.AppSupportedCurrency().validate(response, {
457
+ abortEarly: false,
458
+ allowUnknown: false,
459
+ });
460
+
461
+ if (res_error) {
462
+ Logger({
463
+ level: "WARN",
464
+ message: "Response Validation Warnnings for getAppCurrencyConfig",
465
+ });
466
+ Logger({ level: "WARN", message: res_error });
467
+ }
468
+
469
+ return response;
297
470
  }
298
471
 
299
472
  /**
300
473
  * @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.
474
+ * @returns {Promise<AppFeatureResponse>} - Success response
475
+ * @summary: Get features of application
476
+ * @description: Get features of application
303
477
  */
304
- getAppContactInfo({} = {}) {
305
- const { error } = ConfigurationValidator.getAppContactInfo().validate(
478
+ async getAppFeatures({} = {}) {
479
+ const { error } = ConfigurationValidator.getAppFeatures().validate(
306
480
  {},
307
481
  { abortEarly: false, allowUnknown: true }
308
482
  );
@@ -313,36 +487,59 @@ class Configuration {
313
487
  // Showing warrnings if extra unknown parameters are found
314
488
  const {
315
489
  error: warrning,
316
- } = ConfigurationValidator.getAppContactInfo().validate(
490
+ } = ConfigurationValidator.getAppFeatures().validate(
317
491
  {},
318
492
  { abortEarly: false, allowUnknown: false }
319
493
  );
320
494
  if (warrning) {
321
- console.log("Parameter Validation warrnings for getAppContactInfo");
322
- console.log(warrning);
495
+ Logger({
496
+ level: "WARN",
497
+ message: "Parameter Validation warrnings for getAppFeatures",
498
+ });
499
+ Logger({ level: "WARN", message: warrning });
323
500
  }
324
501
 
325
502
  const query_params = {};
326
503
 
327
- return PlatformAPIClient.execute(
504
+ const response = await PlatformAPIClient.execute(
328
505
  this.config,
329
506
  "get",
330
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
507
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
331
508
  query_params,
332
509
  undefined
333
510
  );
511
+
512
+ const {
513
+ error: res_error,
514
+ } = ConfigurationModel.AppFeatureResponse().validate(response, {
515
+ abortEarly: false,
516
+ allowUnknown: false,
517
+ });
518
+
519
+ if (res_error) {
520
+ Logger({
521
+ level: "WARN",
522
+ message: "Response Validation Warnnings for getAppFeatures",
523
+ });
524
+ Logger({ level: "WARN", message: res_error });
525
+ }
526
+
527
+ return response;
334
528
  }
335
529
 
336
530
  /**
337
531
  * @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.
532
+ * @param {number} [arg.pageNo] - Current page no
533
+ * @param {number} [arg.pageSize] - Current request items count
534
+ * @returns {Promise<StoresResponse>} - Success response
535
+ * @summary: Application inventory enabled stores
536
+ * @description: Application inventory enabled stores.
341
537
  */
342
- updateAppContactInfo({ body } = {}) {
343
- const { error } = ConfigurationValidator.updateAppContactInfo().validate(
538
+ async getAppStores({ pageNo, pageSize } = {}) {
539
+ const { error } = ConfigurationValidator.getAppStores().validate(
344
540
  {
345
- body,
541
+ pageNo,
542
+ pageSize,
346
543
  },
347
544
  { abortEarly: false, allowUnknown: true }
348
545
  );
@@ -351,37 +548,89 @@ class Configuration {
351
548
  }
352
549
 
353
550
  // Showing warrnings if extra unknown parameters are found
354
- const {
355
- error: warrning,
356
- } = ConfigurationValidator.updateAppContactInfo().validate(
551
+ const { error: warrning } = ConfigurationValidator.getAppStores().validate(
357
552
  {
358
- body,
553
+ pageNo,
554
+ pageSize,
359
555
  },
360
556
  { abortEarly: false, allowUnknown: false }
361
557
  );
362
558
  if (warrning) {
363
- console.log("Parameter Validation warrnings for updateAppContactInfo");
364
- console.log(warrning);
559
+ Logger({
560
+ level: "WARN",
561
+ message: "Parameter Validation warrnings for getAppStores",
562
+ });
563
+ Logger({ level: "WARN", message: warrning });
365
564
  }
366
565
 
367
566
  const query_params = {};
567
+ query_params["page_no"] = pageNo;
568
+ query_params["page_size"] = pageSize;
368
569
 
369
- return PlatformAPIClient.execute(
570
+ const response = await PlatformAPIClient.execute(
370
571
  this.config,
371
- "put",
372
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
572
+ "get",
573
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/stores`,
373
574
  query_params,
374
- body
575
+ undefined
375
576
  );
577
+
578
+ const {
579
+ error: res_error,
580
+ } = ConfigurationModel.StoresResponse().validate(response, {
581
+ abortEarly: false,
582
+ allowUnknown: false,
583
+ });
584
+
585
+ if (res_error) {
586
+ Logger({
587
+ level: "WARN",
588
+ message: "Response Validation Warnnings for getAppStores",
589
+ });
590
+ Logger({ level: "WARN", message: res_error });
591
+ }
592
+
593
+ return response;
376
594
  }
377
595
 
378
596
  /**
379
597
  * @param {Object} arg - Arg object.
380
- * @summary: Get social tokens
381
- * @description: Get social tokens.
598
+ * @param {string} arg.companyId - Current company id
599
+ * @param {string} arg.applicationId - Current application id
600
+ * @param {number} [arg.pageSize] - Current request items count
601
+ * @summary: Application inventory enabled stores
602
+ * @description: Application inventory enabled stores.
382
603
  */
383
- getAppApiTokens({} = {}) {
384
- const { error } = ConfigurationValidator.getAppApiTokens().validate(
604
+ getAppStoresPaginator({ companyId, applicationId, pageSize } = {}) {
605
+ const paginator = new Paginator();
606
+ const callback = async () => {
607
+ const pageId = paginator.nextId;
608
+ const pageNo = paginator.pageNo;
609
+ const pageType = "number";
610
+ const data = await this.getAppStores({
611
+ companyId: companyId,
612
+ applicationId: applicationId,
613
+ pageNo: pageNo,
614
+ pageSize: pageSize,
615
+ });
616
+ paginator.setPaginator({
617
+ hasNext: data.page.has_next ? true : false,
618
+ nextId: data.page.next_id,
619
+ });
620
+ return data;
621
+ };
622
+ paginator.setCallback(callback.bind(this));
623
+ return paginator;
624
+ }
625
+
626
+ /**
627
+ * @param {Object} arg - Arg object.
628
+ * @returns {Promise<AppCurrencyResponse>} - Success response
629
+ * @summary: Get currencies enabled in the application
630
+ * @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.
631
+ */
632
+ async getAppSupportedCurrency({} = {}) {
633
+ const { error } = ConfigurationValidator.getAppSupportedCurrency().validate(
385
634
  {},
386
635
  { abortEarly: false, allowUnknown: true }
387
636
  );
@@ -392,37 +641,55 @@ class Configuration {
392
641
  // Showing warrnings if extra unknown parameters are found
393
642
  const {
394
643
  error: warrning,
395
- } = ConfigurationValidator.getAppApiTokens().validate(
644
+ } = ConfigurationValidator.getAppSupportedCurrency().validate(
396
645
  {},
397
646
  { abortEarly: false, allowUnknown: false }
398
647
  );
399
648
  if (warrning) {
400
- console.log("Parameter Validation warrnings for getAppApiTokens");
401
- console.log(warrning);
649
+ Logger({
650
+ level: "WARN",
651
+ message: "Parameter Validation warrnings for getAppSupportedCurrency",
652
+ });
653
+ Logger({ level: "WARN", message: warrning });
402
654
  }
403
655
 
404
656
  const query_params = {};
405
657
 
406
- return PlatformAPIClient.execute(
658
+ const response = await PlatformAPIClient.execute(
407
659
  this.config,
408
660
  "get",
409
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
661
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency/supported`,
410
662
  query_params,
411
663
  undefined
412
664
  );
665
+
666
+ const {
667
+ error: res_error,
668
+ } = ConfigurationModel.AppCurrencyResponse().validate(response, {
669
+ abortEarly: false,
670
+ allowUnknown: false,
671
+ });
672
+
673
+ if (res_error) {
674
+ Logger({
675
+ level: "WARN",
676
+ message: "Response Validation Warnnings for getAppSupportedCurrency",
677
+ });
678
+ Logger({ level: "WARN", message: res_error });
679
+ }
680
+
681
+ return response;
413
682
  }
414
683
 
415
684
  /**
416
685
  * @param {Object} arg - Arg object.
417
- * @param {TokenResponse} arg.body
418
- * @summary: Add social tokens
419
- * @description: Add social tokens.
686
+ * @returns {Promise<Application>} - Success response
687
+ * @summary: Get application data from id
688
+ * @description: Get application data from id
420
689
  */
421
- updateAppApiTokens({ body } = {}) {
422
- const { error } = ConfigurationValidator.updateAppApiTokens().validate(
423
- {
424
- body,
425
- },
690
+ async getApplicationById({} = {}) {
691
+ const { error } = ConfigurationValidator.getApplicationById().validate(
692
+ {},
426
693
  { abortEarly: false, allowUnknown: true }
427
694
  );
428
695
  if (error) {
@@ -432,42 +699,57 @@ class Configuration {
432
699
  // Showing warrnings if extra unknown parameters are found
433
700
  const {
434
701
  error: warrning,
435
- } = ConfigurationValidator.updateAppApiTokens().validate(
436
- {
437
- body,
438
- },
702
+ } = ConfigurationValidator.getApplicationById().validate(
703
+ {},
439
704
  { abortEarly: false, allowUnknown: false }
440
705
  );
441
706
  if (warrning) {
442
- console.log("Parameter Validation warrnings for updateAppApiTokens");
443
- console.log(warrning);
707
+ Logger({
708
+ level: "WARN",
709
+ message: "Parameter Validation warrnings for getApplicationById",
710
+ });
711
+ Logger({ level: "WARN", message: warrning });
444
712
  }
445
713
 
446
714
  const query_params = {};
447
715
 
448
- return PlatformAPIClient.execute(
716
+ const response = await PlatformAPIClient.execute(
449
717
  this.config,
450
- "post",
451
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
718
+ "get",
719
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
452
720
  query_params,
453
- body
721
+ undefined
454
722
  );
723
+
724
+ const {
725
+ error: res_error,
726
+ } = ConfigurationModel.Application().validate(response, {
727
+ abortEarly: false,
728
+ allowUnknown: false,
729
+ });
730
+
731
+ if (res_error) {
732
+ Logger({
733
+ level: "WARN",
734
+ message: "Response Validation Warnnings for getApplicationById",
735
+ });
736
+ Logger({ level: "WARN", message: res_error });
737
+ }
738
+
739
+ return response;
455
740
  }
456
741
 
457
742
  /**
458
743
  * @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.
744
+ * @param {string} arg.platformType - Current platform name
745
+ * @returns {Promise<MobileAppConfiguration>} - Success response
746
+ * @summary: Get latest build config
747
+ * @description: Get latest build config
464
748
  */
465
- getAppCompanies({ uid, pageNo, pageSize } = {}) {
466
- const { error } = ConfigurationValidator.getAppCompanies().validate(
749
+ async getBuildConfig({ platformType } = {}) {
750
+ const { error } = ConfigurationValidator.getBuildConfig().validate(
467
751
  {
468
- uid,
469
- pageNo,
470
- pageSize,
752
+ platformType,
471
753
  },
472
754
  { abortEarly: false, allowUnknown: true }
473
755
  );
@@ -478,77 +760,59 @@ class Configuration {
478
760
  // Showing warrnings if extra unknown parameters are found
479
761
  const {
480
762
  error: warrning,
481
- } = ConfigurationValidator.getAppCompanies().validate(
763
+ } = ConfigurationValidator.getBuildConfig().validate(
482
764
  {
483
- uid,
484
- pageNo,
485
- pageSize,
765
+ platformType,
486
766
  },
487
767
  { abortEarly: false, allowUnknown: false }
488
768
  );
489
769
  if (warrning) {
490
- console.log("Parameter Validation warrnings for getAppCompanies");
491
- console.log(warrning);
770
+ Logger({
771
+ level: "WARN",
772
+ message: "Parameter Validation warrnings for getBuildConfig",
773
+ });
774
+ Logger({ level: "WARN", message: warrning });
492
775
  }
493
776
 
494
777
  const query_params = {};
495
- query_params["uid"] = uid;
496
- query_params["page_no"] = pageNo;
497
- query_params["page_size"] = pageSize;
498
778
 
499
- return PlatformAPIClient.execute(
779
+ const response = await PlatformAPIClient.execute(
500
780
  this.config,
501
781
  "get",
502
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/companies`,
782
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
503
783
  query_params,
504
784
  undefined
505
785
  );
506
- }
507
786
 
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,
787
+ const {
788
+ error: res_error,
789
+ } = ConfigurationModel.MobileAppConfiguration().validate(response, {
790
+ abortEarly: false,
791
+ allowUnknown: false,
792
+ });
793
+
794
+ if (res_error) {
795
+ Logger({
796
+ level: "WARN",
797
+ message: "Response Validation Warnnings for getBuildConfig",
533
798
  });
534
- return data;
535
- };
536
- paginator.setCallback(callback.bind(this));
537
- return paginator;
799
+ Logger({ level: "WARN", message: res_error });
800
+ }
801
+
802
+ return response;
538
803
  }
539
804
 
540
805
  /**
541
806
  * @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.
807
+ * @param {DomainStatusRequest} arg.body
808
+ * @returns {Promise<DomainStatusResponse>} - Success response
809
+ * @summary: Get domain connected status.
810
+ * @description: Get domain connected status. Check if domain is live and mapped to appropriate IP to fynd servers.
546
811
  */
547
- getAppStores({ pageNo, pageSize } = {}) {
548
- const { error } = ConfigurationValidator.getAppStores().validate(
812
+ async getDomainStatus({ body } = {}) {
813
+ const { error } = ConfigurationValidator.getDomainStatus().validate(
549
814
  {
550
- pageNo,
551
- pageSize,
815
+ body,
552
816
  },
553
817
  { abortEarly: false, allowUnknown: true }
554
818
  );
@@ -557,67 +821,113 @@ class Configuration {
557
821
  }
558
822
 
559
823
  // Showing warrnings if extra unknown parameters are found
560
- const { error: warrning } = ConfigurationValidator.getAppStores().validate(
824
+ const {
825
+ error: warrning,
826
+ } = ConfigurationValidator.getDomainStatus().validate(
561
827
  {
562
- pageNo,
563
- pageSize,
828
+ body,
564
829
  },
565
830
  { abortEarly: false, allowUnknown: false }
566
831
  );
567
832
  if (warrning) {
568
- console.log("Parameter Validation warrnings for getAppStores");
569
- console.log(warrning);
833
+ Logger({
834
+ level: "WARN",
835
+ message: "Parameter Validation warrnings for getDomainStatus",
836
+ });
837
+ Logger({ level: "WARN", message: warrning });
570
838
  }
571
839
 
572
840
  const query_params = {};
573
- query_params["page_no"] = pageNo;
574
- query_params["page_size"] = pageSize;
575
841
 
576
- return PlatformAPIClient.execute(
842
+ const response = await PlatformAPIClient.execute(
577
843
  this.config,
578
- "get",
579
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/stores`,
844
+ "post",
845
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/domain-status`,
580
846
  query_params,
581
- undefined
847
+ body
582
848
  );
849
+
850
+ const {
851
+ error: res_error,
852
+ } = ConfigurationModel.DomainStatusResponse().validate(response, {
853
+ abortEarly: false,
854
+ allowUnknown: false,
855
+ });
856
+
857
+ if (res_error) {
858
+ Logger({
859
+ level: "WARN",
860
+ message: "Response Validation Warnnings for getDomainStatus",
861
+ });
862
+ Logger({ level: "WARN", message: res_error });
863
+ }
864
+
865
+ return response;
583
866
  }
584
867
 
585
868
  /**
586
869
  * @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.
870
+ * @returns {Promise<DomainsResponse>} - Success response
871
+ * @summary: Get attached domain list
872
+ * @description: Get attached domain list.
592
873
  */
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,
874
+ async getDomains({} = {}) {
875
+ const { error } = ConfigurationValidator.getDomains().validate(
876
+ {},
877
+ { abortEarly: false, allowUnknown: true }
878
+ );
879
+ if (error) {
880
+ return Promise.reject(new FDKClientValidationError(error));
881
+ }
882
+
883
+ // Showing warrnings if extra unknown parameters are found
884
+ const { error: warrning } = ConfigurationValidator.getDomains().validate(
885
+ {},
886
+ { abortEarly: false, allowUnknown: false }
887
+ );
888
+ if (warrning) {
889
+ Logger({
890
+ level: "WARN",
891
+ message: "Parameter Validation warrnings for getDomains",
604
892
  });
605
- paginator.setPaginator({
606
- hasNext: data.page.has_next ? true : false,
607
- nextId: data.page.next_id,
893
+ Logger({ level: "WARN", message: warrning });
894
+ }
895
+
896
+ const query_params = {};
897
+
898
+ const response = await PlatformAPIClient.execute(
899
+ this.config,
900
+ "get",
901
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
902
+ query_params,
903
+ undefined
904
+ );
905
+
906
+ const {
907
+ error: res_error,
908
+ } = ConfigurationModel.DomainsResponse().validate(response, {
909
+ abortEarly: false,
910
+ allowUnknown: false,
911
+ });
912
+
913
+ if (res_error) {
914
+ Logger({
915
+ level: "WARN",
916
+ message: "Response Validation Warnnings for getDomains",
608
917
  });
609
- return data;
610
- };
611
- paginator.setCallback(callback.bind(this));
612
- return paginator;
918
+ Logger({ level: "WARN", message: res_error });
919
+ }
920
+
921
+ return response;
613
922
  }
614
923
 
615
924
  /**
616
925
  * @param {Object} arg - Arg object.
926
+ * @returns {Promise<ApplicationInventory>} - Success response
617
927
  * @summary: Get application configuration
618
928
  * @description: Get application configuration for various features and data
619
929
  */
620
- getInventoryConfig({} = {}) {
930
+ async getInventoryConfig({} = {}) {
621
931
  const { error } = ConfigurationValidator.getInventoryConfig().validate(
622
932
  {},
623
933
  { abortEarly: false, allowUnknown: true }
@@ -634,31 +944,58 @@ class Configuration {
634
944
  { abortEarly: false, allowUnknown: false }
635
945
  );
636
946
  if (warrning) {
637
- console.log("Parameter Validation warrnings for getInventoryConfig");
638
- console.log(warrning);
947
+ Logger({
948
+ level: "WARN",
949
+ message: "Parameter Validation warrnings for getInventoryConfig",
950
+ });
951
+ Logger({ level: "WARN", message: warrning });
639
952
  }
640
953
 
641
954
  const query_params = {};
642
955
 
643
- return PlatformAPIClient.execute(
956
+ const response = await PlatformAPIClient.execute(
644
957
  this.config,
645
958
  "get",
646
959
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
647
960
  query_params,
648
961
  undefined
649
962
  );
963
+
964
+ const {
965
+ error: res_error,
966
+ } = ConfigurationModel.ApplicationInventory().validate(response, {
967
+ abortEarly: false,
968
+ allowUnknown: false,
969
+ });
970
+
971
+ if (res_error) {
972
+ Logger({
973
+ level: "WARN",
974
+ message: "Response Validation Warnnings for getInventoryConfig",
975
+ });
976
+ Logger({ level: "WARN", message: res_error });
977
+ }
978
+
979
+ return response;
650
980
  }
651
981
 
652
982
  /**
653
983
  * @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
984
+ * @param {number} [arg.pageNo] - Current page no
985
+ * @param {number} [arg.pageSize] - Current request items count
986
+ * @param {FilterOrderingStoreRequest} arg.body
987
+ * @returns {Promise<OrderingStores>} - Success response
988
+ * @summary: Get ordering store by filter
989
+ * @description: Get ordering store by filter
657
990
  */
658
- updateInventoryConfig({ body } = {}) {
659
- const { error } = ConfigurationValidator.updateInventoryConfig().validate(
991
+ async getOrderingStoresByFilter({ body, pageNo, pageSize } = {}) {
992
+ const {
993
+ error,
994
+ } = ConfigurationValidator.getOrderingStoresByFilter().validate(
660
995
  {
661
996
  body,
997
+ pageNo,
998
+ pageSize,
662
999
  },
663
1000
  { abortEarly: false, allowUnknown: true }
664
1001
  );
@@ -669,40 +1006,100 @@ class Configuration {
669
1006
  // Showing warrnings if extra unknown parameters are found
670
1007
  const {
671
1008
  error: warrning,
672
- } = ConfigurationValidator.updateInventoryConfig().validate(
1009
+ } = ConfigurationValidator.getOrderingStoresByFilter().validate(
673
1010
  {
674
1011
  body,
1012
+ pageNo,
1013
+ pageSize,
675
1014
  },
676
1015
  { abortEarly: false, allowUnknown: false }
677
1016
  );
678
1017
  if (warrning) {
679
- console.log("Parameter Validation warrnings for updateInventoryConfig");
680
- console.log(warrning);
1018
+ Logger({
1019
+ level: "WARN",
1020
+ message: "Parameter Validation warrnings for getOrderingStoresByFilter",
1021
+ });
1022
+ Logger({ level: "WARN", message: warrning });
681
1023
  }
682
1024
 
683
1025
  const query_params = {};
1026
+ query_params["page_no"] = pageNo;
1027
+ query_params["page_size"] = pageSize;
684
1028
 
685
- return PlatformAPIClient.execute(
1029
+ const response = await PlatformAPIClient.execute(
686
1030
  this.config,
687
- "put",
688
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
1031
+ "post",
1032
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/stores/filter`,
689
1033
  query_params,
690
1034
  body
691
1035
  );
1036
+
1037
+ const {
1038
+ error: res_error,
1039
+ } = ConfigurationModel.OrderingStores().validate(response, {
1040
+ abortEarly: false,
1041
+ allowUnknown: false,
1042
+ });
1043
+
1044
+ if (res_error) {
1045
+ Logger({
1046
+ level: "WARN",
1047
+ message: "Response Validation Warnnings for getOrderingStoresByFilter",
1048
+ });
1049
+ Logger({ level: "WARN", message: res_error });
1050
+ }
1051
+
1052
+ return response;
692
1053
  }
693
1054
 
694
1055
  /**
695
1056
  * @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
1057
+ * @param {string} arg.companyId - Current company id
1058
+ * @param {string} arg.applicationId - Current application id
1059
+ * @param {number} [arg.pageSize] - Current request items count
1060
+ * @param {FilterOrderingStoreRequest} arg.body
1061
+ * @summary: Get ordering store by filter
1062
+ * @description: Get ordering store by filter
699
1063
  */
700
- partiallyUpdateInventoryConfig({ body } = {}) {
701
- const {
702
- error,
703
- } = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
1064
+ getOrderingStoresByFilterPaginator({
1065
+ companyId,
1066
+ applicationId,
1067
+ pageSize,
1068
+ body,
1069
+ } = {}) {
1070
+ const paginator = new Paginator();
1071
+ const callback = async () => {
1072
+ const pageId = paginator.nextId;
1073
+ const pageNo = paginator.pageNo;
1074
+ const pageType = "number";
1075
+ const data = await this.getOrderingStoresByFilter({
1076
+ companyId: companyId,
1077
+ applicationId: applicationId,
1078
+ body: body,
1079
+ pageNo: pageNo,
1080
+ pageSize: pageSize,
1081
+ });
1082
+ paginator.setPaginator({
1083
+ hasNext: data.page.has_next ? true : false,
1084
+ nextId: data.page.next_id,
1085
+ });
1086
+ return data;
1087
+ };
1088
+ paginator.setCallback(callback.bind(this));
1089
+ return paginator;
1090
+ }
1091
+
1092
+ /**
1093
+ * @param {Object} arg - Arg object.
1094
+ * @param {string} arg.platformType - Current platform name
1095
+ * @returns {Promise<BuildVersionHistory>} - Success response
1096
+ * @summary: Get previous build versions
1097
+ * @description: Get previous build versions
1098
+ */
1099
+ async getPreviousVersions({ platformType } = {}) {
1100
+ const { error } = ConfigurationValidator.getPreviousVersions().validate(
704
1101
  {
705
- body,
1102
+ platformType,
706
1103
  },
707
1104
  { abortEarly: false, allowUnknown: true }
708
1105
  );
@@ -713,38 +1110,66 @@ class Configuration {
713
1110
  // Showing warrnings if extra unknown parameters are found
714
1111
  const {
715
1112
  error: warrning,
716
- } = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
1113
+ } = ConfigurationValidator.getPreviousVersions().validate(
717
1114
  {
718
- body,
1115
+ platformType,
719
1116
  },
720
1117
  { abortEarly: false, allowUnknown: false }
721
1118
  );
722
1119
  if (warrning) {
723
- console.log(
724
- "Parameter Validation warrnings for partiallyUpdateInventoryConfig"
725
- );
726
- console.log(warrning);
1120
+ Logger({
1121
+ level: "WARN",
1122
+ message: "Parameter Validation warrnings for getPreviousVersions",
1123
+ });
1124
+ Logger({ level: "WARN", message: warrning });
727
1125
  }
728
1126
 
729
1127
  const query_params = {};
730
1128
 
731
- return PlatformAPIClient.execute(
1129
+ const response = await PlatformAPIClient.execute(
732
1130
  this.config,
733
- "patch",
734
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
1131
+ "get",
1132
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/versions`,
735
1133
  query_params,
736
- body
1134
+ undefined
737
1135
  );
1136
+
1137
+ const {
1138
+ error: res_error,
1139
+ } = ConfigurationModel.BuildVersionHistory().validate(response, {
1140
+ abortEarly: false,
1141
+ allowUnknown: false,
1142
+ });
1143
+
1144
+ if (res_error) {
1145
+ Logger({
1146
+ level: "WARN",
1147
+ message: "Response Validation Warnnings for getPreviousVersions",
1148
+ });
1149
+ Logger({ level: "WARN", message: res_error });
1150
+ }
1151
+
1152
+ return response;
738
1153
  }
739
1154
 
740
1155
  /**
741
1156
  * @param {Object} arg - Arg object.
742
- * @summary: Get application enabled currency list
743
- * @description: Get application enabled currency list
1157
+ * @param {number} [arg.pageNo] - The page number to navigate through the
1158
+ * given set of results. Default value is 1.
1159
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
1160
+ * page. Default value is 10.
1161
+ * @param {string} [arg.q] - Store code or name of the ordering store.
1162
+ * @returns {Promise<OrderingStoresResponse>} - Success response
1163
+ * @summary: Get deployment stores
1164
+ * @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).
744
1165
  */
745
- getAppCurrencyConfig({} = {}) {
746
- const { error } = ConfigurationValidator.getAppCurrencyConfig().validate(
747
- {},
1166
+ async getStaffOrderingStores({ pageNo, pageSize, q } = {}) {
1167
+ const { error } = ConfigurationValidator.getStaffOrderingStores().validate(
1168
+ {
1169
+ pageNo,
1170
+ pageSize,
1171
+ q,
1172
+ },
748
1173
  { abortEarly: false, allowUnknown: true }
749
1174
  );
750
1175
  if (error) {
@@ -754,34 +1179,100 @@ class Configuration {
754
1179
  // Showing warrnings if extra unknown parameters are found
755
1180
  const {
756
1181
  error: warrning,
757
- } = ConfigurationValidator.getAppCurrencyConfig().validate(
758
- {},
1182
+ } = ConfigurationValidator.getStaffOrderingStores().validate(
1183
+ {
1184
+ pageNo,
1185
+ pageSize,
1186
+ q,
1187
+ },
759
1188
  { abortEarly: false, allowUnknown: false }
760
1189
  );
761
1190
  if (warrning) {
762
- console.log("Parameter Validation warrnings for getAppCurrencyConfig");
763
- console.log(warrning);
1191
+ Logger({
1192
+ level: "WARN",
1193
+ message: "Parameter Validation warrnings for getStaffOrderingStores",
1194
+ });
1195
+ Logger({ level: "WARN", message: warrning });
764
1196
  }
765
1197
 
766
1198
  const query_params = {};
1199
+ query_params["page_no"] = pageNo;
1200
+ query_params["page_size"] = pageSize;
1201
+ query_params["q"] = q;
767
1202
 
768
- return PlatformAPIClient.execute(
1203
+ const response = await PlatformAPIClient.execute(
769
1204
  this.config,
770
1205
  "get",
771
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
1206
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/staff-stores`,
772
1207
  query_params,
773
1208
  undefined
774
1209
  );
1210
+
1211
+ const {
1212
+ error: res_error,
1213
+ } = ConfigurationModel.OrderingStoresResponse().validate(response, {
1214
+ abortEarly: false,
1215
+ allowUnknown: false,
1216
+ });
1217
+
1218
+ if (res_error) {
1219
+ Logger({
1220
+ level: "WARN",
1221
+ message: "Response Validation Warnnings for getStaffOrderingStores",
1222
+ });
1223
+ Logger({ level: "WARN", message: res_error });
1224
+ }
1225
+
1226
+ return response;
775
1227
  }
776
1228
 
777
1229
  /**
778
1230
  * @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.
1231
+ * @param {string} arg.companyId - Current company id
1232
+ * @param {string} arg.applicationId - Current application id
1233
+ * @param {number} [arg.pageSize] - The number of items to retrieve in each
1234
+ * page. Default value is 10.
1235
+ * @param {string} [arg.q] - Store code or name of the ordering store.
1236
+ * @summary: Get deployment stores
1237
+ * @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).
782
1238
  */
783
- updateAppCurrencyConfig({ body } = {}) {
784
- const { error } = ConfigurationValidator.updateAppCurrencyConfig().validate(
1239
+ getStaffOrderingStoresPaginator({
1240
+ companyId,
1241
+ applicationId,
1242
+ pageSize,
1243
+ q,
1244
+ } = {}) {
1245
+ const paginator = new Paginator();
1246
+ const callback = async () => {
1247
+ const pageId = paginator.nextId;
1248
+ const pageNo = paginator.pageNo;
1249
+ const pageType = "number";
1250
+ const data = await this.getStaffOrderingStores({
1251
+ companyId: companyId,
1252
+ applicationId: applicationId,
1253
+ pageNo: pageNo,
1254
+ pageSize: pageSize,
1255
+ q: q,
1256
+ });
1257
+ paginator.setPaginator({
1258
+ hasNext: data.page.has_next ? true : false,
1259
+ nextId: data.page.next_id,
1260
+ });
1261
+ return data;
1262
+ };
1263
+ paginator.setCallback(callback.bind(this));
1264
+ return paginator;
1265
+ }
1266
+
1267
+ /**
1268
+ * @param {Object} arg - Arg object.
1269
+ * @param {AppFeatureRequest} arg.body
1270
+ * @returns {Promise<AppFeature>} - Success response
1271
+ * @summary: Update features of application
1272
+ * @description: Update features of application
1273
+ */
1274
+ async modifyAppFeatures({ body } = {}) {
1275
+ const { error } = ConfigurationValidator.modifyAppFeatures().validate(
785
1276
  {
786
1277
  body,
787
1278
  },
@@ -794,36 +1285,62 @@ class Configuration {
794
1285
  // Showing warrnings if extra unknown parameters are found
795
1286
  const {
796
1287
  error: warrning,
797
- } = ConfigurationValidator.updateAppCurrencyConfig().validate(
1288
+ } = ConfigurationValidator.modifyAppFeatures().validate(
798
1289
  {
799
1290
  body,
800
1291
  },
801
1292
  { abortEarly: false, allowUnknown: false }
802
1293
  );
803
1294
  if (warrning) {
804
- console.log("Parameter Validation warrnings for updateAppCurrencyConfig");
805
- console.log(warrning);
1295
+ Logger({
1296
+ level: "WARN",
1297
+ message: "Parameter Validation warrnings for modifyAppFeatures",
1298
+ });
1299
+ Logger({ level: "WARN", message: warrning });
806
1300
  }
807
1301
 
808
1302
  const query_params = {};
809
1303
 
810
- return PlatformAPIClient.execute(
1304
+ const response = await PlatformAPIClient.execute(
811
1305
  this.config,
812
- "post",
813
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
1306
+ "patch",
1307
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
814
1308
  query_params,
815
1309
  body
816
1310
  );
1311
+
1312
+ const {
1313
+ error: res_error,
1314
+ } = ConfigurationModel.AppFeature().validate(response, {
1315
+ abortEarly: false,
1316
+ allowUnknown: false,
1317
+ });
1318
+
1319
+ if (res_error) {
1320
+ Logger({
1321
+ level: "WARN",
1322
+ message: "Response Validation Warnnings for modifyAppFeatures",
1323
+ });
1324
+ Logger({ level: "WARN", message: res_error });
1325
+ }
1326
+
1327
+ return response;
817
1328
  }
818
1329
 
819
1330
  /**
820
1331
  * @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.
1332
+ * @param {AppInventoryPartialUpdate} arg.body
1333
+ * @returns {Promise<ApplicationInventory>} - Success response
1334
+ * @summary: Partially update application configuration
1335
+ * @description: Partially update application configuration for various features and data
823
1336
  */
824
- getAppSupportedCurrency({} = {}) {
825
- const { error } = ConfigurationValidator.getAppSupportedCurrency().validate(
826
- {},
1337
+ async partiallyUpdateInventoryConfig({ body } = {}) {
1338
+ const {
1339
+ error,
1340
+ } = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
1341
+ {
1342
+ body,
1343
+ },
827
1344
  { abortEarly: false, allowUnknown: true }
828
1345
  );
829
1346
  if (error) {
@@ -833,42 +1350,61 @@ class Configuration {
833
1350
  // Showing warrnings if extra unknown parameters are found
834
1351
  const {
835
1352
  error: warrning,
836
- } = ConfigurationValidator.getAppSupportedCurrency().validate(
837
- {},
1353
+ } = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
1354
+ {
1355
+ body,
1356
+ },
838
1357
  { abortEarly: false, allowUnknown: false }
839
1358
  );
840
1359
  if (warrning) {
841
- console.log("Parameter Validation warrnings for getAppSupportedCurrency");
842
- console.log(warrning);
1360
+ Logger({
1361
+ level: "WARN",
1362
+ message:
1363
+ "Parameter Validation warrnings for partiallyUpdateInventoryConfig",
1364
+ });
1365
+ Logger({ level: "WARN", message: warrning });
843
1366
  }
844
1367
 
845
1368
  const query_params = {};
846
1369
 
847
- return PlatformAPIClient.execute(
1370
+ const response = await PlatformAPIClient.execute(
848
1371
  this.config,
849
- "get",
850
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency/supported`,
1372
+ "patch",
1373
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
851
1374
  query_params,
852
- undefined
1375
+ body
853
1376
  );
1377
+
1378
+ const {
1379
+ error: res_error,
1380
+ } = ConfigurationModel.ApplicationInventory().validate(response, {
1381
+ abortEarly: false,
1382
+ allowUnknown: false,
1383
+ });
1384
+
1385
+ if (res_error) {
1386
+ Logger({
1387
+ level: "WARN",
1388
+ message:
1389
+ "Response Validation Warnnings for partiallyUpdateInventoryConfig",
1390
+ });
1391
+ Logger({ level: "WARN", message: res_error });
1392
+ }
1393
+
1394
+ return response;
854
1395
  }
855
1396
 
856
1397
  /**
857
1398
  * @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
1399
+ * @param {string} arg.id - Domain _id
1400
+ * @returns {Promise<SuccessMessageResponse>} - Success response
1401
+ * @summary: Remove attached domain
1402
+ * @description: Remove attached domain.
863
1403
  */
864
- getOrderingStoresByFilter({ body, pageNo, pageSize } = {}) {
865
- const {
866
- error,
867
- } = ConfigurationValidator.getOrderingStoresByFilter().validate(
1404
+ async removeDomainById({ id } = {}) {
1405
+ const { error } = ConfigurationValidator.removeDomainById().validate(
868
1406
  {
869
- body,
870
- pageNo,
871
- pageSize,
1407
+ id,
872
1408
  },
873
1409
  { abortEarly: false, allowUnknown: true }
874
1410
  );
@@ -879,81 +1415,57 @@ class Configuration {
879
1415
  // Showing warrnings if extra unknown parameters are found
880
1416
  const {
881
1417
  error: warrning,
882
- } = ConfigurationValidator.getOrderingStoresByFilter().validate(
1418
+ } = ConfigurationValidator.removeDomainById().validate(
883
1419
  {
884
- body,
885
- pageNo,
886
- pageSize,
1420
+ id,
887
1421
  },
888
1422
  { abortEarly: false, allowUnknown: false }
889
1423
  );
890
1424
  if (warrning) {
891
- console.log(
892
- "Parameter Validation warrnings for getOrderingStoresByFilter"
893
- );
894
- console.log(warrning);
1425
+ Logger({
1426
+ level: "WARN",
1427
+ message: "Parameter Validation warrnings for removeDomainById",
1428
+ });
1429
+ Logger({ level: "WARN", message: warrning });
895
1430
  }
896
1431
 
897
1432
  const query_params = {};
898
- query_params["page_no"] = pageNo;
899
- query_params["page_size"] = pageSize;
900
1433
 
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,
1434
+ const response = await PlatformAPIClient.execute(
1435
+ this.config,
1436
+ "delete",
1437
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/${id}`,
1438
+ query_params,
1439
+ undefined
1440
+ );
1441
+
1442
+ const {
1443
+ error: res_error,
1444
+ } = ConfigurationModel.SuccessMessageResponse().validate(response, {
1445
+ abortEarly: false,
1446
+ allowUnknown: false,
1447
+ });
1448
+
1449
+ if (res_error) {
1450
+ Logger({
1451
+ level: "WARN",
1452
+ message: "Response Validation Warnnings for removeDomainById",
940
1453
  });
941
- return data;
942
- };
943
- paginator.setCallback(callback.bind(this));
944
- return paginator;
1454
+ Logger({ level: "WARN", message: res_error });
1455
+ }
1456
+
1457
+ return response;
945
1458
  }
946
1459
 
947
1460
  /**
948
1461
  * @param {Object} arg - Arg object.
949
- * @param {OrderingStoreConfig} arg.body
950
- * @summary: Add/Update ordering store config
951
- * @description: Add/Update ordering store config.
1462
+ * @param {TokenResponse} arg.body
1463
+ * @returns {Promise<TokenResponse>} - Success response
1464
+ * @summary: Add social tokens
1465
+ * @description: Add social tokens.
952
1466
  */
953
- updateOrderingStoreConfig({ body } = {}) {
954
- const {
955
- error,
956
- } = ConfigurationValidator.updateOrderingStoreConfig().validate(
1467
+ async updateAppApiTokens({ body } = {}) {
1468
+ const { error } = ConfigurationValidator.updateAppApiTokens().validate(
957
1469
  {
958
1470
  body,
959
1471
  },
@@ -966,46 +1478,59 @@ class Configuration {
966
1478
  // Showing warrnings if extra unknown parameters are found
967
1479
  const {
968
1480
  error: warrning,
969
- } = ConfigurationValidator.updateOrderingStoreConfig().validate(
1481
+ } = ConfigurationValidator.updateAppApiTokens().validate(
970
1482
  {
971
1483
  body,
972
1484
  },
973
1485
  { abortEarly: false, allowUnknown: false }
974
1486
  );
975
1487
  if (warrning) {
976
- console.log(
977
- "Parameter Validation warrnings for updateOrderingStoreConfig"
978
- );
979
- console.log(warrning);
1488
+ Logger({
1489
+ level: "WARN",
1490
+ message: "Parameter Validation warrnings for updateAppApiTokens",
1491
+ });
1492
+ Logger({ level: "WARN", message: warrning });
980
1493
  }
981
1494
 
982
1495
  const query_params = {};
983
1496
 
984
- return PlatformAPIClient.execute(
1497
+ const response = await PlatformAPIClient.execute(
985
1498
  this.config,
986
1499
  "post",
987
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store`,
1500
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
988
1501
  query_params,
989
1502
  body
990
1503
  );
1504
+
1505
+ const {
1506
+ error: res_error,
1507
+ } = ConfigurationModel.TokenResponse().validate(response, {
1508
+ abortEarly: false,
1509
+ allowUnknown: false,
1510
+ });
1511
+
1512
+ if (res_error) {
1513
+ Logger({
1514
+ level: "WARN",
1515
+ message: "Response Validation Warnnings for updateAppApiTokens",
1516
+ });
1517
+ Logger({ level: "WARN", message: res_error });
1518
+ }
1519
+
1520
+ return response;
991
1521
  }
992
1522
 
993
1523
  /**
994
1524
  * @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).
1525
+ * @param {ApplicationDetail} arg.body
1526
+ * @returns {Promise<ApplicationDetail>} - Success response
1527
+ * @summary: Add or update application's basic details
1528
+ * @description: Add or update application's basic details
1002
1529
  */
1003
- getStaffOrderingStores({ pageNo, pageSize, q } = {}) {
1004
- const { error } = ConfigurationValidator.getStaffOrderingStores().validate(
1530
+ async updateAppBasicDetails({ body } = {}) {
1531
+ const { error } = ConfigurationValidator.updateAppBasicDetails().validate(
1005
1532
  {
1006
- pageNo,
1007
- pageSize,
1008
- q,
1533
+ body,
1009
1534
  },
1010
1535
  { abortEarly: false, allowUnknown: true }
1011
1536
  );
@@ -1016,79 +1541,60 @@ class Configuration {
1016
1541
  // Showing warrnings if extra unknown parameters are found
1017
1542
  const {
1018
1543
  error: warrning,
1019
- } = ConfigurationValidator.getStaffOrderingStores().validate(
1544
+ } = ConfigurationValidator.updateAppBasicDetails().validate(
1020
1545
  {
1021
- pageNo,
1022
- pageSize,
1023
- q,
1546
+ body,
1024
1547
  },
1025
1548
  { abortEarly: false, allowUnknown: false }
1026
1549
  );
1027
1550
  if (warrning) {
1028
- console.log("Parameter Validation warrnings for getStaffOrderingStores");
1029
- console.log(warrning);
1551
+ Logger({
1552
+ level: "WARN",
1553
+ message: "Parameter Validation warrnings for updateAppBasicDetails",
1554
+ });
1555
+ Logger({ level: "WARN", message: warrning });
1030
1556
  }
1031
1557
 
1032
1558
  const query_params = {};
1033
- query_params["page_no"] = pageNo;
1034
- query_params["page_size"] = pageSize;
1035
- query_params["q"] = q;
1036
1559
 
1037
- return PlatformAPIClient.execute(
1560
+ const response = await PlatformAPIClient.execute(
1038
1561
  this.config,
1039
- "get",
1040
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/staff-stores`,
1562
+ "put",
1563
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
1041
1564
  query_params,
1042
- undefined
1565
+ body
1043
1566
  );
1044
- }
1045
1567
 
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,
1568
+ const {
1569
+ error: res_error,
1570
+ } = ConfigurationModel.ApplicationDetail().validate(response, {
1571
+ abortEarly: false,
1572
+ allowUnknown: false,
1573
+ });
1574
+
1575
+ if (res_error) {
1576
+ Logger({
1577
+ level: "WARN",
1578
+ message: "Response Validation Warnnings for updateAppBasicDetails",
1077
1579
  });
1078
- return data;
1079
- };
1080
- paginator.setCallback(callback.bind(this));
1081
- return paginator;
1580
+ Logger({ level: "WARN", message: res_error });
1581
+ }
1582
+
1583
+ return response;
1082
1584
  }
1083
1585
 
1084
1586
  /**
1085
1587
  * @param {Object} arg - Arg object.
1086
- * @summary: Get attached domain list
1087
- * @description: Get attached domain list.
1588
+ * @param {ApplicationInformation} arg.body
1589
+ * @returns {Promise<ApplicationInformation>} - Success response
1590
+ * @summary: Get application information
1591
+ * @description: Save Application Current Information. This includes information about social links, address and contact information of an application.
1088
1592
  */
1089
- getDomains({} = {}) {
1090
- const { error } = ConfigurationValidator.getDomains().validate(
1091
- {},
1593
+ async updateAppContactInfo({ body } = {}) {
1594
+ const { error } = ConfigurationValidator.updateAppContactInfo().validate(
1595
+ {
1596
+ body,
1597
+ },
1092
1598
  { abortEarly: false, allowUnknown: true }
1093
1599
  );
1094
1600
  if (error) {
@@ -1096,34 +1602,59 @@ class Configuration {
1096
1602
  }
1097
1603
 
1098
1604
  // Showing warrnings if extra unknown parameters are found
1099
- const { error: warrning } = ConfigurationValidator.getDomains().validate(
1100
- {},
1605
+ const {
1606
+ error: warrning,
1607
+ } = ConfigurationValidator.updateAppContactInfo().validate(
1608
+ {
1609
+ body,
1610
+ },
1101
1611
  { abortEarly: false, allowUnknown: false }
1102
1612
  );
1103
1613
  if (warrning) {
1104
- console.log("Parameter Validation warrnings for getDomains");
1105
- console.log(warrning);
1614
+ Logger({
1615
+ level: "WARN",
1616
+ message: "Parameter Validation warrnings for updateAppContactInfo",
1617
+ });
1618
+ Logger({ level: "WARN", message: warrning });
1106
1619
  }
1107
1620
 
1108
1621
  const query_params = {};
1109
1622
 
1110
- return PlatformAPIClient.execute(
1623
+ const response = await PlatformAPIClient.execute(
1111
1624
  this.config,
1112
- "get",
1113
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
1625
+ "put",
1626
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
1114
1627
  query_params,
1115
- undefined
1628
+ body
1116
1629
  );
1630
+
1631
+ const {
1632
+ error: res_error,
1633
+ } = ConfigurationModel.ApplicationInformation().validate(response, {
1634
+ abortEarly: false,
1635
+ allowUnknown: false,
1636
+ });
1637
+
1638
+ if (res_error) {
1639
+ Logger({
1640
+ level: "WARN",
1641
+ message: "Response Validation Warnnings for updateAppContactInfo",
1642
+ });
1643
+ Logger({ level: "WARN", message: res_error });
1644
+ }
1645
+
1646
+ return response;
1117
1647
  }
1118
1648
 
1119
1649
  /**
1120
1650
  * @param {Object} arg - Arg object.
1121
- * @param {DomainAddRequest} arg.body
1122
- * @summary: Add new domain to application
1123
- * @description: Add new domain to application.
1651
+ * @param {AppSupportedCurrency} arg.body
1652
+ * @returns {Promise<AppSupportedCurrency>} - Success response
1653
+ * @summary: Add initial application supported currency
1654
+ * @description: Add initial application supported currency for various features and data. Default INR will be enabled.
1124
1655
  */
1125
- addDomain({ body } = {}) {
1126
- const { error } = ConfigurationValidator.addDomain().validate(
1656
+ async updateAppCurrencyConfig({ body } = {}) {
1657
+ const { error } = ConfigurationValidator.updateAppCurrencyConfig().validate(
1127
1658
  {
1128
1659
  body,
1129
1660
  },
@@ -1134,38 +1665,61 @@ class Configuration {
1134
1665
  }
1135
1666
 
1136
1667
  // Showing warrnings if extra unknown parameters are found
1137
- const { error: warrning } = ConfigurationValidator.addDomain().validate(
1668
+ const {
1669
+ error: warrning,
1670
+ } = ConfigurationValidator.updateAppCurrencyConfig().validate(
1138
1671
  {
1139
1672
  body,
1140
1673
  },
1141
1674
  { abortEarly: false, allowUnknown: false }
1142
1675
  );
1143
1676
  if (warrning) {
1144
- console.log("Parameter Validation warrnings for addDomain");
1145
- console.log(warrning);
1677
+ Logger({
1678
+ level: "WARN",
1679
+ message: "Parameter Validation warrnings for updateAppCurrencyConfig",
1680
+ });
1681
+ Logger({ level: "WARN", message: warrning });
1146
1682
  }
1147
1683
 
1148
1684
  const query_params = {};
1149
1685
 
1150
- return PlatformAPIClient.execute(
1686
+ const response = await PlatformAPIClient.execute(
1151
1687
  this.config,
1152
1688
  "post",
1153
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
1689
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
1154
1690
  query_params,
1155
1691
  body
1156
1692
  );
1693
+
1694
+ const {
1695
+ error: res_error,
1696
+ } = ConfigurationModel.AppSupportedCurrency().validate(response, {
1697
+ abortEarly: false,
1698
+ allowUnknown: false,
1699
+ });
1700
+
1701
+ if (res_error) {
1702
+ Logger({
1703
+ level: "WARN",
1704
+ message: "Response Validation Warnnings for updateAppCurrencyConfig",
1705
+ });
1706
+ Logger({ level: "WARN", message: res_error });
1707
+ }
1708
+
1709
+ return response;
1157
1710
  }
1158
1711
 
1159
1712
  /**
1160
1713
  * @param {Object} arg - Arg object.
1161
- * @param {string} arg.id - Domain _id
1162
- * @summary: Remove attached domain
1163
- * @description: Remove attached domain.
1714
+ * @param {AppFeatureRequest} arg.body
1715
+ * @returns {Promise<AppFeature>} - Success response
1716
+ * @summary: Update features of application
1717
+ * @description: Update features of application
1164
1718
  */
1165
- removeDomainById({ id } = {}) {
1166
- const { error } = ConfigurationValidator.removeDomainById().validate(
1719
+ async updateAppFeatures({ body } = {}) {
1720
+ const { error } = ConfigurationValidator.updateAppFeatures().validate(
1167
1721
  {
1168
- id,
1722
+ body,
1169
1723
  },
1170
1724
  { abortEarly: false, allowUnknown: true }
1171
1725
  );
@@ -1176,37 +1730,60 @@ class Configuration {
1176
1730
  // Showing warrnings if extra unknown parameters are found
1177
1731
  const {
1178
1732
  error: warrning,
1179
- } = ConfigurationValidator.removeDomainById().validate(
1733
+ } = ConfigurationValidator.updateAppFeatures().validate(
1180
1734
  {
1181
- id,
1735
+ body,
1182
1736
  },
1183
1737
  { abortEarly: false, allowUnknown: false }
1184
1738
  );
1185
1739
  if (warrning) {
1186
- console.log("Parameter Validation warrnings for removeDomainById");
1187
- console.log(warrning);
1740
+ Logger({
1741
+ level: "WARN",
1742
+ message: "Parameter Validation warrnings for updateAppFeatures",
1743
+ });
1744
+ Logger({ level: "WARN", message: warrning });
1188
1745
  }
1189
1746
 
1190
1747
  const query_params = {};
1191
1748
 
1192
- return PlatformAPIClient.execute(
1749
+ const response = await PlatformAPIClient.execute(
1193
1750
  this.config,
1194
- "delete",
1195
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/${id}`,
1751
+ "post",
1752
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
1196
1753
  query_params,
1197
- undefined
1754
+ body
1198
1755
  );
1756
+
1757
+ const {
1758
+ error: res_error,
1759
+ } = ConfigurationModel.AppFeature().validate(response, {
1760
+ abortEarly: false,
1761
+ allowUnknown: false,
1762
+ });
1763
+
1764
+ if (res_error) {
1765
+ Logger({
1766
+ level: "WARN",
1767
+ message: "Response Validation Warnnings for updateAppFeatures",
1768
+ });
1769
+ Logger({ level: "WARN", message: res_error });
1770
+ }
1771
+
1772
+ return response;
1199
1773
  }
1200
1774
 
1201
1775
  /**
1202
1776
  * @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
1777
+ * @param {string} arg.platformType - Current platform name
1778
+ * @param {MobileAppConfigRequest} arg.body
1779
+ * @returns {Promise<MobileAppConfiguration>} - Success response
1780
+ * @summary: Update build config for next build
1781
+ * @description: Update build config for next build
1206
1782
  */
1207
- changeDomainType({ body } = {}) {
1208
- const { error } = ConfigurationValidator.changeDomainType().validate(
1783
+ async updateBuildConfig({ platformType, body } = {}) {
1784
+ const { error } = ConfigurationValidator.updateBuildConfig().validate(
1209
1785
  {
1786
+ platformType,
1210
1787
  body,
1211
1788
  },
1212
1789
  { abortEarly: false, allowUnknown: true }
@@ -1218,36 +1795,58 @@ class Configuration {
1218
1795
  // Showing warrnings if extra unknown parameters are found
1219
1796
  const {
1220
1797
  error: warrning,
1221
- } = ConfigurationValidator.changeDomainType().validate(
1798
+ } = ConfigurationValidator.updateBuildConfig().validate(
1222
1799
  {
1800
+ platformType,
1223
1801
  body,
1224
1802
  },
1225
1803
  { abortEarly: false, allowUnknown: false }
1226
1804
  );
1227
1805
  if (warrning) {
1228
- console.log("Parameter Validation warrnings for changeDomainType");
1229
- console.log(warrning);
1806
+ Logger({
1807
+ level: "WARN",
1808
+ message: "Parameter Validation warrnings for updateBuildConfig",
1809
+ });
1810
+ Logger({ level: "WARN", message: warrning });
1230
1811
  }
1231
1812
 
1232
1813
  const query_params = {};
1233
1814
 
1234
- return PlatformAPIClient.execute(
1815
+ const response = await PlatformAPIClient.execute(
1235
1816
  this.config,
1236
- "post",
1237
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/set-domain`,
1817
+ "put",
1818
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
1238
1819
  query_params,
1239
1820
  body
1240
1821
  );
1822
+
1823
+ const {
1824
+ error: res_error,
1825
+ } = ConfigurationModel.MobileAppConfiguration().validate(response, {
1826
+ abortEarly: false,
1827
+ allowUnknown: false,
1828
+ });
1829
+
1830
+ if (res_error) {
1831
+ Logger({
1832
+ level: "WARN",
1833
+ message: "Response Validation Warnnings for updateBuildConfig",
1834
+ });
1835
+ Logger({ level: "WARN", message: res_error });
1836
+ }
1837
+
1838
+ return response;
1241
1839
  }
1242
1840
 
1243
1841
  /**
1244
1842
  * @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.
1843
+ * @param {ApplicationInventory} arg.body
1844
+ * @returns {Promise<ApplicationInventory>} - Success response
1845
+ * @summary: Update application configuration
1846
+ * @description: Update application configuration for various features and data
1248
1847
  */
1249
- getDomainStatus({ body } = {}) {
1250
- const { error } = ConfigurationValidator.getDomainStatus().validate(
1848
+ async updateInventoryConfig({ body } = {}) {
1849
+ const { error } = ConfigurationValidator.updateInventoryConfig().validate(
1251
1850
  {
1252
1851
  body,
1253
1852
  },
@@ -1260,36 +1859,62 @@ class Configuration {
1260
1859
  // Showing warrnings if extra unknown parameters are found
1261
1860
  const {
1262
1861
  error: warrning,
1263
- } = ConfigurationValidator.getDomainStatus().validate(
1862
+ } = ConfigurationValidator.updateInventoryConfig().validate(
1264
1863
  {
1265
1864
  body,
1266
1865
  },
1267
1866
  { abortEarly: false, allowUnknown: false }
1268
1867
  );
1269
1868
  if (warrning) {
1270
- console.log("Parameter Validation warrnings for getDomainStatus");
1271
- console.log(warrning);
1869
+ Logger({
1870
+ level: "WARN",
1871
+ message: "Parameter Validation warrnings for updateInventoryConfig",
1872
+ });
1873
+ Logger({ level: "WARN", message: warrning });
1272
1874
  }
1273
1875
 
1274
1876
  const query_params = {};
1275
1877
 
1276
- return PlatformAPIClient.execute(
1878
+ const response = await PlatformAPIClient.execute(
1277
1879
  this.config,
1278
- "post",
1279
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/domain-status`,
1880
+ "put",
1881
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
1280
1882
  query_params,
1281
1883
  body
1282
1884
  );
1885
+
1886
+ const {
1887
+ error: res_error,
1888
+ } = ConfigurationModel.ApplicationInventory().validate(response, {
1889
+ abortEarly: false,
1890
+ allowUnknown: false,
1891
+ });
1892
+
1893
+ if (res_error) {
1894
+ Logger({
1895
+ level: "WARN",
1896
+ message: "Response Validation Warnnings for updateInventoryConfig",
1897
+ });
1898
+ Logger({ level: "WARN", message: res_error });
1899
+ }
1900
+
1901
+ return response;
1283
1902
  }
1284
1903
 
1285
1904
  /**
1286
1905
  * @param {Object} arg - Arg object.
1287
- * @summary: Get application data from id
1288
- * @description: Get application data from id
1906
+ * @param {OrderingStoreConfig} arg.body
1907
+ * @returns {Promise<DeploymentMeta>} - Success response
1908
+ * @summary: Add/Update ordering store config
1909
+ * @description: Add/Update ordering store config.
1289
1910
  */
1290
- getApplicationById({} = {}) {
1291
- const { error } = ConfigurationValidator.getApplicationById().validate(
1292
- {},
1911
+ async updateOrderingStoreConfig({ body } = {}) {
1912
+ const {
1913
+ error,
1914
+ } = ConfigurationValidator.updateOrderingStoreConfig().validate(
1915
+ {
1916
+ body,
1917
+ },
1293
1918
  { abortEarly: false, allowUnknown: true }
1294
1919
  );
1295
1920
  if (error) {
@@ -1299,24 +1924,46 @@ class Configuration {
1299
1924
  // Showing warrnings if extra unknown parameters are found
1300
1925
  const {
1301
1926
  error: warrning,
1302
- } = ConfigurationValidator.getApplicationById().validate(
1303
- {},
1927
+ } = ConfigurationValidator.updateOrderingStoreConfig().validate(
1928
+ {
1929
+ body,
1930
+ },
1304
1931
  { abortEarly: false, allowUnknown: false }
1305
1932
  );
1306
1933
  if (warrning) {
1307
- console.log("Parameter Validation warrnings for getApplicationById");
1308
- console.log(warrning);
1934
+ Logger({
1935
+ level: "WARN",
1936
+ message: "Parameter Validation warrnings for updateOrderingStoreConfig",
1937
+ });
1938
+ Logger({ level: "WARN", message: warrning });
1309
1939
  }
1310
1940
 
1311
1941
  const query_params = {};
1312
1942
 
1313
- return PlatformAPIClient.execute(
1943
+ const response = await PlatformAPIClient.execute(
1314
1944
  this.config,
1315
- "get",
1316
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
1945
+ "post",
1946
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store`,
1317
1947
  query_params,
1318
- undefined
1948
+ body
1319
1949
  );
1950
+
1951
+ const {
1952
+ error: res_error,
1953
+ } = ConfigurationModel.DeploymentMeta().validate(response, {
1954
+ abortEarly: false,
1955
+ allowUnknown: false,
1956
+ });
1957
+
1958
+ if (res_error) {
1959
+ Logger({
1960
+ level: "WARN",
1961
+ message: "Response Validation Warnnings for updateOrderingStoreConfig",
1962
+ });
1963
+ Logger({ level: "WARN", message: res_error });
1964
+ }
1965
+
1966
+ return response;
1320
1967
  }
1321
1968
  }
1322
1969
  module.exports = Configuration;