@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 InventoryValidator = require("./InventoryPlatformValidator");
5
5
  const InventoryModel = require("./InventoryPlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
+ const Joi = require("joi");
7
8
 
8
9
  class Inventory {
9
10
  constructor(config) {
@@ -12,17 +13,15 @@ class Inventory {
12
13
 
13
14
  /**
14
15
  * @param {Object} arg - Arg object.
15
- * @param {number} [arg.pageNo] - Page Number
16
- * @param {number} [arg.pageSize] - Page Size
17
- * @returns {Promise<ResponseEnvelopeListJobConfigRawDTO>} - Success response
18
- * @summary: Get Job Configs For A Company
19
- * @description: REST Endpoint that returns all job configs for a company
16
+ * @param {JobConfigDTO} arg.body
17
+ * @returns {Promise<ResponseEnvelopeString>} - Success response
18
+ * @summary: Creates A New Job Config
19
+ * @description: REST Endpoint that creates a new job config
20
20
  */
21
- async getJobsByCompany({ pageNo, pageSize } = {}) {
22
- const { error } = InventoryValidator.getJobsByCompany().validate(
21
+ async createJob({ body } = {}) {
22
+ const { error } = InventoryValidator.createJob().validate(
23
23
  {
24
- pageNo,
25
- pageSize,
24
+ body,
26
25
  },
27
26
  { abortEarly: false, allowUnknown: true }
28
27
  );
@@ -31,47 +30,44 @@ class Inventory {
31
30
  }
32
31
 
33
32
  // Showing warrnings if extra unknown parameters are found
34
- const { error: warrning } = InventoryValidator.getJobsByCompany().validate(
33
+ const { error: warrning } = InventoryValidator.createJob().validate(
35
34
  {
36
- pageNo,
37
- pageSize,
35
+ body,
38
36
  },
39
37
  { abortEarly: false, allowUnknown: false }
40
38
  );
41
39
  if (warrning) {
42
40
  Logger({
43
41
  level: "WARN",
44
- message: "Parameter Validation warrnings for getJobsByCompany",
42
+ message: "Parameter Validation warrnings for createJob",
45
43
  });
46
44
  Logger({ level: "WARN", message: warrning });
47
45
  }
48
46
 
49
47
  const query_params = {};
50
- query_params["page_no"] = pageNo;
51
- query_params["page_size"] = pageSize;
52
48
 
53
49
  const xHeaders = {};
54
50
 
55
51
  const response = await PlatformAPIClient.execute(
56
52
  this.config,
57
- "get",
53
+ "post",
58
54
  `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
59
55
  query_params,
60
- undefined,
56
+ body,
61
57
  xHeaders
62
58
  );
63
59
 
64
60
  const {
65
61
  error: res_error,
66
- } = InventoryModel.ResponseEnvelopeListJobConfigRawDTO().validate(
67
- response,
68
- { abortEarly: false, allowUnknown: false }
69
- );
62
+ } = InventoryModel.ResponseEnvelopeString().validate(response, {
63
+ abortEarly: false,
64
+ allowUnknown: false,
65
+ });
70
66
 
71
67
  if (res_error) {
72
68
  Logger({
73
69
  level: "WARN",
74
- message: "Response Validation Warnnings for getJobsByCompany",
70
+ message: "Response Validation Warnnings for createJob",
75
71
  });
76
72
  Logger({ level: "WARN", message: res_error });
77
73
  }
@@ -81,15 +77,15 @@ class Inventory {
81
77
 
82
78
  /**
83
79
  * @param {Object} arg - Arg object.
84
- * @param {JobConfigDTO} arg.body
80
+ * @param {string} arg.integrationId - IntegrationId
85
81
  * @returns {Promise<ResponseEnvelopeString>} - Success response
86
- * @summary: Updates An Existing Job Config
87
- * @description: REST Endpoint that updates a job config
82
+ * @summary: Disable Job Config
83
+ * @description: REST Endpoint that disables Inventory Job Config
88
84
  */
89
- async updateJob({ body } = {}) {
90
- const { error } = InventoryValidator.updateJob().validate(
85
+ async disable({ integrationId } = {}) {
86
+ const { error } = InventoryValidator.disable().validate(
91
87
  {
92
- body,
88
+ integrationId,
93
89
  },
94
90
  { abortEarly: false, allowUnknown: true }
95
91
  );
@@ -98,16 +94,16 @@ class Inventory {
98
94
  }
99
95
 
100
96
  // Showing warrnings if extra unknown parameters are found
101
- const { error: warrning } = InventoryValidator.updateJob().validate(
97
+ const { error: warrning } = InventoryValidator.disable().validate(
102
98
  {
103
- body,
99
+ integrationId,
104
100
  },
105
101
  { abortEarly: false, allowUnknown: false }
106
102
  );
107
103
  if (warrning) {
108
104
  Logger({
109
105
  level: "WARN",
110
- message: "Parameter Validation warrnings for updateJob",
106
+ message: "Parameter Validation warrnings for disable",
111
107
  });
112
108
  Logger({ level: "WARN", message: warrning });
113
109
  }
@@ -118,10 +114,10 @@ class Inventory {
118
114
 
119
115
  const response = await PlatformAPIClient.execute(
120
116
  this.config,
121
- "put",
122
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
117
+ "get",
118
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/disable/integration/${integrationId}`,
123
119
  query_params,
124
- body,
120
+ undefined,
125
121
  xHeaders
126
122
  );
127
123
 
@@ -135,7 +131,7 @@ class Inventory {
135
131
  if (res_error) {
136
132
  Logger({
137
133
  level: "WARN",
138
- message: "Response Validation Warnnings for updateJob",
134
+ message: "Response Validation Warnnings for disable",
139
135
  });
140
136
  Logger({ level: "WARN", message: res_error });
141
137
  }
@@ -145,16 +141,14 @@ class Inventory {
145
141
 
146
142
  /**
147
143
  * @param {Object} arg - Arg object.
148
- * @param {JobConfigDTO} arg.body
149
- * @returns {Promise<ResponseEnvelopeString>} - Success response
150
- * @summary: Creates A New Job Config
151
- * @description: REST Endpoint that creates a new job config
144
+ * @returns {Promise<ResponseEnvelopeListSlingshotConfigurationDetail>} -
145
+ * Success response
146
+ * @summary: Get Slingshot Configuration Of A Company
147
+ * @description: REST Endpoint that returns all configuration detail of a company
152
148
  */
153
- async createJob({ body } = {}) {
154
- const { error } = InventoryValidator.createJob().validate(
155
- {
156
- body,
157
- },
149
+ async getConfigByCompany({} = {}) {
150
+ const { error } = InventoryValidator.getConfigByCompany().validate(
151
+ {},
158
152
  { abortEarly: false, allowUnknown: true }
159
153
  );
160
154
  if (error) {
@@ -162,16 +156,16 @@ class Inventory {
162
156
  }
163
157
 
164
158
  // Showing warrnings if extra unknown parameters are found
165
- const { error: warrning } = InventoryValidator.createJob().validate(
166
- {
167
- body,
168
- },
159
+ const {
160
+ error: warrning,
161
+ } = InventoryValidator.getConfigByCompany().validate(
162
+ {},
169
163
  { abortEarly: false, allowUnknown: false }
170
164
  );
171
165
  if (warrning) {
172
166
  Logger({
173
167
  level: "WARN",
174
- message: "Parameter Validation warrnings for createJob",
168
+ message: "Parameter Validation warrnings for getConfigByCompany",
175
169
  });
176
170
  Logger({ level: "WARN", message: warrning });
177
171
  }
@@ -182,24 +176,24 @@ class Inventory {
182
176
 
183
177
  const response = await PlatformAPIClient.execute(
184
178
  this.config,
185
- "post",
186
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
179
+ "get",
180
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/slingshot`,
187
181
  query_params,
188
- body,
182
+ undefined,
189
183
  xHeaders
190
184
  );
191
185
 
192
186
  const {
193
187
  error: res_error,
194
- } = InventoryModel.ResponseEnvelopeString().validate(response, {
195
- abortEarly: false,
196
- allowUnknown: false,
197
- });
188
+ } = InventoryModel.ResponseEnvelopeListSlingshotConfigurationDetail().validate(
189
+ response,
190
+ { abortEarly: false, allowUnknown: false }
191
+ );
198
192
 
199
193
  if (res_error) {
200
194
  Logger({
201
195
  level: "WARN",
202
- message: "Response Validation Warnnings for createJob",
196
+ message: "Response Validation Warnnings for getConfigByCompany",
203
197
  });
204
198
  Logger({ level: "WARN", message: res_error });
205
199
  }
@@ -209,15 +203,15 @@ class Inventory {
209
203
 
210
204
  /**
211
205
  * @param {Object} arg - Arg object.
212
- * @param {SuppressStorePayload} arg.body
213
- * @returns {Promise<ResponseEnvelopeKafkaResponse>} - Success response
214
- * @summary: Get Slingshot Configuration Of A Company
215
- * @description: REST Endpoint that returns all configuration detail of a company
206
+ * @param {string} arg.code - Job Code
207
+ * @returns {Promise<ResponseEnvelopeJobConfigDTO>} - Success response
208
+ * @summary: Get Job Config By Code
209
+ * @description: REST Endpoint that returns job config by code
216
210
  */
217
- async suppressStores({ body } = {}) {
218
- const { error } = InventoryValidator.suppressStores().validate(
211
+ async getJobByCode({ code } = {}) {
212
+ const { error } = InventoryValidator.getJobByCode().validate(
219
213
  {
220
- body,
214
+ code,
221
215
  },
222
216
  { abortEarly: false, allowUnknown: true }
223
217
  );
@@ -226,16 +220,16 @@ class Inventory {
226
220
  }
227
221
 
228
222
  // Showing warrnings if extra unknown parameters are found
229
- const { error: warrning } = InventoryValidator.suppressStores().validate(
223
+ const { error: warrning } = InventoryValidator.getJobByCode().validate(
230
224
  {
231
- body,
225
+ code,
232
226
  },
233
227
  { abortEarly: false, allowUnknown: false }
234
228
  );
235
229
  if (warrning) {
236
230
  Logger({
237
231
  level: "WARN",
238
- message: "Parameter Validation warrnings for suppressStores",
232
+ message: "Parameter Validation warrnings for getJobByCode",
239
233
  });
240
234
  Logger({ level: "WARN", message: warrning });
241
235
  }
@@ -246,16 +240,16 @@ class Inventory {
246
240
 
247
241
  const response = await PlatformAPIClient.execute(
248
242
  this.config,
249
- "post",
250
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/kafka/suppressStore`,
243
+ "get",
244
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/${code}`,
251
245
  query_params,
252
- body,
246
+ undefined,
253
247
  xHeaders
254
248
  );
255
249
 
256
250
  const {
257
251
  error: res_error,
258
- } = InventoryModel.ResponseEnvelopeKafkaResponse().validate(response, {
252
+ } = InventoryModel.ResponseEnvelopeJobConfigDTO().validate(response, {
259
253
  abortEarly: false,
260
254
  allowUnknown: false,
261
255
  });
@@ -263,7 +257,7 @@ class Inventory {
263
257
  if (res_error) {
264
258
  Logger({
265
259
  level: "WARN",
266
- message: "Response Validation Warnnings for suppressStores",
260
+ message: "Response Validation Warnnings for getJobByCode",
267
261
  });
268
262
  Logger({ level: "WARN", message: res_error });
269
263
  }
@@ -273,14 +267,26 @@ class Inventory {
273
267
 
274
268
  /**
275
269
  * @param {Object} arg - Arg object.
276
- * @returns {Promise<ResponseEnvelopeListSlingshotConfigurationDetail>} -
277
- * Success response
278
- * @summary: Get Slingshot Configuration Of A Company
279
- * @description: REST Endpoint that returns all configuration detail of a company
270
+ * @param {string} arg.integrationId - Integration Id
271
+ * @param {number} [arg.pageNo] - Page Number
272
+ * @param {number} [arg.pageSize] - Page Size
273
+ * @returns {Promise<ResponseEnvelopeListJobConfigDTO>} - Success response
274
+ * @summary: Get Job Configs By Company And Integration
275
+ * @description: REST Endpoint that returns all job configs by company And integration
280
276
  */
281
- async getConfigByCompany({} = {}) {
282
- const { error } = InventoryValidator.getConfigByCompany().validate(
283
- {},
277
+ async getJobByCompanyAndIntegration({
278
+ integrationId,
279
+ pageNo,
280
+ pageSize,
281
+ } = {}) {
282
+ const {
283
+ error,
284
+ } = InventoryValidator.getJobByCompanyAndIntegration().validate(
285
+ {
286
+ integrationId,
287
+ pageNo,
288
+ pageSize,
289
+ },
284
290
  { abortEarly: false, allowUnknown: true }
285
291
  );
286
292
  if (error) {
@@ -290,26 +296,33 @@ class Inventory {
290
296
  // Showing warrnings if extra unknown parameters are found
291
297
  const {
292
298
  error: warrning,
293
- } = InventoryValidator.getConfigByCompany().validate(
294
- {},
299
+ } = InventoryValidator.getJobByCompanyAndIntegration().validate(
300
+ {
301
+ integrationId,
302
+ pageNo,
303
+ pageSize,
304
+ },
295
305
  { abortEarly: false, allowUnknown: false }
296
306
  );
297
307
  if (warrning) {
298
308
  Logger({
299
309
  level: "WARN",
300
- message: "Parameter Validation warrnings for getConfigByCompany",
310
+ message:
311
+ "Parameter Validation warrnings for getJobByCompanyAndIntegration",
301
312
  });
302
313
  Logger({ level: "WARN", message: warrning });
303
314
  }
304
315
 
305
316
  const query_params = {};
317
+ query_params["page_no"] = pageNo;
318
+ query_params["page_size"] = pageSize;
306
319
 
307
320
  const xHeaders = {};
308
321
 
309
322
  const response = await PlatformAPIClient.execute(
310
323
  this.config,
311
324
  "get",
312
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/slingshot`,
325
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/integration/${integrationId}`,
313
326
  query_params,
314
327
  undefined,
315
328
  xHeaders
@@ -317,15 +330,16 @@ class Inventory {
317
330
 
318
331
  const {
319
332
  error: res_error,
320
- } = InventoryModel.ResponseEnvelopeListSlingshotConfigurationDetail().validate(
321
- response,
322
- { abortEarly: false, allowUnknown: false }
323
- );
333
+ } = InventoryModel.ResponseEnvelopeListJobConfigDTO().validate(response, {
334
+ abortEarly: false,
335
+ allowUnknown: false,
336
+ });
324
337
 
325
338
  if (res_error) {
326
339
  Logger({
327
340
  level: "WARN",
328
- message: "Response Validation Warnnings for getConfigByCompany",
341
+ message:
342
+ "Response Validation Warnnings for getJobByCompanyAndIntegration",
329
343
  });
330
344
  Logger({ level: "WARN", message: res_error });
331
345
  }
@@ -335,15 +349,23 @@ class Inventory {
335
349
 
336
350
  /**
337
351
  * @param {Object} arg - Arg object.
338
- * @param {number} arg.jobId - Job Id
339
- * @returns {Promise<ResponseEnvelopeListJobStepsDTO>} - Success response
340
- * @summary: Get Job Code Steps
341
- * @description: REST Endpoint that returns Inventory Job Steps
352
+ * @param {string} arg.code - Code
353
+ * @param {number} [arg.pageNo] - Page Number
354
+ * @param {number} [arg.pageSize] - Page Size
355
+ * @param {string} [arg.status] - Status
356
+ * @param {string} [arg.date] - From Date
357
+ * @returns {Promise<ResponseEnvelopeJobMetricsDto>} - Success response
358
+ * @summary: Get Job Metrics
359
+ * @description: REST Endpoint that returns Inventory Run History For A Job Code
342
360
  */
343
- async getJobSteps({ jobId } = {}) {
344
- const { error } = InventoryValidator.getJobSteps().validate(
361
+ async getJobCodeMetrics({ code, pageNo, pageSize, status, date } = {}) {
362
+ const { error } = InventoryValidator.getJobCodeMetrics().validate(
345
363
  {
346
- jobId,
364
+ code,
365
+ pageNo,
366
+ pageSize,
367
+ status,
368
+ date,
347
369
  },
348
370
  { abortEarly: false, allowUnknown: true }
349
371
  );
@@ -352,28 +374,36 @@ class Inventory {
352
374
  }
353
375
 
354
376
  // Showing warrnings if extra unknown parameters are found
355
- const { error: warrning } = InventoryValidator.getJobSteps().validate(
377
+ const { error: warrning } = InventoryValidator.getJobCodeMetrics().validate(
356
378
  {
357
- jobId,
379
+ code,
380
+ pageNo,
381
+ pageSize,
382
+ status,
383
+ date,
358
384
  },
359
385
  { abortEarly: false, allowUnknown: false }
360
386
  );
361
387
  if (warrning) {
362
388
  Logger({
363
389
  level: "WARN",
364
- message: "Parameter Validation warrnings for getJobSteps",
390
+ message: "Parameter Validation warrnings for getJobCodeMetrics",
365
391
  });
366
392
  Logger({ level: "WARN", message: warrning });
367
393
  }
368
394
 
369
395
  const query_params = {};
396
+ query_params["page_no"] = pageNo;
397
+ query_params["page_size"] = pageSize;
398
+ query_params["status"] = status;
399
+ query_params["date"] = date;
370
400
 
371
401
  const xHeaders = {};
372
402
 
373
403
  const response = await PlatformAPIClient.execute(
374
404
  this.config,
375
405
  "get",
376
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/steps/${jobId}`,
406
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/${code}/metrics`,
377
407
  query_params,
378
408
  undefined,
379
409
  xHeaders
@@ -381,7 +411,7 @@ class Inventory {
381
411
 
382
412
  const {
383
413
  error: res_error,
384
- } = InventoryModel.ResponseEnvelopeListJobStepsDTO().validate(response, {
414
+ } = InventoryModel.ResponseEnvelopeJobMetricsDto().validate(response, {
385
415
  abortEarly: false,
386
416
  allowUnknown: false,
387
417
  });
@@ -389,7 +419,7 @@ class Inventory {
389
419
  if (res_error) {
390
420
  Logger({
391
421
  level: "WARN",
392
- message: "Response Validation Warnnings for getJobSteps",
422
+ message: "Response Validation Warnnings for getJobCodeMetrics",
393
423
  });
394
424
  Logger({ level: "WARN", message: res_error });
395
425
  }
@@ -402,18 +432,18 @@ class Inventory {
402
432
  * @param {string} arg.integrationId - Integration Id
403
433
  * @param {number} [arg.pageNo] - Page Number
404
434
  * @param {number} [arg.pageSize] - Page Size
405
- * @returns {Promise<ResponseEnvelopeListJobConfigDTO>} - Success response
406
- * @summary: Get Job Configs By Company And Integration
407
- * @description: REST Endpoint that returns all job configs by company And integration
435
+ * @returns {Promise<ResponseEnvelopeListJobConfigListDTO>} - Success response
436
+ * @summary: Get Job Codes By Company And Integration
437
+ * @description: REST Endpoint that returns all job codes by company And integration
408
438
  */
409
- async getJobByCompanyAndIntegration({
439
+ async getJobCodesByCompanyAndIntegration({
410
440
  integrationId,
411
441
  pageNo,
412
442
  pageSize,
413
443
  } = {}) {
414
444
  const {
415
445
  error,
416
- } = InventoryValidator.getJobByCompanyAndIntegration().validate(
446
+ } = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
417
447
  {
418
448
  integrationId,
419
449
  pageNo,
@@ -428,7 +458,7 @@ class Inventory {
428
458
  // Showing warrnings if extra unknown parameters are found
429
459
  const {
430
460
  error: warrning,
431
- } = InventoryValidator.getJobByCompanyAndIntegration().validate(
461
+ } = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
432
462
  {
433
463
  integrationId,
434
464
  pageNo,
@@ -440,7 +470,7 @@ class Inventory {
440
470
  Logger({
441
471
  level: "WARN",
442
472
  message:
443
- "Parameter Validation warrnings for getJobByCompanyAndIntegration",
473
+ "Parameter Validation warrnings for getJobCodesByCompanyAndIntegration",
444
474
  });
445
475
  Logger({ level: "WARN", message: warrning });
446
476
  }
@@ -454,7 +484,7 @@ class Inventory {
454
484
  const response = await PlatformAPIClient.execute(
455
485
  this.config,
456
486
  "get",
457
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/integration/${integrationId}`,
487
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/integration/${integrationId}`,
458
488
  query_params,
459
489
  undefined,
460
490
  xHeaders
@@ -462,16 +492,16 @@ class Inventory {
462
492
 
463
493
  const {
464
494
  error: res_error,
465
- } = InventoryModel.ResponseEnvelopeListJobConfigDTO().validate(response, {
466
- abortEarly: false,
467
- allowUnknown: false,
468
- });
495
+ } = InventoryModel.ResponseEnvelopeListJobConfigListDTO().validate(
496
+ response,
497
+ { abortEarly: false, allowUnknown: false }
498
+ );
469
499
 
470
500
  if (res_error) {
471
501
  Logger({
472
502
  level: "WARN",
473
503
  message:
474
- "Response Validation Warnnings for getJobByCompanyAndIntegration",
504
+ "Response Validation Warnnings for getJobCodesByCompanyAndIntegration",
475
505
  });
476
506
  Logger({ level: "WARN", message: res_error });
477
507
  }
@@ -481,16 +511,13 @@ class Inventory {
481
511
 
482
512
  /**
483
513
  * @param {Object} arg - Arg object.
484
- * @param {string} arg.integrationId - IntegrationId
485
- * @returns {Promise<ResponseEnvelopeString>} - Success response
486
- * @summary: Disable Job Config
487
- * @description: REST Endpoint that disables Inventory Job Config
514
+ * @returns {Promise<ResponseEnvelopeJobConfigDTO>} - Success response
515
+ * @summary: Get Job Configs Defaults
516
+ * @description: REST Endpoint that returns default fields job configs by company And integration
488
517
  */
489
- async disable({ integrationId } = {}) {
490
- const { error } = InventoryValidator.disable().validate(
491
- {
492
- integrationId,
493
- },
518
+ async getJobConfigDefaults({} = {}) {
519
+ const { error } = InventoryValidator.getJobConfigDefaults().validate(
520
+ {},
494
521
  { abortEarly: false, allowUnknown: true }
495
522
  );
496
523
  if (error) {
@@ -498,16 +525,16 @@ class Inventory {
498
525
  }
499
526
 
500
527
  // Showing warrnings if extra unknown parameters are found
501
- const { error: warrning } = InventoryValidator.disable().validate(
502
- {
503
- integrationId,
504
- },
528
+ const {
529
+ error: warrning,
530
+ } = InventoryValidator.getJobConfigDefaults().validate(
531
+ {},
505
532
  { abortEarly: false, allowUnknown: false }
506
533
  );
507
534
  if (warrning) {
508
535
  Logger({
509
536
  level: "WARN",
510
- message: "Parameter Validation warrnings for disable",
537
+ message: "Parameter Validation warrnings for getJobConfigDefaults",
511
538
  });
512
539
  Logger({ level: "WARN", message: warrning });
513
540
  }
@@ -519,7 +546,7 @@ class Inventory {
519
546
  const response = await PlatformAPIClient.execute(
520
547
  this.config,
521
548
  "get",
522
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/disable/integration/${integrationId}`,
549
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/defaults`,
523
550
  query_params,
524
551
  undefined,
525
552
  xHeaders
@@ -527,7 +554,7 @@ class Inventory {
527
554
 
528
555
  const {
529
556
  error: res_error,
530
- } = InventoryModel.ResponseEnvelopeString().validate(response, {
557
+ } = InventoryModel.ResponseEnvelopeJobConfigDTO().validate(response, {
531
558
  abortEarly: false,
532
559
  allowUnknown: false,
533
560
  });
@@ -535,7 +562,7 @@ class Inventory {
535
562
  if (res_error) {
536
563
  Logger({
537
564
  level: "WARN",
538
- message: "Response Validation Warnnings for disable",
565
+ message: "Response Validation Warnnings for getJobConfigDefaults",
539
566
  });
540
567
  Logger({ level: "WARN", message: res_error });
541
568
  }
@@ -545,13 +572,16 @@ class Inventory {
545
572
 
546
573
  /**
547
574
  * @param {Object} arg - Arg object.
548
- * @returns {Promise<ResponseEnvelopeJobConfigDTO>} - Success response
549
- * @summary: Get Job Configs Defaults
550
- * @description: REST Endpoint that returns default fields job configs by company And integration
575
+ * @param {number} arg.jobId - Job Id
576
+ * @returns {Promise<ResponseEnvelopeListJobStepsDTO>} - Success response
577
+ * @summary: Get Job Code Steps
578
+ * @description: REST Endpoint that returns Inventory Job Steps
551
579
  */
552
- async getJobConfigDefaults({} = {}) {
553
- const { error } = InventoryValidator.getJobConfigDefaults().validate(
554
- {},
580
+ async getJobSteps({ jobId } = {}) {
581
+ const { error } = InventoryValidator.getJobSteps().validate(
582
+ {
583
+ jobId,
584
+ },
555
585
  { abortEarly: false, allowUnknown: true }
556
586
  );
557
587
  if (error) {
@@ -559,16 +589,16 @@ class Inventory {
559
589
  }
560
590
 
561
591
  // Showing warrnings if extra unknown parameters are found
562
- const {
563
- error: warrning,
564
- } = InventoryValidator.getJobConfigDefaults().validate(
565
- {},
592
+ const { error: warrning } = InventoryValidator.getJobSteps().validate(
593
+ {
594
+ jobId,
595
+ },
566
596
  { abortEarly: false, allowUnknown: false }
567
597
  );
568
598
  if (warrning) {
569
599
  Logger({
570
600
  level: "WARN",
571
- message: "Parameter Validation warrnings for getJobConfigDefaults",
601
+ message: "Parameter Validation warrnings for getJobSteps",
572
602
  });
573
603
  Logger({ level: "WARN", message: warrning });
574
604
  }
@@ -580,7 +610,7 @@ class Inventory {
580
610
  const response = await PlatformAPIClient.execute(
581
611
  this.config,
582
612
  "get",
583
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/defaults`,
613
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/steps/${jobId}`,
584
614
  query_params,
585
615
  undefined,
586
616
  xHeaders
@@ -588,7 +618,7 @@ class Inventory {
588
618
 
589
619
  const {
590
620
  error: res_error,
591
- } = InventoryModel.ResponseEnvelopeJobConfigDTO().validate(response, {
621
+ } = InventoryModel.ResponseEnvelopeListJobStepsDTO().validate(response, {
592
622
  abortEarly: false,
593
623
  allowUnknown: false,
594
624
  });
@@ -596,7 +626,7 @@ class Inventory {
596
626
  if (res_error) {
597
627
  Logger({
598
628
  level: "WARN",
599
- message: "Response Validation Warnnings for getJobConfigDefaults",
629
+ message: "Response Validation Warnnings for getJobSteps",
600
630
  });
601
631
  Logger({ level: "WARN", message: res_error });
602
632
  }
@@ -606,15 +636,17 @@ class Inventory {
606
636
 
607
637
  /**
608
638
  * @param {Object} arg - Arg object.
609
- * @param {string} arg.code - Job Code
610
- * @returns {Promise<ResponseEnvelopeJobConfigDTO>} - Success response
611
- * @summary: Get Job Config By Code
612
- * @description: REST Endpoint that returns job config by code
639
+ * @param {number} [arg.pageNo] - Page Number
640
+ * @param {number} [arg.pageSize] - Page Size
641
+ * @returns {Promise<ResponseEnvelopeListJobConfigRawDTO>} - Success response
642
+ * @summary: Get Job Configs For A Company
643
+ * @description: REST Endpoint that returns all job configs for a company
613
644
  */
614
- async getJobByCode({ code } = {}) {
615
- const { error } = InventoryValidator.getJobByCode().validate(
645
+ async getJobsByCompany({ pageNo, pageSize } = {}) {
646
+ const { error } = InventoryValidator.getJobsByCompany().validate(
616
647
  {
617
- code,
648
+ pageNo,
649
+ pageSize,
618
650
  },
619
651
  { abortEarly: false, allowUnknown: true }
620
652
  );
@@ -623,28 +655,31 @@ class Inventory {
623
655
  }
624
656
 
625
657
  // Showing warrnings if extra unknown parameters are found
626
- const { error: warrning } = InventoryValidator.getJobByCode().validate(
658
+ const { error: warrning } = InventoryValidator.getJobsByCompany().validate(
627
659
  {
628
- code,
660
+ pageNo,
661
+ pageSize,
629
662
  },
630
663
  { abortEarly: false, allowUnknown: false }
631
664
  );
632
665
  if (warrning) {
633
666
  Logger({
634
667
  level: "WARN",
635
- message: "Parameter Validation warrnings for getJobByCode",
668
+ message: "Parameter Validation warrnings for getJobsByCompany",
636
669
  });
637
670
  Logger({ level: "WARN", message: warrning });
638
671
  }
639
672
 
640
673
  const query_params = {};
674
+ query_params["page_no"] = pageNo;
675
+ query_params["page_size"] = pageSize;
641
676
 
642
677
  const xHeaders = {};
643
678
 
644
679
  const response = await PlatformAPIClient.execute(
645
680
  this.config,
646
681
  "get",
647
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/${code}`,
682
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
648
683
  query_params,
649
684
  undefined,
650
685
  xHeaders
@@ -652,15 +687,15 @@ class Inventory {
652
687
 
653
688
  const {
654
689
  error: res_error,
655
- } = InventoryModel.ResponseEnvelopeJobConfigDTO().validate(response, {
656
- abortEarly: false,
657
- allowUnknown: false,
658
- });
690
+ } = InventoryModel.ResponseEnvelopeListJobConfigRawDTO().validate(
691
+ response,
692
+ { abortEarly: false, allowUnknown: false }
693
+ );
659
694
 
660
695
  if (res_error) {
661
696
  Logger({
662
697
  level: "WARN",
663
- message: "Response Validation Warnnings for getJobByCode",
698
+ message: "Response Validation Warnnings for getJobsByCompany",
664
699
  });
665
700
  Logger({ level: "WARN", message: res_error });
666
701
  }
@@ -670,23 +705,15 @@ class Inventory {
670
705
 
671
706
  /**
672
707
  * @param {Object} arg - Arg object.
673
- * @param {string} arg.code - Code
674
- * @param {number} [arg.pageNo] - Page Number
675
- * @param {number} [arg.pageSize] - Page Size
676
- * @param {string} [arg.status] - Status
677
- * @param {string} [arg.date] - From Date
678
- * @returns {Promise<ResponseEnvelopeJobMetricsDto>} - Success response
679
- * @summary: Get Job Metrics
680
- * @description: REST Endpoint that returns Inventory Run History For A Job Code
708
+ * @param {SuppressStorePayload} arg.body
709
+ * @returns {Promise<ResponseEnvelopeKafkaResponse>} - Success response
710
+ * @summary: Get Slingshot Configuration Of A Company
711
+ * @description: REST Endpoint that returns all configuration detail of a company
681
712
  */
682
- async getJobCodeMetrics({ code, pageNo, pageSize, status, date } = {}) {
683
- const { error } = InventoryValidator.getJobCodeMetrics().validate(
713
+ async suppressStores({ body } = {}) {
714
+ const { error } = InventoryValidator.suppressStores().validate(
684
715
  {
685
- code,
686
- pageNo,
687
- pageSize,
688
- status,
689
- date,
716
+ body,
690
717
  },
691
718
  { abortEarly: false, allowUnknown: true }
692
719
  );
@@ -695,44 +722,36 @@ class Inventory {
695
722
  }
696
723
 
697
724
  // Showing warrnings if extra unknown parameters are found
698
- const { error: warrning } = InventoryValidator.getJobCodeMetrics().validate(
725
+ const { error: warrning } = InventoryValidator.suppressStores().validate(
699
726
  {
700
- code,
701
- pageNo,
702
- pageSize,
703
- status,
704
- date,
727
+ body,
705
728
  },
706
729
  { abortEarly: false, allowUnknown: false }
707
730
  );
708
731
  if (warrning) {
709
732
  Logger({
710
733
  level: "WARN",
711
- message: "Parameter Validation warrnings for getJobCodeMetrics",
734
+ message: "Parameter Validation warrnings for suppressStores",
712
735
  });
713
736
  Logger({ level: "WARN", message: warrning });
714
737
  }
715
738
 
716
739
  const query_params = {};
717
- query_params["page_no"] = pageNo;
718
- query_params["page_size"] = pageSize;
719
- query_params["status"] = status;
720
- query_params["date"] = date;
721
740
 
722
741
  const xHeaders = {};
723
742
 
724
743
  const response = await PlatformAPIClient.execute(
725
744
  this.config,
726
- "get",
727
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/${code}/metrics`,
745
+ "post",
746
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/kafka/suppressStore`,
728
747
  query_params,
729
- undefined,
748
+ body,
730
749
  xHeaders
731
750
  );
732
751
 
733
752
  const {
734
753
  error: res_error,
735
- } = InventoryModel.ResponseEnvelopeJobMetricsDto().validate(response, {
754
+ } = InventoryModel.ResponseEnvelopeKafkaResponse().validate(response, {
736
755
  abortEarly: false,
737
756
  allowUnknown: false,
738
757
  });
@@ -740,7 +759,7 @@ class Inventory {
740
759
  if (res_error) {
741
760
  Logger({
742
761
  level: "WARN",
743
- message: "Response Validation Warnnings for getJobCodeMetrics",
762
+ message: "Response Validation Warnnings for suppressStores",
744
763
  });
745
764
  Logger({ level: "WARN", message: res_error });
746
765
  }
@@ -750,25 +769,15 @@ class Inventory {
750
769
 
751
770
  /**
752
771
  * @param {Object} arg - Arg object.
753
- * @param {string} arg.integrationId - Integration Id
754
- * @param {number} [arg.pageNo] - Page Number
755
- * @param {number} [arg.pageSize] - Page Size
756
- * @returns {Promise<ResponseEnvelopeListJobConfigListDTO>} - Success response
757
- * @summary: Get Job Codes By Company And Integration
758
- * @description: REST Endpoint that returns all job codes by company And integration
772
+ * @param {JobConfigDTO} arg.body
773
+ * @returns {Promise<ResponseEnvelopeString>} - Success response
774
+ * @summary: Updates An Existing Job Config
775
+ * @description: REST Endpoint that updates a job config
759
776
  */
760
- async getJobCodesByCompanyAndIntegration({
761
- integrationId,
762
- pageNo,
763
- pageSize,
764
- } = {}) {
765
- const {
766
- error,
767
- } = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
777
+ async updateJob({ body } = {}) {
778
+ const { error } = InventoryValidator.updateJob().validate(
768
779
  {
769
- integrationId,
770
- pageNo,
771
- pageSize,
780
+ body,
772
781
  },
773
782
  { abortEarly: false, allowUnknown: true }
774
783
  );
@@ -777,52 +786,44 @@ class Inventory {
777
786
  }
778
787
 
779
788
  // Showing warrnings if extra unknown parameters are found
780
- const {
781
- error: warrning,
782
- } = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
789
+ const { error: warrning } = InventoryValidator.updateJob().validate(
783
790
  {
784
- integrationId,
785
- pageNo,
786
- pageSize,
791
+ body,
787
792
  },
788
793
  { abortEarly: false, allowUnknown: false }
789
794
  );
790
795
  if (warrning) {
791
796
  Logger({
792
797
  level: "WARN",
793
- message:
794
- "Parameter Validation warrnings for getJobCodesByCompanyAndIntegration",
798
+ message: "Parameter Validation warrnings for updateJob",
795
799
  });
796
800
  Logger({ level: "WARN", message: warrning });
797
801
  }
798
802
 
799
803
  const query_params = {};
800
- query_params["page_no"] = pageNo;
801
- query_params["page_size"] = pageSize;
802
804
 
803
805
  const xHeaders = {};
804
806
 
805
807
  const response = await PlatformAPIClient.execute(
806
808
  this.config,
807
- "get",
808
- `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/integration/${integrationId}`,
809
+ "put",
810
+ `/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
809
811
  query_params,
810
- undefined,
812
+ body,
811
813
  xHeaders
812
814
  );
813
815
 
814
816
  const {
815
817
  error: res_error,
816
- } = InventoryModel.ResponseEnvelopeListJobConfigListDTO().validate(
817
- response,
818
- { abortEarly: false, allowUnknown: false }
819
- );
818
+ } = InventoryModel.ResponseEnvelopeString().validate(response, {
819
+ abortEarly: false,
820
+ allowUnknown: false,
821
+ });
820
822
 
821
823
  if (res_error) {
822
824
  Logger({
823
825
  level: "WARN",
824
- message:
825
- "Response Validation Warnnings for getJobCodesByCompanyAndIntegration",
826
+ message: "Response Validation Warnnings for updateJob",
826
827
  });
827
828
  Logger({ level: "WARN", message: res_error });
828
829
  }