@remnawave/node-contract 0.2.7 → 0.2.9
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/api/controllers/stats.d.ts +2 -0
- package/build/api/controllers/stats.d.ts.map +1 -1
- package/build/api/controllers/stats.js +2 -0
- package/build/api/routes.d.ts +2 -0
- package/build/api/routes.d.ts.map +1 -1
- package/build/api/routes.js +2 -0
- package/build/commands/handler/add-user.command.d.ts +24 -24
- package/build/commands/stats/get-all-inbounds-stats.command.d.ts +59 -0
- package/build/commands/stats/get-all-inbounds-stats.command.d.ts.map +1 -0
- package/build/commands/stats/get-all-inbounds-stats.command.js +21 -0
- package/build/commands/stats/get-all-outbounds-stats.command.d.ts +59 -0
- package/build/commands/stats/get-all-outbounds-stats.command.d.ts.map +1 -0
- package/build/commands/stats/get-all-outbounds-stats.command.js +21 -0
- package/build/commands/stats/get-inbound-stats.command.d.ts +4 -4
- package/build/commands/stats/get-users-stats.command.d.ts +6 -6
- package/build/commands/stats/index.d.ts +5 -3
- package/build/commands/stats/index.d.ts.map +1 -1
- package/build/commands/stats/index.js +5 -3
- package/build/constants/errors/errors.d.ts +10 -0
- package/build/constants/errors/errors.d.ts.map +1 -1
- package/build/constants/errors/errors.js +10 -0
- package/package.json +1 -1
|
@@ -5,5 +5,7 @@ export declare const STATS_ROUTES: {
|
|
|
5
5
|
readonly GET_SYSTEM_STATS: "get-system-stats";
|
|
6
6
|
readonly GET_INBOUND_STATS: "get-inbound-stats";
|
|
7
7
|
readonly GET_OUTBOUND_STATS: "get-outbound-stats";
|
|
8
|
+
readonly GET_ALL_OUTBOUNDS_STATS: "get-all-outbounds-stats";
|
|
9
|
+
readonly GET_ALL_INBOUNDS_STATS: "get-all-inbounds-stats";
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../api/controllers/stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,SAAmB,CAAC;AAEjD,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../api/controllers/stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,SAAmB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;;;;CAUf,CAAC"}
|
package/build/api/routes.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export declare const REST_API: {
|
|
|
11
11
|
readonly GET_SYSTEM_STATS: "/node/stats/get-system-stats";
|
|
12
12
|
readonly GET_INBOUND_STATS: "/node/stats/get-inbound-stats";
|
|
13
13
|
readonly GET_OUTBOUND_STATS: "/node/stats/get-outbound-stats";
|
|
14
|
+
readonly GET_ALL_OUTBOUNDS_STATS: "/node/stats/get-all-outbounds-stats";
|
|
15
|
+
readonly GET_ALL_INBOUNDS_STATS: "/node/stats/get-all-inbounds-stats";
|
|
14
16
|
};
|
|
15
17
|
readonly HANDLER: {
|
|
16
18
|
readonly ADD_USER: "/node/handler/add-user";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,SAAmB,CAAC;AAErC,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,SAAmB,CAAC;AAErC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAqBX,CAAC"}
|
package/build/api/routes.js
CHANGED
|
@@ -38,6 +38,8 @@ exports.REST_API = {
|
|
|
38
38
|
GET_SYSTEM_STATS: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_SYSTEM_STATS}`,
|
|
39
39
|
GET_INBOUND_STATS: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_INBOUND_STATS}`,
|
|
40
40
|
GET_OUTBOUND_STATS: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_OUTBOUND_STATS}`,
|
|
41
|
+
GET_ALL_OUTBOUNDS_STATS: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_ALL_OUTBOUNDS_STATS}`,
|
|
42
|
+
GET_ALL_INBOUNDS_STATS: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_ALL_INBOUNDS_STATS}`,
|
|
41
43
|
},
|
|
42
44
|
HANDLER: {
|
|
43
45
|
ADD_USER: `${exports.ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.ADD_USER}`,
|
|
@@ -19,14 +19,14 @@ export declare namespace AddUserCommand {
|
|
|
19
19
|
level: z.ZodDefault<z.ZodNumber>;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
21
|
type: "trojan";
|
|
22
|
-
username: string;
|
|
23
22
|
tag: string;
|
|
23
|
+
username: string;
|
|
24
24
|
password: string;
|
|
25
25
|
level: number;
|
|
26
26
|
}, {
|
|
27
27
|
type: "trojan";
|
|
28
|
-
username: string;
|
|
29
28
|
tag: string;
|
|
29
|
+
username: string;
|
|
30
30
|
password: string;
|
|
31
31
|
level?: number | undefined;
|
|
32
32
|
}>, z.ZodObject<{
|
|
@@ -38,15 +38,15 @@ export declare namespace AddUserCommand {
|
|
|
38
38
|
level: z.ZodDefault<z.ZodNumber>;
|
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
40
|
type: "vless";
|
|
41
|
-
username: string;
|
|
42
41
|
tag: string;
|
|
42
|
+
username: string;
|
|
43
43
|
level: number;
|
|
44
44
|
uuid: string;
|
|
45
45
|
flow: "" | "xtls-rprx-vision";
|
|
46
46
|
}, {
|
|
47
47
|
type: "vless";
|
|
48
|
-
username: string;
|
|
49
48
|
tag: string;
|
|
49
|
+
username: string;
|
|
50
50
|
uuid: string;
|
|
51
51
|
flow: "" | "xtls-rprx-vision";
|
|
52
52
|
level?: number | undefined;
|
|
@@ -60,16 +60,16 @@ export declare namespace AddUserCommand {
|
|
|
60
60
|
level: z.ZodDefault<z.ZodNumber>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
62
|
type: "shadowsocks";
|
|
63
|
-
username: string;
|
|
64
63
|
tag: string;
|
|
64
|
+
username: string;
|
|
65
65
|
password: string;
|
|
66
66
|
level: number;
|
|
67
67
|
cipherType: CipherType;
|
|
68
68
|
ivCheck: boolean;
|
|
69
69
|
}, {
|
|
70
70
|
type: "shadowsocks";
|
|
71
|
-
username: string;
|
|
72
71
|
tag: string;
|
|
72
|
+
username: string;
|
|
73
73
|
password: string;
|
|
74
74
|
cipherType: CipherType;
|
|
75
75
|
ivCheck: boolean;
|
|
@@ -82,14 +82,14 @@ export declare namespace AddUserCommand {
|
|
|
82
82
|
level: z.ZodDefault<z.ZodNumber>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
84
|
type: "shadowsocks2022";
|
|
85
|
-
username: string;
|
|
86
85
|
tag: string;
|
|
86
|
+
username: string;
|
|
87
87
|
level: number;
|
|
88
88
|
key: string;
|
|
89
89
|
}, {
|
|
90
90
|
type: "shadowsocks2022";
|
|
91
|
-
username: string;
|
|
92
91
|
tag: string;
|
|
92
|
+
username: string;
|
|
93
93
|
key: string;
|
|
94
94
|
level?: number | undefined;
|
|
95
95
|
}>, z.ZodObject<{
|
|
@@ -101,15 +101,15 @@ export declare namespace AddUserCommand {
|
|
|
101
101
|
level: z.ZodDefault<z.ZodNumber>;
|
|
102
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
103
|
type: "socks";
|
|
104
|
-
username: string;
|
|
105
104
|
tag: string;
|
|
105
|
+
username: string;
|
|
106
106
|
level: number;
|
|
107
107
|
socks_username: string;
|
|
108
108
|
socks_password: string;
|
|
109
109
|
}, {
|
|
110
110
|
type: "socks";
|
|
111
|
-
username: string;
|
|
112
111
|
tag: string;
|
|
112
|
+
username: string;
|
|
113
113
|
socks_username: string;
|
|
114
114
|
socks_password: string;
|
|
115
115
|
level?: number | undefined;
|
|
@@ -122,15 +122,15 @@ export declare namespace AddUserCommand {
|
|
|
122
122
|
level: z.ZodDefault<z.ZodNumber>;
|
|
123
123
|
}, "strip", z.ZodTypeAny, {
|
|
124
124
|
type: "http";
|
|
125
|
-
username: string;
|
|
126
125
|
tag: string;
|
|
126
|
+
username: string;
|
|
127
127
|
level: number;
|
|
128
128
|
http_username: string;
|
|
129
129
|
http_password: string;
|
|
130
130
|
}, {
|
|
131
131
|
type: "http";
|
|
132
|
-
username: string;
|
|
133
132
|
tag: string;
|
|
133
|
+
username: string;
|
|
134
134
|
http_username: string;
|
|
135
135
|
http_password: string;
|
|
136
136
|
level?: number | undefined;
|
|
@@ -138,42 +138,42 @@ export declare namespace AddUserCommand {
|
|
|
138
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
139
|
data: ({
|
|
140
140
|
type: "trojan";
|
|
141
|
-
username: string;
|
|
142
141
|
tag: string;
|
|
142
|
+
username: string;
|
|
143
143
|
password: string;
|
|
144
144
|
level: number;
|
|
145
145
|
} | {
|
|
146
146
|
type: "vless";
|
|
147
|
-
username: string;
|
|
148
147
|
tag: string;
|
|
148
|
+
username: string;
|
|
149
149
|
level: number;
|
|
150
150
|
uuid: string;
|
|
151
151
|
flow: "" | "xtls-rprx-vision";
|
|
152
152
|
} | {
|
|
153
153
|
type: "shadowsocks";
|
|
154
|
-
username: string;
|
|
155
154
|
tag: string;
|
|
155
|
+
username: string;
|
|
156
156
|
password: string;
|
|
157
157
|
level: number;
|
|
158
158
|
cipherType: CipherType;
|
|
159
159
|
ivCheck: boolean;
|
|
160
160
|
} | {
|
|
161
161
|
type: "shadowsocks2022";
|
|
162
|
-
username: string;
|
|
163
162
|
tag: string;
|
|
163
|
+
username: string;
|
|
164
164
|
level: number;
|
|
165
165
|
key: string;
|
|
166
166
|
} | {
|
|
167
167
|
type: "socks";
|
|
168
|
-
username: string;
|
|
169
168
|
tag: string;
|
|
169
|
+
username: string;
|
|
170
170
|
level: number;
|
|
171
171
|
socks_username: string;
|
|
172
172
|
socks_password: string;
|
|
173
173
|
} | {
|
|
174
174
|
type: "http";
|
|
175
|
-
username: string;
|
|
176
175
|
tag: string;
|
|
176
|
+
username: string;
|
|
177
177
|
level: number;
|
|
178
178
|
http_username: string;
|
|
179
179
|
http_password: string;
|
|
@@ -181,42 +181,42 @@ export declare namespace AddUserCommand {
|
|
|
181
181
|
}, {
|
|
182
182
|
data: ({
|
|
183
183
|
type: "trojan";
|
|
184
|
-
username: string;
|
|
185
184
|
tag: string;
|
|
185
|
+
username: string;
|
|
186
186
|
password: string;
|
|
187
187
|
level?: number | undefined;
|
|
188
188
|
} | {
|
|
189
189
|
type: "vless";
|
|
190
|
-
username: string;
|
|
191
190
|
tag: string;
|
|
191
|
+
username: string;
|
|
192
192
|
uuid: string;
|
|
193
193
|
flow: "" | "xtls-rprx-vision";
|
|
194
194
|
level?: number | undefined;
|
|
195
195
|
} | {
|
|
196
196
|
type: "shadowsocks";
|
|
197
|
-
username: string;
|
|
198
197
|
tag: string;
|
|
198
|
+
username: string;
|
|
199
199
|
password: string;
|
|
200
200
|
cipherType: CipherType;
|
|
201
201
|
ivCheck: boolean;
|
|
202
202
|
level?: number | undefined;
|
|
203
203
|
} | {
|
|
204
204
|
type: "shadowsocks2022";
|
|
205
|
-
username: string;
|
|
206
205
|
tag: string;
|
|
206
|
+
username: string;
|
|
207
207
|
key: string;
|
|
208
208
|
level?: number | undefined;
|
|
209
209
|
} | {
|
|
210
210
|
type: "socks";
|
|
211
|
-
username: string;
|
|
212
211
|
tag: string;
|
|
212
|
+
username: string;
|
|
213
213
|
socks_username: string;
|
|
214
214
|
socks_password: string;
|
|
215
215
|
level?: number | undefined;
|
|
216
216
|
} | {
|
|
217
217
|
type: "http";
|
|
218
|
-
username: string;
|
|
219
218
|
tag: string;
|
|
219
|
+
username: string;
|
|
220
220
|
http_username: string;
|
|
221
221
|
http_password: string;
|
|
222
222
|
level?: number | undefined;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace GetAllInboundsStatsCommand {
|
|
3
|
+
const url: "/node/stats/get-all-inbounds-stats";
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
reset: z.ZodBoolean;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
reset: boolean;
|
|
8
|
+
}, {
|
|
9
|
+
reset: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
const ResponseSchema: z.ZodObject<{
|
|
13
|
+
response: z.ZodObject<{
|
|
14
|
+
inbounds: z.ZodArray<z.ZodObject<{
|
|
15
|
+
inbound: z.ZodString;
|
|
16
|
+
downlink: z.ZodNumber;
|
|
17
|
+
uplink: z.ZodNumber;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
inbound: string;
|
|
20
|
+
downlink: number;
|
|
21
|
+
uplink: number;
|
|
22
|
+
}, {
|
|
23
|
+
inbound: string;
|
|
24
|
+
downlink: number;
|
|
25
|
+
uplink: number;
|
|
26
|
+
}>, "many">;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
inbounds: {
|
|
29
|
+
inbound: string;
|
|
30
|
+
downlink: number;
|
|
31
|
+
uplink: number;
|
|
32
|
+
}[];
|
|
33
|
+
}, {
|
|
34
|
+
inbounds: {
|
|
35
|
+
inbound: string;
|
|
36
|
+
downlink: number;
|
|
37
|
+
uplink: number;
|
|
38
|
+
}[];
|
|
39
|
+
}>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
response: {
|
|
42
|
+
inbounds: {
|
|
43
|
+
inbound: string;
|
|
44
|
+
downlink: number;
|
|
45
|
+
uplink: number;
|
|
46
|
+
}[];
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
response: {
|
|
50
|
+
inbounds: {
|
|
51
|
+
inbound: string;
|
|
52
|
+
downlink: number;
|
|
53
|
+
uplink: number;
|
|
54
|
+
}[];
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
57
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=get-all-inbounds-stats.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-all-inbounds-stats.command.d.ts","sourceRoot":"","sources":["../../../commands/stats/get-all-inbounds-stats.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,GAAG,sCAAwC,CAAC;IAElD,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,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.GetAllInboundsStatsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
var GetAllInboundsStatsCommand;
|
|
7
|
+
(function (GetAllInboundsStatsCommand) {
|
|
8
|
+
GetAllInboundsStatsCommand.url = api_1.REST_API.STATS.GET_ALL_INBOUNDS_STATS;
|
|
9
|
+
GetAllInboundsStatsCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
reset: zod_1.z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
GetAllInboundsStatsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.object({
|
|
14
|
+
inbounds: zod_1.z.array(zod_1.z.object({
|
|
15
|
+
inbound: zod_1.z.string(),
|
|
16
|
+
downlink: zod_1.z.number(),
|
|
17
|
+
uplink: zod_1.z.number(),
|
|
18
|
+
})),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
})(GetAllInboundsStatsCommand || (exports.GetAllInboundsStatsCommand = GetAllInboundsStatsCommand = {}));
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace GetAllOutboundsStatsCommand {
|
|
3
|
+
const url: "/node/stats/get-all-outbounds-stats";
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
reset: z.ZodBoolean;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
reset: boolean;
|
|
8
|
+
}, {
|
|
9
|
+
reset: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
const ResponseSchema: z.ZodObject<{
|
|
13
|
+
response: z.ZodObject<{
|
|
14
|
+
outbounds: z.ZodArray<z.ZodObject<{
|
|
15
|
+
outbound: z.ZodString;
|
|
16
|
+
downlink: z.ZodNumber;
|
|
17
|
+
uplink: z.ZodNumber;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
downlink: number;
|
|
20
|
+
uplink: number;
|
|
21
|
+
outbound: string;
|
|
22
|
+
}, {
|
|
23
|
+
downlink: number;
|
|
24
|
+
uplink: number;
|
|
25
|
+
outbound: string;
|
|
26
|
+
}>, "many">;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
outbounds: {
|
|
29
|
+
downlink: number;
|
|
30
|
+
uplink: number;
|
|
31
|
+
outbound: string;
|
|
32
|
+
}[];
|
|
33
|
+
}, {
|
|
34
|
+
outbounds: {
|
|
35
|
+
downlink: number;
|
|
36
|
+
uplink: number;
|
|
37
|
+
outbound: string;
|
|
38
|
+
}[];
|
|
39
|
+
}>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
response: {
|
|
42
|
+
outbounds: {
|
|
43
|
+
downlink: number;
|
|
44
|
+
uplink: number;
|
|
45
|
+
outbound: string;
|
|
46
|
+
}[];
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
response: {
|
|
50
|
+
outbounds: {
|
|
51
|
+
downlink: number;
|
|
52
|
+
uplink: number;
|
|
53
|
+
outbound: string;
|
|
54
|
+
}[];
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
57
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=get-all-outbounds-stats.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-all-outbounds-stats.command.d.ts","sourceRoot":"","sources":["../../../commands/stats/get-all-outbounds-stats.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,uCAAyC,CAAC;IAEnD,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,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.GetAllOutboundsStatsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
var GetAllOutboundsStatsCommand;
|
|
7
|
+
(function (GetAllOutboundsStatsCommand) {
|
|
8
|
+
GetAllOutboundsStatsCommand.url = api_1.REST_API.STATS.GET_ALL_OUTBOUNDS_STATS;
|
|
9
|
+
GetAllOutboundsStatsCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
reset: zod_1.z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
GetAllOutboundsStatsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.object({
|
|
14
|
+
outbounds: zod_1.z.array(zod_1.z.object({
|
|
15
|
+
outbound: zod_1.z.string(),
|
|
16
|
+
downlink: zod_1.z.number(),
|
|
17
|
+
uplink: zod_1.z.number(),
|
|
18
|
+
})),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
})(GetAllOutboundsStatsCommand || (exports.GetAllOutboundsStatsCommand = GetAllOutboundsStatsCommand = {}));
|
|
@@ -18,25 +18,25 @@ export declare namespace GetInboundStatsCommand {
|
|
|
18
18
|
downlink: z.ZodNumber;
|
|
19
19
|
uplink: z.ZodNumber;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
inbound: string;
|
|
21
22
|
downlink: number;
|
|
22
23
|
uplink: number;
|
|
23
|
-
inbound: string;
|
|
24
24
|
}, {
|
|
25
|
+
inbound: string;
|
|
25
26
|
downlink: number;
|
|
26
27
|
uplink: number;
|
|
27
|
-
inbound: string;
|
|
28
28
|
}>;
|
|
29
29
|
}, "strip", z.ZodTypeAny, {
|
|
30
30
|
response: {
|
|
31
|
+
inbound: string;
|
|
31
32
|
downlink: number;
|
|
32
33
|
uplink: number;
|
|
33
|
-
inbound: string;
|
|
34
34
|
};
|
|
35
35
|
}, {
|
|
36
36
|
response: {
|
|
37
|
+
inbound: string;
|
|
37
38
|
downlink: number;
|
|
38
39
|
uplink: number;
|
|
39
|
-
inbound: string;
|
|
40
40
|
};
|
|
41
41
|
}>;
|
|
42
42
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -16,41 +16,41 @@ export declare namespace GetUsersStatsCommand {
|
|
|
16
16
|
downlink: z.ZodNumber;
|
|
17
17
|
uplink: z.ZodNumber;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
username: string;
|
|
20
19
|
downlink: number;
|
|
21
20
|
uplink: number;
|
|
22
|
-
}, {
|
|
23
21
|
username: string;
|
|
22
|
+
}, {
|
|
24
23
|
downlink: number;
|
|
25
24
|
uplink: number;
|
|
25
|
+
username: string;
|
|
26
26
|
}>, "many">;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
28
|
users: {
|
|
29
|
-
username: string;
|
|
30
29
|
downlink: number;
|
|
31
30
|
uplink: number;
|
|
31
|
+
username: string;
|
|
32
32
|
}[];
|
|
33
33
|
}, {
|
|
34
34
|
users: {
|
|
35
|
-
username: string;
|
|
36
35
|
downlink: number;
|
|
37
36
|
uplink: number;
|
|
37
|
+
username: string;
|
|
38
38
|
}[];
|
|
39
39
|
}>;
|
|
40
40
|
}, "strip", z.ZodTypeAny, {
|
|
41
41
|
response: {
|
|
42
42
|
users: {
|
|
43
|
-
username: string;
|
|
44
43
|
downlink: number;
|
|
45
44
|
uplink: number;
|
|
45
|
+
username: string;
|
|
46
46
|
}[];
|
|
47
47
|
};
|
|
48
48
|
}, {
|
|
49
49
|
response: {
|
|
50
50
|
users: {
|
|
51
|
-
username: string;
|
|
52
51
|
downlink: number;
|
|
53
52
|
uplink: number;
|
|
53
|
+
username: string;
|
|
54
54
|
}[];
|
|
55
55
|
};
|
|
56
56
|
}>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export * from './get-
|
|
2
|
-
export * from './get-
|
|
3
|
-
export * from './get-users-stats.command';
|
|
1
|
+
export * from './get-all-inbounds-stats.command';
|
|
2
|
+
export * from './get-all-outbounds-stats.command';
|
|
4
3
|
export * from './get-inbound-stats.command';
|
|
5
4
|
export * from './get-outbound-stats.command';
|
|
5
|
+
export * from './get-system-stats.command';
|
|
6
|
+
export * from './get-user-online-status.command';
|
|
7
|
+
export * from './get-users-stats.command';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/stats/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/stats/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
|
|
@@ -14,8 +14,10 @@ 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-
|
|
18
|
-
__exportStar(require("./get-
|
|
19
|
-
__exportStar(require("./get-users-stats.command"), exports);
|
|
17
|
+
__exportStar(require("./get-all-inbounds-stats.command"), exports);
|
|
18
|
+
__exportStar(require("./get-all-outbounds-stats.command"), exports);
|
|
20
19
|
__exportStar(require("./get-inbound-stats.command"), exports);
|
|
21
20
|
__exportStar(require("./get-outbound-stats.command"), exports);
|
|
21
|
+
__exportStar(require("./get-system-stats.command"), exports);
|
|
22
|
+
__exportStar(require("./get-user-online-status.command"), exports);
|
|
23
|
+
__exportStar(require("./get-users-stats.command"), exports);
|
|
@@ -59,5 +59,15 @@ export declare const ERRORS: {
|
|
|
59
59
|
readonly message: "Failed to get inbound users";
|
|
60
60
|
readonly httpCode: 500;
|
|
61
61
|
};
|
|
62
|
+
readonly FAILED_TO_GET_INBOUNDS_STATS: {
|
|
63
|
+
readonly code: "A015";
|
|
64
|
+
readonly message: "Failed to get inbounds stats";
|
|
65
|
+
readonly httpCode: 500;
|
|
66
|
+
};
|
|
67
|
+
readonly FAILED_TO_GET_OUTBOUNDS_STATS: {
|
|
68
|
+
readonly code: "A016";
|
|
69
|
+
readonly message: "Failed to get outbounds stats";
|
|
70
|
+
readonly httpCode: 500;
|
|
71
|
+
};
|
|
62
72
|
};
|
|
63
73
|
//# 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
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CT,CAAC"}
|
|
@@ -38,4 +38,14 @@ exports.ERRORS = {
|
|
|
38
38
|
message: 'Failed to get inbound users',
|
|
39
39
|
httpCode: 500,
|
|
40
40
|
},
|
|
41
|
+
FAILED_TO_GET_INBOUNDS_STATS: {
|
|
42
|
+
code: 'A015',
|
|
43
|
+
message: 'Failed to get inbounds stats',
|
|
44
|
+
httpCode: 500,
|
|
45
|
+
},
|
|
46
|
+
FAILED_TO_GET_OUTBOUNDS_STATS: {
|
|
47
|
+
code: 'A016',
|
|
48
|
+
message: 'Failed to get outbounds stats',
|
|
49
|
+
httpCode: 500,
|
|
50
|
+
},
|
|
41
51
|
};
|