@kinotic-ai/system-api 5.0.0-beta.5 → 5.0.0-beta.50
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/README.md +1 -1
- package/dist/index.cjs +350 -95
- package/dist/index.d.cts +529 -101
- package/dist/index.d.ts +529 -101
- package/dist/index.js +352 -95
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
// packages/system-api/src/index.ts
|
|
2
|
-
import { SYSTEM_API_ZONE as
|
|
2
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE14 } from "@kinotic-ai/management-api";
|
|
3
3
|
|
|
4
|
-
// packages/system-api/src/api/model/workload/
|
|
5
|
-
|
|
6
|
-
((VmNodeStatusType2) => {
|
|
7
|
-
VmNodeStatusType2["ONLINE"] = "ONLINE";
|
|
8
|
-
VmNodeStatusType2["OFFLINE"] = "OFFLINE";
|
|
9
|
-
VmNodeStatusType2["DRAINING"] = "DRAINING";
|
|
10
|
-
})(VmNodeStatusType ||= {});
|
|
11
|
-
|
|
12
|
-
// packages/system-api/src/api/model/workload/VmNodeStatus.ts
|
|
13
|
-
class VmNodeStatus {
|
|
14
|
-
type = "ONLINE" /* ONLINE */;
|
|
15
|
-
healthMessage = null;
|
|
16
|
-
}
|
|
4
|
+
// packages/system-api/src/api/model/workload/VmNode.ts
|
|
5
|
+
import { ReconcileState } from "@kinotic-ai/management-api";
|
|
17
6
|
|
|
18
7
|
// packages/system-api/src/api/model/workload/VmProviderType.ts
|
|
19
8
|
var VmProviderType;
|
|
20
|
-
((
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
((VmProviderType) => {
|
|
10
|
+
VmProviderType["BOXLITE"] = "BOXLITE";
|
|
11
|
+
VmProviderType["CLOUD_HYPERVISOR"] = "CLOUD_HYPERVISOR";
|
|
23
12
|
})(VmProviderType ||= {});
|
|
24
13
|
|
|
25
14
|
// packages/system-api/src/api/model/workload/VmNode.ts
|
|
@@ -27,14 +16,15 @@ class VmNode {
|
|
|
27
16
|
id;
|
|
28
17
|
name;
|
|
29
18
|
hostname;
|
|
30
|
-
|
|
19
|
+
state = new ReconcileState;
|
|
20
|
+
healthMessage = null;
|
|
31
21
|
providerType = "BOXLITE" /* BOXLITE */;
|
|
32
22
|
totalCpus = 0;
|
|
33
23
|
totalMemoryMb = 0;
|
|
34
24
|
totalDiskMb = 0;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
freeCpus = 0;
|
|
26
|
+
freeMemoryMb = 0;
|
|
27
|
+
freeDiskMb = 0;
|
|
38
28
|
lastSeen = null;
|
|
39
29
|
workloadDataDir = null;
|
|
40
30
|
constructor(id, name, hostname) {
|
|
@@ -43,114 +33,148 @@ class VmNode {
|
|
|
43
33
|
this.hostname = hostname;
|
|
44
34
|
}
|
|
45
35
|
}
|
|
46
|
-
// packages/system-api/src/api/model/
|
|
36
|
+
// packages/system-api/src/api/model/workload/VmNodeStatusType.ts
|
|
37
|
+
var VmNodeStatusType;
|
|
38
|
+
((VmNodeStatusType) => {
|
|
39
|
+
VmNodeStatusType["ONLINE"] = "ONLINE";
|
|
40
|
+
VmNodeStatusType["DRAINING"] = "DRAINING";
|
|
41
|
+
})(VmNodeStatusType ||= {});
|
|
42
|
+
// packages/system-api/src/api/model/workload/VmNodeRegistration.ts
|
|
47
43
|
class VmNodeRegistration {
|
|
48
|
-
id;
|
|
49
|
-
name;
|
|
50
44
|
hostname;
|
|
51
45
|
providerType = "BOXLITE" /* BOXLITE */;
|
|
52
46
|
totalCpus = 0;
|
|
53
47
|
totalMemoryMb = 0;
|
|
54
48
|
totalDiskMb = 0;
|
|
55
49
|
workloadDataDir = null;
|
|
56
|
-
constructor(
|
|
57
|
-
this.id = id;
|
|
58
|
-
this.name = name;
|
|
50
|
+
constructor(hostname) {
|
|
59
51
|
this.hostname = hostname;
|
|
60
52
|
}
|
|
61
53
|
}
|
|
62
|
-
// packages/system-api/src/api/
|
|
54
|
+
// packages/system-api/src/api/model/llm/LlmConfiguration.ts
|
|
55
|
+
class LlmConfiguration {
|
|
56
|
+
id = null;
|
|
57
|
+
name;
|
|
58
|
+
provider;
|
|
59
|
+
model;
|
|
60
|
+
endpoint = null;
|
|
61
|
+
maxTokens = null;
|
|
62
|
+
temperature = null;
|
|
63
|
+
apiKeyHeld = false;
|
|
64
|
+
created = null;
|
|
65
|
+
updated = null;
|
|
66
|
+
constructor(name, provider, model) {
|
|
67
|
+
this.name = name;
|
|
68
|
+
this.provider = provider;
|
|
69
|
+
this.model = model;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// packages/system-api/src/api/model/llm/LlmProviderType.ts
|
|
73
|
+
var LlmProviderType;
|
|
74
|
+
((LlmProviderType) => {
|
|
75
|
+
LlmProviderType["ANTHROPIC"] = "ANTHROPIC";
|
|
76
|
+
LlmProviderType["OPENAI"] = "OPENAI";
|
|
77
|
+
})(LlmProviderType ||= {});
|
|
78
|
+
// packages/system-api/src/api/services/workload/IVmNodeService.ts
|
|
63
79
|
import { SYSTEM_API_ZONE } from "@kinotic-ai/management-api";
|
|
64
|
-
import { CrudServiceProxy } from "@kinotic-ai/core";
|
|
80
|
+
import { CrudServiceProxy, FunctionalIterablePage } from "@kinotic-ai/core";
|
|
65
81
|
|
|
66
82
|
class VmNodeServiceProxy extends CrudServiceProxy {
|
|
67
83
|
constructor(kinotic) {
|
|
68
|
-
super(kinotic.serviceProxy(`${SYSTEM_API_ZONE}~org.kinotic.system.api.services.VmNodeService`));
|
|
84
|
+
super(kinotic.serviceProxy(`${SYSTEM_API_ZONE}~org.kinotic.system.api.services.workload.VmNodeService`));
|
|
85
|
+
}
|
|
86
|
+
async findHistory(nodeId, pageable) {
|
|
87
|
+
const page = await this.findHistorySinglePage(nodeId, pageable);
|
|
88
|
+
return new FunctionalIterablePage(pageable, page, (pageable) => this.findHistorySinglePage(nodeId, pageable));
|
|
69
89
|
}
|
|
70
|
-
|
|
71
|
-
return this.serviceProxy.invoke("
|
|
90
|
+
findHistorySinglePage(nodeId, pageable) {
|
|
91
|
+
return this.serviceProxy.invoke("findHistory", [nodeId, pageable]);
|
|
72
92
|
}
|
|
73
93
|
syncIndex() {
|
|
74
94
|
return this.serviceProxy.invoke("syncIndex", []);
|
|
75
95
|
}
|
|
76
96
|
}
|
|
77
|
-
// packages/system-api/src/api/services/IWorkloadService.ts
|
|
97
|
+
// packages/system-api/src/api/services/workload/IWorkloadService.ts
|
|
78
98
|
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE2 } from "@kinotic-ai/management-api";
|
|
79
|
-
import { CrudServiceProxy as CrudServiceProxy2, FunctionalIterablePage } from "@kinotic-ai/core";
|
|
99
|
+
import { CrudServiceProxy as CrudServiceProxy2, FunctionalIterablePage as FunctionalIterablePage2 } from "@kinotic-ai/core";
|
|
80
100
|
|
|
81
101
|
class WorkloadServiceProxy extends CrudServiceProxy2 {
|
|
82
102
|
constructor(kinotic) {
|
|
83
|
-
super(kinotic.serviceProxy(`${SYSTEM_API_ZONE2}~org.kinotic.system.api.services.WorkloadService`));
|
|
103
|
+
super(kinotic.serviceProxy(`${SYSTEM_API_ZONE2}~org.kinotic.system.api.services.workload.WorkloadService`));
|
|
84
104
|
}
|
|
85
105
|
async findAllForNode(nodeId, pageable) {
|
|
86
106
|
const page = await this.findAllForNodeSinglePage(nodeId, pageable);
|
|
87
|
-
return new
|
|
107
|
+
return new FunctionalIterablePage2(pageable, page, (pageable) => this.findAllForNodeSinglePage(nodeId, pageable));
|
|
88
108
|
}
|
|
89
109
|
findAllForNodeSinglePage(nodeId, pageable) {
|
|
90
110
|
return this.serviceProxy.invoke("findAllForNode", [nodeId, pageable]);
|
|
91
111
|
}
|
|
92
|
-
|
|
93
|
-
|
|
112
|
+
async findHistory(workloadId, pageable) {
|
|
113
|
+
const page = await this.findHistorySinglePage(workloadId, pageable);
|
|
114
|
+
return new FunctionalIterablePage2(pageable, page, (pageable) => this.findHistorySinglePage(workloadId, pageable));
|
|
115
|
+
}
|
|
116
|
+
findHistorySinglePage(workloadId, pageable) {
|
|
117
|
+
return this.serviceProxy.invoke("findHistory", [workloadId, pageable]);
|
|
94
118
|
}
|
|
95
119
|
syncIndex() {
|
|
96
120
|
return this.serviceProxy.invoke("syncIndex", []);
|
|
97
121
|
}
|
|
98
122
|
}
|
|
99
|
-
// packages/system-api/src/api/services/IWorkloadOrchestrationService.ts
|
|
123
|
+
// packages/system-api/src/api/services/workload/IWorkloadOrchestrationService.ts
|
|
100
124
|
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE3 } from "@kinotic-ai/management-api";
|
|
101
125
|
|
|
102
126
|
class WorkloadOrchestrationService {
|
|
103
127
|
serviceProxy;
|
|
104
128
|
constructor(kinotic) {
|
|
105
|
-
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE3}~org.kinotic.system.api.services.WorkloadOrchestrationService`);
|
|
129
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE3}~org.kinotic.system.api.services.workload.WorkloadOrchestrationService`);
|
|
106
130
|
}
|
|
107
131
|
deployWorkload(workload) {
|
|
108
132
|
return this.serviceProxy.invoke("deployWorkload", [workload]);
|
|
109
133
|
}
|
|
110
|
-
restartWorkload(workloadId) {
|
|
111
|
-
return this.serviceProxy.invoke("restartWorkload", [workloadId]);
|
|
112
|
-
}
|
|
113
134
|
stopWorkload(workloadId) {
|
|
114
135
|
return this.serviceProxy.invoke("stopWorkload", [workloadId]);
|
|
115
136
|
}
|
|
116
137
|
destroyWorkload(workloadId) {
|
|
117
138
|
return this.serviceProxy.invoke("destroyWorkload", [workloadId]);
|
|
118
139
|
}
|
|
140
|
+
deleteWorkload(workloadId) {
|
|
141
|
+
return this.serviceProxy.invoke("deleteWorkload", [workloadId]);
|
|
142
|
+
}
|
|
143
|
+
deleteWorkloads(workloadIds) {
|
|
144
|
+
return this.serviceProxy.invoke("deleteWorkloads", [workloadIds]);
|
|
145
|
+
}
|
|
119
146
|
}
|
|
120
|
-
// packages/system-api/src/api/services/VmNodeOrchestrationServiceProxy.ts
|
|
147
|
+
// packages/system-api/src/api/services/workload/VmNodeOrchestrationServiceProxy.ts
|
|
121
148
|
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE4 } from "@kinotic-ai/management-api";
|
|
122
149
|
|
|
123
150
|
class VmNodeOrchestrationServiceProxy {
|
|
124
151
|
serviceProxy;
|
|
125
152
|
constructor(kinotic) {
|
|
126
|
-
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE4}~org.kinotic.system.api.services.VmNodeOrchestrationService`);
|
|
153
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE4}~org.kinotic.system.api.services.workload.VmNodeOrchestrationService`);
|
|
127
154
|
}
|
|
128
155
|
registerNode(registration) {
|
|
129
156
|
return this.serviceProxy.invoke("registerNode", [registration]);
|
|
130
157
|
}
|
|
131
|
-
heartbeat(
|
|
132
|
-
return this.serviceProxy.invoke("heartbeat", [
|
|
158
|
+
heartbeat(problems) {
|
|
159
|
+
return this.serviceProxy.invoke("heartbeat", [problems]);
|
|
133
160
|
}
|
|
134
|
-
reportWorkloadStatus(
|
|
135
|
-
return this.serviceProxy.invoke("reportWorkloadStatus", [
|
|
161
|
+
reportWorkloadStatus(reports) {
|
|
162
|
+
return this.serviceProxy.invoke("reportWorkloadStatus", [reports]);
|
|
136
163
|
}
|
|
137
164
|
deregisterNode(nodeId) {
|
|
138
165
|
return this.serviceProxy.invoke("deregisterNode", [nodeId]);
|
|
139
166
|
}
|
|
140
167
|
}
|
|
141
|
-
// packages/system-api/src/api/services/LogManager.ts
|
|
142
|
-
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE5 } from "@kinotic-ai/management-api";
|
|
143
|
-
|
|
144
168
|
// packages/system-api/src/api/services/ILogManager.ts
|
|
145
169
|
var LogLevel;
|
|
146
|
-
((
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
170
|
+
((LogLevel) => {
|
|
171
|
+
LogLevel["TRACE"] = "TRACE";
|
|
172
|
+
LogLevel["DEBUG"] = "DEBUG";
|
|
173
|
+
LogLevel["INFO"] = "INFO";
|
|
174
|
+
LogLevel["WARN"] = "WARN";
|
|
175
|
+
LogLevel["ERROR"] = "ERROR";
|
|
176
|
+
LogLevel["FATAL"] = "FATAL";
|
|
177
|
+
LogLevel["OFF"] = "OFF";
|
|
154
178
|
})(LogLevel ||= {});
|
|
155
179
|
|
|
156
180
|
class LoggerLevelsDescriptor {
|
|
@@ -171,11 +195,16 @@ class LoggersDescriptor {
|
|
|
171
195
|
groups = new Map;
|
|
172
196
|
}
|
|
173
197
|
|
|
198
|
+
class TraceLogProperties {
|
|
199
|
+
includes = [];
|
|
200
|
+
excludes = [];
|
|
201
|
+
}
|
|
202
|
+
|
|
174
203
|
// packages/system-api/src/api/services/LogManager.ts
|
|
175
204
|
class LogManager {
|
|
176
205
|
serviceProxy;
|
|
177
206
|
constructor(kinotic) {
|
|
178
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
207
|
+
this.serviceProxy = kinotic.serviceProxy("org.kinotic.core.api.log.LogManager");
|
|
179
208
|
}
|
|
180
209
|
loggers(nodeId) {
|
|
181
210
|
return this.serviceProxy.invoke("loggers", null, nodeId);
|
|
@@ -196,30 +225,71 @@ class LogManager {
|
|
|
196
225
|
configureLogLevel(nodeId, name, level) {
|
|
197
226
|
return this.serviceProxy.invoke("configureLogLevel", [name, level], nodeId);
|
|
198
227
|
}
|
|
228
|
+
async traceLog(nodeId) {
|
|
229
|
+
const data = await this.serviceProxy.invoke("traceLog", null, nodeId);
|
|
230
|
+
const ret = new TraceLogProperties;
|
|
231
|
+
Object.assign(ret, data);
|
|
232
|
+
return ret;
|
|
233
|
+
}
|
|
234
|
+
configureTraceLog(nodeId, traceLog) {
|
|
235
|
+
return this.serviceProxy.invoke("configureTraceLog", [traceLog], nodeId);
|
|
236
|
+
}
|
|
199
237
|
}
|
|
200
238
|
|
|
201
239
|
// packages/system-api/src/api/services/IKinoticClusterInfoService.ts
|
|
202
|
-
import { SYSTEM_API_ZONE as
|
|
240
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE5 } from "@kinotic-ai/management-api";
|
|
203
241
|
|
|
204
242
|
class KinoticClusterInfoService {
|
|
205
243
|
serviceProxy;
|
|
206
244
|
constructor(kinotic) {
|
|
207
|
-
this.serviceProxy = kinotic.serviceProxy(`${
|
|
245
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE5}~org.kinotic.system.api.services.KinoticClusterInfoService`);
|
|
208
246
|
}
|
|
209
247
|
getClusterInfo() {
|
|
210
248
|
return this.serviceProxy.invoke("getClusterInfo");
|
|
211
249
|
}
|
|
212
250
|
}
|
|
213
251
|
|
|
252
|
+
// packages/system-api/src/api/services/IClusterVulnerabilityService.ts
|
|
253
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE6 } from "@kinotic-ai/management-api";
|
|
254
|
+
|
|
255
|
+
class ClusterVulnerabilityService {
|
|
256
|
+
serviceProxy;
|
|
257
|
+
constructor(kinotic) {
|
|
258
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE6}~org.kinotic.system.api.services.ClusterVulnerabilityService`);
|
|
259
|
+
}
|
|
260
|
+
findAll() {
|
|
261
|
+
return this.serviceProxy.invoke("findAll");
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// packages/system-api/src/api/services/IVulnerabilityAdvisoryService.ts
|
|
266
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE7 } from "@kinotic-ai/management-api";
|
|
267
|
+
|
|
268
|
+
class VulnerabilityAdvisoryService {
|
|
269
|
+
serviceProxy;
|
|
270
|
+
constructor(kinotic) {
|
|
271
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE7}~org.kinotic.system.api.services.VulnerabilityAdvisoryService`);
|
|
272
|
+
}
|
|
273
|
+
findImportStatus() {
|
|
274
|
+
return this.serviceProxy.invoke("findImportStatus");
|
|
275
|
+
}
|
|
276
|
+
findAdvisories(search, pageable) {
|
|
277
|
+
return this.serviceProxy.invoke("findAdvisories", [search, pageable]);
|
|
278
|
+
}
|
|
279
|
+
findAlerts(advisoryId, pageable) {
|
|
280
|
+
return this.serviceProxy.invoke("findAlerts", [advisoryId, pageable]);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
214
284
|
// packages/system-api/src/api/services/ISystemOrganizationService.ts
|
|
215
285
|
import {
|
|
216
|
-
SYSTEM_API_ZONE as
|
|
286
|
+
SYSTEM_API_ZONE as SYSTEM_API_ZONE8
|
|
217
287
|
} from "@kinotic-ai/management-api";
|
|
218
288
|
|
|
219
289
|
class SystemOrganizationService {
|
|
220
290
|
serviceProxy;
|
|
221
291
|
constructor(kinotic) {
|
|
222
|
-
this.serviceProxy = kinotic.serviceProxy(`${
|
|
292
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE8}~org.kinotic.system.api.services.SystemOrganizationService`);
|
|
223
293
|
}
|
|
224
294
|
findOrganizations(pageable) {
|
|
225
295
|
return this.serviceProxy.invoke("findOrganizations", [pageable]);
|
|
@@ -239,17 +309,143 @@ class SystemOrganizationService {
|
|
|
239
309
|
findProjects(organizationId, pageable) {
|
|
240
310
|
return this.serviceProxy.invoke("findProjects", [organizationId, pageable]);
|
|
241
311
|
}
|
|
242
|
-
findMembers(organizationId,
|
|
243
|
-
return this.serviceProxy.invoke("findMembers", [organizationId,
|
|
312
|
+
findMembers(organizationId, pageable) {
|
|
313
|
+
return this.serviceProxy.invoke("findMembers", [organizationId, pageable]);
|
|
314
|
+
}
|
|
315
|
+
searchMembers(searchText, organizationId, pageable) {
|
|
316
|
+
return this.serviceProxy.invoke("searchMembers", [searchText, organizationId, pageable]);
|
|
244
317
|
}
|
|
245
|
-
|
|
246
|
-
return this.serviceProxy.invoke("
|
|
318
|
+
findApplicationUsers(organizationId, applicationId, pageable) {
|
|
319
|
+
return this.serviceProxy.invoke("findApplicationUsers", [organizationId, applicationId, pageable]);
|
|
320
|
+
}
|
|
321
|
+
searchApplicationUsers(searchText, organizationId, applicationId, pageable) {
|
|
322
|
+
return this.serviceProxy.invoke("searchApplicationUsers", [searchText, organizationId, applicationId, pageable]);
|
|
247
323
|
}
|
|
248
324
|
findPendingInvites(organizationId, applicationId, pageable) {
|
|
249
325
|
return this.serviceProxy.invoke("findPendingInvites", [organizationId, applicationId, pageable]);
|
|
250
326
|
}
|
|
251
327
|
}
|
|
252
328
|
|
|
329
|
+
// packages/system-api/src/api/services/ISystemMemberService.ts
|
|
330
|
+
import {
|
|
331
|
+
SYSTEM_API_ZONE as SYSTEM_API_ZONE9
|
|
332
|
+
} from "@kinotic-ai/management-api";
|
|
333
|
+
|
|
334
|
+
class SystemMemberService {
|
|
335
|
+
serviceProxy;
|
|
336
|
+
constructor(kinotic) {
|
|
337
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE9}~org.kinotic.system.api.services.SystemMemberService`);
|
|
338
|
+
}
|
|
339
|
+
findUsers(pageable) {
|
|
340
|
+
return this.serviceProxy.invoke("findUsers", [pageable]);
|
|
341
|
+
}
|
|
342
|
+
searchUsers(searchText, pageable) {
|
|
343
|
+
return this.serviceProxy.invoke("searchUsers", [searchText, pageable]);
|
|
344
|
+
}
|
|
345
|
+
addUser(email, displayName) {
|
|
346
|
+
return this.serviceProxy.invoke("addUser", [email, displayName]);
|
|
347
|
+
}
|
|
348
|
+
setUserEnabled(userId, enabled) {
|
|
349
|
+
return this.serviceProxy.invoke("setUserEnabled", [userId, enabled]);
|
|
350
|
+
}
|
|
351
|
+
resetUserPassword(userId) {
|
|
352
|
+
return this.serviceProxy.invoke("resetUserPassword", [userId]);
|
|
353
|
+
}
|
|
354
|
+
findMachines(pageable) {
|
|
355
|
+
return this.serviceProxy.invoke("findMachines", [pageable]);
|
|
356
|
+
}
|
|
357
|
+
createMachine(displayName) {
|
|
358
|
+
return this.serviceProxy.invoke("createMachine", [displayName]);
|
|
359
|
+
}
|
|
360
|
+
rotateSecret(machineId) {
|
|
361
|
+
return this.serviceProxy.invoke("rotateSecret", [machineId]);
|
|
362
|
+
}
|
|
363
|
+
setMachineEnabled(machineId, enabled) {
|
|
364
|
+
return this.serviceProxy.invoke("setMachineEnabled", [machineId, enabled]);
|
|
365
|
+
}
|
|
366
|
+
removeMachine(machineId) {
|
|
367
|
+
return this.serviceProxy.invoke("removeMachine", [machineId]);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// packages/system-api/src/api/services/IWatchEventService.ts
|
|
372
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE10 } from "@kinotic-ai/management-api";
|
|
373
|
+
import { FunctionalIterablePage as FunctionalIterablePage3 } from "@kinotic-ai/core";
|
|
374
|
+
|
|
375
|
+
class WatchEventService {
|
|
376
|
+
serviceProxy;
|
|
377
|
+
constructor(kinotic) {
|
|
378
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE10}~org.kinotic.system.api.services.WatchEventService`);
|
|
379
|
+
}
|
|
380
|
+
async findAll(pageable) {
|
|
381
|
+
const page = await this.findAllSinglePage(pageable);
|
|
382
|
+
return new FunctionalIterablePage3(pageable, page, (pageable) => this.findAllSinglePage(pageable));
|
|
383
|
+
}
|
|
384
|
+
findAllSinglePage(pageable) {
|
|
385
|
+
return this.serviceProxy.invoke("findAll", [pageable]);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// packages/system-api/src/api/services/ILlmConfigurationService.ts
|
|
390
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE11 } from "@kinotic-ai/management-api";
|
|
391
|
+
|
|
392
|
+
class LlmConfigurationService {
|
|
393
|
+
serviceProxy;
|
|
394
|
+
constructor(kinotic) {
|
|
395
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE11}~org.kinotic.system.api.services.LlmConfigurationService`);
|
|
396
|
+
}
|
|
397
|
+
findAll(pageable) {
|
|
398
|
+
return this.serviceProxy.invoke("findAll", [pageable]);
|
|
399
|
+
}
|
|
400
|
+
findById(id) {
|
|
401
|
+
return this.serviceProxy.invoke("findById", [id]);
|
|
402
|
+
}
|
|
403
|
+
findByName(name) {
|
|
404
|
+
return this.serviceProxy.invoke("findByName", [name]);
|
|
405
|
+
}
|
|
406
|
+
save(configuration, apiKey) {
|
|
407
|
+
return this.serviceProxy.invoke("save", [configuration, apiKey]);
|
|
408
|
+
}
|
|
409
|
+
deleteById(id) {
|
|
410
|
+
return this.serviceProxy.invoke("deleteById", [id]);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// packages/system-api/src/api/services/ISystemJobService.ts
|
|
415
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE12 } from "@kinotic-ai/management-api";
|
|
416
|
+
|
|
417
|
+
class SystemJobService {
|
|
418
|
+
serviceProxy;
|
|
419
|
+
constructor(kinotic) {
|
|
420
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE12}~org.kinotic.system.api.services.SystemJobService`);
|
|
421
|
+
}
|
|
422
|
+
findSystemJobs() {
|
|
423
|
+
return this.serviceProxy.invoke("findSystemJobs", []);
|
|
424
|
+
}
|
|
425
|
+
startSystemJob(name) {
|
|
426
|
+
return this.serviceProxy.invoke("startSystemJob", [name]);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// packages/system-api/src/api/services/ILicenseService.ts
|
|
431
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE13 } from "@kinotic-ai/management-api";
|
|
432
|
+
|
|
433
|
+
class LicenseService {
|
|
434
|
+
serviceProxy;
|
|
435
|
+
constructor(kinotic) {
|
|
436
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE13}~org.kinotic.system.api.services.LicenseService`);
|
|
437
|
+
}
|
|
438
|
+
findCurrent() {
|
|
439
|
+
return this.serviceProxy.invoke("findCurrent", []);
|
|
440
|
+
}
|
|
441
|
+
install(licenseKey) {
|
|
442
|
+
return this.serviceProxy.invoke("install", [licenseKey]);
|
|
443
|
+
}
|
|
444
|
+
findClusterId() {
|
|
445
|
+
return this.serviceProxy.invoke("findClusterId", []);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
253
449
|
// packages/system-api/src/api/SystemApiPlugin.ts
|
|
254
450
|
var SystemApiPlugin = {
|
|
255
451
|
install(kinotic) {
|
|
@@ -259,46 +455,107 @@ var SystemApiPlugin = {
|
|
|
259
455
|
workloadOrchestration: new WorkloadOrchestrationService(kinotic),
|
|
260
456
|
logManager: new LogManager(kinotic),
|
|
261
457
|
clusterInfo: new KinoticClusterInfoService(kinotic),
|
|
262
|
-
|
|
458
|
+
clusterVulnerabilities: new ClusterVulnerabilityService(kinotic),
|
|
459
|
+
vulnerabilityAdvisories: new VulnerabilityAdvisoryService(kinotic),
|
|
460
|
+
systemOrganizations: new SystemOrganizationService(kinotic),
|
|
461
|
+
systemMembers: new SystemMemberService(kinotic),
|
|
462
|
+
watchEvents: new WatchEventService(kinotic),
|
|
463
|
+
llmConfigurations: new LlmConfigurationService(kinotic),
|
|
464
|
+
systemJobs: new SystemJobService(kinotic),
|
|
465
|
+
licenses: new LicenseService(kinotic)
|
|
263
466
|
};
|
|
264
467
|
}
|
|
265
468
|
};
|
|
266
|
-
// packages/system-api/src/api/model/KinoticClusterInfo.ts
|
|
469
|
+
// packages/system-api/src/api/model/cluster/KinoticClusterInfo.ts
|
|
267
470
|
class KinoticClusterInfo {
|
|
268
|
-
localNodeId = "";
|
|
269
471
|
serverNodeCount = 0;
|
|
270
472
|
topologyVersion = 0;
|
|
271
473
|
clusterState = "";
|
|
272
474
|
nodes = [];
|
|
273
475
|
active = false;
|
|
274
476
|
}
|
|
275
|
-
// packages/system-api/src/api/model/KinoticNodeInfo.ts
|
|
477
|
+
// packages/system-api/src/api/model/cluster/KinoticNodeInfo.ts
|
|
276
478
|
class KinoticNodeInfo {
|
|
277
479
|
nodeId = "";
|
|
278
480
|
order = 0;
|
|
279
|
-
|
|
280
|
-
|
|
481
|
+
serverName = "";
|
|
482
|
+
addresses = [];
|
|
483
|
+
hostNames = [];
|
|
484
|
+
version = null;
|
|
485
|
+
telemetryServiceName = null;
|
|
486
|
+
telemetryServiceInstanceId = null;
|
|
487
|
+
}
|
|
488
|
+
// packages/system-api/src/api/model/cluster/ServerVulnerabilities.ts
|
|
489
|
+
class ServerVulnerabilities {
|
|
490
|
+
serverName = "";
|
|
491
|
+
version = null;
|
|
492
|
+
nodeCount = 0;
|
|
493
|
+
componentCount = 0;
|
|
494
|
+
findings = [];
|
|
495
|
+
error = null;
|
|
496
|
+
}
|
|
497
|
+
// packages/system-api/src/api/model/license/EnterpriseFeature.ts
|
|
498
|
+
var EnterpriseFeature;
|
|
499
|
+
((EnterpriseFeature) => {
|
|
500
|
+
EnterpriseFeature["AZURE_KEY_VAULT"] = "AZURE_KEY_VAULT";
|
|
501
|
+
EnterpriseFeature["ENTERPRISE_IDENTITY_PROVIDERS"] = "ENTERPRISE_IDENTITY_PROVIDERS";
|
|
502
|
+
})(EnterpriseFeature ||= {});
|
|
503
|
+
// packages/system-api/src/api/model/license/LicenseStatus.ts
|
|
504
|
+
var LicenseStatus;
|
|
505
|
+
((LicenseStatus) => {
|
|
506
|
+
LicenseStatus["ACTIVE"] = "ACTIVE";
|
|
507
|
+
LicenseStatus["GRACE_PERIOD"] = "GRACE_PERIOD";
|
|
508
|
+
LicenseStatus["EXPIRED"] = "EXPIRED";
|
|
509
|
+
})(LicenseStatus ||= {});
|
|
510
|
+
// packages/system-api/src/api/model/license/License.ts
|
|
511
|
+
class License {
|
|
512
|
+
licensee;
|
|
513
|
+
clusterId = null;
|
|
514
|
+
issuedAt = null;
|
|
515
|
+
expiresAt;
|
|
516
|
+
graceEndsAt;
|
|
517
|
+
status;
|
|
518
|
+
features = [];
|
|
519
|
+
constructor(licensee, expiresAt, graceEndsAt, status) {
|
|
520
|
+
this.licensee = licensee;
|
|
521
|
+
this.expiresAt = expiresAt;
|
|
522
|
+
this.graceEndsAt = graceEndsAt;
|
|
523
|
+
this.status = status;
|
|
524
|
+
}
|
|
281
525
|
}
|
|
282
526
|
export {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
VmNodeStatusType,
|
|
287
|
-
VmNodeStatus,
|
|
288
|
-
VmNodeServiceProxy,
|
|
289
|
-
VmNodeRegistration,
|
|
290
|
-
VmNodeOrchestrationServiceProxy,
|
|
291
|
-
VmNode,
|
|
292
|
-
SystemOrganizationService,
|
|
293
|
-
SystemApiPlugin,
|
|
294
|
-
SingleLoggerLevelsDescriptor,
|
|
295
|
-
SYSTEM_API_ZONE8 as SYSTEM_API_ZONE,
|
|
296
|
-
LoggersDescriptor,
|
|
297
|
-
LoggerLevelsDescriptor,
|
|
298
|
-
LogManager,
|
|
299
|
-
LogLevel,
|
|
300
|
-
KinoticNodeInfo,
|
|
301
|
-
KinoticClusterInfoService,
|
|
527
|
+
ClusterVulnerabilityService,
|
|
528
|
+
EnterpriseFeature,
|
|
529
|
+
GroupLoggerLevelsDescriptor,
|
|
302
530
|
KinoticClusterInfo,
|
|
303
|
-
|
|
531
|
+
KinoticClusterInfoService,
|
|
532
|
+
KinoticNodeInfo,
|
|
533
|
+
License,
|
|
534
|
+
LicenseService,
|
|
535
|
+
LicenseStatus,
|
|
536
|
+
LlmConfiguration,
|
|
537
|
+
LlmConfigurationService,
|
|
538
|
+
LlmProviderType,
|
|
539
|
+
LogLevel,
|
|
540
|
+
LogManager,
|
|
541
|
+
LoggerLevelsDescriptor,
|
|
542
|
+
LoggersDescriptor,
|
|
543
|
+
SYSTEM_API_ZONE14 as SYSTEM_API_ZONE,
|
|
544
|
+
ServerVulnerabilities,
|
|
545
|
+
SingleLoggerLevelsDescriptor,
|
|
546
|
+
SystemApiPlugin,
|
|
547
|
+
SystemJobService,
|
|
548
|
+
SystemMemberService,
|
|
549
|
+
SystemOrganizationService,
|
|
550
|
+
TraceLogProperties,
|
|
551
|
+
VmNode,
|
|
552
|
+
VmNodeOrchestrationServiceProxy,
|
|
553
|
+
VmNodeRegistration,
|
|
554
|
+
VmNodeServiceProxy,
|
|
555
|
+
VmNodeStatusType,
|
|
556
|
+
VmProviderType,
|
|
557
|
+
VulnerabilityAdvisoryService,
|
|
558
|
+
WatchEventService,
|
|
559
|
+
WorkloadOrchestrationService,
|
|
560
|
+
WorkloadServiceProxy
|
|
304
561
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/system-api",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.50",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Client API for the Kinotic platform's system plane: the workload and node orchestration services
|
|
5
|
+
"description": "Client API for the Kinotic platform's system plane: the workload and node orchestration services system machines and operators use.",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
@@ -37,14 +37,13 @@
|
|
|
37
37
|
"test": "bun test --pass-with-no-tests",
|
|
38
38
|
"coverage": "bun test --coverage --pass-with-no-tests"
|
|
39
39
|
},
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"@kinotic-ai/management-api": "5.0.0-beta.23"
|
|
42
|
-
},
|
|
43
40
|
"peerDependencies": {
|
|
44
|
-
"@kinotic-ai/core": "
|
|
41
|
+
"@kinotic-ai/core": "^5.0.0-beta.30",
|
|
42
|
+
"@kinotic-ai/management-api": "^5.0.0-beta.80"
|
|
45
43
|
},
|
|
46
44
|
"devDependencies": {
|
|
47
|
-
"@kinotic-ai/core": "5.0.0-beta.
|
|
45
|
+
"@kinotic-ai/core": "5.0.0-beta.30",
|
|
46
|
+
"@kinotic-ai/management-api": "5.0.0-beta.80",
|
|
48
47
|
"@types/bun": "^1.3.9",
|
|
49
48
|
"typescript": "^5.9.3"
|
|
50
49
|
}
|