@abyss-project/monitor 1.0.15 → 1.0.17

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.
@@ -18,3 +18,4 @@ export * from './application-webhook-history.api';
18
18
  export * from './application-webhook-history.admin.api';
19
19
  export * from './application-sentinel.api';
20
20
  export * from './application-sentinel.admin.api';
21
+ export * from './metrics.api';
package/dist/api/index.js CHANGED
@@ -34,3 +34,4 @@ __exportStar(require("./application-webhook-history.api"), exports);
34
34
  __exportStar(require("./application-webhook-history.admin.api"), exports);
35
35
  __exportStar(require("./application-sentinel.api"), exports);
36
36
  __exportStar(require("./application-sentinel.admin.api"), exports);
37
+ __exportStar(require("./metrics.api"), exports);
@@ -0,0 +1,2 @@
1
+ import { IGetSentinelMetricsParams, IGetSentinelMetricsResponse } from '../types';
2
+ export declare const getSentinelMetrics: (params: IGetSentinelMetricsParams) => Promise<IGetSentinelMetricsResponse>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSentinelMetrics = void 0;
4
+ const __1 = require("..");
5
+ const getSentinelMetrics = async (params) => {
6
+ return (await __1.AbyssMonitorCore.axios.get(`metrics/sentinel/${params.projectId}`)).data;
7
+ };
8
+ exports.getSentinelMetrics = getSentinelMetrics;
@@ -18,5 +18,5 @@ export declare enum Code {
18
18
  maxStoreEntryNumber = "max_store_entry_number",
19
19
  slugAlreadyExist = "slug_already_exist",
20
20
  maxEventPublishPerDay = "max_event_publish_per_day",
21
- maxSentinelNumberPerProject = "max_sentinel_number_per_project"
21
+ maxSentinelNumber = "max_sentinel_number"
22
22
  }
@@ -23,5 +23,5 @@ var Code;
23
23
  Code["maxStoreEntryNumber"] = "max_store_entry_number";
24
24
  Code["slugAlreadyExist"] = "slug_already_exist";
25
25
  Code["maxEventPublishPerDay"] = "max_event_publish_per_day";
26
- Code["maxSentinelNumberPerProject"] = "max_sentinel_number_per_project";
26
+ Code["maxSentinelNumber"] = "max_sentinel_number";
27
27
  })(Code || (exports.Code = Code = {}));
@@ -21,6 +21,7 @@ export * from './requests/application-webhook-history.admin.request';
21
21
  export * from './requests/application-webhook-history.request';
22
22
  export * from './requests/application-sentinel.admin.request';
23
23
  export * from './requests/application-sentinel.request';
24
+ export * from './requests/metrics.request';
24
25
  export * from './responses/application.response';
25
26
  export * from './responses/application.admin.response';
26
27
  export * from './responses/application-stats.admin.response';
@@ -41,3 +42,4 @@ export * from './responses/application-webhook-history.admin.response';
41
42
  export * from './responses/application-webhook-history.response';
42
43
  export * from './responses/application-sentinel.admin.response';
43
44
  export * from './responses/application-sentinel.response';
45
+ export * from './responses/metrics.response';
@@ -37,6 +37,7 @@ __exportStar(require("./requests/application-webhook-history.admin.request"), ex
37
37
  __exportStar(require("./requests/application-webhook-history.request"), exports);
38
38
  __exportStar(require("./requests/application-sentinel.admin.request"), exports);
39
39
  __exportStar(require("./requests/application-sentinel.request"), exports);
40
+ __exportStar(require("./requests/metrics.request"), exports);
40
41
  __exportStar(require("./responses/application.response"), exports);
41
42
  __exportStar(require("./responses/application.admin.response"), exports);
42
43
  __exportStar(require("./responses/application-stats.admin.response"), exports);
@@ -57,3 +58,4 @@ __exportStar(require("./responses/application-webhook-history.admin.response"),
57
58
  __exportStar(require("./responses/application-webhook-history.response"), exports);
58
59
  __exportStar(require("./responses/application-sentinel.admin.response"), exports);
59
60
  __exportStar(require("./responses/application-sentinel.response"), exports);
61
+ __exportStar(require("./responses/metrics.response"), exports);
@@ -11,4 +11,7 @@ export type IPaginateApplicationWebhookHistoryAdminQuery = {
11
11
  webhookId?: string;
12
12
  groupId?: string;
13
13
  scope?: ApplicationWebhookScope[];
14
+ applicationEventId?: string[];
15
+ applicationSentinelHistoryId?: string[];
16
+ applicationSentinelId?: string[];
14
17
  } & QueryPaginate;
@@ -14,4 +14,7 @@ export type IPaginateApplicationWebhookHistoryQuery = {
14
14
  webhookId?: string;
15
15
  groupId?: string;
16
16
  scope?: ApplicationWebhookScope[];
17
+ applicationEventId?: string[];
18
+ applicationSentinelHistoryId?: string[];
19
+ applicationSentinelId?: string[];
17
20
  } & QueryPaginate;
@@ -0,0 +1,6 @@
1
+ export interface IGetSentinelMetricsParams {
2
+ projectId: string;
3
+ }
4
+ export interface IGetSentinelMetricsQuery {
5
+ applicationIds: string[];
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { IResponse, IApplicationSentinel } from '../..';
2
+ export interface IGetSentinelMetricsData {
3
+ metrics: {
4
+ applicationSentinel: IApplicationSentinel[];
5
+ };
6
+ }
7
+ export type IGetSentinelMetricsResponse = IResponse<IGetSentinelMetricsData>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -19,7 +19,6 @@ export type ApplicationSentinelConfigurationHttp = {
19
19
  sslVerification: {
20
20
  enabled: boolean;
21
21
  allowSelfSigned: boolean;
22
- notifyOnSslError: boolean;
23
22
  };
24
23
  headers: Record<string, string>;
25
24
  successPolicy: {
@@ -27,12 +26,6 @@ export type ApplicationSentinelConfigurationHttp = {
27
26
  min: number;
28
27
  max: number;
29
28
  };
30
- statusCode: {
31
- success: number[] | null;
32
- failure: number[] | null;
33
- rangeSuccess: [number, number] | null;
34
- rangeFailure: [number, number] | null;
35
- };
36
29
  };
37
30
  };
38
31
  export type ApplicationSentinelConfigurationTcp = {
@@ -1,4 +1,5 @@
1
1
  import { ApplicationSentinelConfigurationDto } from '../dto/application-sentinel-configuration.dto';
2
+ import { IApplicationSentinelHistory } from './application-sentinel-history.model';
2
3
  import { IApplication } from './application.model';
3
4
  export interface IApplicationSentinel {
4
5
  id?: string;
@@ -13,4 +14,5 @@ export interface IApplicationSentinel {
13
14
  updatedAt?: Date;
14
15
  createdAt?: Date;
15
16
  application?: IApplication;
17
+ applicationSentinelsHistory?: IApplicationSentinelHistory[];
16
18
  }
@@ -25,15 +25,8 @@ export type ApplicationWebhookFilters = {
25
25
  endsWith?: string[] | null;
26
26
  } | null;
27
27
  [ApplicationWebhookScope.SENTINEL]?: {
28
- type: ApplicationSentinelType;
29
- latency: number;
30
- statusCode: number | null;
31
- sslResult: {
32
- isSelfSigned: boolean;
33
- isExpired: boolean;
34
- expiredAt: Date | null;
35
- } | null;
36
- retryCount: number;
37
- metadata: Record<string, string> | null;
28
+ type?: ApplicationSentinelType;
29
+ latency?: number;
30
+ retryCount?: number;
38
31
  } | null;
39
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/monitor",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Core package to interact with Abyss-Monitor",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",