@remnawave/backend-contract 0.0.78 → 0.0.80

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 (37) hide show
  1. package/build/backend/api/controllers/nodes.d.ts +1 -0
  2. package/build/backend/api/controllers/nodes.d.ts.map +1 -1
  3. package/build/backend/api/controllers/nodes.js +1 -0
  4. package/build/backend/api/routes.d.ts +1 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +1 -0
  7. package/build/backend/commands/nodes/create.command.d.ts +5 -0
  8. package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
  9. package/build/backend/commands/nodes/disable.command.d.ts +5 -0
  10. package/build/backend/commands/nodes/disable.command.d.ts.map +1 -1
  11. package/build/backend/commands/nodes/enable.command.d.ts +5 -0
  12. package/build/backend/commands/nodes/enable.command.d.ts.map +1 -1
  13. package/build/backend/commands/nodes/get-all.command.d.ts +5 -0
  14. package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
  15. package/build/backend/commands/nodes/get-one.command.d.ts +5 -0
  16. package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
  17. package/build/backend/commands/nodes/index.d.ts +1 -0
  18. package/build/backend/commands/nodes/index.d.ts.map +1 -1
  19. package/build/backend/commands/nodes/index.js +1 -0
  20. package/build/backend/commands/nodes/reorder.command.d.ts +230 -0
  21. package/build/backend/commands/nodes/reorder.command.d.ts.map +1 -0
  22. package/build/backend/commands/nodes/reorder.command.js +20 -0
  23. package/build/backend/commands/nodes/update.command.d.ts +6 -0
  24. package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
  25. package/build/backend/constants/errors/errors.d.ts +5 -0
  26. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  27. package/build/backend/constants/errors/errors.js +5 -0
  28. package/build/backend/models/nodes.schema.d.ts +3 -0
  29. package/build/backend/models/nodes.schema.d.ts.map +1 -1
  30. package/build/backend/models/nodes.schema.js +1 -0
  31. package/build/frontend/api/controllers/nodes.js +1 -0
  32. package/build/frontend/api/routes.js +1 -0
  33. package/build/frontend/commands/nodes/index.js +1 -0
  34. package/build/frontend/commands/nodes/reorder.command.js +20 -0
  35. package/build/frontend/constants/errors/errors.js +5 -0
  36. package/build/frontend/models/nodes.schema.js +1 -0
  37. package/package.json +1 -1
@@ -12,5 +12,6 @@ export declare const NODES_ROUTES: {
12
12
  readonly STATS: {
13
13
  readonly USAGE_BY_RANGE: "usage/range";
14
14
  };
15
+ readonly REORDER: "reorder";
15
16
  };
16
17
  //# sourceMappingURL=nodes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../api/controllers/nodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAcf,CAAC"}
1
+ {"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../api/controllers/nodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;CAef,CAAC"}
@@ -15,4 +15,5 @@ exports.NODES_ROUTES = {
15
15
  STATS: {
16
16
  USAGE_BY_RANGE: 'usage/range',
17
17
  },
18
+ REORDER: 'reorder',
18
19
  };
@@ -25,6 +25,7 @@ export declare const REST_API: {
25
25
  readonly STATS: {
26
26
  readonly USAGE_BY_RANGE: "/api/nodes/usage/range";
27
27
  };
28
+ readonly REORDER: "/api/nodes/reorder";
28
29
  };
29
30
  readonly XRAY: {
30
31
  readonly GET_CONFIG: "/api/xray/get-config";
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAEhD,eAAO,MAAM,QAAQ;;;;;;gCAME,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;qCAgBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;kCAIhB,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;;;;;;;CAQnB,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAEhD,eAAO,MAAM,QAAQ;;;;;;gCAME,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;;qCAiBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;kCAIhB,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;;;;;;;CAQnB,CAAC"}
@@ -62,6 +62,7 @@ exports.REST_API = {
62
62
  STATS: {
63
63
  USAGE_BY_RANGE: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_BY_RANGE}`,
64
64
  },
65
+ REORDER: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.REORDER}`,
65
66
  },
66
67
  XRAY: {
67
68
  GET_CONFIG: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.GET_CONFIG}`,
@@ -51,6 +51,7 @@ export declare namespace CreateNodeCommand {
51
51
  trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
52
52
  notifyPercent: z.ZodNullable<z.ZodNumber>;
53
53
  usersOnline: z.ZodNullable<z.ZodNumber>;
54
+ viewPosition: z.ZodNumber;
54
55
  cpuCount: z.ZodNullable<z.ZodNumber>;
55
56
  cpuModel: z.ZodNullable<z.ZodString>;
56
57
  totalRam: z.ZodNullable<z.ZodString>;
@@ -73,6 +74,7 @@ export declare namespace CreateNodeCommand {
73
74
  uuid: string;
74
75
  createdAt: Date;
75
76
  updatedAt: Date;
77
+ viewPosition: number;
76
78
  address: string;
77
79
  port: number | null;
78
80
  isDisabled: boolean;
@@ -102,6 +104,7 @@ export declare namespace CreateNodeCommand {
102
104
  uuid: string;
103
105
  createdAt: string;
104
106
  updatedAt: string;
107
+ viewPosition: number;
105
108
  address: string;
106
109
  port: number | null;
107
110
  isDisabled: boolean;
@@ -133,6 +136,7 @@ export declare namespace CreateNodeCommand {
133
136
  uuid: string;
134
137
  createdAt: Date;
135
138
  updatedAt: Date;
139
+ viewPosition: number;
136
140
  address: string;
137
141
  port: number | null;
138
142
  isDisabled: boolean;
@@ -164,6 +168,7 @@ export declare namespace CreateNodeCommand {
164
168
  uuid: string;
165
169
  createdAt: string;
166
170
  updatedAt: string;
171
+ viewPosition: number;
167
172
  address: string;
168
173
  port: number | null;
169
174
  isDisabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -30,6 +30,7 @@ export declare namespace DisableNodeCommand {
30
30
  trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
31
31
  notifyPercent: z.ZodNullable<z.ZodNumber>;
32
32
  usersOnline: z.ZodNullable<z.ZodNumber>;
33
+ viewPosition: z.ZodNumber;
33
34
  cpuCount: z.ZodNullable<z.ZodNumber>;
34
35
  cpuModel: z.ZodNullable<z.ZodString>;
35
36
  totalRam: z.ZodNullable<z.ZodString>;
@@ -52,6 +53,7 @@ export declare namespace DisableNodeCommand {
52
53
  uuid: string;
53
54
  createdAt: Date;
54
55
  updatedAt: Date;
56
+ viewPosition: number;
55
57
  address: string;
56
58
  port: number | null;
57
59
  isDisabled: boolean;
@@ -81,6 +83,7 @@ export declare namespace DisableNodeCommand {
81
83
  uuid: string;
82
84
  createdAt: string;
83
85
  updatedAt: string;
86
+ viewPosition: number;
84
87
  address: string;
85
88
  port: number | null;
86
89
  isDisabled: boolean;
@@ -112,6 +115,7 @@ export declare namespace DisableNodeCommand {
112
115
  uuid: string;
113
116
  createdAt: Date;
114
117
  updatedAt: Date;
118
+ viewPosition: number;
115
119
  address: string;
116
120
  port: number | null;
117
121
  isDisabled: boolean;
@@ -143,6 +147,7 @@ export declare namespace DisableNodeCommand {
143
147
  uuid: string;
144
148
  createdAt: string;
145
149
  updatedAt: string;
150
+ viewPosition: number;
146
151
  address: string;
147
152
  port: number | null;
148
153
  isDisabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"disable.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/disable.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,0BAAyB,CAAC;IACnC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"disable.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/disable.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,0BAAyB,CAAC;IACnC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -30,6 +30,7 @@ export declare namespace EnableNodeCommand {
30
30
  trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
31
31
  notifyPercent: z.ZodNullable<z.ZodNumber>;
32
32
  usersOnline: z.ZodNullable<z.ZodNumber>;
33
+ viewPosition: z.ZodNumber;
33
34
  cpuCount: z.ZodNullable<z.ZodNumber>;
34
35
  cpuModel: z.ZodNullable<z.ZodString>;
35
36
  totalRam: z.ZodNullable<z.ZodString>;
@@ -52,6 +53,7 @@ export declare namespace EnableNodeCommand {
52
53
  uuid: string;
53
54
  createdAt: Date;
54
55
  updatedAt: Date;
56
+ viewPosition: number;
55
57
  address: string;
56
58
  port: number | null;
57
59
  isDisabled: boolean;
@@ -81,6 +83,7 @@ export declare namespace EnableNodeCommand {
81
83
  uuid: string;
82
84
  createdAt: string;
83
85
  updatedAt: string;
86
+ viewPosition: number;
84
87
  address: string;
85
88
  port: number | null;
86
89
  isDisabled: boolean;
@@ -112,6 +115,7 @@ export declare namespace EnableNodeCommand {
112
115
  uuid: string;
113
116
  createdAt: Date;
114
117
  updatedAt: Date;
118
+ viewPosition: number;
115
119
  address: string;
116
120
  port: number | null;
117
121
  isDisabled: boolean;
@@ -143,6 +147,7 @@ export declare namespace EnableNodeCommand {
143
147
  uuid: string;
144
148
  createdAt: string;
145
149
  updatedAt: string;
150
+ viewPosition: number;
146
151
  address: string;
147
152
  port: number | null;
148
153
  isDisabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"enable.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/enable.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,0BAAwB,CAAC;IAClC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"enable.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/enable.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,0BAAwB,CAAC;IAClC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -22,6 +22,7 @@ export declare namespace GetAllNodesCommand {
22
22
  trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
23
23
  notifyPercent: z.ZodNullable<z.ZodNumber>;
24
24
  usersOnline: z.ZodNullable<z.ZodNumber>;
25
+ viewPosition: z.ZodNumber;
25
26
  cpuCount: z.ZodNullable<z.ZodNumber>;
26
27
  cpuModel: z.ZodNullable<z.ZodString>;
27
28
  totalRam: z.ZodNullable<z.ZodString>;
@@ -44,6 +45,7 @@ export declare namespace GetAllNodesCommand {
44
45
  uuid: string;
45
46
  createdAt: Date;
46
47
  updatedAt: Date;
48
+ viewPosition: number;
47
49
  address: string;
48
50
  port: number | null;
49
51
  isDisabled: boolean;
@@ -73,6 +75,7 @@ export declare namespace GetAllNodesCommand {
73
75
  uuid: string;
74
76
  createdAt: string;
75
77
  updatedAt: string;
78
+ viewPosition: number;
76
79
  address: string;
77
80
  port: number | null;
78
81
  isDisabled: boolean;
@@ -104,6 +107,7 @@ export declare namespace GetAllNodesCommand {
104
107
  uuid: string;
105
108
  createdAt: Date;
106
109
  updatedAt: Date;
110
+ viewPosition: number;
107
111
  address: string;
108
112
  port: number | null;
109
113
  isDisabled: boolean;
@@ -135,6 +139,7 @@ export declare namespace GetAllNodesCommand {
135
139
  uuid: string;
136
140
  createdAt: string;
137
141
  updatedAt: string;
142
+ viewPosition: number;
138
143
  address: string;
139
144
  port: number | null;
140
145
  isDisabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"get-all.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/get-all.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-all.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/get-all.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -30,6 +30,7 @@ export declare namespace GetOneNodeCommand {
30
30
  trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
31
31
  notifyPercent: z.ZodNullable<z.ZodNumber>;
32
32
  usersOnline: z.ZodNullable<z.ZodNumber>;
33
+ viewPosition: z.ZodNumber;
33
34
  cpuCount: z.ZodNullable<z.ZodNumber>;
34
35
  cpuModel: z.ZodNullable<z.ZodString>;
35
36
  totalRam: z.ZodNullable<z.ZodString>;
@@ -52,6 +53,7 @@ export declare namespace GetOneNodeCommand {
52
53
  uuid: string;
53
54
  createdAt: Date;
54
55
  updatedAt: Date;
56
+ viewPosition: number;
55
57
  address: string;
56
58
  port: number | null;
57
59
  isDisabled: boolean;
@@ -81,6 +83,7 @@ export declare namespace GetOneNodeCommand {
81
83
  uuid: string;
82
84
  createdAt: string;
83
85
  updatedAt: string;
86
+ viewPosition: number;
84
87
  address: string;
85
88
  port: number | null;
86
89
  isDisabled: boolean;
@@ -112,6 +115,7 @@ export declare namespace GetOneNodeCommand {
112
115
  uuid: string;
113
116
  createdAt: Date;
114
117
  updatedAt: Date;
118
+ viewPosition: number;
115
119
  address: string;
116
120
  port: number | null;
117
121
  isDisabled: boolean;
@@ -143,6 +147,7 @@ export declare namespace GetOneNodeCommand {
143
147
  uuid: string;
144
148
  createdAt: string;
145
149
  updatedAt: string;
150
+ viewPosition: number;
146
151
  address: string;
147
152
  port: number | null;
148
153
  isDisabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"get-one.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/get-one.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,0BAAyB,CAAC;IACnC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-one.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/get-one.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,0BAAyB,CAAC;IACnC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -5,6 +5,7 @@ export * from './enable.command';
5
5
  export * from './get-all.command';
6
6
  export * from './get-nodes-usage-by-range.command';
7
7
  export * from './get-one.command';
8
+ export * from './reorder.command';
8
9
  export * from './restart-all.command';
9
10
  export * from './restart.command';
10
11
  export * from './update.command';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC;AACnD,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC;AACnD,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
@@ -21,6 +21,7 @@ __exportStar(require("./enable.command"), exports);
21
21
  __exportStar(require("./get-all.command"), exports);
22
22
  __exportStar(require("./get-nodes-usage-by-range.command"), exports);
23
23
  __exportStar(require("./get-one.command"), exports);
24
+ __exportStar(require("./reorder.command"), exports);
24
25
  __exportStar(require("./restart-all.command"), exports);
25
26
  __exportStar(require("./restart.command"), exports);
26
27
  __exportStar(require("./update.command"), exports);
@@ -0,0 +1,230 @@
1
+ import { z } from 'zod';
2
+ export declare namespace ReorderNodeCommand {
3
+ const url: "/api/nodes/reorder";
4
+ const TSQ_url: "/api/nodes/reorder";
5
+ const RequestSchema: z.ZodObject<{
6
+ nodes: z.ZodArray<z.ZodObject<Pick<{
7
+ uuid: z.ZodString;
8
+ name: z.ZodString;
9
+ address: z.ZodString;
10
+ port: z.ZodNullable<z.ZodNumber>;
11
+ isConnected: z.ZodBoolean;
12
+ isDisabled: z.ZodBoolean;
13
+ isConnecting: z.ZodBoolean;
14
+ isNodeOnline: z.ZodBoolean;
15
+ isXrayRunning: z.ZodBoolean;
16
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
17
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
18
+ xrayVersion: z.ZodNullable<z.ZodString>;
19
+ isTrafficTrackingActive: z.ZodBoolean;
20
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
21
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
22
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
23
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
24
+ usersOnline: z.ZodNullable<z.ZodNumber>;
25
+ viewPosition: z.ZodNumber;
26
+ cpuCount: z.ZodNullable<z.ZodNumber>;
27
+ cpuModel: z.ZodNullable<z.ZodString>;
28
+ totalRam: z.ZodNullable<z.ZodString>;
29
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
30
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
31
+ excludedInbounds: z.ZodArray<z.ZodObject<{
32
+ uuid: z.ZodString;
33
+ tag: z.ZodString;
34
+ type: z.ZodString;
35
+ }, "strip", z.ZodTypeAny, {
36
+ uuid: string;
37
+ type: string;
38
+ tag: string;
39
+ }, {
40
+ uuid: string;
41
+ type: string;
42
+ tag: string;
43
+ }>, "many">;
44
+ }, "uuid" | "viewPosition">, "strip", z.ZodTypeAny, {
45
+ uuid: string;
46
+ viewPosition: number;
47
+ }, {
48
+ uuid: string;
49
+ viewPosition: number;
50
+ }>, "many">;
51
+ }, "strip", z.ZodTypeAny, {
52
+ nodes: {
53
+ uuid: string;
54
+ viewPosition: number;
55
+ }[];
56
+ }, {
57
+ nodes: {
58
+ uuid: string;
59
+ viewPosition: number;
60
+ }[];
61
+ }>;
62
+ type Request = z.infer<typeof RequestSchema>;
63
+ const ResponseSchema: z.ZodObject<{
64
+ response: z.ZodArray<z.ZodObject<{
65
+ uuid: z.ZodString;
66
+ name: z.ZodString;
67
+ address: z.ZodString;
68
+ port: z.ZodNullable<z.ZodNumber>;
69
+ isConnected: z.ZodBoolean;
70
+ isDisabled: z.ZodBoolean;
71
+ isConnecting: z.ZodBoolean;
72
+ isNodeOnline: z.ZodBoolean;
73
+ isXrayRunning: z.ZodBoolean;
74
+ lastStatusChange: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
75
+ lastStatusMessage: z.ZodNullable<z.ZodString>;
76
+ xrayVersion: z.ZodNullable<z.ZodString>;
77
+ isTrafficTrackingActive: z.ZodBoolean;
78
+ trafficResetDay: z.ZodNullable<z.ZodNumber>;
79
+ trafficLimitBytes: z.ZodNullable<z.ZodNumber>;
80
+ trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
81
+ notifyPercent: z.ZodNullable<z.ZodNumber>;
82
+ usersOnline: z.ZodNullable<z.ZodNumber>;
83
+ viewPosition: z.ZodNumber;
84
+ cpuCount: z.ZodNullable<z.ZodNumber>;
85
+ cpuModel: z.ZodNullable<z.ZodString>;
86
+ totalRam: z.ZodNullable<z.ZodString>;
87
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
88
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
89
+ excludedInbounds: z.ZodArray<z.ZodObject<{
90
+ uuid: z.ZodString;
91
+ tag: z.ZodString;
92
+ type: z.ZodString;
93
+ }, "strip", z.ZodTypeAny, {
94
+ uuid: string;
95
+ type: string;
96
+ tag: string;
97
+ }, {
98
+ uuid: string;
99
+ type: string;
100
+ tag: string;
101
+ }>, "many">;
102
+ }, "strip", z.ZodTypeAny, {
103
+ uuid: string;
104
+ createdAt: Date;
105
+ updatedAt: Date;
106
+ viewPosition: number;
107
+ address: string;
108
+ port: number | null;
109
+ isDisabled: boolean;
110
+ name: string;
111
+ isConnected: boolean;
112
+ isConnecting: boolean;
113
+ isNodeOnline: boolean;
114
+ isXrayRunning: boolean;
115
+ lastStatusChange: Date | null;
116
+ lastStatusMessage: string | null;
117
+ xrayVersion: string | null;
118
+ isTrafficTrackingActive: boolean;
119
+ trafficResetDay: number | null;
120
+ trafficLimitBytes: number | null;
121
+ trafficUsedBytes: number | null;
122
+ notifyPercent: number | null;
123
+ usersOnline: number | null;
124
+ cpuCount: number | null;
125
+ cpuModel: string | null;
126
+ totalRam: string | null;
127
+ excludedInbounds: {
128
+ uuid: string;
129
+ type: string;
130
+ tag: string;
131
+ }[];
132
+ }, {
133
+ uuid: string;
134
+ createdAt: string;
135
+ updatedAt: string;
136
+ viewPosition: number;
137
+ address: string;
138
+ port: number | null;
139
+ isDisabled: boolean;
140
+ name: string;
141
+ isConnected: boolean;
142
+ isConnecting: boolean;
143
+ isNodeOnline: boolean;
144
+ isXrayRunning: boolean;
145
+ lastStatusChange: string | null;
146
+ lastStatusMessage: string | null;
147
+ xrayVersion: string | null;
148
+ isTrafficTrackingActive: boolean;
149
+ trafficResetDay: number | null;
150
+ trafficLimitBytes: number | null;
151
+ trafficUsedBytes: number | null;
152
+ notifyPercent: number | null;
153
+ usersOnline: number | null;
154
+ cpuCount: number | null;
155
+ cpuModel: string | null;
156
+ totalRam: string | null;
157
+ excludedInbounds: {
158
+ uuid: string;
159
+ type: string;
160
+ tag: string;
161
+ }[];
162
+ }>, "many">;
163
+ }, "strip", z.ZodTypeAny, {
164
+ response: {
165
+ uuid: string;
166
+ createdAt: Date;
167
+ updatedAt: Date;
168
+ viewPosition: number;
169
+ address: string;
170
+ port: number | null;
171
+ isDisabled: boolean;
172
+ name: string;
173
+ isConnected: boolean;
174
+ isConnecting: boolean;
175
+ isNodeOnline: boolean;
176
+ isXrayRunning: boolean;
177
+ lastStatusChange: Date | null;
178
+ lastStatusMessage: string | null;
179
+ xrayVersion: string | null;
180
+ isTrafficTrackingActive: boolean;
181
+ trafficResetDay: number | null;
182
+ trafficLimitBytes: number | null;
183
+ trafficUsedBytes: number | null;
184
+ notifyPercent: number | null;
185
+ usersOnline: number | null;
186
+ cpuCount: number | null;
187
+ cpuModel: string | null;
188
+ totalRam: string | null;
189
+ excludedInbounds: {
190
+ uuid: string;
191
+ type: string;
192
+ tag: string;
193
+ }[];
194
+ }[];
195
+ }, {
196
+ response: {
197
+ uuid: string;
198
+ createdAt: string;
199
+ updatedAt: string;
200
+ viewPosition: number;
201
+ address: string;
202
+ port: number | null;
203
+ isDisabled: boolean;
204
+ name: string;
205
+ isConnected: boolean;
206
+ isConnecting: boolean;
207
+ isNodeOnline: boolean;
208
+ isXrayRunning: boolean;
209
+ lastStatusChange: string | null;
210
+ lastStatusMessage: string | null;
211
+ xrayVersion: string | null;
212
+ isTrafficTrackingActive: boolean;
213
+ trafficResetDay: number | null;
214
+ trafficLimitBytes: number | null;
215
+ trafficUsedBytes: number | null;
216
+ notifyPercent: number | null;
217
+ usersOnline: number | null;
218
+ cpuCount: number | null;
219
+ cpuModel: string | null;
220
+ totalRam: string | null;
221
+ excludedInbounds: {
222
+ uuid: string;
223
+ type: string;
224
+ tag: string;
225
+ }[];
226
+ }[];
227
+ }>;
228
+ type Response = z.infer<typeof ResponseSchema>;
229
+ }
230
+ //# sourceMappingURL=reorder.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reorder.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/reorder.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReorderNodeCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ var ReorderNodeCommand;
8
+ (function (ReorderNodeCommand) {
9
+ ReorderNodeCommand.url = api_1.REST_API.NODES.REORDER;
10
+ ReorderNodeCommand.TSQ_url = ReorderNodeCommand.url;
11
+ ReorderNodeCommand.RequestSchema = zod_1.z.object({
12
+ nodes: zod_1.z.array(models_1.NodesSchema.pick({
13
+ viewPosition: true,
14
+ uuid: true,
15
+ })),
16
+ });
17
+ ReorderNodeCommand.ResponseSchema = zod_1.z.object({
18
+ response: zod_1.z.array(models_1.NodesSchema),
19
+ });
20
+ })(ReorderNodeCommand || (exports.ReorderNodeCommand = ReorderNodeCommand = {}));
@@ -21,6 +21,7 @@ export declare namespace UpdateNodeCommand {
21
21
  trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
22
22
  notifyPercent: z.ZodNullable<z.ZodNumber>;
23
23
  usersOnline: z.ZodNullable<z.ZodNumber>;
24
+ viewPosition: z.ZodNumber;
24
25
  cpuCount: z.ZodNullable<z.ZodNumber>;
25
26
  cpuModel: z.ZodNullable<z.ZodString>;
26
27
  totalRam: z.ZodNullable<z.ZodString>;
@@ -90,6 +91,7 @@ export declare namespace UpdateNodeCommand {
90
91
  trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
91
92
  notifyPercent: z.ZodNullable<z.ZodNumber>;
92
93
  usersOnline: z.ZodNullable<z.ZodNumber>;
94
+ viewPosition: z.ZodNumber;
93
95
  cpuCount: z.ZodNullable<z.ZodNumber>;
94
96
  cpuModel: z.ZodNullable<z.ZodString>;
95
97
  totalRam: z.ZodNullable<z.ZodString>;
@@ -112,6 +114,7 @@ export declare namespace UpdateNodeCommand {
112
114
  uuid: string;
113
115
  createdAt: Date;
114
116
  updatedAt: Date;
117
+ viewPosition: number;
115
118
  address: string;
116
119
  port: number | null;
117
120
  isDisabled: boolean;
@@ -141,6 +144,7 @@ export declare namespace UpdateNodeCommand {
141
144
  uuid: string;
142
145
  createdAt: string;
143
146
  updatedAt: string;
147
+ viewPosition: number;
144
148
  address: string;
145
149
  port: number | null;
146
150
  isDisabled: boolean;
@@ -172,6 +176,7 @@ export declare namespace UpdateNodeCommand {
172
176
  uuid: string;
173
177
  createdAt: Date;
174
178
  updatedAt: Date;
179
+ viewPosition: number;
175
180
  address: string;
176
181
  port: number | null;
177
182
  isDisabled: boolean;
@@ -203,6 +208,7 @@ export declare namespace UpdateNodeCommand {
203
208
  uuid: string;
204
209
  createdAt: string;
205
210
  updatedAt: string;
211
+ viewPosition: number;
206
212
  address: string;
207
213
  port: number | null;
208
214
  isDisabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/nodes/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -299,5 +299,10 @@ export declare const ERRORS: {
299
299
  readonly message: "Reset user traffic error";
300
300
  readonly httpCode: 500;
301
301
  };
302
+ readonly REORDER_NODES_ERROR: {
303
+ readonly code: "A057";
304
+ readonly message: "Reorder nodes error";
305
+ readonly httpCode: 500;
306
+ };
302
307
  };
303
308
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoH3B,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyH3B,CAAC"}
@@ -278,4 +278,9 @@ exports.ERRORS = {
278
278
  message: 'Reset user traffic error',
279
279
  httpCode: 500,
280
280
  },
281
+ REORDER_NODES_ERROR: {
282
+ code: 'A057',
283
+ message: 'Reorder nodes error',
284
+ httpCode: 500,
285
+ },
281
286
  };
@@ -18,6 +18,7 @@ export declare const NodesSchema: z.ZodObject<{
18
18
  trafficUsedBytes: z.ZodNullable<z.ZodNumber>;
19
19
  notifyPercent: z.ZodNullable<z.ZodNumber>;
20
20
  usersOnline: z.ZodNullable<z.ZodNumber>;
21
+ viewPosition: z.ZodNumber;
21
22
  cpuCount: z.ZodNullable<z.ZodNumber>;
22
23
  cpuModel: z.ZodNullable<z.ZodString>;
23
24
  totalRam: z.ZodNullable<z.ZodString>;
@@ -40,6 +41,7 @@ export declare const NodesSchema: z.ZodObject<{
40
41
  uuid: string;
41
42
  createdAt: Date;
42
43
  updatedAt: Date;
44
+ viewPosition: number;
43
45
  address: string;
44
46
  port: number | null;
45
47
  isDisabled: boolean;
@@ -69,6 +71,7 @@ export declare const NodesSchema: z.ZodObject<{
69
71
  uuid: string;
70
72
  createdAt: string;
71
73
  updatedAt: string;
74
+ viewPosition: number;
72
75
  address: string;
73
76
  port: number | null;
74
77
  isDisabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.schema.d.ts","sourceRoot":"","sources":["../../../models/nodes.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BtB,CAAC"}
1
+ {"version":3,"file":"nodes.schema.d.ts","sourceRoot":"","sources":["../../../models/nodes.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BtB,CAAC"}
@@ -22,6 +22,7 @@ exports.NodesSchema = zod_1.z.object({
22
22
  trafficUsedBytes: zod_1.z.nullable(zod_1.z.number()),
23
23
  notifyPercent: zod_1.z.nullable(zod_1.z.number().int()),
24
24
  usersOnline: zod_1.z.nullable(zod_1.z.number().int()),
25
+ viewPosition: zod_1.z.number().int(),
25
26
  cpuCount: zod_1.z.nullable(zod_1.z.number().int()),
26
27
  cpuModel: zod_1.z.nullable(zod_1.z.string()),
27
28
  totalRam: zod_1.z.nullable(zod_1.z.string()),
@@ -15,4 +15,5 @@ exports.NODES_ROUTES = {
15
15
  STATS: {
16
16
  USAGE_BY_RANGE: 'usage/range',
17
17
  },
18
+ REORDER: 'reorder',
18
19
  };
@@ -62,6 +62,7 @@ exports.REST_API = {
62
62
  STATS: {
63
63
  USAGE_BY_RANGE: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.STATS.USAGE_BY_RANGE}`,
64
64
  },
65
+ REORDER: `${exports.ROOT}/${CONTROLLERS.NODES_CONTROLLER}/${CONTROLLERS.NODES_ROUTES.REORDER}`,
65
66
  },
66
67
  XRAY: {
67
68
  GET_CONFIG: `${exports.ROOT}/${CONTROLLERS.XRAY_CONTROLLER}/${CONTROLLERS.XRAY_ROUTES.GET_CONFIG}`,
@@ -21,6 +21,7 @@ __exportStar(require("./enable.command"), exports);
21
21
  __exportStar(require("./get-all.command"), exports);
22
22
  __exportStar(require("./get-nodes-usage-by-range.command"), exports);
23
23
  __exportStar(require("./get-one.command"), exports);
24
+ __exportStar(require("./reorder.command"), exports);
24
25
  __exportStar(require("./restart-all.command"), exports);
25
26
  __exportStar(require("./restart.command"), exports);
26
27
  __exportStar(require("./update.command"), exports);
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReorderNodeCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ var ReorderNodeCommand;
8
+ (function (ReorderNodeCommand) {
9
+ ReorderNodeCommand.url = api_1.REST_API.NODES.REORDER;
10
+ ReorderNodeCommand.TSQ_url = ReorderNodeCommand.url;
11
+ ReorderNodeCommand.RequestSchema = zod_1.z.object({
12
+ nodes: zod_1.z.array(models_1.NodesSchema.pick({
13
+ viewPosition: true,
14
+ uuid: true,
15
+ })),
16
+ });
17
+ ReorderNodeCommand.ResponseSchema = zod_1.z.object({
18
+ response: zod_1.z.array(models_1.NodesSchema),
19
+ });
20
+ })(ReorderNodeCommand || (exports.ReorderNodeCommand = ReorderNodeCommand = {}));
@@ -278,4 +278,9 @@ exports.ERRORS = {
278
278
  message: 'Reset user traffic error',
279
279
  httpCode: 500,
280
280
  },
281
+ REORDER_NODES_ERROR: {
282
+ code: 'A057',
283
+ message: 'Reorder nodes error',
284
+ httpCode: 500,
285
+ },
281
286
  };
@@ -22,6 +22,7 @@ exports.NodesSchema = zod_1.z.object({
22
22
  trafficUsedBytes: zod_1.z.nullable(zod_1.z.number()),
23
23
  notifyPercent: zod_1.z.nullable(zod_1.z.number().int()),
24
24
  usersOnline: zod_1.z.nullable(zod_1.z.number().int()),
25
+ viewPosition: zod_1.z.number().int(),
25
26
  cpuCount: zod_1.z.nullable(zod_1.z.number().int()),
26
27
  cpuModel: zod_1.z.nullable(zod_1.z.string()),
27
28
  totalRam: zod_1.z.nullable(zod_1.z.string()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",