-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
102 lines (94 loc) · 2.17 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
export interface FqmConnection {
host: string;
port: number;
tenant: string;
limit: number;
user?: string;
password?: string;
}
export interface PostgresConnection {
host: string;
port: number;
database: string;
user: string;
password: string;
}
export enum DataTypeValue {
arrayType = 'arrayType',
jsonbArrayType = 'jsonbArrayType',
booleanType = 'booleanType',
dateType = 'dateType',
enumType = 'enumType',
integerType = 'integerType',
numberType = 'numberType',
objectType = 'objectType',
openUUIDType = 'openUUIDType',
rangedUUIDType = 'rangedUUIDType',
stringUUIDType = 'stringUUIDType',
stringType = 'stringType',
}
export interface DataType {
dataType: DataTypeValue;
itemDataType?: DataType;
properties?: EntityTypeField[];
}
export interface EntityTypeField {
name: string;
labelAlias?: string;
labelAliasFullyQualified?: string;
property?: string;
dataType: DataType;
sourceAlias?: string;
isIdColumn?: boolean;
idColumnName?: string;
queryable?: boolean;
queryOnly?: boolean;
hidden?: boolean;
essential?: boolean;
visibleByDefault?: boolean;
valueGetter?: string;
filterValueGetter?: string;
valueFunction?: string;
source?: {
columnName: string;
entityTypeId: string;
};
valueSourceApi?: {
path: string;
valueJsonPath: string;
labelJsonPath: string;
};
values?: { value: string; label: string }[];
}
export interface EntityTypeSource {
type: 'db' | 'entity-type';
target?: string;
alias: string;
id?: string;
join?: EntityTypeSourceJoin;
useIdColumns?: boolean;
}
export interface EntityTypeSourceJoin {
type: string;
joinTo: string;
condition: string;
}
export interface EntityType {
id: string;
name: string;
root?: boolean;
private?: boolean;
customFieldEntityTypeId?: string;
fromClause?: string;
sources?: EntityTypeSource[];
columns?: EntityTypeField[];
defaultSort?: { columnName: string; direction: string }[];
sourceView?: string;
sourceViewExtractor?: string;
}
export interface Schema {
columns: Record<string, string[]>;
routines: Record<string, string[]>;
typeMapping: Record<string, string>;
isView: Record<string, boolean>;
}