@remnawave/backend-contract 2.6.20 → 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.
- package/build/backend/api/controllers/index.d.ts +1 -0
- package/build/backend/api/controllers/index.d.ts.map +1 -1
- package/build/backend/api/controllers/index.js +1 -0
- package/build/backend/api/controllers/node-plugins.d.ts +13 -0
- package/build/backend/api/controllers/node-plugins.d.ts.map +1 -0
- package/build/backend/api/controllers/node-plugins.js +16 -0
- package/build/backend/api/controllers-info.d.ts +4 -0
- package/build/backend/api/controllers-info.d.ts.map +1 -1
- package/build/backend/api/controllers-info.js +4 -0
- package/build/backend/api/routes.d.ts +11 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +11 -0
- package/build/backend/commands/index.d.ts +1 -0
- package/build/backend/commands/index.d.ts.map +1 -1
- package/build/backend/commands/index.js +1 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +2 -0
- package/build/backend/commands/infra-billing/create-billing-node.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +2 -0
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +2 -0
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts.map +1 -1
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +2 -0
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts.map +1 -1
- package/build/backend/commands/node-plugins/actions/clone-node-plugin.command.d.ts +49 -0
- package/build/backend/commands/node-plugins/actions/clone-node-plugin.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/actions/clone-node-plugin.command.js +21 -0
- package/build/backend/commands/node-plugins/actions/index.d.ts +3 -0
- package/build/backend/commands/node-plugins/actions/index.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/actions/index.js +18 -0
- package/build/backend/commands/node-plugins/actions/reorder.command.d.ts +90 -0
- package/build/backend/commands/node-plugins/actions/reorder.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/actions/reorder.command.js +25 -0
- package/build/backend/commands/node-plugins/create-node-plugin.command.d.ts +48 -0
- package/build/backend/commands/node-plugins/create-node-plugin.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/create-node-plugin.command.js +23 -0
- package/build/backend/commands/node-plugins/delete-node-plugin.command.d.ts +33 -0
- package/build/backend/commands/node-plugins/delete-node-plugin.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/delete-node-plugin.command.js +20 -0
- package/build/backend/commands/node-plugins/get-node-plugin.command.d.ts +49 -0
- package/build/backend/commands/node-plugins/get-node-plugin.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/get-node-plugin.command.js +21 -0
- package/build/backend/commands/node-plugins/get-node-plugins.command.d.ts +65 -0
- package/build/backend/commands/node-plugins/get-node-plugins.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/get-node-plugins.command.js +19 -0
- package/build/backend/commands/node-plugins/index.d.ts +7 -0
- package/build/backend/commands/node-plugins/index.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/index.js +22 -0
- package/build/backend/commands/node-plugins/update-node-plugin.command.d.ts +55 -0
- package/build/backend/commands/node-plugins/update-node-plugin.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/update-node-plugin.command.js +28 -0
- package/build/backend/commands/nodes/actions/disable.command.d.ts +5 -0
- package/build/backend/commands/nodes/actions/disable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/enable.command.d.ts +5 -0
- package/build/backend/commands/nodes/actions/enable.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/actions/reorder.command.d.ts +6 -0
- package/build/backend/commands/nodes/actions/reorder.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/create.command.d.ts +8 -0
- package/build/backend/commands/nodes/create.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/create.command.js +1 -0
- package/build/backend/commands/nodes/get-all.command.d.ts +5 -0
- package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/get-one.command.d.ts +5 -0
- package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/update.command.d.ts +9 -0
- package/build/backend/commands/nodes/update.command.d.ts.map +1 -1
- package/build/backend/commands/nodes/update.command.js +1 -0
- package/build/backend/constants/errors/errors.d.ts +35 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +35 -0
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/infra-billing-available-node.schema.d.ts +1 -0
- package/build/backend/models/infra-billing-available-node.schema.d.ts.map +1 -1
- package/build/backend/models/infra-billing-node.schema.d.ts +1 -0
- package/build/backend/models/infra-billing-node.schema.d.ts.map +1 -1
- package/build/backend/models/node-plugin.schema.d.ts +18 -0
- package/build/backend/models/node-plugin.schema.d.ts.map +1 -0
- package/build/backend/models/node-plugin.schema.js +13 -0
- package/build/backend/models/nodes.schema.d.ts +3 -0
- package/build/backend/models/nodes.schema.d.ts.map +1 -1
- package/build/backend/models/nodes.schema.js +1 -0
- package/build/backend/models/webhook/webhook.schema.d.ts +10 -0
- package/build/backend/models/webhook/webhook.schema.d.ts.map +1 -1
- package/build/frontend/api/controllers/index.js +1 -0
- package/build/frontend/api/controllers/node-plugins.js +16 -0
- package/build/frontend/api/controllers-info.js +4 -0
- package/build/frontend/api/routes.js +11 -0
- package/build/frontend/commands/index.js +1 -0
- package/build/frontend/commands/node-plugins/actions/clone-node-plugin.command.js +21 -0
- package/build/frontend/commands/node-plugins/actions/index.js +18 -0
- package/build/frontend/commands/node-plugins/actions/reorder.command.js +25 -0
- package/build/frontend/commands/node-plugins/create-node-plugin.command.js +23 -0
- package/build/frontend/commands/node-plugins/delete-node-plugin.command.js +20 -0
- package/build/frontend/commands/node-plugins/get-node-plugin.command.js +21 -0
- package/build/frontend/commands/node-plugins/get-node-plugins.command.js +19 -0
- package/build/frontend/commands/node-plugins/index.js +22 -0
- package/build/frontend/commands/node-plugins/update-node-plugin.command.js +28 -0
- package/build/frontend/commands/nodes/create.command.js +1 -0
- package/build/frontend/commands/nodes/update.command.js +1 -0
- package/build/frontend/constants/errors/errors.js +35 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/node-plugin.schema.js +13 -0
- package/build/frontend/models/nodes.schema.js +1 -0
- package/package.json +1 -1
|
@@ -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
|
+
});
|