@remnawave/backend-contract 0.3.36 → 0.3.37

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.
@@ -12,6 +12,7 @@ export declare const HOSTS_ROUTES: {
12
12
  readonly DISABLE_HOSTS: "bulk/disable";
13
13
  readonly DELETE_HOSTS: "bulk/delete";
14
14
  readonly SET_INBOUND: "bulk/set-inbound";
15
+ readonly SET_PORT: "bulk/set-port";
15
16
  };
16
17
  };
17
18
  //# sourceMappingURL=hosts.d.ts.map
@@ -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,YAAY;;;;;;;;;;;;;;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,YAAY;;;;;;;;;;;;;;;CAef,CAAC"}
@@ -15,5 +15,6 @@ exports.HOSTS_ROUTES = {
15
15
  DISABLE_HOSTS: 'bulk/disable',
16
16
  DELETE_HOSTS: 'bulk/delete',
17
17
  SET_INBOUND: 'bulk/set-inbound',
18
+ SET_PORT: 'bulk/set-port',
18
19
  },
19
20
  };
@@ -82,6 +82,7 @@ export declare const REST_API: {
82
82
  readonly DISABLE_HOSTS: "/api/hosts/bulk/disable";
83
83
  readonly DELETE_HOSTS: "/api/hosts/bulk/delete";
84
84
  readonly SET_INBOUND: "/api/hosts/bulk/set-inbound";
85
+ readonly SET_PORT: "/api/hosts/bulk/set-port";
85
86
  };
86
87
  };
87
88
  readonly SYSTEM: {
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,E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DISABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DISABLE_HOSTS}`,
120
120
  DELETE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DELETE_HOSTS}`,
121
121
  SET_INBOUND: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.SET_INBOUND}`,
122
+ SET_PORT: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.SET_PORT}`,
122
123
  },
123
124
  },
124
125
  SYSTEM: {
@@ -2,4 +2,5 @@ export * from './delete-many-hosts.command';
2
2
  export * from './disable-many-hosts.command';
3
3
  export * from './enable-many-hosts.command';
4
4
  export * from './set-inbound-to-many-hosts.command';
5
+ export * from './set-port-to-many-hosts.command';
5
6
  //# 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,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,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,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC"}
@@ -18,3 +18,4 @@ __exportStar(require("./delete-many-hosts.command"), exports);
18
18
  __exportStar(require("./disable-many-hosts.command"), exports);
19
19
  __exportStar(require("./enable-many-hosts.command"), exports);
20
20
  __exportStar(require("./set-inbound-to-many-hosts.command"), exports);
21
+ __exportStar(require("./set-port-to-many-hosts.command"), exports);
@@ -0,0 +1,104 @@
1
+ import { z } from 'zod';
2
+ export declare namespace SetPortToManyHostsCommand {
3
+ const url: "/api/hosts/bulk/set-port";
4
+ const TSQ_url: "/api/hosts/bulk/set-port";
5
+ const RequestSchema: z.ZodObject<{
6
+ uuids: z.ZodArray<z.ZodString, "many">;
7
+ port: z.ZodNumber;
8
+ }, "strip", z.ZodTypeAny, {
9
+ port: number;
10
+ uuids: string[];
11
+ }, {
12
+ port: number;
13
+ uuids: string[];
14
+ }>;
15
+ type Request = z.infer<typeof RequestSchema>;
16
+ const ResponseSchema: z.ZodObject<{
17
+ response: z.ZodArray<z.ZodObject<{
18
+ uuid: z.ZodString;
19
+ inboundUuid: z.ZodString;
20
+ viewPosition: z.ZodNumber;
21
+ remark: z.ZodString;
22
+ address: z.ZodString;
23
+ port: z.ZodNumber;
24
+ path: z.ZodNullable<z.ZodString>;
25
+ sni: z.ZodNullable<z.ZodString>;
26
+ host: z.ZodNullable<z.ZodString>;
27
+ alpn: z.ZodNullable<z.ZodString>;
28
+ fingerprint: z.ZodNullable<z.ZodString>;
29
+ allowInsecure: z.ZodDefault<z.ZodBoolean>;
30
+ isDisabled: z.ZodDefault<z.ZodBoolean>;
31
+ securityLayer: z.ZodDefault<z.ZodNativeEnum<{
32
+ readonly DEFAULT: "DEFAULT";
33
+ readonly TLS: "TLS";
34
+ readonly NONE: "NONE";
35
+ }>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ uuid: string;
38
+ path: string | null;
39
+ port: number;
40
+ inboundUuid: string;
41
+ viewPosition: number;
42
+ remark: string;
43
+ address: string;
44
+ sni: string | null;
45
+ host: string | null;
46
+ alpn: string | null;
47
+ fingerprint: string | null;
48
+ allowInsecure: boolean;
49
+ isDisabled: boolean;
50
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
51
+ }, {
52
+ uuid: string;
53
+ path: string | null;
54
+ port: number;
55
+ inboundUuid: string;
56
+ viewPosition: number;
57
+ remark: string;
58
+ address: string;
59
+ sni: string | null;
60
+ host: string | null;
61
+ alpn: string | null;
62
+ fingerprint: string | null;
63
+ allowInsecure?: boolean | undefined;
64
+ isDisabled?: boolean | undefined;
65
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
66
+ }>, "many">;
67
+ }, "strip", z.ZodTypeAny, {
68
+ response: {
69
+ uuid: string;
70
+ path: string | null;
71
+ port: number;
72
+ inboundUuid: string;
73
+ viewPosition: number;
74
+ remark: string;
75
+ address: string;
76
+ sni: string | null;
77
+ host: string | null;
78
+ alpn: string | null;
79
+ fingerprint: string | null;
80
+ allowInsecure: boolean;
81
+ isDisabled: boolean;
82
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
83
+ }[];
84
+ }, {
85
+ response: {
86
+ uuid: string;
87
+ path: string | null;
88
+ port: number;
89
+ inboundUuid: string;
90
+ viewPosition: number;
91
+ remark: string;
92
+ address: string;
93
+ sni: string | null;
94
+ host: string | null;
95
+ alpn: string | null;
96
+ fingerprint: string | null;
97
+ allowInsecure?: boolean | undefined;
98
+ isDisabled?: boolean | undefined;
99
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
100
+ }[];
101
+ }>;
102
+ type Response = z.infer<typeof ResponseSchema>;
103
+ }
104
+ //# sourceMappingURL=set-port-to-many-hosts.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-port-to-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/set-port-to-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,GAAG,4BAA+B,CAAC;IACzC,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;MAGxB,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,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetPortToManyHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var SetPortToManyHostsCommand;
8
+ (function (SetPortToManyHostsCommand) {
9
+ SetPortToManyHostsCommand.url = api_1.REST_API.HOSTS.BULK.SET_PORT;
10
+ SetPortToManyHostsCommand.TSQ_url = SetPortToManyHostsCommand.url;
11
+ SetPortToManyHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ port: zod_1.z.number(),
14
+ });
15
+ SetPortToManyHostsCommand.ResponseSchema = zod_1.z.object({
16
+ response: zod_1.z.array(models_1.HostsSchema),
17
+ });
18
+ })(SetPortToManyHostsCommand || (exports.SetPortToManyHostsCommand = SetPortToManyHostsCommand = {}));
@@ -434,5 +434,10 @@ export declare const ERRORS: {
434
434
  readonly message: "Set inbound to hosts error";
435
435
  readonly httpCode: 500;
436
436
  };
437
+ readonly SET_PORT_TO_HOSTS_ERROR: {
438
+ readonly code: "A083";
439
+ readonly message: "Set port to hosts error";
440
+ readonly httpCode: 500;
441
+ };
437
442
  };
438
443
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuG3B,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4G3B,CAAC"}
@@ -405,4 +405,9 @@ exports.ERRORS = {
405
405
  message: 'Set inbound to hosts error',
406
406
  httpCode: 500,
407
407
  },
408
+ SET_PORT_TO_HOSTS_ERROR: {
409
+ code: 'A083',
410
+ message: 'Set port to hosts error',
411
+ httpCode: 500,
412
+ },
408
413
  };
@@ -15,5 +15,6 @@ exports.HOSTS_ROUTES = {
15
15
  DISABLE_HOSTS: 'bulk/disable',
16
16
  DELETE_HOSTS: 'bulk/delete',
17
17
  SET_INBOUND: 'bulk/set-inbound',
18
+ SET_PORT: 'bulk/set-port',
18
19
  },
19
20
  };
@@ -119,6 +119,7 @@ exports.REST_API = {
119
119
  DISABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DISABLE_HOSTS}`,
120
120
  DELETE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DELETE_HOSTS}`,
121
121
  SET_INBOUND: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.SET_INBOUND}`,
122
+ SET_PORT: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.SET_PORT}`,
122
123
  },
123
124
  },
124
125
  SYSTEM: {
@@ -18,3 +18,4 @@ __exportStar(require("./delete-many-hosts.command"), exports);
18
18
  __exportStar(require("./disable-many-hosts.command"), exports);
19
19
  __exportStar(require("./enable-many-hosts.command"), exports);
20
20
  __exportStar(require("./set-inbound-to-many-hosts.command"), exports);
21
+ __exportStar(require("./set-port-to-many-hosts.command"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetPortToManyHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var SetPortToManyHostsCommand;
8
+ (function (SetPortToManyHostsCommand) {
9
+ SetPortToManyHostsCommand.url = api_1.REST_API.HOSTS.BULK.SET_PORT;
10
+ SetPortToManyHostsCommand.TSQ_url = SetPortToManyHostsCommand.url;
11
+ SetPortToManyHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ port: zod_1.z.number(),
14
+ });
15
+ SetPortToManyHostsCommand.ResponseSchema = zod_1.z.object({
16
+ response: zod_1.z.array(models_1.HostsSchema),
17
+ });
18
+ })(SetPortToManyHostsCommand || (exports.SetPortToManyHostsCommand = SetPortToManyHostsCommand = {}));
@@ -405,4 +405,9 @@ exports.ERRORS = {
405
405
  message: 'Set inbound to hosts error',
406
406
  httpCode: 500,
407
407
  },
408
+ SET_PORT_TO_HOSTS_ERROR: {
409
+ code: 'A083',
410
+ message: 'Set port to hosts error',
411
+ httpCode: 500,
412
+ },
408
413
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
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.",