@remnawave/node-contract 0.6.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api/controllers/handler.d.ts +2 -0
- package/build/api/controllers/handler.d.ts.map +1 -1
- package/build/api/controllers/handler.js +2 -0
- package/build/api/routes.d.ts +2 -0
- package/build/api/routes.d.ts.map +1 -1
- package/build/api/routes.js +2 -0
- package/build/commands/handler/add-user.command.d.ts +0 -25
- package/build/commands/handler/add-user.command.d.ts.map +1 -1
- package/build/commands/handler/add-user.command.js +1 -12
- package/build/commands/handler/add-users.command.d.ts +166 -0
- package/build/commands/handler/add-users.command.d.ts.map +1 -0
- package/build/commands/handler/add-users.command.js +45 -0
- package/build/commands/handler/index.d.ts +2 -0
- package/build/commands/handler/index.d.ts.map +1 -1
- package/build/commands/handler/index.js +2 -0
- package/build/commands/handler/remove-users.command.d.ts +51 -0
- package/build/commands/handler/remove-users.command.d.ts.map +1 -0
- package/build/commands/handler/remove-users.command.js +21 -0
- package/build/commands/xray/start.command.d.ts.map +1 -1
- package/build/commands/xray/start.command.js +12 -1
- package/package.json +1 -1
|
@@ -2,6 +2,8 @@ export declare const HANDLER_CONTROLLER: "handler";
|
|
|
2
2
|
export declare const HANDLER_ROUTES: {
|
|
3
3
|
readonly REMOVE_USER: "remove-user";
|
|
4
4
|
readonly ADD_USER: "add-user";
|
|
5
|
+
readonly ADD_USERS: "add-users";
|
|
6
|
+
readonly REMOVE_USERS: "remove-users";
|
|
5
7
|
readonly GET_INBOUND_USERS_COUNT: "get-inbound-users-count";
|
|
6
8
|
readonly GET_INBOUND_USERS: "get-inbound-users";
|
|
7
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../api/controllers/handler.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,EAAG,SAAkB,CAAC;AAErD,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../api/controllers/handler.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,EAAG,SAAkB,CAAC;AAErD,eAAO,MAAM,cAAc;;;;;;;CAOjB,CAAC"}
|
|
@@ -5,6 +5,8 @@ exports.HANDLER_CONTROLLER = 'handler';
|
|
|
5
5
|
exports.HANDLER_ROUTES = {
|
|
6
6
|
REMOVE_USER: 'remove-user',
|
|
7
7
|
ADD_USER: 'add-user',
|
|
8
|
+
ADD_USERS: 'add-users',
|
|
9
|
+
REMOVE_USERS: 'remove-users',
|
|
8
10
|
GET_INBOUND_USERS_COUNT: 'get-inbound-users-count',
|
|
9
11
|
GET_INBOUND_USERS: 'get-inbound-users',
|
|
10
12
|
};
|
package/build/api/routes.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare const REST_API: {
|
|
|
21
21
|
readonly REMOVE_USER: "/node/handler/remove-user";
|
|
22
22
|
readonly GET_INBOUND_USERS_COUNT: "/node/handler/get-inbound-users-count";
|
|
23
23
|
readonly GET_INBOUND_USERS: "/node/handler/get-inbound-users";
|
|
24
|
+
readonly ADD_USERS: "/node/handler/add-users";
|
|
25
|
+
readonly REMOVE_USERS: "/node/handler/remove-users";
|
|
24
26
|
};
|
|
25
27
|
readonly VISION: {
|
|
26
28
|
readonly UNBLOCK_IP: "vision/unblock-ip";
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BX,CAAC"}
|
package/build/api/routes.js
CHANGED
|
@@ -58,6 +58,8 @@ exports.REST_API = {
|
|
|
58
58
|
REMOVE_USER: `${exports.ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.REMOVE_USER}`,
|
|
59
59
|
GET_INBOUND_USERS_COUNT: `${exports.ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.GET_INBOUND_USERS_COUNT}`,
|
|
60
60
|
GET_INBOUND_USERS: `${exports.ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.GET_INBOUND_USERS}`,
|
|
61
|
+
ADD_USERS: `${exports.ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.ADD_USERS}`,
|
|
62
|
+
REMOVE_USERS: `${exports.ROOT}/${CONTROLLERS.HANDLER_CONTROLLER}/${CONTROLLERS.HANDLER_ROUTES.REMOVE_USERS}`,
|
|
61
63
|
},
|
|
62
64
|
VISION: {
|
|
63
65
|
UNBLOCK_IP: `${CONTROLLERS.VISION_CONTROLLER}/${CONTROLLERS.VISION_ROUTES.UNBLOCK_IP}`,
|
|
@@ -65,21 +65,6 @@ export declare namespace AddUserCommand {
|
|
|
65
65
|
password: string;
|
|
66
66
|
cipherType: CipherType;
|
|
67
67
|
ivCheck: boolean;
|
|
68
|
-
}>, z.ZodObject<{
|
|
69
|
-
type: z.ZodLiteral<"shadowsocks2022">;
|
|
70
|
-
tag: z.ZodString;
|
|
71
|
-
username: z.ZodString;
|
|
72
|
-
key: z.ZodString;
|
|
73
|
-
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
type: "shadowsocks2022";
|
|
75
|
-
tag: string;
|
|
76
|
-
username: string;
|
|
77
|
-
key: string;
|
|
78
|
-
}, {
|
|
79
|
-
type: "shadowsocks2022";
|
|
80
|
-
tag: string;
|
|
81
|
-
username: string;
|
|
82
|
-
key: string;
|
|
83
68
|
}>]>, "many">;
|
|
84
69
|
hashData: z.ZodObject<{
|
|
85
70
|
vlessUuid: z.ZodString;
|
|
@@ -110,11 +95,6 @@ export declare namespace AddUserCommand {
|
|
|
110
95
|
password: string;
|
|
111
96
|
cipherType: CipherType;
|
|
112
97
|
ivCheck: boolean;
|
|
113
|
-
} | {
|
|
114
|
-
type: "shadowsocks2022";
|
|
115
|
-
tag: string;
|
|
116
|
-
username: string;
|
|
117
|
-
key: string;
|
|
118
98
|
})[];
|
|
119
99
|
hashData: {
|
|
120
100
|
vlessUuid: string;
|
|
@@ -139,11 +119,6 @@ export declare namespace AddUserCommand {
|
|
|
139
119
|
password: string;
|
|
140
120
|
cipherType: CipherType;
|
|
141
121
|
ivCheck: boolean;
|
|
142
|
-
} | {
|
|
143
|
-
type: "shadowsocks2022";
|
|
144
|
-
tag: string;
|
|
145
|
-
username: string;
|
|
146
|
-
key: string;
|
|
147
122
|
})[];
|
|
148
123
|
hashData: {
|
|
149
124
|
vlessUuid: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-user.command.d.ts","sourceRoot":"","sources":["../../../commands/handler/add-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,oBAAY,UAAU;IAClB,WAAW,IAAI;IACf,WAAW,IAAI;IACf,iBAAiB,IAAI;IACrB,IAAI,IAAI;IACR,OAAO,IAAI;IACX,YAAY,KAAK;IACjB,kBAAkB,IAAI;CACzB;AAED,yBAAiB,cAAc,CAAC;IACrB,MAAM,GAAG,0BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"add-user.command.d.ts","sourceRoot":"","sources":["../../../commands/handler/add-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,oBAAY,UAAU;IAClB,WAAW,IAAI;IACf,WAAW,IAAI;IACf,iBAAiB,IAAI;IACrB,IAAI,IAAI;IACR,OAAO,IAAI;IACX,YAAY,KAAK;IACjB,kBAAkB,IAAI;CACzB;AAED,yBAAiB,cAAc,CAAC;IACrB,MAAM,GAAG,0BAA4B,CAAC;IA0BtC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -37,19 +37,8 @@ var AddUserCommand;
|
|
|
37
37
|
cipherType: zod_1.z.nativeEnum(CipherType),
|
|
38
38
|
ivCheck: zod_1.z.boolean(),
|
|
39
39
|
});
|
|
40
|
-
const BaseShadowsocks2022User = zod_1.z.object({
|
|
41
|
-
type: zod_1.z.literal('shadowsocks2022'),
|
|
42
|
-
tag: zod_1.z.string(),
|
|
43
|
-
username: zod_1.z.string(),
|
|
44
|
-
key: zod_1.z.string(),
|
|
45
|
-
});
|
|
46
40
|
AddUserCommand.RequestSchema = zod_1.z.object({
|
|
47
|
-
data: zod_1.z.array(zod_1.z.discriminatedUnion('type', [
|
|
48
|
-
BaseTrojanUser,
|
|
49
|
-
BaseVlessUser,
|
|
50
|
-
BaseShadowsocksUser,
|
|
51
|
-
BaseShadowsocks2022User,
|
|
52
|
-
])),
|
|
41
|
+
data: zod_1.z.array(zod_1.z.discriminatedUnion('type', [BaseTrojanUser, BaseVlessUser, BaseShadowsocksUser])),
|
|
53
42
|
hashData: zod_1.z.object({
|
|
54
43
|
vlessUuid: zod_1.z.string().uuid(),
|
|
55
44
|
prevVlessUuid: zod_1.z.optional(zod_1.z.string().uuid()),
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace AddUsersCommand {
|
|
3
|
+
const url: "/node/handler/add-users";
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
affectedInboundTags: z.ZodArray<z.ZodString, "many">;
|
|
6
|
+
users: z.ZodArray<z.ZodObject<{
|
|
7
|
+
inboundData: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
8
|
+
type: z.ZodLiteral<"trojan">;
|
|
9
|
+
tag: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
type: "trojan";
|
|
12
|
+
tag: string;
|
|
13
|
+
}, {
|
|
14
|
+
type: "trojan";
|
|
15
|
+
tag: string;
|
|
16
|
+
}>, z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"vless">;
|
|
18
|
+
tag: z.ZodString;
|
|
19
|
+
flow: z.ZodEnum<["xtls-rprx-vision", ""]>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
type: "vless";
|
|
22
|
+
tag: string;
|
|
23
|
+
flow: "" | "xtls-rprx-vision";
|
|
24
|
+
}, {
|
|
25
|
+
type: "vless";
|
|
26
|
+
tag: string;
|
|
27
|
+
flow: "" | "xtls-rprx-vision";
|
|
28
|
+
}>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"shadowsocks">;
|
|
30
|
+
tag: z.ZodString;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
type: "shadowsocks";
|
|
33
|
+
tag: string;
|
|
34
|
+
}, {
|
|
35
|
+
type: "shadowsocks";
|
|
36
|
+
tag: string;
|
|
37
|
+
}>]>, "many">;
|
|
38
|
+
userData: z.ZodObject<{
|
|
39
|
+
userId: z.ZodString;
|
|
40
|
+
hashUuid: z.ZodString;
|
|
41
|
+
vlessUuid: z.ZodString;
|
|
42
|
+
trojanPassword: z.ZodString;
|
|
43
|
+
ssPassword: z.ZodString;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
vlessUuid: string;
|
|
46
|
+
userId: string;
|
|
47
|
+
hashUuid: string;
|
|
48
|
+
trojanPassword: string;
|
|
49
|
+
ssPassword: string;
|
|
50
|
+
}, {
|
|
51
|
+
vlessUuid: string;
|
|
52
|
+
userId: string;
|
|
53
|
+
hashUuid: string;
|
|
54
|
+
trojanPassword: string;
|
|
55
|
+
ssPassword: string;
|
|
56
|
+
}>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
inboundData: ({
|
|
59
|
+
type: "trojan";
|
|
60
|
+
tag: string;
|
|
61
|
+
} | {
|
|
62
|
+
type: "vless";
|
|
63
|
+
tag: string;
|
|
64
|
+
flow: "" | "xtls-rprx-vision";
|
|
65
|
+
} | {
|
|
66
|
+
type: "shadowsocks";
|
|
67
|
+
tag: string;
|
|
68
|
+
})[];
|
|
69
|
+
userData: {
|
|
70
|
+
vlessUuid: string;
|
|
71
|
+
userId: string;
|
|
72
|
+
hashUuid: string;
|
|
73
|
+
trojanPassword: string;
|
|
74
|
+
ssPassword: string;
|
|
75
|
+
};
|
|
76
|
+
}, {
|
|
77
|
+
inboundData: ({
|
|
78
|
+
type: "trojan";
|
|
79
|
+
tag: string;
|
|
80
|
+
} | {
|
|
81
|
+
type: "vless";
|
|
82
|
+
tag: string;
|
|
83
|
+
flow: "" | "xtls-rprx-vision";
|
|
84
|
+
} | {
|
|
85
|
+
type: "shadowsocks";
|
|
86
|
+
tag: string;
|
|
87
|
+
})[];
|
|
88
|
+
userData: {
|
|
89
|
+
vlessUuid: string;
|
|
90
|
+
userId: string;
|
|
91
|
+
hashUuid: string;
|
|
92
|
+
trojanPassword: string;
|
|
93
|
+
ssPassword: string;
|
|
94
|
+
};
|
|
95
|
+
}>, "many">;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
affectedInboundTags: string[];
|
|
98
|
+
users: {
|
|
99
|
+
inboundData: ({
|
|
100
|
+
type: "trojan";
|
|
101
|
+
tag: string;
|
|
102
|
+
} | {
|
|
103
|
+
type: "vless";
|
|
104
|
+
tag: string;
|
|
105
|
+
flow: "" | "xtls-rprx-vision";
|
|
106
|
+
} | {
|
|
107
|
+
type: "shadowsocks";
|
|
108
|
+
tag: string;
|
|
109
|
+
})[];
|
|
110
|
+
userData: {
|
|
111
|
+
vlessUuid: string;
|
|
112
|
+
userId: string;
|
|
113
|
+
hashUuid: string;
|
|
114
|
+
trojanPassword: string;
|
|
115
|
+
ssPassword: string;
|
|
116
|
+
};
|
|
117
|
+
}[];
|
|
118
|
+
}, {
|
|
119
|
+
affectedInboundTags: string[];
|
|
120
|
+
users: {
|
|
121
|
+
inboundData: ({
|
|
122
|
+
type: "trojan";
|
|
123
|
+
tag: string;
|
|
124
|
+
} | {
|
|
125
|
+
type: "vless";
|
|
126
|
+
tag: string;
|
|
127
|
+
flow: "" | "xtls-rprx-vision";
|
|
128
|
+
} | {
|
|
129
|
+
type: "shadowsocks";
|
|
130
|
+
tag: string;
|
|
131
|
+
})[];
|
|
132
|
+
userData: {
|
|
133
|
+
vlessUuid: string;
|
|
134
|
+
userId: string;
|
|
135
|
+
hashUuid: string;
|
|
136
|
+
trojanPassword: string;
|
|
137
|
+
ssPassword: string;
|
|
138
|
+
};
|
|
139
|
+
}[];
|
|
140
|
+
}>;
|
|
141
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
142
|
+
const ResponseSchema: z.ZodObject<{
|
|
143
|
+
response: z.ZodObject<{
|
|
144
|
+
success: z.ZodBoolean;
|
|
145
|
+
error: z.ZodNullable<z.ZodString>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
success: boolean;
|
|
148
|
+
error: string | null;
|
|
149
|
+
}, {
|
|
150
|
+
success: boolean;
|
|
151
|
+
error: string | null;
|
|
152
|
+
}>;
|
|
153
|
+
}, "strip", z.ZodTypeAny, {
|
|
154
|
+
response: {
|
|
155
|
+
success: boolean;
|
|
156
|
+
error: string | null;
|
|
157
|
+
};
|
|
158
|
+
}, {
|
|
159
|
+
response: {
|
|
160
|
+
success: boolean;
|
|
161
|
+
error: string | null;
|
|
162
|
+
};
|
|
163
|
+
}>;
|
|
164
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=add-users.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-users.command.d.ts","sourceRoot":"","sources":["../../../commands/handler/add-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,2BAA6B,CAAC;IAkBvC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqBxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddUsersCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
var AddUsersCommand;
|
|
7
|
+
(function (AddUsersCommand) {
|
|
8
|
+
AddUsersCommand.url = api_1.REST_API.HANDLER.ADD_USERS;
|
|
9
|
+
const BaseTrojanUser = zod_1.z.object({
|
|
10
|
+
type: zod_1.z.literal('trojan'),
|
|
11
|
+
tag: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
const BaseVlessUser = zod_1.z.object({
|
|
14
|
+
type: zod_1.z.literal('vless'),
|
|
15
|
+
tag: zod_1.z.string(),
|
|
16
|
+
flow: zod_1.z.enum(['xtls-rprx-vision', '']),
|
|
17
|
+
});
|
|
18
|
+
const BaseShadowsocksUser = zod_1.z.object({
|
|
19
|
+
type: zod_1.z.literal('shadowsocks'),
|
|
20
|
+
tag: zod_1.z.string(),
|
|
21
|
+
});
|
|
22
|
+
AddUsersCommand.RequestSchema = zod_1.z.object({
|
|
23
|
+
affectedInboundTags: zod_1.z.array(zod_1.z.string()),
|
|
24
|
+
users: zod_1.z.array(zod_1.z.object({
|
|
25
|
+
inboundData: zod_1.z.array(zod_1.z.discriminatedUnion('type', [
|
|
26
|
+
BaseTrojanUser,
|
|
27
|
+
BaseVlessUser,
|
|
28
|
+
BaseShadowsocksUser,
|
|
29
|
+
])),
|
|
30
|
+
userData: zod_1.z.object({
|
|
31
|
+
userId: zod_1.z.string(),
|
|
32
|
+
hashUuid: zod_1.z.string().uuid(),
|
|
33
|
+
vlessUuid: zod_1.z.string().uuid(),
|
|
34
|
+
trojanPassword: zod_1.z.string(),
|
|
35
|
+
ssPassword: zod_1.z.string(),
|
|
36
|
+
}),
|
|
37
|
+
})),
|
|
38
|
+
});
|
|
39
|
+
AddUsersCommand.ResponseSchema = zod_1.z.object({
|
|
40
|
+
response: zod_1.z.object({
|
|
41
|
+
success: zod_1.z.boolean(),
|
|
42
|
+
error: zod_1.z.string().nullable(),
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
})(AddUsersCommand || (exports.AddUsersCommand = AddUsersCommand = {}));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './add-user.command';
|
|
2
|
+
export * from './add-users.command';
|
|
2
3
|
export * from './get-inbound-users-count.command';
|
|
3
4
|
export * from './get-inbound-users.command';
|
|
4
5
|
export * from './remove-user.command';
|
|
6
|
+
export * from './remove-users.command';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/handler/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/handler/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
|
|
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./add-user.command"), exports);
|
|
18
|
+
__exportStar(require("./add-users.command"), exports);
|
|
18
19
|
__exportStar(require("./get-inbound-users-count.command"), exports);
|
|
19
20
|
__exportStar(require("./get-inbound-users.command"), exports);
|
|
20
21
|
__exportStar(require("./remove-user.command"), exports);
|
|
22
|
+
__exportStar(require("./remove-users.command"), exports);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace RemoveUsersCommand {
|
|
3
|
+
const url: "/node/handler/remove-users";
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
users: z.ZodArray<z.ZodObject<{
|
|
6
|
+
userId: z.ZodString;
|
|
7
|
+
hashUuid: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
userId: string;
|
|
10
|
+
hashUuid: string;
|
|
11
|
+
}, {
|
|
12
|
+
userId: string;
|
|
13
|
+
hashUuid: string;
|
|
14
|
+
}>, "many">;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
users: {
|
|
17
|
+
userId: string;
|
|
18
|
+
hashUuid: string;
|
|
19
|
+
}[];
|
|
20
|
+
}, {
|
|
21
|
+
users: {
|
|
22
|
+
userId: string;
|
|
23
|
+
hashUuid: string;
|
|
24
|
+
}[];
|
|
25
|
+
}>;
|
|
26
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
27
|
+
const ResponseSchema: z.ZodObject<{
|
|
28
|
+
response: z.ZodObject<{
|
|
29
|
+
success: z.ZodBoolean;
|
|
30
|
+
error: z.ZodNullable<z.ZodString>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
success: boolean;
|
|
33
|
+
error: string | null;
|
|
34
|
+
}, {
|
|
35
|
+
success: boolean;
|
|
36
|
+
error: string | null;
|
|
37
|
+
}>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
response: {
|
|
40
|
+
success: boolean;
|
|
41
|
+
error: string | null;
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
response: {
|
|
45
|
+
success: boolean;
|
|
46
|
+
error: string | null;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=remove-users.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-users.command.d.ts","sourceRoot":"","sources":["../../../commands/handler/remove-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,8BAAgC,CAAC;IAE1C,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;MAOxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RemoveUsersCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
var RemoveUsersCommand;
|
|
7
|
+
(function (RemoveUsersCommand) {
|
|
8
|
+
RemoveUsersCommand.url = api_1.REST_API.HANDLER.REMOVE_USERS;
|
|
9
|
+
RemoveUsersCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
users: zod_1.z.array(zod_1.z.object({
|
|
11
|
+
userId: zod_1.z.string(),
|
|
12
|
+
hashUuid: zod_1.z.string().uuid(),
|
|
13
|
+
})),
|
|
14
|
+
});
|
|
15
|
+
RemoveUsersCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
success: zod_1.z.boolean(),
|
|
18
|
+
error: zod_1.z.string().nullable(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
})(RemoveUsersCommand || (exports.RemoveUsersCommand = RemoveUsersCommand = {}));
|
|
@@ -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;
|
|
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"}
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StartXrayCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
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
|
+
};
|
|
6
9
|
var StartXrayCommand;
|
|
7
10
|
(function (StartXrayCommand) {
|
|
8
11
|
StartXrayCommand.url = api_1.REST_API.XRAY.START;
|
|
@@ -17,8 +20,16 @@ var StartXrayCommand;
|
|
|
17
20
|
tag: zod_1.z.string(),
|
|
18
21
|
})),
|
|
19
22
|
}),
|
|
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
|
+
}),
|
|
20
32
|
}),
|
|
21
|
-
xrayConfig: zod_1.z.record(zod_1.z.unknown()),
|
|
22
33
|
});
|
|
23
34
|
StartXrayCommand.ResponseSchema = zod_1.z.object({
|
|
24
35
|
response: zod_1.z.object({
|