@ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.1 → 1.0.0-beta.10

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 (307) hide show
  1. package/README.md +19 -752
  2. package/dist/browser/ezreeport-sdk-js.mjs +1054 -891
  3. package/dist/browser/ezreeport-sdk-js.mjs.map +1 -1
  4. package/dist/browser/ezreeport-sdk-js.umd.js +5 -3
  5. package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -1
  6. package/dist/dist/browser/ezreeport-sdk-js.mjs +2426 -0
  7. package/dist/dist/browser/ezreeport-sdk-js.mjs.map +1 -0
  8. package/dist/dist/browser/ezreeport-sdk-js.umd.js +6 -0
  9. package/dist/dist/browser/ezreeport-sdk-js.umd.js.map +1 -0
  10. package/dist/dist/dist/browser/ezreeport-sdk-js.mjs +2426 -0
  11. package/dist/dist/dist/browser/ezreeport-sdk-js.mjs.map +1 -0
  12. package/dist/dist/dist/browser/ezreeport-sdk-js.umd.js +6 -0
  13. package/dist/dist/dist/browser/ezreeport-sdk-js.umd.js.map +1 -0
  14. package/dist/dist/dist/node/package.json +58 -0
  15. package/dist/dist/dist/node/src/index.js +43 -0
  16. package/dist/dist/dist/node/src/index.js.map +1 -0
  17. package/dist/dist/dist/node/src/lib/axios.js +95 -0
  18. package/dist/dist/dist/node/src/lib/axios.js.map +1 -0
  19. package/dist/dist/dist/node/src/lib/promises.js +41 -0
  20. package/dist/dist/dist/node/src/lib/promises.js.map +1 -0
  21. package/dist/dist/dist/node/src/lib/utils.js +24 -0
  22. package/dist/dist/dist/node/src/lib/utils.js.map +1 -0
  23. package/dist/dist/dist/node/src/modules/auth.js +111 -0
  24. package/dist/dist/dist/node/src/modules/auth.js.map +1 -0
  25. package/dist/dist/dist/node/src/modules/auth.public.js +11 -0
  26. package/dist/dist/dist/node/src/modules/auth.public.js.map +1 -0
  27. package/dist/dist/dist/node/src/modules/crons.js +128 -0
  28. package/dist/dist/dist/node/src/modules/crons.js.map +1 -0
  29. package/dist/dist/dist/node/src/modules/crons.public.js +11 -0
  30. package/dist/dist/dist/node/src/modules/crons.public.js.map +1 -0
  31. package/dist/dist/dist/node/src/modules/elastic.js +31 -0
  32. package/dist/dist/dist/node/src/modules/elastic.js.map +1 -0
  33. package/dist/dist/dist/node/src/modules/elastic.public.js +7 -0
  34. package/dist/dist/dist/node/src/modules/elastic.public.js.map +1 -0
  35. package/dist/dist/dist/node/src/modules/health.js +60 -0
  36. package/dist/dist/dist/node/src/modules/health.js.map +1 -0
  37. package/dist/dist/dist/node/src/modules/health.public.js +9 -0
  38. package/dist/dist/dist/node/src/modules/health.public.js.map +1 -0
  39. package/dist/dist/dist/node/src/modules/history.js +62 -0
  40. package/dist/dist/dist/node/src/modules/history.js.map +1 -0
  41. package/dist/dist/dist/node/src/modules/history.public.js +6 -0
  42. package/dist/dist/dist/node/src/modules/history.public.js.map +1 -0
  43. package/dist/dist/dist/node/src/modules/namespaces.js +15 -0
  44. package/dist/dist/dist/node/src/modules/namespaces.js.map +1 -0
  45. package/dist/dist/dist/node/src/modules/namespaces.public.js +3 -0
  46. package/dist/dist/dist/node/src/modules/namespaces.public.js.map +1 -0
  47. package/dist/dist/dist/node/src/modules/queues.js +179 -0
  48. package/dist/dist/dist/node/src/modules/queues.js.map +1 -0
  49. package/dist/dist/dist/node/src/modules/queues.public.js +13 -0
  50. package/dist/dist/dist/node/src/modules/queues.public.js.map +1 -0
  51. package/dist/dist/dist/node/src/modules/reports.js +267 -0
  52. package/dist/dist/dist/node/src/modules/reports.js.map +1 -0
  53. package/dist/dist/dist/node/src/modules/reports.public.js +13 -0
  54. package/dist/dist/dist/node/src/modules/reports.public.js.map +1 -0
  55. package/dist/dist/dist/node/src/modules/setup.js +35 -0
  56. package/dist/dist/dist/node/src/modules/setup.js.map +1 -0
  57. package/dist/dist/dist/node/src/modules/setup.public.js +12 -0
  58. package/dist/dist/dist/node/src/modules/setup.public.js.map +1 -0
  59. package/dist/dist/dist/node/src/modules/tasks.base.js +51 -0
  60. package/dist/dist/dist/node/src/modules/tasks.base.js.map +1 -0
  61. package/dist/dist/dist/node/src/modules/tasks.js +281 -0
  62. package/dist/dist/dist/node/src/modules/tasks.js.map +1 -0
  63. package/dist/dist/dist/node/src/modules/tasks.public.js +21 -0
  64. package/dist/dist/dist/node/src/modules/tasks.public.js.map +1 -0
  65. package/dist/dist/dist/node/src/modules/tasksActivity.js +62 -0
  66. package/dist/dist/dist/node/src/modules/tasksActivity.js.map +1 -0
  67. package/dist/dist/dist/node/src/modules/tasksActivity.public.js +6 -0
  68. package/dist/dist/dist/node/src/modules/tasksActivity.public.js.map +1 -0
  69. package/dist/dist/dist/node/src/modules/tasksPresets.js +102 -0
  70. package/dist/dist/dist/node/src/modules/tasksPresets.js.map +1 -0
  71. package/dist/dist/dist/node/src/modules/tasksPresets.public.js +10 -0
  72. package/dist/dist/dist/node/src/modules/tasksPresets.public.js.map +1 -0
  73. package/dist/dist/dist/node/src/modules/templates.js +136 -0
  74. package/dist/dist/dist/node/src/modules/templates.js.map +1 -0
  75. package/dist/dist/dist/node/src/modules/templates.public.js +11 -0
  76. package/dist/dist/dist/node/src/modules/templates.public.js.map +1 -0
  77. package/dist/dist/dist/test +0 -0
  78. package/dist/{types → dist/dist/types/src}/index.d.ts +10 -2
  79. package/dist/{types → dist/dist/types/src}/lib/axios.d.ts +3 -3
  80. package/dist/dist/dist/types/src/lib/promises.d.ts +21 -0
  81. package/dist/{types → dist/dist/types/src}/lib/utils.d.ts +5 -0
  82. package/dist/{types → dist/dist/types/src}/modules/auth.d.ts +4 -4
  83. package/dist/{types → dist/dist/types/src}/modules/crons.d.ts +32 -8
  84. package/dist/dist/dist/types/src/modules/crons.public.d.ts +1 -0
  85. package/dist/dist/dist/types/src/modules/elastic.d.ts +22 -0
  86. package/dist/dist/dist/types/src/modules/elastic.public.d.ts +1 -0
  87. package/dist/{types → dist/dist/types/src}/modules/namespaces.d.ts +10 -0
  88. package/dist/dist/dist/types/src/modules/queues.d.ts +120 -0
  89. package/dist/dist/dist/types/src/modules/queues.public.d.ts +1 -0
  90. package/dist/{types → dist/dist/types/src}/modules/reports.d.ts +27 -17
  91. package/dist/dist/dist/types/src/modules/tasks.d.ts +243 -0
  92. package/dist/dist/dist/types/src/modules/tasks.public.d.ts +2 -0
  93. package/dist/dist/dist/types/src/modules/tasksActivity.d.ts +36 -0
  94. package/dist/dist/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
  95. package/dist/dist/dist/types/src/modules/tasksPresets.d.ts +83 -0
  96. package/dist/dist/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
  97. package/dist/dist/dist/types/src/modules/templates.d.ts +153 -0
  98. package/dist/dist/node/package.json +58 -0
  99. package/dist/dist/node/src/index.js +43 -0
  100. package/dist/dist/node/src/index.js.map +1 -0
  101. package/dist/dist/node/src/lib/axios.js +95 -0
  102. package/dist/dist/node/src/lib/axios.js.map +1 -0
  103. package/dist/dist/node/src/lib/promises.js +41 -0
  104. package/dist/dist/node/src/lib/promises.js.map +1 -0
  105. package/dist/dist/node/src/lib/utils.js +24 -0
  106. package/dist/dist/node/src/lib/utils.js.map +1 -0
  107. package/dist/dist/node/src/modules/auth.js +111 -0
  108. package/dist/dist/node/src/modules/auth.js.map +1 -0
  109. package/dist/dist/node/src/modules/auth.public.js +11 -0
  110. package/dist/dist/node/src/modules/auth.public.js.map +1 -0
  111. package/dist/dist/node/src/modules/crons.js +128 -0
  112. package/dist/dist/node/src/modules/crons.js.map +1 -0
  113. package/dist/dist/node/src/modules/crons.public.js +11 -0
  114. package/dist/dist/node/src/modules/crons.public.js.map +1 -0
  115. package/dist/dist/node/src/modules/elastic.js +31 -0
  116. package/dist/dist/node/src/modules/elastic.js.map +1 -0
  117. package/dist/dist/node/src/modules/elastic.public.js +7 -0
  118. package/dist/dist/node/src/modules/elastic.public.js.map +1 -0
  119. package/dist/dist/node/src/modules/health.js +60 -0
  120. package/dist/dist/node/src/modules/health.js.map +1 -0
  121. package/dist/dist/node/src/modules/health.public.js +9 -0
  122. package/dist/dist/node/src/modules/health.public.js.map +1 -0
  123. package/dist/dist/node/src/modules/history.js +62 -0
  124. package/dist/dist/node/src/modules/history.js.map +1 -0
  125. package/dist/dist/node/src/modules/history.public.js +6 -0
  126. package/dist/dist/node/src/modules/history.public.js.map +1 -0
  127. package/dist/dist/node/src/modules/namespaces.js +15 -0
  128. package/dist/dist/node/src/modules/namespaces.js.map +1 -0
  129. package/dist/dist/node/src/modules/namespaces.public.js +3 -0
  130. package/dist/dist/node/src/modules/namespaces.public.js.map +1 -0
  131. package/dist/dist/node/src/modules/queues.js +179 -0
  132. package/dist/dist/node/src/modules/queues.js.map +1 -0
  133. package/dist/dist/node/src/modules/queues.public.js +13 -0
  134. package/dist/dist/node/src/modules/queues.public.js.map +1 -0
  135. package/dist/dist/node/src/modules/reports.js +267 -0
  136. package/dist/dist/node/src/modules/reports.js.map +1 -0
  137. package/dist/dist/node/src/modules/reports.public.js +13 -0
  138. package/dist/dist/node/src/modules/reports.public.js.map +1 -0
  139. package/dist/dist/node/src/modules/setup.js +35 -0
  140. package/dist/dist/node/src/modules/setup.js.map +1 -0
  141. package/dist/dist/node/src/modules/setup.public.js +12 -0
  142. package/dist/dist/node/src/modules/setup.public.js.map +1 -0
  143. package/dist/dist/node/src/modules/tasks.base.js +51 -0
  144. package/dist/dist/node/src/modules/tasks.base.js.map +1 -0
  145. package/dist/dist/node/src/modules/tasks.js +281 -0
  146. package/dist/dist/node/src/modules/tasks.js.map +1 -0
  147. package/dist/dist/node/src/modules/tasks.public.js +21 -0
  148. package/dist/dist/node/src/modules/tasks.public.js.map +1 -0
  149. package/dist/dist/node/src/modules/tasksActivity.js +62 -0
  150. package/dist/dist/node/src/modules/tasksActivity.js.map +1 -0
  151. package/dist/dist/node/src/modules/tasksActivity.public.js +6 -0
  152. package/dist/dist/node/src/modules/tasksActivity.public.js.map +1 -0
  153. package/dist/dist/node/src/modules/tasksPresets.js +102 -0
  154. package/dist/dist/node/src/modules/tasksPresets.js.map +1 -0
  155. package/dist/dist/node/src/modules/tasksPresets.public.js +10 -0
  156. package/dist/dist/node/src/modules/tasksPresets.public.js.map +1 -0
  157. package/dist/dist/node/src/modules/templates.js +136 -0
  158. package/dist/dist/node/src/modules/templates.js.map +1 -0
  159. package/dist/dist/node/src/modules/templates.public.js +11 -0
  160. package/dist/dist/node/src/modules/templates.public.js.map +1 -0
  161. package/dist/dist/test +0 -0
  162. package/dist/dist/types/src/index.d.ts +32 -0
  163. package/dist/dist/types/src/lib/axios.d.ts +51 -0
  164. package/dist/dist/types/src/lib/promises.d.ts +21 -0
  165. package/dist/dist/types/src/lib/utils.d.ts +27 -0
  166. package/dist/dist/types/src/modules/auth.d.ts +90 -0
  167. package/dist/dist/types/src/modules/auth.public.d.ts +1 -0
  168. package/dist/dist/types/src/modules/crons.d.ts +102 -0
  169. package/dist/dist/types/src/modules/crons.public.d.ts +1 -0
  170. package/dist/dist/types/src/modules/elastic.d.ts +22 -0
  171. package/dist/dist/types/src/modules/elastic.public.d.ts +1 -0
  172. package/dist/dist/types/src/modules/health.d.ts +53 -0
  173. package/dist/dist/types/src/modules/health.public.d.ts +1 -0
  174. package/dist/dist/types/src/modules/history.d.ts +38 -0
  175. package/dist/dist/types/src/modules/history.public.d.ts +1 -0
  176. package/dist/dist/types/src/modules/namespaces.d.ts +29 -0
  177. package/dist/dist/types/src/modules/namespaces.public.d.ts +1 -0
  178. package/dist/dist/types/src/modules/queues.d.ts +120 -0
  179. package/dist/dist/types/src/modules/queues.public.d.ts +1 -0
  180. package/dist/dist/types/src/modules/reports.d.ts +204 -0
  181. package/dist/dist/types/src/modules/reports.public.d.ts +1 -0
  182. package/dist/dist/types/src/modules/setup.d.ts +17 -0
  183. package/dist/dist/types/src/modules/setup.public.d.ts +2 -0
  184. package/dist/dist/types/src/modules/tasks.base.d.ts +48 -0
  185. package/dist/dist/types/src/modules/tasks.d.ts +243 -0
  186. package/dist/dist/types/src/modules/tasks.public.d.ts +2 -0
  187. package/dist/dist/types/src/modules/tasksActivity.d.ts +36 -0
  188. package/dist/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
  189. package/dist/dist/types/src/modules/tasksPresets.d.ts +83 -0
  190. package/dist/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
  191. package/dist/dist/types/src/modules/templates.d.ts +153 -0
  192. package/dist/dist/types/src/modules/templates.public.d.ts +1 -0
  193. package/dist/node/package.json +15 -13
  194. package/dist/node/src/index.js +43 -0
  195. package/dist/node/src/index.js.map +1 -0
  196. package/dist/node/src/lib/axios.js +95 -0
  197. package/dist/node/src/lib/axios.js.map +1 -0
  198. package/dist/node/src/lib/promises.js +41 -0
  199. package/dist/node/src/lib/promises.js.map +1 -0
  200. package/dist/node/src/lib/utils.js +24 -0
  201. package/dist/node/src/lib/utils.js.map +1 -0
  202. package/dist/node/src/modules/auth.js +111 -0
  203. package/dist/node/src/modules/auth.js.map +1 -0
  204. package/dist/node/src/modules/auth.public.js +11 -0
  205. package/dist/node/src/modules/auth.public.js.map +1 -0
  206. package/dist/node/src/modules/crons.js +128 -0
  207. package/dist/node/src/modules/crons.js.map +1 -0
  208. package/dist/node/src/modules/crons.public.js +11 -0
  209. package/dist/node/src/modules/crons.public.js.map +1 -0
  210. package/dist/node/src/modules/elastic.js +31 -0
  211. package/dist/node/src/modules/elastic.js.map +1 -0
  212. package/dist/node/src/modules/elastic.public.js +7 -0
  213. package/dist/node/src/modules/elastic.public.js.map +1 -0
  214. package/dist/node/src/modules/health.js +60 -0
  215. package/dist/node/src/modules/health.js.map +1 -0
  216. package/dist/node/src/modules/health.public.js +9 -0
  217. package/dist/node/src/modules/health.public.js.map +1 -0
  218. package/dist/node/src/modules/history.js +62 -0
  219. package/dist/node/src/modules/history.js.map +1 -0
  220. package/dist/node/src/modules/history.public.js +6 -0
  221. package/dist/node/src/modules/history.public.js.map +1 -0
  222. package/dist/node/src/modules/namespaces.js +15 -0
  223. package/dist/node/src/modules/namespaces.js.map +1 -0
  224. package/dist/node/src/modules/namespaces.public.js +3 -0
  225. package/dist/node/src/modules/namespaces.public.js.map +1 -0
  226. package/dist/node/src/modules/queues.js +179 -0
  227. package/dist/node/src/modules/queues.js.map +1 -0
  228. package/dist/node/src/modules/queues.public.js +13 -0
  229. package/dist/node/src/modules/queues.public.js.map +1 -0
  230. package/dist/node/src/modules/reports.js +267 -0
  231. package/dist/node/src/modules/reports.js.map +1 -0
  232. package/dist/node/src/modules/reports.public.js +13 -0
  233. package/dist/node/src/modules/reports.public.js.map +1 -0
  234. package/dist/node/src/modules/setup.js +35 -0
  235. package/dist/node/src/modules/setup.js.map +1 -0
  236. package/dist/node/src/modules/setup.public.js +12 -0
  237. package/dist/node/src/modules/setup.public.js.map +1 -0
  238. package/dist/node/src/modules/tasks.base.js +51 -0
  239. package/dist/node/src/modules/tasks.base.js.map +1 -0
  240. package/dist/node/src/modules/tasks.js +281 -0
  241. package/dist/node/src/modules/tasks.js.map +1 -0
  242. package/dist/node/src/modules/tasks.public.js +21 -0
  243. package/dist/node/src/modules/tasks.public.js.map +1 -0
  244. package/dist/node/src/modules/tasksActivity.js +62 -0
  245. package/dist/node/src/modules/tasksActivity.js.map +1 -0
  246. package/dist/node/src/modules/tasksActivity.public.js +6 -0
  247. package/dist/node/src/modules/tasksActivity.public.js.map +1 -0
  248. package/dist/node/src/modules/tasksPresets.js +102 -0
  249. package/dist/node/src/modules/tasksPresets.js.map +1 -0
  250. package/dist/node/src/modules/tasksPresets.public.js +10 -0
  251. package/dist/node/src/modules/tasksPresets.public.js.map +1 -0
  252. package/dist/node/src/modules/templates.js +136 -0
  253. package/dist/node/src/modules/templates.js.map +1 -0
  254. package/dist/node/src/modules/templates.public.js +11 -0
  255. package/dist/node/src/modules/templates.public.js.map +1 -0
  256. package/dist/types/src/index.d.ts +32 -0
  257. package/dist/types/src/lib/axios.d.ts +51 -0
  258. package/dist/types/src/lib/promises.d.ts +21 -0
  259. package/dist/types/src/lib/utils.d.ts +27 -0
  260. package/dist/types/src/modules/auth.d.ts +90 -0
  261. package/dist/types/src/modules/auth.public.d.ts +1 -0
  262. package/dist/types/src/modules/crons.d.ts +102 -0
  263. package/dist/types/src/modules/crons.public.d.ts +1 -0
  264. package/dist/types/src/modules/elastic.d.ts +22 -0
  265. package/dist/types/src/modules/elastic.public.d.ts +1 -0
  266. package/dist/types/src/modules/health.d.ts +53 -0
  267. package/dist/types/src/modules/health.public.d.ts +1 -0
  268. package/dist/types/src/modules/history.d.ts +38 -0
  269. package/dist/types/src/modules/history.public.d.ts +1 -0
  270. package/dist/types/src/modules/namespaces.d.ts +29 -0
  271. package/dist/types/src/modules/namespaces.public.d.ts +1 -0
  272. package/dist/types/src/modules/queues.d.ts +120 -0
  273. package/dist/types/src/modules/queues.public.d.ts +1 -0
  274. package/dist/types/src/modules/reports.d.ts +204 -0
  275. package/dist/types/src/modules/reports.public.d.ts +1 -0
  276. package/dist/types/src/modules/setup.d.ts +17 -0
  277. package/dist/types/src/modules/setup.public.d.ts +2 -0
  278. package/dist/types/src/modules/tasks.base.d.ts +48 -0
  279. package/dist/types/src/modules/tasks.d.ts +243 -0
  280. package/dist/types/src/modules/tasks.public.d.ts +2 -0
  281. package/dist/types/src/modules/tasksActivity.d.ts +36 -0
  282. package/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
  283. package/dist/types/src/modules/tasksPresets.d.ts +83 -0
  284. package/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
  285. package/dist/types/src/modules/templates.d.ts +153 -0
  286. package/dist/types/src/modules/templates.public.d.ts +1 -0
  287. package/package.json +14 -12
  288. package/CHANGELOG.md +0 -42
  289. package/dist/types/lib/promises.d.ts +0 -18
  290. package/dist/types/modules/crons.public.d.ts +0 -1
  291. package/dist/types/modules/institutions.d.ts +0 -56
  292. package/dist/types/modules/queues.d.ts +0 -93
  293. package/dist/types/modules/queues.public.d.ts +0 -1
  294. package/dist/types/modules/tasks.d.ts +0 -124
  295. package/dist/types/modules/tasks.public.d.ts +0 -2
  296. package/dist/types/modules/templates.d.ts +0 -120
  297. /package/dist/{types → dist/dist/types/src}/modules/auth.public.d.ts +0 -0
  298. /package/dist/{types → dist/dist/types/src}/modules/health.d.ts +0 -0
  299. /package/dist/{types → dist/dist/types/src}/modules/health.public.d.ts +0 -0
  300. /package/dist/{types → dist/dist/types/src}/modules/history.d.ts +0 -0
  301. /package/dist/{types → dist/dist/types/src}/modules/history.public.d.ts +0 -0
  302. /package/dist/{types → dist/dist/types/src}/modules/namespaces.public.d.ts +0 -0
  303. /package/dist/{types → dist/dist/types/src}/modules/reports.public.d.ts +0 -0
  304. /package/dist/{types → dist/dist/types/src}/modules/setup.d.ts +0 -0
  305. /package/dist/{types → dist/dist/types/src}/modules/setup.public.d.ts +0 -0
  306. /package/dist/{types → dist/dist/types/src}/modules/tasks.base.d.ts +0 -0
  307. /package/dist/{types → dist/dist/types/src}/modules/templates.public.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasksPresets.js","sourceRoot":"","sources":["../../../../src/modules/tasksPresets.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoC;AAGpC,yDAAuD;AAmBvD,MAAM,WAAW,GAAG,CAAC,MAAsB,EAAe,EAAE,CAAC,iCACxD,MAAM,KACT,SAAS,EAAE,IAAA,mBAAQ,EAAC,MAAM,CAAC,SAAS,CAAC,EACrC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,mBAAQ,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,IACpE,CAAC;AAkBH,MAAM,eAAe,GAAG,CAAC,MAA0B,EAAmB,EAAE,CAAC,iCACpE,MAAM,KACT,SAAS,EAAE,IAAA,mBAAQ,EAAC,MAAM,CAAC,SAAS,CAAC,EACrC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,mBAAQ,EAAC,MAAM,CAAC,SAA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E,KAAW,MAAM,EAAZ,CAAC,UAAK,MAAM,EAArB,MAAY,CAAS,CAAC;IAC5B,MAAM,KAAoB,MAAM,eAAK,CAAC,IAAI,CACxC,kBAAkB,EAAE,EAAE,EACtB,CAAC,CACF,EAHK,EAAE,OAAO,OAGd,EAHmB,CAAC,cAAf,WAAiB,CAGtB,CAAC;IACF,uCACK,CAAC,KACJ,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,IACjC;AACJ,CAAC,CAAA,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEF;;;;;;;GAOG;AACI,MAAM,iBAAiB,GAAG,CAC/B,UAA2C,EAC5B,EAAE;IACjB,MAAM,EAAE,GAAG,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC;IACvE,MAAM,eAAK,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AALW,QAAA,iBAAiB,qBAK5B"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteTasksPreset = exports.upsertTasksPreset = exports.createTasksPreset = exports.getTasksPreset = exports.getAllTasksPresets = void 0;
4
+ var tasksPresets_1 = require("./tasksPresets");
5
+ Object.defineProperty(exports, "getAllTasksPresets", { enumerable: true, get: function () { return tasksPresets_1.getAllTasksPresets; } });
6
+ Object.defineProperty(exports, "getTasksPreset", { enumerable: true, get: function () { return tasksPresets_1.getTasksPreset; } });
7
+ Object.defineProperty(exports, "createTasksPreset", { enumerable: true, get: function () { return tasksPresets_1.createTasksPreset; } });
8
+ Object.defineProperty(exports, "upsertTasksPreset", { enumerable: true, get: function () { return tasksPresets_1.upsertTasksPreset; } });
9
+ Object.defineProperty(exports, "deleteTasksPreset", { enumerable: true, get: function () { return tasksPresets_1.deleteTasksPreset; } });
10
+ //# sourceMappingURL=tasksPresets.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasksPresets.public.js","sourceRoot":"","sources":["../../../../src/modules/tasksPresets.public.ts"],"names":[],"mappings":";;;AAAA,+CASwB;AALtB,kHAAA,kBAAkB,OAAA;AAClB,8GAAA,cAAc,OAAA;AACd,iHAAA,iBAAiB,OAAA;AACjB,iHAAA,iBAAiB,OAAA;AACjB,iHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ var __importDefault = (this && this.__importDefault) || function (mod) {
23
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.deleteTemplate = exports.updateTemplate = exports.upsertTemplate = exports.createTemplate = exports.getTemplate = exports.getAllTemplates = exports.parseTemplate = void 0;
27
+ const date_fns_1 = require("date-fns");
28
+ const axios_1 = __importDefault(require("../lib/axios"));
29
+ const tasks_base_1 = require("./tasks.base");
30
+ /**
31
+ * Transform raw data from JSON, to JS usable data
32
+ *
33
+ * @param template Raw template
34
+ *
35
+ * @returns Parsed template
36
+ */
37
+ const parseTemplate = (template) => (Object.assign(Object.assign({}, template), { createdAt: (0, date_fns_1.parseISO)(template.createdAt), updatedAt: template.updatedAt ? (0, date_fns_1.parseISO)(template.updatedAt) : undefined }));
38
+ exports.parseTemplate = parseTemplate;
39
+ /**
40
+ * Transform raw data from JSON, to JS usable data
41
+ *
42
+ * @param template Raw full template
43
+ *
44
+ * @returns Parsed template
45
+ */
46
+ const parseFullTemplate = (template) => {
47
+ const { body, tasks } = template, rawTemplate = __rest(template, ["body", "tasks"]);
48
+ return Object.assign(Object.assign({}, (0, exports.parseTemplate)(rawTemplate)), { tasks: tasks.map(tasks_base_1.parseTask), body });
49
+ };
50
+ /**
51
+ * Get all available templates
52
+ *
53
+ * Needs `general.templates-get` permission
54
+ *
55
+ * @returns All templates' info
56
+ */
57
+ const getAllTemplates = () => __awaiter(void 0, void 0, void 0, function* () {
58
+ const _a = yield axios_1.default.$get('/templates'), { content } = _a, response = __rest(_a, ["content"]);
59
+ const r = response;
60
+ return Object.assign(Object.assign({}, r), { content: content.map(exports.parseTemplate) });
61
+ });
62
+ exports.getAllTemplates = getAllTemplates;
63
+ /**
64
+ * Get template info
65
+ *
66
+ * Needs `general.templates-get-template` permission
67
+ *
68
+ * @param templateOrId Template or Template's id
69
+ *
70
+ * @returns Template info
71
+ */
72
+ const getTemplate = (templateOrId) => __awaiter(void 0, void 0, void 0, function* () {
73
+ const id = typeof templateOrId === 'string' ? templateOrId : templateOrId.id;
74
+ const _b = yield axios_1.default.$get(`/templates/${id}`), { content } = _b, response = __rest(_b, ["content"]);
75
+ return Object.assign(Object.assign({}, response), { content: parseFullTemplate(content) });
76
+ });
77
+ exports.getTemplate = getTemplate;
78
+ /**
79
+ * Create a new template
80
+ *
81
+ * Needs `general.templates-post` permission
82
+ *
83
+ * @param template Template's data
84
+ * @param namespaces
85
+ *
86
+ * @returns Created template's info
87
+ */
88
+ const createTemplate = (template) => __awaiter(void 0, void 0, void 0, function* () {
89
+ const _c = yield axios_1.default.$post('/templates', template), { content } = _c, response = __rest(_c, ["content"]);
90
+ return Object.assign(Object.assign({}, response), { content: parseFullTemplate(content) });
91
+ });
92
+ exports.createTemplate = createTemplate;
93
+ /**
94
+ * Update or create a template
95
+ *
96
+ * Needs `general.templates-put-template` permission
97
+ *
98
+ * @param template Template's data **with id**
99
+ * @param namespaces
100
+ *
101
+ * @returns Updated/Created Template's info
102
+ */
103
+ const upsertTemplate = (template) => __awaiter(void 0, void 0, void 0, function* () {
104
+ const { id } = template, t = __rest(template, ["id"]);
105
+ const _d = yield axios_1.default.$put(`/templates/${id}`, t), { content } = _d, response = __rest(_d, ["content"]);
106
+ return Object.assign(Object.assign({}, response), { content: parseFullTemplate(content) });
107
+ });
108
+ exports.upsertTemplate = upsertTemplate;
109
+ /**
110
+ * Update a template
111
+ *
112
+ * Needs `general.templates-put-template` permission
113
+ *
114
+ * @param id Template's id
115
+ * @param template New Template's data
116
+ * @param namespaces
117
+ *
118
+ * @deprecated use `upsertTemplate` instead
119
+ *
120
+ * @returns Updated Template's info
121
+ */
122
+ exports.updateTemplate = exports.upsertTemplate;
123
+ /**
124
+ * Delete a template
125
+ *
126
+ * Needs `general.templates-delete-template` permission
127
+ *
128
+ * @param templateOrId Template or Template's id
129
+ * @param namespaces
130
+ */
131
+ const deleteTemplate = (templateOrId) => __awaiter(void 0, void 0, void 0, function* () {
132
+ const id = typeof templateOrId === 'string' ? templateOrId : templateOrId.id;
133
+ yield axios_1.default.$delete(`/templates/${id}`);
134
+ });
135
+ exports.deleteTemplate = deleteTemplate;
136
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../../src/modules/templates.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoC;AAEpC,yDAAuD;AAEv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AK,CAAC,OAAO,CAAkB,cAAc,EAAE,EAAE,CAAC,CAAC;AAC3D,CAAC,CAAA,CAAC;AAHW,QAAA,cAAc,kBAGzB"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteTemplate = exports.upsertTemplate = exports.updateTemplate = exports.createTemplate = exports.getTemplate = exports.getAllTemplates = void 0;
4
+ var templates_1 = require("./templates");
5
+ Object.defineProperty(exports, "getAllTemplates", { enumerable: true, get: function () { return templates_1.getAllTemplates; } });
6
+ Object.defineProperty(exports, "getTemplate", { enumerable: true, get: function () { return templates_1.getTemplate; } });
7
+ Object.defineProperty(exports, "createTemplate", { enumerable: true, get: function () { return templates_1.createTemplate; } });
8
+ Object.defineProperty(exports, "updateTemplate", { enumerable: true, get: function () { return templates_1.updateTemplate; } });
9
+ Object.defineProperty(exports, "upsertTemplate", { enumerable: true, get: function () { return templates_1.upsertTemplate; } });
10
+ Object.defineProperty(exports, "deleteTemplate", { enumerable: true, get: function () { return templates_1.deleteTemplate; } });
11
+ //# sourceMappingURL=templates.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.public.js","sourceRoot":"","sources":["../../../../src/modules/templates.public.ts"],"names":[],"mappings":";;;AAAA,yCAYqB;AANnB,4GAAA,eAAe,OAAA;AACf,wGAAA,WAAW,OAAA;AACX,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA"}
package/dist/dist/test ADDED
File without changes
@@ -0,0 +1,32 @@
1
+ export * as auth from './modules/auth.public';
2
+ export * as crons from './modules/crons.public';
3
+ export * as health from './modules/health.public';
4
+ export * as tasksActivity from './modules/tasksActivity.public';
5
+ export * as tasksPresets from './modules/tasksPresets.public';
6
+ /** @deprecated Use `tasksActivity` instead */
7
+ export * as history from './modules/tasksActivity.public';
8
+ export * as namespaces from './modules/namespaces.public';
9
+ export * as queues from './modules/queues.public';
10
+ export * as reports from './modules/reports.public';
11
+ export * as setup from './modules/setup.public';
12
+ export * as tasks from './modules/tasks.public';
13
+ export * as templates from './modules/templates.public';
14
+ export * as elastic from './modules/elastic.public';
15
+ export { version } from '../package.json';
16
+ export type EzReeportSDK = {
17
+ auth: typeof import('./modules/auth.public');
18
+ crons: typeof import('./modules/crons.public');
19
+ health: typeof import('./modules/health.public');
20
+ /** @deprecated Use `tasksActivity` instead */
21
+ history: typeof import('./modules/tasksActivity.public');
22
+ namespaces: typeof import('./modules/namespaces.public');
23
+ queues: typeof import('./modules/queues.public');
24
+ reports: typeof import('./modules/reports.public');
25
+ setup: typeof import('./modules/setup.public');
26
+ tasks: typeof import('./modules/tasks.public');
27
+ tasksActivity: typeof import('./modules/tasksActivity.public');
28
+ tasksPresets: typeof import('./modules/tasksPresets.public');
29
+ templates: typeof import('./modules/templates.public');
30
+ elastic: typeof import('./modules/elastic.public');
31
+ version: string;
32
+ };
@@ -0,0 +1,51 @@
1
+ import { Axios, AxiosResponse } from 'axios';
2
+ export interface ApiResponse<T> {
3
+ /**
4
+ * HTTP Status
5
+ */
6
+ status: {
7
+ code: number;
8
+ message: string;
9
+ };
10
+ /**
11
+ * Content of the response
12
+ */
13
+ content: T;
14
+ }
15
+ export interface PaginatedApiResponse<T, K extends keyof T> extends ApiResponse<T[]> {
16
+ meta: {
17
+ /**
18
+ * Count of items in response
19
+ */
20
+ count: number;
21
+ /**
22
+ * Count of items wanted
23
+ */
24
+ size: number;
25
+ /**
26
+ * Count of items available
27
+ */
28
+ total: number;
29
+ /**
30
+ * Id of last item in response
31
+ */
32
+ lastId?: T[K];
33
+ };
34
+ }
35
+ /**
36
+ * Start axios request with basic error handling
37
+ *
38
+ * @param method The request's method
39
+ * @param params The other params of axios
40
+ *
41
+ * @returns Response
42
+ */
43
+ export declare const axiosWithErrorFormatter: <T, Method extends "delete" | "get" | "post" | "put" | "patch">(method: Method, ...params: Parameters<Axios[Method]>) => Promise<AxiosResponse<T, any>>;
44
+ declare const _default: import("axios").AxiosInstance & {
45
+ $get: <T>(url: string, config?: import("axios").AxiosRequestConfig<unknown> | undefined) => Promise<ApiResponse<T>>;
46
+ $post: <T_1>(url: string, data?: unknown, config?: import("axios").AxiosRequestConfig<unknown> | undefined) => Promise<ApiResponse<T_1>>;
47
+ $put: <T_2>(url: string, data?: unknown, config?: import("axios").AxiosRequestConfig<unknown> | undefined) => Promise<ApiResponse<T_2>>;
48
+ $patch: <T_3>(url: string, data?: unknown, config?: import("axios").AxiosRequestConfig<unknown> | undefined) => Promise<ApiResponse<T_3>>;
49
+ $delete: <T_4>(url: string, config?: import("axios").AxiosRequestConfig<unknown> | undefined) => Promise<ApiResponse<T_4>>;
50
+ };
51
+ export default _default;
@@ -0,0 +1,21 @@
1
+ /// <reference types="node" />
2
+ import EventEmitter from 'events';
3
+ interface EventfulListener<E extends Record<string, any[]>> {
4
+ on: <P extends keyof E>(eventName: P, listener: (...args: E[P]) => void) => this;
5
+ once: <P extends keyof E>(eventName: P, listener: (...args: E[P]) => void) => this;
6
+ off: <P extends keyof E>(eventName: P, listener: (...args: E[P]) => void) => this;
7
+ }
8
+ interface EventfulEmitter<E extends Record<string, any[]>> {
9
+ emit: <P extends keyof E>(eventName: P, ...args: E[P]) => this;
10
+ }
11
+ export type EventfulPromise<T, E extends Record<string, any[]>> = Promise<T> & EventfulListener<E>;
12
+ /**
13
+ * Attach a `EventEmitter` to a `Promise` returned by the `executor`
14
+ *
15
+ * @param executor Executor returning the promise. The `emitter` is passed to the executor as param.
16
+ * @param emitter `EventEmitter` attached. By default it's a new instance.
17
+ *
18
+ * @returns The EventfulPromise
19
+ */
20
+ declare const createEventfulPromise: <T, E extends Record<string, any[]> = Record<string, any[]>>(executor: (emitter: EventfulEmitter<E>) => Promise<T>, emitter?: EventEmitter) => EventfulPromise<T, E>;
21
+ export default createEventfulPromise;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Async version of `setTimeout`
3
+ *
4
+ * @param ms Time to wait
5
+ */
6
+ export declare const setTimeoutAsync: (ms: number) => Promise<unknown>;
7
+ export interface RawPeriod {
8
+ start: string;
9
+ end: string;
10
+ }
11
+ export interface Period extends Omit<RawPeriod, 'start' | 'end'> {
12
+ start: Date;
13
+ end: Date;
14
+ }
15
+ /**
16
+ * Transform raw data from JSON, to JS usable data
17
+ *
18
+ * @param period Raw period
19
+ *
20
+ * @returns Parsed period
21
+ */
22
+ export declare const parsePeriod: (period: RawPeriod) => Period;
23
+ export type PaginationOpts = {
24
+ previous?: string;
25
+ count?: number;
26
+ sort?: string;
27
+ };
@@ -0,0 +1,90 @@
1
+ import { ApiResponse } from '../lib/axios';
2
+ import { type Namespace, type RawNamespace, type TaskCount } from './namespaces';
3
+ export declare enum Access {
4
+ READ = "READ",
5
+ READ_WRITE = "READ_WRITE",
6
+ SUPER_USER = "SUPER_USER"
7
+ }
8
+ interface RawMembership {
9
+ access: Access;
10
+ namespace: RawNamespace;
11
+ createdAt: string;
12
+ updatedAt?: string;
13
+ }
14
+ export interface Membership extends Omit<RawMembership, 'namespace' | 'createdAt' | 'updatedAt'> {
15
+ namespace: Namespace;
16
+ createdAt: Date;
17
+ updatedAt?: Date;
18
+ }
19
+ interface RawUser {
20
+ username: string;
21
+ token: string;
22
+ isAdmin: true;
23
+ memberships: (RawMembership & TaskCount)[];
24
+ createdAt: string;
25
+ updatedAt?: string;
26
+ }
27
+ export interface User extends Omit<RawUser, 'memberships' | 'createdAt' | 'updatedAt'> {
28
+ memberships: (Membership & TaskCount)[];
29
+ createdAt: Date;
30
+ updatedAt?: Date;
31
+ }
32
+ export type Permissions = {
33
+ /**
34
+ * General routes independent of namespaces
35
+ */
36
+ general: {
37
+ [routeId: string]: boolean;
38
+ };
39
+ /**
40
+ * Routes who are dependent of namespaces
41
+ *
42
+ * If wanted namespace isn't present, then user doesn't have access
43
+ */
44
+ namespaces: {
45
+ [namespaceId: string]: {
46
+ [routeId: string]: boolean;
47
+ };
48
+ };
49
+ };
50
+ /**
51
+ * Set auth token to axios
52
+ *
53
+ * @param token The auth token
54
+ */
55
+ export declare const login: (token: string) => void;
56
+ /**
57
+ * Unset auth token from axios
58
+ */
59
+ export declare const logout: () => void;
60
+ /**
61
+ * Check if auth token is setup in axios. **DOESN'T CHECK IF TOKEN IS VALID !**
62
+ *
63
+ * @returns If auth token is setup
64
+ */
65
+ export declare const isLogged: () => boolean;
66
+ /**
67
+ * Get logged user info
68
+ *
69
+ * Needs `general.auth-get` permission
70
+ *
71
+ * @returns The logged user info
72
+ */
73
+ export declare const getCurrentUser: () => Promise<ApiResponse<User>>;
74
+ /**
75
+ * Get logged user permissions
76
+ *
77
+ * Needs `namespaces[namespaceId].auth-get-permissions` permission
78
+ *
79
+ * @returns Permissions
80
+ */
81
+ export declare const getCurrentPermissions: () => Promise<ApiResponse<Permissions>>;
82
+ /**
83
+ * Get logged user accessible namespaces
84
+ *
85
+ * Needs `namespaces[namespaceId].auth-get-namespaces` permission
86
+ *
87
+ * @returns Permissions
88
+ */
89
+ export declare const getCurrentNamespaces: () => Promise<ApiResponse<(Namespace & TaskCount)[]>>;
90
+ export {};
@@ -0,0 +1 @@
1
+ export { type Access, type Membership, type User, type Permissions, login, logout, isLogged, getCurrentUser, getCurrentNamespaces, getCurrentPermissions, } from './auth';
@@ -0,0 +1,102 @@
1
+ import { type ApiResponse } from '../lib/axios';
2
+ interface RawCron {
3
+ name: string;
4
+ running: boolean;
5
+ nextRun?: string;
6
+ lastRun?: string;
7
+ }
8
+ export interface Cron extends Omit<RawCron, 'nextRun' | 'lastRun'> {
9
+ nextRun?: Date;
10
+ lastRun?: Date;
11
+ }
12
+ export interface InputCron extends Pick<Cron, 'running'> {
13
+ }
14
+ /**
15
+ * Get all available crons
16
+ *
17
+ * Needs `general.crons-get` permission
18
+ *
19
+ * @returns All crons' info
20
+ */
21
+ export declare const getAllCrons: () => Promise<ApiResponse<Cron[]>>;
22
+ /**
23
+ * Get cron info
24
+ *
25
+ * Needs `general.crons-get-cron` permission
26
+ *
27
+ * @param cronOrName Cron or Cron name
28
+ *
29
+ * @returns Cron's info
30
+ */
31
+ export declare const getCron: (cronOrName: Cron | Cron['name']) => Promise<ApiResponse<Cron>>;
32
+ /**
33
+ * Start cron
34
+ *
35
+ * Needs `general.crons-put-cron-start` permission
36
+ *
37
+ * @param cronOrName Cron or Cron name
38
+ *
39
+ * @deprecated Use `updateCron` with body `{ running: true }`
40
+ *
41
+ * @returns Cron's info
42
+ */
43
+ export declare const startCron: (cronOrName: Cron | Cron['name']) => Promise<{
44
+ content: Cron;
45
+ status: {
46
+ code: number;
47
+ message: string;
48
+ };
49
+ }>;
50
+ /**
51
+ * Stop cron
52
+ *
53
+ * Needs `general.crons-put-cron-stop` permission
54
+ *
55
+ * @param cronOrName Cron or Cron name
56
+ *
57
+ * @deprecated Use `updateCron` with body `{ running: false }`
58
+ *
59
+ * @returns Cron's info
60
+ */
61
+ export declare const stopCron: (cronOrName: Cron | Cron['name']) => Promise<{
62
+ content: Cron;
63
+ status: {
64
+ code: number;
65
+ message: string;
66
+ };
67
+ }>;
68
+ /**
69
+ * Update cron
70
+ *
71
+ * Needs `general.crons-patch-cron` permission
72
+ *
73
+ * @param cronOrName Cron or Cron name
74
+ *
75
+ * @returns Cron's info
76
+ */
77
+ export declare const updateCron: (cron: Partial<InputCron> & {
78
+ name: Cron['name'];
79
+ }) => Promise<{
80
+ content: Cron;
81
+ status: {
82
+ code: number;
83
+ message: string;
84
+ };
85
+ }>;
86
+ /**
87
+ * Force cron to run
88
+ *
89
+ * Needs `general.crons-post-cron-force` permission
90
+ *
91
+ * @param cronOrName Cron or Cron name
92
+ *
93
+ * @returns Cron's info
94
+ */
95
+ export declare const forceCron: (cronOrName: Cron | Cron['name']) => Promise<{
96
+ content: Cron;
97
+ status: {
98
+ code: number;
99
+ message: string;
100
+ };
101
+ }>;
102
+ export {};
@@ -0,0 +1 @@
1
+ export { type Cron, type InputCron, getAllCrons, getCron, startCron, stopCron, updateCron, forceCron, } from './crons';
@@ -0,0 +1,22 @@
1
+ import type { Namespace } from './namespaces';
2
+ /**
3
+ * List all available indices
4
+ *
5
+ * Needs `namespaces[namespaceId].elastic-get-indices` permission
6
+ *
7
+ * @param namespace The concerned namespace. **Needed if not admin**
8
+ *
9
+ * @returns The list of available indices
10
+ */
11
+ export declare const getAllIndices: (namespace?: Namespace['id']) => Promise<import("../lib/axios").ApiResponse<string[]>>;
12
+ /**
13
+ * Get mapping of an specific index
14
+ *
15
+ * Needs `namespaces[namespaceId].elastic-get-indices-index` permission
16
+ *
17
+ * @param index The index (can be a wildcard)
18
+ * @param namespace The concerned namespace. **Needed if not admin**
19
+ *
20
+ * @returns The list of available indices
21
+ */
22
+ export declare const getIndexMapping: (index: string, namespace?: Namespace['id']) => Promise<import("../lib/axios").ApiResponse<Record<string, string>>>;
@@ -0,0 +1 @@
1
+ export { getAllIndices, getIndexMapping, } from './elastic';
@@ -0,0 +1,53 @@
1
+ interface PingResultSuccess {
2
+ name: string;
3
+ status: true;
4
+ elapsedTime: number;
5
+ statusCode: number;
6
+ }
7
+ interface PingResultFail {
8
+ name: string;
9
+ status: false;
10
+ error: string;
11
+ }
12
+ export type PingResult = PingResultSuccess | PingResultFail;
13
+ /**
14
+ * Get all services connected to current
15
+ *
16
+ * Needs `general.health-get` permission
17
+ *
18
+ * @returns The current service & the name of connected ones
19
+ */
20
+ export declare const getAllConnectedServices: () => Promise<import("../lib/axios").ApiResponse<{
21
+ current: string;
22
+ currentVersion: string;
23
+ services: PingResult['name'][];
24
+ }>>;
25
+ /**
26
+ * Check connection for all connected service from current
27
+ *
28
+ * Needs `general.health-get-all` permission
29
+ *
30
+ * @returns The connection status for all services
31
+ */
32
+ export declare const checkAllConnectedService: () => Promise<import("../lib/axios").ApiResponse<PingResult[]>>;
33
+ /**
34
+ * Check connection of a specific service from current
35
+ *
36
+ * Needs `general.health-get-service` permission
37
+ *
38
+ * @param service The name of the service
39
+ *
40
+ * @returns The connection status of the service from current
41
+ */
42
+ export declare const checkConnectedService: (service: PingResult['name']) => Promise<import("../lib/axios").ApiResponse<PingResult>>;
43
+ /**
44
+ * Check connection of current service
45
+ *
46
+ * It's useful when the app will have limited connection, or if you just want the processing time.
47
+ *
48
+ * Needs `general.health-get-all` & `general.health-get-service` permission
49
+ *
50
+ * @returns The connection status of current service
51
+ */
52
+ export declare const checkCurrentService: () => Promise<import("../lib/axios").ApiResponse<PingResult>>;
53
+ export {};
@@ -0,0 +1 @@
1
+ export { type PingResult, getAllConnectedServices, checkAllConnectedService, checkConnectedService, checkCurrentService, } from './health';
@@ -0,0 +1,38 @@
1
+ import { type PaginatedApiResponse } from '../lib/axios';
2
+ import { type TaskWithNamespace } from './tasks.base';
3
+ export interface RawHistory {
4
+ id: string;
5
+ taskId: string;
6
+ type: string;
7
+ message: string;
8
+ data?: object;
9
+ createdAt: string;
10
+ }
11
+ export interface History extends Omit<RawHistory, 'createdAt'> {
12
+ createdAt: Date;
13
+ }
14
+ export interface HistoryWithTask extends Omit<History, 'taskId'> {
15
+ task: TaskWithNamespace;
16
+ }
17
+ /**
18
+ * Transform raw data from JSON, to JS usable data
19
+ *
20
+ * @param entry Raw history entry
21
+ *
22
+ * @returns Parsed history entry
23
+ */
24
+ export declare const parseHistory: (entry: RawHistory) => History;
25
+ /**
26
+ * Get all available history entries
27
+ *
28
+ * Needs `namespaces[namespaceId].history-get` permission
29
+ *
30
+ * @param paginationOpts Options for pagination
31
+ * @param namespaces
32
+ *
33
+ * @returns All history entries' info
34
+ */
35
+ export declare const getAllEntries: (paginationOpts?: {
36
+ previous?: History['id'];
37
+ count?: number;
38
+ }, namespaces?: string[]) => Promise<PaginatedApiResponse<HistoryWithTask[]>>;
@@ -0,0 +1 @@
1
+ export { type History, type HistoryWithTask, getAllEntries, } from './history';