@remnawave/backend-contract 2.8.13 → 2.8.16

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/commands/hosts/bulk/delete-many-hosts.command.d.ts +21 -14
  2. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -1
  3. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +21 -14
  4. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -1
  5. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +21 -14
  6. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -1
  7. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts +31 -24
  8. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts.map +1 -1
  9. package/build/backend/commands/hosts/create.command.d.ts +30 -23
  10. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  11. package/build/backend/commands/hosts/create.command.js +16 -16
  12. package/build/backend/commands/hosts/get-all.command.d.ts +21 -14
  13. package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -1
  14. package/build/backend/commands/hosts/get-one.command.d.ts +21 -14
  15. package/build/backend/commands/hosts/get-one.command.d.ts.map +1 -1
  16. package/build/backend/commands/hosts/reorder.command.d.ts +11 -4
  17. package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -1
  18. package/build/backend/commands/hosts/update.command.d.ts +43 -29
  19. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  20. package/build/backend/commands/hosts/update.command.js +16 -16
  21. package/build/backend/constants/hosts/alpn.d.ts +1 -0
  22. package/build/backend/constants/hosts/alpn.d.ts.map +1 -1
  23. package/build/backend/models/hosts.schema.d.ts +16 -9
  24. package/build/backend/models/hosts.schema.d.ts.map +1 -1
  25. package/build/backend/models/hosts.schema.js +3 -3
  26. package/build/frontend/commands/hosts/create.command.js +16 -16
  27. package/build/frontend/commands/hosts/update.command.js +16 -16
  28. package/build/frontend/models/hosts.schema.js +3 -3
  29. package/package.json +1 -1
@@ -12,9 +12,16 @@ export declare namespace UpdateHostCommand {
12
12
  path: z.ZodNullable<z.ZodString>;
13
13
  sni: z.ZodNullable<z.ZodString>;
14
14
  host: z.ZodNullable<z.ZodString>;
15
- alpn: z.ZodNullable<z.ZodString>;
15
+ alpn: 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
+ }>>;
16
23
  fingerprint: z.ZodNullable<z.ZodString>;
17
- isDisabled: z.ZodDefault<z.ZodBoolean>;
24
+ isDisabled: z.ZodBoolean;
18
25
  securityLayer: z.ZodDefault<z.ZodNativeEnum<{
19
26
  readonly DEFAULT: "DEFAULT";
20
27
  readonly TLS: "TLS";
@@ -54,14 +61,14 @@ export declare namespace UpdateHostCommand {
54
61
  nodes: z.ZodArray<z.ZodString, "many">;
55
62
  xrayJsonTemplateUuid: z.ZodNullable<z.ZodString>;
56
63
  excludedInternalSquads: z.ZodArray<z.ZodString, "many">;
57
- excludeFromSubscriptionTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
64
+ excludeFromSubscriptionTypes: z.ZodArray<z.ZodNativeEnum<{
58
65
  readonly XRAY_JSON: "XRAY_JSON";
59
66
  readonly XRAY_BASE64: "XRAY_BASE64";
60
67
  readonly MIHOMO: "MIHOMO";
61
68
  readonly STASH: "STASH";
62
69
  readonly CLASH: "CLASH";
63
70
  readonly SINGBOX: "SINGBOX";
64
- }>, "many">>;
71
+ }>, "many">;
65
72
  }, "uuid"> & {
66
73
  inbound: z.ZodOptional<z.ZodObject<{
67
74
  configProfileUuid: z.ZodString;
@@ -76,9 +83,9 @@ export declare namespace UpdateHostCommand {
76
83
  remark: z.ZodOptional<z.ZodString>;
77
84
  address: z.ZodOptional<z.ZodString>;
78
85
  port: z.ZodOptional<z.ZodNumber>;
79
- path: z.ZodOptional<z.ZodString>;
80
- sni: z.ZodOptional<z.ZodString>;
81
- host: z.ZodOptional<z.ZodString>;
86
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ sni: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ host: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
89
  alpn: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
83
90
  readonly H3: "h3";
84
91
  readonly H2: "h2";
@@ -88,7 +95,7 @@ export declare namespace UpdateHostCommand {
88
95
  readonly H3_H2_COMBINED: "h3,h2";
89
96
  }>>>;
90
97
  fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
- isDisabled: z.ZodOptional<z.ZodBoolean>;
98
+ isDisabled: z.ZodDefault<z.ZodBoolean>;
92
99
  securityLayer: z.ZodOptional<z.ZodNativeEnum<{
93
100
  readonly DEFAULT: "DEFAULT";
94
101
  readonly TLS: "TLS";
@@ -128,17 +135,17 @@ export declare namespace UpdateHostCommand {
128
135
  }>, "many">>;
129
136
  }, "strip", z.ZodTypeAny, {
130
137
  uuid: string;
138
+ isDisabled: boolean;
131
139
  nodes?: string[] | undefined;
132
140
  tags?: string[] | undefined;
133
- path?: string | undefined;
141
+ path?: string | null | undefined;
134
142
  port?: number | undefined;
135
143
  remark?: string | undefined;
136
144
  address?: string | undefined;
137
- sni?: string | undefined;
138
- host?: string | undefined;
145
+ sni?: string | null | undefined;
146
+ host?: string | null | undefined;
139
147
  alpn?: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null | undefined;
140
148
  fingerprint?: string | null | undefined;
141
- isDisabled?: boolean | undefined;
142
149
  securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
143
150
  xHttpExtraParams?: unknown;
144
151
  muxParams?: unknown;
@@ -165,12 +172,12 @@ export declare namespace UpdateHostCommand {
165
172
  uuid: string;
166
173
  nodes?: string[] | undefined;
167
174
  tags?: string[] | undefined;
168
- path?: string | undefined;
175
+ path?: string | null | undefined;
169
176
  port?: number | undefined;
170
177
  remark?: string | undefined;
171
178
  address?: string | undefined;
172
- sni?: string | undefined;
173
- host?: string | undefined;
179
+ sni?: string | null | undefined;
180
+ host?: string | null | undefined;
174
181
  alpn?: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null | undefined;
175
182
  fingerprint?: string | null | undefined;
176
183
  isDisabled?: boolean | undefined;
@@ -208,9 +215,16 @@ export declare namespace UpdateHostCommand {
208
215
  path: z.ZodNullable<z.ZodString>;
209
216
  sni: z.ZodNullable<z.ZodString>;
210
217
  host: z.ZodNullable<z.ZodString>;
211
- alpn: z.ZodNullable<z.ZodString>;
218
+ alpn: z.ZodNullable<z.ZodNativeEnum<{
219
+ readonly H3: "h3";
220
+ readonly H2: "h2";
221
+ readonly HTTP_1_1: "http/1.1";
222
+ readonly H_COMBINED: "h2,http/1.1";
223
+ readonly H3_H2_H1_COMBINED: "h3,h2,http/1.1";
224
+ readonly H3_H2_COMBINED: "h3,h2";
225
+ }>>;
212
226
  fingerprint: z.ZodNullable<z.ZodString>;
213
- isDisabled: z.ZodDefault<z.ZodBoolean>;
227
+ isDisabled: z.ZodBoolean;
214
228
  securityLayer: z.ZodDefault<z.ZodNativeEnum<{
215
229
  readonly DEFAULT: "DEFAULT";
216
230
  readonly TLS: "TLS";
@@ -250,14 +264,14 @@ export declare namespace UpdateHostCommand {
250
264
  nodes: z.ZodArray<z.ZodString, "many">;
251
265
  xrayJsonTemplateUuid: z.ZodNullable<z.ZodString>;
252
266
  excludedInternalSquads: z.ZodArray<z.ZodString, "many">;
253
- excludeFromSubscriptionTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
267
+ excludeFromSubscriptionTypes: z.ZodArray<z.ZodNativeEnum<{
254
268
  readonly XRAY_JSON: "XRAY_JSON";
255
269
  readonly XRAY_BASE64: "XRAY_BASE64";
256
270
  readonly MIHOMO: "MIHOMO";
257
271
  readonly STASH: "STASH";
258
272
  readonly CLASH: "CLASH";
259
273
  readonly SINGBOX: "SINGBOX";
260
- }>, "many">>;
274
+ }>, "many">;
261
275
  }, "strip", z.ZodTypeAny, {
262
276
  nodes: string[];
263
277
  tags: string[];
@@ -269,7 +283,7 @@ export declare namespace UpdateHostCommand {
269
283
  address: string;
270
284
  sni: string | null;
271
285
  host: string | null;
272
- alpn: string | null;
286
+ alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
273
287
  fingerprint: string | null;
274
288
  isDisabled: boolean;
275
289
  securityLayer: "DEFAULT" | "TLS" | "NONE";
@@ -289,11 +303,11 @@ export declare namespace UpdateHostCommand {
289
303
  mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
290
304
  xrayJsonTemplateUuid: string | null;
291
305
  excludedInternalSquads: string[];
306
+ excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
292
307
  xHttpExtraParams?: unknown;
293
308
  muxParams?: unknown;
294
309
  sockoptParams?: unknown;
295
310
  finalMask?: unknown;
296
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
297
311
  }, {
298
312
  nodes: string[];
299
313
  path: string | null;
@@ -304,8 +318,9 @@ export declare namespace UpdateHostCommand {
304
318
  address: string;
305
319
  sni: string | null;
306
320
  host: string | null;
307
- alpn: string | null;
321
+ alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
308
322
  fingerprint: string | null;
323
+ isDisabled: boolean;
309
324
  inbound: {
310
325
  configProfileUuid: string | null;
311
326
  configProfileInboundUuid: string | null;
@@ -319,8 +334,8 @@ export declare namespace UpdateHostCommand {
319
334
  mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
320
335
  xrayJsonTemplateUuid: string | null;
321
336
  excludedInternalSquads: string[];
337
+ excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
322
338
  tags?: string[] | undefined;
323
- isDisabled?: boolean | undefined;
324
339
  securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
325
340
  xHttpExtraParams?: unknown;
326
341
  muxParams?: unknown;
@@ -329,7 +344,6 @@ export declare namespace UpdateHostCommand {
329
344
  isHidden?: boolean | undefined;
330
345
  overrideSniFromAddress?: boolean | undefined;
331
346
  keepSniBlank?: boolean | undefined;
332
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
333
347
  }>;
334
348
  }, "strip", z.ZodTypeAny, {
335
349
  response: {
@@ -343,7 +357,7 @@ export declare namespace UpdateHostCommand {
343
357
  address: string;
344
358
  sni: string | null;
345
359
  host: string | null;
346
- alpn: string | null;
360
+ alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
347
361
  fingerprint: string | null;
348
362
  isDisabled: boolean;
349
363
  securityLayer: "DEFAULT" | "TLS" | "NONE";
@@ -363,11 +377,11 @@ export declare namespace UpdateHostCommand {
363
377
  mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
364
378
  xrayJsonTemplateUuid: string | null;
365
379
  excludedInternalSquads: string[];
380
+ excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
366
381
  xHttpExtraParams?: unknown;
367
382
  muxParams?: unknown;
368
383
  sockoptParams?: unknown;
369
384
  finalMask?: unknown;
370
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
371
385
  };
372
386
  }, {
373
387
  response: {
@@ -380,8 +394,9 @@ export declare namespace UpdateHostCommand {
380
394
  address: string;
381
395
  sni: string | null;
382
396
  host: string | null;
383
- alpn: string | null;
397
+ alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
384
398
  fingerprint: string | null;
399
+ isDisabled: boolean;
385
400
  inbound: {
386
401
  configProfileUuid: string | null;
387
402
  configProfileInboundUuid: string | null;
@@ -395,8 +410,8 @@ export declare namespace UpdateHostCommand {
395
410
  mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
396
411
  xrayJsonTemplateUuid: string | null;
397
412
  excludedInternalSquads: string[];
413
+ excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
398
414
  tags?: string[] | undefined;
399
- isDisabled?: boolean | undefined;
400
415
  securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
401
416
  xHttpExtraParams?: unknown;
402
417
  muxParams?: unknown;
@@ -405,7 +420,6 @@ export declare namespace UpdateHostCommand {
405
420
  isHidden?: boolean | undefined;
406
421
  overrideSniFromAddress?: boolean | undefined;
407
422
  keepSniBlank?: boolean | undefined;
408
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
409
423
  };
410
424
  }>;
411
425
  type Response = z.infer<typeof ResponseSchema>;
@@ -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;AAYxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6ExB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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;AAYxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2ExB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -38,23 +38,23 @@ var UpdateHostCommand;
38
38
  })
39
39
  .int()
40
40
  .optional(),
41
- path: zod_1.z.optional(zod_1.z.string()),
42
- sni: zod_1.z.optional(zod_1.z.string()),
43
- host: zod_1.z.optional(zod_1.z.string()),
44
- alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
45
- fingerprint: zod_1.z.optional(zod_1.z.string().nullable()),
46
- isDisabled: zod_1.z.optional(zod_1.z.boolean()),
41
+ path: zod_1.z.string().nullish(),
42
+ sni: zod_1.z.string().nullish(),
43
+ host: zod_1.z.string().nullish(),
44
+ alpn: zod_1.z.nativeEnum(constants_1.ALPN).nullish(),
45
+ fingerprint: zod_1.z.string().nullish(),
46
+ isDisabled: zod_1.z.boolean().default(false),
47
47
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS)),
48
- xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
49
- muxParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
50
- sockoptParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
51
- finalMask: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
52
- serverDescription: zod_1.z.optional(zod_1.z
48
+ xHttpExtraParams: zod_1.z.unknown().nullish(),
49
+ muxParams: zod_1.z.unknown().nullish(),
50
+ sockoptParams: zod_1.z.unknown().nullish(),
51
+ finalMask: zod_1.z.unknown().nullish(),
52
+ serverDescription: zod_1.z
53
53
  .string()
54
54
  .max(30, {
55
55
  message: 'Server description must be less than 30 characters',
56
56
  })
57
- .nullable()),
57
+ .nullish(),
58
58
  tags: zod_1.z.optional(zod_1.z
59
59
  .array(zod_1.z
60
60
  .string()
@@ -65,13 +65,13 @@ var UpdateHostCommand;
65
65
  overrideSniFromAddress: zod_1.z.optional(zod_1.z.boolean()),
66
66
  keepSniBlank: zod_1.z.optional(zod_1.z.boolean()),
67
67
  vlessRouteId: zod_1.z.optional(zod_1.z.number().int().min(0).max(65535).nullable()),
68
- pinnedPeerCertSha256: zod_1.z.optional(zod_1.z.string().nullable()),
69
- verifyPeerCertByName: zod_1.z.optional(zod_1.z.string().nullable()),
68
+ pinnedPeerCertSha256: zod_1.z.string().nullish(),
69
+ verifyPeerCertByName: zod_1.z.string().nullish(),
70
70
  shuffleHost: zod_1.z.optional(zod_1.z.boolean()),
71
71
  mihomoX25519: zod_1.z.optional(zod_1.z.boolean()),
72
- mihomoIpVersion: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.MIHOMO_IP_VERSION).nullable()),
72
+ mihomoIpVersion: zod_1.z.nativeEnum(constants_1.MIHOMO_IP_VERSION).nullish(),
73
73
  nodes: zod_1.z.optional(zod_1.z.array(zod_1.z.string().uuid())),
74
- xrayJsonTemplateUuid: zod_1.z.optional(zod_1.z.string().uuid().nullable()),
74
+ xrayJsonTemplateUuid: zod_1.z.string().uuid().nullish(),
75
75
  excludedInternalSquads: zod_1.z
76
76
  .optional(zod_1.z.array(zod_1.z.string().uuid()))
77
77
  .describe('Optional. Internal squads from which the host will be excluded.'),
@@ -7,5 +7,6 @@ export declare const ALPN: {
7
7
  readonly H3_H2_COMBINED: "h3,h2";
8
8
  };
9
9
  export type TAlpn = [keyof typeof ALPN][number];
10
+ export type TAlpnValues = (typeof ALPN)[keyof typeof ALPN];
10
11
  export declare const ALPN_VALUES: ("h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2")[];
11
12
  //# sourceMappingURL=alpn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpn.d.ts","sourceRoot":"","sources":["../../../../constants/hosts/alpn.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;CAOP,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAChD,eAAO,MAAM,WAAW,2EAAsB,CAAC"}
1
+ {"version":3,"file":"alpn.d.ts","sourceRoot":"","sources":["../../../../constants/hosts/alpn.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;CAOP,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,CAAC;AAC3D,eAAO,MAAM,WAAW,2EAAsB,CAAC"}
@@ -8,9 +8,16 @@ export declare const HostsSchema: z.ZodObject<{
8
8
  path: z.ZodNullable<z.ZodString>;
9
9
  sni: z.ZodNullable<z.ZodString>;
10
10
  host: z.ZodNullable<z.ZodString>;
11
- alpn: z.ZodNullable<z.ZodString>;
11
+ alpn: z.ZodNullable<z.ZodNativeEnum<{
12
+ readonly H3: "h3";
13
+ readonly H2: "h2";
14
+ readonly HTTP_1_1: "http/1.1";
15
+ readonly H_COMBINED: "h2,http/1.1";
16
+ readonly H3_H2_H1_COMBINED: "h3,h2,http/1.1";
17
+ readonly H3_H2_COMBINED: "h3,h2";
18
+ }>>;
12
19
  fingerprint: z.ZodNullable<z.ZodString>;
13
- isDisabled: z.ZodDefault<z.ZodBoolean>;
20
+ isDisabled: z.ZodBoolean;
14
21
  securityLayer: z.ZodDefault<z.ZodNativeEnum<{
15
22
  readonly DEFAULT: "DEFAULT";
16
23
  readonly TLS: "TLS";
@@ -50,14 +57,14 @@ export declare const HostsSchema: z.ZodObject<{
50
57
  nodes: z.ZodArray<z.ZodString, "many">;
51
58
  xrayJsonTemplateUuid: z.ZodNullable<z.ZodString>;
52
59
  excludedInternalSquads: z.ZodArray<z.ZodString, "many">;
53
- excludeFromSubscriptionTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<{
60
+ excludeFromSubscriptionTypes: z.ZodArray<z.ZodNativeEnum<{
54
61
  readonly XRAY_JSON: "XRAY_JSON";
55
62
  readonly XRAY_BASE64: "XRAY_BASE64";
56
63
  readonly MIHOMO: "MIHOMO";
57
64
  readonly STASH: "STASH";
58
65
  readonly CLASH: "CLASH";
59
66
  readonly SINGBOX: "SINGBOX";
60
- }>, "many">>;
67
+ }>, "many">;
61
68
  }, "strip", z.ZodTypeAny, {
62
69
  nodes: string[];
63
70
  tags: string[];
@@ -69,7 +76,7 @@ export declare const HostsSchema: z.ZodObject<{
69
76
  address: string;
70
77
  sni: string | null;
71
78
  host: string | null;
72
- alpn: string | null;
79
+ alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
73
80
  fingerprint: string | null;
74
81
  isDisabled: boolean;
75
82
  securityLayer: "DEFAULT" | "TLS" | "NONE";
@@ -89,11 +96,11 @@ export declare const HostsSchema: z.ZodObject<{
89
96
  mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
90
97
  xrayJsonTemplateUuid: string | null;
91
98
  excludedInternalSquads: string[];
99
+ excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
92
100
  xHttpExtraParams?: unknown;
93
101
  muxParams?: unknown;
94
102
  sockoptParams?: unknown;
95
103
  finalMask?: unknown;
96
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
97
104
  }, {
98
105
  nodes: string[];
99
106
  path: string | null;
@@ -104,8 +111,9 @@ export declare const HostsSchema: z.ZodObject<{
104
111
  address: string;
105
112
  sni: string | null;
106
113
  host: string | null;
107
- alpn: string | null;
114
+ alpn: "h3" | "h2" | "http/1.1" | "h2,http/1.1" | "h3,h2,http/1.1" | "h3,h2" | null;
108
115
  fingerprint: string | null;
116
+ isDisabled: boolean;
109
117
  inbound: {
110
118
  configProfileUuid: string | null;
111
119
  configProfileInboundUuid: string | null;
@@ -119,8 +127,8 @@ export declare const HostsSchema: z.ZodObject<{
119
127
  mihomoIpVersion: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer" | null;
120
128
  xrayJsonTemplateUuid: string | null;
121
129
  excludedInternalSquads: string[];
130
+ excludeFromSubscriptionTypes: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[];
122
131
  tags?: string[] | undefined;
123
- isDisabled?: boolean | undefined;
124
132
  securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
125
133
  xHttpExtraParams?: unknown;
126
134
  muxParams?: unknown;
@@ -129,6 +137,5 @@ export declare const HostsSchema: z.ZodObject<{
129
137
  isHidden?: boolean | undefined;
130
138
  overrideSniFromAddress?: boolean | undefined;
131
139
  keepSniBlank?: boolean | undefined;
132
- excludeFromSubscriptionTypes?: ("STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64")[] | undefined;
133
140
  }>;
134
141
  //# sourceMappingURL=hosts.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hosts.schema.d.ts","sourceRoot":"","sources":["../../../models/hosts.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCtB,CAAC"}
1
+ {"version":3,"file":"hosts.schema.d.ts","sourceRoot":"","sources":["../../../models/hosts.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCtB,CAAC"}
@@ -13,9 +13,9 @@ exports.HostsSchema = zod_1.z.object({
13
13
  path: zod_1.z.string().nullable(),
14
14
  sni: zod_1.z.string().nullable(),
15
15
  host: zod_1.z.string().nullable(),
16
- alpn: zod_1.z.string().nullable(),
16
+ alpn: zod_1.z.nativeEnum(hosts_1.ALPN).nullable(),
17
17
  fingerprint: zod_1.z.string().nullable(),
18
- isDisabled: zod_1.z.boolean().default(false),
18
+ isDisabled: zod_1.z.boolean(),
19
19
  securityLayer: zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS).default(hosts_1.SECURITY_LAYERS.DEFAULT),
20
20
  xHttpExtraParams: zod_1.z.nullable(zod_1.z.unknown()),
21
21
  muxParams: zod_1.z.nullable(zod_1.z.unknown()),
@@ -39,5 +39,5 @@ exports.HostsSchema = zod_1.z.object({
39
39
  nodes: zod_1.z.array(zod_1.z.string().uuid()),
40
40
  xrayJsonTemplateUuid: zod_1.z.string().uuid().nullable(),
41
41
  excludedInternalSquads: zod_1.z.array(zod_1.z.string().uuid()),
42
- excludeFromSubscriptionTypes: zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)).optional(),
42
+ excludeFromSubscriptionTypes: zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)),
43
43
  });
@@ -33,23 +33,23 @@ var CreateHostCommand;
33
33
  invalid_type_error: 'Port must be an integer',
34
34
  })
35
35
  .int(),
36
- path: zod_1.z.string().optional(),
37
- sni: zod_1.z.string().optional(),
38
- host: zod_1.z.string().optional(),
39
- alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
40
- fingerprint: zod_1.z.optional(zod_1.z.string().nullable()),
36
+ path: zod_1.z.string().nullish(),
37
+ sni: zod_1.z.string().nullish(),
38
+ host: zod_1.z.string().nullish(),
39
+ alpn: zod_1.z.nativeEnum(constants_1.ALPN).nullish(),
40
+ fingerprint: zod_1.z.string().nullish(),
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
- xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
44
- muxParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
45
- sockoptParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
46
- finalMask: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
47
- serverDescription: zod_1.z.optional(zod_1.z
43
+ xHttpExtraParams: zod_1.z.unknown().nullish(),
44
+ muxParams: zod_1.z.unknown().nullish(),
45
+ sockoptParams: zod_1.z.unknown().nullish(),
46
+ finalMask: zod_1.z.unknown().nullish(),
47
+ serverDescription: zod_1.z
48
48
  .string()
49
49
  .max(30, {
50
50
  message: 'Server description must be less than 30 characters',
51
51
  })
52
- .nullable()),
52
+ .nullish(),
53
53
  tags: zod_1.z.optional(zod_1.z
54
54
  .array(zod_1.z
55
55
  .string()
@@ -59,14 +59,14 @@ var CreateHostCommand;
59
59
  isHidden: zod_1.z.optional(zod_1.z.boolean().default(false)),
60
60
  overrideSniFromAddress: zod_1.z.optional(zod_1.z.boolean().default(false)),
61
61
  keepSniBlank: zod_1.z.optional(zod_1.z.boolean().default(false)),
62
- pinnedPeerCertSha256: zod_1.z.optional(zod_1.z.string().nullable()),
63
- verifyPeerCertByName: zod_1.z.optional(zod_1.z.string().nullable()),
64
- vlessRouteId: zod_1.z.optional(zod_1.z.number().int().min(0).max(65535).nullable()),
62
+ pinnedPeerCertSha256: zod_1.z.string().nullish(),
63
+ verifyPeerCertByName: zod_1.z.string().nullish(),
64
+ vlessRouteId: zod_1.z.number().int().min(0).max(65535).nullish(),
65
65
  shuffleHost: zod_1.z.optional(zod_1.z.boolean().default(false)),
66
66
  mihomoX25519: zod_1.z.optional(zod_1.z.boolean().default(false)),
67
- mihomoIpVersion: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.MIHOMO_IP_VERSION).nullable()),
67
+ mihomoIpVersion: zod_1.z.nativeEnum(constants_1.MIHOMO_IP_VERSION).nullish(),
68
68
  nodes: zod_1.z.optional(zod_1.z.array(zod_1.z.string().uuid())),
69
- xrayJsonTemplateUuid: zod_1.z.optional(zod_1.z.string().uuid().nullable()),
69
+ xrayJsonTemplateUuid: zod_1.z.string().uuid().nullish(),
70
70
  excludedInternalSquads: zod_1.z
71
71
  .optional(zod_1.z.array(zod_1.z.string().uuid()))
72
72
  .describe('Optional. Internal squads from which the host will be excluded.'),
@@ -38,23 +38,23 @@ var UpdateHostCommand;
38
38
  })
39
39
  .int()
40
40
  .optional(),
41
- path: zod_1.z.optional(zod_1.z.string()),
42
- sni: zod_1.z.optional(zod_1.z.string()),
43
- host: zod_1.z.optional(zod_1.z.string()),
44
- alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
45
- fingerprint: zod_1.z.optional(zod_1.z.string().nullable()),
46
- isDisabled: zod_1.z.optional(zod_1.z.boolean()),
41
+ path: zod_1.z.string().nullish(),
42
+ sni: zod_1.z.string().nullish(),
43
+ host: zod_1.z.string().nullish(),
44
+ alpn: zod_1.z.nativeEnum(constants_1.ALPN).nullish(),
45
+ fingerprint: zod_1.z.string().nullish(),
46
+ isDisabled: zod_1.z.boolean().default(false),
47
47
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS)),
48
- xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
49
- muxParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
50
- sockoptParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
51
- finalMask: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
52
- serverDescription: zod_1.z.optional(zod_1.z
48
+ xHttpExtraParams: zod_1.z.unknown().nullish(),
49
+ muxParams: zod_1.z.unknown().nullish(),
50
+ sockoptParams: zod_1.z.unknown().nullish(),
51
+ finalMask: zod_1.z.unknown().nullish(),
52
+ serverDescription: zod_1.z
53
53
  .string()
54
54
  .max(30, {
55
55
  message: 'Server description must be less than 30 characters',
56
56
  })
57
- .nullable()),
57
+ .nullish(),
58
58
  tags: zod_1.z.optional(zod_1.z
59
59
  .array(zod_1.z
60
60
  .string()
@@ -65,13 +65,13 @@ var UpdateHostCommand;
65
65
  overrideSniFromAddress: zod_1.z.optional(zod_1.z.boolean()),
66
66
  keepSniBlank: zod_1.z.optional(zod_1.z.boolean()),
67
67
  vlessRouteId: zod_1.z.optional(zod_1.z.number().int().min(0).max(65535).nullable()),
68
- pinnedPeerCertSha256: zod_1.z.optional(zod_1.z.string().nullable()),
69
- verifyPeerCertByName: zod_1.z.optional(zod_1.z.string().nullable()),
68
+ pinnedPeerCertSha256: zod_1.z.string().nullish(),
69
+ verifyPeerCertByName: zod_1.z.string().nullish(),
70
70
  shuffleHost: zod_1.z.optional(zod_1.z.boolean()),
71
71
  mihomoX25519: zod_1.z.optional(zod_1.z.boolean()),
72
- mihomoIpVersion: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.MIHOMO_IP_VERSION).nullable()),
72
+ mihomoIpVersion: zod_1.z.nativeEnum(constants_1.MIHOMO_IP_VERSION).nullish(),
73
73
  nodes: zod_1.z.optional(zod_1.z.array(zod_1.z.string().uuid())),
74
- xrayJsonTemplateUuid: zod_1.z.optional(zod_1.z.string().uuid().nullable()),
74
+ xrayJsonTemplateUuid: zod_1.z.string().uuid().nullish(),
75
75
  excludedInternalSquads: zod_1.z
76
76
  .optional(zod_1.z.array(zod_1.z.string().uuid()))
77
77
  .describe('Optional. Internal squads from which the host will be excluded.'),
@@ -13,9 +13,9 @@ exports.HostsSchema = zod_1.z.object({
13
13
  path: zod_1.z.string().nullable(),
14
14
  sni: zod_1.z.string().nullable(),
15
15
  host: zod_1.z.string().nullable(),
16
- alpn: zod_1.z.string().nullable(),
16
+ alpn: zod_1.z.nativeEnum(hosts_1.ALPN).nullable(),
17
17
  fingerprint: zod_1.z.string().nullable(),
18
- isDisabled: zod_1.z.boolean().default(false),
18
+ isDisabled: zod_1.z.boolean(),
19
19
  securityLayer: zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS).default(hosts_1.SECURITY_LAYERS.DEFAULT),
20
20
  xHttpExtraParams: zod_1.z.nullable(zod_1.z.unknown()),
21
21
  muxParams: zod_1.z.nullable(zod_1.z.unknown()),
@@ -39,5 +39,5 @@ exports.HostsSchema = zod_1.z.object({
39
39
  nodes: zod_1.z.array(zod_1.z.string().uuid()),
40
40
  xrayJsonTemplateUuid: zod_1.z.string().uuid().nullable(),
41
41
  excludedInternalSquads: zod_1.z.array(zod_1.z.string().uuid()),
42
- excludeFromSubscriptionTypes: zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)).optional(),
42
+ excludeFromSubscriptionTypes: zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)),
43
43
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.8.13",
3
+ "version": "2.8.16",
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.",