@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,9 @@ const Paginator = require("../../common/Paginator");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const PlatformAPIClient = require("../PlatformAPIClient");
4
4
  const ConfigurationValidator = require("./ConfigurationPlatformValidator");
5
+ const ConfigurationModel = require("./ConfigurationPlatformModel");
6
+ const { Logger } = require("./../../common/Logger");
7
+
5
8
  class Configuration {
6
9
  constructor(config) {
7
10
  this.config = config;
@@ -10,10 +13,11 @@ class Configuration {
10
13
  /**
11
14
  * @param {Object} arg - Arg object.
12
15
  * @param {CreateApplicationRequest} arg.body
16
+ * @returns {Promise<CreateAppResponse>} - Success response
13
17
  * @summary: Create application
14
18
  * @description: Create new application
15
19
  */
16
- createApplication({ body } = {}) {
20
+ async createApplication({ body } = {}) {
17
21
  const { error } = ConfigurationValidator.createApplication().validate(
18
22
  {
19
23
  body,
@@ -34,15 +38,18 @@ class Configuration {
34
38
  { abortEarly: false, allowUnknown: false }
35
39
  );
36
40
  if (warrning) {
37
- console.log("Parameter Validation warrnings for createApplication");
38
- console.log(warrning);
41
+ Logger({
42
+ level: "WARN",
43
+ message: "Parameter Validation warrnings for createApplication",
44
+ });
45
+ Logger({ level: "WARN", message: warrning });
39
46
  }
40
47
 
41
48
  const query_params = {};
42
49
 
43
50
  const xHeaders = {};
44
51
 
45
- return PlatformAPIClient.execute(
52
+ const response = await PlatformAPIClient.execute(
46
53
  this.config,
47
54
  "post",
48
55
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/application`,
@@ -50,6 +57,23 @@ class Configuration {
50
57
  body,
51
58
  xHeaders
52
59
  );
60
+
61
+ const {
62
+ error: res_error,
63
+ } = ConfigurationModel.CreateAppResponse().validate(response, {
64
+ abortEarly: false,
65
+ allowUnknown: false,
66
+ });
67
+
68
+ if (res_error) {
69
+ Logger({
70
+ level: "WARN",
71
+ message: "Response Validation Warnnings for createApplication",
72
+ });
73
+ Logger({ level: "WARN", message: res_error });
74
+ }
75
+
76
+ return response;
53
77
  }
54
78
 
55
79
  /**
@@ -57,10 +81,11 @@ class Configuration {
57
81
  * @param {number} [arg.pageNo] -
58
82
  * @param {number} [arg.pageSize] -
59
83
  * @param {string} [arg.q] - Url encoded object used as mongodb query
84
+ * @returns {Promise<ApplicationsResponse>} - Success response
60
85
  * @summary: Get list of application under company
61
86
  * @description: Get list of application under company
62
87
  */
63
- getApplications({ pageNo, pageSize, q } = {}) {
88
+ async getApplications({ pageNo, pageSize, q } = {}) {
64
89
  const { error } = ConfigurationValidator.getApplications().validate(
65
90
  {
66
91
  pageNo,
@@ -85,8 +110,11 @@ class Configuration {
85
110
  { abortEarly: false, allowUnknown: false }
86
111
  );
87
112
  if (warrning) {
88
- console.log("Parameter Validation warrnings for getApplications");
89
- console.log(warrning);
113
+ Logger({
114
+ level: "WARN",
115
+ message: "Parameter Validation warrnings for getApplications",
116
+ });
117
+ Logger({ level: "WARN", message: warrning });
90
118
  }
91
119
 
92
120
  const query_params = {};
@@ -96,7 +124,7 @@ class Configuration {
96
124
 
97
125
  const xHeaders = {};
98
126
 
99
- return PlatformAPIClient.execute(
127
+ const response = await PlatformAPIClient.execute(
100
128
  this.config,
101
129
  "get",
102
130
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/application`,
@@ -104,6 +132,23 @@ class Configuration {
104
132
  undefined,
105
133
  xHeaders
106
134
  );
135
+
136
+ const {
137
+ error: res_error,
138
+ } = ConfigurationModel.ApplicationsResponse().validate(response, {
139
+ abortEarly: false,
140
+ allowUnknown: false,
141
+ });
142
+
143
+ if (res_error) {
144
+ Logger({
145
+ level: "WARN",
146
+ message: "Response Validation Warnnings for getApplications",
147
+ });
148
+ Logger({ level: "WARN", message: res_error });
149
+ }
150
+
151
+ return response;
107
152
  }
108
153
 
109
154
  /**
@@ -136,12 +181,18 @@ class Configuration {
136
181
 
137
182
  /**
138
183
  * @param {Object} arg - Arg object.
139
- * @summary: Get all currencies
140
- * @description: Get all currencies
184
+ * @param {number} [arg.pageNo] - Current page no
185
+ * @param {number} [arg.pageSize] - Current request items count
186
+ * @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
187
+ * @summary: Get all available integration opt-ins
188
+ * @description: Get all available integration opt-ins
141
189
  */
142
- getCurrencies({} = {}) {
143
- const { error } = ConfigurationValidator.getCurrencies().validate(
144
- {},
190
+ async getAvailableOptIns({ pageNo, pageSize } = {}) {
191
+ const { error } = ConfigurationValidator.getAvailableOptIns().validate(
192
+ {
193
+ pageNo,
194
+ pageSize,
195
+ },
145
196
  { abortEarly: false, allowUnknown: true }
146
197
  );
147
198
  if (error) {
@@ -149,84 +200,93 @@ class Configuration {
149
200
  }
150
201
 
151
202
  // Showing warrnings if extra unknown parameters are found
152
- const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
153
- {},
203
+ const {
204
+ error: warrning,
205
+ } = ConfigurationValidator.getAvailableOptIns().validate(
206
+ {
207
+ pageNo,
208
+ pageSize,
209
+ },
154
210
  { abortEarly: false, allowUnknown: false }
155
211
  );
156
212
  if (warrning) {
157
- console.log("Parameter Validation warrnings for getCurrencies");
158
- console.log(warrning);
213
+ Logger({
214
+ level: "WARN",
215
+ message: "Parameter Validation warrnings for getAvailableOptIns",
216
+ });
217
+ Logger({ level: "WARN", message: warrning });
159
218
  }
160
219
 
161
220
  const query_params = {};
221
+ query_params["page_no"] = pageNo;
222
+ query_params["page_size"] = pageSize;
162
223
 
163
224
  const xHeaders = {};
164
225
 
165
- return PlatformAPIClient.execute(
226
+ const response = await PlatformAPIClient.execute(
166
227
  this.config,
167
228
  "get",
168
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/currencies`,
229
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/available`,
169
230
  query_params,
170
231
  undefined,
171
232
  xHeaders
172
233
  );
173
- }
174
234
 
175
- /**
176
- * @param {Object} arg - Arg object.
177
- * @param {DomainSuggestionsRequest} arg.body
178
- * @summary: Check domain availibility before linking to application
179
- * @description: Check domain availibility before linking to application. Also sends domain suggestions with similar to queried domain. \ Custom domain search is currently powered by GoDaddy provider.
180
- */
181
- getDomainAvailibility({ body } = {}) {
182
- const { error } = ConfigurationValidator.getDomainAvailibility().validate(
183
- {
184
- body,
185
- },
186
- { abortEarly: false, allowUnknown: true }
187
- );
188
- if (error) {
189
- return Promise.reject(new FDKClientValidationError(error));
190
- }
191
-
192
- // Showing warrnings if extra unknown parameters are found
193
235
  const {
194
- error: warrning,
195
- } = ConfigurationValidator.getDomainAvailibility().validate(
196
- {
197
- body,
198
- },
199
- { abortEarly: false, allowUnknown: false }
200
- );
201
- if (warrning) {
202
- console.log("Parameter Validation warrnings for getDomainAvailibility");
203
- console.log(warrning);
236
+ error: res_error,
237
+ } = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
238
+ abortEarly: false,
239
+ allowUnknown: false,
240
+ });
241
+
242
+ if (res_error) {
243
+ Logger({
244
+ level: "WARN",
245
+ message: "Response Validation Warnnings for getAvailableOptIns",
246
+ });
247
+ Logger({ level: "WARN", message: res_error });
204
248
  }
205
249
 
206
- const query_params = {};
207
-
208
- const xHeaders = {};
250
+ return response;
251
+ }
209
252
 
210
- return PlatformAPIClient.execute(
211
- this.config,
212
- "post",
213
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/domain/suggestions`,
214
- query_params,
215
- body,
216
- xHeaders
217
- );
253
+ /**
254
+ * @param {Object} arg - Arg object.
255
+ * @param {number} [arg.pageSize] - Current request items count
256
+ * @summary: Get all available integration opt-ins
257
+ * @description: Get all available integration opt-ins
258
+ */
259
+ getAvailableOptInsPaginator({ pageSize } = {}) {
260
+ const paginator = new Paginator();
261
+ const callback = async () => {
262
+ const pageId = paginator.nextId;
263
+ const pageNo = paginator.pageNo;
264
+ const pageType = "number";
265
+ const data = await this.getAvailableOptIns({
266
+ pageNo: pageNo,
267
+ pageSize: pageSize,
268
+ });
269
+ paginator.setPaginator({
270
+ hasNext: data.page.has_next ? true : false,
271
+ nextId: data.page.next_id,
272
+ });
273
+ return data;
274
+ };
275
+ paginator.setCallback(callback);
276
+ return paginator;
218
277
  }
219
278
 
220
279
  /**
221
280
  * @param {Object} arg - Arg object.
222
- * @param {number} arg.id - Integration id
223
- * @summary: Get integration data
224
- * @description: Get integration data
281
+ * @param {string} [arg.q] - Search text for brand name
282
+ * @returns {Promise<BrandsByCompanyResponse>} - Success response
283
+ * @summary: Get brands by company
284
+ * @description: Get brands by company
225
285
  */
226
- getIntegrationById({ id } = {}) {
227
- const { error } = ConfigurationValidator.getIntegrationById().validate(
286
+ async getBrandsByCompany({ q } = {}) {
287
+ const { error } = ConfigurationValidator.getBrandsByCompany().validate(
228
288
  {
229
- id,
289
+ q,
230
290
  },
231
291
  { abortEarly: false, allowUnknown: true }
232
292
  );
@@ -237,41 +297,65 @@ class Configuration {
237
297
  // Showing warrnings if extra unknown parameters are found
238
298
  const {
239
299
  error: warrning,
240
- } = ConfigurationValidator.getIntegrationById().validate(
300
+ } = ConfigurationValidator.getBrandsByCompany().validate(
241
301
  {
242
- id,
302
+ q,
243
303
  },
244
304
  { abortEarly: false, allowUnknown: false }
245
305
  );
246
306
  if (warrning) {
247
- console.log("Parameter Validation warrnings for getIntegrationById");
248
- console.log(warrning);
307
+ Logger({
308
+ level: "WARN",
309
+ message: "Parameter Validation warrnings for getBrandsByCompany",
310
+ });
311
+ Logger({ level: "WARN", message: warrning });
249
312
  }
250
313
 
251
314
  const query_params = {};
315
+ query_params["q"] = q;
252
316
 
253
317
  const xHeaders = {};
254
318
 
255
- return PlatformAPIClient.execute(
319
+ const response = await PlatformAPIClient.execute(
256
320
  this.config,
257
321
  "get",
258
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration/${id}`,
322
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/brands-by-companies`,
259
323
  query_params,
260
324
  undefined,
261
325
  xHeaders
262
326
  );
327
+
328
+ const {
329
+ error: res_error,
330
+ } = ConfigurationModel.BrandsByCompanyResponse().validate(response, {
331
+ abortEarly: false,
332
+ allowUnknown: false,
333
+ });
334
+
335
+ if (res_error) {
336
+ Logger({
337
+ level: "WARN",
338
+ message: "Response Validation Warnnings for getBrandsByCompany",
339
+ });
340
+ Logger({ level: "WARN", message: res_error });
341
+ }
342
+
343
+ return response;
263
344
  }
264
345
 
265
346
  /**
266
347
  * @param {Object} arg - Arg object.
267
348
  * @param {number} [arg.pageNo] - Current page no
268
349
  * @param {number} [arg.pageSize] - Current request items count
269
- * @summary: Get all available integration opt-ins
270
- * @description: Get all available integration opt-ins
350
+ * @param {CompanyByBrandsRequest} arg.body
351
+ * @returns {Promise<CompanyByBrandsResponse>} - Success response
352
+ * @summary: Get company by brand uids
353
+ * @description: Get company by brand uids
271
354
  */
272
- getAvailableOptIns({ pageNo, pageSize } = {}) {
273
- const { error } = ConfigurationValidator.getAvailableOptIns().validate(
355
+ async getCompanyByBrands({ body, pageNo, pageSize } = {}) {
356
+ const { error } = ConfigurationValidator.getCompanyByBrands().validate(
274
357
  {
358
+ body,
275
359
  pageNo,
276
360
  pageSize,
277
361
  },
@@ -284,16 +368,20 @@ class Configuration {
284
368
  // Showing warrnings if extra unknown parameters are found
285
369
  const {
286
370
  error: warrning,
287
- } = ConfigurationValidator.getAvailableOptIns().validate(
371
+ } = ConfigurationValidator.getCompanyByBrands().validate(
288
372
  {
373
+ body,
289
374
  pageNo,
290
375
  pageSize,
291
376
  },
292
377
  { abortEarly: false, allowUnknown: false }
293
378
  );
294
379
  if (warrning) {
295
- console.log("Parameter Validation warrnings for getAvailableOptIns");
296
- console.log(warrning);
380
+ Logger({
381
+ level: "WARN",
382
+ message: "Parameter Validation warrnings for getCompanyByBrands",
383
+ });
384
+ Logger({ level: "WARN", message: warrning });
297
385
  }
298
386
 
299
387
  const query_params = {};
@@ -302,29 +390,48 @@ class Configuration {
302
390
 
303
391
  const xHeaders = {};
304
392
 
305
- return PlatformAPIClient.execute(
393
+ const response = await PlatformAPIClient.execute(
306
394
  this.config,
307
- "get",
308
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/available`,
395
+ "post",
396
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/companies-by-brands`,
309
397
  query_params,
310
- undefined,
398
+ body,
311
399
  xHeaders
312
400
  );
401
+
402
+ const {
403
+ error: res_error,
404
+ } = ConfigurationModel.CompanyByBrandsResponse().validate(response, {
405
+ abortEarly: false,
406
+ allowUnknown: false,
407
+ });
408
+
409
+ if (res_error) {
410
+ Logger({
411
+ level: "WARN",
412
+ message: "Response Validation Warnnings for getCompanyByBrands",
413
+ });
414
+ Logger({ level: "WARN", message: res_error });
415
+ }
416
+
417
+ return response;
313
418
  }
314
419
 
315
420
  /**
316
421
  * @param {Object} arg - Arg object.
317
422
  * @param {number} [arg.pageSize] - Current request items count
318
- * @summary: Get all available integration opt-ins
319
- * @description: Get all available integration opt-ins
423
+ * @param {CompanyByBrandsRequest} arg.body
424
+ * @summary: Get company by brand uids
425
+ * @description: Get company by brand uids
320
426
  */
321
- getAvailableOptInsPaginator({ pageSize } = {}) {
427
+ getCompanyByBrandsPaginator({ pageSize, body } = {}) {
322
428
  const paginator = new Paginator();
323
429
  const callback = async () => {
324
430
  const pageId = paginator.nextId;
325
431
  const pageNo = paginator.pageNo;
326
432
  const pageType = "number";
327
- const data = await this.getAvailableOptIns({
433
+ const data = await this.getCompanyByBrands({
434
+ body: body,
328
435
  pageNo: pageNo,
329
436
  pageSize: pageSize,
330
437
  });
@@ -340,21 +447,13 @@ class Configuration {
340
447
 
341
448
  /**
342
449
  * @param {Object} arg - Arg object.
343
- * @param {string} arg.level - Integration level
344
- * @param {number} arg.uid - Integration level uid
345
- * @param {number} [arg.pageNo] - Current page no
346
- * @param {number} [arg.pageSize] - Current request items count
347
- * @summary: Get company/store level integration opt-ins
348
- * @description: Get company/store level integration opt-ins
450
+ * @returns {Promise<CurrenciesResponse>} - Success response
451
+ * @summary: Get all currencies
452
+ * @description: Get all currencies
349
453
  */
350
- getSelectedOptIns({ level, uid, pageNo, pageSize } = {}) {
351
- const { error } = ConfigurationValidator.getSelectedOptIns().validate(
352
- {
353
- level,
354
- uid,
355
- pageNo,
356
- pageSize,
357
- },
454
+ async getCurrencies({} = {}) {
455
+ const { error } = ConfigurationValidator.getCurrencies().validate(
456
+ {},
358
457
  { abortEarly: false, allowUnknown: true }
359
458
  );
360
459
  if (error) {
@@ -362,86 +461,60 @@ class Configuration {
362
461
  }
363
462
 
364
463
  // Showing warrnings if extra unknown parameters are found
365
- const {
366
- error: warrning,
367
- } = ConfigurationValidator.getSelectedOptIns().validate(
368
- {
369
- level,
370
- uid,
371
- pageNo,
372
- pageSize,
373
- },
464
+ const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
465
+ {},
374
466
  { abortEarly: false, allowUnknown: false }
375
467
  );
376
468
  if (warrning) {
377
- console.log("Parameter Validation warrnings for getSelectedOptIns");
378
- console.log(warrning);
469
+ Logger({
470
+ level: "WARN",
471
+ message: "Parameter Validation warrnings for getCurrencies",
472
+ });
473
+ Logger({ level: "WARN", message: warrning });
379
474
  }
380
475
 
381
476
  const query_params = {};
382
- query_params["page_no"] = pageNo;
383
- query_params["page_size"] = pageSize;
384
477
 
385
478
  const xHeaders = {};
386
479
 
387
- return PlatformAPIClient.execute(
480
+ const response = await PlatformAPIClient.execute(
388
481
  this.config,
389
482
  "get",
390
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/selected/${level}/${uid}`,
483
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/currencies`,
391
484
  query_params,
392
485
  undefined,
393
486
  xHeaders
394
487
  );
395
- }
396
488
 
397
- /**
398
- * @param {Object} arg - Arg object.
399
- * @param {string} arg.level - Integration level
400
- * @param {number} arg.uid - Integration level uid
401
- * @param {number} [arg.pageSize] - Current request items count
402
- * @summary: Get company/store level integration opt-ins
403
- * @description: Get company/store level integration opt-ins
404
- */
405
- getSelectedOptInsPaginator({ level, uid, pageSize } = {}) {
406
- const paginator = new Paginator();
407
- const callback = async () => {
408
- const pageId = paginator.nextId;
409
- const pageNo = paginator.pageNo;
410
- const pageType = "number";
411
- const data = await this.getSelectedOptIns({
412
- level: level,
413
- uid: uid,
414
- pageNo: pageNo,
415
- pageSize: pageSize,
416
- });
417
- paginator.setPaginator({
418
- hasNext: data.page.has_next ? true : false,
419
- nextId: data.page.next_id,
489
+ const {
490
+ error: res_error,
491
+ } = ConfigurationModel.CurrenciesResponse().validate(response, {
492
+ abortEarly: false,
493
+ allowUnknown: false,
494
+ });
495
+
496
+ if (res_error) {
497
+ Logger({
498
+ level: "WARN",
499
+ message: "Response Validation Warnnings for getCurrencies",
420
500
  });
421
- return data;
422
- };
423
- paginator.setCallback(callback);
424
- return paginator;
501
+ Logger({ level: "WARN", message: res_error });
502
+ }
503
+
504
+ return response;
425
505
  }
426
506
 
427
507
  /**
428
508
  * @param {Object} arg - Arg object.
429
- * @param {string} arg.id - Integration id
430
- * @param {string} arg.level - Integration level
431
- * @param {boolean} [arg.opted] - Filter on opted stores
432
- * @param {boolean} [arg.checkPermission] - Filter on if permissions are present
433
- * @summary: Get integration level config
434
- * @description: Get integration/integration-opt-in level config
509
+ * @param {DomainSuggestionsRequest} arg.body
510
+ * @returns {Promise<DomainSuggestionsResponse>} - Success response
511
+ * @summary: Check domain availibility before linking to application
512
+ * @description: Check domain availibility before linking to application. Also sends domain suggestions with similar to queried domain. \ Custom domain search is currently powered by GoDaddy provider.
435
513
  */
436
- getIntegrationLevelConfig({ id, level, opted, checkPermission } = {}) {
437
- const {
438
- error,
439
- } = ConfigurationValidator.getIntegrationLevelConfig().validate(
514
+ async getDomainAvailibility({ body } = {}) {
515
+ const { error } = ConfigurationValidator.getDomainAvailibility().validate(
440
516
  {
441
- id,
442
- level,
443
- opted,
444
- checkPermission,
517
+ body,
445
518
  },
446
519
  { abortEarly: false, allowUnknown: true }
447
520
  );
@@ -452,52 +525,62 @@ class Configuration {
452
525
  // Showing warrnings if extra unknown parameters are found
453
526
  const {
454
527
  error: warrning,
455
- } = ConfigurationValidator.getIntegrationLevelConfig().validate(
528
+ } = ConfigurationValidator.getDomainAvailibility().validate(
456
529
  {
457
- id,
458
- level,
459
- opted,
460
- checkPermission,
530
+ body,
461
531
  },
462
532
  { abortEarly: false, allowUnknown: false }
463
533
  );
464
534
  if (warrning) {
465
- console.log(
466
- "Parameter Validation warrnings for getIntegrationLevelConfig"
467
- );
468
- console.log(warrning);
535
+ Logger({
536
+ level: "WARN",
537
+ message: "Parameter Validation warrnings for getDomainAvailibility",
538
+ });
539
+ Logger({ level: "WARN", message: warrning });
469
540
  }
470
541
 
471
542
  const query_params = {};
472
- query_params["opted"] = opted;
473
- query_params["check_permission"] = checkPermission;
474
543
 
475
544
  const xHeaders = {};
476
545
 
477
- return PlatformAPIClient.execute(
546
+ const response = await PlatformAPIClient.execute(
478
547
  this.config,
479
- "get",
480
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
548
+ "post",
549
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/domain/suggestions`,
481
550
  query_params,
482
- undefined,
551
+ body,
483
552
  xHeaders
484
553
  );
554
+
555
+ const {
556
+ error: res_error,
557
+ } = ConfigurationModel.DomainSuggestionsResponse().validate(response, {
558
+ abortEarly: false,
559
+ allowUnknown: false,
560
+ });
561
+
562
+ if (res_error) {
563
+ Logger({
564
+ level: "WARN",
565
+ message: "Response Validation Warnnings for getDomainAvailibility",
566
+ });
567
+ Logger({ level: "WARN", message: res_error });
568
+ }
569
+
570
+ return response;
485
571
  }
486
572
 
487
573
  /**
488
574
  * @param {Object} arg - Arg object.
489
- * @param {string} arg.id - Integration id
490
- * @param {string} arg.level - Integration level
491
- * @param {UpdateIntegrationLevelRequest} arg.body
492
- * @summary: Update a store level opt-in for integration
493
- * @description: Update a store level opt-in for integration
575
+ * @param {number} arg.id - Integration id
576
+ * @returns {Promise<Integration>} - Success response
577
+ * @summary: Get integration data
578
+ * @description: Get integration data
494
579
  */
495
- updateLevelIntegration({ id, level, body } = {}) {
496
- const { error } = ConfigurationValidator.updateLevelIntegration().validate(
580
+ async getIntegrationById({ id } = {}) {
581
+ const { error } = ConfigurationValidator.getIntegrationById().validate(
497
582
  {
498
583
  id,
499
- level,
500
- body,
501
584
  },
502
585
  { abortEarly: false, allowUnknown: true }
503
586
  );
@@ -508,31 +591,49 @@ class Configuration {
508
591
  // Showing warrnings if extra unknown parameters are found
509
592
  const {
510
593
  error: warrning,
511
- } = ConfigurationValidator.updateLevelIntegration().validate(
594
+ } = ConfigurationValidator.getIntegrationById().validate(
512
595
  {
513
596
  id,
514
- level,
515
- body,
516
597
  },
517
598
  { abortEarly: false, allowUnknown: false }
518
599
  );
519
600
  if (warrning) {
520
- console.log("Parameter Validation warrnings for updateLevelIntegration");
521
- console.log(warrning);
601
+ Logger({
602
+ level: "WARN",
603
+ message: "Parameter Validation warrnings for getIntegrationById",
604
+ });
605
+ Logger({ level: "WARN", message: warrning });
522
606
  }
523
607
 
524
608
  const query_params = {};
525
609
 
526
610
  const xHeaders = {};
527
611
 
528
- return PlatformAPIClient.execute(
612
+ const response = await PlatformAPIClient.execute(
529
613
  this.config,
530
- "put",
531
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
614
+ "get",
615
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration/${id}`,
532
616
  query_params,
533
- body,
617
+ undefined,
534
618
  xHeaders
535
619
  );
620
+
621
+ const {
622
+ error: res_error,
623
+ } = ConfigurationModel.Integration().validate(response, {
624
+ abortEarly: false,
625
+ allowUnknown: false,
626
+ });
627
+
628
+ if (res_error) {
629
+ Logger({
630
+ level: "WARN",
631
+ message: "Response Validation Warnnings for getIntegrationById",
632
+ });
633
+ Logger({ level: "WARN", message: res_error });
634
+ }
635
+
636
+ return response;
536
637
  }
537
638
 
538
639
  /**
@@ -540,10 +641,11 @@ class Configuration {
540
641
  * @param {string} arg.id - Integration id
541
642
  * @param {string} arg.level - Integration level
542
643
  * @param {number} arg.uid - Integration level uid
644
+ * @returns {Promise<IntegrationLevel>} - Success response
543
645
  * @summary: Get level data for integration
544
646
  * @description: Get level data for integration
545
647
  */
546
- getIntegrationByLevelId({ id, level, uid } = {}) {
648
+ async getIntegrationByLevelId({ id, level, uid } = {}) {
547
649
  const { error } = ConfigurationValidator.getIntegrationByLevelId().validate(
548
650
  {
549
651
  id,
@@ -568,15 +670,18 @@ class Configuration {
568
670
  { abortEarly: false, allowUnknown: false }
569
671
  );
570
672
  if (warrning) {
571
- console.log("Parameter Validation warrnings for getIntegrationByLevelId");
572
- console.log(warrning);
673
+ Logger({
674
+ level: "WARN",
675
+ message: "Parameter Validation warrnings for getIntegrationByLevelId",
676
+ });
677
+ Logger({ level: "WARN", message: warrning });
573
678
  }
574
679
 
575
680
  const query_params = {};
576
681
 
577
682
  const xHeaders = {};
578
683
 
579
- return PlatformAPIClient.execute(
684
+ const response = await PlatformAPIClient.execute(
580
685
  this.config,
581
686
  "get",
582
687
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
@@ -584,26 +689,44 @@ class Configuration {
584
689
  undefined,
585
690
  xHeaders
586
691
  );
692
+
693
+ const {
694
+ error: res_error,
695
+ } = ConfigurationModel.IntegrationLevel().validate(response, {
696
+ abortEarly: false,
697
+ allowUnknown: false,
698
+ });
699
+
700
+ if (res_error) {
701
+ Logger({
702
+ level: "WARN",
703
+ message: "Response Validation Warnnings for getIntegrationByLevelId",
704
+ });
705
+ Logger({ level: "WARN", message: res_error });
706
+ }
707
+
708
+ return response;
587
709
  }
588
710
 
589
711
  /**
590
712
  * @param {Object} arg - Arg object.
591
713
  * @param {string} arg.id - Integration id
592
714
  * @param {string} arg.level - Integration level
593
- * @param {number} arg.uid - Integration level uid
594
- * @param {IntegrationLevel} arg.body
595
- * @summary: Update a store level opt-in for integration
596
- * @description: Update a store level opt-in for integration
715
+ * @param {boolean} [arg.opted] - Filter on opted stores
716
+ * @param {boolean} [arg.checkPermission] - Filter on if permissions are present
717
+ * @returns {Promise<IntegrationConfigResponse>} - Success response
718
+ * @summary: Get integration level config
719
+ * @description: Get integration/integration-opt-in level config
597
720
  */
598
- updateLevelUidIntegration({ id, level, uid, body } = {}) {
721
+ async getIntegrationLevelConfig({ id, level, opted, checkPermission } = {}) {
599
722
  const {
600
723
  error,
601
- } = ConfigurationValidator.updateLevelUidIntegration().validate(
724
+ } = ConfigurationValidator.getIntegrationLevelConfig().validate(
602
725
  {
603
726
  id,
604
727
  level,
605
- uid,
606
- body,
728
+ opted,
729
+ checkPermission,
607
730
  },
608
731
  { abortEarly: false, allowUnknown: true }
609
732
  );
@@ -614,34 +737,54 @@ class Configuration {
614
737
  // Showing warrnings if extra unknown parameters are found
615
738
  const {
616
739
  error: warrning,
617
- } = ConfigurationValidator.updateLevelUidIntegration().validate(
740
+ } = ConfigurationValidator.getIntegrationLevelConfig().validate(
618
741
  {
619
742
  id,
620
743
  level,
621
- uid,
622
- body,
744
+ opted,
745
+ checkPermission,
623
746
  },
624
747
  { abortEarly: false, allowUnknown: false }
625
748
  );
626
749
  if (warrning) {
627
- console.log(
628
- "Parameter Validation warrnings for updateLevelUidIntegration"
629
- );
630
- console.log(warrning);
750
+ Logger({
751
+ level: "WARN",
752
+ message: "Parameter Validation warrnings for getIntegrationLevelConfig",
753
+ });
754
+ Logger({ level: "WARN", message: warrning });
631
755
  }
632
756
 
633
757
  const query_params = {};
758
+ query_params["opted"] = opted;
759
+ query_params["check_permission"] = checkPermission;
634
760
 
635
761
  const xHeaders = {};
636
762
 
637
- return PlatformAPIClient.execute(
763
+ const response = await PlatformAPIClient.execute(
638
764
  this.config,
639
- "put",
640
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
765
+ "get",
766
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
641
767
  query_params,
642
- body,
768
+ undefined,
643
769
  xHeaders
644
770
  );
771
+
772
+ const {
773
+ error: res_error,
774
+ } = ConfigurationModel.IntegrationConfigResponse().validate(response, {
775
+ abortEarly: false,
776
+ allowUnknown: false,
777
+ });
778
+
779
+ if (res_error) {
780
+ Logger({
781
+ level: "WARN",
782
+ message: "Response Validation Warnnings for getIntegrationLevelConfig",
783
+ });
784
+ Logger({ level: "WARN", message: res_error });
785
+ }
786
+
787
+ return response;
645
788
  }
646
789
 
647
790
  /**
@@ -649,10 +792,11 @@ class Configuration {
649
792
  * @param {string} arg.id - Integration id
650
793
  * @param {string} arg.level - Integration level
651
794
  * @param {number} arg.uid - Integration level uid
795
+ * @returns {Promise<OptedStoreIntegration>} - Success response
652
796
  * @summary: Check store has active integration
653
797
  * @description: API checks if a store is already opted in any other integrations
654
798
  */
655
- getLevelActiveIntegrations({ id, level, uid } = {}) {
799
+ async getLevelActiveIntegrations({ id, level, uid } = {}) {
656
800
  const {
657
801
  error,
658
802
  } = ConfigurationValidator.getLevelActiveIntegrations().validate(
@@ -679,17 +823,19 @@ class Configuration {
679
823
  { abortEarly: false, allowUnknown: false }
680
824
  );
681
825
  if (warrning) {
682
- console.log(
683
- "Parameter Validation warrnings for getLevelActiveIntegrations"
684
- );
685
- console.log(warrning);
826
+ Logger({
827
+ level: "WARN",
828
+ message:
829
+ "Parameter Validation warrnings for getLevelActiveIntegrations",
830
+ });
831
+ Logger({ level: "WARN", message: warrning });
686
832
  }
687
833
 
688
834
  const query_params = {};
689
835
 
690
836
  const xHeaders = {};
691
837
 
692
- return PlatformAPIClient.execute(
838
+ const response = await PlatformAPIClient.execute(
693
839
  this.config,
694
840
  "get",
695
841
  `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/check/configuration/${id}/${level}/${uid}`,
@@ -697,18 +843,38 @@ class Configuration {
697
843
  undefined,
698
844
  xHeaders
699
845
  );
846
+
847
+ const {
848
+ error: res_error,
849
+ } = ConfigurationModel.OptedStoreIntegration().validate(response, {
850
+ abortEarly: false,
851
+ allowUnknown: false,
852
+ });
853
+
854
+ if (res_error) {
855
+ Logger({
856
+ level: "WARN",
857
+ message: "Response Validation Warnnings for getLevelActiveIntegrations",
858
+ });
859
+ Logger({ level: "WARN", message: res_error });
860
+ }
861
+
862
+ return response;
700
863
  }
701
864
 
702
865
  /**
703
866
  * @param {Object} arg - Arg object.
704
- * @param {string} [arg.q] - Search text for brand name
705
- * @summary: Get brands by company
706
- * @description: Get brands by company
867
+ * @param {string} arg.id - Application Id
868
+ * @returns {Promise<OptedApplicationResponse>} - Success response
869
+ * @summary: Get other seller applications
870
+ * @description: Get other seller application
707
871
  */
708
- getBrandsByCompany({ q } = {}) {
709
- const { error } = ConfigurationValidator.getBrandsByCompany().validate(
872
+ async getOtherSellerApplicationById({ id } = {}) {
873
+ const {
874
+ error,
875
+ } = ConfigurationValidator.getOtherSellerApplicationById().validate(
710
876
  {
711
- q,
877
+ id,
712
878
  },
713
879
  { abortEarly: false, allowUnknown: true }
714
880
  );
@@ -719,44 +885,66 @@ class Configuration {
719
885
  // Showing warrnings if extra unknown parameters are found
720
886
  const {
721
887
  error: warrning,
722
- } = ConfigurationValidator.getBrandsByCompany().validate(
888
+ } = ConfigurationValidator.getOtherSellerApplicationById().validate(
723
889
  {
724
- q,
890
+ id,
725
891
  },
726
892
  { abortEarly: false, allowUnknown: false }
727
893
  );
728
894
  if (warrning) {
729
- console.log("Parameter Validation warrnings for getBrandsByCompany");
730
- console.log(warrning);
895
+ Logger({
896
+ level: "WARN",
897
+ message:
898
+ "Parameter Validation warrnings for getOtherSellerApplicationById",
899
+ });
900
+ Logger({ level: "WARN", message: warrning });
731
901
  }
732
902
 
733
903
  const query_params = {};
734
- query_params["q"] = q;
735
904
 
736
905
  const xHeaders = {};
737
906
 
738
- return PlatformAPIClient.execute(
907
+ const response = await PlatformAPIClient.execute(
739
908
  this.config,
740
909
  "get",
741
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/brands-by-companies`,
910
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
742
911
  query_params,
743
912
  undefined,
744
913
  xHeaders
745
914
  );
915
+
916
+ const {
917
+ error: res_error,
918
+ } = ConfigurationModel.OptedApplicationResponse().validate(response, {
919
+ abortEarly: false,
920
+ allowUnknown: false,
921
+ });
922
+
923
+ if (res_error) {
924
+ Logger({
925
+ level: "WARN",
926
+ message:
927
+ "Response Validation Warnnings for getOtherSellerApplicationById",
928
+ });
929
+ Logger({ level: "WARN", message: res_error });
930
+ }
931
+
932
+ return response;
746
933
  }
747
934
 
748
935
  /**
749
936
  * @param {Object} arg - Arg object.
750
937
  * @param {number} [arg.pageNo] - Current page no
751
938
  * @param {number} [arg.pageSize] - Current request items count
752
- * @param {CompanyByBrandsRequest} arg.body
753
- * @summary: Get company by brand uids
754
- * @description: Get company by brand uids
939
+ * @returns {Promise<OtherSellerApplications>} - Success response
940
+ * @summary: Get other seller applications
941
+ * @description: Get other seller applications who has opted current company as inventory
755
942
  */
756
- getCompanyByBrands({ body, pageNo, pageSize } = {}) {
757
- const { error } = ConfigurationValidator.getCompanyByBrands().validate(
943
+ async getOtherSellerApplications({ pageNo, pageSize } = {}) {
944
+ const {
945
+ error,
946
+ } = ConfigurationValidator.getOtherSellerApplications().validate(
758
947
  {
759
- body,
760
948
  pageNo,
761
949
  pageSize,
762
950
  },
@@ -769,17 +957,20 @@ class Configuration {
769
957
  // Showing warrnings if extra unknown parameters are found
770
958
  const {
771
959
  error: warrning,
772
- } = ConfigurationValidator.getCompanyByBrands().validate(
960
+ } = ConfigurationValidator.getOtherSellerApplications().validate(
773
961
  {
774
- body,
775
962
  pageNo,
776
963
  pageSize,
777
964
  },
778
965
  { abortEarly: false, allowUnknown: false }
779
966
  );
780
967
  if (warrning) {
781
- console.log("Parameter Validation warrnings for getCompanyByBrands");
782
- console.log(warrning);
968
+ Logger({
969
+ level: "WARN",
970
+ message:
971
+ "Parameter Validation warrnings for getOtherSellerApplications",
972
+ });
973
+ Logger({ level: "WARN", message: warrning });
783
974
  }
784
975
 
785
976
  const query_params = {};
@@ -788,31 +979,46 @@ class Configuration {
788
979
 
789
980
  const xHeaders = {};
790
981
 
791
- return PlatformAPIClient.execute(
982
+ const response = await PlatformAPIClient.execute(
792
983
  this.config,
793
- "post",
794
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/companies-by-brands`,
984
+ "get",
985
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/`,
795
986
  query_params,
796
- body,
987
+ undefined,
797
988
  xHeaders
798
989
  );
990
+
991
+ const {
992
+ error: res_error,
993
+ } = ConfigurationModel.OtherSellerApplications().validate(response, {
994
+ abortEarly: false,
995
+ allowUnknown: false,
996
+ });
997
+
998
+ if (res_error) {
999
+ Logger({
1000
+ level: "WARN",
1001
+ message: "Response Validation Warnnings for getOtherSellerApplications",
1002
+ });
1003
+ Logger({ level: "WARN", message: res_error });
1004
+ }
1005
+
1006
+ return response;
799
1007
  }
800
1008
 
801
1009
  /**
802
1010
  * @param {Object} arg - Arg object.
803
1011
  * @param {number} [arg.pageSize] - Current request items count
804
- * @param {CompanyByBrandsRequest} arg.body
805
- * @summary: Get company by brand uids
806
- * @description: Get company by brand uids
1012
+ * @summary: Get other seller applications
1013
+ * @description: Get other seller applications who has opted current company as inventory
807
1014
  */
808
- getCompanyByBrandsPaginator({ pageSize, body } = {}) {
1015
+ getOtherSellerApplicationsPaginator({ pageSize } = {}) {
809
1016
  const paginator = new Paginator();
810
1017
  const callback = async () => {
811
1018
  const pageId = paginator.nextId;
812
1019
  const pageNo = paginator.pageNo;
813
1020
  const pageType = "number";
814
- const data = await this.getCompanyByBrands({
815
- body: body,
1021
+ const data = await this.getOtherSellerApplications({
816
1022
  pageNo: pageNo,
817
1023
  pageSize: pageSize,
818
1024
  });
@@ -828,16 +1034,19 @@ class Configuration {
828
1034
 
829
1035
  /**
830
1036
  * @param {Object} arg - Arg object.
1037
+ * @param {string} arg.level - Integration level
1038
+ * @param {number} arg.uid - Integration level uid
831
1039
  * @param {number} [arg.pageNo] - Current page no
832
1040
  * @param {number} [arg.pageSize] - Current request items count
833
- * @param {StoreByBrandsRequest} arg.body
834
- * @summary: Get stores by brand uids
835
- * @description: Get stores by brand uids
1041
+ * @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
1042
+ * @summary: Get company/store level integration opt-ins
1043
+ * @description: Get company/store level integration opt-ins
836
1044
  */
837
- getStoreByBrands({ body, pageNo, pageSize } = {}) {
838
- const { error } = ConfigurationValidator.getStoreByBrands().validate(
1045
+ async getSelectedOptIns({ level, uid, pageNo, pageSize } = {}) {
1046
+ const { error } = ConfigurationValidator.getSelectedOptIns().validate(
839
1047
  {
840
- body,
1048
+ level,
1049
+ uid,
841
1050
  pageNo,
842
1051
  pageSize,
843
1052
  },
@@ -850,17 +1059,21 @@ class Configuration {
850
1059
  // Showing warrnings if extra unknown parameters are found
851
1060
  const {
852
1061
  error: warrning,
853
- } = ConfigurationValidator.getStoreByBrands().validate(
1062
+ } = ConfigurationValidator.getSelectedOptIns().validate(
854
1063
  {
855
- body,
1064
+ level,
1065
+ uid,
856
1066
  pageNo,
857
1067
  pageSize,
858
1068
  },
859
1069
  { abortEarly: false, allowUnknown: false }
860
1070
  );
861
1071
  if (warrning) {
862
- console.log("Parameter Validation warrnings for getStoreByBrands");
863
- console.log(warrning);
1072
+ Logger({
1073
+ level: "WARN",
1074
+ message: "Parameter Validation warrnings for getSelectedOptIns",
1075
+ });
1076
+ Logger({ level: "WARN", message: warrning });
864
1077
  }
865
1078
 
866
1079
  const query_params = {};
@@ -869,31 +1082,50 @@ class Configuration {
869
1082
 
870
1083
  const xHeaders = {};
871
1084
 
872
- return PlatformAPIClient.execute(
1085
+ const response = await PlatformAPIClient.execute(
873
1086
  this.config,
874
- "post",
875
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/stores-by-brands`,
1087
+ "get",
1088
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/selected/${level}/${uid}`,
876
1089
  query_params,
877
- body,
1090
+ undefined,
878
1091
  xHeaders
879
1092
  );
1093
+
1094
+ const {
1095
+ error: res_error,
1096
+ } = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
1097
+ abortEarly: false,
1098
+ allowUnknown: false,
1099
+ });
1100
+
1101
+ if (res_error) {
1102
+ Logger({
1103
+ level: "WARN",
1104
+ message: "Response Validation Warnnings for getSelectedOptIns",
1105
+ });
1106
+ Logger({ level: "WARN", message: res_error });
1107
+ }
1108
+
1109
+ return response;
880
1110
  }
881
1111
 
882
1112
  /**
883
1113
  * @param {Object} arg - Arg object.
1114
+ * @param {string} arg.level - Integration level
1115
+ * @param {number} arg.uid - Integration level uid
884
1116
  * @param {number} [arg.pageSize] - Current request items count
885
- * @param {StoreByBrandsRequest} arg.body
886
- * @summary: Get stores by brand uids
887
- * @description: Get stores by brand uids
1117
+ * @summary: Get company/store level integration opt-ins
1118
+ * @description: Get company/store level integration opt-ins
888
1119
  */
889
- getStoreByBrandsPaginator({ pageSize, body } = {}) {
1120
+ getSelectedOptInsPaginator({ level, uid, pageSize } = {}) {
890
1121
  const paginator = new Paginator();
891
1122
  const callback = async () => {
892
1123
  const pageId = paginator.nextId;
893
1124
  const pageNo = paginator.pageNo;
894
1125
  const pageType = "number";
895
- const data = await this.getStoreByBrands({
896
- body: body,
1126
+ const data = await this.getSelectedOptIns({
1127
+ level: level,
1128
+ uid: uid,
897
1129
  pageNo: pageNo,
898
1130
  pageSize: pageSize,
899
1131
  });
@@ -911,14 +1143,15 @@ class Configuration {
911
1143
  * @param {Object} arg - Arg object.
912
1144
  * @param {number} [arg.pageNo] - Current page no
913
1145
  * @param {number} [arg.pageSize] - Current request items count
914
- * @summary: Get other seller applications
915
- * @description: Get other seller applications who has opted current company as inventory
1146
+ * @param {StoreByBrandsRequest} arg.body
1147
+ * @returns {Promise<StoreByBrandsResponse>} - Success response
1148
+ * @summary: Get stores by brand uids
1149
+ * @description: Get stores by brand uids
916
1150
  */
917
- getOtherSellerApplications({ pageNo, pageSize } = {}) {
918
- const {
919
- error,
920
- } = ConfigurationValidator.getOtherSellerApplications().validate(
1151
+ async getStoreByBrands({ body, pageNo, pageSize } = {}) {
1152
+ const { error } = ConfigurationValidator.getStoreByBrands().validate(
921
1153
  {
1154
+ body,
922
1155
  pageNo,
923
1156
  pageSize,
924
1157
  },
@@ -931,18 +1164,20 @@ class Configuration {
931
1164
  // Showing warrnings if extra unknown parameters are found
932
1165
  const {
933
1166
  error: warrning,
934
- } = ConfigurationValidator.getOtherSellerApplications().validate(
1167
+ } = ConfigurationValidator.getStoreByBrands().validate(
935
1168
  {
1169
+ body,
936
1170
  pageNo,
937
1171
  pageSize,
938
1172
  },
939
1173
  { abortEarly: false, allowUnknown: false }
940
1174
  );
941
1175
  if (warrning) {
942
- console.log(
943
- "Parameter Validation warrnings for getOtherSellerApplications"
944
- );
945
- console.log(warrning);
1176
+ Logger({
1177
+ level: "WARN",
1178
+ message: "Parameter Validation warrnings for getStoreByBrands",
1179
+ });
1180
+ Logger({ level: "WARN", message: warrning });
946
1181
  }
947
1182
 
948
1183
  const query_params = {};
@@ -951,29 +1186,48 @@ class Configuration {
951
1186
 
952
1187
  const xHeaders = {};
953
1188
 
954
- return PlatformAPIClient.execute(
1189
+ const response = await PlatformAPIClient.execute(
955
1190
  this.config,
956
- "get",
957
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/`,
1191
+ "post",
1192
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/stores-by-brands`,
958
1193
  query_params,
959
- undefined,
1194
+ body,
960
1195
  xHeaders
961
1196
  );
1197
+
1198
+ const {
1199
+ error: res_error,
1200
+ } = ConfigurationModel.StoreByBrandsResponse().validate(response, {
1201
+ abortEarly: false,
1202
+ allowUnknown: false,
1203
+ });
1204
+
1205
+ if (res_error) {
1206
+ Logger({
1207
+ level: "WARN",
1208
+ message: "Response Validation Warnnings for getStoreByBrands",
1209
+ });
1210
+ Logger({ level: "WARN", message: res_error });
1211
+ }
1212
+
1213
+ return response;
962
1214
  }
963
1215
 
964
1216
  /**
965
1217
  * @param {Object} arg - Arg object.
966
1218
  * @param {number} [arg.pageSize] - Current request items count
967
- * @summary: Get other seller applications
968
- * @description: Get other seller applications who has opted current company as inventory
1219
+ * @param {StoreByBrandsRequest} arg.body
1220
+ * @summary: Get stores by brand uids
1221
+ * @description: Get stores by brand uids
969
1222
  */
970
- getOtherSellerApplicationsPaginator({ pageSize } = {}) {
1223
+ getStoreByBrandsPaginator({ pageSize, body } = {}) {
971
1224
  const paginator = new Paginator();
972
1225
  const callback = async () => {
973
1226
  const pageId = paginator.nextId;
974
1227
  const pageNo = paginator.pageNo;
975
1228
  const pageType = "number";
976
- const data = await this.getOtherSellerApplications({
1229
+ const data = await this.getStoreByBrands({
1230
+ body: body,
977
1231
  pageNo: pageNo,
978
1232
  pageSize: pageSize,
979
1233
  });
@@ -990,15 +1244,87 @@ class Configuration {
990
1244
  /**
991
1245
  * @param {Object} arg - Arg object.
992
1246
  * @param {string} arg.id - Application Id
993
- * @summary: Get other seller applications
994
- * @description: Get other seller application
1247
+ * @param {OptOutInventory} arg.body
1248
+ * @returns {Promise<SuccessMessageResponse>} - Success response
1249
+ * @summary: Opt out company or store from other seller application
1250
+ * @description: Opt out company or store from other seller application
995
1251
  */
996
- getOtherSellerApplicationById({ id } = {}) {
1252
+ async optOutFromApplication({ id, body } = {}) {
1253
+ const { error } = ConfigurationValidator.optOutFromApplication().validate(
1254
+ {
1255
+ id,
1256
+ body,
1257
+ },
1258
+ { abortEarly: false, allowUnknown: true }
1259
+ );
1260
+ if (error) {
1261
+ return Promise.reject(new FDKClientValidationError(error));
1262
+ }
1263
+
1264
+ // Showing warrnings if extra unknown parameters are found
997
1265
  const {
998
- error,
999
- } = ConfigurationValidator.getOtherSellerApplicationById().validate(
1266
+ error: warrning,
1267
+ } = ConfigurationValidator.optOutFromApplication().validate(
1268
+ {
1269
+ id,
1270
+ body,
1271
+ },
1272
+ { abortEarly: false, allowUnknown: false }
1273
+ );
1274
+ if (warrning) {
1275
+ Logger({
1276
+ level: "WARN",
1277
+ message: "Parameter Validation warrnings for optOutFromApplication",
1278
+ });
1279
+ Logger({ level: "WARN", message: warrning });
1280
+ }
1281
+
1282
+ const query_params = {};
1283
+
1284
+ const xHeaders = {};
1285
+
1286
+ const response = await PlatformAPIClient.execute(
1287
+ this.config,
1288
+ "put",
1289
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
1290
+ query_params,
1291
+ body,
1292
+ xHeaders
1293
+ );
1294
+
1295
+ const {
1296
+ error: res_error,
1297
+ } = ConfigurationModel.SuccessMessageResponse().validate(response, {
1298
+ abortEarly: false,
1299
+ allowUnknown: false,
1300
+ });
1301
+
1302
+ if (res_error) {
1303
+ Logger({
1304
+ level: "WARN",
1305
+ message: "Response Validation Warnnings for optOutFromApplication",
1306
+ });
1307
+ Logger({ level: "WARN", message: res_error });
1308
+ }
1309
+
1310
+ return response;
1311
+ }
1312
+
1313
+ /**
1314
+ * @param {Object} arg - Arg object.
1315
+ * @param {string} arg.id - Integration id
1316
+ * @param {string} arg.level - Integration level
1317
+ * @param {UpdateIntegrationLevelRequest} arg.body
1318
+ * @returns {Promise<IntegrationLevel>} - Success response
1319
+ * @summary: Update a store level opt-in for integration
1320
+ * @description: Update a store level opt-in for integration
1321
+ */
1322
+ async updateLevelIntegration({ id, level, body } = {}) {
1323
+ const { error } = ConfigurationValidator.updateLevelIntegration().validate(
1000
1324
  {
1001
1325
  id,
1326
+ level,
1327
+ body,
1002
1328
  },
1003
1329
  { abortEarly: false, allowUnknown: true }
1004
1330
  );
@@ -1009,44 +1335,71 @@ class Configuration {
1009
1335
  // Showing warrnings if extra unknown parameters are found
1010
1336
  const {
1011
1337
  error: warrning,
1012
- } = ConfigurationValidator.getOtherSellerApplicationById().validate(
1338
+ } = ConfigurationValidator.updateLevelIntegration().validate(
1013
1339
  {
1014
1340
  id,
1341
+ level,
1342
+ body,
1015
1343
  },
1016
1344
  { abortEarly: false, allowUnknown: false }
1017
1345
  );
1018
1346
  if (warrning) {
1019
- console.log(
1020
- "Parameter Validation warrnings for getOtherSellerApplicationById"
1021
- );
1022
- console.log(warrning);
1347
+ Logger({
1348
+ level: "WARN",
1349
+ message: "Parameter Validation warrnings for updateLevelIntegration",
1350
+ });
1351
+ Logger({ level: "WARN", message: warrning });
1023
1352
  }
1024
1353
 
1025
1354
  const query_params = {};
1026
1355
 
1027
1356
  const xHeaders = {};
1028
1357
 
1029
- return PlatformAPIClient.execute(
1358
+ const response = await PlatformAPIClient.execute(
1030
1359
  this.config,
1031
- "get",
1032
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
1360
+ "put",
1361
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
1033
1362
  query_params,
1034
- undefined,
1363
+ body,
1035
1364
  xHeaders
1036
1365
  );
1366
+
1367
+ const {
1368
+ error: res_error,
1369
+ } = ConfigurationModel.IntegrationLevel().validate(response, {
1370
+ abortEarly: false,
1371
+ allowUnknown: false,
1372
+ });
1373
+
1374
+ if (res_error) {
1375
+ Logger({
1376
+ level: "WARN",
1377
+ message: "Response Validation Warnnings for updateLevelIntegration",
1378
+ });
1379
+ Logger({ level: "WARN", message: res_error });
1380
+ }
1381
+
1382
+ return response;
1037
1383
  }
1038
1384
 
1039
1385
  /**
1040
1386
  * @param {Object} arg - Arg object.
1041
- * @param {string} arg.id - Application Id
1042
- * @param {OptOutInventory} arg.body
1043
- * @summary: Opt out company or store from other seller application
1044
- * @description: Opt out company or store from other seller application
1387
+ * @param {string} arg.id - Integration id
1388
+ * @param {string} arg.level - Integration level
1389
+ * @param {number} arg.uid - Integration level uid
1390
+ * @param {IntegrationLevel} arg.body
1391
+ * @returns {Promise<IntegrationLevel>} - Success response
1392
+ * @summary: Update a store level opt-in for integration
1393
+ * @description: Update a store level opt-in for integration
1045
1394
  */
1046
- optOutFromApplication({ id, body } = {}) {
1047
- const { error } = ConfigurationValidator.optOutFromApplication().validate(
1395
+ async updateLevelUidIntegration({ id, level, uid, body } = {}) {
1396
+ const {
1397
+ error,
1398
+ } = ConfigurationValidator.updateLevelUidIntegration().validate(
1048
1399
  {
1049
1400
  id,
1401
+ level,
1402
+ uid,
1050
1403
  body,
1051
1404
  },
1052
1405
  { abortEarly: false, allowUnknown: true }
@@ -1058,30 +1411,52 @@ class Configuration {
1058
1411
  // Showing warrnings if extra unknown parameters are found
1059
1412
  const {
1060
1413
  error: warrning,
1061
- } = ConfigurationValidator.optOutFromApplication().validate(
1414
+ } = ConfigurationValidator.updateLevelUidIntegration().validate(
1062
1415
  {
1063
1416
  id,
1417
+ level,
1418
+ uid,
1064
1419
  body,
1065
1420
  },
1066
1421
  { abortEarly: false, allowUnknown: false }
1067
1422
  );
1068
1423
  if (warrning) {
1069
- console.log("Parameter Validation warrnings for optOutFromApplication");
1070
- console.log(warrning);
1424
+ Logger({
1425
+ level: "WARN",
1426
+ message: "Parameter Validation warrnings for updateLevelUidIntegration",
1427
+ });
1428
+ Logger({ level: "WARN", message: warrning });
1071
1429
  }
1072
1430
 
1073
1431
  const query_params = {};
1074
1432
 
1075
1433
  const xHeaders = {};
1076
1434
 
1077
- return PlatformAPIClient.execute(
1435
+ const response = await PlatformAPIClient.execute(
1078
1436
  this.config,
1079
1437
  "put",
1080
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
1438
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
1081
1439
  query_params,
1082
1440
  body,
1083
1441
  xHeaders
1084
1442
  );
1443
+
1444
+ const {
1445
+ error: res_error,
1446
+ } = ConfigurationModel.IntegrationLevel().validate(response, {
1447
+ abortEarly: false,
1448
+ allowUnknown: false,
1449
+ });
1450
+
1451
+ if (res_error) {
1452
+ Logger({
1453
+ level: "WARN",
1454
+ message: "Response Validation Warnnings for updateLevelUidIntegration",
1455
+ });
1456
+ Logger({ level: "WARN", message: res_error });
1457
+ }
1458
+
1459
+ return response;
1085
1460
  }
1086
1461
  }
1087
1462