@remnawave/backend-contract 0.3.34 → 0.3.35

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 (33) hide show
  1. package/build/backend/api/controllers/hosts.d.ts +5 -0
  2. package/build/backend/api/controllers/hosts.d.ts.map +1 -1
  3. package/build/backend/api/controllers/hosts.js +5 -0
  4. package/build/backend/api/routes.d.ts +5 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +5 -0
  7. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts +101 -0
  8. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -0
  9. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.js +17 -0
  10. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +101 -0
  11. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -0
  12. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.js +17 -0
  13. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +101 -0
  14. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -0
  15. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.js +17 -0
  16. package/build/backend/commands/hosts/bulk/index.d.ts +4 -0
  17. package/build/backend/commands/hosts/bulk/index.d.ts.map +1 -0
  18. package/build/backend/commands/hosts/bulk/index.js +19 -0
  19. package/build/backend/commands/hosts/index.d.ts +1 -0
  20. package/build/backend/commands/hosts/index.d.ts.map +1 -1
  21. package/build/backend/commands/hosts/index.js +1 -0
  22. package/build/backend/constants/errors/errors.d.ts +30 -0
  23. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  24. package/build/backend/constants/errors/errors.js +30 -0
  25. package/build/frontend/api/controllers/hosts.js +5 -0
  26. package/build/frontend/api/routes.js +5 -0
  27. package/build/frontend/commands/hosts/bulk/delete-many-hosts.command.js +17 -0
  28. package/build/frontend/commands/hosts/bulk/disable-many-hosts.command.js +17 -0
  29. package/build/frontend/commands/hosts/bulk/enable-many-hosts.command.js +17 -0
  30. package/build/frontend/commands/hosts/bulk/index.js +19 -0
  31. package/build/frontend/commands/hosts/index.js +1 -0
  32. package/build/frontend/constants/errors/errors.js +30 -0
  33. package/package.json +1 -1
@@ -7,5 +7,10 @@ export declare const HOSTS_ROUTES: {
7
7
  readonly UPDATE_MANY: "many";
8
8
  readonly REORDER: "reorder";
9
9
  readonly GET_ONE: "get-one";
10
+ readonly BULK: {
11
+ readonly ENABLE_HOSTS: "bulk/enable";
12
+ readonly DISABLE_HOSTS: "bulk/disable";
13
+ readonly DELETE_HOSTS: "bulk/delete";
14
+ };
10
15
  };
11
16
  //# 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;;;;;;;;CAQf,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;;;;;;;;;;;;;CAaf,CAAC"}
@@ -10,4 +10,9 @@ exports.HOSTS_ROUTES = {
10
10
  UPDATE_MANY: 'many',
11
11
  REORDER: 'reorder',
12
12
  GET_ONE: 'get-one',
13
+ BULK: {
14
+ ENABLE_HOSTS: 'bulk/enable',
15
+ DISABLE_HOSTS: 'bulk/disable',
16
+ DELETE_HOSTS: 'bulk/delete',
17
+ },
13
18
  };
@@ -77,6 +77,11 @@ export declare const REST_API: {
77
77
  readonly REORDER: "/api/hosts/reorder";
78
78
  readonly DELETE: (uuid: string) => string;
79
79
  readonly GET_ONE: (uuid: string) => string;
80
+ readonly BULK: {
81
+ readonly ENABLE_HOSTS: "/api/hosts/bulk/enable";
82
+ readonly DISABLE_HOSTS: "/api/hosts/bulk/disable";
83
+ readonly DELETE_HOSTS: "/api/hosts/bulk/delete";
84
+ };
80
85
  };
81
86
  readonly SYSTEM: {
82
87
  readonly STATS: "/api/system/stats";
@@ -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,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;kDAeY,MAAM;;;;;;;;;;qCAWnB,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;kDAKA,MAAM;uCAEjB,MAAM;;;kCAIX,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;0CASG,MAAM;;;;;;;CAQ7B,CAAC"}
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,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;kDAeY,MAAM;;;;;;;;;;qCAWnB,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;kDAKA,MAAM;uCAEjB,MAAM;;;kCAIX,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;;;;;;0CAcG,MAAM;;;;;;;CAQ7B,CAAC"}
@@ -114,6 +114,11 @@ exports.REST_API = {
114
114
  REORDER: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.REORDER}`,
115
115
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.DELETE}/${uuid}`,
116
116
  GET_ONE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.GET_ONE}/${uuid}`,
117
+ BULK: {
118
+ ENABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.ENABLE_HOSTS}`,
119
+ DISABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DISABLE_HOSTS}`,
120
+ DELETE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DELETE_HOSTS}`,
121
+ },
117
122
  },
118
123
  SYSTEM: {
119
124
  STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS}`,
@@ -0,0 +1,101 @@
1
+ import { z } from 'zod';
2
+ export declare namespace BulkDeleteHostsCommand {
3
+ const url: "/api/hosts/bulk/delete";
4
+ const TSQ_url: "/api/hosts/bulk/delete";
5
+ const RequestSchema: z.ZodObject<{
6
+ uuids: z.ZodArray<z.ZodString, "many">;
7
+ }, "strip", z.ZodTypeAny, {
8
+ uuids: string[];
9
+ }, {
10
+ uuids: string[];
11
+ }>;
12
+ type Request = z.infer<typeof RequestSchema>;
13
+ const ResponseSchema: z.ZodObject<{
14
+ response: z.ZodArray<z.ZodObject<{
15
+ uuid: z.ZodString;
16
+ inboundUuid: 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
+ allowInsecure: z.ZodDefault<z.ZodBoolean>;
27
+ isDisabled: z.ZodDefault<z.ZodBoolean>;
28
+ securityLayer: z.ZodDefault<z.ZodNativeEnum<{
29
+ readonly DEFAULT: "DEFAULT";
30
+ readonly TLS: "TLS";
31
+ readonly NONE: "NONE";
32
+ }>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ uuid: string;
35
+ path: string | null;
36
+ port: number;
37
+ inboundUuid: string;
38
+ viewPosition: number;
39
+ remark: string;
40
+ address: string;
41
+ sni: string | null;
42
+ host: string | null;
43
+ alpn: string | null;
44
+ fingerprint: string | null;
45
+ allowInsecure: boolean;
46
+ isDisabled: boolean;
47
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
48
+ }, {
49
+ uuid: string;
50
+ path: string | null;
51
+ port: number;
52
+ inboundUuid: string;
53
+ viewPosition: number;
54
+ remark: string;
55
+ address: string;
56
+ sni: string | null;
57
+ host: string | null;
58
+ alpn: string | null;
59
+ fingerprint: string | null;
60
+ allowInsecure?: boolean | undefined;
61
+ isDisabled?: boolean | undefined;
62
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
63
+ }>, "many">;
64
+ }, "strip", z.ZodTypeAny, {
65
+ response: {
66
+ uuid: string;
67
+ path: string | null;
68
+ port: number;
69
+ inboundUuid: string;
70
+ viewPosition: number;
71
+ remark: string;
72
+ address: string;
73
+ sni: string | null;
74
+ host: string | null;
75
+ alpn: string | null;
76
+ fingerprint: string | null;
77
+ allowInsecure: boolean;
78
+ isDisabled: boolean;
79
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
80
+ }[];
81
+ }, {
82
+ response: {
83
+ uuid: string;
84
+ path: string | null;
85
+ port: number;
86
+ inboundUuid: string;
87
+ viewPosition: number;
88
+ remark: string;
89
+ address: string;
90
+ sni: string | null;
91
+ host: string | null;
92
+ alpn: string | null;
93
+ fingerprint: string | null;
94
+ allowInsecure?: boolean | undefined;
95
+ isDisabled?: boolean | undefined;
96
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
97
+ }[];
98
+ }>;
99
+ type Response = z.infer<typeof ResponseSchema>;
100
+ }
101
+ //# sourceMappingURL=delete-many-hosts.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/delete-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAAmC,CAAC;IAC7C,MAAM,OAAO,0BAAM,CAAC;IAEpB,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,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkDeleteHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var BulkDeleteHostsCommand;
8
+ (function (BulkDeleteHostsCommand) {
9
+ BulkDeleteHostsCommand.url = api_1.REST_API.HOSTS.BULK.DELETE_HOSTS;
10
+ BulkDeleteHostsCommand.TSQ_url = BulkDeleteHostsCommand.url;
11
+ BulkDeleteHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ });
14
+ BulkDeleteHostsCommand.ResponseSchema = zod_1.z.object({
15
+ response: zod_1.z.array(models_1.HostsSchema),
16
+ });
17
+ })(BulkDeleteHostsCommand || (exports.BulkDeleteHostsCommand = BulkDeleteHostsCommand = {}));
@@ -0,0 +1,101 @@
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 RequestSchema: z.ZodObject<{
6
+ uuids: z.ZodArray<z.ZodString, "many">;
7
+ }, "strip", z.ZodTypeAny, {
8
+ uuids: string[];
9
+ }, {
10
+ uuids: string[];
11
+ }>;
12
+ type Request = z.infer<typeof RequestSchema>;
13
+ const ResponseSchema: z.ZodObject<{
14
+ response: z.ZodArray<z.ZodObject<{
15
+ uuid: z.ZodString;
16
+ inboundUuid: 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
+ allowInsecure: z.ZodDefault<z.ZodBoolean>;
27
+ isDisabled: z.ZodDefault<z.ZodBoolean>;
28
+ securityLayer: z.ZodDefault<z.ZodNativeEnum<{
29
+ readonly DEFAULT: "DEFAULT";
30
+ readonly TLS: "TLS";
31
+ readonly NONE: "NONE";
32
+ }>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ uuid: string;
35
+ path: string | null;
36
+ port: number;
37
+ inboundUuid: string;
38
+ viewPosition: number;
39
+ remark: string;
40
+ address: string;
41
+ sni: string | null;
42
+ host: string | null;
43
+ alpn: string | null;
44
+ fingerprint: string | null;
45
+ allowInsecure: boolean;
46
+ isDisabled: boolean;
47
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
48
+ }, {
49
+ uuid: string;
50
+ path: string | null;
51
+ port: number;
52
+ inboundUuid: string;
53
+ viewPosition: number;
54
+ remark: string;
55
+ address: string;
56
+ sni: string | null;
57
+ host: string | null;
58
+ alpn: string | null;
59
+ fingerprint: string | null;
60
+ allowInsecure?: boolean | undefined;
61
+ isDisabled?: boolean | undefined;
62
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
63
+ }>, "many">;
64
+ }, "strip", z.ZodTypeAny, {
65
+ response: {
66
+ uuid: string;
67
+ path: string | null;
68
+ port: number;
69
+ inboundUuid: string;
70
+ viewPosition: number;
71
+ remark: string;
72
+ address: string;
73
+ sni: string | null;
74
+ host: string | null;
75
+ alpn: string | null;
76
+ fingerprint: string | null;
77
+ allowInsecure: boolean;
78
+ isDisabled: boolean;
79
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
80
+ }[];
81
+ }, {
82
+ response: {
83
+ uuid: string;
84
+ path: string | null;
85
+ port: number;
86
+ inboundUuid: string;
87
+ viewPosition: number;
88
+ remark: string;
89
+ address: string;
90
+ sni: string | null;
91
+ host: string | null;
92
+ alpn: string | null;
93
+ fingerprint: string | null;
94
+ allowInsecure?: boolean | undefined;
95
+ isDisabled?: boolean | undefined;
96
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
97
+ }[];
98
+ }>;
99
+ type Response = z.infer<typeof ResponseSchema>;
100
+ }
101
+ //# 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;AAKxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,2BAAoC,CAAC;IAC9C,MAAM,OAAO,2BAAM,CAAC;IAEpB,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,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkDisableHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var BulkDisableHostsCommand;
8
+ (function (BulkDisableHostsCommand) {
9
+ BulkDisableHostsCommand.url = api_1.REST_API.HOSTS.BULK.DISABLE_HOSTS;
10
+ BulkDisableHostsCommand.TSQ_url = BulkDisableHostsCommand.url;
11
+ BulkDisableHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ });
14
+ BulkDisableHostsCommand.ResponseSchema = zod_1.z.object({
15
+ response: zod_1.z.array(models_1.HostsSchema),
16
+ });
17
+ })(BulkDisableHostsCommand || (exports.BulkDisableHostsCommand = BulkDisableHostsCommand = {}));
@@ -0,0 +1,101 @@
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 RequestSchema: z.ZodObject<{
6
+ uuids: z.ZodArray<z.ZodString, "many">;
7
+ }, "strip", z.ZodTypeAny, {
8
+ uuids: string[];
9
+ }, {
10
+ uuids: string[];
11
+ }>;
12
+ type Request = z.infer<typeof RequestSchema>;
13
+ const ResponseSchema: z.ZodObject<{
14
+ response: z.ZodArray<z.ZodObject<{
15
+ uuid: z.ZodString;
16
+ inboundUuid: 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
+ allowInsecure: z.ZodDefault<z.ZodBoolean>;
27
+ isDisabled: z.ZodDefault<z.ZodBoolean>;
28
+ securityLayer: z.ZodDefault<z.ZodNativeEnum<{
29
+ readonly DEFAULT: "DEFAULT";
30
+ readonly TLS: "TLS";
31
+ readonly NONE: "NONE";
32
+ }>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ uuid: string;
35
+ path: string | null;
36
+ port: number;
37
+ inboundUuid: string;
38
+ viewPosition: number;
39
+ remark: string;
40
+ address: string;
41
+ sni: string | null;
42
+ host: string | null;
43
+ alpn: string | null;
44
+ fingerprint: string | null;
45
+ allowInsecure: boolean;
46
+ isDisabled: boolean;
47
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
48
+ }, {
49
+ uuid: string;
50
+ path: string | null;
51
+ port: number;
52
+ inboundUuid: string;
53
+ viewPosition: number;
54
+ remark: string;
55
+ address: string;
56
+ sni: string | null;
57
+ host: string | null;
58
+ alpn: string | null;
59
+ fingerprint: string | null;
60
+ allowInsecure?: boolean | undefined;
61
+ isDisabled?: boolean | undefined;
62
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
63
+ }>, "many">;
64
+ }, "strip", z.ZodTypeAny, {
65
+ response: {
66
+ uuid: string;
67
+ path: string | null;
68
+ port: number;
69
+ inboundUuid: string;
70
+ viewPosition: number;
71
+ remark: string;
72
+ address: string;
73
+ sni: string | null;
74
+ host: string | null;
75
+ alpn: string | null;
76
+ fingerprint: string | null;
77
+ allowInsecure: boolean;
78
+ isDisabled: boolean;
79
+ securityLayer: "DEFAULT" | "TLS" | "NONE";
80
+ }[];
81
+ }, {
82
+ response: {
83
+ uuid: string;
84
+ path: string | null;
85
+ port: number;
86
+ inboundUuid: string;
87
+ viewPosition: number;
88
+ remark: string;
89
+ address: string;
90
+ sni: string | null;
91
+ host: string | null;
92
+ alpn: string | null;
93
+ fingerprint: string | null;
94
+ allowInsecure?: boolean | undefined;
95
+ isDisabled?: boolean | undefined;
96
+ securityLayer?: "DEFAULT" | "TLS" | "NONE" | undefined;
97
+ }[];
98
+ }>;
99
+ type Response = z.infer<typeof ResponseSchema>;
100
+ }
101
+ //# 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;AAKxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAAmC,CAAC;IAC7C,MAAM,OAAO,0BAAM,CAAC;IAEpB,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,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkEnableHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var BulkEnableHostsCommand;
8
+ (function (BulkEnableHostsCommand) {
9
+ BulkEnableHostsCommand.url = api_1.REST_API.HOSTS.BULK.ENABLE_HOSTS;
10
+ BulkEnableHostsCommand.TSQ_url = BulkEnableHostsCommand.url;
11
+ BulkEnableHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ });
14
+ BulkEnableHostsCommand.ResponseSchema = zod_1.z.object({
15
+ response: zod_1.z.array(models_1.HostsSchema),
16
+ });
17
+ })(BulkEnableHostsCommand || (exports.BulkEnableHostsCommand = BulkEnableHostsCommand = {}));
@@ -0,0 +1,4 @@
1
+ export * from './delete-many-hosts.command';
2
+ export * from './disable-many-hosts.command';
3
+ export * from './enable-many-hosts.command';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./delete-many-hosts.command"), exports);
18
+ __exportStar(require("./disable-many-hosts.command"), exports);
19
+ __exportStar(require("./enable-many-hosts.command"), exports);
@@ -1,3 +1,4 @@
1
+ export * from './bulk';
1
2
  export * from './create.command';
2
3
  export * from './delete.command';
3
4
  export * from './get-all.command';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./bulk"), exports);
17
18
  __exportStar(require("./create.command"), exports);
18
19
  __exportStar(require("./delete.command"), exports);
19
20
  __exportStar(require("./get-all.command"), exports);
@@ -399,5 +399,35 @@ export declare const ERRORS: {
399
399
  readonly message: "Remove inbound from users error";
400
400
  readonly httpCode: 500;
401
401
  };
402
+ readonly INBOUND_NOT_FOUND: {
403
+ readonly code: "A076";
404
+ readonly message: "Inbound not found";
405
+ readonly httpCode: 404;
406
+ };
407
+ readonly ADD_INBOUND_TO_NODES_ERROR: {
408
+ readonly code: "A077";
409
+ readonly message: "Add inbound to nodes error";
410
+ readonly httpCode: 500;
411
+ };
412
+ readonly REMOVE_INBOUND_FROM_NODES_ERROR: {
413
+ readonly code: "A078";
414
+ readonly message: "Remove inbound from nodes error";
415
+ readonly httpCode: 500;
416
+ };
417
+ readonly DELETE_HOSTS_ERROR: {
418
+ readonly code: "A079";
419
+ readonly message: "Delete hosts error";
420
+ readonly httpCode: 500;
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
+ };
402
432
  };
403
433
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoE3B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkG3B,CAAC"}
@@ -370,4 +370,34 @@ exports.ERRORS = {
370
370
  message: 'Remove inbound from users error',
371
371
  httpCode: 500,
372
372
  },
373
+ INBOUND_NOT_FOUND: {
374
+ code: 'A076',
375
+ message: 'Inbound not found',
376
+ httpCode: 404,
377
+ },
378
+ ADD_INBOUND_TO_NODES_ERROR: {
379
+ code: 'A077',
380
+ message: 'Add inbound to nodes error',
381
+ httpCode: 500,
382
+ },
383
+ REMOVE_INBOUND_FROM_NODES_ERROR: {
384
+ code: 'A078',
385
+ message: 'Remove inbound from nodes error',
386
+ httpCode: 500,
387
+ },
388
+ DELETE_HOSTS_ERROR: {
389
+ code: 'A079',
390
+ message: 'Delete hosts error',
391
+ httpCode: 500,
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
+ },
373
403
  };
@@ -10,4 +10,9 @@ exports.HOSTS_ROUTES = {
10
10
  UPDATE_MANY: 'many',
11
11
  REORDER: 'reorder',
12
12
  GET_ONE: 'get-one',
13
+ BULK: {
14
+ ENABLE_HOSTS: 'bulk/enable',
15
+ DISABLE_HOSTS: 'bulk/disable',
16
+ DELETE_HOSTS: 'bulk/delete',
17
+ },
13
18
  };
@@ -114,6 +114,11 @@ exports.REST_API = {
114
114
  REORDER: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.REORDER}`,
115
115
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.DELETE}/${uuid}`,
116
116
  GET_ONE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.GET_ONE}/${uuid}`,
117
+ BULK: {
118
+ ENABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.ENABLE_HOSTS}`,
119
+ DISABLE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DISABLE_HOSTS}`,
120
+ DELETE_HOSTS: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.BULK.DELETE_HOSTS}`,
121
+ },
117
122
  },
118
123
  SYSTEM: {
119
124
  STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS}`,
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkDeleteHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var BulkDeleteHostsCommand;
8
+ (function (BulkDeleteHostsCommand) {
9
+ BulkDeleteHostsCommand.url = api_1.REST_API.HOSTS.BULK.DELETE_HOSTS;
10
+ BulkDeleteHostsCommand.TSQ_url = BulkDeleteHostsCommand.url;
11
+ BulkDeleteHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ });
14
+ BulkDeleteHostsCommand.ResponseSchema = zod_1.z.object({
15
+ response: zod_1.z.array(models_1.HostsSchema),
16
+ });
17
+ })(BulkDeleteHostsCommand || (exports.BulkDeleteHostsCommand = BulkDeleteHostsCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkDisableHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var BulkDisableHostsCommand;
8
+ (function (BulkDisableHostsCommand) {
9
+ BulkDisableHostsCommand.url = api_1.REST_API.HOSTS.BULK.DISABLE_HOSTS;
10
+ BulkDisableHostsCommand.TSQ_url = BulkDisableHostsCommand.url;
11
+ BulkDisableHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ });
14
+ BulkDisableHostsCommand.ResponseSchema = zod_1.z.object({
15
+ response: zod_1.z.array(models_1.HostsSchema),
16
+ });
17
+ })(BulkDisableHostsCommand || (exports.BulkDisableHostsCommand = BulkDisableHostsCommand = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkEnableHostsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ const api_1 = require("../../../api");
7
+ var BulkEnableHostsCommand;
8
+ (function (BulkEnableHostsCommand) {
9
+ BulkEnableHostsCommand.url = api_1.REST_API.HOSTS.BULK.ENABLE_HOSTS;
10
+ BulkEnableHostsCommand.TSQ_url = BulkEnableHostsCommand.url;
11
+ BulkEnableHostsCommand.RequestSchema = zod_1.z.object({
12
+ uuids: zod_1.z.array(zod_1.z.string().uuid()),
13
+ });
14
+ BulkEnableHostsCommand.ResponseSchema = zod_1.z.object({
15
+ response: zod_1.z.array(models_1.HostsSchema),
16
+ });
17
+ })(BulkEnableHostsCommand || (exports.BulkEnableHostsCommand = BulkEnableHostsCommand = {}));
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./delete-many-hosts.command"), exports);
18
+ __exportStar(require("./disable-many-hosts.command"), exports);
19
+ __exportStar(require("./enable-many-hosts.command"), exports);
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./bulk"), exports);
17
18
  __exportStar(require("./create.command"), exports);
18
19
  __exportStar(require("./delete.command"), exports);
19
20
  __exportStar(require("./get-all.command"), exports);
@@ -370,4 +370,34 @@ exports.ERRORS = {
370
370
  message: 'Remove inbound from users error',
371
371
  httpCode: 500,
372
372
  },
373
+ INBOUND_NOT_FOUND: {
374
+ code: 'A076',
375
+ message: 'Inbound not found',
376
+ httpCode: 404,
377
+ },
378
+ ADD_INBOUND_TO_NODES_ERROR: {
379
+ code: 'A077',
380
+ message: 'Add inbound to nodes error',
381
+ httpCode: 500,
382
+ },
383
+ REMOVE_INBOUND_FROM_NODES_ERROR: {
384
+ code: 'A078',
385
+ message: 'Remove inbound from nodes error',
386
+ httpCode: 500,
387
+ },
388
+ DELETE_HOSTS_ERROR: {
389
+ code: 'A079',
390
+ message: 'Delete hosts error',
391
+ httpCode: 500,
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
+ },
373
403
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.3.34",
3
+ "version": "0.3.35",
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.",