@remnawave/backend-contract 0.0.30 → 0.0.32
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/commands/system/get-stats.command.js +5 -0
- package/build/commands/xray/index.js +1 -0
- package/build/commands/xray/update-config.command.js +15 -0
- package/build/constants/errors/errors.js +5 -0
- package/build/constants/events/events.js +27 -0
- package/build/constants/events/index.js +17 -0
- package/build/constants/index.js +1 -0
- package/commands/system/get-stats.command.ts +7 -0
- package/commands/xray/index.ts +1 -0
- package/commands/xray/update-config.command.ts +18 -0
- package/constants/errors/errors.ts +5 -0
- package/constants/events/events.ts +24 -0
- package/constants/events/index.ts +1 -0
- package/constants/index.ts +1 -0
- package/package.json +1 -1
@@ -37,6 +37,11 @@ var GetStatsCommand;
|
|
37
37
|
previous: zod_1.z.string(),
|
38
38
|
percentage: zod_1.z.number(),
|
39
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
|
+
})),
|
40
45
|
}),
|
41
46
|
}),
|
42
47
|
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateXrayConfigCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var UpdateXrayConfigCommand;
|
7
|
+
(function (UpdateXrayConfigCommand) {
|
8
|
+
UpdateXrayConfigCommand.url = api_1.REST_API.XRAY.UPDATE_CONFIG;
|
9
|
+
UpdateXrayConfigCommand.RequestSchema = zod_1.z.record(zod_1.z.any());
|
10
|
+
UpdateXrayConfigCommand.ResponseSchema = zod_1.z.object({
|
11
|
+
response: zod_1.z.object({
|
12
|
+
config: zod_1.z.record(zod_1.z.any()),
|
13
|
+
}),
|
14
|
+
});
|
15
|
+
})(UpdateXrayConfigCommand || (exports.UpdateXrayConfigCommand = UpdateXrayConfigCommand = {}));
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EVENTS = void 0;
|
4
|
+
exports.EVENTS = {
|
5
|
+
USER: {
|
6
|
+
CREATED: 'user.created',
|
7
|
+
MODIFIED: 'user.modified',
|
8
|
+
DELETED: 'user.deleted',
|
9
|
+
REVOKED: 'user.revoked',
|
10
|
+
DISABLED: 'user.disabled',
|
11
|
+
ENABLED: 'user.enabled',
|
12
|
+
LIMITED: 'user.limited',
|
13
|
+
EXPIRED: 'user.expired',
|
14
|
+
TRAFFIC_RESET: 'user.traffic_reset',
|
15
|
+
TRAFFIC_REACHED: 'user.traffic_reached',
|
16
|
+
},
|
17
|
+
NODE: {
|
18
|
+
CREATED: 'node.created',
|
19
|
+
MODIFIED: 'node.modified',
|
20
|
+
DISABLED: 'node.disabled',
|
21
|
+
ENABLED: 'node.enabled',
|
22
|
+
DELETED: 'node.deleted',
|
23
|
+
CONNECTION_LOST: 'node.connection_lost',
|
24
|
+
CONNECTION_RESTORED: 'node.connection_restored',
|
25
|
+
RESTARTED: 'node.restarted',
|
26
|
+
},
|
27
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./events"), exports);
|
package/build/constants/index.js
CHANGED
package/commands/xray/index.ts
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
import { REST_API } from '../../api';
|
3
|
+
|
4
|
+
export namespace UpdateXrayConfigCommand {
|
5
|
+
export const url = REST_API.XRAY.UPDATE_CONFIG;
|
6
|
+
|
7
|
+
export const RequestSchema = z.record(z.any());
|
8
|
+
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
10
|
+
|
11
|
+
export const ResponseSchema = z.object({
|
12
|
+
response: z.object({
|
13
|
+
config: z.record(z.any()),
|
14
|
+
}),
|
15
|
+
});
|
16
|
+
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
18
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export const EVENTS = {
|
2
|
+
USER: {
|
3
|
+
CREATED: 'user.created',
|
4
|
+
MODIFIED: 'user.modified',
|
5
|
+
DELETED: 'user.deleted',
|
6
|
+
REVOKED: 'user.revoked',
|
7
|
+
DISABLED: 'user.disabled',
|
8
|
+
ENABLED: 'user.enabled',
|
9
|
+
LIMITED: 'user.limited',
|
10
|
+
EXPIRED: 'user.expired',
|
11
|
+
TRAFFIC_RESET: 'user.traffic_reset',
|
12
|
+
TRAFFIC_REACHED: 'user.traffic_reached',
|
13
|
+
},
|
14
|
+
NODE: {
|
15
|
+
CREATED: 'node.created',
|
16
|
+
MODIFIED: 'node.modified',
|
17
|
+
DISABLED: 'node.disabled',
|
18
|
+
ENABLED: 'node.enabled',
|
19
|
+
DELETED: 'node.deleted',
|
20
|
+
CONNECTION_LOST: 'node.connection_lost',
|
21
|
+
CONNECTION_RESTORED: 'node.connection_restored',
|
22
|
+
RESTARTED: 'node.restarted',
|
23
|
+
},
|
24
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './events';
|
package/constants/index.ts
CHANGED