@remnawave/backend-contract 0.0.32 → 0.0.33
Sign up to get free protection for your applications and to get access to all the features.
- package/api/controllers/system.ts +1 -0
- package/api/routes.ts +1 -0
- package/build/api/controllers/system.js +1 -0
- package/build/api/routes.js +1 -0
- package/build/commands/system/get-bandwidth-stats.command.js +26 -0
- package/build/commands/system/index.js +1 -0
- package/commands/system/get-bandwidth-stats.command.ts +29 -0
- package/commands/system/index.ts +1 -0
- package/package.json +1 -1
package/api/routes.ts
CHANGED
package/build/api/routes.js
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetBandwidthStatsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var GetBandwidthStatsCommand;
|
7
|
+
(function (GetBandwidthStatsCommand) {
|
8
|
+
GetBandwidthStatsCommand.url = api_1.REST_API.SYSTEM.BANDWIDTH;
|
9
|
+
GetBandwidthStatsCommand.RequestQuerySchema = zod_1.z.object({
|
10
|
+
tz: zod_1.z.string().optional(),
|
11
|
+
});
|
12
|
+
GetBandwidthStatsCommand.ResponseSchema = zod_1.z.object({
|
13
|
+
response: zod_1.z.object({
|
14
|
+
bandwidthLastTwoDays: zod_1.z.object({
|
15
|
+
current: zod_1.z.string(),
|
16
|
+
previous: zod_1.z.string(),
|
17
|
+
difference: zod_1.z.string(),
|
18
|
+
}),
|
19
|
+
bandwidthLastSevenDays: zod_1.z.object({
|
20
|
+
current: zod_1.z.string(),
|
21
|
+
previous: zod_1.z.string(),
|
22
|
+
difference: zod_1.z.string(),
|
23
|
+
}),
|
24
|
+
}),
|
25
|
+
});
|
26
|
+
})(GetBandwidthStatsCommand || (exports.GetBandwidthStatsCommand = GetBandwidthStatsCommand = {}));
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./get-bandwidth-stats.command"), exports);
|
17
18
|
__exportStar(require("./get-stats.command"), exports);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
import { REST_API } from '../../api';
|
3
|
+
|
4
|
+
export namespace GetBandwidthStatsCommand {
|
5
|
+
export const url = REST_API.SYSTEM.BANDWIDTH;
|
6
|
+
|
7
|
+
export const RequestQuerySchema = z.object({
|
8
|
+
tz: z.string().optional(),
|
9
|
+
});
|
10
|
+
|
11
|
+
export type Request = z.infer<typeof RequestQuerySchema>;
|
12
|
+
|
13
|
+
export const ResponseSchema = z.object({
|
14
|
+
response: z.object({
|
15
|
+
bandwidthLastTwoDays: z.object({
|
16
|
+
current: z.string(),
|
17
|
+
previous: z.string(),
|
18
|
+
difference: z.string(),
|
19
|
+
}),
|
20
|
+
bandwidthLastSevenDays: z.object({
|
21
|
+
current: z.string(),
|
22
|
+
previous: z.string(),
|
23
|
+
difference: z.string(),
|
24
|
+
}),
|
25
|
+
}),
|
26
|
+
});
|
27
|
+
|
28
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
29
|
+
}
|
package/commands/system/index.ts
CHANGED