@kinotic-ai/os-api 1.0.0-beta.0 → 1.0.0-beta.2
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 +64 -0
- package/dist/index.cjs +607 -0
- package/dist/index.d.cts +793 -0
- package/dist/index.d.ts +793 -0
- package/dist/index.js +564 -0
- package/package.json +2 -2
package/dist/index.js
ADDED
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
// packages/os-api/src/api/model/idl/decorators/AutoGeneratedIdDecorator.ts
|
|
2
|
+
import { C3Decorator } from "@kinotic-ai/idl";
|
|
3
|
+
|
|
4
|
+
class AutoGeneratedIdDecorator extends C3Decorator {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.type = "AutoGeneratedId";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
// packages/os-api/src/api/model/idl/decorators/DiscriminatorDecorator.ts
|
|
11
|
+
import { C3Decorator as C3Decorator2 } from "@kinotic-ai/idl";
|
|
12
|
+
|
|
13
|
+
class DiscriminatorDecorator extends C3Decorator2 {
|
|
14
|
+
propertyName;
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.type = "Discriminator";
|
|
18
|
+
}
|
|
19
|
+
withPropertyName(propertyName) {
|
|
20
|
+
this.propertyName = propertyName;
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// packages/os-api/src/api/model/idl/decorators/EntityDecorator.ts
|
|
25
|
+
import { EntityType, MultiTenancyType } from "@kinotic-ai/persistence";
|
|
26
|
+
import { C3Decorator as C3Decorator3 } from "@kinotic-ai/idl";
|
|
27
|
+
|
|
28
|
+
class EntityDecorator extends C3Decorator3 {
|
|
29
|
+
multiTenancyType = MultiTenancyType.NONE;
|
|
30
|
+
entityType = EntityType.TABLE;
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
this.type = "Entity";
|
|
34
|
+
}
|
|
35
|
+
withMultiTenancyType(type) {
|
|
36
|
+
this.multiTenancyType = type;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
withEntityType(type) {
|
|
40
|
+
this.entityType = type;
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// packages/os-api/src/api/model/idl/decorators/EsIndexConfigurationDecorator.ts
|
|
45
|
+
import { C3Decorator as C3Decorator4 } from "@kinotic-ai/idl";
|
|
46
|
+
|
|
47
|
+
class EsIndexConfigurationDecorator extends C3Decorator4 {
|
|
48
|
+
value;
|
|
49
|
+
constructor() {
|
|
50
|
+
super();
|
|
51
|
+
this.type = "EsIndexConfigurationDecorator";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// packages/os-api/src/api/model/idl/decorators/FlattenedDecorator.ts
|
|
55
|
+
import { C3Decorator as C3Decorator5 } from "@kinotic-ai/idl";
|
|
56
|
+
|
|
57
|
+
class FlattenedDecorator extends C3Decorator5 {
|
|
58
|
+
constructor() {
|
|
59
|
+
super();
|
|
60
|
+
this.type = "Flattened";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// packages/os-api/src/api/model/idl/decorators/IdDecorator.ts
|
|
64
|
+
import { C3Decorator as C3Decorator6 } from "@kinotic-ai/idl";
|
|
65
|
+
|
|
66
|
+
class IdDecorator extends C3Decorator6 {
|
|
67
|
+
constructor() {
|
|
68
|
+
super();
|
|
69
|
+
this.type = "Id";
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// packages/os-api/src/api/model/idl/decorators/NestedDecorator.ts
|
|
73
|
+
import { C3Decorator as C3Decorator7 } from "@kinotic-ai/idl";
|
|
74
|
+
|
|
75
|
+
class NestedDecorator extends C3Decorator7 {
|
|
76
|
+
constructor() {
|
|
77
|
+
super();
|
|
78
|
+
this.type = "Nested";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// packages/os-api/src/api/model/idl/decorators/NotIndexedDecorator.ts
|
|
82
|
+
import { C3Decorator as C3Decorator8 } from "@kinotic-ai/idl";
|
|
83
|
+
|
|
84
|
+
class NotIndexedDecorator extends C3Decorator8 {
|
|
85
|
+
constructor() {
|
|
86
|
+
super();
|
|
87
|
+
this.type = "NotIndexedDecorator";
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// packages/os-api/src/api/model/idl/decorators/PolicyDecorator.ts
|
|
91
|
+
import { EntityServiceDecorator } from "@kinotic-ai/persistence";
|
|
92
|
+
|
|
93
|
+
class PolicyDecorator extends EntityServiceDecorator {
|
|
94
|
+
policies;
|
|
95
|
+
constructor(policies) {
|
|
96
|
+
super();
|
|
97
|
+
this.type = "PolicyDecorator";
|
|
98
|
+
this.policies = policies;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function $Policy(policies) {
|
|
102
|
+
return new PolicyDecorator(policies);
|
|
103
|
+
}
|
|
104
|
+
// packages/os-api/src/api/model/idl/decorators/QueryDecorator.ts
|
|
105
|
+
import { C3Decorator as C3Decorator9 } from "@kinotic-ai/idl";
|
|
106
|
+
|
|
107
|
+
class QueryDecorator extends C3Decorator9 {
|
|
108
|
+
statements;
|
|
109
|
+
constructor(statements) {
|
|
110
|
+
super();
|
|
111
|
+
this.type = "Query";
|
|
112
|
+
this.statements = statements;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// packages/os-api/src/api/model/idl/decorators/RoleDecorator.ts
|
|
116
|
+
import { EntityServiceDecorator as EntityServiceDecorator2 } from "@kinotic-ai/persistence";
|
|
117
|
+
|
|
118
|
+
class RoleDecorator extends EntityServiceDecorator2 {
|
|
119
|
+
roles;
|
|
120
|
+
constructor(roles) {
|
|
121
|
+
super();
|
|
122
|
+
this.type = "RoleDecorator";
|
|
123
|
+
this.roles = roles;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function $Role(roles) {
|
|
127
|
+
return new RoleDecorator(roles);
|
|
128
|
+
}
|
|
129
|
+
// packages/os-api/src/api/model/idl/decorators/TenantIdDecorator.ts
|
|
130
|
+
import { C3Decorator as C3Decorator10 } from "@kinotic-ai/idl";
|
|
131
|
+
|
|
132
|
+
class TenantIdDecorator extends C3Decorator10 {
|
|
133
|
+
constructor() {
|
|
134
|
+
super();
|
|
135
|
+
this.type = "TenantIdDecorator";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
// packages/os-api/src/api/model/idl/decorators/TextDecorator.ts
|
|
139
|
+
import { C3Decorator as C3Decorator11 } from "@kinotic-ai/idl";
|
|
140
|
+
|
|
141
|
+
class TextDecorator extends C3Decorator11 {
|
|
142
|
+
constructor() {
|
|
143
|
+
super();
|
|
144
|
+
this.type = "Text";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
// packages/os-api/src/api/model/idl/decorators/TimeReferenceDecorator.ts
|
|
148
|
+
import { C3Decorator as C3Decorator12 } from "@kinotic-ai/idl";
|
|
149
|
+
|
|
150
|
+
class TimeReferenceDecorator extends C3Decorator12 {
|
|
151
|
+
constructor() {
|
|
152
|
+
super();
|
|
153
|
+
this.type = "TimeReferenceDecorator";
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// packages/os-api/src/api/model/idl/decorators/VersionDecorator.ts
|
|
157
|
+
import { C3Decorator as C3Decorator13 } from "@kinotic-ai/idl";
|
|
158
|
+
|
|
159
|
+
class VersionDecorator extends C3Decorator13 {
|
|
160
|
+
constructor() {
|
|
161
|
+
super();
|
|
162
|
+
this.type = "VersionDecorator";
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// packages/os-api/src/api/model/idl/PageC3Type.ts
|
|
166
|
+
import { C3Type } from "@kinotic-ai/idl";
|
|
167
|
+
|
|
168
|
+
class PageC3Type extends C3Type {
|
|
169
|
+
contentType;
|
|
170
|
+
constructor(contentType) {
|
|
171
|
+
super("page");
|
|
172
|
+
this.contentType = contentType;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// packages/os-api/src/api/model/idl/PageableC3Type.ts
|
|
176
|
+
import { C3Type as C3Type2 } from "@kinotic-ai/idl";
|
|
177
|
+
|
|
178
|
+
class PageableC3Type extends C3Type2 {
|
|
179
|
+
constructor() {
|
|
180
|
+
super("pageable");
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// packages/os-api/src/api/model/idl/QueryOptionsC3Type.ts
|
|
184
|
+
import { IntC3Type, ObjectC3Type, StringC3Type } from "@kinotic-ai/idl";
|
|
185
|
+
|
|
186
|
+
class QueryOptionsC3Type extends ObjectC3Type {
|
|
187
|
+
type = "queryOptions";
|
|
188
|
+
constructor() {
|
|
189
|
+
super("QueryOptions", "org.kinotic.structures.domain");
|
|
190
|
+
this.addProperty("timeZone", new StringC3Type);
|
|
191
|
+
this.addProperty("requestTimeout", new IntC3Type);
|
|
192
|
+
this.addProperty("pageTimeout", new StringC3Type);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// packages/os-api/src/api/model/idl/TenantSelectionC3Type.ts
|
|
196
|
+
import { ArrayC3Type, StringC3Type as StringC3Type2 } from "@kinotic-ai/idl";
|
|
197
|
+
|
|
198
|
+
class TenantSelectionC3Type extends ArrayC3Type {
|
|
199
|
+
type = "tenantSelection";
|
|
200
|
+
constructor() {
|
|
201
|
+
super(new StringC3Type2);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// packages/os-api/src/api/model/Application.ts
|
|
205
|
+
class Application {
|
|
206
|
+
id;
|
|
207
|
+
description;
|
|
208
|
+
updated = null;
|
|
209
|
+
enableGraphQL = false;
|
|
210
|
+
enableOpenAPI = false;
|
|
211
|
+
constructor(id, description) {
|
|
212
|
+
this.id = id;
|
|
213
|
+
this.description = description;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// packages/os-api/src/api/model/Project.ts
|
|
217
|
+
class Project {
|
|
218
|
+
id = null;
|
|
219
|
+
applicationId;
|
|
220
|
+
name;
|
|
221
|
+
description;
|
|
222
|
+
sourceOfTruth = null;
|
|
223
|
+
updated = null;
|
|
224
|
+
constructor(id, applicationId, name, description) {
|
|
225
|
+
this.id = id;
|
|
226
|
+
this.applicationId = applicationId;
|
|
227
|
+
this.name = name;
|
|
228
|
+
this.description = description;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// packages/os-api/src/api/model/ProjectType.ts
|
|
232
|
+
var ProjectType;
|
|
233
|
+
((ProjectType2) => {
|
|
234
|
+
ProjectType2[ProjectType2["TYPESCRIPT"] = 0] = "TYPESCRIPT";
|
|
235
|
+
ProjectType2[ProjectType2["GRAPHQL"] = 1] = "GRAPHQL";
|
|
236
|
+
ProjectType2[ProjectType2["GRAPHICAL"] = 2] = "GRAPHICAL";
|
|
237
|
+
ProjectType2[ProjectType2["ELASTICSEARCH"] = 3] = "ELASTICSEARCH";
|
|
238
|
+
})(ProjectType ||= {});
|
|
239
|
+
// packages/os-api/src/api/model/EntityDefinition.ts
|
|
240
|
+
class EntityDefinition {
|
|
241
|
+
id;
|
|
242
|
+
applicationId;
|
|
243
|
+
projectId;
|
|
244
|
+
name;
|
|
245
|
+
entityDefinition;
|
|
246
|
+
description;
|
|
247
|
+
created;
|
|
248
|
+
updated;
|
|
249
|
+
published;
|
|
250
|
+
publishedTimestamp;
|
|
251
|
+
constructor(applicationId, projectId, name, entityDefinition, description) {
|
|
252
|
+
this.applicationId = applicationId;
|
|
253
|
+
this.projectId = projectId;
|
|
254
|
+
this.name = name;
|
|
255
|
+
this.entityDefinition = entityDefinition;
|
|
256
|
+
this.description = description;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// packages/os-api/src/api/model/NamedQueriesDefinition.ts
|
|
260
|
+
class NamedQueriesDefinition {
|
|
261
|
+
id;
|
|
262
|
+
applicationId;
|
|
263
|
+
projectId;
|
|
264
|
+
structure;
|
|
265
|
+
namedQueries;
|
|
266
|
+
constructor(id, applicationId, projectId, structure, namedQueries) {
|
|
267
|
+
this.id = id;
|
|
268
|
+
this.applicationId = applicationId;
|
|
269
|
+
this.projectId = projectId;
|
|
270
|
+
this.structure = structure;
|
|
271
|
+
this.namedQueries = namedQueries;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
// packages/os-api/src/api/model/config/CalculatedPropertyConfiguration.ts
|
|
275
|
+
class CalculatedPropertyConfiguration {
|
|
276
|
+
entityJsonPath;
|
|
277
|
+
propertyName;
|
|
278
|
+
calculatedPropertyFunctionName;
|
|
279
|
+
decorators;
|
|
280
|
+
}
|
|
281
|
+
// packages/os-api/src/api/model/config/EntityConfiguration.ts
|
|
282
|
+
class EntityConfiguration {
|
|
283
|
+
entityName;
|
|
284
|
+
multiTenancyType;
|
|
285
|
+
excludeJsonPaths;
|
|
286
|
+
overrides;
|
|
287
|
+
transforms;
|
|
288
|
+
calculatedProperties;
|
|
289
|
+
}
|
|
290
|
+
// packages/os-api/src/api/model/config/OverrideConfiguration.ts
|
|
291
|
+
class OverrideConfiguration {
|
|
292
|
+
jsonPath;
|
|
293
|
+
propertyDefinition;
|
|
294
|
+
}
|
|
295
|
+
// packages/os-api/src/api/model/config/StructuresProjectConfig.ts
|
|
296
|
+
class StructuresProjectConfig {
|
|
297
|
+
mdl;
|
|
298
|
+
name;
|
|
299
|
+
description;
|
|
300
|
+
application;
|
|
301
|
+
entitiesPaths;
|
|
302
|
+
generatedPath;
|
|
303
|
+
fileExtensionForImports = ".js";
|
|
304
|
+
validate;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
class TypescriptProjectConfig extends StructuresProjectConfig {
|
|
308
|
+
mdl = "ts";
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
class TypescriptExternalProjectConfig extends StructuresProjectConfig {
|
|
312
|
+
mdl = "ts-external";
|
|
313
|
+
externalEntities;
|
|
314
|
+
utilFunctionsPaths;
|
|
315
|
+
}
|
|
316
|
+
// packages/os-api/src/api/model/config/TransformConfiguration.ts
|
|
317
|
+
class TransformConfiguration {
|
|
318
|
+
jsonPath;
|
|
319
|
+
transformerFunctionName;
|
|
320
|
+
}
|
|
321
|
+
// packages/os-api/src/api/model/insights/InsightProgress.ts
|
|
322
|
+
var ProgressType;
|
|
323
|
+
((ProgressType2) => {
|
|
324
|
+
ProgressType2["STARTED"] = "STARTED";
|
|
325
|
+
ProgressType2["ANALYZING"] = "ANALYZING";
|
|
326
|
+
ProgressType2["DISCOVERING_DATA"] = "DISCOVERING_DATA";
|
|
327
|
+
ProgressType2["GENERATING_CODE"] = "GENERATING_CODE";
|
|
328
|
+
ProgressType2["COMPONENTS_READY"] = "COMPONENTS_READY";
|
|
329
|
+
ProgressType2["COMPLETED"] = "COMPLETED";
|
|
330
|
+
ProgressType2["ERROR"] = "ERROR";
|
|
331
|
+
})(ProgressType ||= {});
|
|
332
|
+
// packages/os-api/src/api/services/IApplicationService.ts
|
|
333
|
+
import { CrudServiceProxy } from "@kinotic-ai/core";
|
|
334
|
+
|
|
335
|
+
class ApplicationService extends CrudServiceProxy {
|
|
336
|
+
constructor(kinotic) {
|
|
337
|
+
super(kinotic.serviceProxy("org.kinotic.structures.api.services.ApplicationService"));
|
|
338
|
+
}
|
|
339
|
+
createApplicationIfNotExist(id, description) {
|
|
340
|
+
return this.serviceProxy.invoke("createApplicationIfNotExist", [id, description]);
|
|
341
|
+
}
|
|
342
|
+
syncIndex() {
|
|
343
|
+
return this.serviceProxy.invoke("syncIndex", []);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
// packages/os-api/src/api/services/ILogManager.ts
|
|
347
|
+
var LogLevel;
|
|
348
|
+
((LogLevel2) => {
|
|
349
|
+
LogLevel2["TRACE"] = "TRACE";
|
|
350
|
+
LogLevel2["DEBUG"] = "DEBUG";
|
|
351
|
+
LogLevel2["INFO"] = "INFO";
|
|
352
|
+
LogLevel2["WARN"] = "WARN";
|
|
353
|
+
LogLevel2["ERROR"] = "ERROR";
|
|
354
|
+
LogLevel2["FATAL"] = "FATAL";
|
|
355
|
+
LogLevel2["OFF"] = "OFF";
|
|
356
|
+
})(LogLevel ||= {});
|
|
357
|
+
|
|
358
|
+
class LoggerLevelsDescriptor {
|
|
359
|
+
configuredLevel;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
class GroupLoggerLevelsDescriptor extends LoggerLevelsDescriptor {
|
|
363
|
+
members = [];
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
class SingleLoggerLevelsDescriptor extends LoggerLevelsDescriptor {
|
|
367
|
+
effectiveLevel;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
class LoggersDescriptor {
|
|
371
|
+
levels = [];
|
|
372
|
+
loggerLevels = new Map;
|
|
373
|
+
groups = new Map;
|
|
374
|
+
}
|
|
375
|
+
// packages/os-api/src/api/services/IProjectService.ts
|
|
376
|
+
import { CrudServiceProxy as CrudServiceProxy2, FunctionalIterablePage } from "@kinotic-ai/core";
|
|
377
|
+
|
|
378
|
+
class ProjectService extends CrudServiceProxy2 {
|
|
379
|
+
constructor(kinotic) {
|
|
380
|
+
super(kinotic.serviceProxy("org.kinotic.structures.api.services.ProjectService"));
|
|
381
|
+
}
|
|
382
|
+
countForApplication(applicationId) {
|
|
383
|
+
return this.serviceProxy.invoke("countForApplication", [applicationId]);
|
|
384
|
+
}
|
|
385
|
+
createProjectIfNotExist(project) {
|
|
386
|
+
return this.serviceProxy.invoke("createProjectIfNotExist", [project]);
|
|
387
|
+
}
|
|
388
|
+
async findAllForApplication(applicationId, pageable) {
|
|
389
|
+
const page = await this.findAllForApplicationSinglePage(applicationId, pageable);
|
|
390
|
+
return new FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForApplicationSinglePage(applicationId, pageable2));
|
|
391
|
+
}
|
|
392
|
+
findAllForApplicationSinglePage(applicationId, pageable) {
|
|
393
|
+
return this.serviceProxy.invoke("findAllForApplication", [applicationId, pageable]);
|
|
394
|
+
}
|
|
395
|
+
syncIndex() {
|
|
396
|
+
return this.serviceProxy.invoke("syncIndex", []);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
// packages/os-api/src/api/services/LogManager.ts
|
|
400
|
+
class LogManager {
|
|
401
|
+
serviceProxy;
|
|
402
|
+
constructor(kinotic) {
|
|
403
|
+
this.serviceProxy = kinotic.serviceProxy("org.kinotic.os.api.services.LogManager");
|
|
404
|
+
}
|
|
405
|
+
loggers(nodeId) {
|
|
406
|
+
return this.serviceProxy.invoke("loggers", null, nodeId);
|
|
407
|
+
}
|
|
408
|
+
async loggerLevels(nodeId, name) {
|
|
409
|
+
const data = await this.serviceProxy.invoke("loggerLevels", [name], nodeId);
|
|
410
|
+
let ret = null;
|
|
411
|
+
if (data.hasOwnProperty("members")) {
|
|
412
|
+
ret = new GroupLoggerLevelsDescriptor;
|
|
413
|
+
} else if (data.hasOwnProperty("effectiveLevel")) {
|
|
414
|
+
ret = new SingleLoggerLevelsDescriptor;
|
|
415
|
+
} else {
|
|
416
|
+
ret = new LoggerLevelsDescriptor;
|
|
417
|
+
}
|
|
418
|
+
Object.assign(ret, data);
|
|
419
|
+
return ret;
|
|
420
|
+
}
|
|
421
|
+
configureLogLevel(nodeId, name, level) {
|
|
422
|
+
return this.serviceProxy.invoke("configureLogLevel", [name, level], nodeId);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
// packages/os-api/src/api/services/IEntityDefinitionService.ts
|
|
426
|
+
import { CrudServiceProxy as CrudServiceProxy3, FunctionalIterablePage as FunctionalIterablePage2 } from "@kinotic-ai/core";
|
|
427
|
+
|
|
428
|
+
class EntityDefinitionService extends CrudServiceProxy3 {
|
|
429
|
+
constructor(kinotic) {
|
|
430
|
+
super(kinotic.serviceProxy("org.kinotic.persistence.api.services.EntityDefinitionService"));
|
|
431
|
+
}
|
|
432
|
+
countForApplication(applicationId) {
|
|
433
|
+
return this.serviceProxy.invoke("countForApplication", [applicationId]);
|
|
434
|
+
}
|
|
435
|
+
countForProject(projectId) {
|
|
436
|
+
return this.serviceProxy.invoke("countForProject", [projectId]);
|
|
437
|
+
}
|
|
438
|
+
findAllForApplicationSinglePage(applicationId, pageable) {
|
|
439
|
+
return this.serviceProxy.invoke("findAllForApplication", [applicationId, pageable]);
|
|
440
|
+
}
|
|
441
|
+
async findAllForApplication(applicationId, pageable) {
|
|
442
|
+
const page = await this.findAllForApplicationSinglePage(applicationId, pageable);
|
|
443
|
+
return new FunctionalIterablePage2(pageable, page, (pageable2) => this.findAllForApplicationSinglePage(applicationId, pageable2));
|
|
444
|
+
}
|
|
445
|
+
findAllPublishedForApplication(applicationId, pageable) {
|
|
446
|
+
return this.serviceProxy.invoke("findAllPublishedForApplication", [applicationId, pageable]);
|
|
447
|
+
}
|
|
448
|
+
async findAllForProject(projectId, pageable) {
|
|
449
|
+
const page = await this.findAllForProjectSinglePage(projectId, pageable);
|
|
450
|
+
return new FunctionalIterablePage2(pageable, page, (pageable2) => this.findAllForProjectSinglePage(projectId, pageable2));
|
|
451
|
+
}
|
|
452
|
+
findAllForProjectSinglePage(projectId, pageable) {
|
|
453
|
+
return this.serviceProxy.invoke("findAllForProject", [projectId, pageable]);
|
|
454
|
+
}
|
|
455
|
+
publish(entityDefinitionId) {
|
|
456
|
+
return this.serviceProxy.invoke("publish", [entityDefinitionId]);
|
|
457
|
+
}
|
|
458
|
+
unPublish(entityDefinitionId) {
|
|
459
|
+
return this.serviceProxy.invoke("unPublish", [entityDefinitionId]);
|
|
460
|
+
}
|
|
461
|
+
syncIndex() {
|
|
462
|
+
return this.serviceProxy.invoke("syncIndex", []);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
// packages/os-api/src/api/services/INamedQueriesService.ts
|
|
466
|
+
import { CrudServiceProxy as CrudServiceProxy4 } from "@kinotic-ai/core";
|
|
467
|
+
|
|
468
|
+
class NamedQueriesService extends CrudServiceProxy4 {
|
|
469
|
+
constructor(kinotic) {
|
|
470
|
+
super(kinotic.serviceProxy("org.kinotic.persistence.api.services.NamedQueriesService"));
|
|
471
|
+
}
|
|
472
|
+
syncIndex() {
|
|
473
|
+
return this.serviceProxy.invoke("syncIndex", []);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
// packages/os-api/src/api/services/IMigrationService.ts
|
|
477
|
+
class MigrationService {
|
|
478
|
+
serviceProxy;
|
|
479
|
+
constructor(kinotic) {
|
|
480
|
+
this.serviceProxy = kinotic.serviceProxy("org.kinotic.persistence.api.services.MigrationService");
|
|
481
|
+
}
|
|
482
|
+
executeMigrations(migrationRequest) {
|
|
483
|
+
return this.serviceProxy.invoke("executeMigrations", [migrationRequest]);
|
|
484
|
+
}
|
|
485
|
+
getLastAppliedMigrationVersion(projectId) {
|
|
486
|
+
return this.serviceProxy.invoke("getLastAppliedMigrationVersion", [projectId]);
|
|
487
|
+
}
|
|
488
|
+
isMigrationApplied(projectId, version) {
|
|
489
|
+
return this.serviceProxy.invoke("isMigrationApplied", [projectId, version]);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
// packages/os-api/src/api/services/IDataInsightsService.ts
|
|
493
|
+
class DataInsightsService {
|
|
494
|
+
serviceProxy;
|
|
495
|
+
constructor(kinotic) {
|
|
496
|
+
this.serviceProxy = kinotic.serviceProxy("org.kinotic.persistence.api.services.insights.DataInsightsService");
|
|
497
|
+
}
|
|
498
|
+
processRequest(request) {
|
|
499
|
+
return this.serviceProxy.invokeStream("processRequest", [request]);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
// packages/os-api/src/api/OsApiPlugin.ts
|
|
503
|
+
var OsApiPlugin = {
|
|
504
|
+
install(kinotic) {
|
|
505
|
+
return {
|
|
506
|
+
applications: new ApplicationService(kinotic),
|
|
507
|
+
projects: new ProjectService(kinotic),
|
|
508
|
+
logManager: new LogManager(kinotic),
|
|
509
|
+
entityDefinitions: new EntityDefinitionService(kinotic),
|
|
510
|
+
namedQueries: new NamedQueriesService(kinotic),
|
|
511
|
+
migrations: new MigrationService(kinotic),
|
|
512
|
+
dataInsights: new DataInsightsService(kinotic)
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
export {
|
|
517
|
+
VersionDecorator,
|
|
518
|
+
TypescriptProjectConfig,
|
|
519
|
+
TypescriptExternalProjectConfig,
|
|
520
|
+
TransformConfiguration,
|
|
521
|
+
TimeReferenceDecorator,
|
|
522
|
+
TextDecorator,
|
|
523
|
+
TenantSelectionC3Type,
|
|
524
|
+
TenantIdDecorator,
|
|
525
|
+
StructuresProjectConfig,
|
|
526
|
+
SingleLoggerLevelsDescriptor,
|
|
527
|
+
RoleDecorator,
|
|
528
|
+
QueryOptionsC3Type,
|
|
529
|
+
QueryDecorator,
|
|
530
|
+
ProjectType,
|
|
531
|
+
ProjectService,
|
|
532
|
+
Project,
|
|
533
|
+
ProgressType,
|
|
534
|
+
PolicyDecorator,
|
|
535
|
+
PageableC3Type,
|
|
536
|
+
PageC3Type,
|
|
537
|
+
OverrideConfiguration,
|
|
538
|
+
OsApiPlugin,
|
|
539
|
+
NotIndexedDecorator,
|
|
540
|
+
NestedDecorator,
|
|
541
|
+
NamedQueriesService,
|
|
542
|
+
NamedQueriesDefinition,
|
|
543
|
+
MigrationService,
|
|
544
|
+
LoggersDescriptor,
|
|
545
|
+
LoggerLevelsDescriptor,
|
|
546
|
+
LogManager,
|
|
547
|
+
LogLevel,
|
|
548
|
+
IdDecorator,
|
|
549
|
+
GroupLoggerLevelsDescriptor,
|
|
550
|
+
FlattenedDecorator,
|
|
551
|
+
EsIndexConfigurationDecorator,
|
|
552
|
+
EntityDefinitionService,
|
|
553
|
+
EntityDefinition,
|
|
554
|
+
EntityDecorator,
|
|
555
|
+
EntityConfiguration,
|
|
556
|
+
DiscriminatorDecorator,
|
|
557
|
+
DataInsightsService,
|
|
558
|
+
CalculatedPropertyConfiguration,
|
|
559
|
+
AutoGeneratedIdDecorator,
|
|
560
|
+
ApplicationService,
|
|
561
|
+
Application,
|
|
562
|
+
$Role,
|
|
563
|
+
$Policy
|
|
564
|
+
};
|