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