@kinotic-ai/system-api 5.0.0-beta.5 → 5.0.0-beta.51
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 +353 -95
- package/dist/index.d.cts +537 -101
- package/dist/index.d.ts +537 -101
- package/dist/index.js +355 -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,74 @@ 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
|
+
findAdvisoriesOf(ecosystem, pageable) {
|
|
280
|
+
return this.serviceProxy.invoke("findAdvisoriesOf", [ecosystem, pageable]);
|
|
281
|
+
}
|
|
282
|
+
findAlerts(advisoryId, pageable) {
|
|
283
|
+
return this.serviceProxy.invoke("findAlerts", [advisoryId, pageable]);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
214
287
|
// packages/system-api/src/api/services/ISystemOrganizationService.ts
|
|
215
288
|
import {
|
|
216
|
-
SYSTEM_API_ZONE as
|
|
289
|
+
SYSTEM_API_ZONE as SYSTEM_API_ZONE8
|
|
217
290
|
} from "@kinotic-ai/management-api";
|
|
218
291
|
|
|
219
292
|
class SystemOrganizationService {
|
|
220
293
|
serviceProxy;
|
|
221
294
|
constructor(kinotic) {
|
|
222
|
-
this.serviceProxy = kinotic.serviceProxy(`${
|
|
295
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE8}~org.kinotic.system.api.services.SystemOrganizationService`);
|
|
223
296
|
}
|
|
224
297
|
findOrganizations(pageable) {
|
|
225
298
|
return this.serviceProxy.invoke("findOrganizations", [pageable]);
|
|
@@ -239,17 +312,143 @@ class SystemOrganizationService {
|
|
|
239
312
|
findProjects(organizationId, pageable) {
|
|
240
313
|
return this.serviceProxy.invoke("findProjects", [organizationId, pageable]);
|
|
241
314
|
}
|
|
242
|
-
findMembers(organizationId,
|
|
243
|
-
return this.serviceProxy.invoke("findMembers", [organizationId,
|
|
315
|
+
findMembers(organizationId, pageable) {
|
|
316
|
+
return this.serviceProxy.invoke("findMembers", [organizationId, pageable]);
|
|
317
|
+
}
|
|
318
|
+
searchMembers(searchText, organizationId, pageable) {
|
|
319
|
+
return this.serviceProxy.invoke("searchMembers", [searchText, organizationId, pageable]);
|
|
244
320
|
}
|
|
245
|
-
|
|
246
|
-
return this.serviceProxy.invoke("
|
|
321
|
+
findApplicationUsers(organizationId, applicationId, pageable) {
|
|
322
|
+
return this.serviceProxy.invoke("findApplicationUsers", [organizationId, applicationId, pageable]);
|
|
323
|
+
}
|
|
324
|
+
searchApplicationUsers(searchText, organizationId, applicationId, pageable) {
|
|
325
|
+
return this.serviceProxy.invoke("searchApplicationUsers", [searchText, organizationId, applicationId, pageable]);
|
|
247
326
|
}
|
|
248
327
|
findPendingInvites(organizationId, applicationId, pageable) {
|
|
249
328
|
return this.serviceProxy.invoke("findPendingInvites", [organizationId, applicationId, pageable]);
|
|
250
329
|
}
|
|
251
330
|
}
|
|
252
331
|
|
|
332
|
+
// packages/system-api/src/api/services/ISystemMemberService.ts
|
|
333
|
+
import {
|
|
334
|
+
SYSTEM_API_ZONE as SYSTEM_API_ZONE9
|
|
335
|
+
} from "@kinotic-ai/management-api";
|
|
336
|
+
|
|
337
|
+
class SystemMemberService {
|
|
338
|
+
serviceProxy;
|
|
339
|
+
constructor(kinotic) {
|
|
340
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE9}~org.kinotic.system.api.services.SystemMemberService`);
|
|
341
|
+
}
|
|
342
|
+
findUsers(pageable) {
|
|
343
|
+
return this.serviceProxy.invoke("findUsers", [pageable]);
|
|
344
|
+
}
|
|
345
|
+
searchUsers(searchText, pageable) {
|
|
346
|
+
return this.serviceProxy.invoke("searchUsers", [searchText, pageable]);
|
|
347
|
+
}
|
|
348
|
+
addUser(email, displayName) {
|
|
349
|
+
return this.serviceProxy.invoke("addUser", [email, displayName]);
|
|
350
|
+
}
|
|
351
|
+
setUserEnabled(userId, enabled) {
|
|
352
|
+
return this.serviceProxy.invoke("setUserEnabled", [userId, enabled]);
|
|
353
|
+
}
|
|
354
|
+
resetUserPassword(userId) {
|
|
355
|
+
return this.serviceProxy.invoke("resetUserPassword", [userId]);
|
|
356
|
+
}
|
|
357
|
+
findMachines(pageable) {
|
|
358
|
+
return this.serviceProxy.invoke("findMachines", [pageable]);
|
|
359
|
+
}
|
|
360
|
+
createMachine(displayName) {
|
|
361
|
+
return this.serviceProxy.invoke("createMachine", [displayName]);
|
|
362
|
+
}
|
|
363
|
+
rotateSecret(machineId) {
|
|
364
|
+
return this.serviceProxy.invoke("rotateSecret", [machineId]);
|
|
365
|
+
}
|
|
366
|
+
setMachineEnabled(machineId, enabled) {
|
|
367
|
+
return this.serviceProxy.invoke("setMachineEnabled", [machineId, enabled]);
|
|
368
|
+
}
|
|
369
|
+
removeMachine(machineId) {
|
|
370
|
+
return this.serviceProxy.invoke("removeMachine", [machineId]);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// packages/system-api/src/api/services/IWatchEventService.ts
|
|
375
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE10 } from "@kinotic-ai/management-api";
|
|
376
|
+
import { FunctionalIterablePage as FunctionalIterablePage3 } from "@kinotic-ai/core";
|
|
377
|
+
|
|
378
|
+
class WatchEventService {
|
|
379
|
+
serviceProxy;
|
|
380
|
+
constructor(kinotic) {
|
|
381
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE10}~org.kinotic.system.api.services.WatchEventService`);
|
|
382
|
+
}
|
|
383
|
+
async findAll(pageable) {
|
|
384
|
+
const page = await this.findAllSinglePage(pageable);
|
|
385
|
+
return new FunctionalIterablePage3(pageable, page, (pageable) => this.findAllSinglePage(pageable));
|
|
386
|
+
}
|
|
387
|
+
findAllSinglePage(pageable) {
|
|
388
|
+
return this.serviceProxy.invoke("findAll", [pageable]);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// packages/system-api/src/api/services/ILlmConfigurationService.ts
|
|
393
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE11 } from "@kinotic-ai/management-api";
|
|
394
|
+
|
|
395
|
+
class LlmConfigurationService {
|
|
396
|
+
serviceProxy;
|
|
397
|
+
constructor(kinotic) {
|
|
398
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE11}~org.kinotic.system.api.services.LlmConfigurationService`);
|
|
399
|
+
}
|
|
400
|
+
findAll(pageable) {
|
|
401
|
+
return this.serviceProxy.invoke("findAll", [pageable]);
|
|
402
|
+
}
|
|
403
|
+
findById(id) {
|
|
404
|
+
return this.serviceProxy.invoke("findById", [id]);
|
|
405
|
+
}
|
|
406
|
+
findByName(name) {
|
|
407
|
+
return this.serviceProxy.invoke("findByName", [name]);
|
|
408
|
+
}
|
|
409
|
+
save(configuration, apiKey) {
|
|
410
|
+
return this.serviceProxy.invoke("save", [configuration, apiKey]);
|
|
411
|
+
}
|
|
412
|
+
deleteById(id) {
|
|
413
|
+
return this.serviceProxy.invoke("deleteById", [id]);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// packages/system-api/src/api/services/ISystemJobService.ts
|
|
418
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE12 } from "@kinotic-ai/management-api";
|
|
419
|
+
|
|
420
|
+
class SystemJobService {
|
|
421
|
+
serviceProxy;
|
|
422
|
+
constructor(kinotic) {
|
|
423
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE12}~org.kinotic.system.api.services.SystemJobService`);
|
|
424
|
+
}
|
|
425
|
+
findSystemJobs() {
|
|
426
|
+
return this.serviceProxy.invoke("findSystemJobs", []);
|
|
427
|
+
}
|
|
428
|
+
startSystemJob(name) {
|
|
429
|
+
return this.serviceProxy.invoke("startSystemJob", [name]);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// packages/system-api/src/api/services/ILicenseService.ts
|
|
434
|
+
import { SYSTEM_API_ZONE as SYSTEM_API_ZONE13 } from "@kinotic-ai/management-api";
|
|
435
|
+
|
|
436
|
+
class LicenseService {
|
|
437
|
+
serviceProxy;
|
|
438
|
+
constructor(kinotic) {
|
|
439
|
+
this.serviceProxy = kinotic.serviceProxy(`${SYSTEM_API_ZONE13}~org.kinotic.system.api.services.LicenseService`);
|
|
440
|
+
}
|
|
441
|
+
findCurrent() {
|
|
442
|
+
return this.serviceProxy.invoke("findCurrent", []);
|
|
443
|
+
}
|
|
444
|
+
install(licenseKey) {
|
|
445
|
+
return this.serviceProxy.invoke("install", [licenseKey]);
|
|
446
|
+
}
|
|
447
|
+
findClusterId() {
|
|
448
|
+
return this.serviceProxy.invoke("findClusterId", []);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
253
452
|
// packages/system-api/src/api/SystemApiPlugin.ts
|
|
254
453
|
var SystemApiPlugin = {
|
|
255
454
|
install(kinotic) {
|
|
@@ -259,46 +458,107 @@ var SystemApiPlugin = {
|
|
|
259
458
|
workloadOrchestration: new WorkloadOrchestrationService(kinotic),
|
|
260
459
|
logManager: new LogManager(kinotic),
|
|
261
460
|
clusterInfo: new KinoticClusterInfoService(kinotic),
|
|
262
|
-
|
|
461
|
+
clusterVulnerabilities: new ClusterVulnerabilityService(kinotic),
|
|
462
|
+
vulnerabilityAdvisories: new VulnerabilityAdvisoryService(kinotic),
|
|
463
|
+
systemOrganizations: new SystemOrganizationService(kinotic),
|
|
464
|
+
systemMembers: new SystemMemberService(kinotic),
|
|
465
|
+
watchEvents: new WatchEventService(kinotic),
|
|
466
|
+
llmConfigurations: new LlmConfigurationService(kinotic),
|
|
467
|
+
systemJobs: new SystemJobService(kinotic),
|
|
468
|
+
licenses: new LicenseService(kinotic)
|
|
263
469
|
};
|
|
264
470
|
}
|
|
265
471
|
};
|
|
266
|
-
// packages/system-api/src/api/model/KinoticClusterInfo.ts
|
|
472
|
+
// packages/system-api/src/api/model/cluster/KinoticClusterInfo.ts
|
|
267
473
|
class KinoticClusterInfo {
|
|
268
|
-
localNodeId = "";
|
|
269
474
|
serverNodeCount = 0;
|
|
270
475
|
topologyVersion = 0;
|
|
271
476
|
clusterState = "";
|
|
272
477
|
nodes = [];
|
|
273
478
|
active = false;
|
|
274
479
|
}
|
|
275
|
-
// packages/system-api/src/api/model/KinoticNodeInfo.ts
|
|
480
|
+
// packages/system-api/src/api/model/cluster/KinoticNodeInfo.ts
|
|
276
481
|
class KinoticNodeInfo {
|
|
277
482
|
nodeId = "";
|
|
278
483
|
order = 0;
|
|
279
|
-
|
|
280
|
-
|
|
484
|
+
serverName = "";
|
|
485
|
+
addresses = [];
|
|
486
|
+
hostNames = [];
|
|
487
|
+
version = null;
|
|
488
|
+
telemetryServiceName = null;
|
|
489
|
+
telemetryServiceInstanceId = null;
|
|
490
|
+
}
|
|
491
|
+
// packages/system-api/src/api/model/cluster/ServerVulnerabilities.ts
|
|
492
|
+
class ServerVulnerabilities {
|
|
493
|
+
serverName = "";
|
|
494
|
+
version = null;
|
|
495
|
+
nodeCount = 0;
|
|
496
|
+
componentCount = 0;
|
|
497
|
+
findings = [];
|
|
498
|
+
error = null;
|
|
499
|
+
}
|
|
500
|
+
// packages/system-api/src/api/model/license/EnterpriseFeature.ts
|
|
501
|
+
var EnterpriseFeature;
|
|
502
|
+
((EnterpriseFeature) => {
|
|
503
|
+
EnterpriseFeature["AZURE_KEY_VAULT"] = "AZURE_KEY_VAULT";
|
|
504
|
+
EnterpriseFeature["ENTERPRISE_IDENTITY_PROVIDERS"] = "ENTERPRISE_IDENTITY_PROVIDERS";
|
|
505
|
+
})(EnterpriseFeature ||= {});
|
|
506
|
+
// packages/system-api/src/api/model/license/LicenseStatus.ts
|
|
507
|
+
var LicenseStatus;
|
|
508
|
+
((LicenseStatus) => {
|
|
509
|
+
LicenseStatus["ACTIVE"] = "ACTIVE";
|
|
510
|
+
LicenseStatus["GRACE_PERIOD"] = "GRACE_PERIOD";
|
|
511
|
+
LicenseStatus["EXPIRED"] = "EXPIRED";
|
|
512
|
+
})(LicenseStatus ||= {});
|
|
513
|
+
// packages/system-api/src/api/model/license/License.ts
|
|
514
|
+
class License {
|
|
515
|
+
licensee;
|
|
516
|
+
clusterId = null;
|
|
517
|
+
issuedAt = null;
|
|
518
|
+
expiresAt;
|
|
519
|
+
graceEndsAt;
|
|
520
|
+
status;
|
|
521
|
+
features = [];
|
|
522
|
+
constructor(licensee, expiresAt, graceEndsAt, status) {
|
|
523
|
+
this.licensee = licensee;
|
|
524
|
+
this.expiresAt = expiresAt;
|
|
525
|
+
this.graceEndsAt = graceEndsAt;
|
|
526
|
+
this.status = status;
|
|
527
|
+
}
|
|
281
528
|
}
|
|
282
529
|
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,
|
|
530
|
+
ClusterVulnerabilityService,
|
|
531
|
+
EnterpriseFeature,
|
|
532
|
+
GroupLoggerLevelsDescriptor,
|
|
302
533
|
KinoticClusterInfo,
|
|
303
|
-
|
|
534
|
+
KinoticClusterInfoService,
|
|
535
|
+
KinoticNodeInfo,
|
|
536
|
+
License,
|
|
537
|
+
LicenseService,
|
|
538
|
+
LicenseStatus,
|
|
539
|
+
LlmConfiguration,
|
|
540
|
+
LlmConfigurationService,
|
|
541
|
+
LlmProviderType,
|
|
542
|
+
LogLevel,
|
|
543
|
+
LogManager,
|
|
544
|
+
LoggerLevelsDescriptor,
|
|
545
|
+
LoggersDescriptor,
|
|
546
|
+
SYSTEM_API_ZONE14 as SYSTEM_API_ZONE,
|
|
547
|
+
ServerVulnerabilities,
|
|
548
|
+
SingleLoggerLevelsDescriptor,
|
|
549
|
+
SystemApiPlugin,
|
|
550
|
+
SystemJobService,
|
|
551
|
+
SystemMemberService,
|
|
552
|
+
SystemOrganizationService,
|
|
553
|
+
TraceLogProperties,
|
|
554
|
+
VmNode,
|
|
555
|
+
VmNodeOrchestrationServiceProxy,
|
|
556
|
+
VmNodeRegistration,
|
|
557
|
+
VmNodeServiceProxy,
|
|
558
|
+
VmNodeStatusType,
|
|
559
|
+
VmProviderType,
|
|
560
|
+
VulnerabilityAdvisoryService,
|
|
561
|
+
WatchEventService,
|
|
562
|
+
WorkloadOrchestrationService,
|
|
563
|
+
WorkloadServiceProxy
|
|
304
564
|
};
|
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.51",
|
|
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.81"
|
|
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.81",
|
|
48
47
|
"@types/bun": "^1.3.9",
|
|
49
48
|
"typescript": "^5.9.3"
|
|
50
49
|
}
|