@remnawave/node-contract 2.6.10 → 2.6.12

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.
@@ -3,7 +3,6 @@ export declare const REST_API: {
3
3
  readonly XRAY: {
4
4
  readonly START: "/node/xray/start";
5
5
  readonly STOP: "/node/xray/stop";
6
- readonly STATUS: "/node/xray/status";
7
6
  readonly NODE_HEALTH_CHECK: "/node/xray/healthcheck";
8
7
  };
9
8
  readonly STATS: {
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,OAAgB,CAAC;AAErC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CX,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,OAAgB,CAAC;AAErC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CX,CAAC"}
@@ -40,7 +40,6 @@ exports.REST_API = {
40
40
  XRAY: {
41
41
  START: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.START}`,
42
42
  STOP: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.STOP}`,
43
- STATUS: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.STATUS}`,
44
43
  NODE_HEALTH_CHECK: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.NODE_HEALTH_CHECK}`,
45
44
  },
46
45
  STATS: {
@@ -3,69 +3,179 @@ export declare namespace GetSystemStatsCommand {
3
3
  const url: "/node/stats/get-system-stats";
4
4
  const ResponseSchema: z.ZodObject<{
5
5
  response: z.ZodObject<{
6
- numGoroutine: z.ZodNumber;
7
- numGC: z.ZodNumber;
8
- alloc: z.ZodNumber;
9
- totalAlloc: z.ZodNumber;
10
- sys: z.ZodNumber;
11
- mallocs: z.ZodNumber;
12
- frees: z.ZodNumber;
13
- liveObjects: z.ZodNumber;
14
- pauseTotalNs: z.ZodNumber;
15
- uptime: z.ZodNumber;
16
- reportsCount: z.ZodOptional<z.ZodNumber>;
6
+ xrayInfo: z.ZodNullable<z.ZodObject<{
7
+ numGoroutine: z.ZodNumber;
8
+ numGC: z.ZodNumber;
9
+ alloc: z.ZodNumber;
10
+ totalAlloc: z.ZodNumber;
11
+ sys: z.ZodNumber;
12
+ mallocs: z.ZodNumber;
13
+ frees: z.ZodNumber;
14
+ liveObjects: z.ZodNumber;
15
+ pauseTotalNs: z.ZodNumber;
16
+ uptime: z.ZodNumber;
17
+ }, "strip", z.ZodTypeAny, {
18
+ uptime: number;
19
+ numGoroutine: number;
20
+ numGC: number;
21
+ alloc: number;
22
+ totalAlloc: number;
23
+ sys: number;
24
+ mallocs: number;
25
+ frees: number;
26
+ liveObjects: number;
27
+ pauseTotalNs: number;
28
+ }, {
29
+ uptime: number;
30
+ numGoroutine: number;
31
+ numGC: number;
32
+ alloc: number;
33
+ totalAlloc: number;
34
+ sys: number;
35
+ mallocs: number;
36
+ frees: number;
37
+ liveObjects: number;
38
+ pauseTotalNs: number;
39
+ }>>;
40
+ plugins: z.ZodObject<{
41
+ torrentBlocker: z.ZodObject<{
42
+ reportsCount: z.ZodNumber;
43
+ }, "strip", z.ZodTypeAny, {
44
+ reportsCount: number;
45
+ }, {
46
+ reportsCount: number;
47
+ }>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ torrentBlocker: {
50
+ reportsCount: number;
51
+ };
52
+ }, {
53
+ torrentBlocker: {
54
+ reportsCount: number;
55
+ };
56
+ }>;
57
+ system: z.ZodObject<{
58
+ stats: z.ZodObject<{
59
+ memoryFree: z.ZodNumber;
60
+ uptime: z.ZodNumber;
61
+ }, "strip", z.ZodTypeAny, {
62
+ memoryFree: number;
63
+ uptime: number;
64
+ }, {
65
+ memoryFree: number;
66
+ uptime: number;
67
+ }>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ stats: {
70
+ memoryFree: number;
71
+ uptime: number;
72
+ };
73
+ }, {
74
+ stats: {
75
+ memoryFree: number;
76
+ uptime: number;
77
+ };
78
+ }>;
17
79
  }, "strip", z.ZodTypeAny, {
18
- numGoroutine: number;
19
- numGC: number;
20
- alloc: number;
21
- totalAlloc: number;
22
- sys: number;
23
- mallocs: number;
24
- frees: number;
25
- liveObjects: number;
26
- pauseTotalNs: number;
27
- uptime: number;
28
- reportsCount?: number | undefined;
80
+ xrayInfo: {
81
+ uptime: number;
82
+ numGoroutine: number;
83
+ numGC: number;
84
+ alloc: number;
85
+ totalAlloc: number;
86
+ sys: number;
87
+ mallocs: number;
88
+ frees: number;
89
+ liveObjects: number;
90
+ pauseTotalNs: number;
91
+ } | null;
92
+ plugins: {
93
+ torrentBlocker: {
94
+ reportsCount: number;
95
+ };
96
+ };
97
+ system: {
98
+ stats: {
99
+ memoryFree: number;
100
+ uptime: number;
101
+ };
102
+ };
29
103
  }, {
30
- numGoroutine: number;
31
- numGC: number;
32
- alloc: number;
33
- totalAlloc: number;
34
- sys: number;
35
- mallocs: number;
36
- frees: number;
37
- liveObjects: number;
38
- pauseTotalNs: number;
39
- uptime: number;
40
- reportsCount?: number | undefined;
104
+ xrayInfo: {
105
+ uptime: number;
106
+ numGoroutine: number;
107
+ numGC: number;
108
+ alloc: number;
109
+ totalAlloc: number;
110
+ sys: number;
111
+ mallocs: number;
112
+ frees: number;
113
+ liveObjects: number;
114
+ pauseTotalNs: number;
115
+ } | null;
116
+ plugins: {
117
+ torrentBlocker: {
118
+ reportsCount: number;
119
+ };
120
+ };
121
+ system: {
122
+ stats: {
123
+ memoryFree: number;
124
+ uptime: number;
125
+ };
126
+ };
41
127
  }>;
42
128
  }, "strip", z.ZodTypeAny, {
43
129
  response: {
44
- numGoroutine: number;
45
- numGC: number;
46
- alloc: number;
47
- totalAlloc: number;
48
- sys: number;
49
- mallocs: number;
50
- frees: number;
51
- liveObjects: number;
52
- pauseTotalNs: number;
53
- uptime: number;
54
- reportsCount?: number | undefined;
130
+ xrayInfo: {
131
+ uptime: number;
132
+ numGoroutine: number;
133
+ numGC: number;
134
+ alloc: number;
135
+ totalAlloc: number;
136
+ sys: number;
137
+ mallocs: number;
138
+ frees: number;
139
+ liveObjects: number;
140
+ pauseTotalNs: number;
141
+ } | null;
142
+ plugins: {
143
+ torrentBlocker: {
144
+ reportsCount: number;
145
+ };
146
+ };
147
+ system: {
148
+ stats: {
149
+ memoryFree: number;
150
+ uptime: number;
151
+ };
152
+ };
55
153
  };
56
154
  }, {
57
155
  response: {
58
- numGoroutine: number;
59
- numGC: number;
60
- alloc: number;
61
- totalAlloc: number;
62
- sys: number;
63
- mallocs: number;
64
- frees: number;
65
- liveObjects: number;
66
- pauseTotalNs: number;
67
- uptime: number;
68
- reportsCount?: number | undefined;
156
+ xrayInfo: {
157
+ uptime: number;
158
+ numGoroutine: number;
159
+ numGC: number;
160
+ alloc: number;
161
+ totalAlloc: number;
162
+ sys: number;
163
+ mallocs: number;
164
+ frees: number;
165
+ liveObjects: number;
166
+ pauseTotalNs: number;
167
+ } | null;
168
+ plugins: {
169
+ torrentBlocker: {
170
+ reportsCount: number;
171
+ };
172
+ };
173
+ system: {
174
+ stats: {
175
+ memoryFree: number;
176
+ uptime: number;
177
+ };
178
+ };
69
179
  };
70
180
  }>;
71
181
  type Response = z.infer<typeof ResponseSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-system-stats.command.d.ts","sourceRoot":"","sources":["../../../commands/stats/get-system-stats.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,gCAAkC,CAAC;IAE5C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAczB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-system-stats.command.d.ts","sourceRoot":"","sources":["../../../commands/stats/get-system-stats.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,gCAAkC,CAAC;IAE5C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -2,23 +2,35 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetSystemStatsCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
5
6
  const api_1 = require("../../api");
6
7
  var GetSystemStatsCommand;
7
8
  (function (GetSystemStatsCommand) {
8
9
  GetSystemStatsCommand.url = api_1.REST_API.STATS.GET_SYSTEM_STATS;
9
10
  GetSystemStatsCommand.ResponseSchema = zod_1.z.object({
10
11
  response: zod_1.z.object({
11
- numGoroutine: zod_1.z.number(),
12
- numGC: zod_1.z.number(),
13
- alloc: zod_1.z.number(),
14
- totalAlloc: zod_1.z.number(),
15
- sys: zod_1.z.number(),
16
- mallocs: zod_1.z.number(),
17
- frees: zod_1.z.number(),
18
- liveObjects: zod_1.z.number(),
19
- pauseTotalNs: zod_1.z.number(),
20
- uptime: zod_1.z.number(),
21
- reportsCount: zod_1.z.number().optional(),
12
+ xrayInfo: zod_1.z
13
+ .object({
14
+ numGoroutine: zod_1.z.number(),
15
+ numGC: zod_1.z.number(),
16
+ alloc: zod_1.z.number(),
17
+ totalAlloc: zod_1.z.number(),
18
+ sys: zod_1.z.number(),
19
+ mallocs: zod_1.z.number(),
20
+ frees: zod_1.z.number(),
21
+ liveObjects: zod_1.z.number(),
22
+ pauseTotalNs: zod_1.z.number(),
23
+ uptime: zod_1.z.number(),
24
+ })
25
+ .nullable(),
26
+ plugins: zod_1.z.object({
27
+ torrentBlocker: zod_1.z.object({
28
+ reportsCount: zod_1.z.number(),
29
+ }),
30
+ }),
31
+ system: zod_1.z.object({
32
+ stats: models_1.NodeSystemStatsSchema,
33
+ }),
22
34
  }),
23
35
  });
24
36
  })(GetSystemStatsCommand || (exports.GetSystemStatsCommand = GetSystemStatsCommand = {}));
@@ -1,5 +1,4 @@
1
1
  export * from './get-node-health-check.command';
2
- export * from './get-status-and-version.command';
3
2
  export * from './start.command';
4
3
  export * from './stop.command';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/xray/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/xray/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-node-health-check.command"), exports);
18
- __exportStar(require("./get-status-and-version.command"), exports);
19
18
  __exportStar(require("./start.command"), exports);
20
19
  __exportStar(require("./stop.command"), exports);
@@ -89,19 +89,6 @@ export declare namespace StartXrayCommand {
89
89
  isStarted: z.ZodBoolean;
90
90
  version: z.ZodNullable<z.ZodString>;
91
91
  error: z.ZodNullable<z.ZodString>;
92
- systemInformation: z.ZodNullable<z.ZodObject<{
93
- cpuCores: z.ZodNumber;
94
- cpuModel: z.ZodString;
95
- memoryTotal: z.ZodString;
96
- }, "strip", z.ZodTypeAny, {
97
- cpuCores: number;
98
- cpuModel: string;
99
- memoryTotal: string;
100
- }, {
101
- cpuCores: number;
102
- cpuModel: string;
103
- memoryTotal: string;
104
- }>>;
105
92
  nodeInformation: z.ZodObject<{
106
93
  version: z.ZodNullable<z.ZodString>;
107
94
  }, "strip", z.ZodTypeAny, {
@@ -109,27 +96,133 @@ export declare namespace StartXrayCommand {
109
96
  }, {
110
97
  version: string | null;
111
98
  }>;
99
+ system: z.ZodObject<{
100
+ info: z.ZodObject<{
101
+ arch: z.ZodString;
102
+ cpus: z.ZodNumber;
103
+ cpuModel: z.ZodString;
104
+ memoryTotal: z.ZodNumber;
105
+ hostname: z.ZodString;
106
+ platform: z.ZodString;
107
+ release: z.ZodString;
108
+ type: z.ZodString;
109
+ version: z.ZodString;
110
+ networkInterfaces: z.ZodArray<z.ZodString, "many">;
111
+ }, "strip", z.ZodTypeAny, {
112
+ type: string;
113
+ arch: string;
114
+ cpus: number;
115
+ cpuModel: string;
116
+ memoryTotal: number;
117
+ hostname: string;
118
+ platform: string;
119
+ release: string;
120
+ version: string;
121
+ networkInterfaces: string[];
122
+ }, {
123
+ type: string;
124
+ arch: string;
125
+ cpus: number;
126
+ cpuModel: string;
127
+ memoryTotal: number;
128
+ hostname: string;
129
+ platform: string;
130
+ release: string;
131
+ version: string;
132
+ networkInterfaces: string[];
133
+ }>;
134
+ stats: z.ZodObject<{
135
+ memoryFree: z.ZodNumber;
136
+ uptime: z.ZodNumber;
137
+ }, "strip", z.ZodTypeAny, {
138
+ memoryFree: number;
139
+ uptime: number;
140
+ }, {
141
+ memoryFree: number;
142
+ uptime: number;
143
+ }>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ stats: {
146
+ memoryFree: number;
147
+ uptime: number;
148
+ };
149
+ info: {
150
+ type: string;
151
+ arch: string;
152
+ cpus: number;
153
+ cpuModel: string;
154
+ memoryTotal: number;
155
+ hostname: string;
156
+ platform: string;
157
+ release: string;
158
+ version: string;
159
+ networkInterfaces: string[];
160
+ };
161
+ }, {
162
+ stats: {
163
+ memoryFree: number;
164
+ uptime: number;
165
+ };
166
+ info: {
167
+ type: string;
168
+ arch: string;
169
+ cpus: number;
170
+ cpuModel: string;
171
+ memoryTotal: number;
172
+ hostname: string;
173
+ platform: string;
174
+ release: string;
175
+ version: string;
176
+ networkInterfaces: string[];
177
+ };
178
+ }>;
112
179
  }, "strip", z.ZodTypeAny, {
113
180
  error: string | null;
114
181
  version: string | null;
182
+ system: {
183
+ stats: {
184
+ memoryFree: number;
185
+ uptime: number;
186
+ };
187
+ info: {
188
+ type: string;
189
+ arch: string;
190
+ cpus: number;
191
+ cpuModel: string;
192
+ memoryTotal: number;
193
+ hostname: string;
194
+ platform: string;
195
+ release: string;
196
+ version: string;
197
+ networkInterfaces: string[];
198
+ };
199
+ };
115
200
  isStarted: boolean;
116
- systemInformation: {
117
- cpuCores: number;
118
- cpuModel: string;
119
- memoryTotal: string;
120
- } | null;
121
201
  nodeInformation: {
122
202
  version: string | null;
123
203
  };
124
204
  }, {
125
205
  error: string | null;
126
206
  version: string | null;
207
+ system: {
208
+ stats: {
209
+ memoryFree: number;
210
+ uptime: number;
211
+ };
212
+ info: {
213
+ type: string;
214
+ arch: string;
215
+ cpus: number;
216
+ cpuModel: string;
217
+ memoryTotal: number;
218
+ hostname: string;
219
+ platform: string;
220
+ release: string;
221
+ version: string;
222
+ networkInterfaces: string[];
223
+ };
224
+ };
127
225
  isStarted: boolean;
128
- systemInformation: {
129
- cpuCores: number;
130
- cpuModel: string;
131
- memoryTotal: string;
132
- } | null;
133
226
  nodeInformation: {
134
227
  version: string | null;
135
228
  };
@@ -138,12 +231,25 @@ export declare namespace StartXrayCommand {
138
231
  response: {
139
232
  error: string | null;
140
233
  version: string | null;
234
+ system: {
235
+ stats: {
236
+ memoryFree: number;
237
+ uptime: number;
238
+ };
239
+ info: {
240
+ type: string;
241
+ arch: string;
242
+ cpus: number;
243
+ cpuModel: string;
244
+ memoryTotal: number;
245
+ hostname: string;
246
+ platform: string;
247
+ release: string;
248
+ version: string;
249
+ networkInterfaces: string[];
250
+ };
251
+ };
141
252
  isStarted: boolean;
142
- systemInformation: {
143
- cpuCores: number;
144
- cpuModel: string;
145
- memoryTotal: string;
146
- } | null;
147
253
  nodeInformation: {
148
254
  version: string | null;
149
255
  };
@@ -152,12 +258,25 @@ export declare namespace StartXrayCommand {
152
258
  response: {
153
259
  error: string | null;
154
260
  version: string | null;
261
+ system: {
262
+ stats: {
263
+ memoryFree: number;
264
+ uptime: number;
265
+ };
266
+ info: {
267
+ type: string;
268
+ arch: string;
269
+ cpus: number;
270
+ cpuModel: string;
271
+ memoryTotal: number;
272
+ hostname: string;
273
+ platform: string;
274
+ release: string;
275
+ version: string;
276
+ networkInterfaces: string[];
277
+ };
278
+ };
155
279
  isStarted: boolean;
156
- systemInformation: {
157
- cpuCores: number;
158
- cpuModel: string;
159
- memoryTotal: string;
160
- } | null;
161
280
  nodeInformation: {
162
281
  version: string | null;
163
282
  };
@@ -1 +1 @@
1
- {"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../../commands/xray/start.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,GAAG,oBAAsB,CAAC;IAChC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../../commands/xray/start.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,GAAG,oBAAsB,CAAC;IAChC,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"}
@@ -2,10 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StartXrayCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
5
6
  const api_1 = require("../../api");
6
- const UNSUPPORTED_REMNAWAVE_VERSION_MESSAGE = {
7
- message: 'Unsupported Remnawave version. Please, upgrade Remnawave to version v2.3.x or higher. Or downgrade Remnawave Node version to v2.2.3 (change :latest to :2.2.3 in docker-compose.yml, most likely in /opt/remnanode)',
8
- };
9
7
  var StartXrayCommand;
10
8
  (function (StartXrayCommand) {
11
9
  StartXrayCommand.url = api_1.REST_API.XRAY.START;
@@ -20,30 +18,18 @@ var StartXrayCommand;
20
18
  tag: zod_1.z.string(),
21
19
  })),
22
20
  }),
23
- }, {
24
- errorMap: () => ({
25
- ...UNSUPPORTED_REMNAWAVE_VERSION_MESSAGE,
26
- }),
27
- }),
28
- xrayConfig: zod_1.z.record(zod_1.z.unknown(), {
29
- errorMap: () => ({
30
- ...UNSUPPORTED_REMNAWAVE_VERSION_MESSAGE,
31
- }),
32
21
  }),
22
+ xrayConfig: zod_1.z.record(zod_1.z.unknown()),
33
23
  });
34
24
  StartXrayCommand.ResponseSchema = zod_1.z.object({
35
25
  response: zod_1.z.object({
36
26
  isStarted: zod_1.z.boolean(),
37
27
  version: zod_1.z.string().nullable(),
38
28
  error: zod_1.z.string().nullable(),
39
- systemInformation: zod_1.z.nullable(zod_1.z.object({
40
- cpuCores: zod_1.z.number(),
41
- cpuModel: zod_1.z.string(),
42
- memoryTotal: zod_1.z.string(),
43
- })),
44
29
  nodeInformation: zod_1.z.object({
45
30
  version: zod_1.z.string().nullable(),
46
31
  }),
32
+ system: models_1.NodeSystemSchema,
47
33
  }),
48
34
  });
49
35
  })(StartXrayCommand || (exports.StartXrayCommand = StartXrayCommand = {}));
@@ -74,7 +74,7 @@ const XRAY_TORRENT_BLOCKER_ROUTING_RULES_MODEL = ({ webhookUrl, }) => ({
74
74
  outboundTag: 'RW_TB_OUTBOUND_BLOCK',
75
75
  webhook: {
76
76
  url: webhookUrl,
77
- deduplication: 30,
77
+ deduplication: 5,
78
78
  },
79
79
  });
80
80
  exports.XRAY_TORRENT_BLOCKER_ROUTING_RULES_MODEL = XRAY_TORRENT_BLOCKER_ROUTING_RULES_MODEL;
@@ -1,3 +1,4 @@
1
+ export * from './node-system.schema';
1
2
  export * from './torrent-blocker.report.schema';
2
3
  export * from './xray-webhook.schema';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
@@ -14,5 +14,6 @@ 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("./node-system.schema"), exports);
17
18
  __exportStar(require("./torrent-blocker.report.schema"), exports);
18
19
  __exportStar(require("./xray-webhook.schema"), exports);
@@ -0,0 +1,129 @@
1
+ import { z } from 'zod';
2
+ export declare const NodeSystemInfoSchema: z.ZodObject<{
3
+ arch: z.ZodString;
4
+ cpus: z.ZodNumber;
5
+ cpuModel: z.ZodString;
6
+ memoryTotal: z.ZodNumber;
7
+ hostname: z.ZodString;
8
+ platform: z.ZodString;
9
+ release: z.ZodString;
10
+ type: z.ZodString;
11
+ version: z.ZodString;
12
+ networkInterfaces: z.ZodArray<z.ZodString, "many">;
13
+ }, "strip", z.ZodTypeAny, {
14
+ type: string;
15
+ arch: string;
16
+ cpus: number;
17
+ cpuModel: string;
18
+ memoryTotal: number;
19
+ hostname: string;
20
+ platform: string;
21
+ release: string;
22
+ version: string;
23
+ networkInterfaces: string[];
24
+ }, {
25
+ type: string;
26
+ arch: string;
27
+ cpus: number;
28
+ cpuModel: string;
29
+ memoryTotal: number;
30
+ hostname: string;
31
+ platform: string;
32
+ release: string;
33
+ version: string;
34
+ networkInterfaces: string[];
35
+ }>;
36
+ export type TNodeSystemInfo = z.infer<typeof NodeSystemInfoSchema>;
37
+ export declare const NodeSystemStatsSchema: z.ZodObject<{
38
+ memoryFree: z.ZodNumber;
39
+ uptime: z.ZodNumber;
40
+ }, "strip", z.ZodTypeAny, {
41
+ memoryFree: number;
42
+ uptime: number;
43
+ }, {
44
+ memoryFree: number;
45
+ uptime: number;
46
+ }>;
47
+ export type TNodeSystemStats = z.infer<typeof NodeSystemStatsSchema>;
48
+ export declare const NodeSystemSchema: z.ZodObject<{
49
+ info: z.ZodObject<{
50
+ arch: z.ZodString;
51
+ cpus: z.ZodNumber;
52
+ cpuModel: z.ZodString;
53
+ memoryTotal: z.ZodNumber;
54
+ hostname: z.ZodString;
55
+ platform: z.ZodString;
56
+ release: z.ZodString;
57
+ type: z.ZodString;
58
+ version: z.ZodString;
59
+ networkInterfaces: z.ZodArray<z.ZodString, "many">;
60
+ }, "strip", z.ZodTypeAny, {
61
+ type: string;
62
+ arch: string;
63
+ cpus: number;
64
+ cpuModel: string;
65
+ memoryTotal: number;
66
+ hostname: string;
67
+ platform: string;
68
+ release: string;
69
+ version: string;
70
+ networkInterfaces: string[];
71
+ }, {
72
+ type: string;
73
+ arch: string;
74
+ cpus: number;
75
+ cpuModel: string;
76
+ memoryTotal: number;
77
+ hostname: string;
78
+ platform: string;
79
+ release: string;
80
+ version: string;
81
+ networkInterfaces: string[];
82
+ }>;
83
+ stats: z.ZodObject<{
84
+ memoryFree: z.ZodNumber;
85
+ uptime: z.ZodNumber;
86
+ }, "strip", z.ZodTypeAny, {
87
+ memoryFree: number;
88
+ uptime: number;
89
+ }, {
90
+ memoryFree: number;
91
+ uptime: number;
92
+ }>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ stats: {
95
+ memoryFree: number;
96
+ uptime: number;
97
+ };
98
+ info: {
99
+ type: string;
100
+ arch: string;
101
+ cpus: number;
102
+ cpuModel: string;
103
+ memoryTotal: number;
104
+ hostname: string;
105
+ platform: string;
106
+ release: string;
107
+ version: string;
108
+ networkInterfaces: string[];
109
+ };
110
+ }, {
111
+ stats: {
112
+ memoryFree: number;
113
+ uptime: number;
114
+ };
115
+ info: {
116
+ type: string;
117
+ arch: string;
118
+ cpus: number;
119
+ cpuModel: string;
120
+ memoryTotal: number;
121
+ hostname: string;
122
+ platform: string;
123
+ release: string;
124
+ version: string;
125
+ networkInterfaces: string[];
126
+ };
127
+ }>;
128
+ export type TNodeSystem = z.infer<typeof NodeSystemSchema>;
129
+ //# sourceMappingURL=node-system.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-system.schema.d.ts","sourceRoot":"","sources":["../../models/node-system.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW/B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnE,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAErE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeSystemSchema = exports.NodeSystemStatsSchema = exports.NodeSystemInfoSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.NodeSystemInfoSchema = zod_1.z.object({
6
+ arch: zod_1.z.string(),
7
+ cpus: zod_1.z.number().int(),
8
+ cpuModel: zod_1.z.string(),
9
+ memoryTotal: zod_1.z.number(),
10
+ hostname: zod_1.z.string(),
11
+ platform: zod_1.z.string(),
12
+ release: zod_1.z.string(),
13
+ type: zod_1.z.string(),
14
+ version: zod_1.z.string(),
15
+ networkInterfaces: zod_1.z.array(zod_1.z.string()),
16
+ });
17
+ exports.NodeSystemStatsSchema = zod_1.z.object({
18
+ memoryFree: zod_1.z.number(),
19
+ uptime: zod_1.z.number(),
20
+ });
21
+ exports.NodeSystemSchema = zod_1.z.object({
22
+ info: exports.NodeSystemInfoSchema,
23
+ stats: exports.NodeSystemStatsSchema,
24
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/node-contract",
3
- "version": "2.6.10",
3
+ "version": "2.6.12",
4
4
  "description": "A node-contract library for Remnawave Panel",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1,28 +0,0 @@
1
- import { z } from 'zod';
2
- export declare namespace GetStatusAndVersionCommand {
3
- const url: "/node/xray/status";
4
- const ResponseSchema: z.ZodObject<{
5
- response: z.ZodObject<{
6
- isRunning: z.ZodBoolean;
7
- version: z.ZodNullable<z.ZodString>;
8
- }, "strip", z.ZodTypeAny, {
9
- isRunning: boolean;
10
- version: string | null;
11
- }, {
12
- isRunning: boolean;
13
- version: string | null;
14
- }>;
15
- }, "strip", z.ZodTypeAny, {
16
- response: {
17
- isRunning: boolean;
18
- version: string | null;
19
- };
20
- }, {
21
- response: {
22
- isRunning: boolean;
23
- version: string | null;
24
- };
25
- }>;
26
- type Response = z.infer<typeof ResponseSchema>;
27
- }
28
- //# sourceMappingURL=get-status-and-version.command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-status-and-version.command.d.ts","sourceRoot":"","sources":["../../../commands/xray/get-status-and-version.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,GAAG,qBAAuB,CAAC;IAEjC,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetStatusAndVersionCommand = void 0;
4
- const zod_1 = require("zod");
5
- const api_1 = require("../../api");
6
- var GetStatusAndVersionCommand;
7
- (function (GetStatusAndVersionCommand) {
8
- GetStatusAndVersionCommand.url = api_1.REST_API.XRAY.STATUS;
9
- GetStatusAndVersionCommand.ResponseSchema = zod_1.z.object({
10
- response: zod_1.z.object({
11
- isRunning: zod_1.z.boolean(),
12
- version: zod_1.z.string().nullable(),
13
- }),
14
- });
15
- })(GetStatusAndVersionCommand || (exports.GetStatusAndVersionCommand = GetStatusAndVersionCommand = {}));