@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.
- package/.eslintrc.js +34 -0
- package/README.md +2 -0
- package/USAGE_EXAMPLES.md +257 -0
- package/dist/api/application-cron-task.admin.api.d.ts +10 -0
- package/dist/api/application-cron-task.admin.api.js +40 -0
- package/dist/api/application-cron-task.api.d.ts +10 -0
- package/dist/api/application-cron-task.api.js +40 -0
- package/dist/api/application-event.admin.api.d.ts +4 -0
- package/dist/api/application-event.admin.api.js +16 -0
- package/dist/api/application-event.api.d.ts +8 -0
- package/dist/api/application-event.api.js +32 -0
- package/dist/api/application-log.admin.api.d.ts +3 -0
- package/dist/api/application-log.admin.api.js +12 -0
- package/dist/api/application-log.api.d.ts +4 -0
- package/dist/api/application-log.api.js +16 -0
- package/dist/api/application-sentinel.admin.api.d.ts +9 -0
- package/dist/api/application-sentinel.admin.api.js +36 -0
- package/dist/api/application-sentinel.api.d.ts +10 -0
- package/dist/api/application-sentinel.api.js +40 -0
- package/dist/api/application-stats.admin.api.d.ts +3 -0
- package/dist/api/application-stats.admin.api.js +12 -0
- package/dist/api/application-stats.api.d.ts +4 -0
- package/dist/api/application-stats.api.js +16 -0
- package/dist/api/application-webhook-history.admin.api.d.ts +3 -0
- package/dist/api/application-webhook-history.admin.api.js +12 -0
- package/dist/api/application-webhook-history.api.d.ts +3 -0
- package/dist/api/application-webhook-history.api.js +12 -0
- package/dist/api/application-webhook.admin.api.d.ts +7 -0
- package/dist/api/application-webhook.admin.api.js +28 -0
- package/dist/api/application-webhook.api.d.ts +7 -0
- package/dist/api/application-webhook.api.js +28 -0
- package/dist/api/application.admin.api.d.ts +7 -0
- package/dist/api/application.admin.api.js +28 -0
- package/dist/api/application.api.d.ts +10 -0
- package/dist/api/application.api.js +40 -0
- package/dist/api/domain-verification.admin.api.d.ts +2 -0
- package/dist/api/domain-verification.admin.api.js +9 -0
- package/dist/api/domain-verification.api.d.ts +7 -0
- package/dist/api/domain-verification.api.js +28 -0
- package/dist/api/hourly-metrics.api.d.ts +2 -0
- package/dist/api/hourly-metrics.api.js +8 -0
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.js +21 -0
- package/dist/api/infrastructure.admin.api.d.ts +3 -0
- package/dist/api/infrastructure.admin.api.js +12 -0
- package/dist/api/metrics.api.d.ts +4 -0
- package/dist/api/metrics.api.js +16 -0
- package/dist/api/monitor.api.d.ts +2 -0
- package/dist/api/monitor.api.js +8 -0
- package/dist/api/report.admin.api.d.ts +2 -0
- package/dist/api/report.admin.api.js +9 -0
- package/dist/api/workflow.admin.api.d.ts +8 -0
- package/dist/api/workflow.admin.api.js +34 -0
- package/dist/api/workflow.api.d.ts +15 -0
- package/dist/api/workflow.api.js +62 -0
- package/dist/frameworks/express/decorators.d.ts +52 -0
- package/dist/frameworks/express/decorators.js +163 -0
- package/dist/frameworks/express/index.d.ts +17 -0
- package/dist/frameworks/express/index.js +173 -0
- package/dist/frameworks/express/metadata.d.ts +9 -0
- package/dist/frameworks/express/metadata.js +12 -0
- package/dist/frameworks/index.d.ts +1 -0
- package/dist/frameworks/index.js +17 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.js +163 -0
- package/dist/middlewares/context.middleware.d.ts +12 -0
- package/dist/middlewares/context.middleware.js +39 -0
- package/dist/middlewares/index.d.ts +3 -0
- package/dist/middlewares/index.js +19 -0
- package/dist/middlewares/logger-endpoint.middleware.d.ts +5 -0
- package/dist/middlewares/logger-endpoint.middleware.js +86 -0
- package/dist/middlewares/logger-setup.middleware.d.ts +5 -0
- package/dist/middlewares/logger-setup.middleware.js +16 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +17 -0
- package/dist/models/logger.model.d.ts +61 -0
- package/dist/models/logger.model.js +201 -0
- package/dist/models/stats-publisher.model.d.ts +20 -0
- package/dist/models/stats-publisher.model.js +113 -0
- package/dist/types/dto/domain-verification.dto.d.ts +19 -0
- package/dist/types/dto/domain-verification.dto.js +2 -0
- package/dist/types/dto/index.d.ts +1 -0
- package/dist/types/dto/index.js +17 -0
- package/dist/types/enum/api-error.enum.d.ts +20 -0
- package/dist/types/enum/api-error.enum.js +25 -0
- package/dist/types/enum/api-method.enum.d.ts +7 -0
- package/dist/types/enum/api-method.enum.js +11 -0
- package/dist/types/enum/application-alert-type.enum.d.ts +5 -0
- package/dist/types/enum/application-alert-type.enum.js +9 -0
- package/dist/types/enum/application-sentinel-type.enum.d.ts +5 -0
- package/dist/types/enum/application-sentinel-type.enum.js +9 -0
- package/dist/types/enum/application-stats-type.enum.d.ts +5 -0
- package/dist/types/enum/application-stats-type.enum.js +9 -0
- package/dist/types/enum/application-webhook-scope.enum.d.ts +4 -0
- package/dist/types/enum/application-webhook-scope.enum.js +8 -0
- package/dist/types/enum/index.d.ts +1 -0
- package/dist/types/enum/index.js +17 -0
- package/dist/types/enum/log-level.enum.d.ts +6 -0
- package/dist/types/enum/log-level.enum.js +10 -0
- package/dist/types/enum/log-scenario.enum.d.ts +5 -0
- package/dist/types/enum/log-scenario.enum.js +9 -0
- package/dist/types/enum/time-period.enum.d.ts +0 -0
- package/dist/types/enum/time-period.enum.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +19 -0
- package/dist/types/interface/api/index.d.ts +13 -0
- package/dist/types/interface/api/index.js +29 -0
- package/dist/types/interface/api/requests/application-cron-task.admin.request.d.ts +50 -0
- package/dist/types/interface/api/requests/application-cron-task.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-cron-task.request.d.ts +61 -0
- package/dist/types/interface/api/requests/application-cron-task.request.js +2 -0
- package/dist/types/interface/api/requests/application-event.admin.request.d.ts +16 -0
- package/dist/types/interface/api/requests/application-event.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-event.request.d.ts +50 -0
- package/dist/types/interface/api/requests/application-event.request.js +2 -0
- package/dist/types/interface/api/requests/application-log.admin.request.d.ts +19 -0
- package/dist/types/interface/api/requests/application-log.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-log.request.d.ts +59 -0
- package/dist/types/interface/api/requests/application-log.request.js +2 -0
- package/dist/types/interface/api/requests/application-sentinel.admin.request.d.ts +52 -0
- package/dist/types/interface/api/requests/application-sentinel.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-sentinel.request.d.ts +71 -0
- package/dist/types/interface/api/requests/application-sentinel.request.js +2 -0
- package/dist/types/interface/api/requests/application-stats.admin.request.d.ts +13 -0
- package/dist/types/interface/api/requests/application-stats.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-stats.request.d.ts +31 -0
- package/dist/types/interface/api/requests/application-stats.request.js +2 -0
- package/dist/types/interface/api/requests/application-webhook-history.admin.request.d.ts +16 -0
- package/dist/types/interface/api/requests/application-webhook-history.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-webhook-history.request.d.ts +21 -0
- package/dist/types/interface/api/requests/application-webhook-history.request.js +2 -0
- package/dist/types/interface/api/requests/application-webhook.admin.request.d.ts +39 -0
- package/dist/types/interface/api/requests/application-webhook.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application-webhook.request.d.ts +45 -0
- package/dist/types/interface/api/requests/application-webhook.request.js +2 -0
- package/dist/types/interface/api/requests/application.admin.request.d.ts +23 -0
- package/dist/types/interface/api/requests/application.admin.request.js +2 -0
- package/dist/types/interface/api/requests/application.request.d.ts +64 -0
- package/dist/types/interface/api/requests/application.request.js +2 -0
- package/dist/types/interface/api/requests/domain-verification.admin.request.d.ts +5 -0
- package/dist/types/interface/api/requests/domain-verification.admin.request.js +2 -0
- package/dist/types/interface/api/requests/domain-verification.request.d.ts +29 -0
- package/dist/types/interface/api/requests/domain-verification.request.js +2 -0
- package/dist/types/interface/api/requests/hourly-metrics.request.d.ts +10 -0
- package/dist/types/interface/api/requests/hourly-metrics.request.js +2 -0
- package/dist/types/interface/api/requests/infrastructure.admin.request.d.ts +4 -0
- package/dist/types/interface/api/requests/infrastructure.admin.request.js +2 -0
- package/dist/types/interface/api/requests/metrics.admin.request.d.ts +14 -0
- package/dist/types/interface/api/requests/metrics.admin.request.js +2 -0
- package/dist/types/interface/api/requests/metrics.request.d.ts +23 -0
- package/dist/types/interface/api/requests/metrics.request.js +2 -0
- package/dist/types/interface/api/requests/report.admin.request.d.ts +6 -0
- package/dist/types/interface/api/requests/report.admin.request.js +2 -0
- package/dist/types/interface/api/requests/workflow.admin.request.d.ts +35 -0
- package/dist/types/interface/api/requests/workflow.admin.request.js +2 -0
- package/dist/types/interface/api/requests/workflow.request.d.ts +114 -0
- package/dist/types/interface/api/requests/workflow.request.js +2 -0
- package/dist/types/interface/api/responses/application-cron-task.admin.response.d.ts +30 -0
- package/dist/types/interface/api/responses/application-cron-task.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-cron-task.response.d.ts +30 -0
- package/dist/types/interface/api/responses/application-cron-task.response.js +2 -0
- package/dist/types/interface/api/responses/application-event.admin.response.d.ts +9 -0
- package/dist/types/interface/api/responses/application-event.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-event.response.d.ts +33 -0
- package/dist/types/interface/api/responses/application-event.response.js +2 -0
- package/dist/types/interface/api/responses/application-log.admin.response.d.ts +10 -0
- package/dist/types/interface/api/responses/application-log.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-log.response.d.ts +10 -0
- package/dist/types/interface/api/responses/application-log.response.js +2 -0
- package/dist/types/interface/api/responses/application-sentinel.admin.response.d.ts +26 -0
- package/dist/types/interface/api/responses/application-sentinel.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-sentinel.response.d.ts +33 -0
- package/dist/types/interface/api/responses/application-sentinel.response.js +2 -0
- package/dist/types/interface/api/responses/application-stats.admin.response.d.ts +6 -0
- package/dist/types/interface/api/responses/application-stats.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-stats.response.d.ts +10 -0
- package/dist/types/interface/api/responses/application-stats.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook-history.admin.response.d.ts +7 -0
- package/dist/types/interface/api/responses/application-webhook-history.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook-history.response.d.ts +7 -0
- package/dist/types/interface/api/responses/application-webhook-history.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook.admin.response.d.ts +21 -0
- package/dist/types/interface/api/responses/application-webhook.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application-webhook.response.d.ts +21 -0
- package/dist/types/interface/api/responses/application-webhook.response.js +2 -0
- package/dist/types/interface/api/responses/application.admin.response.d.ts +34 -0
- package/dist/types/interface/api/responses/application.admin.response.js +2 -0
- package/dist/types/interface/api/responses/application.response.d.ts +130 -0
- package/dist/types/interface/api/responses/application.response.js +2 -0
- package/dist/types/interface/api/responses/domain-verification.admin.response.d.ts +6 -0
- package/dist/types/interface/api/responses/domain-verification.admin.response.js +2 -0
- package/dist/types/interface/api/responses/domain-verification.response.d.ts +29 -0
- package/dist/types/interface/api/responses/domain-verification.response.js +2 -0
- package/dist/types/interface/api/responses/hourly-metrics.response.d.ts +70 -0
- package/dist/types/interface/api/responses/hourly-metrics.response.js +2 -0
- package/dist/types/interface/api/responses/infrastructure.admin.response.d.ts +18 -0
- package/dist/types/interface/api/responses/infrastructure.admin.response.js +2 -0
- package/dist/types/interface/api/responses/metrics.admin.response.d.ts +19 -0
- package/dist/types/interface/api/responses/metrics.admin.response.js +2 -0
- package/dist/types/interface/api/responses/metrics.response.d.ts +29 -0
- package/dist/types/interface/api/responses/metrics.response.js +2 -0
- package/dist/types/interface/api/responses/monitor.response.d.ts +7 -0
- package/dist/types/interface/api/responses/monitor.response.js +2 -0
- package/dist/types/interface/api/responses/report.admin.response.d.ts +87 -0
- package/dist/types/interface/api/responses/report.admin.response.js +2 -0
- package/dist/types/interface/api/responses/workflow.admin.response.d.ts +24 -0
- package/dist/types/interface/api/responses/workflow.admin.response.js +2 -0
- package/dist/types/interface/api/responses/workflow.response.d.ts +54 -0
- package/dist/types/interface/api/responses/workflow.response.js +2 -0
- package/dist/types/interface/api/type-message/api-error.d.ts +8 -0
- package/dist/types/interface/api/type-message/api-error.js +2 -0
- package/dist/types/interface/api/type-message/base-order.d.ts +4 -0
- package/dist/types/interface/api/type-message/base-order.js +2 -0
- package/dist/types/interface/api/type-message/base-paginate.d.ts +10 -0
- package/dist/types/interface/api/type-message/base-paginate.js +2 -0
- package/dist/types/interface/api/type-message/response.d.ts +5 -0
- package/dist/types/interface/api/type-message/response.js +2 -0
- package/dist/types/interface/dto/application-sentinel-configuration.dto.d.ts +68 -0
- package/dist/types/interface/dto/application-sentinel-configuration.dto.js +4 -0
- package/dist/types/interface/dto/index.d.ts +2 -0
- package/dist/types/interface/dto/index.js +18 -0
- package/dist/types/interface/dto/webhook.dto.d.ts +27 -0
- package/dist/types/interface/dto/webhook.dto.js +2 -0
- package/dist/types/interface/index.d.ts +6 -0
- package/dist/types/interface/index.js +22 -0
- package/dist/types/interface/models/application-cron-task-history.model.d.ts +17 -0
- package/dist/types/interface/models/application-cron-task-history.model.js +2 -0
- package/dist/types/interface/models/application-cron-task.model.d.ts +14 -0
- package/dist/types/interface/models/application-cron-task.model.js +2 -0
- package/dist/types/interface/models/application-event.model.d.ts +19 -0
- package/dist/types/interface/models/application-event.model.js +2 -0
- package/dist/types/interface/models/application-hourly-metrics.model.d.ts +14 -0
- package/dist/types/interface/models/application-hourly-metrics.model.js +2 -0
- package/dist/types/interface/models/application-lifetime-metrics.model.d.ts +8 -0
- package/dist/types/interface/models/application-lifetime-metrics.model.js +2 -0
- package/dist/types/interface/models/application-log-endpoint.model.d.ts +20 -0
- package/dist/types/interface/models/application-log-endpoint.model.js +2 -0
- package/dist/types/interface/models/application-log.model.d.ts +23 -0
- package/dist/types/interface/models/application-log.model.js +2 -0
- package/dist/types/interface/models/application-sentinel-history.model.d.ts +16 -0
- package/dist/types/interface/models/application-sentinel-history.model.js +2 -0
- package/dist/types/interface/models/application-sentinel.model.d.ts +20 -0
- package/dist/types/interface/models/application-sentinel.model.js +2 -0
- package/dist/types/interface/models/application-stats.model.d.ts +14 -0
- package/dist/types/interface/models/application-stats.model.js +2 -0
- package/dist/types/interface/models/application-webhook-history.model.d.ts +22 -0
- package/dist/types/interface/models/application-webhook-history.model.js +2 -0
- package/dist/types/interface/models/application-webhook.model.d.ts +32 -0
- package/dist/types/interface/models/application-webhook.model.js +3 -0
- package/dist/types/interface/models/application.model.d.ts +19 -0
- package/dist/types/interface/models/application.model.js +2 -0
- package/dist/types/interface/models/domain-verification.model.d.ts +42 -0
- package/dist/types/interface/models/domain-verification.model.js +14 -0
- package/dist/types/interface/models/partition-optimization-history.model.d.ts +11 -0
- package/dist/types/interface/models/partition-optimization-history.model.js +2 -0
- package/dist/types/interface/models/project.model.d.ts +11 -0
- package/dist/types/interface/models/project.model.js +2 -0
- package/dist/types/interface/models/workflow-execution-step.model.d.ts +59 -0
- package/dist/types/interface/models/workflow-execution-step.model.js +12 -0
- package/dist/types/interface/models/workflow-execution.model.d.ts +76 -0
- package/dist/types/interface/models/workflow-execution.model.js +13 -0
- package/dist/types/interface/models/workflow-step.model.d.ts +106 -0
- package/dist/types/interface/models/workflow-step.model.js +44 -0
- package/dist/types/interface/models/workflow.model.d.ts +90 -0
- package/dist/types/interface/models/workflow.model.js +24 -0
- package/dist/typing-examples.d.ts +1 -0
- package/dist/typing-examples.js +48 -0
- package/dist/utils/alert.utils.d.ts +35 -0
- package/dist/utils/alert.utils.js +138 -0
- package/dist/utils/discord-webhook-log-formatter.utils.d.ts +48 -0
- package/dist/utils/discord-webhook-log-formatter.utils.js +332 -0
- package/dist/utils/error.utils.d.ts +15 -0
- package/dist/utils/error.utils.js +24 -0
- package/dist/utils/import.utils.d.ts +1 -0
- package/dist/utils/import.utils.js +7 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/json.utils.d.ts +1 -0
- package/dist/utils/json.utils.js +13 -0
- package/dist/utils/non-blocking-promise.utils.d.ts +2 -0
- package/dist/utils/non-blocking-promise.utils.js +11 -0
- package/package.json +49 -0
- package/tsconfig.json +105 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -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,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,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,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,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,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,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,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,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,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,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,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,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,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
|
+
}
|