@remnawave/backend-contract 2.9.1 → 2.9.2
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/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts +0 -218
- package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/delete-many-hosts.command.js +0 -4
- package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +0 -218
- package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/disable-many-hosts.command.js +0 -4
- package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +0 -218
- package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/enable-many-hosts.command.js +0 -4
- package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts +0 -218
- package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/bulk/update-many-hosts.command.js +0 -4
- package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/create.command.js +5 -22
- package/build/backend/commands/hosts/get-host.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/get-host.command.js +2 -4
- package/build/backend/commands/hosts/host.response.d.ts +219 -0
- package/build/backend/commands/hosts/host.response.d.ts.map +1 -0
- package/build/backend/commands/hosts/host.response.js +8 -0
- package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
- package/build/backend/commands/hosts/update.command.js +5 -22
- package/build/frontend/commands/hosts/bulk/delete-many-hosts.command.js +0 -4
- package/build/frontend/commands/hosts/bulk/disable-many-hosts.command.js +0 -4
- package/build/frontend/commands/hosts/bulk/enable-many-hosts.command.js +0 -4
- package/build/frontend/commands/hosts/bulk/update-many-hosts.command.js +0 -4
- package/build/frontend/commands/hosts/create.command.js +5 -22
- package/build/frontend/commands/hosts/get-host.command.js +2 -4
- package/build/frontend/commands/hosts/host.response.js +8 -0
- package/build/frontend/commands/hosts/update.command.js +5 -22
- package/package.json +1 -1
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HostResponseSchema: z.ZodObject<{
|
|
3
|
+
response: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
viewPosition: z.ZodNumber;
|
|
6
|
+
remark: z.ZodString;
|
|
7
|
+
address: z.ZodString;
|
|
8
|
+
port: z.ZodNumber;
|
|
9
|
+
path: z.ZodNullable<z.ZodString>;
|
|
10
|
+
sni: z.ZodNullable<z.ZodString>;
|
|
11
|
+
host: z.ZodNullable<z.ZodString>;
|
|
12
|
+
alpn: z.ZodNullable<z.ZodNativeEnum<{
|
|
13
|
+
readonly H3: "h3";
|
|
14
|
+
readonly H2: "h2";
|
|
15
|
+
readonly HTTP_1_1: "http/1.1";
|
|
16
|
+
readonly H_COMBINED: "h2,http/1.1";
|
|
17
|
+
readonly H3_H2_H1_COMBINED: "h3,h2,http/1.1";
|
|
18
|
+
readonly H3_H2_COMBINED: "h3,h2";
|
|
19
|
+
}>>;
|
|
20
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
21
|
+
isDisabled: z.ZodBoolean;
|
|
22
|
+
securityLayer: z.ZodDefault<z.ZodNativeEnum<{
|
|
23
|
+
readonly DEFAULT: "DEFAULT";
|
|
24
|
+
readonly TLS: "TLS";
|
|
25
|
+
readonly NONE: "NONE";
|
|
26
|
+
}>>;
|
|
27
|
+
xhttpExtraParams: z.ZodNullable<z.ZodUnknown>;
|
|
28
|
+
muxParams: z.ZodNullable<z.ZodUnknown>;
|
|
29
|
+
sockoptParams: z.ZodNullable<z.ZodUnknown>;
|
|
30
|
+
finalMask: z.ZodNullable<z.ZodUnknown>;
|
|
31
|
+
inbound: z.ZodObject<{
|
|
32
|
+
configProfileUuid: z.ZodNullable<z.ZodString>;
|
|
33
|
+
configProfileInboundUuid: z.ZodNullable<z.ZodString>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
configProfileUuid: string | null;
|
|
36
|
+
configProfileInboundUuid: string | null;
|
|
37
|
+
}, {
|
|
38
|
+
configProfileUuid: string | null;
|
|
39
|
+
configProfileInboundUuid: string | null;
|
|
40
|
+
}>;
|
|
41
|
+
serverDescription: z.ZodNullable<z.ZodString>;
|
|
42
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
43
|
+
isHidden: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
overrideSniFromAddress: z.ZodDefault<z.ZodBoolean>;
|
|
45
|
+
keepSniBlank: z.ZodDefault<z.ZodBoolean>;
|
|
46
|
+
vlessRouteId: z.ZodNullable<z.ZodNumber>;
|
|
47
|
+
pinnedPeerCertSha256: z.ZodNullable<z.ZodString>;
|
|
48
|
+
verifyPeerCertByName: z.ZodNullable<z.ZodString>;
|
|
49
|
+
shuffleHost: z.ZodBoolean;
|
|
50
|
+
mihomoX25519: z.ZodBoolean;
|
|
51
|
+
mihomoIpVersion: z.ZodNullable<z.ZodNativeEnum<{
|
|
52
|
+
readonly DUAL: "dual";
|
|
53
|
+
readonly IPV4: "ipv4";
|
|
54
|
+
readonly IPV6: "ipv6";
|
|
55
|
+
readonly IPV4_PREFER: "ipv4-prefer";
|
|
56
|
+
readonly IPV6_PREFER: "ipv6-prefer";
|
|
57
|
+
}>>;
|
|
58
|
+
nodes: z.ZodArray<z.ZodString, "many">;
|
|
59
|
+
xrayJsonTemplateUuid: z.ZodNullable<z.ZodString>;
|
|
60
|
+
excludedInternalSquads: z.ZodArray<z.ZodString, "many">;
|
|
61
|
+
excludeFromSubscriptionTypes: z.ZodArray<z.ZodNativeEnum<{
|
|
62
|
+
readonly XRAY_JSON: "XRAY_JSON";
|
|
63
|
+
readonly XRAY_BASE64: "XRAY_BASE64";
|
|
64
|
+
readonly MIHOMO: "MIHOMO";
|
|
65
|
+
readonly STASH: "STASH";
|
|
66
|
+
readonly CLASH: "CLASH";
|
|
67
|
+
readonly SINGBOX: "SINGBOX";
|
|
68
|
+
}>, "many">;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
nodes: string[];
|
|
71
|
+
tags: string[];
|
|
72
|
+
uuid: string;
|
|
73
|
+
path: string | null;
|
|
74
|
+
port: number;
|
|
75
|
+
viewPosition: number;
|
|
76
|
+
remark: string;
|
|
77
|
+
address: string;
|
|
78
|
+
sni: string | null;
|
|
79
|
+
host: string | null;
|
|
80
|
+
alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
|
|
81
|
+
fingerprint: string | null;
|
|
82
|
+
isDisabled: boolean;
|
|
83
|
+
securityLayer: "DEFAULT" | "TLS" | "NONE";
|
|
84
|
+
inbound: {
|
|
85
|
+
configProfileUuid: string | null;
|
|
86
|
+
configProfileInboundUuid: string | null;
|
|
87
|
+
};
|
|
88
|
+
serverDescription: string | null;
|
|
89
|
+
isHidden: boolean;
|
|
90
|
+
overrideSniFromAddress: boolean;
|
|
91
|
+
keepSniBlank: boolean;
|
|
92
|
+
vlessRouteId: number | null;
|
|
93
|
+
pinnedPeerCertSha256: string | null;
|
|
94
|
+
verifyPeerCertByName: string | null;
|
|
95
|
+
shuffleHost: boolean;
|
|
96
|
+
mihomoX25519: boolean;
|
|
97
|
+
mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
|
|
98
|
+
xrayJsonTemplateUuid: string | null;
|
|
99
|
+
excludedInternalSquads: string[];
|
|
100
|
+
excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
|
|
101
|
+
xhttpExtraParams?: unknown;
|
|
102
|
+
muxParams?: unknown;
|
|
103
|
+
sockoptParams?: unknown;
|
|
104
|
+
finalMask?: unknown;
|
|
105
|
+
}, {
|
|
106
|
+
nodes: string[];
|
|
107
|
+
uuid: string;
|
|
108
|
+
path: string | null;
|
|
109
|
+
port: number;
|
|
110
|
+
viewPosition: number;
|
|
111
|
+
remark: string;
|
|
112
|
+
address: string;
|
|
113
|
+
sni: string | null;
|
|
114
|
+
host: string | null;
|
|
115
|
+
alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
|
|
116
|
+
fingerprint: string | null;
|
|
117
|
+
isDisabled: boolean;
|
|
118
|
+
inbound: {
|
|
119
|
+
configProfileUuid: string | null;
|
|
120
|
+
configProfileInboundUuid: string | null;
|
|
121
|
+
};
|
|
122
|
+
serverDescription: string | null;
|
|
123
|
+
vlessRouteId: number | null;
|
|
124
|
+
pinnedPeerCertSha256: string | null;
|
|
125
|
+
verifyPeerCertByName: string | null;
|
|
126
|
+
shuffleHost: boolean;
|
|
127
|
+
mihomoX25519: boolean;
|
|
128
|
+
mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
|
|
129
|
+
xrayJsonTemplateUuid: string | null;
|
|
130
|
+
excludedInternalSquads: string[];
|
|
131
|
+
excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
|
|
132
|
+
tags?: string[] | undefined;
|
|
133
|
+
securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
|
|
134
|
+
xhttpExtraParams?: unknown;
|
|
135
|
+
muxParams?: unknown;
|
|
136
|
+
sockoptParams?: unknown;
|
|
137
|
+
finalMask?: unknown;
|
|
138
|
+
isHidden?: boolean | undefined;
|
|
139
|
+
overrideSniFromAddress?: boolean | undefined;
|
|
140
|
+
keepSniBlank?: boolean | undefined;
|
|
141
|
+
}>;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
response: {
|
|
144
|
+
nodes: string[];
|
|
145
|
+
tags: string[];
|
|
146
|
+
uuid: string;
|
|
147
|
+
path: string | null;
|
|
148
|
+
port: number;
|
|
149
|
+
viewPosition: number;
|
|
150
|
+
remark: string;
|
|
151
|
+
address: string;
|
|
152
|
+
sni: string | null;
|
|
153
|
+
host: string | null;
|
|
154
|
+
alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
|
|
155
|
+
fingerprint: string | null;
|
|
156
|
+
isDisabled: boolean;
|
|
157
|
+
securityLayer: "DEFAULT" | "TLS" | "NONE";
|
|
158
|
+
inbound: {
|
|
159
|
+
configProfileUuid: string | null;
|
|
160
|
+
configProfileInboundUuid: string | null;
|
|
161
|
+
};
|
|
162
|
+
serverDescription: string | null;
|
|
163
|
+
isHidden: boolean;
|
|
164
|
+
overrideSniFromAddress: boolean;
|
|
165
|
+
keepSniBlank: boolean;
|
|
166
|
+
vlessRouteId: number | null;
|
|
167
|
+
pinnedPeerCertSha256: string | null;
|
|
168
|
+
verifyPeerCertByName: string | null;
|
|
169
|
+
shuffleHost: boolean;
|
|
170
|
+
mihomoX25519: boolean;
|
|
171
|
+
mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
|
|
172
|
+
xrayJsonTemplateUuid: string | null;
|
|
173
|
+
excludedInternalSquads: string[];
|
|
174
|
+
excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
|
|
175
|
+
xhttpExtraParams?: unknown;
|
|
176
|
+
muxParams?: unknown;
|
|
177
|
+
sockoptParams?: unknown;
|
|
178
|
+
finalMask?: unknown;
|
|
179
|
+
};
|
|
180
|
+
}, {
|
|
181
|
+
response: {
|
|
182
|
+
nodes: string[];
|
|
183
|
+
uuid: string;
|
|
184
|
+
path: string | null;
|
|
185
|
+
port: number;
|
|
186
|
+
viewPosition: number;
|
|
187
|
+
remark: string;
|
|
188
|
+
address: string;
|
|
189
|
+
sni: string | null;
|
|
190
|
+
host: string | null;
|
|
191
|
+
alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
|
|
192
|
+
fingerprint: string | null;
|
|
193
|
+
isDisabled: boolean;
|
|
194
|
+
inbound: {
|
|
195
|
+
configProfileUuid: string | null;
|
|
196
|
+
configProfileInboundUuid: string | null;
|
|
197
|
+
};
|
|
198
|
+
serverDescription: string | null;
|
|
199
|
+
vlessRouteId: number | null;
|
|
200
|
+
pinnedPeerCertSha256: string | null;
|
|
201
|
+
verifyPeerCertByName: string | null;
|
|
202
|
+
shuffleHost: boolean;
|
|
203
|
+
mihomoX25519: boolean;
|
|
204
|
+
mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
|
|
205
|
+
xrayJsonTemplateUuid: string | null;
|
|
206
|
+
excludedInternalSquads: string[];
|
|
207
|
+
excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
|
|
208
|
+
tags?: string[] | undefined;
|
|
209
|
+
securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
|
|
210
|
+
xhttpExtraParams?: unknown;
|
|
211
|
+
muxParams?: unknown;
|
|
212
|
+
sockoptParams?: unknown;
|
|
213
|
+
finalMask?: unknown;
|
|
214
|
+
isHidden?: boolean | undefined;
|
|
215
|
+
overrideSniFromAddress?: boolean | undefined;
|
|
216
|
+
keepSniBlank?: boolean | undefined;
|
|
217
|
+
};
|
|
218
|
+
}>;
|
|
219
|
+
//# sourceMappingURL=host.response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.response.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/host.response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE7B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HostResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const hosts_schema_1 = require("../../models/hosts.schema");
|
|
6
|
+
exports.HostResponseSchema = zod_1.z.object({
|
|
7
|
+
response: hosts_schema_1.HostsSchema,
|
|
8
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2D5B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const api_1 = require("../../api");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
7
|
const models_1 = require("../../models");
|
|
8
|
+
const host_response_1 = require("./host.response");
|
|
8
9
|
var UpdateHostCommand;
|
|
9
10
|
(function (UpdateHostCommand) {
|
|
10
11
|
UpdateHostCommand.url = api_1.REST_API.HOSTS.UPDATE;
|
|
@@ -19,25 +20,9 @@ var UpdateHostCommand;
|
|
|
19
20
|
configProfileInboundUuid: zod_1.z.string().uuid(),
|
|
20
21
|
})
|
|
21
22
|
.optional(),
|
|
22
|
-
remark: zod_1.z
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
.max(40, {
|
|
27
|
-
message: 'Remark must be less than 40 characters',
|
|
28
|
-
})
|
|
29
|
-
.optional(),
|
|
30
|
-
address: zod_1.z
|
|
31
|
-
.string({
|
|
32
|
-
invalid_type_error: 'Address must be a string',
|
|
33
|
-
})
|
|
34
|
-
.optional(),
|
|
35
|
-
port: zod_1.z
|
|
36
|
-
.number({
|
|
37
|
-
invalid_type_error: 'Port must be an integer',
|
|
38
|
-
})
|
|
39
|
-
.int()
|
|
40
|
-
.optional(),
|
|
23
|
+
remark: zod_1.z.string().min(1).max(100).optional(),
|
|
24
|
+
address: zod_1.z.string().optional(),
|
|
25
|
+
port: zod_1.z.number().int().optional(),
|
|
41
26
|
path: zod_1.z.string().nullish(),
|
|
42
27
|
sni: zod_1.z.string().nullish(),
|
|
43
28
|
host: zod_1.z.string().nullish(),
|
|
@@ -79,7 +64,5 @@ var UpdateHostCommand;
|
|
|
79
64
|
.optional(zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)))
|
|
80
65
|
.describe('Optional. Subscription types from which the host will be excluded from.'),
|
|
81
66
|
});
|
|
82
|
-
UpdateHostCommand.ResponseSchema =
|
|
83
|
-
response: models_1.HostsSchema,
|
|
84
|
-
});
|
|
67
|
+
UpdateHostCommand.ResponseSchema = host_response_1.HostResponseSchema;
|
|
85
68
|
})(UpdateHostCommand || (exports.UpdateHostCommand = UpdateHostCommand = {}));
|
|
@@ -4,7 +4,6 @@ exports.BulkDeleteHostsCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../../api");
|
|
6
6
|
const constants_1 = require("../../../constants");
|
|
7
|
-
const models_1 = require("../../../models");
|
|
8
7
|
var BulkDeleteHostsCommand;
|
|
9
8
|
(function (BulkDeleteHostsCommand) {
|
|
10
9
|
BulkDeleteHostsCommand.url = api_1.REST_API.HOSTS.BULK.DELETE_HOSTS;
|
|
@@ -13,7 +12,4 @@ var BulkDeleteHostsCommand;
|
|
|
13
12
|
BulkDeleteHostsCommand.RequestBodySchema = zod_1.z.object({
|
|
14
13
|
uuids: zod_1.z.array(zod_1.z.string().uuid()),
|
|
15
14
|
});
|
|
16
|
-
BulkDeleteHostsCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
-
response: zod_1.z.array(models_1.HostsSchema),
|
|
18
|
-
});
|
|
19
15
|
})(BulkDeleteHostsCommand || (exports.BulkDeleteHostsCommand = BulkDeleteHostsCommand = {}));
|
|
@@ -4,7 +4,6 @@ exports.BulkDisableHostsCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../../api");
|
|
6
6
|
const constants_1 = require("../../../constants");
|
|
7
|
-
const models_1 = require("../../../models");
|
|
8
7
|
var BulkDisableHostsCommand;
|
|
9
8
|
(function (BulkDisableHostsCommand) {
|
|
10
9
|
BulkDisableHostsCommand.url = api_1.REST_API.HOSTS.BULK.DISABLE_HOSTS;
|
|
@@ -13,7 +12,4 @@ var BulkDisableHostsCommand;
|
|
|
13
12
|
BulkDisableHostsCommand.RequestBodySchema = zod_1.z.object({
|
|
14
13
|
uuids: zod_1.z.array(zod_1.z.string().uuid()),
|
|
15
14
|
});
|
|
16
|
-
BulkDisableHostsCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
-
response: zod_1.z.array(models_1.HostsSchema),
|
|
18
|
-
});
|
|
19
15
|
})(BulkDisableHostsCommand || (exports.BulkDisableHostsCommand = BulkDisableHostsCommand = {}));
|
|
@@ -4,7 +4,6 @@ exports.BulkEnableHostsCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../../api");
|
|
6
6
|
const constants_1 = require("../../../constants");
|
|
7
|
-
const models_1 = require("../../../models");
|
|
8
7
|
var BulkEnableHostsCommand;
|
|
9
8
|
(function (BulkEnableHostsCommand) {
|
|
10
9
|
BulkEnableHostsCommand.url = api_1.REST_API.HOSTS.BULK.ENABLE_HOSTS;
|
|
@@ -13,7 +12,4 @@ var BulkEnableHostsCommand;
|
|
|
13
12
|
BulkEnableHostsCommand.RequestBodySchema = zod_1.z.object({
|
|
14
13
|
uuids: zod_1.z.array(zod_1.z.string().uuid()),
|
|
15
14
|
});
|
|
16
|
-
BulkEnableHostsCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
-
response: zod_1.z.array(models_1.HostsSchema),
|
|
18
|
-
});
|
|
19
15
|
})(BulkEnableHostsCommand || (exports.BulkEnableHostsCommand = BulkEnableHostsCommand = {}));
|
|
@@ -4,7 +4,6 @@ exports.UpdateManyHostsCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../../api");
|
|
6
6
|
const constants_1 = require("../../../constants");
|
|
7
|
-
const models_1 = require("../../../models");
|
|
8
7
|
const update_command_1 = require("../update.command");
|
|
9
8
|
var UpdateManyHostsCommand;
|
|
10
9
|
(function (UpdateManyHostsCommand) {
|
|
@@ -16,7 +15,4 @@ var UpdateManyHostsCommand;
|
|
|
16
15
|
.extend({
|
|
17
16
|
uuids: zod_1.z.array(zod_1.z.string().uuid()).min(1, 'Must be at least 1 host UUID'),
|
|
18
17
|
});
|
|
19
|
-
UpdateManyHostsCommand.ResponseSchema = zod_1.z.object({
|
|
20
|
-
response: zod_1.z.array(models_1.HostsSchema),
|
|
21
|
-
});
|
|
22
18
|
})(UpdateManyHostsCommand || (exports.UpdateManyHostsCommand = UpdateManyHostsCommand = {}));
|
|
@@ -4,7 +4,7 @@ exports.CreateHostCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../api");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
|
-
const
|
|
7
|
+
const host_response_1 = require("./host.response");
|
|
8
8
|
var CreateHostCommand;
|
|
9
9
|
(function (CreateHostCommand) {
|
|
10
10
|
CreateHostCommand.url = api_1.REST_API.HOSTS.CREATE;
|
|
@@ -15,24 +15,9 @@ var CreateHostCommand;
|
|
|
15
15
|
configProfileUuid: zod_1.z.string().uuid(),
|
|
16
16
|
configProfileInboundUuid: zod_1.z.string().uuid(),
|
|
17
17
|
}),
|
|
18
|
-
remark: zod_1.z
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
.min(1, {
|
|
23
|
-
message: 'Remark must be at least 1 character',
|
|
24
|
-
})
|
|
25
|
-
.max(40, {
|
|
26
|
-
message: 'Remark must be less than 40 characters',
|
|
27
|
-
}),
|
|
28
|
-
address: zod_1.z.string({
|
|
29
|
-
invalid_type_error: 'Address must be a string',
|
|
30
|
-
}),
|
|
31
|
-
port: zod_1.z
|
|
32
|
-
.number({
|
|
33
|
-
invalid_type_error: 'Port must be an integer',
|
|
34
|
-
})
|
|
35
|
-
.int(),
|
|
18
|
+
remark: zod_1.z.string().min(1).max(100),
|
|
19
|
+
address: zod_1.z.string(),
|
|
20
|
+
port: zod_1.z.number().int(),
|
|
36
21
|
path: zod_1.z.string().nullish(),
|
|
37
22
|
sni: zod_1.z.string().nullish(),
|
|
38
23
|
host: zod_1.z.string().nullish(),
|
|
@@ -74,7 +59,5 @@ var CreateHostCommand;
|
|
|
74
59
|
.optional(zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)))
|
|
75
60
|
.describe('Optional. Subscription types from which the host will be excluded from.'),
|
|
76
61
|
});
|
|
77
|
-
CreateHostCommand.ResponseSchema =
|
|
78
|
-
response: models_1.HostsSchema,
|
|
79
|
-
});
|
|
62
|
+
CreateHostCommand.ResponseSchema = host_response_1.HostResponseSchema;
|
|
80
63
|
})(CreateHostCommand || (exports.CreateHostCommand = CreateHostCommand = {}));
|
|
@@ -4,7 +4,7 @@ exports.GetHostCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../api");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
|
-
const
|
|
7
|
+
const host_response_1 = require("./host.response");
|
|
8
8
|
var GetHostCommand;
|
|
9
9
|
(function (GetHostCommand) {
|
|
10
10
|
GetHostCommand.url = api_1.REST_API.HOSTS.GET_BY_UUID;
|
|
@@ -13,7 +13,5 @@ var GetHostCommand;
|
|
|
13
13
|
GetHostCommand.RequestParamSchema = zod_1.z.object({
|
|
14
14
|
uuid: zod_1.z.string().uuid(),
|
|
15
15
|
});
|
|
16
|
-
GetHostCommand.ResponseSchema =
|
|
17
|
-
response: models_1.HostsSchema,
|
|
18
|
-
});
|
|
16
|
+
GetHostCommand.ResponseSchema = host_response_1.HostResponseSchema;
|
|
19
17
|
})(GetHostCommand || (exports.GetHostCommand = GetHostCommand = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HostResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const hosts_schema_1 = require("../../models/hosts.schema");
|
|
6
|
+
exports.HostResponseSchema = zod_1.z.object({
|
|
7
|
+
response: hosts_schema_1.HostsSchema,
|
|
8
|
+
});
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const api_1 = require("../../api");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
7
|
const models_1 = require("../../models");
|
|
8
|
+
const host_response_1 = require("./host.response");
|
|
8
9
|
var UpdateHostCommand;
|
|
9
10
|
(function (UpdateHostCommand) {
|
|
10
11
|
UpdateHostCommand.url = api_1.REST_API.HOSTS.UPDATE;
|
|
@@ -19,25 +20,9 @@ var UpdateHostCommand;
|
|
|
19
20
|
configProfileInboundUuid: zod_1.z.string().uuid(),
|
|
20
21
|
})
|
|
21
22
|
.optional(),
|
|
22
|
-
remark: zod_1.z
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
.max(40, {
|
|
27
|
-
message: 'Remark must be less than 40 characters',
|
|
28
|
-
})
|
|
29
|
-
.optional(),
|
|
30
|
-
address: zod_1.z
|
|
31
|
-
.string({
|
|
32
|
-
invalid_type_error: 'Address must be a string',
|
|
33
|
-
})
|
|
34
|
-
.optional(),
|
|
35
|
-
port: zod_1.z
|
|
36
|
-
.number({
|
|
37
|
-
invalid_type_error: 'Port must be an integer',
|
|
38
|
-
})
|
|
39
|
-
.int()
|
|
40
|
-
.optional(),
|
|
23
|
+
remark: zod_1.z.string().min(1).max(100).optional(),
|
|
24
|
+
address: zod_1.z.string().optional(),
|
|
25
|
+
port: zod_1.z.number().int().optional(),
|
|
41
26
|
path: zod_1.z.string().nullish(),
|
|
42
27
|
sni: zod_1.z.string().nullish(),
|
|
43
28
|
host: zod_1.z.string().nullish(),
|
|
@@ -79,7 +64,5 @@ var UpdateHostCommand;
|
|
|
79
64
|
.optional(zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)))
|
|
80
65
|
.describe('Optional. Subscription types from which the host will be excluded from.'),
|
|
81
66
|
});
|
|
82
|
-
UpdateHostCommand.ResponseSchema =
|
|
83
|
-
response: models_1.HostsSchema,
|
|
84
|
-
});
|
|
67
|
+
UpdateHostCommand.ResponseSchema = host_response_1.HostResponseSchema;
|
|
85
68
|
})(UpdateHostCommand || (exports.UpdateHostCommand = UpdateHostCommand = {}));
|
package/package.json
CHANGED