@remnawave/backend-contract 2.1.11 → 2.1.13

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 (23) hide show
  1. package/build/backend/api/controllers/internal-squads.d.ts +1 -0
  2. package/build/backend/api/controllers/internal-squads.d.ts.map +1 -1
  3. package/build/backend/api/controllers/internal-squads.js +1 -0
  4. package/build/backend/api/routes.d.ts +1 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +1 -0
  7. package/build/backend/commands/internal-squads/get-internal-squad-accessible-nodes.command.d.ts +87 -0
  8. package/build/backend/commands/internal-squads/get-internal-squad-accessible-nodes.command.d.ts.map +1 -0
  9. package/build/backend/commands/internal-squads/get-internal-squad-accessible-nodes.command.js +28 -0
  10. package/build/backend/commands/internal-squads/index.d.ts +1 -0
  11. package/build/backend/commands/internal-squads/index.d.ts.map +1 -1
  12. package/build/backend/commands/internal-squads/index.js +1 -0
  13. package/build/backend/commands/users/update-user.command.js +1 -1
  14. package/build/backend/constants/errors/errors.d.ts +5 -0
  15. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  16. package/build/backend/constants/errors/errors.js +5 -0
  17. package/build/frontend/api/controllers/internal-squads.js +1 -0
  18. package/build/frontend/api/routes.js +1 -0
  19. package/build/frontend/commands/internal-squads/get-internal-squad-accessible-nodes.command.js +28 -0
  20. package/build/frontend/commands/internal-squads/index.js +1 -0
  21. package/build/frontend/commands/users/update-user.command.js +1 -1
  22. package/build/frontend/constants/errors/errors.js +5 -0
  23. package/package.json +1 -1
@@ -5,6 +5,7 @@ export declare const INTERNAL_SQUADS_ROUTES: {
5
5
  readonly UPDATE: "";
6
6
  readonly GET_BY_UUID: (uuid: string) => string;
7
7
  readonly DELETE: (uuid: string) => string;
8
+ readonly ACCESSIBLE_NODES: (uuid: string) => string;
8
9
  readonly BULK_ACTIONS: {
9
10
  readonly ADD_USERS: (uuid: string) => string;
10
11
  readonly REMOVE_USERS: (uuid: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"internal-squads.d.ts","sourceRoot":"","sources":["../../../../api/controllers/internal-squads.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,EAAG,iBAA0B,CAAC;AAIrE,eAAO,MAAM,sBAAsB;;;;iCAIX,MAAM;4BACX,MAAM;;mCAGC,MAAM;sCACH,MAAM;;CAEzB,CAAC"}
1
+ {"version":3,"file":"internal-squads.d.ts","sourceRoot":"","sources":["../../../../api/controllers/internal-squads.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,EAAG,iBAA0B,CAAC;AAIrE,eAAO,MAAM,sBAAsB;;;;iCAIX,MAAM;4BACX,MAAM;sCACI,MAAM;;mCAGT,MAAM;sCACH,MAAM;;CAEzB,CAAC"}
@@ -9,6 +9,7 @@ exports.INTERNAL_SQUADS_ROUTES = {
9
9
  UPDATE: '', // Update internal squad by uuid // patch
10
10
  GET_BY_UUID: (uuid) => `${uuid}`, // Get internal squad by uuid // get
11
11
  DELETE: (uuid) => `${uuid}`, // Delete internal squad by uuid // delete
12
+ ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`, // Get accessible nodes for internal squad // get
12
13
  BULK_ACTIONS: {
13
14
  ADD_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/add-users`, // Add users to internal squad // post
14
15
  REMOVE_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/remove-users`, // Remove users from internal squad // delete
@@ -149,6 +149,7 @@ export declare const REST_API: {
149
149
  readonly UPDATE: "/api/internal-squads/";
150
150
  readonly GET_BY_UUID: (uuid: string) => string;
151
151
  readonly DELETE: (uuid: string) => string;
152
+ readonly ACCESSIBLE_NODES: (uuid: string) => string;
152
153
  readonly BULK_ACTIONS: {
153
154
  readonly ADD_USERS: (uuid: string) => string;
154
155
  readonly REMOVE_USERS: (uuid: string) => string;
@@ -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,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;;qCAIX,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;sCAIP,MAAM;;;;;;qCASP,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;qCA4BD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;;uCAMC,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,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,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;;qCAIX,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;sCAIP,MAAM;;;;;;qCASP,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;qCA4BD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
@@ -186,6 +186,7 @@ exports.REST_API = {
186
186
  UPDATE: `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.UPDATE}`,
187
187
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.GET_BY_UUID(uuid)}`,
188
188
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.DELETE(uuid)}`,
189
+ ACCESSIBLE_NODES: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.ACCESSIBLE_NODES(uuid)}`,
189
190
  BULK_ACTIONS: {
190
191
  ADD_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(uuid)}`,
191
192
  REMOVE_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(uuid)}`,
@@ -0,0 +1,87 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetInternalSquadAccessibleNodesCommand {
3
+ const url: (uuid: string) => string;
4
+ const TSQ_url: string;
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestSchema: z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ uuid: string;
10
+ }, {
11
+ uuid: string;
12
+ }>;
13
+ type Request = z.infer<typeof RequestSchema>;
14
+ const ResponseSchema: z.ZodObject<{
15
+ response: z.ZodObject<{
16
+ squadUuid: z.ZodString;
17
+ accessibleNodes: z.ZodArray<z.ZodObject<{
18
+ uuid: z.ZodString;
19
+ nodeName: z.ZodString;
20
+ countryCode: z.ZodString;
21
+ configProfileUuid: z.ZodString;
22
+ configProfileName: z.ZodString;
23
+ activeInbounds: z.ZodArray<z.ZodString, "many">;
24
+ }, "strip", z.ZodTypeAny, {
25
+ uuid: string;
26
+ countryCode: string;
27
+ nodeName: string;
28
+ configProfileUuid: string;
29
+ activeInbounds: string[];
30
+ configProfileName: string;
31
+ }, {
32
+ uuid: string;
33
+ countryCode: string;
34
+ nodeName: string;
35
+ configProfileUuid: string;
36
+ activeInbounds: string[];
37
+ configProfileName: string;
38
+ }>, "many">;
39
+ }, "strip", z.ZodTypeAny, {
40
+ squadUuid: string;
41
+ accessibleNodes: {
42
+ uuid: string;
43
+ countryCode: string;
44
+ nodeName: string;
45
+ configProfileUuid: string;
46
+ activeInbounds: string[];
47
+ configProfileName: string;
48
+ }[];
49
+ }, {
50
+ squadUuid: string;
51
+ accessibleNodes: {
52
+ uuid: string;
53
+ countryCode: string;
54
+ nodeName: string;
55
+ configProfileUuid: string;
56
+ activeInbounds: string[];
57
+ configProfileName: string;
58
+ }[];
59
+ }>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ response: {
62
+ squadUuid: string;
63
+ accessibleNodes: {
64
+ uuid: string;
65
+ countryCode: string;
66
+ nodeName: string;
67
+ configProfileUuid: string;
68
+ activeInbounds: string[];
69
+ configProfileName: string;
70
+ }[];
71
+ };
72
+ }, {
73
+ response: {
74
+ squadUuid: string;
75
+ accessibleNodes: {
76
+ uuid: string;
77
+ countryCode: string;
78
+ nodeName: string;
79
+ configProfileUuid: string;
80
+ activeInbounds: string[];
81
+ configProfileName: string;
82
+ }[];
83
+ };
84
+ }>;
85
+ type Response = z.infer<typeof ResponseSchema>;
86
+ }
87
+ //# sourceMappingURL=get-internal-squad-accessible-nodes.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-internal-squad-accessible-nodes.command.d.ts","sourceRoot":"","sources":["../../../../commands/internal-squads/get-internal-squad-accessible-nodes.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,sCAAsC,CAAC;IAC7C,MAAM,GAAG,0BAA4C,CAAC;IACtD,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAczB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetInternalSquadAccessibleNodesCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var GetInternalSquadAccessibleNodesCommand;
8
+ (function (GetInternalSquadAccessibleNodesCommand) {
9
+ GetInternalSquadAccessibleNodesCommand.url = api_1.REST_API.INTERNAL_SQUADS.ACCESSIBLE_NODES;
10
+ GetInternalSquadAccessibleNodesCommand.TSQ_url = GetInternalSquadAccessibleNodesCommand.url(':uuid');
11
+ GetInternalSquadAccessibleNodesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.ACCESSIBLE_NODES(':uuid'), 'get', 'Get internal squad accessible nodes');
12
+ GetInternalSquadAccessibleNodesCommand.RequestSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ });
15
+ GetInternalSquadAccessibleNodesCommand.ResponseSchema = zod_1.z.object({
16
+ response: zod_1.z.object({
17
+ squadUuid: zod_1.z.string().uuid(),
18
+ accessibleNodes: zod_1.z.array(zod_1.z.object({
19
+ uuid: zod_1.z.string().uuid(),
20
+ nodeName: zod_1.z.string(),
21
+ countryCode: zod_1.z.string(),
22
+ configProfileUuid: zod_1.z.string().uuid(),
23
+ configProfileName: zod_1.z.string(),
24
+ activeInbounds: zod_1.z.array(zod_1.z.string()),
25
+ })),
26
+ }),
27
+ });
28
+ })(GetInternalSquadAccessibleNodesCommand || (exports.GetInternalSquadAccessibleNodesCommand = GetInternalSquadAccessibleNodesCommand = {}));
@@ -1,6 +1,7 @@
1
1
  export * from './bulk-actions';
2
2
  export * from './create-internal-squad.command';
3
3
  export * from './delete-internal-squad.command';
4
+ export * from './get-internal-squad-accessible-nodes.command';
4
5
  export * from './get-internal-squad-by-uuid';
5
6
  export * from './get-internal-squads.command';
6
7
  export * from './update-internal-squad.command';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/internal-squads/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/internal-squads/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC"}
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./bulk-actions"), exports);
18
18
  __exportStar(require("./create-internal-squad.command"), exports);
19
19
  __exportStar(require("./delete-internal-squad.command"), exports);
20
+ __exportStar(require("./get-internal-squad-accessible-nodes.command"), exports);
20
21
  __exportStar(require("./get-internal-squad-by-uuid"), exports);
21
22
  __exportStar(require("./get-internal-squads.command"), exports);
22
23
  __exportStar(require("./update-internal-squad.command"), exports);
@@ -15,7 +15,7 @@ var UpdateUserCommand;
15
15
  status: zod_1.z
16
16
  .enum([constants_1.USERS_STATUS.ACTIVE, constants_1.USERS_STATUS.DISABLED], {
17
17
  errorMap: () => ({
18
- message: "You can't change status to LIMITED or EXPIRED. This statuses handled by Remnawave.",
18
+ message: "You can't change status to LIMITED or EXPIRED. These statuses handled by Remnawave.",
19
19
  }),
20
20
  })
21
21
  .optional(),
@@ -794,5 +794,10 @@ export declare const ERRORS: {
794
794
  readonly message: "Name or inbounds is required";
795
795
  readonly httpCode: 400;
796
796
  };
797
+ readonly GET_INTERNAL_SQUAD_ACCESSIBLE_NODES_ERROR: {
798
+ readonly code: "A154";
799
+ readonly message: "Get internal squad accessible nodes error";
800
+ readonly httpCode: 500;
801
+ };
797
802
  };
798
803
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgd3B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqd3B,CAAC"}
@@ -765,4 +765,9 @@ exports.ERRORS = {
765
765
  message: 'Name or inbounds is required',
766
766
  httpCode: 400,
767
767
  },
768
+ GET_INTERNAL_SQUAD_ACCESSIBLE_NODES_ERROR: {
769
+ code: 'A154',
770
+ message: 'Get internal squad accessible nodes error',
771
+ httpCode: 500,
772
+ },
768
773
  };
@@ -9,6 +9,7 @@ exports.INTERNAL_SQUADS_ROUTES = {
9
9
  UPDATE: '', // Update internal squad by uuid // patch
10
10
  GET_BY_UUID: (uuid) => `${uuid}`, // Get internal squad by uuid // get
11
11
  DELETE: (uuid) => `${uuid}`, // Delete internal squad by uuid // delete
12
+ ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`, // Get accessible nodes for internal squad // get
12
13
  BULK_ACTIONS: {
13
14
  ADD_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/add-users`, // Add users to internal squad // post
14
15
  REMOVE_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/remove-users`, // Remove users from internal squad // delete
@@ -186,6 +186,7 @@ exports.REST_API = {
186
186
  UPDATE: `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.UPDATE}`,
187
187
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.GET_BY_UUID(uuid)}`,
188
188
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.DELETE(uuid)}`,
189
+ ACCESSIBLE_NODES: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.ACCESSIBLE_NODES(uuid)}`,
189
190
  BULK_ACTIONS: {
190
191
  ADD_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(uuid)}`,
191
192
  REMOVE_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(uuid)}`,
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetInternalSquadAccessibleNodesCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var GetInternalSquadAccessibleNodesCommand;
8
+ (function (GetInternalSquadAccessibleNodesCommand) {
9
+ GetInternalSquadAccessibleNodesCommand.url = api_1.REST_API.INTERNAL_SQUADS.ACCESSIBLE_NODES;
10
+ GetInternalSquadAccessibleNodesCommand.TSQ_url = GetInternalSquadAccessibleNodesCommand.url(':uuid');
11
+ GetInternalSquadAccessibleNodesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.ACCESSIBLE_NODES(':uuid'), 'get', 'Get internal squad accessible nodes');
12
+ GetInternalSquadAccessibleNodesCommand.RequestSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ });
15
+ GetInternalSquadAccessibleNodesCommand.ResponseSchema = zod_1.z.object({
16
+ response: zod_1.z.object({
17
+ squadUuid: zod_1.z.string().uuid(),
18
+ accessibleNodes: zod_1.z.array(zod_1.z.object({
19
+ uuid: zod_1.z.string().uuid(),
20
+ nodeName: zod_1.z.string(),
21
+ countryCode: zod_1.z.string(),
22
+ configProfileUuid: zod_1.z.string().uuid(),
23
+ configProfileName: zod_1.z.string(),
24
+ activeInbounds: zod_1.z.array(zod_1.z.string()),
25
+ })),
26
+ }),
27
+ });
28
+ })(GetInternalSquadAccessibleNodesCommand || (exports.GetInternalSquadAccessibleNodesCommand = GetInternalSquadAccessibleNodesCommand = {}));
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./bulk-actions"), exports);
18
18
  __exportStar(require("./create-internal-squad.command"), exports);
19
19
  __exportStar(require("./delete-internal-squad.command"), exports);
20
+ __exportStar(require("./get-internal-squad-accessible-nodes.command"), exports);
20
21
  __exportStar(require("./get-internal-squad-by-uuid"), exports);
21
22
  __exportStar(require("./get-internal-squads.command"), exports);
22
23
  __exportStar(require("./update-internal-squad.command"), exports);
@@ -15,7 +15,7 @@ var UpdateUserCommand;
15
15
  status: zod_1.z
16
16
  .enum([constants_1.USERS_STATUS.ACTIVE, constants_1.USERS_STATUS.DISABLED], {
17
17
  errorMap: () => ({
18
- message: "You can't change status to LIMITED or EXPIRED. This statuses handled by Remnawave.",
18
+ message: "You can't change status to LIMITED or EXPIRED. These statuses handled by Remnawave.",
19
19
  }),
20
20
  })
21
21
  .optional(),
@@ -765,4 +765,9 @@ exports.ERRORS = {
765
765
  message: 'Name or inbounds is required',
766
766
  httpCode: 400,
767
767
  },
768
+ GET_INTERNAL_SQUAD_ACCESSIBLE_NODES_ERROR: {
769
+ code: 'A154',
770
+ message: 'Get internal squad accessible nodes error',
771
+ httpCode: 500,
772
+ },
768
773
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.11",
3
+ "version": "2.1.13",
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.",