@remnawave/backend-contract 0.3.35 → 0.3.36

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.
@@ -11,6 +11,7 @@ export declare const HOSTS_ROUTES: {
11
11
  readonly ENABLE_HOSTS: "bulk/enable";
12
12
  readonly DISABLE_HOSTS: "bulk/disable";
13
13
  readonly DELETE_HOSTS: "bulk/delete";
14
+ readonly SET_INBOUND: "bulk/set-inbound";
14
15
  };
15
16
  };
16
17
  //# 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;;;;;;;;;;;;;CAaf,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;;;;;;;;;;;;;;CAcf,CAAC"}
@@ -14,5 +14,6 @@ exports.HOSTS_ROUTES = {
14
14
  ENABLE_HOSTS: 'bulk/enable',
15
15
  DISABLE_HOSTS: 'bulk/disable',
16
16
  DELETE_HOSTS: 'bulk/delete',
17
+ SET_INBOUND: 'bulk/set-inbound',
17
18
  },
18
19
  };
@@ -81,6 +81,7 @@ export declare const REST_API: {
81
81
  readonly ENABLE_HOSTS: "/api/hosts/bulk/enable";
82
82
  readonly DISABLE_HOSTS: "/api/hosts/bulk/disable";
83
83
  readonly DELETE_HOSTS: "/api/hosts/bulk/delete";
84
+ readonly SET_INBOUND: "/api/hosts/bulk/set-inbound";
84
85
  };
85
86
  };
86
87
  readonly SYSTEM: {
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,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= {
118
118
  ENABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.ENABLE_HOSTS}`,
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
+ SET_INBOUND: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.SET_INBOUND}`,
121
122
  },
122
123
  },
123
124
  SYSTEM: {
@@ -1,4 +1,5 @@
1
1
  export * from './delete-many-hosts.command';
2
2
  export * from './disable-many-hosts.command';
3
3
  export * from './enable-many-hosts.command';
4
+ export * from './set-inbound-to-many-hosts.command';
4
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,8BAA8B,CAAC;AAC7C,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,qCAAqC,CAAC"}
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __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
+ __exportStar(require("./set-inbound-to-many-hosts.command"), exports);
@@ -0,0 +1,104 @@
1
+ import { z } from 'zod';
2
+ export declare namespace SetInboundToManyHostsCommand {
3
+ const url: "/api/hosts/bulk/set-inbound";
4
+ const TSQ_url: "/api/hosts/bulk/set-inbound";
5
+ const RequestSchema: z.ZodObject<{
6
+ uuids: z.ZodArray<z.ZodString, "many">;
7
+ inboundUuid: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ inboundUuid: string;
10
+ uuids: string[];
11
+ }, {
12
+ inboundUuid: string;
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-inbound-to-many-hosts.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-inbound-to-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/set-inbound-to-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,4BAA4B,CAAC;IACnC,MAAM,GAAG,+BAAkC,CAAC;IAC5C,MAAM,OAAO,+BAAM,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.SetInboundToManyHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var SetInboundToManyHostsCommand;
8
+ (function (SetInboundToManyHostsCommand) {
9
+ SetInboundToManyHostsCommand.url = api_1.REST_API.HOSTS.BULK.SET_INBOUND;
10
+ SetInboundToManyHostsCommand.TSQ_url = SetInboundToManyHostsCommand.url;
11
+ SetInboundToManyHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ inboundUuid: zod_1.z.string().uuid(),
14
+ });
15
+ SetInboundToManyHostsCommand.ResponseSchema = zod_1.z.object({
16
+ response: zod_1.z.array(models_1.HostsSchema),
17
+ });
18
+ })(SetInboundToManyHostsCommand || (exports.SetInboundToManyHostsCommand = SetInboundToManyHostsCommand = {}));
@@ -429,5 +429,10 @@ export declare const ERRORS: {
429
429
  readonly message: "Bulk disable hosts error";
430
430
  readonly httpCode: 500;
431
431
  };
432
+ readonly SET_INBOUND_TO_HOSTS_ERROR: {
433
+ readonly code: "A082";
434
+ readonly message: "Set inbound to hosts error";
435
+ readonly httpCode: 500;
436
+ };
432
437
  };
433
438
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkG3B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuG3B,CAAC"}
@@ -400,4 +400,9 @@ exports.ERRORS = {
400
400
  message: 'Bulk disable hosts error',
401
401
  httpCode: 500,
402
402
  },
403
+ SET_INBOUND_TO_HOSTS_ERROR: {
404
+ code: 'A082',
405
+ message: 'Set inbound to hosts error',
406
+ httpCode: 500,
407
+ },
403
408
  };
@@ -14,5 +14,6 @@ exports.HOSTS_ROUTES = {
14
14
  ENABLE_HOSTS: 'bulk/enable',
15
15
  DISABLE_HOSTS: 'bulk/disable',
16
16
  DELETE_HOSTS: 'bulk/delete',
17
+ SET_INBOUND: 'bulk/set-inbound',
17
18
  },
18
19
  };
@@ -118,6 +118,7 @@ exports.REST_API = {
118
118
  ENABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.ENABLE_HOSTS}`,
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
+ SET_INBOUND: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.SET_INBOUND}`,
121
122
  },
122
123
  },
123
124
  SYSTEM: {
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __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
+ __exportStar(require("./set-inbound-to-many-hosts.command"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetInboundToManyHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var SetInboundToManyHostsCommand;
8
+ (function (SetInboundToManyHostsCommand) {
9
+ SetInboundToManyHostsCommand.url = api_1.REST_API.HOSTS.BULK.SET_INBOUND;
10
+ SetInboundToManyHostsCommand.TSQ_url = SetInboundToManyHostsCommand.url;
11
+ SetInboundToManyHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ inboundUuid: zod_1.z.string().uuid(),
14
+ });
15
+ SetInboundToManyHostsCommand.ResponseSchema = zod_1.z.object({
16
+ response: zod_1.z.array(models_1.HostsSchema),
17
+ });
18
+ })(SetInboundToManyHostsCommand || (exports.SetInboundToManyHostsCommand = SetInboundToManyHostsCommand = {}));
@@ -400,4 +400,9 @@ exports.ERRORS = {
400
400
  message: 'Bulk disable hosts error',
401
401
  httpCode: 500,
402
402
  },
403
+ SET_INBOUND_TO_HOSTS_ERROR: {
404
+ code: 'A082',
405
+ message: 'Set inbound to hosts error',
406
+ httpCode: 500,
407
+ },
403
408
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.3.35",
3
+ "version": "0.3.36",
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.",