@remnawave/backend-contract 0.3.75 → 0.3.78
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/build/backend/api/controllers/nodes.d.ts +1 -0
- package/build/backend/api/controllers/nodes.d.ts.map +1 -1
- package/build/backend/api/controllers/nodes.js +1 -0
- package/build/backend/api/routes.d.ts +1 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +1 -0
- package/build/backend/commands/nodes/get-realtime-usage.command.d.ts +64 -0
- package/build/backend/commands/nodes/get-realtime-usage.command.d.ts.map +1 -0
- package/build/backend/commands/nodes/get-realtime-usage.command.js +23 -0
- package/build/backend/commands/nodes/index.d.ts +1 -0
- package/build/backend/commands/nodes/index.d.ts.map +1 -1
- package/build/backend/commands/nodes/index.js +1 -0
- package/build/backend/constants/errors/errors.d.ts +5 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +5 -0
- package/build/frontend/api/controllers/nodes.js +1 -0
- package/build/frontend/api/routes.js +1 -0
- package/build/frontend/commands/nodes/get-realtime-usage.command.js +23 -0
- package/build/frontend/commands/nodes/index.js +1 -0
- package/build/frontend/constants/errors/errors.js +5 -0
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../api/controllers/nodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../api/controllers/nodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;CAiBf,CAAC"}
|
@@ -28,6 +28,7 @@ export declare const REST_API: {
|
|
28
28
|
readonly STATS: {
|
29
29
|
readonly USAGE_BY_RANGE: "/api/nodes/usage/range";
|
30
30
|
readonly USAGE_BY_RANGE_USER: (uuid: string) => string;
|
31
|
+
readonly USAGE_REALTIME: "/api/nodes/usage/realtime";
|
31
32
|
};
|
32
33
|
readonly REORDER: "/api/nodes/reorder";
|
33
34
|
};
|
@@ -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;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;iDAKW,MAAM
|
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;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;iDAKW,MAAM;;;;;;;;;;;;kDAaL,MAAM;;;;;;;;;;qCAWnB,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;+CAGI,MAAM;;4CAGT,MAAM;;;;;;;;;;;;;kDAcA,MAAM;uCAEjB,MAAM;;gDAGG,MAAM;;;;kCAKpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;;;;;;;;0CAgBG,MAAM;;;;;;;CAQ7B,CAAC"}
|
@@ -65,6 +65,7 @@ exports.REST_API = {
|
|
65
65
|
STATS: {
|
66
66
|
USAGE_BY_RANGE: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_BY_RANGE}`,
|
67
67
|
USAGE_BY_RANGE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_BY_RANGE_USER}/${uuid}`,
|
68
|
+
USAGE_REALTIME: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_REALTIME}`,
|
68
69
|
},
|
69
70
|
REORDER: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.REORDER}`,
|
70
71
|
},
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace GetNodesRealtimeUsageCommand {
|
3
|
+
const url: "/api/nodes/usage/realtime";
|
4
|
+
const TSQ_url: "/api/nodes/usage/realtime";
|
5
|
+
const ResponseSchema: z.ZodObject<{
|
6
|
+
response: z.ZodArray<z.ZodObject<{
|
7
|
+
nodeUuid: z.ZodString;
|
8
|
+
nodeName: z.ZodString;
|
9
|
+
countryCode: z.ZodString;
|
10
|
+
downloadBytes: z.ZodNumber;
|
11
|
+
uploadBytes: z.ZodNumber;
|
12
|
+
totalBytes: z.ZodNumber;
|
13
|
+
downloadSpeedBps: z.ZodNumber;
|
14
|
+
uploadSpeedBps: z.ZodNumber;
|
15
|
+
totalSpeedBps: z.ZodNumber;
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
17
|
+
nodeName: string;
|
18
|
+
countryCode: string;
|
19
|
+
nodeUuid: string;
|
20
|
+
downloadBytes: number;
|
21
|
+
uploadBytes: number;
|
22
|
+
totalBytes: number;
|
23
|
+
downloadSpeedBps: number;
|
24
|
+
uploadSpeedBps: number;
|
25
|
+
totalSpeedBps: number;
|
26
|
+
}, {
|
27
|
+
nodeName: string;
|
28
|
+
countryCode: string;
|
29
|
+
nodeUuid: string;
|
30
|
+
downloadBytes: number;
|
31
|
+
uploadBytes: number;
|
32
|
+
totalBytes: number;
|
33
|
+
downloadSpeedBps: number;
|
34
|
+
uploadSpeedBps: number;
|
35
|
+
totalSpeedBps: number;
|
36
|
+
}>, "many">;
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
38
|
+
response: {
|
39
|
+
nodeName: string;
|
40
|
+
countryCode: string;
|
41
|
+
nodeUuid: string;
|
42
|
+
downloadBytes: number;
|
43
|
+
uploadBytes: number;
|
44
|
+
totalBytes: number;
|
45
|
+
downloadSpeedBps: number;
|
46
|
+
uploadSpeedBps: number;
|
47
|
+
totalSpeedBps: number;
|
48
|
+
}[];
|
49
|
+
}, {
|
50
|
+
response: {
|
51
|
+
nodeName: string;
|
52
|
+
countryCode: string;
|
53
|
+
nodeUuid: string;
|
54
|
+
downloadBytes: number;
|
55
|
+
uploadBytes: number;
|
56
|
+
totalBytes: number;
|
57
|
+
downloadSpeedBps: number;
|
58
|
+
uploadSpeedBps: number;
|
59
|
+
totalSpeedBps: number;
|
60
|
+
}[];
|
61
|
+
}>;
|
62
|
+
type Response = z.infer<typeof ResponseSchema>;
|
63
|
+
}
|
64
|
+
//# sourceMappingURL=get-realtime-usage.command.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-realtime-usage.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/get-realtime-usage.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,4BAA4B,CAAC;IACnC,MAAM,GAAG,6BAAsC,CAAC;IAChD,MAAM,OAAO,6BAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAczB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetNodesRealtimeUsageCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var GetNodesRealtimeUsageCommand;
|
7
|
+
(function (GetNodesRealtimeUsageCommand) {
|
8
|
+
GetNodesRealtimeUsageCommand.url = api_1.REST_API.NODES.STATS.USAGE_REALTIME;
|
9
|
+
GetNodesRealtimeUsageCommand.TSQ_url = GetNodesRealtimeUsageCommand.url;
|
10
|
+
GetNodesRealtimeUsageCommand.ResponseSchema = zod_1.z.object({
|
11
|
+
response: zod_1.z.array(zod_1.z.object({
|
12
|
+
nodeUuid: zod_1.z.string().uuid(),
|
13
|
+
nodeName: zod_1.z.string(),
|
14
|
+
countryCode: zod_1.z.string(),
|
15
|
+
downloadBytes: zod_1.z.number(),
|
16
|
+
uploadBytes: zod_1.z.number(),
|
17
|
+
totalBytes: zod_1.z.number(),
|
18
|
+
downloadSpeedBps: zod_1.z.number(),
|
19
|
+
uploadSpeedBps: zod_1.z.number(),
|
20
|
+
totalSpeedBps: zod_1.z.number(),
|
21
|
+
})),
|
22
|
+
});
|
23
|
+
})(GetNodesRealtimeUsageCommand || (exports.GetNodesRealtimeUsageCommand = GetNodesRealtimeUsageCommand = {}));
|
@@ -6,6 +6,7 @@ export * from './get-all.command';
|
|
6
6
|
export * from './get-node-user-usage-by-range.command';
|
7
7
|
export * from './get-nodes-usage-by-range.command';
|
8
8
|
export * from './get-one.command';
|
9
|
+
export * from './get-realtime-usage.command';
|
9
10
|
export * from './reorder.command';
|
10
11
|
export * from './restart-all.command';
|
11
12
|
export * from './restart.command';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
@@ -22,6 +22,7 @@ __exportStar(require("./get-all.command"), exports);
|
|
22
22
|
__exportStar(require("./get-node-user-usage-by-range.command"), exports);
|
23
23
|
__exportStar(require("./get-nodes-usage-by-range.command"), exports);
|
24
24
|
__exportStar(require("./get-one.command"), exports);
|
25
|
+
__exportStar(require("./get-realtime-usage.command"), exports);
|
25
26
|
__exportStar(require("./reorder.command"), exports);
|
26
27
|
__exportStar(require("./restart-all.command"), exports);
|
27
28
|
__exportStar(require("./restart.command"), exports);
|
@@ -499,5 +499,10 @@ export declare const ERRORS: {
|
|
499
499
|
readonly message: "Get nodes user usage by range error";
|
500
500
|
readonly httpCode: 500;
|
501
501
|
};
|
502
|
+
readonly GET_NODES_REALTIME_USAGE_ERROR: {
|
503
|
+
readonly code: "A095";
|
504
|
+
readonly message: "Get nodes realtime usage error";
|
505
|
+
readonly httpCode: 500;
|
506
|
+
};
|
502
507
|
};
|
503
508
|
//# sourceMappingURL=errors.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6K3B,CAAC"}
|
@@ -65,6 +65,7 @@ exports.REST_API = {
|
|
65
65
|
STATS: {
|
66
66
|
USAGE_BY_RANGE: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_BY_RANGE}`,
|
67
67
|
USAGE_BY_RANGE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_BY_RANGE_USER}/${uuid}`,
|
68
|
+
USAGE_REALTIME: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_REALTIME}`,
|
68
69
|
},
|
69
70
|
REORDER: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.REORDER}`,
|
70
71
|
},
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetNodesRealtimeUsageCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var GetNodesRealtimeUsageCommand;
|
7
|
+
(function (GetNodesRealtimeUsageCommand) {
|
8
|
+
GetNodesRealtimeUsageCommand.url = api_1.REST_API.NODES.STATS.USAGE_REALTIME;
|
9
|
+
GetNodesRealtimeUsageCommand.TSQ_url = GetNodesRealtimeUsageCommand.url;
|
10
|
+
GetNodesRealtimeUsageCommand.ResponseSchema = zod_1.z.object({
|
11
|
+
response: zod_1.z.array(zod_1.z.object({
|
12
|
+
nodeUuid: zod_1.z.string().uuid(),
|
13
|
+
nodeName: zod_1.z.string(),
|
14
|
+
countryCode: zod_1.z.string(),
|
15
|
+
downloadBytes: zod_1.z.number(),
|
16
|
+
uploadBytes: zod_1.z.number(),
|
17
|
+
totalBytes: zod_1.z.number(),
|
18
|
+
downloadSpeedBps: zod_1.z.number(),
|
19
|
+
uploadSpeedBps: zod_1.z.number(),
|
20
|
+
totalSpeedBps: zod_1.z.number(),
|
21
|
+
})),
|
22
|
+
});
|
23
|
+
})(GetNodesRealtimeUsageCommand || (exports.GetNodesRealtimeUsageCommand = GetNodesRealtimeUsageCommand = {}));
|
@@ -22,6 +22,7 @@ __exportStar(require("./get-all.command"), exports);
|
|
22
22
|
__exportStar(require("./get-node-user-usage-by-range.command"), exports);
|
23
23
|
__exportStar(require("./get-nodes-usage-by-range.command"), exports);
|
24
24
|
__exportStar(require("./get-one.command"), exports);
|
25
|
+
__exportStar(require("./get-realtime-usage.command"), exports);
|
25
26
|
__exportStar(require("./reorder.command"), exports);
|
26
27
|
__exportStar(require("./restart-all.command"), exports);
|
27
28
|
__exportStar(require("./restart.command"), exports);
|