@clidey/whodb-sdk 0.0.0
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 +81 -0
- package/dist/auth.d.ts +26 -0
- package/dist/auth.js +65 -0
- package/dist/client.d.ts +51 -0
- package/dist/client.js +157 -0
- package/dist/config.d.ts +37 -0
- package/dist/config.js +39 -0
- package/dist/dataset.d.ts +26 -0
- package/dist/dataset.js +45 -0
- package/dist/errors.d.ts +43 -0
- package/dist/errors.js +59 -0
- package/dist/files.d.ts +25 -0
- package/dist/files.js +53 -0
- package/dist/generated/hydration.d.ts +3 -0
- package/dist/generated/hydration.js +32 -0
- package/dist/generated/manifest.d.ts +12 -0
- package/dist/generated/manifest.js +80 -0
- package/dist/generated/operations.d.ts +196 -0
- package/dist/generated/operations.js +145 -0
- package/dist/generated/surface.d.ts +190 -0
- package/dist/generated/surface.js +191 -0
- package/dist/generated/types.d.ts +302 -0
- package/dist/generated/types.js +2 -0
- package/dist/hydrate.d.ts +18 -0
- package/dist/hydrate.js +83 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +9 -0
- package/dist/manifest-check.d.ts +15 -0
- package/dist/manifest-check.js +43 -0
- package/dist/ontology.d.ts +73 -0
- package/dist/ontology.js +240 -0
- package/dist/pagination.d.ts +21 -0
- package/dist/pagination.js +33 -0
- package/dist/source.d.ts +31 -0
- package/dist/source.js +63 -0
- package/dist/transport-http.d.ts +22 -0
- package/dist/transport-http.js +60 -0
- package/dist/transport-ipc.d.ts +31 -0
- package/dist/transport-ipc.js +183 -0
- package/dist/transport.d.ts +9 -0
- package/dist/transport.js +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.js +5 -0
- package/package.json +34 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/** Facade surface mapping generated from sdk/spec/surface.yaml. */
|
|
2
|
+
export declare const surface: {
|
|
3
|
+
readonly ontology: {
|
|
4
|
+
readonly entities: {
|
|
5
|
+
readonly operation: "OntologyEntities";
|
|
6
|
+
readonly autofill: {
|
|
7
|
+
readonly projectId: "$project";
|
|
8
|
+
};
|
|
9
|
+
readonly rename: {};
|
|
10
|
+
readonly paginated: null;
|
|
11
|
+
};
|
|
12
|
+
readonly entity: {
|
|
13
|
+
readonly operation: "OntologyEntity";
|
|
14
|
+
readonly autofill: {
|
|
15
|
+
readonly projectId: "$project";
|
|
16
|
+
};
|
|
17
|
+
readonly rename: {};
|
|
18
|
+
readonly paginated: null;
|
|
19
|
+
};
|
|
20
|
+
readonly describe: {
|
|
21
|
+
readonly operation: "OntologyDescribe";
|
|
22
|
+
readonly autofill: {
|
|
23
|
+
readonly projectId: "$project";
|
|
24
|
+
};
|
|
25
|
+
readonly rename: {};
|
|
26
|
+
readonly paginated: null;
|
|
27
|
+
};
|
|
28
|
+
readonly list: {
|
|
29
|
+
readonly operation: "OntologyRows";
|
|
30
|
+
readonly autofill: {
|
|
31
|
+
readonly projectId: "$project";
|
|
32
|
+
};
|
|
33
|
+
readonly rename: {};
|
|
34
|
+
readonly paginated: {
|
|
35
|
+
readonly pageSizeArg: "pageSize";
|
|
36
|
+
readonly pageOffsetArg: "pageOffset";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly query: {
|
|
40
|
+
readonly operation: "OntologyQuery";
|
|
41
|
+
readonly autofill: {
|
|
42
|
+
readonly projectId: "$project";
|
|
43
|
+
};
|
|
44
|
+
readonly rename: {};
|
|
45
|
+
readonly paginated: null;
|
|
46
|
+
};
|
|
47
|
+
readonly aggregate: {
|
|
48
|
+
readonly operation: "OntologyAggregate";
|
|
49
|
+
readonly autofill: {
|
|
50
|
+
readonly projectId: "$project";
|
|
51
|
+
};
|
|
52
|
+
readonly rename: {};
|
|
53
|
+
readonly paginated: {
|
|
54
|
+
readonly pageSizeArg: "pageSize";
|
|
55
|
+
readonly pageOffsetArg: "pageOffset";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly stats: {
|
|
59
|
+
readonly operation: "OntologyStats";
|
|
60
|
+
readonly autofill: {
|
|
61
|
+
readonly projectId: "$project";
|
|
62
|
+
};
|
|
63
|
+
readonly rename: {};
|
|
64
|
+
readonly paginated: null;
|
|
65
|
+
};
|
|
66
|
+
readonly similar: {
|
|
67
|
+
readonly operation: "OntologySimilar";
|
|
68
|
+
readonly autofill: {
|
|
69
|
+
readonly projectId: "$project";
|
|
70
|
+
};
|
|
71
|
+
readonly rename: {};
|
|
72
|
+
readonly paginated: null;
|
|
73
|
+
};
|
|
74
|
+
readonly followLink: {
|
|
75
|
+
readonly operation: "OntologyFollowLink";
|
|
76
|
+
readonly autofill: {
|
|
77
|
+
readonly projectId: "$project";
|
|
78
|
+
};
|
|
79
|
+
readonly rename: {};
|
|
80
|
+
readonly paginated: {
|
|
81
|
+
readonly pageSizeArg: "pageSize";
|
|
82
|
+
readonly pageOffsetArg: "pageOffset";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly followIncomingLink: {
|
|
86
|
+
readonly operation: "OntologyFollowIncomingLink";
|
|
87
|
+
readonly autofill: {
|
|
88
|
+
readonly projectId: "$project";
|
|
89
|
+
};
|
|
90
|
+
readonly rename: {};
|
|
91
|
+
readonly paginated: {
|
|
92
|
+
readonly pageSizeArg: "pageSize";
|
|
93
|
+
readonly pageOffsetArg: "pageOffset";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly fastLookups: {
|
|
97
|
+
readonly operation: "OntologyFastLookups";
|
|
98
|
+
readonly autofill: {
|
|
99
|
+
readonly projectId: "$project";
|
|
100
|
+
};
|
|
101
|
+
readonly rename: {};
|
|
102
|
+
readonly paginated: null;
|
|
103
|
+
};
|
|
104
|
+
readonly create: {
|
|
105
|
+
readonly operation: "OntologyAddRow";
|
|
106
|
+
readonly autofill: {
|
|
107
|
+
readonly projectId: "$project";
|
|
108
|
+
};
|
|
109
|
+
readonly rename: {};
|
|
110
|
+
readonly paginated: null;
|
|
111
|
+
};
|
|
112
|
+
readonly createMany: {
|
|
113
|
+
readonly operation: "OntologyAddRows";
|
|
114
|
+
readonly autofill: {
|
|
115
|
+
readonly projectId: "$project";
|
|
116
|
+
};
|
|
117
|
+
readonly rename: {};
|
|
118
|
+
readonly paginated: null;
|
|
119
|
+
};
|
|
120
|
+
readonly update: {
|
|
121
|
+
readonly operation: "OntologyUpdateRow";
|
|
122
|
+
readonly autofill: {
|
|
123
|
+
readonly projectId: "$project";
|
|
124
|
+
};
|
|
125
|
+
readonly rename: {};
|
|
126
|
+
readonly paginated: null;
|
|
127
|
+
};
|
|
128
|
+
readonly delete: {
|
|
129
|
+
readonly operation: "OntologyDeleteRow";
|
|
130
|
+
readonly autofill: {
|
|
131
|
+
readonly projectId: "$project";
|
|
132
|
+
};
|
|
133
|
+
readonly rename: {};
|
|
134
|
+
readonly paginated: null;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
readonly dataset: {
|
|
138
|
+
readonly list: {
|
|
139
|
+
readonly operation: "ProjectDatasets";
|
|
140
|
+
readonly autofill: {
|
|
141
|
+
readonly projectId: "$project";
|
|
142
|
+
};
|
|
143
|
+
readonly rename: {};
|
|
144
|
+
readonly paginated: null;
|
|
145
|
+
};
|
|
146
|
+
readonly rows: {
|
|
147
|
+
readonly operation: "QueryDataset";
|
|
148
|
+
readonly autofill: {};
|
|
149
|
+
readonly rename: {};
|
|
150
|
+
readonly paginated: null;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
readonly source: {
|
|
154
|
+
readonly list: {
|
|
155
|
+
readonly operation: "ProjectSources";
|
|
156
|
+
readonly autofill: {
|
|
157
|
+
readonly projectId: "$project";
|
|
158
|
+
};
|
|
159
|
+
readonly rename: {};
|
|
160
|
+
readonly paginated: null;
|
|
161
|
+
};
|
|
162
|
+
readonly rows: {
|
|
163
|
+
readonly operation: "PlatformSourceRows";
|
|
164
|
+
readonly autofill: {
|
|
165
|
+
readonly projectId: "$project";
|
|
166
|
+
};
|
|
167
|
+
readonly rename: {};
|
|
168
|
+
readonly paginated: {
|
|
169
|
+
readonly pageSizeArg: "pageSize";
|
|
170
|
+
readonly pageOffsetArg: "pageOffset";
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
readonly objects: {
|
|
174
|
+
readonly operation: "PlatformSourceObjects";
|
|
175
|
+
readonly autofill: {
|
|
176
|
+
readonly projectId: "$project";
|
|
177
|
+
};
|
|
178
|
+
readonly rename: {};
|
|
179
|
+
readonly paginated: null;
|
|
180
|
+
};
|
|
181
|
+
readonly columns: {
|
|
182
|
+
readonly operation: "PlatformSourceColumns";
|
|
183
|
+
readonly autofill: {
|
|
184
|
+
readonly projectId: "$project";
|
|
185
|
+
};
|
|
186
|
+
readonly rename: {};
|
|
187
|
+
readonly paginated: null;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// GENERATED by sdk/tools/generate-core.mjs — DO NOT EDIT (manifest 4b84678f5fe7)
|
|
2
|
+
/** Facade surface mapping generated from sdk/spec/surface.yaml. */
|
|
3
|
+
export const surface = {
|
|
4
|
+
"ontology": {
|
|
5
|
+
"entities": {
|
|
6
|
+
"operation": "OntologyEntities",
|
|
7
|
+
"autofill": {
|
|
8
|
+
"projectId": "$project"
|
|
9
|
+
},
|
|
10
|
+
"rename": {},
|
|
11
|
+
"paginated": null
|
|
12
|
+
},
|
|
13
|
+
"entity": {
|
|
14
|
+
"operation": "OntologyEntity",
|
|
15
|
+
"autofill": {
|
|
16
|
+
"projectId": "$project"
|
|
17
|
+
},
|
|
18
|
+
"rename": {},
|
|
19
|
+
"paginated": null
|
|
20
|
+
},
|
|
21
|
+
"describe": {
|
|
22
|
+
"operation": "OntologyDescribe",
|
|
23
|
+
"autofill": {
|
|
24
|
+
"projectId": "$project"
|
|
25
|
+
},
|
|
26
|
+
"rename": {},
|
|
27
|
+
"paginated": null
|
|
28
|
+
},
|
|
29
|
+
"list": {
|
|
30
|
+
"operation": "OntologyRows",
|
|
31
|
+
"autofill": {
|
|
32
|
+
"projectId": "$project"
|
|
33
|
+
},
|
|
34
|
+
"rename": {},
|
|
35
|
+
"paginated": {
|
|
36
|
+
"pageSizeArg": "pageSize",
|
|
37
|
+
"pageOffsetArg": "pageOffset"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"query": {
|
|
41
|
+
"operation": "OntologyQuery",
|
|
42
|
+
"autofill": {
|
|
43
|
+
"projectId": "$project"
|
|
44
|
+
},
|
|
45
|
+
"rename": {},
|
|
46
|
+
"paginated": null
|
|
47
|
+
},
|
|
48
|
+
"aggregate": {
|
|
49
|
+
"operation": "OntologyAggregate",
|
|
50
|
+
"autofill": {
|
|
51
|
+
"projectId": "$project"
|
|
52
|
+
},
|
|
53
|
+
"rename": {},
|
|
54
|
+
"paginated": {
|
|
55
|
+
"pageSizeArg": "pageSize",
|
|
56
|
+
"pageOffsetArg": "pageOffset"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"stats": {
|
|
60
|
+
"operation": "OntologyStats",
|
|
61
|
+
"autofill": {
|
|
62
|
+
"projectId": "$project"
|
|
63
|
+
},
|
|
64
|
+
"rename": {},
|
|
65
|
+
"paginated": null
|
|
66
|
+
},
|
|
67
|
+
"similar": {
|
|
68
|
+
"operation": "OntologySimilar",
|
|
69
|
+
"autofill": {
|
|
70
|
+
"projectId": "$project"
|
|
71
|
+
},
|
|
72
|
+
"rename": {},
|
|
73
|
+
"paginated": null
|
|
74
|
+
},
|
|
75
|
+
"followLink": {
|
|
76
|
+
"operation": "OntologyFollowLink",
|
|
77
|
+
"autofill": {
|
|
78
|
+
"projectId": "$project"
|
|
79
|
+
},
|
|
80
|
+
"rename": {},
|
|
81
|
+
"paginated": {
|
|
82
|
+
"pageSizeArg": "pageSize",
|
|
83
|
+
"pageOffsetArg": "pageOffset"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"followIncomingLink": {
|
|
87
|
+
"operation": "OntologyFollowIncomingLink",
|
|
88
|
+
"autofill": {
|
|
89
|
+
"projectId": "$project"
|
|
90
|
+
},
|
|
91
|
+
"rename": {},
|
|
92
|
+
"paginated": {
|
|
93
|
+
"pageSizeArg": "pageSize",
|
|
94
|
+
"pageOffsetArg": "pageOffset"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"fastLookups": {
|
|
98
|
+
"operation": "OntologyFastLookups",
|
|
99
|
+
"autofill": {
|
|
100
|
+
"projectId": "$project"
|
|
101
|
+
},
|
|
102
|
+
"rename": {},
|
|
103
|
+
"paginated": null
|
|
104
|
+
},
|
|
105
|
+
"create": {
|
|
106
|
+
"operation": "OntologyAddRow",
|
|
107
|
+
"autofill": {
|
|
108
|
+
"projectId": "$project"
|
|
109
|
+
},
|
|
110
|
+
"rename": {},
|
|
111
|
+
"paginated": null
|
|
112
|
+
},
|
|
113
|
+
"createMany": {
|
|
114
|
+
"operation": "OntologyAddRows",
|
|
115
|
+
"autofill": {
|
|
116
|
+
"projectId": "$project"
|
|
117
|
+
},
|
|
118
|
+
"rename": {},
|
|
119
|
+
"paginated": null
|
|
120
|
+
},
|
|
121
|
+
"update": {
|
|
122
|
+
"operation": "OntologyUpdateRow",
|
|
123
|
+
"autofill": {
|
|
124
|
+
"projectId": "$project"
|
|
125
|
+
},
|
|
126
|
+
"rename": {},
|
|
127
|
+
"paginated": null
|
|
128
|
+
},
|
|
129
|
+
"delete": {
|
|
130
|
+
"operation": "OntologyDeleteRow",
|
|
131
|
+
"autofill": {
|
|
132
|
+
"projectId": "$project"
|
|
133
|
+
},
|
|
134
|
+
"rename": {},
|
|
135
|
+
"paginated": null
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"dataset": {
|
|
139
|
+
"list": {
|
|
140
|
+
"operation": "ProjectDatasets",
|
|
141
|
+
"autofill": {
|
|
142
|
+
"projectId": "$project"
|
|
143
|
+
},
|
|
144
|
+
"rename": {},
|
|
145
|
+
"paginated": null
|
|
146
|
+
},
|
|
147
|
+
"rows": {
|
|
148
|
+
"operation": "QueryDataset",
|
|
149
|
+
"autofill": {},
|
|
150
|
+
"rename": {},
|
|
151
|
+
"paginated": null
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"source": {
|
|
155
|
+
"list": {
|
|
156
|
+
"operation": "ProjectSources",
|
|
157
|
+
"autofill": {
|
|
158
|
+
"projectId": "$project"
|
|
159
|
+
},
|
|
160
|
+
"rename": {},
|
|
161
|
+
"paginated": null
|
|
162
|
+
},
|
|
163
|
+
"rows": {
|
|
164
|
+
"operation": "PlatformSourceRows",
|
|
165
|
+
"autofill": {
|
|
166
|
+
"projectId": "$project"
|
|
167
|
+
},
|
|
168
|
+
"rename": {},
|
|
169
|
+
"paginated": {
|
|
170
|
+
"pageSizeArg": "pageSize",
|
|
171
|
+
"pageOffsetArg": "pageOffset"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"objects": {
|
|
175
|
+
"operation": "PlatformSourceObjects",
|
|
176
|
+
"autofill": {
|
|
177
|
+
"projectId": "$project"
|
|
178
|
+
},
|
|
179
|
+
"rename": {},
|
|
180
|
+
"paginated": null
|
|
181
|
+
},
|
|
182
|
+
"columns": {
|
|
183
|
+
"operation": "PlatformSourceColumns",
|
|
184
|
+
"autofill": {
|
|
185
|
+
"projectId": "$project"
|
|
186
|
+
},
|
|
187
|
+
"rename": {},
|
|
188
|
+
"paginated": null
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
export interface AtomicWhereCondition {
|
|
2
|
+
ColumnType: string;
|
|
3
|
+
Key: string;
|
|
4
|
+
Operator: string;
|
|
5
|
+
Value: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Column {
|
|
8
|
+
Type: string;
|
|
9
|
+
Name: string;
|
|
10
|
+
MetadataFidelity: SourceMetadataFidelity;
|
|
11
|
+
IsPrimary: boolean;
|
|
12
|
+
IsForeignKey: boolean;
|
|
13
|
+
ReferencedTable?: string | null;
|
|
14
|
+
ReferencedColumn?: string | null;
|
|
15
|
+
Length?: number | null;
|
|
16
|
+
Precision?: number | null;
|
|
17
|
+
Scale?: number | null;
|
|
18
|
+
}
|
|
19
|
+
export interface ColumnDef {
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
isNullable: boolean;
|
|
23
|
+
isPrimary: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface Dataset {
|
|
26
|
+
id: string;
|
|
27
|
+
projectId: string;
|
|
28
|
+
sourceId: string;
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
schema: Array<ColumnDef>;
|
|
32
|
+
schemaMode: string;
|
|
33
|
+
ownerId: string;
|
|
34
|
+
rowCount: number;
|
|
35
|
+
sizeBytes: number;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
}
|
|
39
|
+
export interface DatasetQueryResult {
|
|
40
|
+
columns: Array<string>;
|
|
41
|
+
rows: Array<Array<string>>;
|
|
42
|
+
total: number;
|
|
43
|
+
}
|
|
44
|
+
export interface OntologyAddRowsResult {
|
|
45
|
+
inserted: number;
|
|
46
|
+
ids: Array<string>;
|
|
47
|
+
}
|
|
48
|
+
export interface OntologyAggregateMetricInput {
|
|
49
|
+
field?: string | null;
|
|
50
|
+
op: string;
|
|
51
|
+
as?: string | null;
|
|
52
|
+
}
|
|
53
|
+
export interface OntologyCreateRowInput {
|
|
54
|
+
values: Array<RecordInput>;
|
|
55
|
+
}
|
|
56
|
+
export type OntologyDataType = 'String' | 'Integer' | 'Long' | 'Double' | 'Float' | 'Boolean' | 'Date' | 'Timestamp' | 'Array' | 'Struct' | 'UUID';
|
|
57
|
+
export interface OntologyDescribeInput {
|
|
58
|
+
entities: Array<string>;
|
|
59
|
+
includeInferred: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface OntologyDescription {
|
|
62
|
+
text: string;
|
|
63
|
+
entities: Array<OntologyDescriptionEntity>;
|
|
64
|
+
relationships: Array<OntologyDescriptionRelationship>;
|
|
65
|
+
}
|
|
66
|
+
export interface OntologyDescriptionEntity {
|
|
67
|
+
name: string;
|
|
68
|
+
displayName: string;
|
|
69
|
+
description: string;
|
|
70
|
+
primaryKey: string;
|
|
71
|
+
fields: Array<OntologyDescriptionField>;
|
|
72
|
+
}
|
|
73
|
+
export interface OntologyDescriptionField {
|
|
74
|
+
name: string;
|
|
75
|
+
displayName: string;
|
|
76
|
+
description: string;
|
|
77
|
+
type: string;
|
|
78
|
+
required: boolean;
|
|
79
|
+
searchable: boolean;
|
|
80
|
+
sortable: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface OntologyDescriptionRelationship {
|
|
83
|
+
name: string;
|
|
84
|
+
source: string;
|
|
85
|
+
sourceField: string;
|
|
86
|
+
target: string;
|
|
87
|
+
targetField: string;
|
|
88
|
+
cardinality: string;
|
|
89
|
+
kind: string;
|
|
90
|
+
}
|
|
91
|
+
export interface OntologyFastLookup {
|
|
92
|
+
id: string;
|
|
93
|
+
entityId: string;
|
|
94
|
+
displayName: string;
|
|
95
|
+
fields: Array<string>;
|
|
96
|
+
status: string;
|
|
97
|
+
reason: string;
|
|
98
|
+
createdAt: string;
|
|
99
|
+
updatedAt: string;
|
|
100
|
+
}
|
|
101
|
+
export interface OntologyLink {
|
|
102
|
+
id: string;
|
|
103
|
+
apiName: string;
|
|
104
|
+
targetOntologyApiName: string;
|
|
105
|
+
cardinality: OntologyLinkCardinality;
|
|
106
|
+
foreignKeyProperty: string;
|
|
107
|
+
targetForeignKeyProperty: string;
|
|
108
|
+
joinTable: string;
|
|
109
|
+
sourceColumnInJoinTable: string;
|
|
110
|
+
targetColumnInJoinTable: string;
|
|
111
|
+
displayName: string;
|
|
112
|
+
pluralDisplayName: string;
|
|
113
|
+
reverseDisplayName: string;
|
|
114
|
+
}
|
|
115
|
+
export type OntologyLinkCardinality = 'ONE_TO_ONE' | 'ONE_TO_MANY' | 'MANY_TO_ONE' | 'MANY_TO_MANY';
|
|
116
|
+
export interface OntologyObjectType {
|
|
117
|
+
id: string;
|
|
118
|
+
projectId: string;
|
|
119
|
+
apiName: string;
|
|
120
|
+
displayName: string;
|
|
121
|
+
pluralDisplayName: string;
|
|
122
|
+
description: string;
|
|
123
|
+
primaryKey: string;
|
|
124
|
+
sourceId?: string | null;
|
|
125
|
+
tableName: string;
|
|
126
|
+
schemaName: string;
|
|
127
|
+
storageMode: OntologyStorageMode;
|
|
128
|
+
provisioningStatus: OntologyProvisioningStatus;
|
|
129
|
+
embeddingEnabled: boolean;
|
|
130
|
+
embeddingProperties: Array<string>;
|
|
131
|
+
status: OntologyStatus;
|
|
132
|
+
icon: string;
|
|
133
|
+
color: string;
|
|
134
|
+
createdAt: string;
|
|
135
|
+
updatedAt: string;
|
|
136
|
+
properties: Array<OntologyProperty>;
|
|
137
|
+
links: Array<OntologyLink>;
|
|
138
|
+
}
|
|
139
|
+
export interface OntologyProperty {
|
|
140
|
+
id: string;
|
|
141
|
+
apiName: string;
|
|
142
|
+
displayName: string;
|
|
143
|
+
description: string;
|
|
144
|
+
columnName: string;
|
|
145
|
+
dataType: OntologyDataType;
|
|
146
|
+
arrayElementType: string;
|
|
147
|
+
isRequired: boolean;
|
|
148
|
+
visibility: OntologyVisibility;
|
|
149
|
+
isSearchable: boolean;
|
|
150
|
+
isSortable: boolean;
|
|
151
|
+
isEditOnly: boolean;
|
|
152
|
+
sortOrder: number;
|
|
153
|
+
}
|
|
154
|
+
export type OntologyProvisioningStatus = 'provisioning' | 'ready' | 'failed';
|
|
155
|
+
export interface OntologyQueryInput {
|
|
156
|
+
entity: string;
|
|
157
|
+
whereJson?: string | null;
|
|
158
|
+
search?: string | null;
|
|
159
|
+
searchFields?: Array<string> | null;
|
|
160
|
+
joins?: Array<OntologyQueryJoinInput> | null;
|
|
161
|
+
groupBy?: Array<string> | null;
|
|
162
|
+
metrics?: Array<OntologyQueryMetricInput> | null;
|
|
163
|
+
sort?: Array<OntologyQuerySortInput> | null;
|
|
164
|
+
pageSize?: number | null;
|
|
165
|
+
offset?: number | null;
|
|
166
|
+
scanLimit?: number | null;
|
|
167
|
+
}
|
|
168
|
+
export interface OntologyQueryJoinInput {
|
|
169
|
+
entity: string;
|
|
170
|
+
leftField: string;
|
|
171
|
+
rightField: string;
|
|
172
|
+
as?: string | null;
|
|
173
|
+
kind?: string | null;
|
|
174
|
+
}
|
|
175
|
+
export interface OntologyQueryMetricInput {
|
|
176
|
+
op: string;
|
|
177
|
+
field?: string | null;
|
|
178
|
+
as?: string | null;
|
|
179
|
+
}
|
|
180
|
+
export interface OntologyQuerySortInput {
|
|
181
|
+
field: string;
|
|
182
|
+
desc?: boolean | null;
|
|
183
|
+
}
|
|
184
|
+
export interface OntologySimilarInput {
|
|
185
|
+
entityId: string;
|
|
186
|
+
rowId: string;
|
|
187
|
+
topK: number;
|
|
188
|
+
properties?: Array<string> | null;
|
|
189
|
+
where?: WhereCondition | null;
|
|
190
|
+
}
|
|
191
|
+
export interface OntologySimilarityResult {
|
|
192
|
+
rows: Array<OntologySimilarityRow>;
|
|
193
|
+
}
|
|
194
|
+
export interface OntologySimilarityRow {
|
|
195
|
+
score: number;
|
|
196
|
+
values: Array<OntologySimilarityValue>;
|
|
197
|
+
}
|
|
198
|
+
export interface OntologySimilarityValue {
|
|
199
|
+
key: string;
|
|
200
|
+
value: string;
|
|
201
|
+
}
|
|
202
|
+
export interface OntologyStatsResult {
|
|
203
|
+
property: string;
|
|
204
|
+
min?: string | null;
|
|
205
|
+
max?: string | null;
|
|
206
|
+
total: number;
|
|
207
|
+
nonNull: number;
|
|
208
|
+
}
|
|
209
|
+
export type OntologyStatus = 'active' | 'experimental' | 'deprecated';
|
|
210
|
+
export type OntologyStorageMode = 'operational' | 'analytical';
|
|
211
|
+
export type OntologyVisibility = 'prominent' | 'normal' | 'hidden';
|
|
212
|
+
export interface OperationWhereCondition {
|
|
213
|
+
Children: Array<WhereCondition>;
|
|
214
|
+
}
|
|
215
|
+
export interface Organization {
|
|
216
|
+
id: string;
|
|
217
|
+
name: string;
|
|
218
|
+
slug: string;
|
|
219
|
+
createdAt: string;
|
|
220
|
+
}
|
|
221
|
+
export interface PlatformSource {
|
|
222
|
+
id: string;
|
|
223
|
+
projectId: string;
|
|
224
|
+
name: string;
|
|
225
|
+
databaseType: string;
|
|
226
|
+
createdBy: string;
|
|
227
|
+
createdAt: string;
|
|
228
|
+
ingestionStatus: string;
|
|
229
|
+
lastEventAt?: string | null;
|
|
230
|
+
ingestionError: string;
|
|
231
|
+
eventsReceived: string;
|
|
232
|
+
}
|
|
233
|
+
export interface Project {
|
|
234
|
+
id: string;
|
|
235
|
+
orgId: string;
|
|
236
|
+
name: string;
|
|
237
|
+
slug: string;
|
|
238
|
+
description: string;
|
|
239
|
+
createdAt: string;
|
|
240
|
+
}
|
|
241
|
+
export interface QueryDatasetInput {
|
|
242
|
+
projectId: string;
|
|
243
|
+
datasetId: string;
|
|
244
|
+
pageSize: number;
|
|
245
|
+
pageOffset: number;
|
|
246
|
+
}
|
|
247
|
+
export interface Record {
|
|
248
|
+
Key: string;
|
|
249
|
+
Value: string;
|
|
250
|
+
}
|
|
251
|
+
export interface RecordInput {
|
|
252
|
+
Key: string;
|
|
253
|
+
Value: string;
|
|
254
|
+
Extra?: Array<RecordInput> | null;
|
|
255
|
+
}
|
|
256
|
+
export interface RowsResult {
|
|
257
|
+
Columns: Array<Column>;
|
|
258
|
+
Rows: Array<Array<string>>;
|
|
259
|
+
DisableUpdate: boolean;
|
|
260
|
+
TotalCount: number;
|
|
261
|
+
}
|
|
262
|
+
export interface SortCondition {
|
|
263
|
+
Column: string;
|
|
264
|
+
Direction: SortDirection;
|
|
265
|
+
}
|
|
266
|
+
export type SortDirection = 'ASC' | 'DESC';
|
|
267
|
+
export type SourceAction = 'Browse' | 'Inspect' | 'ViewRows' | 'ViewContent' | 'ViewDefinition' | 'CreateChild' | 'Delete' | 'InsertData' | 'UpdateData' | 'DeleteData' | 'ImportData' | 'GenerateMockData' | 'Execute' | 'ViewGraph';
|
|
268
|
+
export type SourceMetadataFidelity = 'Exact' | 'Driver' | 'Sampled' | 'Inferred' | 'Synthetic' | 'Unsupported' | 'Unknown';
|
|
269
|
+
export interface SourceObject {
|
|
270
|
+
Ref: SourceObjectRef;
|
|
271
|
+
Kind: SourceObjectKind;
|
|
272
|
+
Name: string;
|
|
273
|
+
Path: Array<string>;
|
|
274
|
+
HasChildren: boolean;
|
|
275
|
+
Actions: Array<SourceAction>;
|
|
276
|
+
Metadata: Array<Record>;
|
|
277
|
+
}
|
|
278
|
+
export type SourceObjectKind = 'Database' | 'Schema' | 'Table' | 'View' | 'Collection' | 'Index' | 'Key' | 'Item' | 'Function' | 'Procedure' | 'Trigger' | 'Sequence';
|
|
279
|
+
export interface SourceObjectRef {
|
|
280
|
+
Kind: SourceObjectKind;
|
|
281
|
+
Locator: string;
|
|
282
|
+
Path: Array<string>;
|
|
283
|
+
}
|
|
284
|
+
export interface SourceObjectRefInput {
|
|
285
|
+
Kind: SourceObjectKind;
|
|
286
|
+
Locator?: string | null;
|
|
287
|
+
Path: Array<string>;
|
|
288
|
+
}
|
|
289
|
+
export interface StatusResponse {
|
|
290
|
+
Status: boolean;
|
|
291
|
+
}
|
|
292
|
+
export interface WhereCondition {
|
|
293
|
+
Type: WhereConditionType;
|
|
294
|
+
Atomic?: AtomicWhereCondition | null;
|
|
295
|
+
And?: OperationWhereCondition | null;
|
|
296
|
+
Or?: OperationWhereCondition | null;
|
|
297
|
+
}
|
|
298
|
+
export type WhereConditionType = 'Atomic' | 'And' | 'Or';
|
|
299
|
+
export interface Workspace {
|
|
300
|
+
orgId?: string | null;
|
|
301
|
+
projectId?: string | null;
|
|
302
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DatasetQueryResult, OntologyObjectType, RowsResult } from './generated/types.js';
|
|
2
|
+
/** A hydrated row: column name → native-typed value. */
|
|
3
|
+
export type Row = Record<string, unknown>;
|
|
4
|
+
/** Coerces one stringly-typed cell into its native type per the shared rules. */
|
|
5
|
+
export declare function coerceValue(raw: string | null, columnType: string): unknown;
|
|
6
|
+
/** Property-metadata type overrides: property apiName → ontology dataType. */
|
|
7
|
+
export type PropertyTypes = Map<string, string>;
|
|
8
|
+
/** Builds a property-type map from ontology entity metadata. */
|
|
9
|
+
export declare function propertyTypesOf(entity: OntologyObjectType): PropertyTypes;
|
|
10
|
+
/**
|
|
11
|
+
* Hydrates a stringly-typed result into native-typed row objects. Ontology
|
|
12
|
+
* property metadata, when supplied, overrides the wire column type — the
|
|
13
|
+
* ontology's dataType is more precise than the storage column type.
|
|
14
|
+
*/
|
|
15
|
+
export declare function hydrateRows(result: DatasetQueryResult | RowsResult, propertyTypes?: PropertyTypes): {
|
|
16
|
+
rows: Row[];
|
|
17
|
+
totalCount: number | null;
|
|
18
|
+
};
|