@gofynd/fdk-client-javascript 1.0.2 → 1.0.4

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 (346) hide show
  1. package/README.md +31 -2
  2. package/index.d.ts +4 -4
  3. package/index.js +9 -10
  4. package/package.json +14 -14
  5. package/sdk/APIClient.d.ts +11 -0
  6. package/sdk/APIClient.js +35 -0
  7. package/sdk/Client.d.ts +6 -0
  8. package/sdk/Client.js +17 -0
  9. package/sdk/Config.d.ts +9 -0
  10. package/sdk/Config.js +17 -0
  11. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  12. package/sdk/application/Cart/CartApplicationClient.js +595 -594
  13. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  14. package/sdk/application/Cart/CartApplicationModel.js +490 -885
  15. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  16. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  17. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  18. package/sdk/application/Catalog/CatalogApplicationClient.js +1079 -1078
  19. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  20. package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
  21. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  22. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  23. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  24. package/sdk/application/Common/CommonApplicationClient.js +43 -42
  25. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  26. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  27. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  28. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  29. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  30. package/sdk/application/Communication/CommunicationApplicationClient.js +32 -31
  31. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  32. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  33. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  34. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.js +350 -349
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  41. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  42. package/sdk/application/Content/ContentApplicationClient.js +216 -215
  43. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
  44. package/sdk/application/Content/ContentApplicationModel.js +468 -884
  45. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  46. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.js +65 -64
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  53. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  54. package/sdk/application/Lead/LeadApplicationClient.js +109 -108
  55. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  56. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  57. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  58. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  59. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +31 -22
  60. package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
  61. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  62. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  63. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  64. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -9
  65. package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
  66. package/sdk/application/Order/OrderApplicationClient.js +247 -246
  67. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  68. package/sdk/application/Order/OrderApplicationModel.js +361 -656
  69. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  70. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  71. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  72. package/sdk/application/Payment/PaymentApplicationClient.js +781 -780
  73. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  74. package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
  75. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  76. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  77. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  78. package/sdk/application/PosCart/PosCartApplicationClient.js +646 -645
  79. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
  80. package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
  81. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  82. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  83. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  84. package/sdk/application/Rewards/RewardsApplicationClient.js +122 -121
  85. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  86. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  87. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  88. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  89. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  90. package/sdk/application/Share/ShareApplicationClient.js +94 -93
  91. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  92. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  93. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  94. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  95. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  96. package/sdk/application/Theme/ThemeApplicationClient.js +38 -37
  97. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  98. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  99. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  100. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  101. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  102. package/sdk/application/User/UserApplicationClient.js +619 -618
  103. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  104. package/sdk/application/User/UserApplicationModel.js +440 -689
  105. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  106. package/sdk/application/User/UserApplicationValidator.js +89 -89
  107. package/sdk/common/AxiosHelper.js +18 -7
  108. package/sdk/constructUrl.d.ts +5 -0
  109. package/sdk/constructUrl.js +13 -0
  110. package/sdk/index.d.ts +3 -0
  111. package/sdk/index.js +5 -0
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  115. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
  116. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  117. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  118. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  119. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  124. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  125. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +7 -6
  126. package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
  127. package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
  128. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  129. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  130. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  131. package/sdk/platform/Billing/BillingPlatformValidator.js +26 -25
  132. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
  133. package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
  134. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
  135. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
  136. package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
  137. package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
  140. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  141. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  142. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
  143. package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
  144. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
  145. package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
  146. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
  147. package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
  148. package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
  149. package/sdk/platform/Common/CommonPlatformClient.js +40 -51
  150. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  151. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  152. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  153. package/sdk/platform/Common/CommonPlatformValidator.js +7 -6
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
  156. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  157. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
  158. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  159. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  160. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -24
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +39 -38
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
  183. package/sdk/platform/Content/ContentPlatformModel.js +485 -907
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +30 -29
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +12 -11
  200. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
  201. package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
  202. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  203. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  204. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  205. package/sdk/platform/Inventory/InventoryPlatformValidator.js +29 -28
  206. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
  207. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
  208. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  209. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
  210. package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
  211. package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
  212. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  213. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  214. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  215. package/sdk/platform/Lead/LeadPlatformValidator.js +25 -24
  216. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
  217. package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
  218. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  219. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
  220. package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
  221. package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
  222. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
  223. package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
  224. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  225. package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
  226. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  227. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  228. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  229. package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
  230. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
  231. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
  232. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  233. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
  234. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
  235. package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
  236. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  237. package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
  238. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  239. package/sdk/platform/Payment/PaymentPlatformValidator.js +22 -21
  240. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
  241. package/sdk/platform/PlatformApplicationClient.js +1584 -13899
  242. package/sdk/platform/PlatformClient.d.ts +7972 -7888
  243. package/sdk/platform/PlatformClient.js +8678 -10107
  244. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
  245. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
  246. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  247. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
  248. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  249. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  250. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
  251. package/sdk/platform/Share/SharePlatformApplicationClient.js +62 -60
  252. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  253. package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
  254. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  255. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  256. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
  257. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +314 -312
  258. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  259. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
  260. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  261. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  262. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
  263. package/sdk/platform/User/UserPlatformApplicationClient.js +507 -166
  264. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  265. package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
  266. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  267. package/sdk/platform/User/UserPlatformModel.js +440 -689
  268. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
  269. package/sdk/platform/Webhook/WebhookPlatformClient.js +91 -90
  270. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  271. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  272. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  273. package/sdk/platform/Webhook/WebhookPlatformValidator.js +15 -14
  274. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  275. package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -38
  276. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  277. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  278. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  279. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  280. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  281. package/sdk/public/Inventory/InventoryPublicClient.js +115 -113
  282. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  283. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  284. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  285. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  286. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  287. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  288. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  289. package/.github/workflows/on_create_release.yml +0 -23
  290. package/.github/workflows/on_merge_main.yml +0 -38
  291. package/.github/workflows/on_pull_request.yml +0 -35
  292. package/.prettierrc +0 -5
  293. package/documentation/application/CART.md +0 -7339
  294. package/documentation/application/CATALOG.md +0 -9597
  295. package/documentation/application/COMMON.md +0 -452
  296. package/documentation/application/COMMUNICATION.md +0 -467
  297. package/documentation/application/CONFIGURATION.md +0 -2906
  298. package/documentation/application/CONTENT.md +0 -3351
  299. package/documentation/application/FILESTORAGE.md +0 -578
  300. package/documentation/application/LEAD.md +0 -1895
  301. package/documentation/application/LOGISTIC.md +0 -765
  302. package/documentation/application/ORDER.md +0 -3432
  303. package/documentation/application/PAYMENT.md +0 -5221
  304. package/documentation/application/POSCART.md +0 -7938
  305. package/documentation/application/README.md +0 -21
  306. package/documentation/application/REWARDS.md +0 -708
  307. package/documentation/application/SHARE.md +0 -733
  308. package/documentation/application/THEME.md +0 -5800
  309. package/documentation/application/USER.md +0 -4335
  310. package/documentation/platform/ANALYTICS.md +0 -1154
  311. package/documentation/platform/AUDITTRAIL.md +0 -576
  312. package/documentation/platform/BILLING.md +0 -2400
  313. package/documentation/platform/CART.md +0 -5559
  314. package/documentation/platform/CATALOG.md +0 -23261
  315. package/documentation/platform/COMMON.md +0 -452
  316. package/documentation/platform/COMMUNICATION.md +0 -5718
  317. package/documentation/platform/COMPANYPROFILE.md +0 -2031
  318. package/documentation/platform/CONFIGURATION.md +0 -7339
  319. package/documentation/platform/CONTENT.md +0 -9098
  320. package/documentation/platform/DISCOUNT.md +0 -863
  321. package/documentation/platform/FILESTORAGE.md +0 -1081
  322. package/documentation/platform/INVENTORY.md +0 -1779
  323. package/documentation/platform/LEAD.md +0 -4740
  324. package/documentation/platform/ORDER.md +0 -8486
  325. package/documentation/platform/PARTNER.md +0 -220
  326. package/documentation/platform/PAYMENT.md +0 -3448
  327. package/documentation/platform/README.md +0 -27
  328. package/documentation/platform/REWARDS.md +0 -1083
  329. package/documentation/platform/SHARE.md +0 -606
  330. package/documentation/platform/THEME.md +0 -35729
  331. package/documentation/platform/USER.md +0 -2319
  332. package/documentation/platform/WEBHOOK.md +0 -591
  333. package/documentation/public/CONFIGURATION.md +0 -452
  334. package/documentation/public/INVENTORY.md +0 -690
  335. package/documentation/public/WEBHOOK.md +0 -352
  336. package/jest.config.d.ts +0 -4
  337. package/jest.config.js +0 -6
  338. package/tests/application/catalog.spec.js +0 -47
  339. package/tests/common/action-url.spec.js +0 -35
  340. package/tests/common/schema/action-url.json +0 -178
  341. package/tests/common/schema/url-action.json +0 -683
  342. package/tests/common/url-action.spec.js +0 -48
  343. package/tests/helpers/cookie.helper.js +0 -31
  344. package/tests/helpers/oauth.helper.js +0 -43
  345. package/tests/platform/catalog.spec.js +0 -49
  346. package/tests/public/location.spec.js +0 -39
@@ -1,9 +1,10 @@
1
- const Paginator = require("../../common/Paginator");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
3
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
+ const { FDKClientValidationError } = require("../../common/FDKError");
3
+ const Paginator = require("../../common/Paginator");
4
4
  const ConfigurationValidator = require("./ConfigurationPlatformValidator");
5
5
  const ConfigurationModel = require("./ConfigurationPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
+ const Joi = require("joi");
7
8
 
8
9
  class Configuration {
9
10
  constructor(config) {
@@ -175,19 +176,24 @@ class Configuration {
175
176
  });
176
177
  return data;
177
178
  };
178
- paginator.setCallback(callback);
179
+ paginator.setCallback(callback.bind(this));
179
180
  return paginator;
180
181
  }
181
182
 
182
183
  /**
183
184
  * @param {Object} arg - Arg object.
184
- * @returns {Promise<CurrenciesResponse>} - Success response
185
- * @summary: Get all currencies
186
- * @description: Get all currencies
185
+ * @param {number} [arg.pageNo] - Current page no
186
+ * @param {number} [arg.pageSize] - Current request items count
187
+ * @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
188
+ * @summary: Get all available integration opt-ins
189
+ * @description: Get all available integration opt-ins
187
190
  */
188
- async getCurrencies({} = {}) {
189
- const { error } = ConfigurationValidator.getCurrencies().validate(
190
- {},
191
+ async getAvailableOptIns({ pageNo, pageSize } = {}) {
192
+ const { error } = ConfigurationValidator.getAvailableOptIns().validate(
193
+ {
194
+ pageNo,
195
+ pageSize,
196
+ },
191
197
  { abortEarly: false, allowUnknown: true }
192
198
  );
193
199
  if (error) {
@@ -195,26 +201,33 @@ class Configuration {
195
201
  }
196
202
 
197
203
  // Showing warrnings if extra unknown parameters are found
198
- const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
199
- {},
204
+ const {
205
+ error: warrning,
206
+ } = ConfigurationValidator.getAvailableOptIns().validate(
207
+ {
208
+ pageNo,
209
+ pageSize,
210
+ },
200
211
  { abortEarly: false, allowUnknown: false }
201
212
  );
202
213
  if (warrning) {
203
214
  Logger({
204
215
  level: "WARN",
205
- message: "Parameter Validation warrnings for getCurrencies",
216
+ message: "Parameter Validation warrnings for getAvailableOptIns",
206
217
  });
207
218
  Logger({ level: "WARN", message: warrning });
208
219
  }
209
220
 
210
221
  const query_params = {};
222
+ query_params["page_no"] = pageNo;
223
+ query_params["page_size"] = pageSize;
211
224
 
212
225
  const xHeaders = {};
213
226
 
214
227
  const response = await PlatformAPIClient.execute(
215
228
  this.config,
216
229
  "get",
217
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/currencies`,
230
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/available`,
218
231
  query_params,
219
232
  undefined,
220
233
  xHeaders
@@ -222,7 +235,7 @@ class Configuration {
222
235
 
223
236
  const {
224
237
  error: res_error,
225
- } = ConfigurationModel.CurrenciesResponse().validate(response, {
238
+ } = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
226
239
  abortEarly: false,
227
240
  allowUnknown: false,
228
241
  });
@@ -230,7 +243,7 @@ class Configuration {
230
243
  if (res_error) {
231
244
  Logger({
232
245
  level: "WARN",
233
- message: "Response Validation Warnnings for getCurrencies",
246
+ message: "Response Validation Warnnings for getAvailableOptIns",
234
247
  });
235
248
  Logger({ level: "WARN", message: res_error });
236
249
  }
@@ -240,15 +253,41 @@ class Configuration {
240
253
 
241
254
  /**
242
255
  * @param {Object} arg - Arg object.
243
- * @param {DomainSuggestionsRequest} arg.body
244
- * @returns {Promise<DomainSuggestionsResponse>} - Success response
245
- * @summary: Check domain availibility before linking to application
246
- * @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.
256
+ * @param {number} [arg.pageSize] - Current request items count
257
+ * @summary: Get all available integration opt-ins
258
+ * @description: Get all available integration opt-ins
247
259
  */
248
- async getDomainAvailibility({ body } = {}) {
249
- const { error } = ConfigurationValidator.getDomainAvailibility().validate(
260
+ getAvailableOptInsPaginator({ pageSize } = {}) {
261
+ const paginator = new Paginator();
262
+ const callback = async () => {
263
+ const pageId = paginator.nextId;
264
+ const pageNo = paginator.pageNo;
265
+ const pageType = "number";
266
+ const data = await this.getAvailableOptIns({
267
+ pageNo: pageNo,
268
+ pageSize: pageSize,
269
+ });
270
+ paginator.setPaginator({
271
+ hasNext: data.page.has_next ? true : false,
272
+ nextId: data.page.next_id,
273
+ });
274
+ return data;
275
+ };
276
+ paginator.setCallback(callback.bind(this));
277
+ return paginator;
278
+ }
279
+
280
+ /**
281
+ * @param {Object} arg - Arg object.
282
+ * @param {string} [arg.q] - Search text for brand name
283
+ * @returns {Promise<BrandsByCompanyResponse>} - Success response
284
+ * @summary: Get brands by company
285
+ * @description: Get brands by company
286
+ */
287
+ async getBrandsByCompany({ q } = {}) {
288
+ const { error } = ConfigurationValidator.getBrandsByCompany().validate(
250
289
  {
251
- body,
290
+ q,
252
291
  },
253
292
  { abortEarly: false, allowUnknown: true }
254
293
  );
@@ -259,36 +298,37 @@ class Configuration {
259
298
  // Showing warrnings if extra unknown parameters are found
260
299
  const {
261
300
  error: warrning,
262
- } = ConfigurationValidator.getDomainAvailibility().validate(
301
+ } = ConfigurationValidator.getBrandsByCompany().validate(
263
302
  {
264
- body,
303
+ q,
265
304
  },
266
305
  { abortEarly: false, allowUnknown: false }
267
306
  );
268
307
  if (warrning) {
269
308
  Logger({
270
309
  level: "WARN",
271
- message: "Parameter Validation warrnings for getDomainAvailibility",
310
+ message: "Parameter Validation warrnings for getBrandsByCompany",
272
311
  });
273
312
  Logger({ level: "WARN", message: warrning });
274
313
  }
275
314
 
276
315
  const query_params = {};
316
+ query_params["q"] = q;
277
317
 
278
318
  const xHeaders = {};
279
319
 
280
320
  const response = await PlatformAPIClient.execute(
281
321
  this.config,
282
- "post",
283
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/domain/suggestions`,
322
+ "get",
323
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/brands-by-companies`,
284
324
  query_params,
285
- body,
325
+ undefined,
286
326
  xHeaders
287
327
  );
288
328
 
289
329
  const {
290
330
  error: res_error,
291
- } = ConfigurationModel.DomainSuggestionsResponse().validate(response, {
331
+ } = ConfigurationModel.BrandsByCompanyResponse().validate(response, {
292
332
  abortEarly: false,
293
333
  allowUnknown: false,
294
334
  });
@@ -296,7 +336,7 @@ class Configuration {
296
336
  if (res_error) {
297
337
  Logger({
298
338
  level: "WARN",
299
- message: "Response Validation Warnnings for getDomainAvailibility",
339
+ message: "Response Validation Warnnings for getBrandsByCompany",
300
340
  });
301
341
  Logger({ level: "WARN", message: res_error });
302
342
  }
@@ -306,15 +346,19 @@ class Configuration {
306
346
 
307
347
  /**
308
348
  * @param {Object} arg - Arg object.
309
- * @param {number} arg.id - Integration id
310
- * @returns {Promise<Integration>} - Success response
311
- * @summary: Get integration data
312
- * @description: Get integration data
349
+ * @param {number} [arg.pageNo] - Current page no
350
+ * @param {number} [arg.pageSize] - Current request items count
351
+ * @param {CompanyByBrandsRequest} arg.body
352
+ * @returns {Promise<CompanyByBrandsResponse>} - Success response
353
+ * @summary: Get company by brand uids
354
+ * @description: Get company by brand uids
313
355
  */
314
- async getIntegrationById({ id } = {}) {
315
- const { error } = ConfigurationValidator.getIntegrationById().validate(
356
+ async getCompanyByBrands({ body, pageNo, pageSize } = {}) {
357
+ const { error } = ConfigurationValidator.getCompanyByBrands().validate(
316
358
  {
317
- id,
359
+ body,
360
+ pageNo,
361
+ pageSize,
318
362
  },
319
363
  { abortEarly: false, allowUnknown: true }
320
364
  );
@@ -325,36 +369,40 @@ class Configuration {
325
369
  // Showing warrnings if extra unknown parameters are found
326
370
  const {
327
371
  error: warrning,
328
- } = ConfigurationValidator.getIntegrationById().validate(
372
+ } = ConfigurationValidator.getCompanyByBrands().validate(
329
373
  {
330
- id,
374
+ body,
375
+ pageNo,
376
+ pageSize,
331
377
  },
332
378
  { abortEarly: false, allowUnknown: false }
333
379
  );
334
380
  if (warrning) {
335
381
  Logger({
336
382
  level: "WARN",
337
- message: "Parameter Validation warrnings for getIntegrationById",
383
+ message: "Parameter Validation warrnings for getCompanyByBrands",
338
384
  });
339
385
  Logger({ level: "WARN", message: warrning });
340
386
  }
341
387
 
342
388
  const query_params = {};
389
+ query_params["page_no"] = pageNo;
390
+ query_params["page_size"] = pageSize;
343
391
 
344
392
  const xHeaders = {};
345
393
 
346
394
  const response = await PlatformAPIClient.execute(
347
395
  this.config,
348
- "get",
349
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration/${id}`,
396
+ "post",
397
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/companies-by-brands`,
350
398
  query_params,
351
- undefined,
399
+ body,
352
400
  xHeaders
353
401
  );
354
402
 
355
403
  const {
356
404
  error: res_error,
357
- } = ConfigurationModel.Integration().validate(response, {
405
+ } = ConfigurationModel.CompanyByBrandsResponse().validate(response, {
358
406
  abortEarly: false,
359
407
  allowUnknown: false,
360
408
  });
@@ -362,7 +410,7 @@ class Configuration {
362
410
  if (res_error) {
363
411
  Logger({
364
412
  level: "WARN",
365
- message: "Response Validation Warnnings for getIntegrationById",
413
+ message: "Response Validation Warnnings for getCompanyByBrands",
366
414
  });
367
415
  Logger({ level: "WARN", message: res_error });
368
416
  }
@@ -372,18 +420,41 @@ class Configuration {
372
420
 
373
421
  /**
374
422
  * @param {Object} arg - Arg object.
375
- * @param {number} [arg.pageNo] - Current page no
376
423
  * @param {number} [arg.pageSize] - Current request items count
377
- * @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
378
- * @summary: Get all available integration opt-ins
379
- * @description: Get all available integration opt-ins
424
+ * @param {CompanyByBrandsRequest} arg.body
425
+ * @summary: Get company by brand uids
426
+ * @description: Get company by brand uids
380
427
  */
381
- async getAvailableOptIns({ pageNo, pageSize } = {}) {
382
- const { error } = ConfigurationValidator.getAvailableOptIns().validate(
383
- {
384
- pageNo,
385
- pageSize,
386
- },
428
+ getCompanyByBrandsPaginator({ pageSize, body } = {}) {
429
+ const paginator = new Paginator();
430
+ const callback = async () => {
431
+ const pageId = paginator.nextId;
432
+ const pageNo = paginator.pageNo;
433
+ const pageType = "number";
434
+ const data = await this.getCompanyByBrands({
435
+ body: body,
436
+ pageNo: pageNo,
437
+ pageSize: pageSize,
438
+ });
439
+ paginator.setPaginator({
440
+ hasNext: data.page.has_next ? true : false,
441
+ nextId: data.page.next_id,
442
+ });
443
+ return data;
444
+ };
445
+ paginator.setCallback(callback.bind(this));
446
+ return paginator;
447
+ }
448
+
449
+ /**
450
+ * @param {Object} arg - Arg object.
451
+ * @returns {Promise<CurrenciesResponse>} - Success response
452
+ * @summary: Get all currencies
453
+ * @description: Get all currencies
454
+ */
455
+ async getCurrencies({} = {}) {
456
+ const { error } = ConfigurationValidator.getCurrencies().validate(
457
+ {},
387
458
  { abortEarly: false, allowUnknown: true }
388
459
  );
389
460
  if (error) {
@@ -391,33 +462,26 @@ class Configuration {
391
462
  }
392
463
 
393
464
  // Showing warrnings if extra unknown parameters are found
394
- const {
395
- error: warrning,
396
- } = ConfigurationValidator.getAvailableOptIns().validate(
397
- {
398
- pageNo,
399
- pageSize,
400
- },
465
+ const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
466
+ {},
401
467
  { abortEarly: false, allowUnknown: false }
402
468
  );
403
469
  if (warrning) {
404
470
  Logger({
405
471
  level: "WARN",
406
- message: "Parameter Validation warrnings for getAvailableOptIns",
472
+ message: "Parameter Validation warrnings for getCurrencies",
407
473
  });
408
474
  Logger({ level: "WARN", message: warrning });
409
475
  }
410
476
 
411
477
  const query_params = {};
412
- query_params["page_no"] = pageNo;
413
- query_params["page_size"] = pageSize;
414
478
 
415
479
  const xHeaders = {};
416
480
 
417
481
  const response = await PlatformAPIClient.execute(
418
482
  this.config,
419
483
  "get",
420
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/available`,
484
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/currencies`,
421
485
  query_params,
422
486
  undefined,
423
487
  xHeaders
@@ -425,7 +489,7 @@ class Configuration {
425
489
 
426
490
  const {
427
491
  error: res_error,
428
- } = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
492
+ } = ConfigurationModel.CurrenciesResponse().validate(response, {
429
493
  abortEarly: false,
430
494
  allowUnknown: false,
431
495
  });
@@ -433,7 +497,7 @@ class Configuration {
433
497
  if (res_error) {
434
498
  Logger({
435
499
  level: "WARN",
436
- message: "Response Validation Warnnings for getAvailableOptIns",
500
+ message: "Response Validation Warnnings for getCurrencies",
437
501
  });
438
502
  Logger({ level: "WARN", message: res_error });
439
503
  }
@@ -443,47 +507,15 @@ class Configuration {
443
507
 
444
508
  /**
445
509
  * @param {Object} arg - Arg object.
446
- * @param {number} [arg.pageSize] - Current request items count
447
- * @summary: Get all available integration opt-ins
448
- * @description: Get all available integration opt-ins
449
- */
450
- getAvailableOptInsPaginator({ pageSize } = {}) {
451
- const paginator = new Paginator();
452
- const callback = async () => {
453
- const pageId = paginator.nextId;
454
- const pageNo = paginator.pageNo;
455
- const pageType = "number";
456
- const data = await this.getAvailableOptIns({
457
- pageNo: pageNo,
458
- pageSize: pageSize,
459
- });
460
- paginator.setPaginator({
461
- hasNext: data.page.has_next ? true : false,
462
- nextId: data.page.next_id,
463
- });
464
- return data;
465
- };
466
- paginator.setCallback(callback);
467
- return paginator;
468
- }
469
-
470
- /**
471
- * @param {Object} arg - Arg object.
472
- * @param {string} arg.level - Integration level
473
- * @param {number} arg.uid - Integration level uid
474
- * @param {number} [arg.pageNo] - Current page no
475
- * @param {number} [arg.pageSize] - Current request items count
476
- * @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
477
- * @summary: Get company/store level integration opt-ins
478
- * @description: Get company/store level integration opt-ins
510
+ * @param {DomainSuggestionsRequest} arg.body
511
+ * @returns {Promise<DomainSuggestionsResponse>} - Success response
512
+ * @summary: Check domain availibility before linking to application
513
+ * @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.
479
514
  */
480
- async getSelectedOptIns({ level, uid, pageNo, pageSize } = {}) {
481
- const { error } = ConfigurationValidator.getSelectedOptIns().validate(
515
+ async getDomainAvailibility({ body } = {}) {
516
+ const { error } = ConfigurationValidator.getDomainAvailibility().validate(
482
517
  {
483
- level,
484
- uid,
485
- pageNo,
486
- pageSize,
518
+ body,
487
519
  },
488
520
  { abortEarly: false, allowUnknown: true }
489
521
  );
@@ -494,41 +526,36 @@ class Configuration {
494
526
  // Showing warrnings if extra unknown parameters are found
495
527
  const {
496
528
  error: warrning,
497
- } = ConfigurationValidator.getSelectedOptIns().validate(
529
+ } = ConfigurationValidator.getDomainAvailibility().validate(
498
530
  {
499
- level,
500
- uid,
501
- pageNo,
502
- pageSize,
531
+ body,
503
532
  },
504
533
  { abortEarly: false, allowUnknown: false }
505
534
  );
506
535
  if (warrning) {
507
536
  Logger({
508
537
  level: "WARN",
509
- message: "Parameter Validation warrnings for getSelectedOptIns",
538
+ message: "Parameter Validation warrnings for getDomainAvailibility",
510
539
  });
511
540
  Logger({ level: "WARN", message: warrning });
512
541
  }
513
542
 
514
543
  const query_params = {};
515
- query_params["page_no"] = pageNo;
516
- query_params["page_size"] = pageSize;
517
544
 
518
545
  const xHeaders = {};
519
546
 
520
547
  const response = await PlatformAPIClient.execute(
521
548
  this.config,
522
- "get",
523
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/selected/${level}/${uid}`,
549
+ "post",
550
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/domain/suggestions`,
524
551
  query_params,
525
- undefined,
552
+ body,
526
553
  xHeaders
527
554
  );
528
555
 
529
556
  const {
530
557
  error: res_error,
531
- } = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
558
+ } = ConfigurationModel.DomainSuggestionsResponse().validate(response, {
532
559
  abortEarly: false,
533
560
  allowUnknown: false,
534
561
  });
@@ -536,7 +563,7 @@ class Configuration {
536
563
  if (res_error) {
537
564
  Logger({
538
565
  level: "WARN",
539
- message: "Response Validation Warnnings for getSelectedOptIns",
566
+ message: "Response Validation Warnnings for getDomainAvailibility",
540
567
  });
541
568
  Logger({ level: "WARN", message: res_error });
542
569
  }
@@ -546,53 +573,15 @@ class Configuration {
546
573
 
547
574
  /**
548
575
  * @param {Object} arg - Arg object.
549
- * @param {string} arg.level - Integration level
550
- * @param {number} arg.uid - Integration level uid
551
- * @param {number} [arg.pageSize] - Current request items count
552
- * @summary: Get company/store level integration opt-ins
553
- * @description: Get company/store level integration opt-ins
554
- */
555
- getSelectedOptInsPaginator({ level, uid, pageSize } = {}) {
556
- const paginator = new Paginator();
557
- const callback = async () => {
558
- const pageId = paginator.nextId;
559
- const pageNo = paginator.pageNo;
560
- const pageType = "number";
561
- const data = await this.getSelectedOptIns({
562
- level: level,
563
- uid: uid,
564
- pageNo: pageNo,
565
- pageSize: pageSize,
566
- });
567
- paginator.setPaginator({
568
- hasNext: data.page.has_next ? true : false,
569
- nextId: data.page.next_id,
570
- });
571
- return data;
572
- };
573
- paginator.setCallback(callback);
574
- return paginator;
575
- }
576
-
577
- /**
578
- * @param {Object} arg - Arg object.
579
- * @param {string} arg.id - Integration id
580
- * @param {string} arg.level - Integration level
581
- * @param {boolean} [arg.opted] - Filter on opted stores
582
- * @param {boolean} [arg.checkPermission] - Filter on if permissions are present
583
- * @returns {Promise<IntegrationConfigResponse>} - Success response
584
- * @summary: Get integration level config
585
- * @description: Get integration/integration-opt-in level config
576
+ * @param {number} arg.id - Integration id
577
+ * @returns {Promise<Integration>} - Success response
578
+ * @summary: Get integration data
579
+ * @description: Get integration data
586
580
  */
587
- async getIntegrationLevelConfig({ id, level, opted, checkPermission } = {}) {
588
- const {
589
- error,
590
- } = ConfigurationValidator.getIntegrationLevelConfig().validate(
581
+ async getIntegrationById({ id } = {}) {
582
+ const { error } = ConfigurationValidator.getIntegrationById().validate(
591
583
  {
592
584
  id,
593
- level,
594
- opted,
595
- checkPermission,
596
585
  },
597
586
  { abortEarly: false, allowUnknown: true }
598
587
  );
@@ -603,33 +592,28 @@ class Configuration {
603
592
  // Showing warrnings if extra unknown parameters are found
604
593
  const {
605
594
  error: warrning,
606
- } = ConfigurationValidator.getIntegrationLevelConfig().validate(
595
+ } = ConfigurationValidator.getIntegrationById().validate(
607
596
  {
608
597
  id,
609
- level,
610
- opted,
611
- checkPermission,
612
598
  },
613
599
  { abortEarly: false, allowUnknown: false }
614
600
  );
615
601
  if (warrning) {
616
602
  Logger({
617
603
  level: "WARN",
618
- message: "Parameter Validation warrnings for getIntegrationLevelConfig",
604
+ message: "Parameter Validation warrnings for getIntegrationById",
619
605
  });
620
606
  Logger({ level: "WARN", message: warrning });
621
607
  }
622
608
 
623
609
  const query_params = {};
624
- query_params["opted"] = opted;
625
- query_params["check_permission"] = checkPermission;
626
610
 
627
611
  const xHeaders = {};
628
612
 
629
613
  const response = await PlatformAPIClient.execute(
630
614
  this.config,
631
615
  "get",
632
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
616
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration/${id}`,
633
617
  query_params,
634
618
  undefined,
635
619
  xHeaders
@@ -637,7 +621,7 @@ class Configuration {
637
621
 
638
622
  const {
639
623
  error: res_error,
640
- } = ConfigurationModel.IntegrationConfigResponse().validate(response, {
624
+ } = ConfigurationModel.Integration().validate(response, {
641
625
  abortEarly: false,
642
626
  allowUnknown: false,
643
627
  });
@@ -645,7 +629,7 @@ class Configuration {
645
629
  if (res_error) {
646
630
  Logger({
647
631
  level: "WARN",
648
- message: "Response Validation Warnnings for getIntegrationLevelConfig",
632
+ message: "Response Validation Warnnings for getIntegrationById",
649
633
  });
650
634
  Logger({ level: "WARN", message: res_error });
651
635
  }
@@ -657,17 +641,17 @@ class Configuration {
657
641
  * @param {Object} arg - Arg object.
658
642
  * @param {string} arg.id - Integration id
659
643
  * @param {string} arg.level - Integration level
660
- * @param {UpdateIntegrationLevelRequest} arg.body
644
+ * @param {number} arg.uid - Integration level uid
661
645
  * @returns {Promise<IntegrationLevel>} - Success response
662
- * @summary: Update a store level opt-in for integration
663
- * @description: Update a store level opt-in for integration
646
+ * @summary: Get level data for integration
647
+ * @description: Get level data for integration
664
648
  */
665
- async updateLevelIntegration({ id, level, body } = {}) {
666
- const { error } = ConfigurationValidator.updateLevelIntegration().validate(
649
+ async getIntegrationByLevelId({ id, level, uid } = {}) {
650
+ const { error } = ConfigurationValidator.getIntegrationByLevelId().validate(
667
651
  {
668
652
  id,
669
653
  level,
670
- body,
654
+ uid,
671
655
  },
672
656
  { abortEarly: false, allowUnknown: true }
673
657
  );
@@ -678,18 +662,18 @@ class Configuration {
678
662
  // Showing warrnings if extra unknown parameters are found
679
663
  const {
680
664
  error: warrning,
681
- } = ConfigurationValidator.updateLevelIntegration().validate(
665
+ } = ConfigurationValidator.getIntegrationByLevelId().validate(
682
666
  {
683
667
  id,
684
668
  level,
685
- body,
669
+ uid,
686
670
  },
687
671
  { abortEarly: false, allowUnknown: false }
688
672
  );
689
673
  if (warrning) {
690
674
  Logger({
691
675
  level: "WARN",
692
- message: "Parameter Validation warrnings for updateLevelIntegration",
676
+ message: "Parameter Validation warrnings for getIntegrationByLevelId",
693
677
  });
694
678
  Logger({ level: "WARN", message: warrning });
695
679
  }
@@ -700,10 +684,10 @@ class Configuration {
700
684
 
701
685
  const response = await PlatformAPIClient.execute(
702
686
  this.config,
703
- "put",
704
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
687
+ "get",
688
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
705
689
  query_params,
706
- body,
690
+ undefined,
707
691
  xHeaders
708
692
  );
709
693
 
@@ -717,7 +701,7 @@ class Configuration {
717
701
  if (res_error) {
718
702
  Logger({
719
703
  level: "WARN",
720
- message: "Response Validation Warnnings for updateLevelIntegration",
704
+ message: "Response Validation Warnnings for getIntegrationByLevelId",
721
705
  });
722
706
  Logger({ level: "WARN", message: res_error });
723
707
  }
@@ -729,17 +713,21 @@ class Configuration {
729
713
  * @param {Object} arg - Arg object.
730
714
  * @param {string} arg.id - Integration id
731
715
  * @param {string} arg.level - Integration level
732
- * @param {number} arg.uid - Integration level uid
733
- * @returns {Promise<IntegrationLevel>} - Success response
734
- * @summary: Get level data for integration
735
- * @description: Get level data for integration
716
+ * @param {boolean} [arg.opted] - Filter on opted stores
717
+ * @param {boolean} [arg.checkPermission] - Filter on if permissions are present
718
+ * @returns {Promise<IntegrationConfigResponse>} - Success response
719
+ * @summary: Get integration level config
720
+ * @description: Get integration/integration-opt-in level config
736
721
  */
737
- async getIntegrationByLevelId({ id, level, uid } = {}) {
738
- const { error } = ConfigurationValidator.getIntegrationByLevelId().validate(
722
+ async getIntegrationLevelConfig({ id, level, opted, checkPermission } = {}) {
723
+ const {
724
+ error,
725
+ } = ConfigurationValidator.getIntegrationLevelConfig().validate(
739
726
  {
740
727
  id,
741
728
  level,
742
- uid,
729
+ opted,
730
+ checkPermission,
743
731
  },
744
732
  { abortEarly: false, allowUnknown: true }
745
733
  );
@@ -750,30 +738,33 @@ class Configuration {
750
738
  // Showing warrnings if extra unknown parameters are found
751
739
  const {
752
740
  error: warrning,
753
- } = ConfigurationValidator.getIntegrationByLevelId().validate(
741
+ } = ConfigurationValidator.getIntegrationLevelConfig().validate(
754
742
  {
755
743
  id,
756
744
  level,
757
- uid,
745
+ opted,
746
+ checkPermission,
758
747
  },
759
748
  { abortEarly: false, allowUnknown: false }
760
749
  );
761
750
  if (warrning) {
762
751
  Logger({
763
752
  level: "WARN",
764
- message: "Parameter Validation warrnings for getIntegrationByLevelId",
753
+ message: "Parameter Validation warrnings for getIntegrationLevelConfig",
765
754
  });
766
755
  Logger({ level: "WARN", message: warrning });
767
756
  }
768
757
 
769
758
  const query_params = {};
759
+ query_params["opted"] = opted;
760
+ query_params["check_permission"] = checkPermission;
770
761
 
771
762
  const xHeaders = {};
772
763
 
773
764
  const response = await PlatformAPIClient.execute(
774
765
  this.config,
775
766
  "get",
776
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
767
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
777
768
  query_params,
778
769
  undefined,
779
770
  xHeaders
@@ -781,7 +772,7 @@ class Configuration {
781
772
 
782
773
  const {
783
774
  error: res_error,
784
- } = ConfigurationModel.IntegrationLevel().validate(response, {
775
+ } = ConfigurationModel.IntegrationConfigResponse().validate(response, {
785
776
  abortEarly: false,
786
777
  allowUnknown: false,
787
778
  });
@@ -789,7 +780,7 @@ class Configuration {
789
780
  if (res_error) {
790
781
  Logger({
791
782
  level: "WARN",
792
- message: "Response Validation Warnnings for getIntegrationByLevelId",
783
+ message: "Response Validation Warnnings for getIntegrationLevelConfig",
793
784
  });
794
785
  Logger({ level: "WARN", message: res_error });
795
786
  }
@@ -802,20 +793,18 @@ class Configuration {
802
793
  * @param {string} arg.id - Integration id
803
794
  * @param {string} arg.level - Integration level
804
795
  * @param {number} arg.uid - Integration level uid
805
- * @param {IntegrationLevel} arg.body
806
- * @returns {Promise<IntegrationLevel>} - Success response
807
- * @summary: Update a store level opt-in for integration
808
- * @description: Update a store level opt-in for integration
796
+ * @returns {Promise<OptedStoreIntegration>} - Success response
797
+ * @summary: Check store has active integration
798
+ * @description: API checks if a store is already opted in any other integrations
809
799
  */
810
- async updateLevelUidIntegration({ id, level, uid, body } = {}) {
800
+ async getLevelActiveIntegrations({ id, level, uid } = {}) {
811
801
  const {
812
802
  error,
813
- } = ConfigurationValidator.updateLevelUidIntegration().validate(
803
+ } = ConfigurationValidator.getLevelActiveIntegrations().validate(
814
804
  {
815
805
  id,
816
806
  level,
817
807
  uid,
818
- body,
819
808
  },
820
809
  { abortEarly: false, allowUnknown: true }
821
810
  );
@@ -826,19 +815,19 @@ class Configuration {
826
815
  // Showing warrnings if extra unknown parameters are found
827
816
  const {
828
817
  error: warrning,
829
- } = ConfigurationValidator.updateLevelUidIntegration().validate(
818
+ } = ConfigurationValidator.getLevelActiveIntegrations().validate(
830
819
  {
831
820
  id,
832
821
  level,
833
822
  uid,
834
- body,
835
823
  },
836
824
  { abortEarly: false, allowUnknown: false }
837
825
  );
838
826
  if (warrning) {
839
827
  Logger({
840
828
  level: "WARN",
841
- message: "Parameter Validation warrnings for updateLevelUidIntegration",
829
+ message:
830
+ "Parameter Validation warrnings for getLevelActiveIntegrations",
842
831
  });
843
832
  Logger({ level: "WARN", message: warrning });
844
833
  }
@@ -849,16 +838,16 @@ class Configuration {
849
838
 
850
839
  const response = await PlatformAPIClient.execute(
851
840
  this.config,
852
- "put",
853
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
841
+ "get",
842
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/check/configuration/${id}/${level}/${uid}`,
854
843
  query_params,
855
- body,
844
+ undefined,
856
845
  xHeaders
857
846
  );
858
847
 
859
848
  const {
860
849
  error: res_error,
861
- } = ConfigurationModel.IntegrationLevel().validate(response, {
850
+ } = ConfigurationModel.OptedStoreIntegration().validate(response, {
862
851
  abortEarly: false,
863
852
  allowUnknown: false,
864
853
  });
@@ -866,7 +855,7 @@ class Configuration {
866
855
  if (res_error) {
867
856
  Logger({
868
857
  level: "WARN",
869
- message: "Response Validation Warnnings for updateLevelUidIntegration",
858
+ message: "Response Validation Warnnings for getLevelActiveIntegrations",
870
859
  });
871
860
  Logger({ level: "WARN", message: res_error });
872
861
  }
@@ -876,21 +865,17 @@ class Configuration {
876
865
 
877
866
  /**
878
867
  * @param {Object} arg - Arg object.
879
- * @param {string} arg.id - Integration id
880
- * @param {string} arg.level - Integration level
881
- * @param {number} arg.uid - Integration level uid
882
- * @returns {Promise<OptedStoreIntegration>} - Success response
883
- * @summary: Check store has active integration
884
- * @description: API checks if a store is already opted in any other integrations
868
+ * @param {string} arg.id - Application Id
869
+ * @returns {Promise<OptedApplicationResponse>} - Success response
870
+ * @summary: Get other seller applications
871
+ * @description: Get other seller application
885
872
  */
886
- async getLevelActiveIntegrations({ id, level, uid } = {}) {
873
+ async getOtherSellerApplicationById({ id } = {}) {
887
874
  const {
888
875
  error,
889
- } = ConfigurationValidator.getLevelActiveIntegrations().validate(
876
+ } = ConfigurationValidator.getOtherSellerApplicationById().validate(
890
877
  {
891
878
  id,
892
- level,
893
- uid,
894
879
  },
895
880
  { abortEarly: false, allowUnknown: true }
896
881
  );
@@ -901,11 +886,9 @@ class Configuration {
901
886
  // Showing warrnings if extra unknown parameters are found
902
887
  const {
903
888
  error: warrning,
904
- } = ConfigurationValidator.getLevelActiveIntegrations().validate(
889
+ } = ConfigurationValidator.getOtherSellerApplicationById().validate(
905
890
  {
906
891
  id,
907
- level,
908
- uid,
909
892
  },
910
893
  { abortEarly: false, allowUnknown: false }
911
894
  );
@@ -913,7 +896,7 @@ class Configuration {
913
896
  Logger({
914
897
  level: "WARN",
915
898
  message:
916
- "Parameter Validation warrnings for getLevelActiveIntegrations",
899
+ "Parameter Validation warrnings for getOtherSellerApplicationById",
917
900
  });
918
901
  Logger({ level: "WARN", message: warrning });
919
902
  }
@@ -925,7 +908,7 @@ class Configuration {
925
908
  const response = await PlatformAPIClient.execute(
926
909
  this.config,
927
910
  "get",
928
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/check/configuration/${id}/${level}/${uid}`,
911
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
929
912
  query_params,
930
913
  undefined,
931
914
  xHeaders
@@ -933,7 +916,7 @@ class Configuration {
933
916
 
934
917
  const {
935
918
  error: res_error,
936
- } = ConfigurationModel.OptedStoreIntegration().validate(response, {
919
+ } = ConfigurationModel.OptedApplicationResponse().validate(response, {
937
920
  abortEarly: false,
938
921
  allowUnknown: false,
939
922
  });
@@ -941,7 +924,8 @@ class Configuration {
941
924
  if (res_error) {
942
925
  Logger({
943
926
  level: "WARN",
944
- message: "Response Validation Warnnings for getLevelActiveIntegrations",
927
+ message:
928
+ "Response Validation Warnnings for getOtherSellerApplicationById",
945
929
  });
946
930
  Logger({ level: "WARN", message: res_error });
947
931
  }
@@ -951,15 +935,19 @@ class Configuration {
951
935
 
952
936
  /**
953
937
  * @param {Object} arg - Arg object.
954
- * @param {string} [arg.q] - Search text for brand name
955
- * @returns {Promise<BrandsByCompanyResponse>} - Success response
956
- * @summary: Get brands by company
957
- * @description: Get brands by company
938
+ * @param {number} [arg.pageNo] - Current page no
939
+ * @param {number} [arg.pageSize] - Current request items count
940
+ * @returns {Promise<OtherSellerApplications>} - Success response
941
+ * @summary: Get other seller applications
942
+ * @description: Get other seller applications who has opted current company as inventory
958
943
  */
959
- async getBrandsByCompany({ q } = {}) {
960
- const { error } = ConfigurationValidator.getBrandsByCompany().validate(
944
+ async getOtherSellerApplications({ pageNo, pageSize } = {}) {
945
+ const {
946
+ error,
947
+ } = ConfigurationValidator.getOtherSellerApplications().validate(
961
948
  {
962
- q,
949
+ pageNo,
950
+ pageSize,
963
951
  },
964
952
  { abortEarly: false, allowUnknown: true }
965
953
  );
@@ -970,29 +958,32 @@ class Configuration {
970
958
  // Showing warrnings if extra unknown parameters are found
971
959
  const {
972
960
  error: warrning,
973
- } = ConfigurationValidator.getBrandsByCompany().validate(
961
+ } = ConfigurationValidator.getOtherSellerApplications().validate(
974
962
  {
975
- q,
963
+ pageNo,
964
+ pageSize,
976
965
  },
977
966
  { abortEarly: false, allowUnknown: false }
978
967
  );
979
968
  if (warrning) {
980
969
  Logger({
981
970
  level: "WARN",
982
- message: "Parameter Validation warrnings for getBrandsByCompany",
971
+ message:
972
+ "Parameter Validation warrnings for getOtherSellerApplications",
983
973
  });
984
974
  Logger({ level: "WARN", message: warrning });
985
975
  }
986
976
 
987
977
  const query_params = {};
988
- query_params["q"] = q;
978
+ query_params["page_no"] = pageNo;
979
+ query_params["page_size"] = pageSize;
989
980
 
990
981
  const xHeaders = {};
991
982
 
992
983
  const response = await PlatformAPIClient.execute(
993
984
  this.config,
994
985
  "get",
995
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/brands-by-companies`,
986
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/`,
996
987
  query_params,
997
988
  undefined,
998
989
  xHeaders
@@ -1000,7 +991,7 @@ class Configuration {
1000
991
 
1001
992
  const {
1002
993
  error: res_error,
1003
- } = ConfigurationModel.BrandsByCompanyResponse().validate(response, {
994
+ } = ConfigurationModel.OtherSellerApplications().validate(response, {
1004
995
  abortEarly: false,
1005
996
  allowUnknown: false,
1006
997
  });
@@ -1008,7 +999,7 @@ class Configuration {
1008
999
  if (res_error) {
1009
1000
  Logger({
1010
1001
  level: "WARN",
1011
- message: "Response Validation Warnnings for getBrandsByCompany",
1002
+ message: "Response Validation Warnnings for getOtherSellerApplications",
1012
1003
  });
1013
1004
  Logger({ level: "WARN", message: res_error });
1014
1005
  }
@@ -1018,17 +1009,45 @@ class Configuration {
1018
1009
 
1019
1010
  /**
1020
1011
  * @param {Object} arg - Arg object.
1012
+ * @param {number} [arg.pageSize] - Current request items count
1013
+ * @summary: Get other seller applications
1014
+ * @description: Get other seller applications who has opted current company as inventory
1015
+ */
1016
+ getOtherSellerApplicationsPaginator({ pageSize } = {}) {
1017
+ const paginator = new Paginator();
1018
+ const callback = async () => {
1019
+ const pageId = paginator.nextId;
1020
+ const pageNo = paginator.pageNo;
1021
+ const pageType = "number";
1022
+ const data = await this.getOtherSellerApplications({
1023
+ pageNo: pageNo,
1024
+ pageSize: pageSize,
1025
+ });
1026
+ paginator.setPaginator({
1027
+ hasNext: data.page.has_next ? true : false,
1028
+ nextId: data.page.next_id,
1029
+ });
1030
+ return data;
1031
+ };
1032
+ paginator.setCallback(callback.bind(this));
1033
+ return paginator;
1034
+ }
1035
+
1036
+ /**
1037
+ * @param {Object} arg - Arg object.
1038
+ * @param {string} arg.level - Integration level
1039
+ * @param {number} arg.uid - Integration level uid
1021
1040
  * @param {number} [arg.pageNo] - Current page no
1022
1041
  * @param {number} [arg.pageSize] - Current request items count
1023
- * @param {CompanyByBrandsRequest} arg.body
1024
- * @returns {Promise<CompanyByBrandsResponse>} - Success response
1025
- * @summary: Get company by brand uids
1026
- * @description: Get company by brand uids
1042
+ * @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
1043
+ * @summary: Get company/store level integration opt-ins
1044
+ * @description: Get company/store level integration opt-ins
1027
1045
  */
1028
- async getCompanyByBrands({ body, pageNo, pageSize } = {}) {
1029
- const { error } = ConfigurationValidator.getCompanyByBrands().validate(
1046
+ async getSelectedOptIns({ level, uid, pageNo, pageSize } = {}) {
1047
+ const { error } = ConfigurationValidator.getSelectedOptIns().validate(
1030
1048
  {
1031
- body,
1049
+ level,
1050
+ uid,
1032
1051
  pageNo,
1033
1052
  pageSize,
1034
1053
  },
@@ -1041,9 +1060,10 @@ class Configuration {
1041
1060
  // Showing warrnings if extra unknown parameters are found
1042
1061
  const {
1043
1062
  error: warrning,
1044
- } = ConfigurationValidator.getCompanyByBrands().validate(
1063
+ } = ConfigurationValidator.getSelectedOptIns().validate(
1045
1064
  {
1046
- body,
1065
+ level,
1066
+ uid,
1047
1067
  pageNo,
1048
1068
  pageSize,
1049
1069
  },
@@ -1052,7 +1072,7 @@ class Configuration {
1052
1072
  if (warrning) {
1053
1073
  Logger({
1054
1074
  level: "WARN",
1055
- message: "Parameter Validation warrnings for getCompanyByBrands",
1075
+ message: "Parameter Validation warrnings for getSelectedOptIns",
1056
1076
  });
1057
1077
  Logger({ level: "WARN", message: warrning });
1058
1078
  }
@@ -1065,16 +1085,16 @@ class Configuration {
1065
1085
 
1066
1086
  const response = await PlatformAPIClient.execute(
1067
1087
  this.config,
1068
- "post",
1069
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/companies-by-brands`,
1088
+ "get",
1089
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/selected/${level}/${uid}`,
1070
1090
  query_params,
1071
- body,
1091
+ undefined,
1072
1092
  xHeaders
1073
1093
  );
1074
1094
 
1075
1095
  const {
1076
1096
  error: res_error,
1077
- } = ConfigurationModel.CompanyByBrandsResponse().validate(response, {
1097
+ } = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
1078
1098
  abortEarly: false,
1079
1099
  allowUnknown: false,
1080
1100
  });
@@ -1082,7 +1102,7 @@ class Configuration {
1082
1102
  if (res_error) {
1083
1103
  Logger({
1084
1104
  level: "WARN",
1085
- message: "Response Validation Warnnings for getCompanyByBrands",
1105
+ message: "Response Validation Warnnings for getSelectedOptIns",
1086
1106
  });
1087
1107
  Logger({ level: "WARN", message: res_error });
1088
1108
  }
@@ -1092,19 +1112,21 @@ class Configuration {
1092
1112
 
1093
1113
  /**
1094
1114
  * @param {Object} arg - Arg object.
1115
+ * @param {string} arg.level - Integration level
1116
+ * @param {number} arg.uid - Integration level uid
1095
1117
  * @param {number} [arg.pageSize] - Current request items count
1096
- * @param {CompanyByBrandsRequest} arg.body
1097
- * @summary: Get company by brand uids
1098
- * @description: Get company by brand uids
1118
+ * @summary: Get company/store level integration opt-ins
1119
+ * @description: Get company/store level integration opt-ins
1099
1120
  */
1100
- getCompanyByBrandsPaginator({ pageSize, body } = {}) {
1121
+ getSelectedOptInsPaginator({ level, uid, pageSize } = {}) {
1101
1122
  const paginator = new Paginator();
1102
1123
  const callback = async () => {
1103
1124
  const pageId = paginator.nextId;
1104
1125
  const pageNo = paginator.pageNo;
1105
1126
  const pageType = "number";
1106
- const data = await this.getCompanyByBrands({
1107
- body: body,
1127
+ const data = await this.getSelectedOptIns({
1128
+ level: level,
1129
+ uid: uid,
1108
1130
  pageNo: pageNo,
1109
1131
  pageSize: pageSize,
1110
1132
  });
@@ -1114,7 +1136,7 @@ class Configuration {
1114
1136
  });
1115
1137
  return data;
1116
1138
  };
1117
- paginator.setCallback(callback);
1139
+ paginator.setCallback(callback.bind(this));
1118
1140
  return paginator;
1119
1141
  }
1120
1142
 
@@ -1216,25 +1238,23 @@ class Configuration {
1216
1238
  });
1217
1239
  return data;
1218
1240
  };
1219
- paginator.setCallback(callback);
1241
+ paginator.setCallback(callback.bind(this));
1220
1242
  return paginator;
1221
1243
  }
1222
1244
 
1223
1245
  /**
1224
1246
  * @param {Object} arg - Arg object.
1225
- * @param {number} [arg.pageNo] - Current page no
1226
- * @param {number} [arg.pageSize] - Current request items count
1227
- * @returns {Promise<OtherSellerApplications>} - Success response
1228
- * @summary: Get other seller applications
1229
- * @description: Get other seller applications who has opted current company as inventory
1247
+ * @param {string} arg.id - Application Id
1248
+ * @param {OptOutInventory} arg.body
1249
+ * @returns {Promise<SuccessMessageResponse>} - Success response
1250
+ * @summary: Opt out company or store from other seller application
1251
+ * @description: Opt out company or store from other seller application
1230
1252
  */
1231
- async getOtherSellerApplications({ pageNo, pageSize } = {}) {
1232
- const {
1233
- error,
1234
- } = ConfigurationValidator.getOtherSellerApplications().validate(
1253
+ async optOutFromApplication({ id, body } = {}) {
1254
+ const { error } = ConfigurationValidator.optOutFromApplication().validate(
1235
1255
  {
1236
- pageNo,
1237
- pageSize,
1256
+ id,
1257
+ body,
1238
1258
  },
1239
1259
  { abortEarly: false, allowUnknown: true }
1240
1260
  );
@@ -1245,40 +1265,37 @@ class Configuration {
1245
1265
  // Showing warrnings if extra unknown parameters are found
1246
1266
  const {
1247
1267
  error: warrning,
1248
- } = ConfigurationValidator.getOtherSellerApplications().validate(
1268
+ } = ConfigurationValidator.optOutFromApplication().validate(
1249
1269
  {
1250
- pageNo,
1251
- pageSize,
1270
+ id,
1271
+ body,
1252
1272
  },
1253
1273
  { abortEarly: false, allowUnknown: false }
1254
1274
  );
1255
1275
  if (warrning) {
1256
1276
  Logger({
1257
1277
  level: "WARN",
1258
- message:
1259
- "Parameter Validation warrnings for getOtherSellerApplications",
1278
+ message: "Parameter Validation warrnings for optOutFromApplication",
1260
1279
  });
1261
1280
  Logger({ level: "WARN", message: warrning });
1262
1281
  }
1263
1282
 
1264
1283
  const query_params = {};
1265
- query_params["page_no"] = pageNo;
1266
- query_params["page_size"] = pageSize;
1267
1284
 
1268
1285
  const xHeaders = {};
1269
1286
 
1270
1287
  const response = await PlatformAPIClient.execute(
1271
1288
  this.config,
1272
- "get",
1273
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/`,
1289
+ "put",
1290
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
1274
1291
  query_params,
1275
- undefined,
1292
+ body,
1276
1293
  xHeaders
1277
1294
  );
1278
1295
 
1279
1296
  const {
1280
1297
  error: res_error,
1281
- } = ConfigurationModel.OtherSellerApplications().validate(response, {
1298
+ } = ConfigurationModel.SuccessMessageResponse().validate(response, {
1282
1299
  abortEarly: false,
1283
1300
  allowUnknown: false,
1284
1301
  });
@@ -1286,7 +1303,7 @@ class Configuration {
1286
1303
  if (res_error) {
1287
1304
  Logger({
1288
1305
  level: "WARN",
1289
- message: "Response Validation Warnnings for getOtherSellerApplications",
1306
+ message: "Response Validation Warnnings for optOutFromApplication",
1290
1307
  });
1291
1308
  Logger({ level: "WARN", message: res_error });
1292
1309
  }
@@ -1296,43 +1313,19 @@ class Configuration {
1296
1313
 
1297
1314
  /**
1298
1315
  * @param {Object} arg - Arg object.
1299
- * @param {number} [arg.pageSize] - Current request items count
1300
- * @summary: Get other seller applications
1301
- * @description: Get other seller applications who has opted current company as inventory
1302
- */
1303
- getOtherSellerApplicationsPaginator({ pageSize } = {}) {
1304
- const paginator = new Paginator();
1305
- const callback = async () => {
1306
- const pageId = paginator.nextId;
1307
- const pageNo = paginator.pageNo;
1308
- const pageType = "number";
1309
- const data = await this.getOtherSellerApplications({
1310
- pageNo: pageNo,
1311
- pageSize: pageSize,
1312
- });
1313
- paginator.setPaginator({
1314
- hasNext: data.page.has_next ? true : false,
1315
- nextId: data.page.next_id,
1316
- });
1317
- return data;
1318
- };
1319
- paginator.setCallback(callback);
1320
- return paginator;
1321
- }
1322
-
1323
- /**
1324
- * @param {Object} arg - Arg object.
1325
- * @param {string} arg.id - Application Id
1326
- * @returns {Promise<OptedApplicationResponse>} - Success response
1327
- * @summary: Get other seller applications
1328
- * @description: Get other seller application
1316
+ * @param {string} arg.id - Integration id
1317
+ * @param {string} arg.level - Integration level
1318
+ * @param {UpdateIntegrationLevelRequest} arg.body
1319
+ * @returns {Promise<IntegrationLevel>} - Success response
1320
+ * @summary: Update a store level opt-in for integration
1321
+ * @description: Update a store level opt-in for integration
1329
1322
  */
1330
- async getOtherSellerApplicationById({ id } = {}) {
1331
- const {
1332
- error,
1333
- } = ConfigurationValidator.getOtherSellerApplicationById().validate(
1323
+ async updateLevelIntegration({ id, level, body } = {}) {
1324
+ const { error } = ConfigurationValidator.updateLevelIntegration().validate(
1334
1325
  {
1335
1326
  id,
1327
+ level,
1328
+ body,
1336
1329
  },
1337
1330
  { abortEarly: false, allowUnknown: true }
1338
1331
  );
@@ -1343,17 +1336,18 @@ class Configuration {
1343
1336
  // Showing warrnings if extra unknown parameters are found
1344
1337
  const {
1345
1338
  error: warrning,
1346
- } = ConfigurationValidator.getOtherSellerApplicationById().validate(
1339
+ } = ConfigurationValidator.updateLevelIntegration().validate(
1347
1340
  {
1348
1341
  id,
1342
+ level,
1343
+ body,
1349
1344
  },
1350
1345
  { abortEarly: false, allowUnknown: false }
1351
1346
  );
1352
1347
  if (warrning) {
1353
1348
  Logger({
1354
1349
  level: "WARN",
1355
- message:
1356
- "Parameter Validation warrnings for getOtherSellerApplicationById",
1350
+ message: "Parameter Validation warrnings for updateLevelIntegration",
1357
1351
  });
1358
1352
  Logger({ level: "WARN", message: warrning });
1359
1353
  }
@@ -1364,16 +1358,16 @@ class Configuration {
1364
1358
 
1365
1359
  const response = await PlatformAPIClient.execute(
1366
1360
  this.config,
1367
- "get",
1368
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
1361
+ "put",
1362
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
1369
1363
  query_params,
1370
- undefined,
1364
+ body,
1371
1365
  xHeaders
1372
1366
  );
1373
1367
 
1374
1368
  const {
1375
1369
  error: res_error,
1376
- } = ConfigurationModel.OptedApplicationResponse().validate(response, {
1370
+ } = ConfigurationModel.IntegrationLevel().validate(response, {
1377
1371
  abortEarly: false,
1378
1372
  allowUnknown: false,
1379
1373
  });
@@ -1381,8 +1375,7 @@ class Configuration {
1381
1375
  if (res_error) {
1382
1376
  Logger({
1383
1377
  level: "WARN",
1384
- message:
1385
- "Response Validation Warnnings for getOtherSellerApplicationById",
1378
+ message: "Response Validation Warnnings for updateLevelIntegration",
1386
1379
  });
1387
1380
  Logger({ level: "WARN", message: res_error });
1388
1381
  }
@@ -1392,16 +1385,22 @@ class Configuration {
1392
1385
 
1393
1386
  /**
1394
1387
  * @param {Object} arg - Arg object.
1395
- * @param {string} arg.id - Application Id
1396
- * @param {OptOutInventory} arg.body
1397
- * @returns {Promise<SuccessMessageResponse>} - Success response
1398
- * @summary: Opt out company or store from other seller application
1399
- * @description: Opt out company or store from other seller application
1388
+ * @param {string} arg.id - Integration id
1389
+ * @param {string} arg.level - Integration level
1390
+ * @param {number} arg.uid - Integration level uid
1391
+ * @param {IntegrationLevel} arg.body
1392
+ * @returns {Promise<IntegrationLevel>} - Success response
1393
+ * @summary: Update a store level opt-in for integration
1394
+ * @description: Update a store level opt-in for integration
1400
1395
  */
1401
- async optOutFromApplication({ id, body } = {}) {
1402
- const { error } = ConfigurationValidator.optOutFromApplication().validate(
1396
+ async updateLevelUidIntegration({ id, level, uid, body } = {}) {
1397
+ const {
1398
+ error,
1399
+ } = ConfigurationValidator.updateLevelUidIntegration().validate(
1403
1400
  {
1404
1401
  id,
1402
+ level,
1403
+ uid,
1405
1404
  body,
1406
1405
  },
1407
1406
  { abortEarly: false, allowUnknown: true }
@@ -1413,9 +1412,11 @@ class Configuration {
1413
1412
  // Showing warrnings if extra unknown parameters are found
1414
1413
  const {
1415
1414
  error: warrning,
1416
- } = ConfigurationValidator.optOutFromApplication().validate(
1415
+ } = ConfigurationValidator.updateLevelUidIntegration().validate(
1417
1416
  {
1418
1417
  id,
1418
+ level,
1419
+ uid,
1419
1420
  body,
1420
1421
  },
1421
1422
  { abortEarly: false, allowUnknown: false }
@@ -1423,7 +1424,7 @@ class Configuration {
1423
1424
  if (warrning) {
1424
1425
  Logger({
1425
1426
  level: "WARN",
1426
- message: "Parameter Validation warrnings for optOutFromApplication",
1427
+ message: "Parameter Validation warrnings for updateLevelUidIntegration",
1427
1428
  });
1428
1429
  Logger({ level: "WARN", message: warrning });
1429
1430
  }
@@ -1435,7 +1436,7 @@ class Configuration {
1435
1436
  const response = await PlatformAPIClient.execute(
1436
1437
  this.config,
1437
1438
  "put",
1438
- `/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
1439
+ `/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
1439
1440
  query_params,
1440
1441
  body,
1441
1442
  xHeaders
@@ -1443,7 +1444,7 @@ class Configuration {
1443
1444
 
1444
1445
  const {
1445
1446
  error: res_error,
1446
- } = ConfigurationModel.SuccessMessageResponse().validate(response, {
1447
+ } = ConfigurationModel.IntegrationLevel().validate(response, {
1447
1448
  abortEarly: false,
1448
1449
  allowUnknown: false,
1449
1450
  });
@@ -1451,7 +1452,7 @@ class Configuration {
1451
1452
  if (res_error) {
1452
1453
  Logger({
1453
1454
  level: "WARN",
1454
- message: "Response Validation Warnnings for optOutFromApplication",
1455
+ message: "Response Validation Warnnings for updateLevelUidIntegration",
1455
1456
  });
1456
1457
  Logger({ level: "WARN", message: res_error });
1457
1458
  }