bruce-models 7.1.80 → 7.1.82
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/dist/bruce-models.es5.js +254 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +247 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/api.js +1 -0
- package/dist/lib/api/api.js.map +1 -1
- package/dist/lib/bruce-models.js +4 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js +20 -0
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/entity/entity-type-relation.js +180 -0
- package/dist/lib/entity/entity-type-relation.js.map +1 -0
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/export/entity-export.js +3 -0
- package/dist/lib/export/entity-export.js.map +1 -0
- package/dist/lib/export/export-csv.js +79 -0
- package/dist/lib/export/export-csv.js.map +1 -0
- package/dist/types/api/api.d.ts +1 -0
- package/dist/types/bruce-models.d.ts +4 -1
- package/dist/types/data-lab/data-lab.d.ts +37 -1
- package/dist/types/entity/entity-type-relation.d.ts +68 -0
- package/dist/types/entity/entity-type.d.ts +31 -5
- package/dist/types/export/entity-export.d.ts +17 -0
- package/dist/types/export/export-csv.d.ts +39 -0
- package/package.json +1 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
2
|
+
import { BruceApi } from "../api/bruce-api";
|
|
3
|
+
import { EntityType } from "./entity-type";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the "Entity Type Relation" concept within Nextspace.
|
|
6
|
+
* An Entity Type Relation registers a relationship that may exist between entities of two specified Entity Types.
|
|
7
|
+
*/
|
|
8
|
+
export declare namespace EntityTypeRelation {
|
|
9
|
+
/**
|
|
10
|
+
* Describes an Entity Type Relation record.
|
|
11
|
+
*/
|
|
12
|
+
interface IRelation extends EntityType.IEntityTypeRelation {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Gets a single Entity Type Relation record.
|
|
16
|
+
* This calls: GET entityType/{entityType_id}/relation/{entity_type_relation_id}
|
|
17
|
+
*/
|
|
18
|
+
function Get(params: {
|
|
19
|
+
api?: BruceApi.Api;
|
|
20
|
+
entityTypeId: string;
|
|
21
|
+
entityTypeRelationId: string | number;
|
|
22
|
+
req?: Api.IReqParams;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
relation: IRelation;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Gets Entity Type Relation records for the specified Entity Type.
|
|
28
|
+
* This calls: GET entityType/{entityType_id}/relations
|
|
29
|
+
*/
|
|
30
|
+
function GetList(params: {
|
|
31
|
+
api?: BruceApi.Api;
|
|
32
|
+
entityTypeId: string;
|
|
33
|
+
req?: Api.IReqParams;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
relations: IRelation[];
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates or updates an Entity Type Relation record.
|
|
39
|
+
* This calls: POST entityType/{entityType_id}/relation/{entity_type_relation_id}
|
|
40
|
+
*/
|
|
41
|
+
function Update(params: {
|
|
42
|
+
api?: BruceApi.Api;
|
|
43
|
+
entityTypeId: string;
|
|
44
|
+
relation: IRelation;
|
|
45
|
+
entityTypeRelationId?: string | number;
|
|
46
|
+
req?: Api.IReqParams;
|
|
47
|
+
}): Promise<{
|
|
48
|
+
relation: IRelation;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Deletes an Entity Type Relation record.
|
|
52
|
+
* This calls: DELETE entityType/{entityType_id}/relation/{entity_type_relation_id}
|
|
53
|
+
*/
|
|
54
|
+
function Delete(params: {
|
|
55
|
+
api?: BruceApi.Api;
|
|
56
|
+
entityTypeId: string;
|
|
57
|
+
entityTypeRelationId: string | number;
|
|
58
|
+
req?: Api.IReqParams;
|
|
59
|
+
}): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns cache identifier for an Entity Type Relation record.
|
|
62
|
+
*/
|
|
63
|
+
function GetCacheKey(entityTypeId: string, entityTypeRelationId: string | number): string;
|
|
64
|
+
/**
|
|
65
|
+
* Returns cache identifier for the list of Entity Type Relation records for an Entity Type.
|
|
66
|
+
*/
|
|
67
|
+
function GetListCacheKey(entityTypeId: string): string;
|
|
68
|
+
}
|
|
@@ -151,7 +151,7 @@ export declare namespace EntityType {
|
|
|
151
151
|
};
|
|
152
152
|
Result?: any;
|
|
153
153
|
ExportResult?: any;
|
|
154
|
-
EntityTypeOntology?:
|
|
154
|
+
EntityTypeOntology?: IEntityTypeOntology;
|
|
155
155
|
Warnings?: string[];
|
|
156
156
|
Errors?: string[];
|
|
157
157
|
[key: string]: any;
|
|
@@ -165,7 +165,7 @@ export declare namespace EntityType {
|
|
|
165
165
|
tempFileUrl?: string;
|
|
166
166
|
clientFileId?: string;
|
|
167
167
|
clientFileUrl?: string;
|
|
168
|
-
entityTypeOntology?:
|
|
168
|
+
entityTypeOntology?: IEntityTypeOntology;
|
|
169
169
|
warnings?: string[];
|
|
170
170
|
errors?: string[];
|
|
171
171
|
raw: IExportOntologyRawRes | null;
|
|
@@ -212,6 +212,33 @@ export declare namespace EntityType {
|
|
|
212
212
|
Notes?: string;
|
|
213
213
|
[key: string]: any;
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Describes an Entity Type Relation record.
|
|
217
|
+
*/
|
|
218
|
+
interface IEntityTypeRelation {
|
|
219
|
+
ID?: number;
|
|
220
|
+
"A.EntityType.ID"?: string;
|
|
221
|
+
"B.EntityType.ID"?: string;
|
|
222
|
+
"EntityRelationType.ID"?: string;
|
|
223
|
+
"A.ForeignKey.AttributePath"?: string;
|
|
224
|
+
"B.ForeignKey.AttributePath"?: string;
|
|
225
|
+
"A.Cardinality.Min"?: number;
|
|
226
|
+
"A.Cardinality.Max"?: number;
|
|
227
|
+
"B.Cardinality.Min"?: number;
|
|
228
|
+
"B.Cardinality.Max"?: number;
|
|
229
|
+
EntityRelationType?: any;
|
|
230
|
+
EntityTypeA?: IType;
|
|
231
|
+
EntityTypeB?: IType;
|
|
232
|
+
[key: string]: any;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Entity Type ontology payload.
|
|
236
|
+
*/
|
|
237
|
+
interface IEntityTypeOntology {
|
|
238
|
+
EntityType?: IType[];
|
|
239
|
+
EntityTypeRelation?: IEntityTypeRelation[];
|
|
240
|
+
[key: string]: any;
|
|
241
|
+
}
|
|
215
242
|
/**
|
|
216
243
|
* Entity Type-level mapping returned by the AI optimisation endpoint.
|
|
217
244
|
*/
|
|
@@ -231,7 +258,7 @@ export declare namespace EntityType {
|
|
|
231
258
|
*/
|
|
232
259
|
interface IAISuggestOntologyOptimisationSuggestedOntology {
|
|
233
260
|
EntityType?: IAISuggestOntologyOptimisationSuggestedEntityType[];
|
|
234
|
-
EntityTypeRelation?:
|
|
261
|
+
EntityTypeRelation?: IEntityTypeRelation[];
|
|
235
262
|
[key: string]: any;
|
|
236
263
|
}
|
|
237
264
|
/**
|
|
@@ -296,8 +323,7 @@ export declare namespace EntityType {
|
|
|
296
323
|
* Suggested relation item returned in the pending-action result.
|
|
297
324
|
* This endpoint may evolve, so unknown fields are preserved.
|
|
298
325
|
*/
|
|
299
|
-
interface ISuggestedRelation {
|
|
300
|
-
[key: string]: any;
|
|
326
|
+
interface ISuggestedRelation extends IEntityTypeRelation {
|
|
301
327
|
}
|
|
302
328
|
/**
|
|
303
329
|
* Normalized pending-action result payload produced by FindSuggestedRelations.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Entity export request shapes.
|
|
3
|
+
*/
|
|
4
|
+
export declare namespace EntityExport {
|
|
5
|
+
/**
|
|
6
|
+
* Optional explicit column selection shared by CSV and XLSX Entity exports.
|
|
7
|
+
*
|
|
8
|
+
* If omitted, Bruce API exports columns from the Entity Type Data Schema.
|
|
9
|
+
*/
|
|
10
|
+
interface IColumnSettings {
|
|
11
|
+
Columns: IColumn[];
|
|
12
|
+
}
|
|
13
|
+
interface IColumn {
|
|
14
|
+
AttributePath: string;
|
|
15
|
+
ColumnTitle: string;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
2
|
+
import { BruceApi } from "../api/bruce-api";
|
|
3
|
+
import { EntityExport } from "./entity-export";
|
|
4
|
+
export declare namespace ExportCsv {
|
|
5
|
+
interface IExportParams {
|
|
6
|
+
BruceEntityType: string;
|
|
7
|
+
OrderBy?: string;
|
|
8
|
+
SortOrder?: Api.ESortOrderStr | Api.ESortOrder | string;
|
|
9
|
+
Filter?: string;
|
|
10
|
+
LODType?: string;
|
|
11
|
+
ZIP?: boolean;
|
|
12
|
+
ColumnSettings?: EntityExport.IColumnSettings;
|
|
13
|
+
}
|
|
14
|
+
interface IExportEntitiesParams {
|
|
15
|
+
EntityIDs: string[];
|
|
16
|
+
ColumnSettings?: EntityExport.IColumnSettings;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Exports CSV for Entities selected by Filter.
|
|
21
|
+
* This calls: GET entities/ExportCSV
|
|
22
|
+
*/
|
|
23
|
+
function Export(params: {
|
|
24
|
+
api?: BruceApi.Api;
|
|
25
|
+
fileExport: IExportParams;
|
|
26
|
+
req?: Api.IReqParams;
|
|
27
|
+
}): Promise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* Exports CSV for a provided list of Entity IDs.
|
|
30
|
+
* This calls: POST entities/ExportCSV/{entityType_ID}
|
|
31
|
+
*/
|
|
32
|
+
function ExportEntities(params: {
|
|
33
|
+
api?: BruceApi.Api;
|
|
34
|
+
entityTypeId: string;
|
|
35
|
+
fileExport: IExportEntitiesParams;
|
|
36
|
+
zip?: boolean;
|
|
37
|
+
req?: Api.IReqParams;
|
|
38
|
+
}): Promise<any>;
|
|
39
|
+
}
|