@remnawave/backend-contract 2.8.9 → 2.8.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 (48) hide show
  1. package/build/backend/api/controllers/hosts.d.ts +1 -4
  2. package/build/backend/api/controllers/hosts.d.ts.map +1 -1
  3. package/build/backend/api/controllers/hosts.js +1 -4
  4. package/build/backend/api/routes.d.ts +1 -4
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +1 -4
  7. package/build/backend/commands/hosts/bulk/index.d.ts +1 -4
  8. package/build/backend/commands/hosts/bulk/index.d.ts.map +1 -1
  9. package/build/backend/commands/hosts/bulk/index.js +1 -4
  10. package/build/backend/commands/hosts/bulk/{set-port-to-many-hosts.command.d.ts → update-many-hosts.command.d.ts} +194 -8
  11. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts.map +1 -0
  12. package/build/backend/commands/hosts/bulk/update-many-hosts.command.js +20 -0
  13. package/build/backend/commands/hosts/create.command.d.ts +3 -13
  14. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  15. package/build/backend/commands/hosts/create.command.js +1 -1
  16. package/build/backend/commands/hosts/update.command.d.ts +3 -13
  17. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  18. package/build/backend/commands/hosts/update.command.js +1 -1
  19. package/build/backend/constants/errors/errors.d.ts +5 -20
  20. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  21. package/build/backend/constants/errors/errors.js +5 -20
  22. package/build/backend/constants/hosts/fingerprints.d.ts +1 -13
  23. package/build/backend/constants/hosts/fingerprints.d.ts.map +1 -1
  24. package/build/backend/constants/hosts/fingerprints.js +13 -13
  25. package/build/frontend/api/controllers/hosts.js +1 -4
  26. package/build/frontend/api/routes.js +1 -4
  27. package/build/frontend/commands/hosts/bulk/index.js +1 -4
  28. package/build/frontend/commands/hosts/bulk/update-many-hosts.command.js +20 -0
  29. package/build/frontend/commands/hosts/create.command.js +1 -1
  30. package/build/frontend/commands/hosts/update.command.js +1 -1
  31. package/build/frontend/constants/errors/errors.js +5 -20
  32. package/build/frontend/constants/hosts/fingerprints.js +13 -13
  33. package/package.json +1 -1
  34. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +0 -226
  35. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +0 -1
  36. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.js +0 -19
  37. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +0 -226
  38. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +0 -1
  39. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.js +0 -19
  40. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts +0 -232
  41. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.d.ts.map +0 -1
  42. package/build/backend/commands/hosts/bulk/set-inbound-to-many-hosts.command.js +0 -21
  43. package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.d.ts.map +0 -1
  44. package/build/backend/commands/hosts/bulk/set-port-to-many-hosts.command.js +0 -20
  45. package/build/frontend/commands/hosts/bulk/disable-many-hosts.command.js +0 -19
  46. package/build/frontend/commands/hosts/bulk/enable-many-hosts.command.js +0 -19
  47. package/build/frontend/commands/hosts/bulk/set-inbound-to-many-hosts.command.js +0 -21
  48. package/build/frontend/commands/hosts/bulk/set-port-to-many-hosts.command.js +0 -20
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateManyHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../../constants");
6
+ const api_1 = require("../../../api");
7
+ const update_command_1 = require("../update.command");
8
+ const models_1 = require("../../../models");
9
+ var UpdateManyHostsCommand;
10
+ (function (UpdateManyHostsCommand) {
11
+ UpdateManyHostsCommand.url = api_1.REST_API.HOSTS.BULK.UPDATE;
12
+ UpdateManyHostsCommand.TSQ_url = UpdateManyHostsCommand.url;
13
+ UpdateManyHostsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HOSTS_ROUTES.BULK.UPDATE, 'patch', 'Update many hosts');
14
+ UpdateManyHostsCommand.RequestSchema = update_command_1.UpdateHostCommand.RequestSchema.omit({ uuid: true }).extend({
15
+ uuids: zod_1.z.array(zod_1.z.string().uuid()).min(1, 'Must be at least 1 host UUID'),
16
+ });
17
+ UpdateManyHostsCommand.ResponseSchema = zod_1.z.object({
18
+ response: zod_1.z.array(models_1.HostsSchema),
19
+ });
20
+ })(UpdateManyHostsCommand || (exports.UpdateManyHostsCommand = UpdateManyHostsCommand = {}));
@@ -37,7 +37,7 @@ var CreateHostCommand;
37
37
  sni: zod_1.z.string().optional(),
38
38
  host: zod_1.z.string().optional(),
39
39
  alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
40
- fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.FINGERPRINTS).nullable()),
40
+ fingerprint: zod_1.z.optional(zod_1.z.string().nullable()),
41
41
  isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
42
42
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS).default(constants_1.SECURITY_LAYERS.DEFAULT)),
43
43
  xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
@@ -42,7 +42,7 @@ var UpdateHostCommand;
42
42
  sni: zod_1.z.optional(zod_1.z.string()),
43
43
  host: zod_1.z.optional(zod_1.z.string()),
44
44
  alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
45
- fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.FINGERPRINTS).nullable()),
45
+ fingerprint: zod_1.z.optional(zod_1.z.string().nullable()),
46
46
  isDisabled: zod_1.z.optional(zod_1.z.boolean()),
47
47
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS)),
48
48
  xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
@@ -390,26 +390,6 @@ exports.ERRORS = {
390
390
  message: 'Delete hosts error',
391
391
  httpCode: 500,
392
392
  },
393
- BULK_ENABLE_HOSTS_ERROR: {
394
- code: 'A080',
395
- message: 'Bulk enable hosts error',
396
- httpCode: 500,
397
- },
398
- BULK_DISABLE_HOSTS_ERROR: {
399
- code: 'A081',
400
- message: 'Bulk disable hosts error',
401
- httpCode: 500,
402
- },
403
- SET_INBOUND_TO_HOSTS_ERROR: {
404
- code: 'A082',
405
- message: 'Set inbound to hosts error',
406
- httpCode: 500,
407
- },
408
- SET_PORT_TO_HOSTS_ERROR: {
409
- code: 'A083',
410
- message: 'Set port to hosts error',
411
- httpCode: 500,
412
- },
413
393
  BULK_DELETE_USERS_BY_UUID_ERROR: {
414
394
  code: 'A084',
415
395
  message: 'Bulk delete users by UUID error',
@@ -1145,4 +1125,9 @@ exports.ERRORS = {
1145
1125
  message: 'Get torrent blocker reports error',
1146
1126
  httpCode: 500,
1147
1127
  },
1128
+ UPDATE_HOSTS_ERROR: {
1129
+ code: 'A228',
1130
+ message: 'Update hosts error',
1131
+ httpCode: 500,
1132
+ },
1148
1133
  };
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FINGERPRINTS_VALUES = exports.FINGERPRINTS = void 0;
4
- exports.FINGERPRINTS = {
5
- CHROME: 'chrome',
6
- FIREFOX: 'firefox',
7
- SAFARI: 'safari',
8
- IOS: 'ios',
9
- ANDROID: 'android',
10
- EDGE: 'edge',
11
- QQ: 'qq',
12
- RANDOM: 'random',
13
- RANDOMIZED: 'randomized',
14
- };
15
- exports.FINGERPRINTS_VALUES = Object.values(exports.FINGERPRINTS);
3
+ exports.FINGERPRINTS = void 0;
4
+ exports.FINGERPRINTS = [
5
+ 'randomized',
6
+ 'android',
7
+ 'firefox',
8
+ 'chrome',
9
+ 'safari',
10
+ 'edge',
11
+ 'ios',
12
+ 'qq',
13
+ '360',
14
+ 'random',
15
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.8.9",
3
+ "version": "2.8.11",
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.",
@@ -1,226 +0,0 @@
1
- import { z } from 'zod';
2
- export declare namespace BulkDisableHostsCommand {
3
- const url: "/api/hosts/bulk/disable";
4
- const TSQ_url: "/api/hosts/bulk/disable";
5
- const endpointDetails: import("../../../constants").EndpointDetails;
6
- const RequestSchema: z.ZodObject<{
7
- uuids: z.ZodArray<z.ZodString, "many">;
8
- }, "strip", z.ZodTypeAny, {
9
- uuids: string[];
10
- }, {
11
- uuids: string[];
12
- }>;
13
- type Request = z.infer<typeof RequestSchema>;
14
- const ResponseSchema: z.ZodObject<{
15
- response: z.ZodArray<z.ZodObject<{
16
- uuid: z.ZodString;
17
- viewPosition: z.ZodNumber;
18
- remark: z.ZodString;
19
- address: z.ZodString;
20
- port: z.ZodNumber;
21
- path: z.ZodNullable<z.ZodString>;
22
- sni: z.ZodNullable<z.ZodString>;
23
- host: z.ZodNullable<z.ZodString>;
24
- alpn: z.ZodNullable<z.ZodString>;
25
- fingerprint: z.ZodNullable<z.ZodString>;
26
- isDisabled: z.ZodDefault<z.ZodBoolean>;
27
- securityLayer: z.ZodDefault<z.ZodNativeEnum<{
28
- readonly DEFAULT: "DEFAULT";
29
- readonly TLS: "TLS";
30
- readonly NONE: "NONE";
31
- }>>;
32
- xHttpExtraParams: z.ZodNullable<z.ZodUnknown>;
33
- muxParams: z.ZodNullable<z.ZodUnknown>;
34
- sockoptParams: z.ZodNullable<z.ZodUnknown>;
35
- finalMask: z.ZodNullable<z.ZodUnknown>;
36
- inbound: z.ZodObject<{
37
- configProfileUuid: z.ZodNullable<z.ZodString>;
38
- configProfileInboundUuid: z.ZodNullable<z.ZodString>;
39
- }, "strip", z.ZodTypeAny, {
40
- configProfileUuid: string | null;
41
- configProfileInboundUuid: string | null;
42
- }, {
43
- configProfileUuid: string | null;
44
- configProfileInboundUuid: string | null;
45
- }>;
46
- serverDescription: z.ZodNullable<z.ZodString>;
47
- tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
48
- isHidden: z.ZodDefault<z.ZodBoolean>;
49
- overrideSniFromAddress: z.ZodDefault<z.ZodBoolean>;
50
- keepSniBlank: z.ZodDefault<z.ZodBoolean>;
51
- vlessRouteId: z.ZodNullable<z.ZodNumber>;
52
- pinnedPeerCertSha256: z.ZodNullable<z.ZodString>;
53
- verifyPeerCertByName: z.ZodNullable<z.ZodString>;
54
- shuffleHost: z.ZodBoolean;
55
- mihomoX25519: z.ZodBoolean;
56
- mihomoIpVersion: z.ZodNullable<z.ZodNativeEnum<{
57
- readonly DUAL: "dual";
58
- readonly IPV4: "ipv4";
59
- readonly IPV6: "ipv6";
60
- readonly IPV4_PREFER: "ipv4-prefer";
61
- readonly IPV6_PREFER: "ipv6-prefer";
62
- }>>;
63
- nodes: z.ZodArray<z.ZodString, "many">;
64
- xrayJsonTemplateUuid: z.ZodNullable<z.ZodString>;
65
- excludedInternalSquads: z.ZodArray<z.ZodString, "many">;
66
- excludeFromSubscriptionTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
67
- readonly XRAY_JSON: "XRAY_JSON";
68
- readonly XRAY_BASE64: "XRAY_BASE64";
69
- readonly MIHOMO: "MIHOMO";
70
- readonly STASH: "STASH";
71
- readonly CLASH: "CLASH";
72
- readonly SINGBOX: "SINGBOX";
73
- }>, "many">>;
74
- }, "strip", z.ZodTypeAny, {
75
- nodes: string[];
76
- tags: string[];
77
- path: string | null;
78
- uuid: string;
79
- port: number;
80
- viewPosition: number;
81
- remark: string;
82
- address: string;
83
- sni: string | null;
84
- host: string | null;
85
- alpn: string | null;
86
- fingerprint: string | null;
87
- isDisabled: boolean;
88
- securityLayer: "DEFAULT" | "TLS" | "NONE";
89
- inbound: {
90
- configProfileUuid: string | null;
91
- configProfileInboundUuid: string | null;
92
- };
93
- serverDescription: string | null;
94
- isHidden: boolean;
95
- overrideSniFromAddress: boolean;
96
- keepSniBlank: boolean;
97
- vlessRouteId: number | null;
98
- pinnedPeerCertSha256: string | null;
99
- verifyPeerCertByName: string | null;
100
- shuffleHost: boolean;
101
- mihomoX25519: boolean;
102
- mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
103
- xrayJsonTemplateUuid: string | null;
104
- excludedInternalSquads: string[];
105
- xHttpExtraParams?: unknown;
106
- muxParams?: unknown;
107
- sockoptParams?: unknown;
108
- finalMask?: unknown;
109
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
110
- }, {
111
- nodes: string[];
112
- path: string | null;
113
- uuid: string;
114
- port: number;
115
- viewPosition: number;
116
- remark: string;
117
- address: string;
118
- sni: string | null;
119
- host: string | null;
120
- alpn: string | null;
121
- fingerprint: string | null;
122
- inbound: {
123
- configProfileUuid: string | null;
124
- configProfileInboundUuid: string | null;
125
- };
126
- serverDescription: string | null;
127
- vlessRouteId: number | null;
128
- pinnedPeerCertSha256: string | null;
129
- verifyPeerCertByName: string | null;
130
- shuffleHost: boolean;
131
- mihomoX25519: boolean;
132
- mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
133
- xrayJsonTemplateUuid: string | null;
134
- excludedInternalSquads: string[];
135
- tags?: string[] | undefined;
136
- isDisabled?: boolean | undefined;
137
- securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
138
- xHttpExtraParams?: unknown;
139
- muxParams?: unknown;
140
- sockoptParams?: unknown;
141
- finalMask?: unknown;
142
- isHidden?: boolean | undefined;
143
- overrideSniFromAddress?: boolean | undefined;
144
- keepSniBlank?: boolean | undefined;
145
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
146
- }>, "many">;
147
- }, "strip", z.ZodTypeAny, {
148
- response: {
149
- nodes: string[];
150
- tags: string[];
151
- path: string | null;
152
- uuid: string;
153
- port: number;
154
- viewPosition: number;
155
- remark: string;
156
- address: string;
157
- sni: string | null;
158
- host: string | null;
159
- alpn: string | null;
160
- fingerprint: string | null;
161
- isDisabled: boolean;
162
- securityLayer: "DEFAULT" | "TLS" | "NONE";
163
- inbound: {
164
- configProfileUuid: string | null;
165
- configProfileInboundUuid: string | null;
166
- };
167
- serverDescription: string | null;
168
- isHidden: boolean;
169
- overrideSniFromAddress: boolean;
170
- keepSniBlank: boolean;
171
- vlessRouteId: number | null;
172
- pinnedPeerCertSha256: string | null;
173
- verifyPeerCertByName: string | null;
174
- shuffleHost: boolean;
175
- mihomoX25519: boolean;
176
- mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
177
- xrayJsonTemplateUuid: string | null;
178
- excludedInternalSquads: string[];
179
- xHttpExtraParams?: unknown;
180
- muxParams?: unknown;
181
- sockoptParams?: unknown;
182
- finalMask?: unknown;
183
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
184
- }[];
185
- }, {
186
- response: {
187
- nodes: string[];
188
- path: string | null;
189
- uuid: string;
190
- port: number;
191
- viewPosition: number;
192
- remark: string;
193
- address: string;
194
- sni: string | null;
195
- host: string | null;
196
- alpn: string | null;
197
- fingerprint: string | null;
198
- inbound: {
199
- configProfileUuid: string | null;
200
- configProfileInboundUuid: string | null;
201
- };
202
- serverDescription: string | null;
203
- vlessRouteId: number | null;
204
- pinnedPeerCertSha256: string | null;
205
- verifyPeerCertByName: string | null;
206
- shuffleHost: boolean;
207
- mihomoX25519: boolean;
208
- mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
209
- xrayJsonTemplateUuid: string | null;
210
- excludedInternalSquads: string[];
211
- tags?: string[] | undefined;
212
- isDisabled?: boolean | undefined;
213
- securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
214
- xHttpExtraParams?: unknown;
215
- muxParams?: unknown;
216
- sockoptParams?: unknown;
217
- finalMask?: unknown;
218
- isHidden?: boolean | undefined;
219
- overrideSniFromAddress?: boolean | undefined;
220
- keepSniBlank?: boolean | undefined;
221
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
222
- }[];
223
- }>;
224
- type Response = z.infer<typeof ResponseSchema>;
225
- }
226
- //# sourceMappingURL=disable-many-hosts.command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"disable-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/disable-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,2BAAoC,CAAC;IAC9C,MAAM,OAAO,2BAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,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,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BulkDisableHostsCommand = void 0;
4
- const zod_1 = require("zod");
5
- const constants_1 = require("../../../constants");
6
- const api_1 = require("../../../api");
7
- const models_1 = require("../../../models");
8
- var BulkDisableHostsCommand;
9
- (function (BulkDisableHostsCommand) {
10
- BulkDisableHostsCommand.url = api_1.REST_API.HOSTS.BULK.DISABLE_HOSTS;
11
- BulkDisableHostsCommand.TSQ_url = BulkDisableHostsCommand.url;
12
- BulkDisableHostsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HOSTS_ROUTES.BULK.DISABLE_HOSTS, 'post', 'Disable hosts by UUIDs');
13
- BulkDisableHostsCommand.RequestSchema = zod_1.z.object({
14
- uuids: zod_1.z.array(zod_1.z.string().uuid()),
15
- });
16
- BulkDisableHostsCommand.ResponseSchema = zod_1.z.object({
17
- response: zod_1.z.array(models_1.HostsSchema),
18
- });
19
- })(BulkDisableHostsCommand || (exports.BulkDisableHostsCommand = BulkDisableHostsCommand = {}));
@@ -1,226 +0,0 @@
1
- import { z } from 'zod';
2
- export declare namespace BulkEnableHostsCommand {
3
- const url: "/api/hosts/bulk/enable";
4
- const TSQ_url: "/api/hosts/bulk/enable";
5
- const endpointDetails: import("../../../constants").EndpointDetails;
6
- const RequestSchema: z.ZodObject<{
7
- uuids: z.ZodArray<z.ZodString, "many">;
8
- }, "strip", z.ZodTypeAny, {
9
- uuids: string[];
10
- }, {
11
- uuids: string[];
12
- }>;
13
- type Request = z.infer<typeof RequestSchema>;
14
- const ResponseSchema: z.ZodObject<{
15
- response: z.ZodArray<z.ZodObject<{
16
- uuid: z.ZodString;
17
- viewPosition: z.ZodNumber;
18
- remark: z.ZodString;
19
- address: z.ZodString;
20
- port: z.ZodNumber;
21
- path: z.ZodNullable<z.ZodString>;
22
- sni: z.ZodNullable<z.ZodString>;
23
- host: z.ZodNullable<z.ZodString>;
24
- alpn: z.ZodNullable<z.ZodString>;
25
- fingerprint: z.ZodNullable<z.ZodString>;
26
- isDisabled: z.ZodDefault<z.ZodBoolean>;
27
- securityLayer: z.ZodDefault<z.ZodNativeEnum<{
28
- readonly DEFAULT: "DEFAULT";
29
- readonly TLS: "TLS";
30
- readonly NONE: "NONE";
31
- }>>;
32
- xHttpExtraParams: z.ZodNullable<z.ZodUnknown>;
33
- muxParams: z.ZodNullable<z.ZodUnknown>;
34
- sockoptParams: z.ZodNullable<z.ZodUnknown>;
35
- finalMask: z.ZodNullable<z.ZodUnknown>;
36
- inbound: z.ZodObject<{
37
- configProfileUuid: z.ZodNullable<z.ZodString>;
38
- configProfileInboundUuid: z.ZodNullable<z.ZodString>;
39
- }, "strip", z.ZodTypeAny, {
40
- configProfileUuid: string | null;
41
- configProfileInboundUuid: string | null;
42
- }, {
43
- configProfileUuid: string | null;
44
- configProfileInboundUuid: string | null;
45
- }>;
46
- serverDescription: z.ZodNullable<z.ZodString>;
47
- tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
48
- isHidden: z.ZodDefault<z.ZodBoolean>;
49
- overrideSniFromAddress: z.ZodDefault<z.ZodBoolean>;
50
- keepSniBlank: z.ZodDefault<z.ZodBoolean>;
51
- vlessRouteId: z.ZodNullable<z.ZodNumber>;
52
- pinnedPeerCertSha256: z.ZodNullable<z.ZodString>;
53
- verifyPeerCertByName: z.ZodNullable<z.ZodString>;
54
- shuffleHost: z.ZodBoolean;
55
- mihomoX25519: z.ZodBoolean;
56
- mihomoIpVersion: z.ZodNullable<z.ZodNativeEnum<{
57
- readonly DUAL: "dual";
58
- readonly IPV4: "ipv4";
59
- readonly IPV6: "ipv6";
60
- readonly IPV4_PREFER: "ipv4-prefer";
61
- readonly IPV6_PREFER: "ipv6-prefer";
62
- }>>;
63
- nodes: z.ZodArray<z.ZodString, "many">;
64
- xrayJsonTemplateUuid: z.ZodNullable<z.ZodString>;
65
- excludedInternalSquads: z.ZodArray<z.ZodString, "many">;
66
- excludeFromSubscriptionTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
67
- readonly XRAY_JSON: "XRAY_JSON";
68
- readonly XRAY_BASE64: "XRAY_BASE64";
69
- readonly MIHOMO: "MIHOMO";
70
- readonly STASH: "STASH";
71
- readonly CLASH: "CLASH";
72
- readonly SINGBOX: "SINGBOX";
73
- }>, "many">>;
74
- }, "strip", z.ZodTypeAny, {
75
- nodes: string[];
76
- tags: string[];
77
- path: string | null;
78
- uuid: string;
79
- port: number;
80
- viewPosition: number;
81
- remark: string;
82
- address: string;
83
- sni: string | null;
84
- host: string | null;
85
- alpn: string | null;
86
- fingerprint: string | null;
87
- isDisabled: boolean;
88
- securityLayer: "DEFAULT" | "TLS" | "NONE";
89
- inbound: {
90
- configProfileUuid: string | null;
91
- configProfileInboundUuid: string | null;
92
- };
93
- serverDescription: string | null;
94
- isHidden: boolean;
95
- overrideSniFromAddress: boolean;
96
- keepSniBlank: boolean;
97
- vlessRouteId: number | null;
98
- pinnedPeerCertSha256: string | null;
99
- verifyPeerCertByName: string | null;
100
- shuffleHost: boolean;
101
- mihomoX25519: boolean;
102
- mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
103
- xrayJsonTemplateUuid: string | null;
104
- excludedInternalSquads: string[];
105
- xHttpExtraParams?: unknown;
106
- muxParams?: unknown;
107
- sockoptParams?: unknown;
108
- finalMask?: unknown;
109
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
110
- }, {
111
- nodes: string[];
112
- path: string | null;
113
- uuid: string;
114
- port: number;
115
- viewPosition: number;
116
- remark: string;
117
- address: string;
118
- sni: string | null;
119
- host: string | null;
120
- alpn: string | null;
121
- fingerprint: string | null;
122
- inbound: {
123
- configProfileUuid: string | null;
124
- configProfileInboundUuid: string | null;
125
- };
126
- serverDescription: string | null;
127
- vlessRouteId: number | null;
128
- pinnedPeerCertSha256: string | null;
129
- verifyPeerCertByName: string | null;
130
- shuffleHost: boolean;
131
- mihomoX25519: boolean;
132
- mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
133
- xrayJsonTemplateUuid: string | null;
134
- excludedInternalSquads: string[];
135
- tags?: string[] | undefined;
136
- isDisabled?: boolean | undefined;
137
- securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
138
- xHttpExtraParams?: unknown;
139
- muxParams?: unknown;
140
- sockoptParams?: unknown;
141
- finalMask?: unknown;
142
- isHidden?: boolean | undefined;
143
- overrideSniFromAddress?: boolean | undefined;
144
- keepSniBlank?: boolean | undefined;
145
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
146
- }>, "many">;
147
- }, "strip", z.ZodTypeAny, {
148
- response: {
149
- nodes: string[];
150
- tags: string[];
151
- path: string | null;
152
- uuid: string;
153
- port: number;
154
- viewPosition: number;
155
- remark: string;
156
- address: string;
157
- sni: string | null;
158
- host: string | null;
159
- alpn: string | null;
160
- fingerprint: string | null;
161
- isDisabled: boolean;
162
- securityLayer: "DEFAULT" | "TLS" | "NONE";
163
- inbound: {
164
- configProfileUuid: string | null;
165
- configProfileInboundUuid: string | null;
166
- };
167
- serverDescription: string | null;
168
- isHidden: boolean;
169
- overrideSniFromAddress: boolean;
170
- keepSniBlank: boolean;
171
- vlessRouteId: number | null;
172
- pinnedPeerCertSha256: string | null;
173
- verifyPeerCertByName: string | null;
174
- shuffleHost: boolean;
175
- mihomoX25519: boolean;
176
- mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
177
- xrayJsonTemplateUuid: string | null;
178
- excludedInternalSquads: string[];
179
- xHttpExtraParams?: unknown;
180
- muxParams?: unknown;
181
- sockoptParams?: unknown;
182
- finalMask?: unknown;
183
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
184
- }[];
185
- }, {
186
- response: {
187
- nodes: string[];
188
- path: string | null;
189
- uuid: string;
190
- port: number;
191
- viewPosition: number;
192
- remark: string;
193
- address: string;
194
- sni: string | null;
195
- host: string | null;
196
- alpn: string | null;
197
- fingerprint: string | null;
198
- inbound: {
199
- configProfileUuid: string | null;
200
- configProfileInboundUuid: string | null;
201
- };
202
- serverDescription: string | null;
203
- vlessRouteId: number | null;
204
- pinnedPeerCertSha256: string | null;
205
- verifyPeerCertByName: string | null;
206
- shuffleHost: boolean;
207
- mihomoX25519: boolean;
208
- mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
209
- xrayJsonTemplateUuid: string | null;
210
- excludedInternalSquads: string[];
211
- tags?: string[] | undefined;
212
- isDisabled?: boolean | undefined;
213
- securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
214
- xHttpExtraParams?: unknown;
215
- muxParams?: unknown;
216
- sockoptParams?: unknown;
217
- finalMask?: unknown;
218
- isHidden?: boolean | undefined;
219
- overrideSniFromAddress?: boolean | undefined;
220
- keepSniBlank?: boolean | undefined;
221
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
222
- }[];
223
- }>;
224
- type Response = z.infer<typeof ResponseSchema>;
225
- }
226
- //# sourceMappingURL=enable-many-hosts.command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enable-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/enable-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAAmC,CAAC;IAC7C,MAAM,OAAO,0BAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,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,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BulkEnableHostsCommand = void 0;
4
- const zod_1 = require("zod");
5
- const constants_1 = require("../../../constants");
6
- const api_1 = require("../../../api");
7
- const models_1 = require("../../../models");
8
- var BulkEnableHostsCommand;
9
- (function (BulkEnableHostsCommand) {
10
- BulkEnableHostsCommand.url = api_1.REST_API.HOSTS.BULK.ENABLE_HOSTS;
11
- BulkEnableHostsCommand.TSQ_url = BulkEnableHostsCommand.url;
12
- BulkEnableHostsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HOSTS_ROUTES.BULK.ENABLE_HOSTS, 'post', 'Enable hosts by UUIDs');
13
- BulkEnableHostsCommand.RequestSchema = zod_1.z.object({
14
- uuids: zod_1.z.array(zod_1.z.string().uuid()),
15
- });
16
- BulkEnableHostsCommand.ResponseSchema = zod_1.z.object({
17
- response: zod_1.z.array(models_1.HostsSchema),
18
- });
19
- })(BulkEnableHostsCommand || (exports.BulkEnableHostsCommand = BulkEnableHostsCommand = {}));