@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.d.cts
ADDED
|
@@ -0,0 +1,793 @@
|
|
|
1
|
+
import { C3Decorator } from "@kinotic-ai/idl";
|
|
2
|
+
/**
|
|
3
|
+
* Signifies the ID field of an entity, The ID will be auto generated.
|
|
4
|
+
*/
|
|
5
|
+
declare class AutoGeneratedIdDecorator extends C3Decorator {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
import { C3Decorator as C3Decorator2 } from "@kinotic-ai/idl";
|
|
9
|
+
/**
|
|
10
|
+
* Specifies the discriminator field for polymorphic entities.
|
|
11
|
+
*/
|
|
12
|
+
declare class DiscriminatorDecorator extends C3Decorator2 {
|
|
13
|
+
propertyName?: string;
|
|
14
|
+
constructor();
|
|
15
|
+
withPropertyName(propertyName: string): DiscriminatorDecorator;
|
|
16
|
+
}
|
|
17
|
+
import { EntityType, MultiTenancyType } from "@kinotic-ai/persistence";
|
|
18
|
+
import { C3Decorator as C3Decorator3 } from "@kinotic-ai/idl";
|
|
19
|
+
/**
|
|
20
|
+
* Signifies that a class is an entity.
|
|
21
|
+
*/
|
|
22
|
+
declare class EntityDecorator extends C3Decorator3 {
|
|
23
|
+
multiTenancyType: MultiTenancyType;
|
|
24
|
+
entityType: EntityType;
|
|
25
|
+
constructor();
|
|
26
|
+
withMultiTenancyType(type: MultiTenancyType): EntityDecorator;
|
|
27
|
+
withEntityType(type: EntityType): EntityDecorator;
|
|
28
|
+
}
|
|
29
|
+
import { EsIndexConfigurationData } from "@/api/model/idl/decorators/EsIndexConfigurationData";
|
|
30
|
+
import { C3Decorator as C3Decorator4 } from "@kinotic-ai/idl";
|
|
31
|
+
declare class EsIndexConfigurationDecorator extends C3Decorator4 {
|
|
32
|
+
value: EsIndexConfigurationData;
|
|
33
|
+
constructor();
|
|
34
|
+
}
|
|
35
|
+
import { C3Decorator as C3Decorator5 } from "@kinotic-ai/idl";
|
|
36
|
+
/**
|
|
37
|
+
* Signifies that an object should be stored as a flattened json.
|
|
38
|
+
* This will not be indexed, and thus not searchable.
|
|
39
|
+
*/
|
|
40
|
+
declare class FlattenedDecorator extends C3Decorator5 {
|
|
41
|
+
constructor();
|
|
42
|
+
}
|
|
43
|
+
import { C3Decorator as C3Decorator6 } from "@kinotic-ai/idl";
|
|
44
|
+
/**
|
|
45
|
+
* Signifies the ID field of an entity, The value must be a string and provided by the client.
|
|
46
|
+
*/
|
|
47
|
+
declare class IdDecorator extends C3Decorator6 {
|
|
48
|
+
constructor();
|
|
49
|
+
}
|
|
50
|
+
import { C3Decorator as C3Decorator7 } from "@kinotic-ai/idl";
|
|
51
|
+
/**
|
|
52
|
+
* Marks a property as a nested object.
|
|
53
|
+
*/
|
|
54
|
+
declare class NestedDecorator extends C3Decorator7 {
|
|
55
|
+
constructor();
|
|
56
|
+
}
|
|
57
|
+
import { C3Decorator as C3Decorator8 } from "@kinotic-ai/idl";
|
|
58
|
+
/**
|
|
59
|
+
* Specifies that a field should not be indexed in Elasticsearch.
|
|
60
|
+
*/
|
|
61
|
+
declare class NotIndexedDecorator extends C3Decorator8 {
|
|
62
|
+
constructor();
|
|
63
|
+
}
|
|
64
|
+
import { EntityServiceDecorator } from "@kinotic-ai/persistence";
|
|
65
|
+
declare class PolicyDecorator extends EntityServiceDecorator {
|
|
66
|
+
policies: string[][];
|
|
67
|
+
constructor(policies: string[][]);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Provides a mechanism to apply the @Policy decorator to an {@link EntityService}
|
|
71
|
+
* @param policies to be supplied
|
|
72
|
+
*/
|
|
73
|
+
declare function $Policy(policies: string[][]): PolicyDecorator;
|
|
74
|
+
import { C3Decorator as C3Decorator9 } from "@kinotic-ai/idl";
|
|
75
|
+
declare class QueryDecorator extends C3Decorator9 {
|
|
76
|
+
statements: string;
|
|
77
|
+
constructor(statements: string);
|
|
78
|
+
}
|
|
79
|
+
import { EntityServiceDecorator as EntityServiceDecorator2 } from "@kinotic-ai/persistence";
|
|
80
|
+
declare class RoleDecorator extends EntityServiceDecorator2 {
|
|
81
|
+
roles: string[];
|
|
82
|
+
constructor(roles: string[]);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Provides a mechanism to apply the @Role decorator to an {@link EntityService}
|
|
86
|
+
* @param roles to be supplied
|
|
87
|
+
*/
|
|
88
|
+
declare function $Role(roles: string[]): RoleDecorator;
|
|
89
|
+
import { C3Decorator as C3Decorator10 } from "@kinotic-ai/idl";
|
|
90
|
+
/**
|
|
91
|
+
* Denotes the field that will hold the tenant id to use as the Multi Tenant discriminator field
|
|
92
|
+
* When used this will enable optimistic locking for a Structure / Entity
|
|
93
|
+
*/
|
|
94
|
+
declare class TenantIdDecorator extends C3Decorator10 {
|
|
95
|
+
constructor();
|
|
96
|
+
}
|
|
97
|
+
import { C3Decorator as C3Decorator11 } from "@kinotic-ai/idl";
|
|
98
|
+
/**
|
|
99
|
+
* Signals that a property is a text field, and will be full text indexed.
|
|
100
|
+
*/
|
|
101
|
+
declare class TextDecorator extends C3Decorator11 {
|
|
102
|
+
constructor();
|
|
103
|
+
}
|
|
104
|
+
import { C3Decorator as C3Decorator12 } from "@kinotic-ai/idl";
|
|
105
|
+
/**
|
|
106
|
+
* This is used for data streams to signify the field that should be used as the time reference.
|
|
107
|
+
*/
|
|
108
|
+
declare class TimeReferenceDecorator extends C3Decorator12 {
|
|
109
|
+
constructor();
|
|
110
|
+
}
|
|
111
|
+
import { C3Decorator as C3Decorator13 } from "@kinotic-ai/idl";
|
|
112
|
+
/**
|
|
113
|
+
* Signifies the Version field of an entity, The value must be a string and will be automatically populated by the server.
|
|
114
|
+
* When used this will enable optimistic locking for a Structure / Entity
|
|
115
|
+
*/
|
|
116
|
+
declare class VersionDecorator extends C3Decorator13 {
|
|
117
|
+
constructor();
|
|
118
|
+
}
|
|
119
|
+
import { C3Type, ObjectC3Type } from "@kinotic-ai/idl";
|
|
120
|
+
/**
|
|
121
|
+
* This is a placeholder for the Page type.
|
|
122
|
+
* This is not a complete type but a placeholder for the server to know what to expect.
|
|
123
|
+
*/
|
|
124
|
+
declare class PageC3Type extends C3Type {
|
|
125
|
+
/**
|
|
126
|
+
* The {@link ObjectC3Type} of the content of the page
|
|
127
|
+
* The actual page content will be a list of this type
|
|
128
|
+
*/
|
|
129
|
+
contentType: ObjectC3Type;
|
|
130
|
+
constructor(contentType: ObjectC3Type);
|
|
131
|
+
}
|
|
132
|
+
import { C3Type as C3Type2 } from "@kinotic-ai/idl";
|
|
133
|
+
/**
|
|
134
|
+
* This is a placeholder for the Pageable type.
|
|
135
|
+
* This is not a complete type but a placeholder for the server to know what to expect.
|
|
136
|
+
*/
|
|
137
|
+
declare class PageableC3Type extends C3Type2 {
|
|
138
|
+
constructor();
|
|
139
|
+
}
|
|
140
|
+
import { ObjectC3Type as ObjectC3Type2 } from "@kinotic-ai/idl";
|
|
141
|
+
/**
|
|
142
|
+
* Represents a {@link QueryOptions} type.
|
|
143
|
+
* This is used to specify options that will be used when a Named Query is executed.
|
|
144
|
+
*/
|
|
145
|
+
declare class QueryOptionsC3Type extends ObjectC3Type2 {
|
|
146
|
+
readonly type: string;
|
|
147
|
+
constructor();
|
|
148
|
+
}
|
|
149
|
+
import { ArrayC3Type } from "@kinotic-ai/idl";
|
|
150
|
+
/**
|
|
151
|
+
* Represents a {@link TenantSelection} type.
|
|
152
|
+
* This is used to denote when a tenant selection is desired by a named query.
|
|
153
|
+
*/
|
|
154
|
+
declare class TenantSelectionC3Type extends ArrayC3Type {
|
|
155
|
+
readonly type: string;
|
|
156
|
+
constructor();
|
|
157
|
+
}
|
|
158
|
+
import { Identifiable } from "@kinotic-ai/core";
|
|
159
|
+
declare class Application implements Identifiable<string> {
|
|
160
|
+
id: string;
|
|
161
|
+
description: string;
|
|
162
|
+
updated: number | null;
|
|
163
|
+
enableGraphQL: boolean;
|
|
164
|
+
enableOpenAPI: boolean;
|
|
165
|
+
constructor(id: string, description: string);
|
|
166
|
+
}
|
|
167
|
+
import { Identifiable as Identifiable2 } from "@kinotic-ai/core";
|
|
168
|
+
import { ProjectType } from "@/api/domain/ProjectType";
|
|
169
|
+
declare class Project implements Identifiable2<string> {
|
|
170
|
+
/**
|
|
171
|
+
* The id of the project.
|
|
172
|
+
* All project ids are unique throughout the entire system.
|
|
173
|
+
*/
|
|
174
|
+
id: string | null;
|
|
175
|
+
/**
|
|
176
|
+
* The id of the application that this project belongs to.
|
|
177
|
+
* All application ids are unique throughout the entire system.
|
|
178
|
+
*/
|
|
179
|
+
applicationId: string;
|
|
180
|
+
/**
|
|
181
|
+
* The name of the project.
|
|
182
|
+
*/
|
|
183
|
+
name: string;
|
|
184
|
+
/**
|
|
185
|
+
* The description of the project.
|
|
186
|
+
*/
|
|
187
|
+
description?: string;
|
|
188
|
+
/**
|
|
189
|
+
* The source of truth for the project.
|
|
190
|
+
*/
|
|
191
|
+
sourceOfTruth: ProjectType | null;
|
|
192
|
+
/**
|
|
193
|
+
* The date and time the project was updated.
|
|
194
|
+
*/
|
|
195
|
+
updated: number | null;
|
|
196
|
+
constructor(id: string | null, applicationId: string, name: string, description?: string);
|
|
197
|
+
}
|
|
198
|
+
declare enum ProjectType2 {
|
|
199
|
+
TYPESCRIPT = 0,
|
|
200
|
+
GRAPHQL = 1,
|
|
201
|
+
GRAPHICAL = 2,
|
|
202
|
+
ELASTICSEARCH = 3
|
|
203
|
+
}
|
|
204
|
+
import { ObjectC3Type as ObjectC3Type3 } from "@kinotic-ai/idl";
|
|
205
|
+
import { Identifiable as Identifiable3 } from "@kinotic-ai/core";
|
|
206
|
+
declare class EntityDefinition implements Identifiable3<string> {
|
|
207
|
+
id: string | null;
|
|
208
|
+
/**
|
|
209
|
+
* The id of the application that this entity definition belongs to.
|
|
210
|
+
* All application ids are unique throughout the entire system.
|
|
211
|
+
*/
|
|
212
|
+
applicationId: string;
|
|
213
|
+
/**
|
|
214
|
+
* The id of the project that this entity definition belongs to.
|
|
215
|
+
* All project ids are unique throughout the entire system.
|
|
216
|
+
*/
|
|
217
|
+
projectId: string;
|
|
218
|
+
name: string;
|
|
219
|
+
entityDefinition: ObjectC3Type3;
|
|
220
|
+
description?: string | null;
|
|
221
|
+
created: number;
|
|
222
|
+
updated: number;
|
|
223
|
+
published: boolean;
|
|
224
|
+
publishedTimestamp: number;
|
|
225
|
+
constructor(applicationId: string, projectId: string, name: string, entityDefinition: ObjectC3Type3, description?: string | null);
|
|
226
|
+
}
|
|
227
|
+
import { Identifiable as Identifiable4 } from "@kinotic-ai/core";
|
|
228
|
+
import { FunctionDefinition } from "@kinotic-ai/idl";
|
|
229
|
+
/**
|
|
230
|
+
* Provides Metadata that represents Named Queries for a Application
|
|
231
|
+
*/
|
|
232
|
+
declare class NamedQueriesDefinition implements Identifiable4<string> {
|
|
233
|
+
id: string;
|
|
234
|
+
applicationId: string;
|
|
235
|
+
projectId: string;
|
|
236
|
+
structure: string;
|
|
237
|
+
namedQueries: FunctionDefinition[];
|
|
238
|
+
constructor(id: string, applicationId: string, projectId: string, structure: string, namedQueries: FunctionDefinition[]);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Represents a migration definition that can be sent via the API.
|
|
242
|
+
* This is the API representation of a migration, containing the version, name, and file content.
|
|
243
|
+
*/
|
|
244
|
+
interface MigrationDefinition {
|
|
245
|
+
version: number;
|
|
246
|
+
name: string;
|
|
247
|
+
content: string;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Request object for executing migrations on a project.
|
|
251
|
+
* Contains the project identifier and the list of migrations to execute.
|
|
252
|
+
*/
|
|
253
|
+
interface MigrationRequest {
|
|
254
|
+
projectId: string;
|
|
255
|
+
migrations: MigrationDefinition[];
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Result of executing migrations on a project.
|
|
259
|
+
* Simple success/failure result with optional error details.
|
|
260
|
+
*/
|
|
261
|
+
interface MigrationResult {
|
|
262
|
+
projectId: string;
|
|
263
|
+
success: boolean;
|
|
264
|
+
errorMessage?: string;
|
|
265
|
+
migrationsProcessed: number;
|
|
266
|
+
}
|
|
267
|
+
import { C3Decorator as C3Decorator14 } from "@kinotic-ai/idl";
|
|
268
|
+
declare class CalculatedPropertyConfiguration {
|
|
269
|
+
/**
|
|
270
|
+
* The json path to the Entity that this property will be calculated for.
|
|
271
|
+
* If this is the root Entity then this should be and empty string.
|
|
272
|
+
*/
|
|
273
|
+
entityJsonPath: string;
|
|
274
|
+
/**
|
|
275
|
+
* The name of the property that will be calculated and added to the given Entity.
|
|
276
|
+
*/
|
|
277
|
+
propertyName: string;
|
|
278
|
+
/**
|
|
279
|
+
* The name of the function that will be used to calculate the value for the property.
|
|
280
|
+
*/
|
|
281
|
+
calculatedPropertyFunctionName: string;
|
|
282
|
+
/**
|
|
283
|
+
* Any decorators that should be applied to the calculated property.
|
|
284
|
+
* These will be added to the {@link C3Type} that is created for the Entity.
|
|
285
|
+
*/
|
|
286
|
+
decorators?: C3Decorator14[];
|
|
287
|
+
}
|
|
288
|
+
import { MultiTenancyType as MultiTenancyType2 } from "@kinotic-ai/persistence";
|
|
289
|
+
import { PropertyDefinition } from "@kinotic-ai/idl";
|
|
290
|
+
/**
|
|
291
|
+
* The configuration for a property that should be overridden.
|
|
292
|
+
* This allows you to specify a static {@link PropertyDefinition} for a property.
|
|
293
|
+
*/
|
|
294
|
+
declare class OverrideConfiguration {
|
|
295
|
+
/**
|
|
296
|
+
* The json path to the property that should be overridden.
|
|
297
|
+
*/
|
|
298
|
+
jsonPath: string;
|
|
299
|
+
/**
|
|
300
|
+
* The {@link PropertyDefinition} that should be used for the property.
|
|
301
|
+
*/
|
|
302
|
+
propertyDefinition: PropertyDefinition;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* The configuration for a function that will transform a value before it is sent to the server.
|
|
306
|
+
* The function must be exported from a file that is specified in {@link TypescriptExternalProjectConfig.utilFunctionsPaths}
|
|
307
|
+
* The function return argument will be the resulting {@link C3Type} that will be configured for the Entity
|
|
308
|
+
*/
|
|
309
|
+
declare class TransformConfiguration {
|
|
310
|
+
/**
|
|
311
|
+
* The json path to the property that should be transformed.
|
|
312
|
+
* There must only be one {@link TransformConfiguration} per jsonPath.
|
|
313
|
+
*/
|
|
314
|
+
jsonPath: string;
|
|
315
|
+
/**
|
|
316
|
+
* The name of the function that will be used to transform the value.
|
|
317
|
+
*/
|
|
318
|
+
transformerFunctionName: string;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* The configuration for an External Entity.
|
|
322
|
+
* This allows you to specify an Entity that is part of an external codebase.
|
|
323
|
+
*/
|
|
324
|
+
declare class EntityConfiguration {
|
|
325
|
+
/**
|
|
326
|
+
* The name of the Entity that will be used to create the Structure.
|
|
327
|
+
*/
|
|
328
|
+
entityName: string;
|
|
329
|
+
/**
|
|
330
|
+
* The multi tenancy type for this Entity.
|
|
331
|
+
*/
|
|
332
|
+
multiTenancyType: MultiTenancyType2;
|
|
333
|
+
/**
|
|
334
|
+
* Json paths to properties that should be excluded from the Entity.
|
|
335
|
+
* These have a higher priority than {@link OverrideConfiguration} and {@link TransformConfiguration}
|
|
336
|
+
*/
|
|
337
|
+
excludeJsonPaths?: string[];
|
|
338
|
+
/**
|
|
339
|
+
* Array of {@link OverrideConfiguration} that should be applied to the Entity.
|
|
340
|
+
* These have a higher priority than {@link TransformConfiguration}s
|
|
341
|
+
*/
|
|
342
|
+
overrides?: OverrideConfiguration[];
|
|
343
|
+
/**
|
|
344
|
+
* Array of {@link TransformConfiguration} that should be applied to the Entity.
|
|
345
|
+
* These have a lower priority than {@link OverrideConfiguration}s.
|
|
346
|
+
*/
|
|
347
|
+
transforms?: TransformConfiguration[];
|
|
348
|
+
/**
|
|
349
|
+
* Array of {@link CalculatedPropertyConfiguration} that should be applied to the Entity.
|
|
350
|
+
* The calculated property function will be called for every instance of the Entity.
|
|
351
|
+
* And is passed the instance of the Entity as the first argument.
|
|
352
|
+
* And the json path as the second argument.
|
|
353
|
+
* These have the highest priority.
|
|
354
|
+
*/
|
|
355
|
+
calculatedProperties?: CalculatedPropertyConfiguration[];
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* The project configuration for a structures project.
|
|
359
|
+
* This is the base configuration. Language specific configurations extend this configuration.
|
|
360
|
+
*/
|
|
361
|
+
declare abstract class StructuresProjectConfig {
|
|
362
|
+
/**
|
|
363
|
+
* This specifies the Model Definition Language (MDL).
|
|
364
|
+
* This is the language that is used to define the structures models.
|
|
365
|
+
* The following values are supported:
|
|
366
|
+
* - ts: TypeScript
|
|
367
|
+
* - ts-external: TypeScript with external models (defined by an external package)
|
|
368
|
+
* - gql: GraphQL
|
|
369
|
+
*/
|
|
370
|
+
mdl: "ts" | "ts-external" | "gql";
|
|
371
|
+
/**
|
|
372
|
+
* The name of the project or undefined if a language specific project name is used.
|
|
373
|
+
* i.e. if the project is typescript the package.json name will be used.
|
|
374
|
+
*/
|
|
375
|
+
name?: string;
|
|
376
|
+
/**
|
|
377
|
+
* The description of the project.
|
|
378
|
+
*/
|
|
379
|
+
description?: string;
|
|
380
|
+
/**
|
|
381
|
+
* The Structures Application that this project belongs to.
|
|
382
|
+
*/
|
|
383
|
+
application: string;
|
|
384
|
+
/**
|
|
385
|
+
* The paths to search for classes decorated with @Entity that Structures will be created for.
|
|
386
|
+
*/
|
|
387
|
+
entitiesPaths: string[];
|
|
388
|
+
/**
|
|
389
|
+
* The path to where generated files will be placed.
|
|
390
|
+
*/
|
|
391
|
+
generatedPath: string;
|
|
392
|
+
/**
|
|
393
|
+
* The file extension to use for imports in generated files.
|
|
394
|
+
*/
|
|
395
|
+
fileExtensionForImports: string;
|
|
396
|
+
/**
|
|
397
|
+
* If true the generated EntityService classes will validate all data before sending to the server.
|
|
398
|
+
*/
|
|
399
|
+
validate?: boolean;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* The project configuration for a TypeScript structures project.
|
|
403
|
+
*/
|
|
404
|
+
declare class TypescriptProjectConfig extends StructuresProjectConfig {
|
|
405
|
+
readonly mdl = "ts";
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* The project configuration for a TypeScript structures project.
|
|
409
|
+
*/
|
|
410
|
+
declare class TypescriptExternalProjectConfig extends StructuresProjectConfig {
|
|
411
|
+
readonly mdl = "ts-external";
|
|
412
|
+
/**
|
|
413
|
+
* External EntityConfigurations that are part of an external codebase and that you cannot add @Entity decorators to.
|
|
414
|
+
*/
|
|
415
|
+
externalEntities?: {
|
|
416
|
+
[pathPattern: string]: EntityConfiguration[];
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* The path to look for files that functions that can be used by a {@link TransformConfiguration} or {@link CalculatedPropertyConfiguration}.
|
|
420
|
+
*/
|
|
421
|
+
utilFunctionsPaths?: string[];
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Represents an individual web component generated by the data insights system.
|
|
425
|
+
* Each component is a self-contained visualization that can be dropped into any page.
|
|
426
|
+
*/
|
|
427
|
+
interface DataInsightsComponent {
|
|
428
|
+
/**
|
|
429
|
+
* Unique identifier for this component.
|
|
430
|
+
*/
|
|
431
|
+
id: string;
|
|
432
|
+
/**
|
|
433
|
+
* Human-readable name for the component.
|
|
434
|
+
*/
|
|
435
|
+
name: string;
|
|
436
|
+
/**
|
|
437
|
+
* Description of what this component visualizes.
|
|
438
|
+
*/
|
|
439
|
+
description: string;
|
|
440
|
+
/**
|
|
441
|
+
* When this component was last modified.
|
|
442
|
+
*/
|
|
443
|
+
modifiedAt: string;
|
|
444
|
+
/**
|
|
445
|
+
* The complete HTML source code for the web component.
|
|
446
|
+
* This includes the JavaScript class definition and customElements.define() call.
|
|
447
|
+
*/
|
|
448
|
+
rawHtml: string;
|
|
449
|
+
/**
|
|
450
|
+
* The application ID this component belongs to.
|
|
451
|
+
*/
|
|
452
|
+
applicationId: string;
|
|
453
|
+
/**
|
|
454
|
+
* Whether this component supports date range filtering.
|
|
455
|
+
* Components that return true will subscribe to global date range changes.
|
|
456
|
+
*/
|
|
457
|
+
supportsDateRangeFiltering?: boolean;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Enumeration of progress update types.
|
|
461
|
+
*/
|
|
462
|
+
declare enum ProgressType {
|
|
463
|
+
STARTED = "STARTED",
|
|
464
|
+
ANALYZING = "ANALYZING",
|
|
465
|
+
DISCOVERING_DATA = "DISCOVERING_DATA",
|
|
466
|
+
GENERATING_CODE = "GENERATING_CODE",
|
|
467
|
+
COMPONENTS_READY = "COMPONENTS_READY",
|
|
468
|
+
COMPLETED = "COMPLETED",
|
|
469
|
+
ERROR = "ERROR"
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Represents progress updates during data insights generation.
|
|
473
|
+
* This is used with Flux/Observable to provide real-time progress feedback.
|
|
474
|
+
*/
|
|
475
|
+
interface InsightProgress {
|
|
476
|
+
/**
|
|
477
|
+
* The type of progress update.
|
|
478
|
+
*/
|
|
479
|
+
type: ProgressType;
|
|
480
|
+
/**
|
|
481
|
+
* Human-readable message describing the current step.
|
|
482
|
+
*/
|
|
483
|
+
message: string;
|
|
484
|
+
/**
|
|
485
|
+
* When this progress update was created.
|
|
486
|
+
*/
|
|
487
|
+
timestamp: string;
|
|
488
|
+
/**
|
|
489
|
+
* List of generated components if this is a COMPONENTS_READY update.
|
|
490
|
+
*/
|
|
491
|
+
components?: DataInsightsComponent[];
|
|
492
|
+
/**
|
|
493
|
+
* Error message if this is an ERROR update.
|
|
494
|
+
*/
|
|
495
|
+
errorMessage?: string;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Represents a request for AI-powered data analysis and visualization generation.
|
|
499
|
+
*/
|
|
500
|
+
interface InsightRequest {
|
|
501
|
+
/**
|
|
502
|
+
* The user's natural language query about their data.
|
|
503
|
+
*/
|
|
504
|
+
query: string;
|
|
505
|
+
/**
|
|
506
|
+
* The application ID to search for structures within.
|
|
507
|
+
* All analysis will be limited to structures in this application.
|
|
508
|
+
*/
|
|
509
|
+
applicationId: string;
|
|
510
|
+
/**
|
|
511
|
+
* Optional: Specific structure ID to focus the analysis on.
|
|
512
|
+
* If provided, will prioritize this structure in the analysis.
|
|
513
|
+
* Format: "applicationId.structureName"
|
|
514
|
+
*/
|
|
515
|
+
focusStructureId?: string;
|
|
516
|
+
/**
|
|
517
|
+
* Optional: Preferred visualization type if user has a preference.
|
|
518
|
+
* Examples: "bar", "pie", "line", "scatter", "table"
|
|
519
|
+
*/
|
|
520
|
+
preferredVisualization?: string;
|
|
521
|
+
/**
|
|
522
|
+
* Optional: Additional context or constraints for the analysis.
|
|
523
|
+
* Examples: "only show last 30 days", "include only active records"
|
|
524
|
+
*/
|
|
525
|
+
additionalContext?: string;
|
|
526
|
+
}
|
|
527
|
+
import { IKinotic } from "@kinotic-ai/core";
|
|
528
|
+
import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
|
|
529
|
+
interface IApplicationService extends ICrudServiceProxy<Application> {
|
|
530
|
+
/**
|
|
531
|
+
* Creates a new application if it does not already exist.
|
|
532
|
+
* @param id the id of the application to create
|
|
533
|
+
* @param description the description of the application to create
|
|
534
|
+
* @return {@link Promise} emitting the created application
|
|
535
|
+
*/
|
|
536
|
+
createApplicationIfNotExist(id: string, description: string): Promise<Application>;
|
|
537
|
+
/**
|
|
538
|
+
* This operation makes all the recent writes immediately available for search.
|
|
539
|
+
* @return a Promise that resolves when the operation is complete
|
|
540
|
+
*/
|
|
541
|
+
syncIndex(): Promise<void>;
|
|
542
|
+
}
|
|
543
|
+
declare class ApplicationService extends CrudServiceProxy<Application> implements IApplicationService {
|
|
544
|
+
constructor(kinotic: IKinotic);
|
|
545
|
+
createApplicationIfNotExist(id: string, description: string): Promise<Application>;
|
|
546
|
+
syncIndex(): Promise<void>;
|
|
547
|
+
}
|
|
548
|
+
declare enum LogLevel {
|
|
549
|
+
TRACE = "TRACE",
|
|
550
|
+
DEBUG = "DEBUG",
|
|
551
|
+
INFO = "INFO",
|
|
552
|
+
WARN = "WARN",
|
|
553
|
+
ERROR = "ERROR",
|
|
554
|
+
FATAL = "FATAL",
|
|
555
|
+
OFF = "OFF"
|
|
556
|
+
}
|
|
557
|
+
declare class LoggerLevelsDescriptor {
|
|
558
|
+
configuredLevel?: LogLevel;
|
|
559
|
+
}
|
|
560
|
+
declare class GroupLoggerLevelsDescriptor extends LoggerLevelsDescriptor {
|
|
561
|
+
members: string[];
|
|
562
|
+
}
|
|
563
|
+
declare class SingleLoggerLevelsDescriptor extends LoggerLevelsDescriptor {
|
|
564
|
+
effectiveLevel?: LogLevel;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Description of loggers
|
|
568
|
+
*/
|
|
569
|
+
declare class LoggersDescriptor {
|
|
570
|
+
levels: LogLevel[];
|
|
571
|
+
loggerLevels: Map<string, SingleLoggerLevelsDescriptor>;
|
|
572
|
+
groups: Map<string, GroupLoggerLevelsDescriptor>;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Provides the ability to manage loggers
|
|
576
|
+
*/
|
|
577
|
+
interface ILogManager {
|
|
578
|
+
/**
|
|
579
|
+
* @param nodeId the kinoitc node to get the LoggersDescriptor from
|
|
580
|
+
* @return a {@link LoggersDescriptor} containing all the loggers and their levels
|
|
581
|
+
*/
|
|
582
|
+
loggers(nodeId: string): Promise<LoggersDescriptor>;
|
|
583
|
+
/**
|
|
584
|
+
* @param nodeId the kinoitc node to get the LoggerLevelsDescriptor from
|
|
585
|
+
* @param name the name of the logger to get
|
|
586
|
+
* @return a {@link LoggerLevelsDescriptor} containing the logger and its levels
|
|
587
|
+
*/
|
|
588
|
+
loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
|
|
589
|
+
/**
|
|
590
|
+
* Configures the log level for the logger with the given name
|
|
591
|
+
* @param nodeId the kinoitc node to set the log level on
|
|
592
|
+
* @param name the name of the logger to set
|
|
593
|
+
* @param level the {@link LogLevel} to set for the logger with the given name
|
|
594
|
+
*/
|
|
595
|
+
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
596
|
+
}
|
|
597
|
+
import { CrudServiceProxy as CrudServiceProxy2, IKinotic as IKinotic2, ICrudServiceProxy as ICrudServiceProxy2, IterablePage, Pageable } from "@kinotic-ai/core";
|
|
598
|
+
interface IProjectService extends ICrudServiceProxy2<Project> {
|
|
599
|
+
/**
|
|
600
|
+
* Counts all projects for the given application.
|
|
601
|
+
* @param applicationId the application to find projects for
|
|
602
|
+
* @return Promise emitting the number of projects
|
|
603
|
+
*/
|
|
604
|
+
countForApplication(applicationId: string): Promise<number>;
|
|
605
|
+
/**
|
|
606
|
+
* Creates a new project if it does not already exist.
|
|
607
|
+
* @param project the project to create
|
|
608
|
+
* @return Promise emitting the created project or the existing project if it already exists
|
|
609
|
+
*/
|
|
610
|
+
createProjectIfNotExist(project: Project): Promise<Project>;
|
|
611
|
+
/**
|
|
612
|
+
* Finds all projects for the given application.
|
|
613
|
+
* @param applicationId the application to find projects for
|
|
614
|
+
* @param pageable the page to return
|
|
615
|
+
* @return Promise emitting a page of projects
|
|
616
|
+
*/
|
|
617
|
+
findAllForApplication(applicationId: string, pageable: Pageable): Promise<IterablePage<Project>>;
|
|
618
|
+
/**
|
|
619
|
+
* This operation makes all the recent writes immediately available for search.
|
|
620
|
+
* @return a Promise that resolves when the operation is complete
|
|
621
|
+
*/
|
|
622
|
+
syncIndex(): Promise<void>;
|
|
623
|
+
}
|
|
624
|
+
declare class ProjectService extends CrudServiceProxy2<Project> implements IProjectService {
|
|
625
|
+
constructor(kinotic: IKinotic2);
|
|
626
|
+
countForApplication(applicationId: string): Promise<number>;
|
|
627
|
+
createProjectIfNotExist(project: Project): Promise<Project>;
|
|
628
|
+
findAllForApplication(applicationId: string, pageable: Pageable): Promise<IterablePage<Project>>;
|
|
629
|
+
findAllForApplicationSinglePage(applicationId: string, pageable: Pageable): Promise<IterablePage<Project>>;
|
|
630
|
+
syncIndex(): Promise<void>;
|
|
631
|
+
}
|
|
632
|
+
import { IKinotic as IKinotic3 } from "@kinotic-ai/core";
|
|
633
|
+
declare class LogManager implements ILogManager {
|
|
634
|
+
private readonly serviceProxy;
|
|
635
|
+
constructor(kinotic: IKinotic3);
|
|
636
|
+
loggers(nodeId: string): Promise<LoggersDescriptor>;
|
|
637
|
+
loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
|
|
638
|
+
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
639
|
+
}
|
|
640
|
+
import { CrudServiceProxy as CrudServiceProxy3, IKinotic as IKinotic4, ICrudServiceProxy as ICrudServiceProxy3, IterablePage as IterablePage2, Page, Pageable as Pageable2 } from "@kinotic-ai/core";
|
|
641
|
+
interface IEntityDefinitionService extends ICrudServiceProxy3<EntityDefinition> {
|
|
642
|
+
/**
|
|
643
|
+
* Counts all entity definitions for the given application.
|
|
644
|
+
* @param applicationId the application to find entity definitions for
|
|
645
|
+
* @return Promise emitting the number of entity definitions
|
|
646
|
+
*/
|
|
647
|
+
countForApplication(applicationId: string): Promise<number>;
|
|
648
|
+
/**
|
|
649
|
+
* Counts all entity definitions for the given project.
|
|
650
|
+
* @param projectId the project to find entity definitions for
|
|
651
|
+
* @return Promise emitting the number of entity definitions
|
|
652
|
+
*/
|
|
653
|
+
countForProject(projectId: string): Promise<number>;
|
|
654
|
+
/**
|
|
655
|
+
* Finds all entity definitions for the given application.
|
|
656
|
+
* @param applicationId the application to find entity definitions for
|
|
657
|
+
* @param pageable the page to return
|
|
658
|
+
* @return Promise emitting a page of entity definitions
|
|
659
|
+
*/
|
|
660
|
+
findAllForApplication(applicationId: string, pageable: Pageable2): Promise<IterablePage2<EntityDefinition>>;
|
|
661
|
+
/**
|
|
662
|
+
* Finds all published entity definitions for the given application.
|
|
663
|
+
* @param applicationId the application to find entity definitions for
|
|
664
|
+
* @param pageable the page to return
|
|
665
|
+
* @return Promise emitting a page of entity definitions
|
|
666
|
+
*/
|
|
667
|
+
findAllPublishedForApplication(applicationId: string, pageable: Pageable2): Promise<Page<EntityDefinition>>;
|
|
668
|
+
/**
|
|
669
|
+
* Finds all entity definitions for the given project.
|
|
670
|
+
* @param projectId the project to find entity definitions for
|
|
671
|
+
* @param pageable the page to return
|
|
672
|
+
* @return Promise emitting a page of entity definitions
|
|
673
|
+
*/
|
|
674
|
+
findAllForProject(projectId: string, pageable: Pageable2): Promise<IterablePage2<EntityDefinition>>;
|
|
675
|
+
/**
|
|
676
|
+
* Publishes the entity definition with the given id.
|
|
677
|
+
* This will make the entity definition available for use to read and write items for.
|
|
678
|
+
* @param entityDefinitionId the id of the entity definition to publish
|
|
679
|
+
* @return Promise that resolves when the entity definition has been published
|
|
680
|
+
*/
|
|
681
|
+
publish(entityDefinitionId: string): Promise<void>;
|
|
682
|
+
/**
|
|
683
|
+
* This operation makes all the recent writes immediately available for search.
|
|
684
|
+
* @return a Promise that resolves when the operation is complete
|
|
685
|
+
*/
|
|
686
|
+
syncIndex(): Promise<void>;
|
|
687
|
+
/**
|
|
688
|
+
* Un-publish the entity definition with the given id.
|
|
689
|
+
* @param entityDefinitionId the id of the entity definition to un-publish
|
|
690
|
+
* @return Promise that resolves when the entity definition has been unpublished
|
|
691
|
+
*/
|
|
692
|
+
unPublish(entityDefinitionId: string): Promise<void>;
|
|
693
|
+
}
|
|
694
|
+
declare class EntityDefinitionService extends CrudServiceProxy3<EntityDefinition> implements IEntityDefinitionService {
|
|
695
|
+
constructor(kinotic: IKinotic4);
|
|
696
|
+
countForApplication(applicationId: string): Promise<number>;
|
|
697
|
+
countForProject(projectId: string): Promise<number>;
|
|
698
|
+
findAllForApplicationSinglePage(applicationId: string, pageable: Pageable2): Promise<Page<EntityDefinition>>;
|
|
699
|
+
findAllForApplication(applicationId: string, pageable: Pageable2): Promise<IterablePage2<EntityDefinition>>;
|
|
700
|
+
findAllPublishedForApplication(applicationId: string, pageable: Pageable2): Promise<Page<EntityDefinition>>;
|
|
701
|
+
findAllForProject(projectId: string, pageable: Pageable2): Promise<IterablePage2<EntityDefinition>>;
|
|
702
|
+
findAllForProjectSinglePage(projectId: string, pageable: Pageable2): Promise<Page<EntityDefinition>>;
|
|
703
|
+
publish(entityDefinitionId: string): Promise<void>;
|
|
704
|
+
unPublish(entityDefinitionId: string): Promise<void>;
|
|
705
|
+
syncIndex(): Promise<void>;
|
|
706
|
+
}
|
|
707
|
+
import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
|
|
708
|
+
import { CrudServiceProxy as CrudServiceProxy4, ICrudServiceProxy as ICrudServiceProxy4 } from "@kinotic-ai/core";
|
|
709
|
+
interface INamedQueriesService extends ICrudServiceProxy4<NamedQueriesDefinition> {
|
|
710
|
+
/**
|
|
711
|
+
* This operation makes all the recent writes immediately available for search.
|
|
712
|
+
* @return a Promise that resolves when the operation is complete
|
|
713
|
+
*/
|
|
714
|
+
syncIndex(): Promise<void>;
|
|
715
|
+
}
|
|
716
|
+
declare class NamedQueriesService extends CrudServiceProxy4<NamedQueriesDefinition> implements INamedQueriesService {
|
|
717
|
+
constructor(kinotic: IKinotic5);
|
|
718
|
+
syncIndex(): Promise<void>;
|
|
719
|
+
}
|
|
720
|
+
import { IKinotic as IKinotic6 } from "@kinotic-ai/core";
|
|
721
|
+
/**
|
|
722
|
+
* Service for executing project-specific migrations through the Persistence API.
|
|
723
|
+
* This service allows external clients to apply their own migrations to projects.
|
|
724
|
+
*/
|
|
725
|
+
interface IMigrationService {
|
|
726
|
+
/**
|
|
727
|
+
* Executes migrations for a specific project.
|
|
728
|
+
*
|
|
729
|
+
* @param migrationRequest the request containing migrations and project information
|
|
730
|
+
* @returns a promise that resolves with the migration result
|
|
731
|
+
*/
|
|
732
|
+
executeMigrations(migrationRequest: MigrationRequest): Promise<MigrationResult>;
|
|
733
|
+
/**
|
|
734
|
+
* Gets the highest migration version that has been applied to a project.
|
|
735
|
+
* This allows clients to determine where to start applying new migrations.
|
|
736
|
+
*
|
|
737
|
+
* @param projectId the project identifier
|
|
738
|
+
* @returns a promise that resolves with the highest applied migration version, or null if no migrations have been applied
|
|
739
|
+
*/
|
|
740
|
+
getLastAppliedMigrationVersion(projectId: string): Promise<number | null>;
|
|
741
|
+
/**
|
|
742
|
+
* Checks if a specific migration version has been applied to a project.
|
|
743
|
+
*
|
|
744
|
+
* @param projectId the project identifier
|
|
745
|
+
* @param version the migration version to check
|
|
746
|
+
* @returns a promise that resolves with true if the migration has been applied, false otherwise
|
|
747
|
+
*/
|
|
748
|
+
isMigrationApplied(projectId: string, version: string): Promise<boolean>;
|
|
749
|
+
}
|
|
750
|
+
declare class MigrationService implements IMigrationService {
|
|
751
|
+
private readonly serviceProxy;
|
|
752
|
+
constructor(kinotic: IKinotic6);
|
|
753
|
+
executeMigrations(migrationRequest: MigrationRequest): Promise<MigrationResult>;
|
|
754
|
+
getLastAppliedMigrationVersion(projectId: string): Promise<number | null>;
|
|
755
|
+
isMigrationApplied(projectId: string, version: string): Promise<boolean>;
|
|
756
|
+
}
|
|
757
|
+
import { IKinotic as IKinotic7 } from "@kinotic-ai/core";
|
|
758
|
+
import { Observable } from "rxjs";
|
|
759
|
+
/**
|
|
760
|
+
* Provides AI-powered data analysis and visualization code generation capabilities.
|
|
761
|
+
* This service analyzes user queries about their structures and generates appropriate
|
|
762
|
+
* web components with charts and visualizations.
|
|
763
|
+
*/
|
|
764
|
+
interface IDataInsightsService {
|
|
765
|
+
/**
|
|
766
|
+
* Processes a user's natural language request with real-time progress updates.
|
|
767
|
+
* This method returns an Observable that emits progress updates as the analysis progresses.
|
|
768
|
+
*
|
|
769
|
+
* @param request the analysis request containing query and context
|
|
770
|
+
* @return Observable that emits progress updates and completes with the final response
|
|
771
|
+
*/
|
|
772
|
+
processRequest(request: InsightRequest): Observable<InsightProgress>;
|
|
773
|
+
}
|
|
774
|
+
declare class DataInsightsService implements IDataInsightsService {
|
|
775
|
+
private readonly serviceProxy;
|
|
776
|
+
constructor(kinotic: IKinotic7);
|
|
777
|
+
processRequest(request: InsightRequest): Observable<InsightProgress>;
|
|
778
|
+
}
|
|
779
|
+
import { KinoticPlugin } from "@kinotic-ai/core";
|
|
780
|
+
interface IOsApiExtension {
|
|
781
|
+
applications: IApplicationService;
|
|
782
|
+
projects: IProjectService;
|
|
783
|
+
logManager: ILogManager;
|
|
784
|
+
entityDefinitions: IEntityDefinitionService;
|
|
785
|
+
namedQueries: INamedQueriesService;
|
|
786
|
+
migrations: IMigrationService;
|
|
787
|
+
dataInsights: IDataInsightsService;
|
|
788
|
+
}
|
|
789
|
+
declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
|
|
790
|
+
declare module "@kinotic-ai/core" {
|
|
791
|
+
interface KinoticSingleton extends IOsApiExtension {}
|
|
792
|
+
}
|
|
793
|
+
export { VersionDecorator, TypescriptProjectConfig, TypescriptExternalProjectConfig, TransformConfiguration, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, StructuresProjectConfig, SingleLoggerLevelsDescriptor, RoleDecorator, QueryOptionsC3Type, QueryDecorator, ProjectType2 as ProjectType, ProjectService, Project, ProgressType, PolicyDecorator, PageableC3Type, PageC3Type, OverrideConfiguration, OsApiPlugin, NotIndexedDecorator, NestedDecorator, NamedQueriesService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, InsightRequest, InsightProgress, IdDecorator, IProjectService, IOsApiExtension, INamedQueriesService, IMigrationService, ILogManager, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntityConfiguration, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, CalculatedPropertyConfiguration, AutoGeneratedIdDecorator, ApplicationService, Application, $Role, $Policy };
|