@remnawave/backend-contract 2.6.19 → 2.6.21

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 (109) hide show
  1. package/build/backend/api/controllers/index.d.ts +1 -0
  2. package/build/backend/api/controllers/index.d.ts.map +1 -1
  3. package/build/backend/api/controllers/index.js +1 -0
  4. package/build/backend/api/controllers/node-plugins.d.ts +13 -0
  5. package/build/backend/api/controllers/node-plugins.d.ts.map +1 -0
  6. package/build/backend/api/controllers/node-plugins.js +16 -0
  7. package/build/backend/api/controllers-info.d.ts +4 -0
  8. package/build/backend/api/controllers-info.d.ts.map +1 -1
  9. package/build/backend/api/controllers-info.js +4 -0
  10. package/build/backend/api/routes.d.ts +11 -0
  11. package/build/backend/api/routes.d.ts.map +1 -1
  12. package/build/backend/api/routes.js +11 -0
  13. package/build/backend/commands/index.d.ts +1 -0
  14. package/build/backend/commands/index.d.ts.map +1 -1
  15. package/build/backend/commands/index.js +1 -0
  16. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +2 -0
  17. package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -1
  18. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +2 -0
  19. package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -1
  20. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +2 -0
  21. package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts.map +1 -1
  22. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +2 -0
  23. package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -1
  24. package/build/backend/commands/node-plugins/actions/clone-node-plugin.command.d.ts +49 -0
  25. package/build/backend/commands/node-plugins/actions/clone-node-plugin.command.d.ts.map +1 -0
  26. package/build/backend/commands/node-plugins/actions/clone-node-plugin.command.js +21 -0
  27. package/build/backend/commands/node-plugins/actions/index.d.ts +3 -0
  28. package/build/backend/commands/node-plugins/actions/index.d.ts.map +1 -0
  29. package/build/backend/commands/node-plugins/actions/index.js +18 -0
  30. package/build/backend/commands/node-plugins/actions/reorder.command.d.ts +90 -0
  31. package/build/backend/commands/node-plugins/actions/reorder.command.d.ts.map +1 -0
  32. package/build/backend/commands/node-plugins/actions/reorder.command.js +25 -0
  33. package/build/backend/commands/node-plugins/create-node-plugin.command.d.ts +48 -0
  34. package/build/backend/commands/node-plugins/create-node-plugin.command.d.ts.map +1 -0
  35. package/build/backend/commands/node-plugins/create-node-plugin.command.js +23 -0
  36. package/build/backend/commands/node-plugins/delete-node-plugin.command.d.ts +33 -0
  37. package/build/backend/commands/node-plugins/delete-node-plugin.command.d.ts.map +1 -0
  38. package/build/backend/commands/node-plugins/delete-node-plugin.command.js +20 -0
  39. package/build/backend/commands/node-plugins/get-node-plugin.command.d.ts +49 -0
  40. package/build/backend/commands/node-plugins/get-node-plugin.command.d.ts.map +1 -0
  41. package/build/backend/commands/node-plugins/get-node-plugin.command.js +21 -0
  42. package/build/backend/commands/node-plugins/get-node-plugins.command.d.ts +65 -0
  43. package/build/backend/commands/node-plugins/get-node-plugins.command.d.ts.map +1 -0
  44. package/build/backend/commands/node-plugins/get-node-plugins.command.js +19 -0
  45. package/build/backend/commands/node-plugins/index.d.ts +7 -0
  46. package/build/backend/commands/node-plugins/index.d.ts.map +1 -0
  47. package/build/backend/commands/node-plugins/index.js +22 -0
  48. package/build/backend/commands/node-plugins/update-node-plugin.command.d.ts +55 -0
  49. package/build/backend/commands/node-plugins/update-node-plugin.command.d.ts.map +1 -0
  50. package/build/backend/commands/node-plugins/update-node-plugin.command.js +28 -0
  51. package/build/backend/commands/nodes/actions/disable.command.d.ts +5 -0
  52. package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
  53. package/build/backend/commands/nodes/actions/enable.command.d.ts +5 -0
  54. package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
  55. package/build/backend/commands/nodes/actions/reorder.command.d.ts +6 -0
  56. package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
  57. package/build/backend/commands/nodes/create.command.d.ts +8 -0
  58. package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
  59. package/build/backend/commands/nodes/create.command.js +1 -0
  60. package/build/backend/commands/nodes/get-all.command.d.ts +5 -0
  61. package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
  62. package/build/backend/commands/nodes/get-one.command.d.ts +5 -0
  63. package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
  64. package/build/backend/commands/nodes/update.command.d.ts +9 -0
  65. package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
  66. package/build/backend/commands/nodes/update.command.js +1 -0
  67. package/build/backend/constants/errors/errors.d.ts +35 -0
  68. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  69. package/build/backend/constants/errors/errors.js +35 -0
  70. package/build/backend/models/index.d.ts +1 -0
  71. package/build/backend/models/index.d.ts.map +1 -1
  72. package/build/backend/models/index.js +1 -0
  73. package/build/backend/models/infra-billing-available-node.schema.d.ts +1 -0
  74. package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -1
  75. package/build/backend/models/infra-billing-node.schema.d.ts +1 -0
  76. package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -1
  77. package/build/backend/models/node-plugin.schema.d.ts +18 -0
  78. package/build/backend/models/node-plugin.schema.d.ts.map +1 -0
  79. package/build/backend/models/node-plugin.schema.js +13 -0
  80. package/build/backend/models/nodes.schema.d.ts +3 -0
  81. package/build/backend/models/nodes.schema.d.ts.map +1 -1
  82. package/build/backend/models/nodes.schema.js +1 -0
  83. package/build/backend/models/webhook/webhook.schema.d.ts +10 -0
  84. package/build/backend/models/webhook/webhook.schema.d.ts.map +1 -1
  85. package/build/backend/models/xray-json-advanced/remnawave-injector.schema.d.ts +3 -0
  86. package/build/backend/models/xray-json-advanced/remnawave-injector.schema.d.ts.map +1 -1
  87. package/build/backend/models/xray-json-advanced/remnawave-injector.schema.js +1 -0
  88. package/build/frontend/api/controllers/index.js +1 -0
  89. package/build/frontend/api/controllers/node-plugins.js +16 -0
  90. package/build/frontend/api/controllers-info.js +4 -0
  91. package/build/frontend/api/routes.js +11 -0
  92. package/build/frontend/commands/index.js +1 -0
  93. package/build/frontend/commands/node-plugins/actions/clone-node-plugin.command.js +21 -0
  94. package/build/frontend/commands/node-plugins/actions/index.js +18 -0
  95. package/build/frontend/commands/node-plugins/actions/reorder.command.js +25 -0
  96. package/build/frontend/commands/node-plugins/create-node-plugin.command.js +23 -0
  97. package/build/frontend/commands/node-plugins/delete-node-plugin.command.js +20 -0
  98. package/build/frontend/commands/node-plugins/get-node-plugin.command.js +21 -0
  99. package/build/frontend/commands/node-plugins/get-node-plugins.command.js +19 -0
  100. package/build/frontend/commands/node-plugins/index.js +22 -0
  101. package/build/frontend/commands/node-plugins/update-node-plugin.command.js +28 -0
  102. package/build/frontend/commands/nodes/create.command.js +1 -0
  103. package/build/frontend/commands/nodes/update.command.js +1 -0
  104. package/build/frontend/constants/errors/errors.js +35 -0
  105. package/build/frontend/models/index.js +1 -0
  106. package/build/frontend/models/node-plugin.schema.js +13 -0
  107. package/build/frontend/models/nodes.schema.js +1 -0
  108. package/build/frontend/models/xray-json-advanced/remnawave-injector.schema.js +1 -0
  109. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetNodePluginCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ const models_1 = require("../../models");
8
+ var GetNodePluginCommand;
9
+ (function (GetNodePluginCommand) {
10
+ GetNodePluginCommand.url = api_1.REST_API.NODE_PLUGINS.GET;
11
+ GetNodePluginCommand.TSQ_url = GetNodePluginCommand.url(':uuid');
12
+ GetNodePluginCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_PLUGINS_ROUTES.GET(':uuid'), 'get', 'Get Node Plugin by uuid');
13
+ GetNodePluginCommand.RequestSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ });
16
+ GetNodePluginCommand.ResponseSchema = zod_1.z.object({
17
+ response: models_1.NodePluginSchema.extend({
18
+ pluginConfig: zod_1.z.unknown(),
19
+ }),
20
+ });
21
+ })(GetNodePluginCommand || (exports.GetNodePluginCommand = GetNodePluginCommand = {}));
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetNodePluginsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ const models_1 = require("../../models");
8
+ var GetNodePluginsCommand;
9
+ (function (GetNodePluginsCommand) {
10
+ GetNodePluginsCommand.url = api_1.REST_API.NODE_PLUGINS.GET_ALL;
11
+ GetNodePluginsCommand.TSQ_url = GetNodePluginsCommand.url;
12
+ GetNodePluginsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_PLUGINS_ROUTES.GET_ALL, 'get', 'Get all Node Plugins');
13
+ GetNodePluginsCommand.ResponseSchema = zod_1.z.object({
14
+ response: zod_1.z.object({
15
+ total: zod_1.z.number(),
16
+ nodePlugins: zod_1.z.array(models_1.NodePluginSchema),
17
+ }),
18
+ });
19
+ })(GetNodePluginsCommand || (exports.GetNodePluginsCommand = GetNodePluginsCommand = {}));
@@ -0,0 +1,22 @@
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("./actions"), exports);
18
+ __exportStar(require("./create-node-plugin.command"), exports);
19
+ __exportStar(require("./delete-node-plugin.command"), exports);
20
+ __exportStar(require("./get-node-plugin.command"), exports);
21
+ __exportStar(require("./get-node-plugins.command"), exports);
22
+ __exportStar(require("./update-node-plugin.command"), exports);
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateNodePluginCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ const models_1 = require("../../models");
8
+ var UpdateNodePluginCommand;
9
+ (function (UpdateNodePluginCommand) {
10
+ UpdateNodePluginCommand.url = api_1.REST_API.NODE_PLUGINS.UPDATE;
11
+ UpdateNodePluginCommand.TSQ_url = UpdateNodePluginCommand.url;
12
+ UpdateNodePluginCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_PLUGINS_ROUTES.UPDATE, 'patch', 'Update Node Plugin');
13
+ UpdateNodePluginCommand.RequestSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ name: zod_1.z
16
+ .string()
17
+ .min(2, 'Name must be at least 2 characters')
18
+ .max(30, 'Name must be less than 30 characters')
19
+ .regex(/^[A-Za-z0-9_\s-]+$/, 'Name can only contain letters, numbers, underscores, dashes and spaces')
20
+ .optional(),
21
+ pluginConfig: zod_1.z.optional(zod_1.z.unknown()),
22
+ });
23
+ UpdateNodePluginCommand.ResponseSchema = zod_1.z.object({
24
+ response: models_1.NodePluginSchema.extend({
25
+ pluginConfig: zod_1.z.unknown(),
26
+ }),
27
+ });
28
+ })(UpdateNodePluginCommand || (exports.UpdateNodePluginCommand = UpdateNodePluginCommand = {}));
@@ -54,6 +54,7 @@ var CreateNodeCommand;
54
54
  .regex(/^[A-Z0-9_:]+$/, 'Tag can only contain uppercase letters, numbers, underscores and colons')
55
55
  .max(36, 'Each tag must be less than 36 characters'))
56
56
  .max(10, 'Maximum 10 tags')),
57
+ activePluginUuid: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().uuid())),
57
58
  });
58
59
  CreateNodeCommand.ResponseSchema = zod_1.z.object({
59
60
  response: models_1.NodesSchema,
@@ -50,6 +50,7 @@ var UpdateNodeCommand;
50
50
  .regex(/^[A-Z0-9_:]+$/, 'Tag can only contain uppercase letters, numbers, underscores and colons')
51
51
  .max(36, 'Each tag must be less than 36 characters'))
52
52
  .max(10, 'Maximum 10 tags')),
53
+ activePluginUuid: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string().uuid())),
53
54
  });
54
55
  UpdateNodeCommand.ResponseSchema = zod_1.z.object({
55
56
  response: models_1.NodesSchema,
@@ -1105,4 +1105,39 @@ exports.ERRORS = {
1105
1105
  message: 'Connected nodes not found',
1106
1106
  httpCode: 404,
1107
1107
  },
1108
+ GET_ALL_NODE_PLUGINS_ERROR: {
1109
+ code: 'A219',
1110
+ message: 'Get all node plugins error',
1111
+ httpCode: 500,
1112
+ },
1113
+ NODE_PLUGIN_NOT_FOUND: {
1114
+ code: 'A220',
1115
+ message: 'Node plugin not found',
1116
+ httpCode: 404,
1117
+ },
1118
+ GET_NODE_PLUGIN_BY_UUID_ERROR: {
1119
+ code: 'A221',
1120
+ message: 'Get node plugin by UUID error',
1121
+ httpCode: 500,
1122
+ },
1123
+ INVALID_NODE_PLUGIN_CONFIG: {
1124
+ code: 'A222',
1125
+ message: 'Invalid node plugin config',
1126
+ httpCode: 400,
1127
+ },
1128
+ NODE_PLUGIN_NAME_ALREADY_EXISTS: {
1129
+ code: 'A223',
1130
+ message: 'Node plugin name already exists',
1131
+ httpCode: 400,
1132
+ },
1133
+ UPDATE_NODE_PLUGIN_ERROR: {
1134
+ code: 'A224',
1135
+ message: 'Update node plugin error',
1136
+ httpCode: 500,
1137
+ },
1138
+ CREATE_NODE_PLUGIN_ERROR: {
1139
+ code: 'A225',
1140
+ message: 'Create node plugin error',
1141
+ httpCode: 500,
1142
+ },
1108
1143
  };
@@ -31,6 +31,7 @@ __exportStar(require("./infra-billing-node.schema"), exports);
31
31
  __exportStar(require("./infra-provider.schema"), exports);
32
32
  __exportStar(require("./internal-squad.schema"), exports);
33
33
  __exportStar(require("./last-connected-node.schema"), exports);
34
+ __exportStar(require("./node-plugin.schema"), exports);
34
35
  __exportStar(require("./nodes.schema"), exports);
35
36
  __exportStar(require("./remnawave-settings"), exports);
36
37
  __exportStar(require("./response-rules"), exports);
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NodePluginSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.NodePluginSchema = zod_1.default.object({
9
+ uuid: zod_1.default.string().uuid(),
10
+ viewPosition: zod_1.default.number().int(),
11
+ name: zod_1.default.string(),
12
+ pluginConfig: zod_1.default.nullable(zod_1.default.unknown()),
13
+ });
@@ -47,4 +47,5 @@ exports.NodesSchema = zod_1.z.object({
47
47
  }),
48
48
  providerUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
49
49
  provider: zod_1.z.nullable(infra_provider_schema_1.PartialInfraProviderSchema),
50
+ activePluginUuid: zod_1.z.nullable(zod_1.z.string().uuid()),
50
51
  });
@@ -31,4 +31,5 @@ const InjectHostsEntrySchema = zod_1.default.object({
31
31
  });
32
32
  exports.RemnawaveInjectorSchema = zod_1.default.object({
33
33
  injectHosts: zod_1.default.array(InjectHostsEntrySchema).optional(),
34
+ addVirtualHostAsOutbound: zod_1.default.boolean().optional(),
34
35
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.6.19",
3
+ "version": "2.6.21",
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.",