@abyss-project/console 1.0.1

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 (284) hide show
  1. package/.eslintrc.js +34 -0
  2. package/README.md +2 -0
  3. package/USAGE_EXAMPLES.md +257 -0
  4. package/dist/api/application-cron-task.admin.api.d.ts +10 -0
  5. package/dist/api/application-cron-task.admin.api.js +40 -0
  6. package/dist/api/application-cron-task.api.d.ts +10 -0
  7. package/dist/api/application-cron-task.api.js +40 -0
  8. package/dist/api/application-event.admin.api.d.ts +4 -0
  9. package/dist/api/application-event.admin.api.js +16 -0
  10. package/dist/api/application-event.api.d.ts +8 -0
  11. package/dist/api/application-event.api.js +32 -0
  12. package/dist/api/application-log.admin.api.d.ts +3 -0
  13. package/dist/api/application-log.admin.api.js +12 -0
  14. package/dist/api/application-log.api.d.ts +4 -0
  15. package/dist/api/application-log.api.js +16 -0
  16. package/dist/api/application-sentinel.admin.api.d.ts +9 -0
  17. package/dist/api/application-sentinel.admin.api.js +36 -0
  18. package/dist/api/application-sentinel.api.d.ts +10 -0
  19. package/dist/api/application-sentinel.api.js +40 -0
  20. package/dist/api/application-stats.admin.api.d.ts +3 -0
  21. package/dist/api/application-stats.admin.api.js +12 -0
  22. package/dist/api/application-stats.api.d.ts +4 -0
  23. package/dist/api/application-stats.api.js +16 -0
  24. package/dist/api/application-webhook-history.admin.api.d.ts +3 -0
  25. package/dist/api/application-webhook-history.admin.api.js +12 -0
  26. package/dist/api/application-webhook-history.api.d.ts +3 -0
  27. package/dist/api/application-webhook-history.api.js +12 -0
  28. package/dist/api/application-webhook.admin.api.d.ts +7 -0
  29. package/dist/api/application-webhook.admin.api.js +28 -0
  30. package/dist/api/application-webhook.api.d.ts +7 -0
  31. package/dist/api/application-webhook.api.js +28 -0
  32. package/dist/api/application.admin.api.d.ts +7 -0
  33. package/dist/api/application.admin.api.js +28 -0
  34. package/dist/api/application.api.d.ts +10 -0
  35. package/dist/api/application.api.js +40 -0
  36. package/dist/api/domain-verification.admin.api.d.ts +2 -0
  37. package/dist/api/domain-verification.admin.api.js +9 -0
  38. package/dist/api/domain-verification.api.d.ts +7 -0
  39. package/dist/api/domain-verification.api.js +28 -0
  40. package/dist/api/hourly-metrics.api.d.ts +2 -0
  41. package/dist/api/hourly-metrics.api.js +8 -0
  42. package/dist/api/index.d.ts +5 -0
  43. package/dist/api/index.js +21 -0
  44. package/dist/api/infrastructure.admin.api.d.ts +3 -0
  45. package/dist/api/infrastructure.admin.api.js +12 -0
  46. package/dist/api/metrics.api.d.ts +4 -0
  47. package/dist/api/metrics.api.js +16 -0
  48. package/dist/api/monitor.api.d.ts +2 -0
  49. package/dist/api/monitor.api.js +8 -0
  50. package/dist/api/report.admin.api.d.ts +2 -0
  51. package/dist/api/report.admin.api.js +9 -0
  52. package/dist/api/workflow.admin.api.d.ts +8 -0
  53. package/dist/api/workflow.admin.api.js +34 -0
  54. package/dist/api/workflow.api.d.ts +15 -0
  55. package/dist/api/workflow.api.js +62 -0
  56. package/dist/frameworks/express/decorators.d.ts +52 -0
  57. package/dist/frameworks/express/decorators.js +163 -0
  58. package/dist/frameworks/express/index.d.ts +17 -0
  59. package/dist/frameworks/express/index.js +173 -0
  60. package/dist/frameworks/express/metadata.d.ts +9 -0
  61. package/dist/frameworks/express/metadata.js +12 -0
  62. package/dist/frameworks/index.d.ts +1 -0
  63. package/dist/frameworks/index.js +17 -0
  64. package/dist/index.d.ts +83 -0
  65. package/dist/index.js +163 -0
  66. package/dist/middlewares/context.middleware.d.ts +12 -0
  67. package/dist/middlewares/context.middleware.js +39 -0
  68. package/dist/middlewares/index.d.ts +3 -0
  69. package/dist/middlewares/index.js +19 -0
  70. package/dist/middlewares/logger-endpoint.middleware.d.ts +5 -0
  71. package/dist/middlewares/logger-endpoint.middleware.js +86 -0
  72. package/dist/middlewares/logger-setup.middleware.d.ts +5 -0
  73. package/dist/middlewares/logger-setup.middleware.js +16 -0
  74. package/dist/models/index.d.ts +1 -0
  75. package/dist/models/index.js +17 -0
  76. package/dist/models/logger.model.d.ts +61 -0
  77. package/dist/models/logger.model.js +201 -0
  78. package/dist/models/stats-publisher.model.d.ts +20 -0
  79. package/dist/models/stats-publisher.model.js +113 -0
  80. package/dist/types/dto/domain-verification.dto.d.ts +19 -0
  81. package/dist/types/dto/domain-verification.dto.js +2 -0
  82. package/dist/types/dto/index.d.ts +1 -0
  83. package/dist/types/dto/index.js +17 -0
  84. package/dist/types/enum/api-error.enum.d.ts +20 -0
  85. package/dist/types/enum/api-error.enum.js +25 -0
  86. package/dist/types/enum/api-method.enum.d.ts +7 -0
  87. package/dist/types/enum/api-method.enum.js +11 -0
  88. package/dist/types/enum/application-alert-type.enum.d.ts +5 -0
  89. package/dist/types/enum/application-alert-type.enum.js +9 -0
  90. package/dist/types/enum/application-sentinel-type.enum.d.ts +5 -0
  91. package/dist/types/enum/application-sentinel-type.enum.js +9 -0
  92. package/dist/types/enum/application-stats-type.enum.d.ts +5 -0
  93. package/dist/types/enum/application-stats-type.enum.js +9 -0
  94. package/dist/types/enum/application-webhook-scope.enum.d.ts +4 -0
  95. package/dist/types/enum/application-webhook-scope.enum.js +8 -0
  96. package/dist/types/enum/index.d.ts +1 -0
  97. package/dist/types/enum/index.js +17 -0
  98. package/dist/types/enum/log-level.enum.d.ts +6 -0
  99. package/dist/types/enum/log-level.enum.js +10 -0
  100. package/dist/types/enum/log-scenario.enum.d.ts +5 -0
  101. package/dist/types/enum/log-scenario.enum.js +9 -0
  102. package/dist/types/enum/time-period.enum.d.ts +0 -0
  103. package/dist/types/enum/time-period.enum.js +1 -0
  104. package/dist/types/index.d.ts +3 -0
  105. package/dist/types/index.js +19 -0
  106. package/dist/types/interface/api/index.d.ts +13 -0
  107. package/dist/types/interface/api/index.js +29 -0
  108. package/dist/types/interface/api/requests/application-cron-task.admin.request.d.ts +50 -0
  109. package/dist/types/interface/api/requests/application-cron-task.admin.request.js +2 -0
  110. package/dist/types/interface/api/requests/application-cron-task.request.d.ts +61 -0
  111. package/dist/types/interface/api/requests/application-cron-task.request.js +2 -0
  112. package/dist/types/interface/api/requests/application-event.admin.request.d.ts +16 -0
  113. package/dist/types/interface/api/requests/application-event.admin.request.js +2 -0
  114. package/dist/types/interface/api/requests/application-event.request.d.ts +50 -0
  115. package/dist/types/interface/api/requests/application-event.request.js +2 -0
  116. package/dist/types/interface/api/requests/application-log.admin.request.d.ts +19 -0
  117. package/dist/types/interface/api/requests/application-log.admin.request.js +2 -0
  118. package/dist/types/interface/api/requests/application-log.request.d.ts +59 -0
  119. package/dist/types/interface/api/requests/application-log.request.js +2 -0
  120. package/dist/types/interface/api/requests/application-sentinel.admin.request.d.ts +52 -0
  121. package/dist/types/interface/api/requests/application-sentinel.admin.request.js +2 -0
  122. package/dist/types/interface/api/requests/application-sentinel.request.d.ts +71 -0
  123. package/dist/types/interface/api/requests/application-sentinel.request.js +2 -0
  124. package/dist/types/interface/api/requests/application-stats.admin.request.d.ts +13 -0
  125. package/dist/types/interface/api/requests/application-stats.admin.request.js +2 -0
  126. package/dist/types/interface/api/requests/application-stats.request.d.ts +31 -0
  127. package/dist/types/interface/api/requests/application-stats.request.js +2 -0
  128. package/dist/types/interface/api/requests/application-webhook-history.admin.request.d.ts +16 -0
  129. package/dist/types/interface/api/requests/application-webhook-history.admin.request.js +2 -0
  130. package/dist/types/interface/api/requests/application-webhook-history.request.d.ts +21 -0
  131. package/dist/types/interface/api/requests/application-webhook-history.request.js +2 -0
  132. package/dist/types/interface/api/requests/application-webhook.admin.request.d.ts +39 -0
  133. package/dist/types/interface/api/requests/application-webhook.admin.request.js +2 -0
  134. package/dist/types/interface/api/requests/application-webhook.request.d.ts +45 -0
  135. package/dist/types/interface/api/requests/application-webhook.request.js +2 -0
  136. package/dist/types/interface/api/requests/application.admin.request.d.ts +23 -0
  137. package/dist/types/interface/api/requests/application.admin.request.js +2 -0
  138. package/dist/types/interface/api/requests/application.request.d.ts +64 -0
  139. package/dist/types/interface/api/requests/application.request.js +2 -0
  140. package/dist/types/interface/api/requests/domain-verification.admin.request.d.ts +5 -0
  141. package/dist/types/interface/api/requests/domain-verification.admin.request.js +2 -0
  142. package/dist/types/interface/api/requests/domain-verification.request.d.ts +29 -0
  143. package/dist/types/interface/api/requests/domain-verification.request.js +2 -0
  144. package/dist/types/interface/api/requests/hourly-metrics.request.d.ts +10 -0
  145. package/dist/types/interface/api/requests/hourly-metrics.request.js +2 -0
  146. package/dist/types/interface/api/requests/infrastructure.admin.request.d.ts +4 -0
  147. package/dist/types/interface/api/requests/infrastructure.admin.request.js +2 -0
  148. package/dist/types/interface/api/requests/metrics.admin.request.d.ts +14 -0
  149. package/dist/types/interface/api/requests/metrics.admin.request.js +2 -0
  150. package/dist/types/interface/api/requests/metrics.request.d.ts +23 -0
  151. package/dist/types/interface/api/requests/metrics.request.js +2 -0
  152. package/dist/types/interface/api/requests/report.admin.request.d.ts +6 -0
  153. package/dist/types/interface/api/requests/report.admin.request.js +2 -0
  154. package/dist/types/interface/api/requests/workflow.admin.request.d.ts +35 -0
  155. package/dist/types/interface/api/requests/workflow.admin.request.js +2 -0
  156. package/dist/types/interface/api/requests/workflow.request.d.ts +114 -0
  157. package/dist/types/interface/api/requests/workflow.request.js +2 -0
  158. package/dist/types/interface/api/responses/application-cron-task.admin.response.d.ts +30 -0
  159. package/dist/types/interface/api/responses/application-cron-task.admin.response.js +2 -0
  160. package/dist/types/interface/api/responses/application-cron-task.response.d.ts +30 -0
  161. package/dist/types/interface/api/responses/application-cron-task.response.js +2 -0
  162. package/dist/types/interface/api/responses/application-event.admin.response.d.ts +9 -0
  163. package/dist/types/interface/api/responses/application-event.admin.response.js +2 -0
  164. package/dist/types/interface/api/responses/application-event.response.d.ts +33 -0
  165. package/dist/types/interface/api/responses/application-event.response.js +2 -0
  166. package/dist/types/interface/api/responses/application-log.admin.response.d.ts +10 -0
  167. package/dist/types/interface/api/responses/application-log.admin.response.js +2 -0
  168. package/dist/types/interface/api/responses/application-log.response.d.ts +10 -0
  169. package/dist/types/interface/api/responses/application-log.response.js +2 -0
  170. package/dist/types/interface/api/responses/application-sentinel.admin.response.d.ts +26 -0
  171. package/dist/types/interface/api/responses/application-sentinel.admin.response.js +2 -0
  172. package/dist/types/interface/api/responses/application-sentinel.response.d.ts +33 -0
  173. package/dist/types/interface/api/responses/application-sentinel.response.js +2 -0
  174. package/dist/types/interface/api/responses/application-stats.admin.response.d.ts +6 -0
  175. package/dist/types/interface/api/responses/application-stats.admin.response.js +2 -0
  176. package/dist/types/interface/api/responses/application-stats.response.d.ts +10 -0
  177. package/dist/types/interface/api/responses/application-stats.response.js +2 -0
  178. package/dist/types/interface/api/responses/application-webhook-history.admin.response.d.ts +7 -0
  179. package/dist/types/interface/api/responses/application-webhook-history.admin.response.js +2 -0
  180. package/dist/types/interface/api/responses/application-webhook-history.response.d.ts +7 -0
  181. package/dist/types/interface/api/responses/application-webhook-history.response.js +2 -0
  182. package/dist/types/interface/api/responses/application-webhook.admin.response.d.ts +21 -0
  183. package/dist/types/interface/api/responses/application-webhook.admin.response.js +2 -0
  184. package/dist/types/interface/api/responses/application-webhook.response.d.ts +21 -0
  185. package/dist/types/interface/api/responses/application-webhook.response.js +2 -0
  186. package/dist/types/interface/api/responses/application.admin.response.d.ts +34 -0
  187. package/dist/types/interface/api/responses/application.admin.response.js +2 -0
  188. package/dist/types/interface/api/responses/application.response.d.ts +130 -0
  189. package/dist/types/interface/api/responses/application.response.js +2 -0
  190. package/dist/types/interface/api/responses/domain-verification.admin.response.d.ts +6 -0
  191. package/dist/types/interface/api/responses/domain-verification.admin.response.js +2 -0
  192. package/dist/types/interface/api/responses/domain-verification.response.d.ts +29 -0
  193. package/dist/types/interface/api/responses/domain-verification.response.js +2 -0
  194. package/dist/types/interface/api/responses/hourly-metrics.response.d.ts +70 -0
  195. package/dist/types/interface/api/responses/hourly-metrics.response.js +2 -0
  196. package/dist/types/interface/api/responses/infrastructure.admin.response.d.ts +18 -0
  197. package/dist/types/interface/api/responses/infrastructure.admin.response.js +2 -0
  198. package/dist/types/interface/api/responses/metrics.admin.response.d.ts +19 -0
  199. package/dist/types/interface/api/responses/metrics.admin.response.js +2 -0
  200. package/dist/types/interface/api/responses/metrics.response.d.ts +29 -0
  201. package/dist/types/interface/api/responses/metrics.response.js +2 -0
  202. package/dist/types/interface/api/responses/monitor.response.d.ts +7 -0
  203. package/dist/types/interface/api/responses/monitor.response.js +2 -0
  204. package/dist/types/interface/api/responses/report.admin.response.d.ts +87 -0
  205. package/dist/types/interface/api/responses/report.admin.response.js +2 -0
  206. package/dist/types/interface/api/responses/workflow.admin.response.d.ts +24 -0
  207. package/dist/types/interface/api/responses/workflow.admin.response.js +2 -0
  208. package/dist/types/interface/api/responses/workflow.response.d.ts +54 -0
  209. package/dist/types/interface/api/responses/workflow.response.js +2 -0
  210. package/dist/types/interface/api/type-message/api-error.d.ts +8 -0
  211. package/dist/types/interface/api/type-message/api-error.js +2 -0
  212. package/dist/types/interface/api/type-message/base-order.d.ts +4 -0
  213. package/dist/types/interface/api/type-message/base-order.js +2 -0
  214. package/dist/types/interface/api/type-message/base-paginate.d.ts +10 -0
  215. package/dist/types/interface/api/type-message/base-paginate.js +2 -0
  216. package/dist/types/interface/api/type-message/response.d.ts +5 -0
  217. package/dist/types/interface/api/type-message/response.js +2 -0
  218. package/dist/types/interface/dto/application-sentinel-configuration.dto.d.ts +68 -0
  219. package/dist/types/interface/dto/application-sentinel-configuration.dto.js +4 -0
  220. package/dist/types/interface/dto/index.d.ts +2 -0
  221. package/dist/types/interface/dto/index.js +18 -0
  222. package/dist/types/interface/dto/webhook.dto.d.ts +27 -0
  223. package/dist/types/interface/dto/webhook.dto.js +2 -0
  224. package/dist/types/interface/index.d.ts +6 -0
  225. package/dist/types/interface/index.js +22 -0
  226. package/dist/types/interface/models/application-cron-task-history.model.d.ts +17 -0
  227. package/dist/types/interface/models/application-cron-task-history.model.js +2 -0
  228. package/dist/types/interface/models/application-cron-task.model.d.ts +14 -0
  229. package/dist/types/interface/models/application-cron-task.model.js +2 -0
  230. package/dist/types/interface/models/application-event.model.d.ts +19 -0
  231. package/dist/types/interface/models/application-event.model.js +2 -0
  232. package/dist/types/interface/models/application-hourly-metrics.model.d.ts +14 -0
  233. package/dist/types/interface/models/application-hourly-metrics.model.js +2 -0
  234. package/dist/types/interface/models/application-lifetime-metrics.model.d.ts +8 -0
  235. package/dist/types/interface/models/application-lifetime-metrics.model.js +2 -0
  236. package/dist/types/interface/models/application-log-endpoint.model.d.ts +20 -0
  237. package/dist/types/interface/models/application-log-endpoint.model.js +2 -0
  238. package/dist/types/interface/models/application-log.model.d.ts +23 -0
  239. package/dist/types/interface/models/application-log.model.js +2 -0
  240. package/dist/types/interface/models/application-sentinel-history.model.d.ts +16 -0
  241. package/dist/types/interface/models/application-sentinel-history.model.js +2 -0
  242. package/dist/types/interface/models/application-sentinel.model.d.ts +20 -0
  243. package/dist/types/interface/models/application-sentinel.model.js +2 -0
  244. package/dist/types/interface/models/application-stats.model.d.ts +14 -0
  245. package/dist/types/interface/models/application-stats.model.js +2 -0
  246. package/dist/types/interface/models/application-webhook-history.model.d.ts +22 -0
  247. package/dist/types/interface/models/application-webhook-history.model.js +2 -0
  248. package/dist/types/interface/models/application-webhook.model.d.ts +32 -0
  249. package/dist/types/interface/models/application-webhook.model.js +3 -0
  250. package/dist/types/interface/models/application.model.d.ts +19 -0
  251. package/dist/types/interface/models/application.model.js +2 -0
  252. package/dist/types/interface/models/domain-verification.model.d.ts +42 -0
  253. package/dist/types/interface/models/domain-verification.model.js +14 -0
  254. package/dist/types/interface/models/partition-optimization-history.model.d.ts +11 -0
  255. package/dist/types/interface/models/partition-optimization-history.model.js +2 -0
  256. package/dist/types/interface/models/project.model.d.ts +11 -0
  257. package/dist/types/interface/models/project.model.js +2 -0
  258. package/dist/types/interface/models/workflow-execution-step.model.d.ts +59 -0
  259. package/dist/types/interface/models/workflow-execution-step.model.js +12 -0
  260. package/dist/types/interface/models/workflow-execution.model.d.ts +76 -0
  261. package/dist/types/interface/models/workflow-execution.model.js +13 -0
  262. package/dist/types/interface/models/workflow-step.model.d.ts +106 -0
  263. package/dist/types/interface/models/workflow-step.model.js +44 -0
  264. package/dist/types/interface/models/workflow.model.d.ts +90 -0
  265. package/dist/types/interface/models/workflow.model.js +24 -0
  266. package/dist/typing-examples.d.ts +1 -0
  267. package/dist/typing-examples.js +48 -0
  268. package/dist/utils/alert.utils.d.ts +35 -0
  269. package/dist/utils/alert.utils.js +138 -0
  270. package/dist/utils/discord-webhook-log-formatter.utils.d.ts +48 -0
  271. package/dist/utils/discord-webhook-log-formatter.utils.js +332 -0
  272. package/dist/utils/error.utils.d.ts +15 -0
  273. package/dist/utils/error.utils.js +24 -0
  274. package/dist/utils/import.utils.d.ts +1 -0
  275. package/dist/utils/import.utils.js +7 -0
  276. package/dist/utils/index.d.ts +1 -0
  277. package/dist/utils/index.js +17 -0
  278. package/dist/utils/json.utils.d.ts +1 -0
  279. package/dist/utils/json.utils.js +13 -0
  280. package/dist/utils/non-blocking-promise.utils.d.ts +2 -0
  281. package/dist/utils/non-blocking-promise.utils.js +11 -0
  282. package/package.json +49 -0
  283. package/tsconfig.json +105 -0
  284. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { IResponse } from '../..';
2
+ export interface IFillLifetimeMetricsData {
3
+ success: boolean;
4
+ message: string;
5
+ requestId: string;
6
+ }
7
+ export type IFillLifetimeMetricsAdminResponse = IResponse<IFillLifetimeMetricsData>;
8
+ export interface IFillHourlyMetricsData {
9
+ success: boolean;
10
+ message: string;
11
+ requestId: string;
12
+ }
13
+ export type IFillHourlyMetricsAdminResponse = IResponse<IFillHourlyMetricsData>;
14
+ export interface IAggregateHourData {
15
+ success: boolean;
16
+ message: string;
17
+ requestId: string;
18
+ }
19
+ export type IAggregateHourAdminResponse = IResponse<IAggregateHourData>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ import { IResponse, IApplicationSentinel, IApplicationSentinelHistory } from '../..';
2
+ export interface IGetSentinelMetricsData {
3
+ metrics: {
4
+ applicationSentinel: IApplicationSentinel[];
5
+ };
6
+ }
7
+ export type IGetSentinelMetricsResponse = IResponse<IGetSentinelMetricsData>;
8
+ export interface IGetLatencySentinelMetricsData {
9
+ metrics: Record<string, {
10
+ applicationId: string;
11
+ applicationSentinelId: string;
12
+ applicationSentinelName: string;
13
+ history: {
14
+ date: string;
15
+ avgLatency: number | null;
16
+ minLatency: number | null;
17
+ maxLatency: number | null;
18
+ }[];
19
+ }>;
20
+ }
21
+ export type IGetLatencySentinelMetricsResponse = IResponse<IGetLatencySentinelMetricsData>;
22
+ export interface IGetLastIncidentSentinelMetricsData {
23
+ metrics: {
24
+ incident: IApplicationSentinelHistory;
25
+ sentinel: IApplicationSentinel;
26
+ durationMs: number | null;
27
+ }[];
28
+ }
29
+ export type IGetLastIncidentSentinelMetricsResponse = IResponse<IGetLastIncidentSentinelMetricsData>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { IResponse } from '..';
2
+ export interface IUpMonitorData {
3
+ upTime: number;
4
+ processId: string;
5
+ requestId: string;
6
+ }
7
+ export type IUpMonitorResponse = IResponse<IUpMonitorData>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,87 @@
1
+ import { LogLevel } from '../../../enum';
2
+ export interface CoreLifetimeMetrics {
3
+ totalRequests: number;
4
+ totalHttpErrors: number;
5
+ totalHttpWarnings: number;
6
+ totalLogs: number;
7
+ totalCronTasks: number;
8
+ successfulCronTasks: number;
9
+ failedCronTasks: number;
10
+ totalEvents: number;
11
+ totalWebhooks: number;
12
+ successfulWebhooks: number;
13
+ failedWebhooks: number;
14
+ totalSentinelChecks: number;
15
+ successfulSentinelChecks: number;
16
+ failedSentinelChecks: number;
17
+ logsByLevel: Record<number, number>;
18
+ }
19
+ export interface ComputedMetrics {
20
+ averageResponseTime: number;
21
+ mostUsedEndpoint: string;
22
+ errorRate: number;
23
+ availabilityRate: number;
24
+ }
25
+ export interface RequestsByPeriod {
26
+ period: string;
27
+ count: number;
28
+ }
29
+ export interface ErrorsByStatusCode {
30
+ statusCode: number;
31
+ count: number;
32
+ }
33
+ export interface AllStatusCodes {
34
+ statusCode: number;
35
+ count: number;
36
+ }
37
+ export interface TopErrorEndpoint {
38
+ endpoint: string;
39
+ count: number;
40
+ }
41
+ export interface LogsByPeriod {
42
+ period: string;
43
+ level: LogLevel;
44
+ count: number;
45
+ }
46
+ export interface TopEvent {
47
+ name: string;
48
+ count: number;
49
+ }
50
+ export interface EventsByPeriod {
51
+ period: string;
52
+ count: number;
53
+ }
54
+ export interface MetricsBreakdowns {
55
+ errorsByStatusCode: Array<ErrorsByStatusCode>;
56
+ allStatusCodes: Array<AllStatusCodes>;
57
+ topErrorEndpoints: Array<TopErrorEndpoint>;
58
+ topEvents: Array<TopEvent>;
59
+ }
60
+ export interface ApplicationStatsMetrics {
61
+ avgCpuPercent: number | null;
62
+ minCpuPercent: number | null;
63
+ maxCpuPercent: number | null;
64
+ avgMemoryPercent: number | null;
65
+ minMemoryPercent: number | null;
66
+ maxMemoryPercent: number | null;
67
+ avgMemoryBytes: number | null;
68
+ minMemoryBytes: number | null;
69
+ maxMemoryBytes: number | null;
70
+ }
71
+ export interface ApplicationMetrics extends CoreLifetimeMetrics, ComputedMetrics, MetricsBreakdowns {
72
+ requestsByPeriod: Array<RequestsByPeriod>;
73
+ eventsByPeriod: Array<EventsByPeriod>;
74
+ logsByPeriod: Array<LogsByPeriod>;
75
+ stats: ApplicationStatsMetrics;
76
+ lifetime: CoreLifetimeMetrics;
77
+ }
78
+ export interface GetReportAdminResponse {
79
+ data: {
80
+ metrics: ApplicationMetrics & {
81
+ timePeriod: 'minute' | 'hour' | 'day' | 'month';
82
+ metricsByApplication: Array<ApplicationMetrics & {
83
+ applicationId: string;
84
+ }>;
85
+ };
86
+ };
87
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import { IWorkflow } from '../../models/workflow.model';
2
+ import { IWorkflowExecution } from '../../models/workflow-execution.model';
3
+ import { BasePaginate, IResponse } from '../..';
4
+ export type IPaginateWorkflowAdminResponse = IResponse<BasePaginate<IWorkflow>>;
5
+ export interface IGetWorkflowAdminData {
6
+ workflow: IWorkflow;
7
+ }
8
+ export type IGetWorkflowAdminResponse = IResponse<IGetWorkflowAdminData>;
9
+ export interface IUpdateWorkflowStatusAdminData {
10
+ workflow: IWorkflow;
11
+ }
12
+ export type IUpdateWorkflowStatusAdminResponse = IResponse<IUpdateWorkflowStatusAdminData>;
13
+ export interface IDeleteWorkflowAdminData {
14
+ }
15
+ export type IDeleteWorkflowAdminResponse = IResponse<IDeleteWorkflowAdminData>;
16
+ export type IPaginateWorkflowExecutionAdminResponse = IResponse<BasePaginate<IWorkflowExecution>>;
17
+ export interface ICancelWorkflowExecutionAdminData {
18
+ execution: IWorkflowExecution;
19
+ }
20
+ export type ICancelWorkflowExecutionAdminResponse = IResponse<ICancelWorkflowExecutionAdminData>;
21
+ export interface ITriggerWorkflowAdminData {
22
+ execution: IWorkflowExecution;
23
+ }
24
+ export type ITriggerWorkflowAdminResponse = IResponse<ITriggerWorkflowAdminData>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,54 @@
1
+ import { IWorkflow } from '../../models/workflow.model';
2
+ import { IWorkflowStep } from '../../models/workflow-step.model';
3
+ import { IWorkflowExecution } from '../../models/workflow-execution.model';
4
+ import { BasePaginate, IResponse } from '../..';
5
+ export interface ICreateWorkflowData {
6
+ workflow: IWorkflow;
7
+ }
8
+ export type ICreateWorkflowResponse = IResponse<ICreateWorkflowData>;
9
+ export type IPaginateWorkflowResponse = IResponse<BasePaginate<IWorkflow>>;
10
+ export interface IGetWorkflowData {
11
+ workflow: IWorkflow;
12
+ }
13
+ export type IGetWorkflowResponse = IResponse<IGetWorkflowData>;
14
+ export interface IUpdateWorkflowData {
15
+ workflow: IWorkflow;
16
+ }
17
+ export type IUpdateWorkflowResponse = IResponse<IUpdateWorkflowData>;
18
+ export interface IDeleteWorkflowData {
19
+ }
20
+ export type IDeleteWorkflowResponse = IResponse<IDeleteWorkflowData>;
21
+ export interface ICreateWorkflowStepData {
22
+ step: IWorkflowStep;
23
+ }
24
+ export type ICreateWorkflowStepResponse = IResponse<ICreateWorkflowStepData>;
25
+ export interface IListWorkflowStepsData {
26
+ steps: IWorkflowStep[];
27
+ }
28
+ export type IListWorkflowStepResponse = IResponse<IListWorkflowStepsData>;
29
+ export interface IUpdateWorkflowStepData {
30
+ step: IWorkflowStep;
31
+ }
32
+ export type IUpdateWorkflowStepResponse = IResponse<IUpdateWorkflowStepData>;
33
+ export interface IDeleteWorkflowStepData {
34
+ }
35
+ export type IDeleteWorkflowStepResponse = IResponse<IDeleteWorkflowStepData>;
36
+ export type IPaginateWorkflowExecutionResponse = IResponse<BasePaginate<IWorkflowExecution>>;
37
+ export interface IGetWorkflowExecutionData {
38
+ execution: IWorkflowExecution;
39
+ }
40
+ export type IGetWorkflowExecutionResponse = IResponse<IGetWorkflowExecutionData>;
41
+ export interface ICancelWorkflowExecutionData {
42
+ execution: IWorkflowExecution;
43
+ }
44
+ export type ICancelWorkflowExecutionResponse = IResponse<ICancelWorkflowExecutionData>;
45
+ export interface IGetWorkflowExecutionStatsData {
46
+ stats: {
47
+ totalExecutions: number;
48
+ successfulExecutions: number;
49
+ failedExecutions: number;
50
+ skippedExecutions: number;
51
+ averageDurationMs: number;
52
+ };
53
+ }
54
+ export type IGetWorkflowExecutionStatsResponse = IResponse<IGetWorkflowExecutionStatsData>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { Code, ErrorType } from '../../../enum';
2
+ export interface IApiError {
3
+ type: ErrorType;
4
+ code: Code;
5
+ message: string;
6
+ params?: string;
7
+ field?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface BaseOrder {
2
+ orderBy?: string;
3
+ descending?: boolean;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export interface BasePaginate<T> {
2
+ maxPages: number;
3
+ currentPage: number;
4
+ totalItems: number;
5
+ data: T[];
6
+ }
7
+ export interface QueryPaginate {
8
+ page?: number;
9
+ limit?: number;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { IApiError } from './api-error';
2
+ export interface IResponse<T> {
3
+ data: T;
4
+ error?: IApiError | Error;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,68 @@
1
+ import { ApplicationSentinelType } from '../../enum/application-sentinel-type.enum';
2
+ import { APIMethod } from '../../enum';
3
+ export declare const MAX_APPLICATION_SENTINEL_RETRY_COUNT = 5;
4
+ export type ApplicationSentinelConfigurationDto = ApplicationSentinelConfigurationPing | ApplicationSentinelConfigurationHttp | ApplicationSentinelConfigurationTcp;
5
+ export type ApplicationSentinelConfigurationPing = {
6
+ type: ApplicationSentinelType.PING;
7
+ host: string;
8
+ successPolicy: {
9
+ latency: {
10
+ min: number;
11
+ max: number;
12
+ };
13
+ };
14
+ };
15
+ export type ApplicationSentinelConfigurationHttp = {
16
+ type: ApplicationSentinelType.HTTP;
17
+ url: string;
18
+ method: APIMethod;
19
+ sslVerification: {
20
+ enabled: boolean;
21
+ allowSelfSigned: boolean;
22
+ };
23
+ headers: Record<string, string>;
24
+ successPolicy: {
25
+ latency: {
26
+ min: number;
27
+ max: number;
28
+ };
29
+ };
30
+ };
31
+ export type ApplicationSentinelConfigurationTcp = {
32
+ type: ApplicationSentinelType.TCP;
33
+ host: string;
34
+ port: number;
35
+ successPolicy: {
36
+ latency: {
37
+ min: number;
38
+ max: number;
39
+ };
40
+ };
41
+ };
42
+ export type ApplicationSentinelResult = {
43
+ isSuccess: boolean;
44
+ latency: number;
45
+ retryCount: number;
46
+ metadata: Record<string, string> | null;
47
+ } & (ApplicationSentinelResultPing | ApplicationSentinelResultHttp | ApplicationSentinelResultTcp);
48
+ export type ApplicationSentinelResultPing = {
49
+ type: ApplicationSentinelType.PING;
50
+ host: string;
51
+ };
52
+ export type ApplicationSentinelResultHttp = {
53
+ type: ApplicationSentinelType.HTTP;
54
+ statusCode: number | null;
55
+ url: string;
56
+ method: APIMethod;
57
+ sslResult: ApplicationSentinelSslResult | null;
58
+ };
59
+ export type ApplicationSentinelResultTcp = {
60
+ type: ApplicationSentinelType.TCP;
61
+ host: string;
62
+ port: number;
63
+ };
64
+ export type ApplicationSentinelSslResult = {
65
+ isSelfSigned: boolean;
66
+ isExpired: boolean;
67
+ expiredAt: Date | null;
68
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MAX_APPLICATION_SENTINEL_RETRY_COUNT = void 0;
4
+ exports.MAX_APPLICATION_SENTINEL_RETRY_COUNT = 5;
@@ -0,0 +1,2 @@
1
+ export * from './webhook.dto';
2
+ export * from './application-sentinel-configuration.dto';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./webhook.dto"), exports);
18
+ __exportStar(require("./application-sentinel-configuration.dto"), exports);
@@ -0,0 +1,27 @@
1
+ import { ApplicationWebhookScope, LogLevel } from '../../enum';
2
+ import { ApplicationSentinelResult } from './application-sentinel-configuration.dto';
3
+ export type WebhookDTO = {
4
+ id: string;
5
+ groupId: string;
6
+ webhookSecret: string;
7
+ applicationId: string;
8
+ } & (WebhookEventPayloadDTO | WebhookSentinelCheckPayloadDTO);
9
+ export type WebhookEventPayloadDTO = {
10
+ scope: ApplicationWebhookScope.EVENT;
11
+ payload: {
12
+ event: string;
13
+ applicationEventId: string;
14
+ level: LogLevel;
15
+ message: string | null;
16
+ data: Record<string, unknown> | null;
17
+ date: Date;
18
+ };
19
+ };
20
+ export type WebhookSentinelCheckPayloadDTO = {
21
+ scope: ApplicationWebhookScope.SENTINEL;
22
+ payload: {
23
+ applicationSentinelId: string;
24
+ applicationSentinelHistoryId: string;
25
+ result: ApplicationSentinelResult;
26
+ };
27
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export * from './api';
2
+ export * from './models/workflow.model';
3
+ export * from './models/workflow-step.model';
4
+ export * from './models/workflow-execution.model';
5
+ export * from './models/workflow-execution-step.model';
6
+ export * from './models/domain-verification.model';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api"), exports);
18
+ __exportStar(require("./models/workflow.model"), exports);
19
+ __exportStar(require("./models/workflow-step.model"), exports);
20
+ __exportStar(require("./models/workflow-execution.model"), exports);
21
+ __exportStar(require("./models/workflow-execution-step.model"), exports);
22
+ __exportStar(require("./models/domain-verification.model"), exports);
@@ -0,0 +1,17 @@
1
+ import { IApplicationCronTask } from './application-cron-task.model';
2
+ export interface IApplicationCronTaskHistory {
3
+ id?: string;
4
+ applicationCronTaskId: string;
5
+ startDate: Date;
6
+ requestId: string | null;
7
+ hasFailed: boolean | null;
8
+ responseStatusCode: number | null;
9
+ responseData: string | null;
10
+ responseHeaders: string | null;
11
+ responseTimeMs: number | null;
12
+ errorMessage: string | null;
13
+ retryCount: number | null;
14
+ updatedAt?: Date;
15
+ createdAt?: Date;
16
+ applicationCronTask?: IApplicationCronTask;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { IApplication } from './application.model';
2
+ export interface IApplicationCronTask {
3
+ id?: string;
4
+ applicationId: string;
5
+ name: string;
6
+ description: string | null;
7
+ scheduleConfiguration: string;
8
+ webhookUrl: string;
9
+ webhookSecret: string;
10
+ isActivated: boolean;
11
+ updatedAt?: Date;
12
+ createdAt?: Date;
13
+ application?: IApplication;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { LogLevel } from '../../enum';
2
+ import { IApplicationLog } from './application-log.model';
3
+ import { IApplicationWebhookHistory } from './application-webhook-history.model';
4
+ import { IApplication } from './application.model';
5
+ export interface IApplicationEvent {
6
+ id?: string;
7
+ applicationId: string;
8
+ event: string;
9
+ message: string | null;
10
+ level: LogLevel;
11
+ data: Record<string, unknown> | null;
12
+ applicationLogId?: string | null;
13
+ updatedAt?: Date;
14
+ createdAt?: Date;
15
+ deletedAt?: Date | null;
16
+ application?: IApplication;
17
+ applicationLog?: IApplicationLog | null;
18
+ applicationWebhookHistory?: IApplicationWebhookHistory[];
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { CoreLifetimeMetrics, ApplicationStatsMetrics, MetricsBreakdowns } from '../api/responses/report.admin.response';
2
+ export interface HourlyComputedMetrics {
3
+ avgResponseTime: number;
4
+ mostUsedEndpoint: string;
5
+ errorRate: number;
6
+ availabilityRate: number;
7
+ }
8
+ export interface IApplicationHourlyMetrics extends CoreLifetimeMetrics, HourlyComputedMetrics, MetricsBreakdowns, ApplicationStatsMetrics {
9
+ id?: string;
10
+ applicationId: string;
11
+ hour: Date;
12
+ createdAt?: Date;
13
+ updatedAt?: Date;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { CoreLifetimeMetrics } from '../api/responses/report.admin.response';
2
+ export interface IApplicationLifetimeMetrics extends CoreLifetimeMetrics {
3
+ id?: string;
4
+ applicationId: string;
5
+ lastCalculatedAt: Date;
6
+ createdAt?: Date;
7
+ updatedAt?: Date;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import { APIMethod } from '../../enum';
2
+ import { IApplicationLog } from './application-log.model';
3
+ export interface IApplicationLogEndpoint {
4
+ id?: string;
5
+ applicationLogId: string;
6
+ authentication: string | null;
7
+ controller: string;
8
+ endpoint: string;
9
+ requestParams: Record<string, string> | null;
10
+ requestQuery: Record<string, string | string[]> | null;
11
+ requestBody: Record<string, unknown> | string | null;
12
+ responseBody: Record<string, unknown> | string | null;
13
+ responseHttpCode: number;
14
+ ip: string[];
15
+ method: APIMethod;
16
+ responseTime: number;
17
+ updatedAt?: Date;
18
+ createdAt?: Date;
19
+ applicationLog?: IApplicationLog;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { LogLevel } from '../../enum';
2
+ import { IApplicationEvent } from './application-event.model';
3
+ import { IApplicationLogEndpoint } from './application-log-endpoint.model';
4
+ import { IApplication } from './application.model';
5
+ export interface IApplicationLog {
6
+ id?: string;
7
+ applicationId: string;
8
+ title: string | null;
9
+ message: string;
10
+ level: LogLevel;
11
+ scenario: string | null;
12
+ context: string | null;
13
+ data: Record<string, unknown> | null;
14
+ stack: string | null;
15
+ processId: string;
16
+ requestId: string | null;
17
+ dateValue: Date;
18
+ updatedAt?: Date;
19
+ createdAt?: Date;
20
+ application?: IApplication;
21
+ applicationLogEndpoint?: IApplicationLogEndpoint;
22
+ applicationEvent?: IApplicationEvent;
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { ApplicationSentinelResult } from '../dto';
2
+ import { IApplicationSentinel } from './application-sentinel.model';
3
+ import { IApplicationWebhookHistory } from './application-webhook-history.model';
4
+ export interface IApplicationSentinelHistory {
5
+ id?: string;
6
+ applicationSentinelId: string;
7
+ startDate: Date;
8
+ hasFailed: boolean;
9
+ latency: number | null;
10
+ webhookMetadata: Record<string, string>;
11
+ result: ApplicationSentinelResult;
12
+ updatedAt?: Date;
13
+ createdAt?: Date;
14
+ applicationSentinel?: IApplicationSentinel;
15
+ applicationWebhookHistory?: IApplicationWebhookHistory[];
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });