@remnawave/backend-contract 0.3.7 → 0.3.8

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.
@@ -6,5 +6,6 @@ export declare const HOSTS_ROUTES: {
6
6
  readonly UPDATE: "update";
7
7
  readonly UPDATE_MANY: "many";
8
8
  readonly REORDER: "reorder";
9
+ readonly GET_ONE: "get-one";
9
10
  };
10
11
  //# 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;;;;;;;CAOf,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;;;;;;;;CAQf,CAAC"}
@@ -9,4 +9,5 @@ exports.HOSTS_ROUTES = {
9
9
  UPDATE: 'update',
10
10
  UPDATE_MANY: 'many',
11
11
  REORDER: 'reorder',
12
+ GET_ONE: 'get-one',
12
13
  };
@@ -67,6 +67,7 @@ export declare const REST_API: {
67
67
  readonly UPDATE_MANY: "/api/hosts/many";
68
68
  readonly REORDER: "/api/hosts/reorder";
69
69
  readonly DELETE: (uuid: string) => string;
70
+ readonly GET_ONE: (uuid: string) => string;
70
71
  };
71
72
  readonly SYSTEM: {
72
73
  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;;;;;;;;;;;;;;;;qCAiBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;kDAKA,MAAM;uCAEjB,MAAM;;;kCAIX,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;;;;;;;;8CASQ,MAAM;;;CAIjC,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;;;;;;;;;;;;;;;;qCAiBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;kDAKA,MAAM;uCAEjB,MAAM;;;kCAIX,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;8CASO,MAAM;;;CAIjC,CAAC"}
@@ -104,6 +104,7 @@ exports.REST_API = {
104
104
  UPDATE_MANY: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.UPDATE_MANY}`,
105
105
  REORDER: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.REORDER}`,
106
106
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.DELETE}/${uuid}`,
107
+ GET_ONE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.GET_ONE}/${uuid}`,
107
108
  },
108
109
  SYSTEM: {
109
110
  STATS: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.STATS}`,
@@ -0,0 +1,92 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetOneHostCommand {
3
+ const url: (uuid: string) => string;
4
+ const TSQ_url: string;
5
+ const RequestSchema: z.ZodObject<{
6
+ uuid: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ uuid: string;
9
+ }, {
10
+ uuid: string;
11
+ }>;
12
+ type Request = z.infer<typeof RequestSchema>;
13
+ const ResponseSchema: z.ZodObject<{
14
+ response: 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
+ }, "strip", z.ZodTypeAny, {
29
+ uuid: string;
30
+ path: string | null;
31
+ inboundUuid: string;
32
+ viewPosition: number;
33
+ remark: string;
34
+ address: string;
35
+ port: number;
36
+ sni: string | null;
37
+ host: string | null;
38
+ alpn: string | null;
39
+ fingerprint: string | null;
40
+ allowInsecure: boolean;
41
+ isDisabled: boolean;
42
+ }, {
43
+ uuid: string;
44
+ path: string | null;
45
+ inboundUuid: string;
46
+ viewPosition: number;
47
+ remark: string;
48
+ address: string;
49
+ port: number;
50
+ sni: string | null;
51
+ host: string | null;
52
+ alpn: string | null;
53
+ fingerprint: string | null;
54
+ allowInsecure?: boolean | undefined;
55
+ isDisabled?: boolean | undefined;
56
+ }>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ response: {
59
+ uuid: string;
60
+ path: string | null;
61
+ inboundUuid: string;
62
+ viewPosition: number;
63
+ remark: string;
64
+ address: string;
65
+ port: number;
66
+ sni: string | null;
67
+ host: string | null;
68
+ alpn: string | null;
69
+ fingerprint: string | null;
70
+ allowInsecure: boolean;
71
+ isDisabled: boolean;
72
+ };
73
+ }, {
74
+ response: {
75
+ uuid: string;
76
+ path: string | null;
77
+ inboundUuid: string;
78
+ viewPosition: number;
79
+ remark: string;
80
+ address: string;
81
+ port: number;
82
+ sni: string | null;
83
+ host: string | null;
84
+ alpn: string | null;
85
+ fingerprint: string | null;
86
+ allowInsecure?: boolean | undefined;
87
+ isDisabled?: boolean | undefined;
88
+ };
89
+ }>;
90
+ type Response = z.infer<typeof ResponseSchema>;
91
+ }
92
+ //# sourceMappingURL=get-one.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-one.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-one.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,0BAAyB,CAAC;IACnC,MAAM,OAAO,QAAe,CAAC;IAE7B,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.GetOneHostCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const __1 = require("../..");
7
+ var GetOneHostCommand;
8
+ (function (GetOneHostCommand) {
9
+ GetOneHostCommand.url = api_1.REST_API.HOSTS.GET_ONE;
10
+ GetOneHostCommand.TSQ_url = GetOneHostCommand.url(':uuid');
11
+ GetOneHostCommand.RequestSchema = zod_1.z.object({
12
+ uuid: zod_1.z.string().uuid(),
13
+ });
14
+ GetOneHostCommand.ResponseSchema = zod_1.z.object({
15
+ response: __1.HostsSchema,
16
+ });
17
+ })(GetOneHostCommand || (exports.GetOneHostCommand = GetOneHostCommand = {}));
@@ -1,6 +1,7 @@
1
1
  export * from './create.command';
2
2
  export * from './delete.command';
3
3
  export * from './get-all.command';
4
+ export * from './get-one.command';
4
5
  export * from './reorder.command';
5
6
  export * from './update.command';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -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,kBAAkB,CAAC"}
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"}
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create.command"), exports);
18
18
  __exportStar(require("./delete.command"), exports);
19
19
  __exportStar(require("./get-all.command"), exports);
20
+ __exportStar(require("./get-one.command"), exports);
20
21
  __exportStar(require("./reorder.command"), exports);
21
22
  __exportStar(require("./update.command"), exports);
@@ -369,5 +369,10 @@ export declare const ERRORS: {
369
369
  readonly message: "Disable node error";
370
370
  readonly httpCode: 500;
371
371
  };
372
+ readonly GET_ONE_HOST_ERROR: {
373
+ readonly code: "A070";
374
+ readonly message: "Get one host error";
375
+ readonly httpCode: 500;
376
+ };
372
377
  };
373
378
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC3B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C3B,CAAC"}
@@ -340,4 +340,9 @@ exports.ERRORS = {
340
340
  message: 'Disable node error',
341
341
  httpCode: 500,
342
342
  },
343
+ GET_ONE_HOST_ERROR: {
344
+ code: 'A070',
345
+ message: 'Get one host error',
346
+ httpCode: 500,
347
+ },
343
348
  };
@@ -9,4 +9,5 @@ exports.HOSTS_ROUTES = {
9
9
  UPDATE: 'update',
10
10
  UPDATE_MANY: 'many',
11
11
  REORDER: 'reorder',
12
+ GET_ONE: 'get-one',
12
13
  };
@@ -104,6 +104,7 @@ exports.REST_API = {
104
104
  UPDATE_MANY: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.UPDATE_MANY}`,
105
105
  REORDER: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.REORDER}`,
106
106
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.DELETE}/${uuid}`,
107
+ GET_ONE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.GET_ONE}/${uuid}`,
107
108
  },
108
109
  SYSTEM: {
109
110
  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.GetOneHostCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const __1 = require("../..");
7
+ var GetOneHostCommand;
8
+ (function (GetOneHostCommand) {
9
+ GetOneHostCommand.url = api_1.REST_API.HOSTS.GET_ONE;
10
+ GetOneHostCommand.TSQ_url = GetOneHostCommand.url(':uuid');
11
+ GetOneHostCommand.RequestSchema = zod_1.z.object({
12
+ uuid: zod_1.z.string().uuid(),
13
+ });
14
+ GetOneHostCommand.ResponseSchema = zod_1.z.object({
15
+ response: __1.HostsSchema,
16
+ });
17
+ })(GetOneHostCommand || (exports.GetOneHostCommand = GetOneHostCommand = {}));
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create.command"), exports);
18
18
  __exportStar(require("./delete.command"), exports);
19
19
  __exportStar(require("./get-all.command"), exports);
20
+ __exportStar(require("./get-one.command"), exports);
20
21
  __exportStar(require("./reorder.command"), exports);
21
22
  __exportStar(require("./update.command"), exports);
@@ -340,4 +340,9 @@ exports.ERRORS = {
340
340
  message: 'Disable node error',
341
341
  httpCode: 500,
342
342
  },
343
+ GET_ONE_HOST_ERROR: {
344
+ code: 'A070',
345
+ message: 'Get one host error',
346
+ httpCode: 500,
347
+ },
343
348
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
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.",