@remnawave/backend-contract 2.8.11 → 2.8.13

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 (29) hide show
  1. package/build/backend/api/controllers/hosts.d.ts +2 -0
  2. package/build/backend/api/controllers/hosts.d.ts.map +1 -1
  3. package/build/backend/api/controllers/hosts.js +2 -0
  4. package/build/backend/api/routes.d.ts +2 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +2 -0
  7. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +226 -0
  8. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -0
  9. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.js +19 -0
  10. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +226 -0
  11. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -0
  12. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.js +19 -0
  13. package/build/backend/commands/hosts/bulk/index.d.ts +2 -0
  14. package/build/backend/commands/hosts/bulk/index.d.ts.map +1 -1
  15. package/build/backend/commands/hosts/bulk/index.js +2 -0
  16. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts +42 -101
  17. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts.map +1 -1
  18. package/build/backend/commands/hosts/bulk/update-many-hosts.command.js +3 -1
  19. package/build/backend/constants/errors/errors.d.ts +10 -0
  20. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  21. package/build/backend/constants/errors/errors.js +10 -0
  22. package/build/frontend/api/controllers/hosts.js +2 -0
  23. package/build/frontend/api/routes.js +2 -0
  24. package/build/frontend/commands/hosts/bulk/disable-many-hosts.command.js +19 -0
  25. package/build/frontend/commands/hosts/bulk/enable-many-hosts.command.js +19 -0
  26. package/build/frontend/commands/hosts/bulk/index.js +2 -0
  27. package/build/frontend/commands/hosts/bulk/update-many-hosts.command.js +3 -1
  28. package/build/frontend/constants/errors/errors.js +10 -0
  29. package/package.json +1 -1
@@ -10,6 +10,8 @@ export declare const HOSTS_ROUTES: {
10
10
  readonly REORDER: "actions/reorder";
11
11
  };
12
12
  readonly BULK: {
13
+ readonly ENABLE_HOSTS: "bulk/enable";
14
+ readonly DISABLE_HOSTS: "bulk/disable";
13
15
  readonly DELETE_HOSTS: "bulk/delete";
14
16
  readonly UPDATE: "bulk/update";
15
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"hosts.d.ts","sourceRoot":"","sources":["../../../../api/controllers/hosts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,kBAAkB,EAAG,SAAkB,CAAC;AAErD,eAAO,MAAM,YAAY;;;;iCAID,MAAM;4BACX,MAAM;;;;;;;;;;;CAcf,CAAC"}
1
+ {"version":3,"file":"hosts.d.ts","sourceRoot":"","sources":["../../../../api/controllers/hosts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,kBAAkB,EAAG,SAAkB,CAAC;AAErD,eAAO,MAAM,YAAY;;;;iCAID,MAAM;4BACX,MAAM;;;;;;;;;;;;;CAgBf,CAAC"}
@@ -13,6 +13,8 @@ exports.HOSTS_ROUTES = {
13
13
  REORDER: `${exports.HOST_ACTIONS_ROUTE}/reorder`,
14
14
  },
15
15
  BULK: {
16
+ ENABLE_HOSTS: 'bulk/enable',
17
+ DISABLE_HOSTS: 'bulk/disable',
16
18
  DELETE_HOSTS: 'bulk/delete',
17
19
  UPDATE: 'bulk/update',
18
20
  },
@@ -111,6 +111,8 @@ export declare const REST_API: {
111
111
  readonly REORDER: "/api/hosts/actions/reorder";
112
112
  };
113
113
  readonly BULK: {
114
+ readonly ENABLE_HOSTS: "/api/hosts/bulk/enable";
115
+ readonly DISABLE_HOSTS: "/api/hosts/bulk/disable";
114
116
  readonly DELETE_HOSTS: "/api/hosts/bulk/delete";
115
117
  readonly UPDATE: "/api/hosts/bulk/update";
116
118
  };
@@ -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;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;gCAyBE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;;;;oCAOF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;2CAKA,MAAM;;;;;;;;;;;;;gCAiBjB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;8BAOzB,MAAM;6CAES,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;;;;;;;;kCAyBJ,MAAM;uCAED,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAkCT,MAAM;;gCAKH,MAAM;;;;;;;;;;;;;;mDAiBa,MAAM;;;;;;;;;0CAYf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;6CAMV,MAAM;;qDAKE,MAAM;;;;;;qCAStB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;6DAIC,MAAM;;;;;;;;;;qCAa9B,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;;;;yCAWP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCA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;;qCAStB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;6DAIC,MAAM;;;;;;;;;;qCAa9B,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;;;;yCAWP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;;;;;;;;;6BAYnB,MAAM;;;gCAIH,MAAM;;;;;;;;6BAST,MAAM;;;gCAIH,MAAM;;;;;;;;;;;;;;;;;uCAkBC,MAAM;;;;yCAKJ,MAAM;;;;2CAKJ,MAAM;;;6CAIJ,MAAM;;;;;mCAMhB,MAAM;+CAEM,MAAM;;6CAGR,MAAM;qDAEE,MAAM;;;;iCAK1B,MAAM;oCAEH,MAAM;;;iCAIT,MAAM;oCAEH,MAAM;;;CAIvB,CAAC"}
@@ -148,6 +148,8 @@ exports.REST_API = {
148
148
  REORDER: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.ACTIONS.REORDER}`,
149
149
  },
150
150
  BULK: {
151
+ ENABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.ENABLE_HOSTS}`,
152
+ DISABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DISABLE_HOSTS}`,
151
153
  DELETE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DELETE_HOSTS}`,
152
154
  UPDATE: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.UPDATE}`,
153
155
  },
@@ -0,0 +1,226 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,19 @@
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 = {}));
@@ -0,0 +1,226 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,19 @@
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 = {}));
@@ -1,3 +1,5 @@
1
1
  export * from './delete-many-hosts.command';
2
+ export * from './disable-many-hosts.command';
3
+ export * from './enable-many-hosts.command';
2
4
  export * from './update-many-hosts.command';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC"}
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./delete-many-hosts.command"), exports);
18
+ __exportStar(require("./disable-many-hosts.command"), exports);
19
+ __exportStar(require("./enable-many-hosts.command"), exports);
18
20
  __exportStar(require("./update-many-hosts.command"), exports);
@@ -3,67 +3,35 @@ export declare namespace UpdateManyHostsCommand {
3
3
  const url: "/api/hosts/bulk/update";
4
4
  const TSQ_url: "/api/hosts/bulk/update";
5
5
  const endpointDetails: import("../../../constants").EndpointDetails;
6
- const RequestSchema: z.ZodObject<Omit<Pick<{
7
- uuid: z.ZodString;
8
- viewPosition: z.ZodNumber;
9
- remark: z.ZodString;
10
- address: z.ZodString;
11
- port: z.ZodNumber;
12
- path: z.ZodNullable<z.ZodString>;
13
- sni: z.ZodNullable<z.ZodString>;
14
- host: z.ZodNullable<z.ZodString>;
15
- alpn: z.ZodNullable<z.ZodString>;
16
- fingerprint: z.ZodNullable<z.ZodString>;
17
- isDisabled: z.ZodDefault<z.ZodBoolean>;
18
- securityLayer: z.ZodDefault<z.ZodNativeEnum<{
6
+ const RequestSchema: z.ZodObject<{
7
+ nodes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
8
+ tags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
9
+ path: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
+ port: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
11
+ remark: z.ZodOptional<z.ZodOptional<z.ZodString>>;
12
+ address: z.ZodOptional<z.ZodOptional<z.ZodString>>;
13
+ sni: z.ZodOptional<z.ZodOptional<z.ZodString>>;
14
+ host: z.ZodOptional<z.ZodOptional<z.ZodString>>;
15
+ alpn: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
16
+ readonly H3: "h3";
17
+ readonly H2: "h2";
18
+ readonly HTTP_1_1: "http/1.1";
19
+ readonly H_COMBINED: "h2,http/1.1";
20
+ readonly H3_H2_H1_COMBINED: "h3,h2,http/1.1";
21
+ readonly H3_H2_COMBINED: "h3,h2";
22
+ }>>>>;
23
+ fingerprint: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
24
+ isDisabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
25
+ securityLayer: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<{
19
26
  readonly DEFAULT: "DEFAULT";
20
27
  readonly TLS: "TLS";
21
28
  readonly NONE: "NONE";
22
- }>>;
23
- xHttpExtraParams: z.ZodNullable<z.ZodUnknown>;
24
- muxParams: z.ZodNullable<z.ZodUnknown>;
25
- sockoptParams: z.ZodNullable<z.ZodUnknown>;
26
- finalMask: z.ZodNullable<z.ZodUnknown>;
27
- inbound: z.ZodObject<{
28
- configProfileUuid: z.ZodNullable<z.ZodString>;
29
- configProfileInboundUuid: z.ZodNullable<z.ZodString>;
30
- }, "strip", z.ZodTypeAny, {
31
- configProfileUuid: string | null;
32
- configProfileInboundUuid: string | null;
33
- }, {
34
- configProfileUuid: string | null;
35
- configProfileInboundUuid: string | null;
36
- }>;
37
- serverDescription: z.ZodNullable<z.ZodString>;
38
- tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
39
- isHidden: z.ZodDefault<z.ZodBoolean>;
40
- overrideSniFromAddress: z.ZodDefault<z.ZodBoolean>;
41
- keepSniBlank: z.ZodDefault<z.ZodBoolean>;
42
- vlessRouteId: z.ZodNullable<z.ZodNumber>;
43
- pinnedPeerCertSha256: z.ZodNullable<z.ZodString>;
44
- verifyPeerCertByName: z.ZodNullable<z.ZodString>;
45
- shuffleHost: z.ZodBoolean;
46
- mihomoX25519: z.ZodBoolean;
47
- mihomoIpVersion: z.ZodNullable<z.ZodNativeEnum<{
48
- readonly DUAL: "dual";
49
- readonly IPV4: "ipv4";
50
- readonly IPV6: "ipv6";
51
- readonly IPV4_PREFER: "ipv4-prefer";
52
- readonly IPV6_PREFER: "ipv6-prefer";
53
- }>>;
54
- nodes: z.ZodArray<z.ZodString, "many">;
55
- xrayJsonTemplateUuid: z.ZodNullable<z.ZodString>;
56
- excludedInternalSquads: z.ZodArray<z.ZodString, "many">;
57
- excludeFromSubscriptionTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
58
- readonly XRAY_JSON: "XRAY_JSON";
59
- readonly XRAY_BASE64: "XRAY_BASE64";
60
- readonly MIHOMO: "MIHOMO";
61
- readonly STASH: "STASH";
62
- readonly CLASH: "CLASH";
63
- readonly SINGBOX: "SINGBOX";
64
- }>, "many">>;
65
- }, "uuid"> & {
66
- inbound: z.ZodOptional<z.ZodObject<{
29
+ }>>>;
30
+ xHttpExtraParams: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnknown>>>;
31
+ muxParams: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnknown>>>;
32
+ sockoptParams: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnknown>>>;
33
+ finalMask: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnknown>>>;
34
+ inbound: z.ZodOptional<z.ZodOptional<z.ZodObject<{
67
35
  configProfileUuid: z.ZodString;
68
36
  configProfileInboundUuid: z.ZodString;
69
37
  }, "strip", z.ZodTypeAny, {
@@ -72,61 +40,34 @@ export declare namespace UpdateManyHostsCommand {
72
40
  }, {
73
41
  configProfileUuid: string;
74
42
  configProfileInboundUuid: string;
75
- }>>;
76
- remark: z.ZodOptional<z.ZodString>;
77
- address: z.ZodOptional<z.ZodString>;
78
- port: z.ZodOptional<z.ZodNumber>;
79
- path: z.ZodOptional<z.ZodString>;
80
- sni: z.ZodOptional<z.ZodString>;
81
- host: z.ZodOptional<z.ZodString>;
82
- alpn: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
83
- readonly H3: "h3";
84
- readonly H2: "h2";
85
- readonly HTTP_1_1: "http/1.1";
86
- readonly H_COMBINED: "h2,http/1.1";
87
- readonly H3_H2_H1_COMBINED: "h3,h2,http/1.1";
88
- readonly H3_H2_COMBINED: "h3,h2";
89
43
  }>>>;
90
- fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
- isDisabled: z.ZodOptional<z.ZodBoolean>;
92
- securityLayer: z.ZodOptional<z.ZodNativeEnum<{
93
- readonly DEFAULT: "DEFAULT";
94
- readonly TLS: "TLS";
95
- readonly NONE: "NONE";
96
- }>>;
97
- xHttpExtraParams: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
98
- muxParams: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
99
- sockoptParams: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
100
- finalMask: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
101
- serverDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
103
- isHidden: z.ZodOptional<z.ZodBoolean>;
104
- overrideSniFromAddress: z.ZodOptional<z.ZodBoolean>;
105
- keepSniBlank: z.ZodOptional<z.ZodBoolean>;
106
- vlessRouteId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
107
- pinnedPeerCertSha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
- verifyPeerCertByName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
109
- shuffleHost: z.ZodOptional<z.ZodBoolean>;
110
- mihomoX25519: z.ZodOptional<z.ZodBoolean>;
111
- mihomoIpVersion: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
44
+ serverDescription: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
45
+ isHidden: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
46
+ overrideSniFromAddress: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
47
+ keepSniBlank: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
48
+ vlessRouteId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
49
+ pinnedPeerCertSha256: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
50
+ verifyPeerCertByName: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
51
+ shuffleHost: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
52
+ mihomoX25519: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
53
+ mihomoIpVersion: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
112
54
  readonly DUAL: "dual";
113
55
  readonly IPV4: "ipv4";
114
56
  readonly IPV6: "ipv6";
115
57
  readonly IPV4_PREFER: "ipv4-prefer";
116
58
  readonly IPV6_PREFER: "ipv6-prefer";
117
- }>>>;
118
- nodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
119
- xrayJsonTemplateUuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
- excludedInternalSquads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
121
- excludeFromSubscriptionTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
59
+ }>>>>;
60
+ xrayJsonTemplateUuid: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
61
+ excludedInternalSquads: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
62
+ excludeFromSubscriptionTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
122
63
  readonly XRAY_JSON: "XRAY_JSON";
123
64
  readonly XRAY_BASE64: "XRAY_BASE64";
124
65
  readonly MIHOMO: "MIHOMO";
125
66
  readonly STASH: "STASH";
126
67
  readonly CLASH: "CLASH";
127
68
  readonly SINGBOX: "SINGBOX";
128
- }>, "many">>;
129
- }, "uuid"> & {
69
+ }>, "many">>>;
70
+ } & {
130
71
  uuids: z.ZodArray<z.ZodString, "many">;
131
72
  }, "strip", z.ZodTypeAny, {
132
73
  uuids: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"update-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/update-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,0BAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -11,7 +11,9 @@ var UpdateManyHostsCommand;
11
11
  UpdateManyHostsCommand.url = api_1.REST_API.HOSTS.BULK.UPDATE;
12
12
  UpdateManyHostsCommand.TSQ_url = UpdateManyHostsCommand.url;
13
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({
14
+ UpdateManyHostsCommand.RequestSchema = update_command_1.UpdateHostCommand.RequestSchema.omit({ uuid: true })
15
+ .partial()
16
+ .extend({
15
17
  uuids: zod_1.z.array(zod_1.z.string().uuid()).min(1, 'Must be at least 1 host UUID'),
16
18
  });
17
19
  UpdateManyHostsCommand.ResponseSchema = zod_1.z.object({
@@ -419,6 +419,16 @@ export declare const ERRORS: {
419
419
  readonly message: "Delete hosts error";
420
420
  readonly httpCode: 500;
421
421
  };
422
+ readonly BULK_ENABLE_HOSTS_ERROR: {
423
+ readonly code: "A080";
424
+ readonly message: "Bulk enable hosts error";
425
+ readonly httpCode: 500;
426
+ };
427
+ readonly BULK_DISABLE_HOSTS_ERROR: {
428
+ readonly code: "A081";
429
+ readonly message: "Bulk disable hosts error";
430
+ readonly httpCode: 500;
431
+ };
422
432
  readonly BULK_DELETE_USERS_BY_UUID_ERROR: {
423
433
  readonly code: "A084";
424
434
  readonly message: "Bulk delete users by UUID error";
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA2qBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4J3B,CAAC"}
@@ -390,6 +390,16 @@ 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
+ },
393
403
  BULK_DELETE_USERS_BY_UUID_ERROR: {
394
404
  code: 'A084',
395
405
  message: 'Bulk delete users by UUID error',
@@ -13,6 +13,8 @@ exports.HOSTS_ROUTES = {
13
13
  REORDER: `${exports.HOST_ACTIONS_ROUTE}/reorder`,
14
14
  },
15
15
  BULK: {
16
+ ENABLE_HOSTS: 'bulk/enable',
17
+ DISABLE_HOSTS: 'bulk/disable',
16
18
  DELETE_HOSTS: 'bulk/delete',
17
19
  UPDATE: 'bulk/update',
18
20
  },
@@ -148,6 +148,8 @@ exports.REST_API = {
148
148
  REORDER: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.ACTIONS.REORDER}`,
149
149
  },
150
150
  BULK: {
151
+ ENABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.ENABLE_HOSTS}`,
152
+ DISABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DISABLE_HOSTS}`,
151
153
  DELETE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DELETE_HOSTS}`,
152
154
  UPDATE: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.UPDATE}`,
153
155
  },
@@ -0,0 +1,19 @@
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 = {}));
@@ -0,0 +1,19 @@
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 = {}));
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./delete-many-hosts.command"), exports);
18
+ __exportStar(require("./disable-many-hosts.command"), exports);
19
+ __exportStar(require("./enable-many-hosts.command"), exports);
18
20
  __exportStar(require("./update-many-hosts.command"), exports);
@@ -11,7 +11,9 @@ var UpdateManyHostsCommand;
11
11
  UpdateManyHostsCommand.url = api_1.REST_API.HOSTS.BULK.UPDATE;
12
12
  UpdateManyHostsCommand.TSQ_url = UpdateManyHostsCommand.url;
13
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({
14
+ UpdateManyHostsCommand.RequestSchema = update_command_1.UpdateHostCommand.RequestSchema.omit({ uuid: true })
15
+ .partial()
16
+ .extend({
15
17
  uuids: zod_1.z.array(zod_1.z.string().uuid()).min(1, 'Must be at least 1 host UUID'),
16
18
  });
17
19
  UpdateManyHostsCommand.ResponseSchema = zod_1.z.object({
@@ -390,6 +390,16 @@ 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
+ },
393
403
  BULK_DELETE_USERS_BY_UUID_ERROR: {
394
404
  code: 'A084',
395
405
  message: 'Bulk delete users by UUID error',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.8.11",
3
+ "version": "2.8.13",
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.",