@remnawave/backend-contract 0.0.40 → 0.0.42
Sign up to get free protection for your applications and to get access to all the features.
- package/build/commands/nodes/get-one.command.js +1 -0
- package/build/commands/system/get-stats.command.js +0 -12
- package/build/models/nodes.schema.js +17 -17
- package/commands/nodes/get-one.command.ts +1 -0
- package/commands/system/get-stats.command.ts +0 -14
- package/models/nodes.schema.ts +17 -17
- package/package.json +1 -1
@@ -7,6 +7,7 @@ const models_1 = require("../../models");
|
|
7
7
|
var GetOneNodeCommand;
|
8
8
|
(function (GetOneNodeCommand) {
|
9
9
|
GetOneNodeCommand.url = api_1.REST_API.NODES.GET_ONE;
|
10
|
+
GetOneNodeCommand.TSQ_url = GetOneNodeCommand.url(':uuid');
|
10
11
|
GetOneNodeCommand.RequestSchema = zod_1.z.object({
|
11
12
|
uuid: zod_1.z.string().uuid(),
|
12
13
|
});
|
@@ -31,18 +31,6 @@ var GetStatsCommand;
|
|
31
31
|
totalUsers: zod_1.z.number(),
|
32
32
|
totalTrafficBytes: zod_1.z.string(),
|
33
33
|
}),
|
34
|
-
stats: zod_1.z.object({
|
35
|
-
nodesUsageLastTwoDays: zod_1.z.object({
|
36
|
-
current: zod_1.z.string(),
|
37
|
-
previous: zod_1.z.string(),
|
38
|
-
percentage: zod_1.z.number(),
|
39
|
-
}),
|
40
|
-
sevenDaysStats: zod_1.z.array(zod_1.z.object({
|
41
|
-
nodeName: zod_1.z.string(),
|
42
|
-
totalBytes: zod_1.z.string(),
|
43
|
-
date: zod_1.z.string(),
|
44
|
-
})),
|
45
|
-
}),
|
46
34
|
}),
|
47
35
|
});
|
48
36
|
})(GetStatsCommand || (exports.GetStatsCommand = GetStatsCommand = {}));
|
@@ -6,23 +6,23 @@ exports.NodesSchema = zod_1.z.object({
|
|
6
6
|
uuid: zod_1.z.string().uuid(),
|
7
7
|
name: zod_1.z.string(),
|
8
8
|
address: zod_1.z.string(),
|
9
|
-
port: zod_1.z.number().int()
|
10
|
-
isConnected: zod_1.z.boolean()
|
11
|
-
isDisabled: zod_1.z.boolean()
|
12
|
-
isConnecting: zod_1.z.boolean()
|
13
|
-
isNodeOnline: zod_1.z.boolean()
|
14
|
-
isXrayRunning: zod_1.z.boolean()
|
15
|
-
lastStatusChange: zod_1.z.
|
16
|
-
lastStatusMessage: zod_1.z.
|
17
|
-
xrayVersion: zod_1.z.
|
18
|
-
isTrafficTrackingActive: zod_1.z.boolean()
|
19
|
-
trafficResetDay: zod_1.z.number().int()
|
20
|
-
trafficLimitBytes: zod_1.z.
|
21
|
-
trafficUsedBytes: zod_1.z.
|
22
|
-
notifyPercent: zod_1.z.number().int()
|
23
|
-
cpuCount: zod_1.z.number().int()
|
24
|
-
cpuModel: zod_1.z.
|
25
|
-
totalRam: zod_1.z.
|
9
|
+
port: zod_1.z.nullable(zod_1.z.number().int()),
|
10
|
+
isConnected: zod_1.z.boolean(),
|
11
|
+
isDisabled: zod_1.z.boolean(),
|
12
|
+
isConnecting: zod_1.z.boolean(),
|
13
|
+
isNodeOnline: zod_1.z.boolean(),
|
14
|
+
isXrayRunning: zod_1.z.boolean(),
|
15
|
+
lastStatusChange: zod_1.z.nullable(zod_1.z.date()),
|
16
|
+
lastStatusMessage: zod_1.z.nullable(zod_1.z.string()),
|
17
|
+
xrayVersion: zod_1.z.nullable(zod_1.z.string()),
|
18
|
+
isTrafficTrackingActive: zod_1.z.boolean(),
|
19
|
+
trafficResetDay: zod_1.z.nullable(zod_1.z.number().int()),
|
20
|
+
trafficLimitBytes: zod_1.z.nullable(zod_1.z.number()),
|
21
|
+
trafficUsedBytes: zod_1.z.nullable(zod_1.z.number()),
|
22
|
+
notifyPercent: zod_1.z.nullable(zod_1.z.number().int()),
|
23
|
+
cpuCount: zod_1.z.nullable(zod_1.z.number().int()),
|
24
|
+
cpuModel: zod_1.z.nullable(zod_1.z.string()),
|
25
|
+
totalRam: zod_1.z.nullable(zod_1.z.string()),
|
26
26
|
createdAt: zod_1.z.date(),
|
27
27
|
updatedAt: zod_1.z.date(),
|
28
28
|
});
|
@@ -35,20 +35,6 @@ export namespace GetStatsCommand {
|
|
35
35
|
totalUsers: z.number(),
|
36
36
|
totalTrafficBytes: z.string(),
|
37
37
|
}),
|
38
|
-
stats: z.object({
|
39
|
-
nodesUsageLastTwoDays: z.object({
|
40
|
-
current: z.string(),
|
41
|
-
previous: z.string(),
|
42
|
-
percentage: z.number(),
|
43
|
-
}),
|
44
|
-
sevenDaysStats: z.array(
|
45
|
-
z.object({
|
46
|
-
nodeName: z.string(),
|
47
|
-
totalBytes: z.string(),
|
48
|
-
date: z.string(),
|
49
|
-
}),
|
50
|
-
),
|
51
|
-
}),
|
52
38
|
}),
|
53
39
|
});
|
54
40
|
|
package/models/nodes.schema.ts
CHANGED
@@ -4,24 +4,24 @@ export const NodesSchema = z.object({
|
|
4
4
|
uuid: z.string().uuid(),
|
5
5
|
name: z.string(),
|
6
6
|
address: z.string(),
|
7
|
-
port: z.number().int()
|
8
|
-
isConnected: z.boolean()
|
9
|
-
isDisabled: z.boolean()
|
10
|
-
isConnecting: z.boolean()
|
11
|
-
isNodeOnline: z.boolean()
|
12
|
-
isXrayRunning: z.boolean()
|
13
|
-
lastStatusChange: z.
|
14
|
-
lastStatusMessage: z.
|
15
|
-
xrayVersion: z.
|
16
|
-
isTrafficTrackingActive: z.boolean()
|
17
|
-
trafficResetDay: z.number().int()
|
18
|
-
trafficLimitBytes: z.
|
19
|
-
trafficUsedBytes: z.
|
20
|
-
notifyPercent: z.number().int()
|
7
|
+
port: z.nullable(z.number().int()),
|
8
|
+
isConnected: z.boolean(),
|
9
|
+
isDisabled: z.boolean(),
|
10
|
+
isConnecting: z.boolean(),
|
11
|
+
isNodeOnline: z.boolean(),
|
12
|
+
isXrayRunning: z.boolean(),
|
13
|
+
lastStatusChange: z.nullable(z.date()),
|
14
|
+
lastStatusMessage: z.nullable(z.string()),
|
15
|
+
xrayVersion: z.nullable(z.string()),
|
16
|
+
isTrafficTrackingActive: z.boolean(),
|
17
|
+
trafficResetDay: z.nullable(z.number().int()),
|
18
|
+
trafficLimitBytes: z.nullable(z.number()),
|
19
|
+
trafficUsedBytes: z.nullable(z.number()),
|
20
|
+
notifyPercent: z.nullable(z.number().int()),
|
21
21
|
|
22
|
-
cpuCount: z.number().int()
|
23
|
-
cpuModel: z.
|
24
|
-
totalRam: z.
|
22
|
+
cpuCount: z.nullable(z.number().int()),
|
23
|
+
cpuModel: z.nullable(z.string()),
|
24
|
+
totalRam: z.nullable(z.string()),
|
25
25
|
|
26
26
|
createdAt: z.date(),
|
27
27
|
updatedAt: z.date(),
|