@meru2802/aux-server 1.0.18 → 1.0.20
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/dist/controllers/BaseController.d.ts +10 -1
- package/dist/controllers/BaseController.d.ts.map +1 -1
- package/dist/controllers/BaseController.js +144 -0
- package/dist/controllers/apiController.d.ts.map +1 -1
- package/dist/controllers/apiController.js +59 -12
- package/dist/controllers/coreController.d.ts +12 -0
- package/dist/controllers/coreController.d.ts.map +1 -1
- package/dist/controllers/coreController.js +388 -488
- package/dist/controllers/healthController.js +1 -1
- package/dist/types/index.d.ts +18 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/schemas/index.d.ts +2 -1
- package/dist/types/schemas/index.d.ts.map +1 -1
- package/dist/types/schemas/index.js +12 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Pool } from "pg";
|
|
2
2
|
import WebSocket from "ws";
|
|
3
3
|
import { IServiceContainer } from "../services/ServiceContainer";
|
|
4
|
-
import { Config } from "../types";
|
|
4
|
+
import { Config, MeshUser } from "../types";
|
|
5
5
|
import { IWebSocketService } from "../services/WebSocketService";
|
|
6
6
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
7
7
|
import { Agent } from "https";
|
|
@@ -15,5 +15,14 @@ export declare abstract class BaseController {
|
|
|
15
15
|
protected get isWebSocketConnected(): boolean;
|
|
16
16
|
protected get meshServer(): string;
|
|
17
17
|
protected get httpsAgent(): HttpsProxyAgent<string> | Agent;
|
|
18
|
+
protected get genResponseId(): string;
|
|
19
|
+
protected createMeshUsers(meshUsers: MeshUser[]): Promise<{
|
|
20
|
+
createdUsers: MeshUser[];
|
|
21
|
+
existingUsers: MeshUser[];
|
|
22
|
+
failedToCreate: string[];
|
|
23
|
+
}>;
|
|
24
|
+
private createSingleMeshUser;
|
|
25
|
+
private makeMeshPassword;
|
|
26
|
+
private getSecureRandomInt;
|
|
18
27
|
}
|
|
19
28
|
//# sourceMappingURL=BaseController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseController.d.ts","sourceRoot":"","sources":["../../src/controllers/BaseController.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseController.d.ts","sourceRoot":"","sources":["../../src/controllers/BaseController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,SAAmB,MAAM,IAAI,CAAC;AACrC,OAAO,EAEL,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAsC,QAAQ,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,8BAAsB,cAAc;IAClC,SAAS,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;gBAElC,gBAAgB,CAAC,EAAE,iBAAiB;IAIhD,SAAS,KAAK,MAAM,IAAI,IAAI,CAE3B;IAED,SAAS,KAAK,SAAS,IAAI,SAAS,GAAG,IAAI,CAE1C;IAED,SAAS,KAAK,gBAAgB,IAAI,iBAAiB,CAElD;IAED,SAAS,KAAK,MAAM,IAAI,MAAM,CAE7B;IAED,SAAS,KAAK,oBAAoB,IAAI,OAAO,CAE5C;IAED,SAAS,KAAK,UAAU,IAAI,MAAM,CAEjC;IAED,SAAS,KAAK,UAAU,IAAI,eAAe,CAAC,MAAM,CAAC,GAAG,KAAK,CAM1D;IAED,SAAS,KAAK,aAAa,IAAI,MAAM,CAmBpC;cAEe,eAAe,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QAC9D,YAAY,EAAE,QAAQ,EAAE,CAAC;QACzB,aAAa,EAAE,QAAQ,EAAE,CAAC;QAC1B,cAAc,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC;IA6CF,OAAO,CAAC,oBAAoB;IAwE5B,OAAO,CAAC,gBAAgB;IA2BxB,OAAO,CAAC,kBAAkB;CAS3B"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.BaseController = void 0;
|
|
7
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
4
8
|
const ServiceContainer_1 = require("../services/ServiceContainer");
|
|
9
|
+
const types_1 = require("../types");
|
|
5
10
|
const utils_1 = require("../lib/utils");
|
|
6
11
|
class BaseController {
|
|
7
12
|
constructor(serviceContainer) {
|
|
@@ -31,5 +36,144 @@ class BaseController {
|
|
|
31
36
|
}
|
|
32
37
|
return (0, utils_1.getNoProxyHttpAgent)();
|
|
33
38
|
}
|
|
39
|
+
get genResponseId() {
|
|
40
|
+
const bytes = new Uint8Array(16);
|
|
41
|
+
crypto_1.default.getRandomValues(bytes);
|
|
42
|
+
const byte6 = bytes[6];
|
|
43
|
+
const byte8 = bytes[8];
|
|
44
|
+
if (byte6 === undefined || byte8 === undefined) {
|
|
45
|
+
throw new Error("Failed to generate UUID bytes");
|
|
46
|
+
}
|
|
47
|
+
bytes[6] = (byte6 & 0x0f) | 0x40;
|
|
48
|
+
bytes[8] = (byte8 & 0x3f) | 0x80;
|
|
49
|
+
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
50
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
51
|
+
}
|
|
52
|
+
async createMeshUsers(meshUsers) {
|
|
53
|
+
const createdUsers = [];
|
|
54
|
+
const existingUsers = [];
|
|
55
|
+
const failedToCreate = [];
|
|
56
|
+
const createPromises = meshUsers.map((user) => this.createSingleMeshUser(user));
|
|
57
|
+
const results = await Promise.allSettled(createPromises);
|
|
58
|
+
results.forEach((result, index) => {
|
|
59
|
+
const user = meshUsers[index];
|
|
60
|
+
if (!user) {
|
|
61
|
+
console.log("User is undefined: createMeshUsers");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (result.status === "fulfilled") {
|
|
65
|
+
const { status } = result.value;
|
|
66
|
+
if (status === "created") {
|
|
67
|
+
createdUsers.push(user);
|
|
68
|
+
console.log(`User '${user.meshUserName}' created in MeshCentral`);
|
|
69
|
+
}
|
|
70
|
+
else if (status === "exists") {
|
|
71
|
+
existingUsers.push(user);
|
|
72
|
+
console.log(`User '${user.meshUserName}' already exists in MeshCentral`);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
failedToCreate.push(user.meshUserName);
|
|
76
|
+
console.error(`Failed to create user '${user.meshUserName}': ${result.value.error}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
failedToCreate.push(user.meshUserName);
|
|
81
|
+
console.error(`Failed to create user '${user.meshUserName}':`, result.reason);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return { createdUsers, existingUsers, failedToCreate };
|
|
85
|
+
}
|
|
86
|
+
createSingleMeshUser(user) {
|
|
87
|
+
return new Promise((resolve) => {
|
|
88
|
+
const responseId = this.genResponseId;
|
|
89
|
+
const createUserMessage = {
|
|
90
|
+
action: types_1.MeshActions.ADD_USER,
|
|
91
|
+
username: user.meshUserName,
|
|
92
|
+
realname: user.fullName,
|
|
93
|
+
email: user.email,
|
|
94
|
+
pass: this.makeMeshPassword(),
|
|
95
|
+
emailVerified: true,
|
|
96
|
+
resetNextLogin: false,
|
|
97
|
+
responseid: responseId,
|
|
98
|
+
};
|
|
99
|
+
console.log(`Creating MeshCentral user: ${user.meshUserName}`);
|
|
100
|
+
const messageSent = this.WebSocketService.sendMessage(createUserMessage);
|
|
101
|
+
if (!messageSent) {
|
|
102
|
+
resolve({
|
|
103
|
+
status: "failed",
|
|
104
|
+
error: "Could not send message over socket",
|
|
105
|
+
});
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const timeout = setTimeout(() => {
|
|
109
|
+
var _a;
|
|
110
|
+
(_a = this.webSocket) === null || _a === void 0 ? void 0 : _a.removeListener("message", messageHandler);
|
|
111
|
+
resolve({
|
|
112
|
+
status: "failed",
|
|
113
|
+
error: "Timeout waiting for create user response",
|
|
114
|
+
});
|
|
115
|
+
}, 30000);
|
|
116
|
+
const messageHandler = (data) => {
|
|
117
|
+
var _a;
|
|
118
|
+
try {
|
|
119
|
+
const message = JSON.parse(data.toString());
|
|
120
|
+
if (message.action === "adduser" &&
|
|
121
|
+
message.responseid === responseId) {
|
|
122
|
+
clearTimeout(timeout);
|
|
123
|
+
(_a = this.webSocket) === null || _a === void 0 ? void 0 : _a.removeListener("message", messageHandler);
|
|
124
|
+
if (message.result === "ok") {
|
|
125
|
+
resolve({ status: "created" });
|
|
126
|
+
}
|
|
127
|
+
else if (message.result === "User already exists" ||
|
|
128
|
+
message.msgid === 7) {
|
|
129
|
+
resolve({ status: "exists" });
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
resolve({
|
|
133
|
+
status: "failed",
|
|
134
|
+
error: message.result || "Unknown error",
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
catch (_b) {
|
|
140
|
+
// Ignore parse errors for messages that aren't relevant to us
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
this.webSocket.on("message", messageHandler);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
makeMeshPassword() {
|
|
147
|
+
const alpha = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
148
|
+
const nonalpha = "!@#$";
|
|
149
|
+
const passwd = [];
|
|
150
|
+
for (let i = 0; i < 29; i++) {
|
|
151
|
+
const char = alpha[this.getSecureRandomInt(alpha.length)];
|
|
152
|
+
if (char)
|
|
153
|
+
passwd.push(char);
|
|
154
|
+
}
|
|
155
|
+
const specialChar = nonalpha[this.getSecureRandomInt(nonalpha.length)];
|
|
156
|
+
if (specialChar)
|
|
157
|
+
passwd.push(specialChar);
|
|
158
|
+
for (let i = passwd.length - 1; i > 0; i--) {
|
|
159
|
+
const j = this.getSecureRandomInt(i + 1);
|
|
160
|
+
const temp = passwd[i];
|
|
161
|
+
const swapChar = passwd[j];
|
|
162
|
+
if (temp !== undefined && swapChar !== undefined) {
|
|
163
|
+
passwd[i] = swapChar;
|
|
164
|
+
passwd[j] = temp;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return passwd.join("");
|
|
168
|
+
}
|
|
169
|
+
getSecureRandomInt(max) {
|
|
170
|
+
const randomBuffer = new Uint32Array(1);
|
|
171
|
+
crypto_1.default.getRandomValues(randomBuffer);
|
|
172
|
+
const value = randomBuffer[0];
|
|
173
|
+
if (value === undefined) {
|
|
174
|
+
throw new Error("Failed to generate random number");
|
|
175
|
+
}
|
|
176
|
+
return value % max;
|
|
177
|
+
}
|
|
34
178
|
}
|
|
35
179
|
exports.BaseController = BaseController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiController.d.ts","sourceRoot":"","sources":["../../src/controllers/apiController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAOjE,qBAAa,aAAc,SAAQ,cAAc;gBACnC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,YAAY,GAAU,KAAK,OAAO,EAAE,KAAK,QAAQ,KAAG,OAAO,CAAC,IAAI,CAAC,CAwGtE;IAEK,cAAc,GACnB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"apiController.d.ts","sourceRoot":"","sources":["../../src/controllers/apiController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAOjE,qBAAa,aAAc,SAAQ,cAAc;gBACnC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,YAAY,GAAU,KAAK,OAAO,EAAE,KAAK,QAAQ,KAAG,OAAO,CAAC,IAAI,CAAC,CAwGtE;IAEK,cAAc,GACnB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAkUd;CACH"}
|
|
@@ -100,20 +100,50 @@ class ApiController extends BaseController_1.BaseController {
|
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
this.getConnectUrls = async (req, res) => {
|
|
103
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
103
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
104
104
|
try {
|
|
105
|
-
const meshNodeId = req.body.meshNodeId;
|
|
106
105
|
const userId = req.body.userId;
|
|
106
|
+
let meshNodeId = req.body.meshNodeId;
|
|
107
|
+
const agentId = req.body.agentId;
|
|
107
108
|
const isApplet = req.body.isApplet;
|
|
108
|
-
if (!meshNodeId
|
|
109
|
+
if (!meshNodeId && !agentId) {
|
|
109
110
|
const errorResponse = {
|
|
110
|
-
error: "'meshNodeId' or '
|
|
111
|
+
error: "Either 'meshNodeId' or 'agentId' must be present in body",
|
|
111
112
|
timestamp: new Date().toISOString(),
|
|
112
113
|
};
|
|
113
114
|
res.status(400).json(errorResponse);
|
|
114
115
|
return;
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
+
if (!userId) {
|
|
118
|
+
const errorResponse = {
|
|
119
|
+
error: "'userId' is missing in body params",
|
|
120
|
+
timestamp: new Date().toISOString(),
|
|
121
|
+
};
|
|
122
|
+
res.status(400).json(errorResponse);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (!meshNodeId && agentId) {
|
|
126
|
+
const nexus_epm_mesh_node_id_query = "SELECT mesh_node_id FROM agents_agent where agent_id = $1";
|
|
127
|
+
const nexus_epm_mesh_node_id = await this.dbPool.query(nexus_epm_mesh_node_id_query, [agentId]);
|
|
128
|
+
if (nexus_epm_mesh_node_id.rows.length === 0) {
|
|
129
|
+
const errorResponse = {
|
|
130
|
+
error: `Mesh Node Id corresponding to Agent ID: '${agentId}' Not Found`,
|
|
131
|
+
timestamp: new Date().toISOString(),
|
|
132
|
+
};
|
|
133
|
+
res.status(400).json(errorResponse);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
meshNodeId = (_a = nexus_epm_mesh_node_id.rows[0]) === null || _a === void 0 ? void 0 : _a.mesh_node_id;
|
|
137
|
+
}
|
|
138
|
+
if (!meshNodeId) {
|
|
139
|
+
const errorResponse = {
|
|
140
|
+
error: "'meshNodeId' is missing",
|
|
141
|
+
timestamp: new Date().toISOString(),
|
|
142
|
+
};
|
|
143
|
+
res.status(400).json(errorResponse);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const nexus_epm_user_id_query = "SELECT id, username, email, first_name, last_name, role_id FROM accounts_user WHERE username= $1";
|
|
117
147
|
const nexus_epm_user_id = await this.dbPool.query(nexus_epm_user_id_query, [userId]);
|
|
118
148
|
if (nexus_epm_user_id.rows.length === 0) {
|
|
119
149
|
const errorResponse = {
|
|
@@ -126,7 +156,7 @@ class ApiController extends BaseController_1.BaseController {
|
|
|
126
156
|
if (!isApplet) {
|
|
127
157
|
const nexus_epm_agent_id_query = "SELECT agent_id, site_id FROM agents_agent where mesh_node_id= $1";
|
|
128
158
|
const nexus_epm_agent_id = await this.dbPool.query(nexus_epm_agent_id_query, [meshNodeId]);
|
|
129
|
-
if (!((
|
|
159
|
+
if (!((_b = nexus_epm_user_id.rows[0]) === null || _b === void 0 ? void 0 : _b.role_id)) {
|
|
130
160
|
const errorResponse = {
|
|
131
161
|
error: `'Role id corresponding to user ${userId}' Not Found`,
|
|
132
162
|
timestamp: new Date().toISOString(),
|
|
@@ -144,11 +174,11 @@ class ApiController extends BaseController_1.BaseController {
|
|
|
144
174
|
}
|
|
145
175
|
const nexus_epm_agent_client_id_query = "SELECT client_id FROM clients_site WHERE id= $1";
|
|
146
176
|
const nexus_epm_agent_client_id = await this.dbPool.query(nexus_epm_agent_client_id_query, [
|
|
147
|
-
(
|
|
177
|
+
(_c = nexus_epm_agent_id.rows[0]) === null || _c === void 0 ? void 0 : _c.site_id,
|
|
148
178
|
]);
|
|
149
179
|
if (nexus_epm_agent_client_id.rows.length === 0) {
|
|
150
180
|
const errorResponse = {
|
|
151
|
-
error: `'Client ID corresponding to site id ${(
|
|
181
|
+
error: `'Client ID corresponding to site id ${(_d = nexus_epm_agent_id.rows[0]) === null || _d === void 0 ? void 0 : _d.site_id}' Not Found`,
|
|
152
182
|
timestamp: new Date().toISOString(),
|
|
153
183
|
};
|
|
154
184
|
res.status(400).json(errorResponse);
|
|
@@ -158,10 +188,10 @@ class ApiController extends BaseController_1.BaseController {
|
|
|
158
188
|
const nexus_epm_role_site_ids_query = "SELECT site_id FROM accounts_role_can_view_sites WHERE role_id= $1";
|
|
159
189
|
const [nexus_epm_role_client_ids, nexus_epm_role_site_ids] = await Promise.all([
|
|
160
190
|
this.dbPool.query(nexus_epm_role_client_ids_query, [
|
|
161
|
-
(
|
|
191
|
+
(_e = nexus_epm_user_id.rows[0]) === null || _e === void 0 ? void 0 : _e.role_id,
|
|
162
192
|
]),
|
|
163
193
|
this.dbPool.query(nexus_epm_role_site_ids_query, [
|
|
164
|
-
(
|
|
194
|
+
(_f = nexus_epm_user_id.rows[0]) === null || _f === void 0 ? void 0 : _f.role_id,
|
|
165
195
|
]),
|
|
166
196
|
]);
|
|
167
197
|
const roleHasPermissionForAgentClient = () => {
|
|
@@ -194,8 +224,25 @@ class ApiController extends BaseController_1.BaseController {
|
|
|
194
224
|
return;
|
|
195
225
|
}
|
|
196
226
|
}
|
|
197
|
-
const meshUser = `user//${userId}___${(
|
|
198
|
-
const meshUserWithoutDomain = `${userId}___${(
|
|
227
|
+
const meshUser = `user//${userId}___${(_g = nexus_epm_user_id.rows[0]) === null || _g === void 0 ? void 0 : _g.id}`.toLowerCase();
|
|
228
|
+
const meshUserWithoutDomain = `${userId}___${(_h = nexus_epm_user_id.rows[0]) === null || _h === void 0 ? void 0 : _h.id}`.toLowerCase();
|
|
229
|
+
const meshUsers = [
|
|
230
|
+
{
|
|
231
|
+
meshId: meshUser,
|
|
232
|
+
meshUserName: meshUserWithoutDomain,
|
|
233
|
+
fullName: `${(_j = nexus_epm_user_id.rows[0]) === null || _j === void 0 ? void 0 : _j.first_name} ${(_k = nexus_epm_user_id.rows[0]) === null || _k === void 0 ? void 0 : _k.last_name}`,
|
|
234
|
+
email: ((_l = nexus_epm_user_id.rows[0]) === null || _l === void 0 ? void 0 : _l.email) || "",
|
|
235
|
+
},
|
|
236
|
+
];
|
|
237
|
+
const { createdUsers, existingUsers, failedToCreate } = await this.createMeshUsers(meshUsers);
|
|
238
|
+
if (failedToCreate.length == 1) {
|
|
239
|
+
const errorResponse = {
|
|
240
|
+
error: `User with id ${(_m = nexus_epm_user_id.rows[0]) === null || _m === void 0 ? void 0 : _m.id} Could not be created in Nexus Mesh!`,
|
|
241
|
+
timestamp: new Date().toISOString(),
|
|
242
|
+
};
|
|
243
|
+
res.status(500).json(errorResponse);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
199
246
|
const addUserToDevice = async () => {
|
|
200
247
|
const rights = 4088024;
|
|
201
248
|
const responseId = `id-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
@@ -7,5 +7,17 @@ export declare class CoreController extends BaseController {
|
|
|
7
7
|
createDeviceGroup: (req: Request, res: Response) => Promise<void>;
|
|
8
8
|
addUserToGroup: (req: Request, res: Response) => Promise<void>;
|
|
9
9
|
getEndpointInstallScript: (req: Request, res: Response) => Promise<void>;
|
|
10
|
+
private sendErrorResponse;
|
|
11
|
+
private ensureWebSocket;
|
|
12
|
+
private ensureMessageSent;
|
|
13
|
+
private sendScript;
|
|
14
|
+
private buildDownloadLink;
|
|
15
|
+
private buildDownloadLinkResponse;
|
|
16
|
+
private waitForWebSocketResponse;
|
|
17
|
+
private waitForAddUserToGroupResponse;
|
|
18
|
+
private fetchMeshUsers;
|
|
19
|
+
private fetchIcebergDetails;
|
|
20
|
+
private generateWindowsScript;
|
|
21
|
+
private generateLinuxScript;
|
|
10
22
|
}
|
|
11
23
|
//# sourceMappingURL=coreController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreController.d.ts","sourceRoot":"","sources":["../../src/controllers/coreController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"coreController.d.ts","sourceRoot":"","sources":["../../src/controllers/coreController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAuBlD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,eAAe,GACpB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CA0Ed;IAEK,iBAAiB,GACtB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAkEd;IAEK,cAAc,GACnB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAyFd;IAEK,wBAAwB,GAC7B,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAiHd;IAEF,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,yBAAyB;IASjC,OAAO,CAAC,wBAAwB;IAqDhC,OAAO,CAAC,6BAA6B;YAuEvB,cAAc;YAwDd,mBAAmB;IAyDjC,OAAO,CAAC,qBAAqB;IA4F7B,OAAO,CAAC,mBAAmB;CA+Q5B"}
|