@remnawave/backend-contract 0.7.24 → 0.7.26

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.
@@ -5,5 +5,6 @@ export declare const SYSTEM_ROUTES: {
5
5
  readonly BANDWIDTH_STATS: "stats/bandwidth";
6
6
  readonly NODES_STATS: "stats/nodes";
7
7
  };
8
+ readonly HEALTH: "health";
8
9
  };
9
10
  //# sourceMappingURL=system.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../api/controllers/system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAC"}
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../api/controllers/system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC"}
@@ -8,4 +8,5 @@ exports.SYSTEM_ROUTES = {
8
8
  BANDWIDTH_STATS: 'stats/bandwidth',
9
9
  NODES_STATS: 'stats/nodes',
10
10
  },
11
+ HEALTH: 'health',
11
12
  };
@@ -114,6 +114,7 @@ export declare const REST_API: {
114
114
  };
115
115
  };
116
116
  readonly SYSTEM: {
117
+ readonly HEALTH: "/api/system/health";
117
118
  readonly STATS: {
118
119
  readonly SYSTEM_STATS: "/api/system/stats";
119
120
  readonly BANDWIDTH_STATS: "/api/system/stats/bandwidth";
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;gCAYE,MAA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MAAM;;;;;;0CASf,MAAM;;;CAM7B,CAAC"}
@@ -151,6 +151,7 @@ exports.REST_API = {
151
151
  },
152
152
  },
153
153
  SYSTEM: {
154
+ HEALTH: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.HEALTH}`,
154
155
  STATS: {
155
156
  SYSTEM_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.SYSTEM_STATS}`,
156
157
  BANDWIDTH_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.BANDWIDTH_STATS}`,
@@ -0,0 +1,53 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetRemnawaveHealthCommand {
3
+ const url: "/api/system/health";
4
+ const TSQ_url: "/api/system/health";
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const ResponseSchema: z.ZodObject<{
7
+ response: z.ZodObject<{
8
+ pm2Stats: z.ZodArray<z.ZodObject<{
9
+ name: z.ZodString;
10
+ memory: z.ZodString;
11
+ cpu: z.ZodString;
12
+ }, "strip", z.ZodTypeAny, {
13
+ name: string;
14
+ memory: string;
15
+ cpu: string;
16
+ }, {
17
+ name: string;
18
+ memory: string;
19
+ cpu: string;
20
+ }>, "many">;
21
+ }, "strip", z.ZodTypeAny, {
22
+ pm2Stats: {
23
+ name: string;
24
+ memory: string;
25
+ cpu: string;
26
+ }[];
27
+ }, {
28
+ pm2Stats: {
29
+ name: string;
30
+ memory: string;
31
+ cpu: string;
32
+ }[];
33
+ }>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ response: {
36
+ pm2Stats: {
37
+ name: string;
38
+ memory: string;
39
+ cpu: string;
40
+ }[];
41
+ };
42
+ }, {
43
+ response: {
44
+ pm2Stats: {
45
+ name: string;
46
+ memory: string;
47
+ cpu: string;
48
+ }[];
49
+ };
50
+ }>;
51
+ type Response = z.infer<typeof ResponseSchema>;
52
+ }
53
+ //# sourceMappingURL=get-remnawave-health.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-remnawave-health.command.d.ts","sourceRoot":"","sources":["../../../../commands/system/get-remnawave-health.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRemnawaveHealthCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ var GetRemnawaveHealthCommand;
8
+ (function (GetRemnawaveHealthCommand) {
9
+ GetRemnawaveHealthCommand.url = api_1.REST_API.SYSTEM.HEALTH;
10
+ GetRemnawaveHealthCommand.TSQ_url = GetRemnawaveHealthCommand.url;
11
+ GetRemnawaveHealthCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.HEALTH, 'get', 'Get Remnawave Health');
12
+ GetRemnawaveHealthCommand.ResponseSchema = zod_1.z.object({
13
+ response: zod_1.z.object({
14
+ pm2Stats: zod_1.z.array(zod_1.z.object({
15
+ name: zod_1.z.string(),
16
+ memory: zod_1.z.string(),
17
+ cpu: zod_1.z.string(),
18
+ })),
19
+ }),
20
+ });
21
+ })(GetRemnawaveHealthCommand || (exports.GetRemnawaveHealthCommand = GetRemnawaveHealthCommand = {}));
@@ -89,10 +89,6 @@ export declare namespace GetStatsCommand {
89
89
  totalUsers: number;
90
90
  totalTrafficBytes: string;
91
91
  };
92
- cpu: {
93
- cores: number;
94
- physicalCores: number;
95
- };
96
92
  memory: {
97
93
  total: number;
98
94
  free: number;
@@ -100,6 +96,10 @@ export declare namespace GetStatsCommand {
100
96
  active: number;
101
97
  available: number;
102
98
  };
99
+ cpu: {
100
+ cores: number;
101
+ physicalCores: number;
102
+ };
103
103
  uptime: number;
104
104
  timestamp: number;
105
105
  onlineStats: {
@@ -117,10 +117,6 @@ export declare namespace GetStatsCommand {
117
117
  totalUsers: number;
118
118
  totalTrafficBytes: string;
119
119
  };
120
- cpu: {
121
- cores: number;
122
- physicalCores: number;
123
- };
124
120
  memory: {
125
121
  total: number;
126
122
  free: number;
@@ -128,6 +124,10 @@ export declare namespace GetStatsCommand {
128
124
  active: number;
129
125
  available: number;
130
126
  };
127
+ cpu: {
128
+ cores: number;
129
+ physicalCores: number;
130
+ };
131
131
  uptime: number;
132
132
  timestamp: number;
133
133
  onlineStats: {
@@ -147,10 +147,6 @@ export declare namespace GetStatsCommand {
147
147
  totalUsers: number;
148
148
  totalTrafficBytes: string;
149
149
  };
150
- cpu: {
151
- cores: number;
152
- physicalCores: number;
153
- };
154
150
  memory: {
155
151
  total: number;
156
152
  free: number;
@@ -158,6 +154,10 @@ export declare namespace GetStatsCommand {
158
154
  active: number;
159
155
  available: number;
160
156
  };
157
+ cpu: {
158
+ cores: number;
159
+ physicalCores: number;
160
+ };
161
161
  uptime: number;
162
162
  timestamp: number;
163
163
  onlineStats: {
@@ -177,10 +177,6 @@ export declare namespace GetStatsCommand {
177
177
  totalUsers: number;
178
178
  totalTrafficBytes: string;
179
179
  };
180
- cpu: {
181
- cores: number;
182
- physicalCores: number;
183
- };
184
180
  memory: {
185
181
  total: number;
186
182
  free: number;
@@ -188,6 +184,10 @@ export declare namespace GetStatsCommand {
188
184
  active: number;
189
185
  available: number;
190
186
  };
187
+ cpu: {
188
+ cores: number;
189
+ physicalCores: number;
190
+ };
191
191
  uptime: number;
192
192
  timestamp: number;
193
193
  onlineStats: {
@@ -1,4 +1,5 @@
1
1
  export * from './get-bandwidth-stats.command';
2
2
  export * from './get-nodes-statistics';
3
+ export * from './get-remnawave-health.command';
3
4
  export * from './get-stats.command';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/system/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/system/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC"}
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-bandwidth-stats.command"), exports);
18
18
  __exportStar(require("./get-nodes-statistics"), exports);
19
+ __exportStar(require("./get-remnawave-health.command"), exports);
19
20
  __exportStar(require("./get-stats.command"), exports);
@@ -8,4 +8,5 @@ exports.SYSTEM_ROUTES = {
8
8
  BANDWIDTH_STATS: 'stats/bandwidth',
9
9
  NODES_STATS: 'stats/nodes',
10
10
  },
11
+ HEALTH: 'health',
11
12
  };
@@ -151,6 +151,7 @@ exports.REST_API = {
151
151
  },
152
152
  },
153
153
  SYSTEM: {
154
+ HEALTH: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.HEALTH}`,
154
155
  STATS: {
155
156
  SYSTEM_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.SYSTEM_STATS}`,
156
157
  BANDWIDTH_STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS.BANDWIDTH_STATS}`,
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRemnawaveHealthCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ var GetRemnawaveHealthCommand;
8
+ (function (GetRemnawaveHealthCommand) {
9
+ GetRemnawaveHealthCommand.url = api_1.REST_API.SYSTEM.HEALTH;
10
+ GetRemnawaveHealthCommand.TSQ_url = GetRemnawaveHealthCommand.url;
11
+ GetRemnawaveHealthCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.HEALTH, 'get', 'Get Remnawave Health');
12
+ GetRemnawaveHealthCommand.ResponseSchema = zod_1.z.object({
13
+ response: zod_1.z.object({
14
+ pm2Stats: zod_1.z.array(zod_1.z.object({
15
+ name: zod_1.z.string(),
16
+ memory: zod_1.z.string(),
17
+ cpu: zod_1.z.string(),
18
+ })),
19
+ }),
20
+ });
21
+ })(GetRemnawaveHealthCommand || (exports.GetRemnawaveHealthCommand = GetRemnawaveHealthCommand = {}));
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-bandwidth-stats.command"), exports);
18
18
  __exportStar(require("./get-nodes-statistics"), exports);
19
+ __exportStar(require("./get-remnawave-health.command"), exports);
19
20
  __exportStar(require("./get-stats.command"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.7.24",
3
+ "version": "0.7.26",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",