@remnawave/node-contract 2.6.9 → 2.6.11

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.
Files changed (31) hide show
  1. package/build/api/controllers/stats.d.ts +1 -0
  2. package/build/api/controllers/stats.d.ts.map +1 -1
  3. package/build/api/controllers/stats.js +1 -0
  4. package/build/api/routes.d.ts +1 -1
  5. package/build/api/routes.js +1 -1
  6. package/build/commands/stats/get-system-stats.command.d.ts +145 -55
  7. package/build/commands/stats/get-system-stats.command.d.ts.map +1 -1
  8. package/build/commands/stats/get-system-stats.command.js +21 -11
  9. package/build/commands/stats/get-users-ip-list.command.d.ts +71 -0
  10. package/build/commands/stats/get-users-ip-list.command.d.ts.map +1 -0
  11. package/build/commands/stats/get-users-ip-list.command.js +26 -0
  12. package/build/commands/stats/index.d.ts +1 -0
  13. package/build/commands/stats/index.d.ts.map +1 -1
  14. package/build/commands/stats/index.js +1 -0
  15. package/build/commands/xray/index.d.ts +0 -1
  16. package/build/commands/xray/index.d.ts.map +1 -1
  17. package/build/commands/xray/index.js +0 -1
  18. package/build/commands/xray/start.command.d.ts +140 -33
  19. package/build/commands/xray/start.command.d.ts.map +1 -1
  20. package/build/commands/xray/start.command.js +4 -17
  21. package/build/constants/xray/stats.js +1 -1
  22. package/build/models/host-info.schema.d.ts +48 -0
  23. package/build/models/host-info.schema.d.ts.map +1 -0
  24. package/build/models/host-info.schema.js +20 -0
  25. package/build/models/index.d.ts +1 -0
  26. package/build/models/index.d.ts.map +1 -1
  27. package/build/models/index.js +1 -0
  28. package/package.json +1 -1
  29. package/build/commands/xray/get-status-and-version.command.d.ts +0 -28
  30. package/build/commands/xray/get-status-and-version.command.d.ts.map +0 -1
  31. package/build/commands/xray/get-status-and-version.command.js +0 -15
@@ -9,5 +9,6 @@ export declare const STATS_ROUTES: {
9
9
  readonly GET_ALL_INBOUNDS_STATS: "get-all-inbounds-stats";
10
10
  readonly GET_COMBINED_STATS: "get-combined-stats";
11
11
  readonly GET_USER_IP_LIST: "get-user-ip-list";
12
+ readonly GET_USERS_IP_LIST: "get-users-ip-list";
12
13
  };
13
14
  //# 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,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;;;;;;CAcf,CAAC"}
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../api/controllers/stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;;;;;;;CAef,CAAC"}
@@ -12,4 +12,5 @@ exports.STATS_ROUTES = {
12
12
  GET_ALL_INBOUNDS_STATS: 'get-all-inbounds-stats',
13
13
  GET_COMBINED_STATS: 'get-combined-stats',
14
14
  GET_USER_IP_LIST: 'get-user-ip-list',
15
+ GET_USERS_IP_LIST: 'get-users-ip-list',
15
16
  };
@@ -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: {
@@ -16,6 +15,7 @@ export declare const REST_API: {
16
15
  readonly GET_ALL_INBOUNDS_STATS: "/node/stats/get-all-inbounds-stats";
17
16
  readonly GET_COMBINED_STATS: "/node/stats/get-combined-stats";
18
17
  readonly GET_USER_IP_LIST: "/node/stats/get-user-ip-list";
18
+ readonly GET_USERS_IP_LIST: "/node/stats/get-users-ip-list";
19
19
  };
20
20
  readonly HANDLER: {
21
21
  readonly ADD_USER: "/node/handler/add-user";
@@ -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: {
@@ -53,6 +52,7 @@ exports.REST_API = {
53
52
  GET_ALL_INBOUNDS_STATS: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_ALL_INBOUNDS_STATS}`,
54
53
  GET_COMBINED_STATS: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_COMBINED_STATS}`,
55
54
  GET_USER_IP_LIST: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_USER_IP_LIST}`,
55
+ GET_USERS_IP_LIST: `${exports.ROOT}/${CONTROLLERS.STATS_CONTROLLER}/${CONTROLLERS.STATS_ROUTES.GET_USERS_IP_LIST}`,
56
56
  },
57
57
  HANDLER: {
58
58
  ADD_USER: `${exports.ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.ADD_USER}`,
@@ -3,69 +3,159 @@ 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
+ hotHostInfo: z.ZodObject<{
58
+ memoryFree: z.ZodNumber;
59
+ uptime: z.ZodNumber;
60
+ }, "strip", z.ZodTypeAny, {
61
+ memoryFree: number;
62
+ uptime: number;
63
+ }, {
64
+ memoryFree: number;
65
+ uptime: number;
66
+ }>;
17
67
  }, "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;
68
+ xrayInfo: {
69
+ uptime: number;
70
+ numGoroutine: number;
71
+ numGC: number;
72
+ alloc: number;
73
+ totalAlloc: number;
74
+ sys: number;
75
+ mallocs: number;
76
+ frees: number;
77
+ liveObjects: number;
78
+ pauseTotalNs: number;
79
+ } | null;
80
+ plugins: {
81
+ torrentBlocker: {
82
+ reportsCount: number;
83
+ };
84
+ };
85
+ hotHostInfo: {
86
+ memoryFree: number;
87
+ uptime: number;
88
+ };
29
89
  }, {
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;
90
+ xrayInfo: {
91
+ uptime: number;
92
+ numGoroutine: number;
93
+ numGC: number;
94
+ alloc: number;
95
+ totalAlloc: number;
96
+ sys: number;
97
+ mallocs: number;
98
+ frees: number;
99
+ liveObjects: number;
100
+ pauseTotalNs: number;
101
+ } | null;
102
+ plugins: {
103
+ torrentBlocker: {
104
+ reportsCount: number;
105
+ };
106
+ };
107
+ hotHostInfo: {
108
+ memoryFree: number;
109
+ uptime: number;
110
+ };
41
111
  }>;
42
112
  }, "strip", z.ZodTypeAny, {
43
113
  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;
114
+ xrayInfo: {
115
+ uptime: number;
116
+ numGoroutine: number;
117
+ numGC: number;
118
+ alloc: number;
119
+ totalAlloc: number;
120
+ sys: number;
121
+ mallocs: number;
122
+ frees: number;
123
+ liveObjects: number;
124
+ pauseTotalNs: number;
125
+ } | null;
126
+ plugins: {
127
+ torrentBlocker: {
128
+ reportsCount: number;
129
+ };
130
+ };
131
+ hotHostInfo: {
132
+ memoryFree: number;
133
+ uptime: number;
134
+ };
55
135
  };
56
136
  }, {
57
137
  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;
138
+ xrayInfo: {
139
+ uptime: number;
140
+ numGoroutine: number;
141
+ numGC: number;
142
+ alloc: number;
143
+ totalAlloc: number;
144
+ sys: number;
145
+ mallocs: number;
146
+ frees: number;
147
+ liveObjects: number;
148
+ pauseTotalNs: number;
149
+ } | null;
150
+ plugins: {
151
+ torrentBlocker: {
152
+ reportsCount: number;
153
+ };
154
+ };
155
+ hotHostInfo: {
156
+ memoryFree: number;
157
+ uptime: number;
158
+ };
69
159
  };
70
160
  }>;
71
161
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -2,23 +2,33 @@
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
+ hotHostInfo: models_1.HotHostInfoSchema,
22
32
  }),
23
33
  });
24
34
  })(GetSystemStatsCommand || (exports.GetSystemStatsCommand = GetSystemStatsCommand = {}));
@@ -0,0 +1,71 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetUsersIpListCommand {
3
+ const url: "/node/stats/get-users-ip-list";
4
+ const ResponseSchema: z.ZodObject<{
5
+ response: z.ZodObject<{
6
+ users: z.ZodArray<z.ZodObject<{
7
+ userId: z.ZodString;
8
+ ips: z.ZodArray<z.ZodObject<{
9
+ ip: z.ZodString;
10
+ lastSeen: z.ZodEffects<z.ZodString, Date, string>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ ip: string;
13
+ lastSeen: Date;
14
+ }, {
15
+ ip: string;
16
+ lastSeen: string;
17
+ }>, "many">;
18
+ }, "strip", z.ZodTypeAny, {
19
+ userId: string;
20
+ ips: {
21
+ ip: string;
22
+ lastSeen: Date;
23
+ }[];
24
+ }, {
25
+ userId: string;
26
+ ips: {
27
+ ip: string;
28
+ lastSeen: string;
29
+ }[];
30
+ }>, "many">;
31
+ }, "strip", z.ZodTypeAny, {
32
+ users: {
33
+ userId: string;
34
+ ips: {
35
+ ip: string;
36
+ lastSeen: Date;
37
+ }[];
38
+ }[];
39
+ }, {
40
+ users: {
41
+ userId: string;
42
+ ips: {
43
+ ip: string;
44
+ lastSeen: string;
45
+ }[];
46
+ }[];
47
+ }>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ response: {
50
+ users: {
51
+ userId: string;
52
+ ips: {
53
+ ip: string;
54
+ lastSeen: Date;
55
+ }[];
56
+ }[];
57
+ };
58
+ }, {
59
+ response: {
60
+ users: {
61
+ userId: string;
62
+ ips: {
63
+ ip: string;
64
+ lastSeen: string;
65
+ }[];
66
+ }[];
67
+ };
68
+ }>;
69
+ type Response = z.infer<typeof ResponseSchema>;
70
+ }
71
+ //# sourceMappingURL=get-users-ip-list.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-users-ip-list.command.d.ts","sourceRoot":"","sources":["../../../commands/stats/get-users-ip-list.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,iCAAmC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetUsersIpListCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ var GetUsersIpListCommand;
7
+ (function (GetUsersIpListCommand) {
8
+ GetUsersIpListCommand.url = api_1.REST_API.STATS.GET_USERS_IP_LIST;
9
+ GetUsersIpListCommand.ResponseSchema = zod_1.z.object({
10
+ response: zod_1.z.object({
11
+ users: zod_1.z.array(zod_1.z.object({
12
+ userId: zod_1.z.string(),
13
+ ips: zod_1.z.array(zod_1.z.object({
14
+ ip: zod_1.z.string(),
15
+ lastSeen: zod_1.z
16
+ .string()
17
+ .datetime({
18
+ local: true,
19
+ offset: true,
20
+ })
21
+ .transform((str) => new Date(str)),
22
+ })),
23
+ })),
24
+ }),
25
+ });
26
+ })(GetUsersIpListCommand || (exports.GetUsersIpListCommand = GetUsersIpListCommand = {}));
@@ -6,5 +6,6 @@ export * from './get-outbound-stats.command';
6
6
  export * from './get-system-stats.command';
7
7
  export * from './get-user-ip-list.command';
8
8
  export * from './get-user-online-status.command';
9
+ export * from './get-users-ip-list.command';
9
10
  export * from './get-users-stats.command';
10
11
  //# 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,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,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,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
@@ -22,4 +22,5 @@ __exportStar(require("./get-outbound-stats.command"), exports);
22
22
  __exportStar(require("./get-system-stats.command"), exports);
23
23
  __exportStar(require("./get-user-ip-list.command"), exports);
24
24
  __exportStar(require("./get-user-online-status.command"), exports);
25
+ __exportStar(require("./get-users-ip-list.command"), exports);
25
26
  __exportStar(require("./get-users-stats.command"), exports);
@@ -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,49 +89,134 @@ 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>;
94
+ hostInfo: z.ZodObject<{
95
+ arch: z.ZodString;
96
+ cpus: z.ZodNumber;
97
+ cpuModel: z.ZodString;
98
+ memoryTotal: z.ZodNumber;
99
+ hostname: z.ZodString;
100
+ platform: z.ZodString;
101
+ release: z.ZodString;
102
+ type: z.ZodString;
103
+ version: z.ZodString;
104
+ networkInterfaces: z.ZodArray<z.ZodString, "many">;
105
+ }, "strip", z.ZodTypeAny, {
106
+ type: string;
107
+ arch: string;
108
+ cpus: number;
109
+ cpuModel: string;
110
+ memoryTotal: number;
111
+ hostname: string;
112
+ platform: string;
113
+ release: string;
114
+ version: string;
115
+ networkInterfaces: string[];
116
+ }, {
117
+ type: string;
118
+ arch: string;
119
+ cpus: number;
120
+ cpuModel: string;
121
+ memoryTotal: number;
122
+ hostname: string;
123
+ platform: string;
124
+ release: string;
125
+ version: string;
126
+ networkInterfaces: string[];
127
+ }>;
128
+ hotHostInfo: z.ZodObject<{
129
+ memoryFree: z.ZodNumber;
130
+ uptime: z.ZodNumber;
131
+ }, "strip", z.ZodTypeAny, {
132
+ memoryFree: number;
133
+ uptime: number;
134
+ }, {
135
+ memoryFree: number;
136
+ uptime: number;
137
+ }>;
107
138
  }, "strip", z.ZodTypeAny, {
108
139
  version: string | null;
140
+ hotHostInfo: {
141
+ memoryFree: number;
142
+ uptime: number;
143
+ };
144
+ hostInfo: {
145
+ type: string;
146
+ arch: string;
147
+ cpus: number;
148
+ cpuModel: string;
149
+ memoryTotal: number;
150
+ hostname: string;
151
+ platform: string;
152
+ release: string;
153
+ version: string;
154
+ networkInterfaces: string[];
155
+ };
109
156
  }, {
110
157
  version: string | null;
158
+ hotHostInfo: {
159
+ memoryFree: number;
160
+ uptime: number;
161
+ };
162
+ hostInfo: {
163
+ type: string;
164
+ arch: string;
165
+ cpus: number;
166
+ cpuModel: string;
167
+ memoryTotal: number;
168
+ hostname: string;
169
+ platform: string;
170
+ release: string;
171
+ version: string;
172
+ networkInterfaces: string[];
173
+ };
111
174
  }>;
112
175
  }, "strip", z.ZodTypeAny, {
113
176
  error: string | null;
114
177
  version: string | null;
115
178
  isStarted: boolean;
116
- systemInformation: {
117
- cpuCores: number;
118
- cpuModel: string;
119
- memoryTotal: string;
120
- } | null;
121
179
  nodeInformation: {
122
180
  version: string | null;
181
+ hotHostInfo: {
182
+ memoryFree: number;
183
+ uptime: number;
184
+ };
185
+ hostInfo: {
186
+ type: string;
187
+ arch: string;
188
+ cpus: number;
189
+ cpuModel: string;
190
+ memoryTotal: number;
191
+ hostname: string;
192
+ platform: string;
193
+ release: string;
194
+ version: string;
195
+ networkInterfaces: string[];
196
+ };
123
197
  };
124
198
  }, {
125
199
  error: string | null;
126
200
  version: string | null;
127
201
  isStarted: boolean;
128
- systemInformation: {
129
- cpuCores: number;
130
- cpuModel: string;
131
- memoryTotal: string;
132
- } | null;
133
202
  nodeInformation: {
134
203
  version: string | null;
204
+ hotHostInfo: {
205
+ memoryFree: number;
206
+ uptime: number;
207
+ };
208
+ hostInfo: {
209
+ type: string;
210
+ arch: string;
211
+ cpus: number;
212
+ cpuModel: string;
213
+ memoryTotal: number;
214
+ hostname: string;
215
+ platform: string;
216
+ release: string;
217
+ version: string;
218
+ networkInterfaces: string[];
219
+ };
135
220
  };
136
221
  }>;
137
222
  }, "strip", z.ZodTypeAny, {
@@ -139,13 +224,24 @@ export declare namespace StartXrayCommand {
139
224
  error: string | null;
140
225
  version: string | null;
141
226
  isStarted: boolean;
142
- systemInformation: {
143
- cpuCores: number;
144
- cpuModel: string;
145
- memoryTotal: string;
146
- } | null;
147
227
  nodeInformation: {
148
228
  version: string | null;
229
+ hotHostInfo: {
230
+ memoryFree: number;
231
+ uptime: number;
232
+ };
233
+ hostInfo: {
234
+ type: string;
235
+ arch: string;
236
+ cpus: number;
237
+ cpuModel: string;
238
+ memoryTotal: number;
239
+ hostname: string;
240
+ platform: string;
241
+ release: string;
242
+ version: string;
243
+ networkInterfaces: string[];
244
+ };
149
245
  };
150
246
  };
151
247
  }, {
@@ -153,13 +249,24 @@ export declare namespace StartXrayCommand {
153
249
  error: string | null;
154
250
  version: string | null;
155
251
  isStarted: boolean;
156
- systemInformation: {
157
- cpuCores: number;
158
- cpuModel: string;
159
- memoryTotal: string;
160
- } | null;
161
252
  nodeInformation: {
162
253
  version: string | null;
254
+ hotHostInfo: {
255
+ memoryFree: number;
256
+ uptime: number;
257
+ };
258
+ hostInfo: {
259
+ type: string;
260
+ arch: string;
261
+ cpus: number;
262
+ cpuModel: string;
263
+ memoryTotal: number;
264
+ hostname: string;
265
+ platform: string;
266
+ release: string;
267
+ version: string;
268
+ networkInterfaces: string[];
269
+ };
163
270
  };
164
271
  };
165
272
  }>;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWzB,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,29 +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(),
31
+ hostInfo: models_1.HostInfoSchema,
32
+ hotHostInfo: models_1.HotHostInfoSchema,
46
33
  }),
47
34
  }),
48
35
  });
@@ -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;
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ export declare const HostInfoSchema: 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 THostInfo = z.infer<typeof HostInfoSchema>;
37
+ export declare const HotHostInfoSchema: 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 THotHostInfo = z.infer<typeof HotHostInfoSchema>;
48
+ //# sourceMappingURL=host-info.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-info.schema.d.ts","sourceRoot":"","sources":["../../models/host-info.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWzB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HotHostInfoSchema = exports.HostInfoSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.HostInfoSchema = 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.HotHostInfoSchema = zod_1.z.object({
18
+ memoryFree: zod_1.z.number(),
19
+ uptime: zod_1.z.number(),
20
+ });
@@ -1,3 +1,4 @@
1
+ export * from './host-info.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,oBAAoB,CAAC;AACnC,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("./host-info.schema"), exports);
17
18
  __exportStar(require("./torrent-blocker.report.schema"), exports);
18
19
  __exportStar(require("./xray-webhook.schema"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/node-contract",
3
- "version": "2.6.9",
3
+ "version": "2.6.11",
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 = {}));