@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.
Files changed (44) hide show
  1. package/README.md +81 -0
  2. package/dist/auth.d.ts +26 -0
  3. package/dist/auth.js +65 -0
  4. package/dist/client.d.ts +51 -0
  5. package/dist/client.js +157 -0
  6. package/dist/config.d.ts +37 -0
  7. package/dist/config.js +39 -0
  8. package/dist/dataset.d.ts +26 -0
  9. package/dist/dataset.js +45 -0
  10. package/dist/errors.d.ts +43 -0
  11. package/dist/errors.js +59 -0
  12. package/dist/files.d.ts +25 -0
  13. package/dist/files.js +53 -0
  14. package/dist/generated/hydration.d.ts +3 -0
  15. package/dist/generated/hydration.js +32 -0
  16. package/dist/generated/manifest.d.ts +12 -0
  17. package/dist/generated/manifest.js +80 -0
  18. package/dist/generated/operations.d.ts +196 -0
  19. package/dist/generated/operations.js +145 -0
  20. package/dist/generated/surface.d.ts +190 -0
  21. package/dist/generated/surface.js +191 -0
  22. package/dist/generated/types.d.ts +302 -0
  23. package/dist/generated/types.js +2 -0
  24. package/dist/hydrate.d.ts +18 -0
  25. package/dist/hydrate.js +83 -0
  26. package/dist/index.d.ts +14 -0
  27. package/dist/index.js +9 -0
  28. package/dist/manifest-check.d.ts +15 -0
  29. package/dist/manifest-check.js +43 -0
  30. package/dist/ontology.d.ts +73 -0
  31. package/dist/ontology.js +240 -0
  32. package/dist/pagination.d.ts +21 -0
  33. package/dist/pagination.js +33 -0
  34. package/dist/source.d.ts +31 -0
  35. package/dist/source.js +63 -0
  36. package/dist/transport-http.d.ts +22 -0
  37. package/dist/transport-http.js +60 -0
  38. package/dist/transport-ipc.d.ts +31 -0
  39. package/dist/transport-ipc.js +183 -0
  40. package/dist/transport.d.ts +9 -0
  41. package/dist/transport.js +1 -0
  42. package/dist/version.d.ts +5 -0
  43. package/dist/version.js +5 -0
  44. package/package.json +34 -0
package/dist/files.js ADDED
@@ -0,0 +1,53 @@
1
+ import { PlatformError } from './errors.js';
2
+ import { SDK_VERSION } from './version.js';
3
+ /**
4
+ * FilesHandle wraps the platform's file HTTP endpoints — bulk payloads are
5
+ * deliberately not squeezed through GraphQL (SDK_DESIGN.md §4).
6
+ */
7
+ export class FilesHandle {
8
+ options;
9
+ constructor(options) {
10
+ this.options = options;
11
+ }
12
+ /** Uploads a file (multipart) into the project's file storage. */
13
+ async upload(name, content, folderId) {
14
+ const token = await this.options.credentials.token();
15
+ const form = new FormData();
16
+ const blob = content instanceof Blob ? content : new Blob([content]);
17
+ form.set('file', blob, name);
18
+ if (folderId)
19
+ form.set('folderId', folderId);
20
+ form.set('projectId', await this.options.projectId());
21
+ const response = await fetch(`${this.options.host.replace(/\/$/, '')}/api/files/upload`, {
22
+ method: 'POST',
23
+ headers: {
24
+ Authorization: `Bearer ${token}`,
25
+ 'User-Agent': `clidey-whodb-ts/${SDK_VERSION}`,
26
+ 'X-Whodb-Org-Id': await this.options.orgId(),
27
+ 'X-Whodb-Project-Id': await this.options.projectId(),
28
+ },
29
+ body: form,
30
+ });
31
+ if (!response.ok) {
32
+ throw new PlatformError(`file upload failed with HTTP ${response.status}`, `HTTP_${response.status}`);
33
+ }
34
+ return (await response.json());
35
+ }
36
+ /** Downloads a project file's raw bytes. */
37
+ async download(fileId) {
38
+ const token = await this.options.credentials.token();
39
+ const projectId = await this.options.projectId();
40
+ const response = await fetch(`${this.options.host.replace(/\/$/, '')}/api/projects/${encodeURIComponent(projectId)}/files/${encodeURIComponent(fileId)}/download`, {
41
+ headers: {
42
+ Authorization: `Bearer ${token}`,
43
+ 'User-Agent': `clidey-whodb-ts/${SDK_VERSION}`,
44
+ 'X-Whodb-Org-Id': await this.options.orgId(),
45
+ 'X-Whodb-Project-Id': projectId,
46
+ },
47
+ });
48
+ if (!response.ok) {
49
+ throw new PlatformError(`file download failed with HTTP ${response.status}`, `HTTP_${response.status}`);
50
+ }
51
+ return new Uint8Array(await response.arrayBuffer());
52
+ }
53
+ }
@@ -0,0 +1,3 @@
1
+ /** Column-type → coercion kind rules shared across all SDK languages. */
2
+ export declare const hydrationRules: Record<string, string>;
3
+ export declare const hydrationDefault = "string";
@@ -0,0 +1,32 @@
1
+ // GENERATED by sdk/tools/generate-core.mjs — DO NOT EDIT (manifest 4b84678f5fe7)
2
+ /** Column-type → coercion kind rules shared across all SDK languages. */
3
+ export const hydrationRules = {
4
+ "int": "int",
5
+ "integer": "int",
6
+ "bigint": "int",
7
+ "smallint": "int",
8
+ "int2": "int",
9
+ "int4": "int",
10
+ "int8": "int",
11
+ "serial": "int",
12
+ "bigserial": "int",
13
+ "float": "float",
14
+ "float4": "float",
15
+ "float8": "float",
16
+ "double": "float",
17
+ "double precision": "float",
18
+ "real": "float",
19
+ "numeric": "float",
20
+ "decimal": "float",
21
+ "bool": "bool",
22
+ "boolean": "bool",
23
+ "timestamp": "timestamp",
24
+ "timestamptz": "timestamp",
25
+ "timestamp with time zone": "timestamp",
26
+ "timestamp without time zone": "timestamp",
27
+ "datetime": "timestamp",
28
+ "date": "date",
29
+ "json": "json",
30
+ "jsonb": "json"
31
+ };
32
+ export const hydrationDefault = 'string';
@@ -0,0 +1,12 @@
1
+ /** Per-operation versioning-policy state embedded at generation time. */
2
+ export declare const embeddedManifest: Record<string, {
3
+ kind: string;
4
+ deprecated?: boolean;
5
+ sunsetAt?: string;
6
+ behaviorChanged?: boolean;
7
+ note?: string;
8
+ }>;
9
+ /** SHA-256 of the platform-manifest.json this SDK was generated from. */
10
+ export declare const manifestHash = "4b84678f5fe7d777fbd4c4b2a93dff64f4c8951978ce68006ddc3a0e25c6942f";
11
+ /** Manifest protocol version this SDK understands. */
12
+ export declare const manifestProtocolVersion = "1";
@@ -0,0 +1,80 @@
1
+ // GENERATED by sdk/tools/generate-core.mjs — DO NOT EDIT (manifest 4b84678f5fe7)
2
+ /** Per-operation versioning-policy state embedded at generation time. */
3
+ export const embeddedManifest = {
4
+ "OntologyEntities": {
5
+ "kind": "Query"
6
+ },
7
+ "OntologyEntity": {
8
+ "kind": "Query"
9
+ },
10
+ "OntologyDescribe": {
11
+ "kind": "Query"
12
+ },
13
+ "OntologyRows": {
14
+ "kind": "Query"
15
+ },
16
+ "OntologyQuery": {
17
+ "kind": "Query"
18
+ },
19
+ "OntologyAggregate": {
20
+ "kind": "Query"
21
+ },
22
+ "OntologyStats": {
23
+ "kind": "Query"
24
+ },
25
+ "OntologySimilar": {
26
+ "kind": "Query"
27
+ },
28
+ "OntologyFollowLink": {
29
+ "kind": "Query"
30
+ },
31
+ "OntologyFollowIncomingLink": {
32
+ "kind": "Query"
33
+ },
34
+ "OntologyFastLookups": {
35
+ "kind": "Query"
36
+ },
37
+ "OntologyAddRow": {
38
+ "kind": "Mutation"
39
+ },
40
+ "OntologyAddRows": {
41
+ "kind": "Mutation"
42
+ },
43
+ "OntologyUpdateRow": {
44
+ "kind": "Mutation"
45
+ },
46
+ "OntologyDeleteRow": {
47
+ "kind": "Mutation"
48
+ },
49
+ "ProjectDatasets": {
50
+ "kind": "Query"
51
+ },
52
+ "QueryDataset": {
53
+ "kind": "Query"
54
+ },
55
+ "ProjectSources": {
56
+ "kind": "Query"
57
+ },
58
+ "PlatformSourceRows": {
59
+ "kind": "Query"
60
+ },
61
+ "PlatformSourceObjects": {
62
+ "kind": "Query"
63
+ },
64
+ "PlatformSourceColumns": {
65
+ "kind": "Query"
66
+ },
67
+ "MyOrganizations": {
68
+ "kind": "Query"
69
+ },
70
+ "Projects": {
71
+ "kind": "Query"
72
+ },
73
+ "MyWorkspace": {
74
+ "kind": "Query"
75
+ }
76
+ };
77
+ /** SHA-256 of the platform-manifest.json this SDK was generated from. */
78
+ export const manifestHash = '4b84678f5fe7d777fbd4c4b2a93dff64f4c8951978ce68006ddc3a0e25c6942f';
79
+ /** Manifest protocol version this SDK understands. */
80
+ export const manifestProtocolVersion = '1';
@@ -0,0 +1,196 @@
1
+ import type { Transport } from '../transport.js';
2
+ import type { Column, Dataset, DatasetQueryResult, OntologyAddRowsResult, OntologyAggregateMetricInput, OntologyCreateRowInput, OntologyDescribeInput, OntologyDescription, OntologyFastLookup, OntologyObjectType, OntologyQueryInput, OntologySimilarInput, OntologySimilarityResult, OntologyStatsResult, Organization, PlatformSource, Project, QueryDatasetInput, RecordInput, RowsResult, SortCondition, SourceObject, SourceObjectKind, SourceObjectRefInput, StatusResponse, WhereCondition, Workspace } from './types.js';
3
+ export interface OntologyEntitiesVars {
4
+ projectId: string;
5
+ }
6
+ export declare const OntologyEntitiesDocument = "query OntologyEntities($projectId: ID!) { OntologyEntities(projectId: $projectId) { id projectId apiName displayName pluralDisplayName description primaryKey sourceId tableName schemaName storageMode provisioningStatus embeddingEnabled embeddingProperties status icon color createdAt updatedAt properties { id apiName displayName description columnName dataType arrayElementType isRequired visibility isSearchable isSortable isEditOnly sortOrder } links { id apiName targetOntologyApiName cardinality foreignKeyProperty targetForeignKeyProperty joinTable sourceColumnInJoinTable targetColumnInJoinTable displayName pluralDisplayName reverseDisplayName } } }";
7
+ /** Generated wire call for Query OntologyEntities. */
8
+ export declare function ontologyEntities(transport: Transport, vars: OntologyEntitiesVars): Promise<Array<OntologyObjectType>>;
9
+ export interface OntologyEntityVars {
10
+ projectId: string;
11
+ id: string;
12
+ }
13
+ export declare const OntologyEntityDocument = "query OntologyEntity($projectId: ID!, $id: ID!) { OntologyEntity(projectId: $projectId, id: $id) { id projectId apiName displayName pluralDisplayName description primaryKey sourceId tableName schemaName storageMode provisioningStatus embeddingEnabled embeddingProperties status icon color createdAt updatedAt properties { id apiName displayName description columnName dataType arrayElementType isRequired visibility isSearchable isSortable isEditOnly sortOrder } links { id apiName targetOntologyApiName cardinality foreignKeyProperty targetForeignKeyProperty joinTable sourceColumnInJoinTable targetColumnInJoinTable displayName pluralDisplayName reverseDisplayName } } }";
14
+ /** Generated wire call for Query OntologyEntity. */
15
+ export declare function ontologyEntity(transport: Transport, vars: OntologyEntityVars): Promise<OntologyObjectType>;
16
+ export interface OntologyDescribeVars {
17
+ projectId: string;
18
+ input: OntologyDescribeInput;
19
+ }
20
+ export declare const OntologyDescribeDocument = "query OntologyDescribe($projectId: ID!, $input: OntologyDescribeInput!) { OntologyDescribe(projectId: $projectId, input: $input) { text entities { name displayName description primaryKey fields { name displayName description type required searchable sortable } } relationships { name source sourceField target targetField cardinality kind } } }";
21
+ /** Generated wire call for Query OntologyDescribe. */
22
+ export declare function ontologyDescribe(transport: Transport, vars: OntologyDescribeVars): Promise<OntologyDescription>;
23
+ export interface OntologyRowsVars {
24
+ projectId: string;
25
+ id: string;
26
+ pageSize: number;
27
+ pageOffset: number;
28
+ }
29
+ export declare const OntologyRowsDocument = "query OntologyRows($projectId: ID!, $id: ID!, $pageSize: Int!, $pageOffset: Int!) { OntologyRows(projectId: $projectId, id: $id, pageSize: $pageSize, pageOffset: $pageOffset) { columns rows total } }";
30
+ /** Generated wire call for Query OntologyRows. */
31
+ export declare function ontologyRows(transport: Transport, vars: OntologyRowsVars): Promise<DatasetQueryResult>;
32
+ export interface OntologyQueryVars {
33
+ projectId: string;
34
+ input: OntologyQueryInput;
35
+ }
36
+ export declare const OntologyQueryDocument = "query OntologyQuery($projectId: ID!, $input: OntologyQueryInput!) { OntologyQuery(projectId: $projectId, input: $input) { columns rows total } }";
37
+ /** Generated wire call for Query OntologyQuery. */
38
+ export declare function ontologyQuery(transport: Transport, vars: OntologyQueryVars): Promise<DatasetQueryResult>;
39
+ export interface OntologyAggregateVars {
40
+ projectId: string;
41
+ id: string;
42
+ groupBy: Array<string>;
43
+ metrics: Array<OntologyAggregateMetricInput>;
44
+ where?: WhereCondition | null;
45
+ sort?: Array<SortCondition> | null;
46
+ pageSize: number;
47
+ pageOffset: number;
48
+ }
49
+ export declare const OntologyAggregateDocument = "query OntologyAggregate($projectId: ID!, $id: ID!, $groupBy: [String!]!, $metrics: [OntologyAggregateMetricInput!]!, $where: WhereCondition, $sort: [SortCondition!], $pageSize: Int!, $pageOffset: Int!) { OntologyAggregate(projectId: $projectId, id: $id, groupBy: $groupBy, metrics: $metrics, where: $where, sort: $sort, pageSize: $pageSize, pageOffset: $pageOffset) { columns rows total } }";
50
+ /** Generated wire call for Query OntologyAggregate. */
51
+ export declare function ontologyAggregate(transport: Transport, vars: OntologyAggregateVars): Promise<DatasetQueryResult>;
52
+ export interface OntologyStatsVars {
53
+ projectId: string;
54
+ id: string;
55
+ property: string;
56
+ where?: WhereCondition | null;
57
+ }
58
+ export declare const OntologyStatsDocument = "query OntologyStats($projectId: ID!, $id: ID!, $property: String!, $where: WhereCondition) { OntologyStats(projectId: $projectId, id: $id, property: $property, where: $where) { property min max total nonNull } }";
59
+ /** Generated wire call for Query OntologyStats. */
60
+ export declare function ontologyStats(transport: Transport, vars: OntologyStatsVars): Promise<OntologyStatsResult>;
61
+ export interface OntologySimilarVars {
62
+ projectId: string;
63
+ input: OntologySimilarInput;
64
+ }
65
+ export declare const OntologySimilarDocument = "query OntologySimilar($projectId: ID!, $input: OntologySimilarInput!) { OntologySimilar(projectId: $projectId, input: $input) { rows { score values { key value } } } }";
66
+ /** Generated wire call for Query OntologySimilar. */
67
+ export declare function ontologySimilar(transport: Transport, vars: OntologySimilarVars): Promise<OntologySimilarityResult>;
68
+ export interface OntologyFollowLinkVars {
69
+ projectId: string;
70
+ entityId: string;
71
+ pk: string;
72
+ linkApiName: string;
73
+ pageSize: number;
74
+ pageOffset: number;
75
+ }
76
+ export declare const OntologyFollowLinkDocument = "query OntologyFollowLink($projectId: ID!, $entityId: ID!, $pk: String!, $linkApiName: String!, $pageSize: Int!, $pageOffset: Int!) { OntologyFollowLink(projectId: $projectId, entityId: $entityId, pk: $pk, linkApiName: $linkApiName, pageSize: $pageSize, pageOffset: $pageOffset) { columns rows total } }";
77
+ /** Generated wire call for Query OntologyFollowLink. */
78
+ export declare function ontologyFollowLink(transport: Transport, vars: OntologyFollowLinkVars): Promise<DatasetQueryResult>;
79
+ export interface OntologyFollowIncomingLinkVars {
80
+ projectId: string;
81
+ entityId: string;
82
+ pk: string;
83
+ sourceEntityId: string;
84
+ linkApiName: string;
85
+ pageSize: number;
86
+ pageOffset: number;
87
+ }
88
+ export declare const OntologyFollowIncomingLinkDocument = "query OntologyFollowIncomingLink($projectId: ID!, $entityId: ID!, $pk: String!, $sourceEntityId: ID!, $linkApiName: String!, $pageSize: Int!, $pageOffset: Int!) { OntologyFollowIncomingLink(projectId: $projectId, entityId: $entityId, pk: $pk, sourceEntityId: $sourceEntityId, linkApiName: $linkApiName, pageSize: $pageSize, pageOffset: $pageOffset) { columns rows total } }";
89
+ /** Generated wire call for Query OntologyFollowIncomingLink. */
90
+ export declare function ontologyFollowIncomingLink(transport: Transport, vars: OntologyFollowIncomingLinkVars): Promise<DatasetQueryResult>;
91
+ export interface OntologyFastLookupsVars {
92
+ projectId: string;
93
+ entityId: string;
94
+ }
95
+ export declare const OntologyFastLookupsDocument = "query OntologyFastLookups($projectId: ID!, $entityId: ID!) { OntologyFastLookups(projectId: $projectId, entityId: $entityId) { id entityId displayName fields status reason createdAt updatedAt } }";
96
+ /** Generated wire call for Query OntologyFastLookups. */
97
+ export declare function ontologyFastLookups(transport: Transport, vars: OntologyFastLookupsVars): Promise<Array<OntologyFastLookup>>;
98
+ export interface OntologyAddRowVars {
99
+ projectId: string;
100
+ entityId: string;
101
+ values: Array<RecordInput>;
102
+ }
103
+ export declare const OntologyAddRowDocument = "mutation OntologyAddRow($projectId: ID!, $entityId: ID!, $values: [RecordInput!]!) { OntologyAddRow(projectId: $projectId, entityId: $entityId, values: $values) { Status } }";
104
+ /** Generated wire call for Mutation OntologyAddRow. */
105
+ export declare function ontologyAddRow(transport: Transport, vars: OntologyAddRowVars): Promise<StatusResponse>;
106
+ export interface OntologyAddRowsVars {
107
+ projectId: string;
108
+ entityId: string;
109
+ rows: Array<OntologyCreateRowInput>;
110
+ idempotencyKey?: string | null;
111
+ }
112
+ export declare const OntologyAddRowsDocument = "mutation OntologyAddRows($projectId: ID!, $entityId: ID!, $rows: [OntologyCreateRowInput!]!, $idempotencyKey: String) { OntologyAddRows(projectId: $projectId, entityId: $entityId, rows: $rows, idempotencyKey: $idempotencyKey) { inserted ids } }";
113
+ /** Generated wire call for Mutation OntologyAddRows. */
114
+ export declare function ontologyAddRows(transport: Transport, vars: OntologyAddRowsVars): Promise<OntologyAddRowsResult>;
115
+ export interface OntologyUpdateRowVars {
116
+ projectId: string;
117
+ entityId: string;
118
+ values: Array<RecordInput>;
119
+ updatedColumns: Array<string>;
120
+ }
121
+ export declare const OntologyUpdateRowDocument = "mutation OntologyUpdateRow($projectId: ID!, $entityId: ID!, $values: [RecordInput!]!, $updatedColumns: [String!]!) { OntologyUpdateRow(projectId: $projectId, entityId: $entityId, values: $values, updatedColumns: $updatedColumns) { Status } }";
122
+ /** Generated wire call for Mutation OntologyUpdateRow. */
123
+ export declare function ontologyUpdateRow(transport: Transport, vars: OntologyUpdateRowVars): Promise<StatusResponse>;
124
+ export interface OntologyDeleteRowVars {
125
+ projectId: string;
126
+ entityId: string;
127
+ values: Array<RecordInput>;
128
+ }
129
+ export declare const OntologyDeleteRowDocument = "mutation OntologyDeleteRow($projectId: ID!, $entityId: ID!, $values: [RecordInput!]!) { OntologyDeleteRow(projectId: $projectId, entityId: $entityId, values: $values) { Status } }";
130
+ /** Generated wire call for Mutation OntologyDeleteRow. */
131
+ export declare function ontologyDeleteRow(transport: Transport, vars: OntologyDeleteRowVars): Promise<StatusResponse>;
132
+ export interface ProjectDatasetsVars {
133
+ projectId: string;
134
+ }
135
+ export declare const ProjectDatasetsDocument = "query ProjectDatasets($projectId: ID!) { ProjectDatasets(projectId: $projectId) { id projectId sourceId name description schema { name type isNullable isPrimary } schemaMode ownerId rowCount sizeBytes createdAt updatedAt } }";
136
+ /** Generated wire call for Query ProjectDatasets. */
137
+ export declare function projectDatasets(transport: Transport, vars: ProjectDatasetsVars): Promise<Array<Dataset>>;
138
+ export interface QueryDatasetVars {
139
+ input: QueryDatasetInput;
140
+ }
141
+ export declare const QueryDatasetDocument = "query QueryDataset($input: QueryDatasetInput!) { QueryDataset(input: $input) { columns rows total } }";
142
+ /** Generated wire call for Query QueryDataset. */
143
+ export declare function queryDataset(transport: Transport, vars: QueryDatasetVars): Promise<DatasetQueryResult>;
144
+ export interface ProjectSourcesVars {
145
+ projectId: string;
146
+ }
147
+ export declare const ProjectSourcesDocument = "query ProjectSources($projectId: ID!) { ProjectSources(projectId: $projectId) { id projectId name databaseType createdBy createdAt ingestionStatus lastEventAt ingestionError eventsReceived } }";
148
+ /** Generated wire call for Query ProjectSources. */
149
+ export declare function projectSources(transport: Transport, vars: ProjectSourcesVars): Promise<Array<PlatformSource>>;
150
+ export interface PlatformSourceRowsVars {
151
+ projectId: string;
152
+ sourceId: string;
153
+ ref: SourceObjectRefInput;
154
+ where?: WhereCondition | null;
155
+ sort?: Array<SortCondition> | null;
156
+ pageSize: number;
157
+ pageOffset: number;
158
+ }
159
+ export declare const PlatformSourceRowsDocument = "query PlatformSourceRows($projectId: ID!, $sourceId: ID!, $ref: SourceObjectRefInput!, $where: WhereCondition, $sort: [SortCondition!], $pageSize: Int!, $pageOffset: Int!) { PlatformSourceRows(projectId: $projectId, sourceId: $sourceId, ref: $ref, where: $where, sort: $sort, pageSize: $pageSize, pageOffset: $pageOffset) { Columns { Type Name MetadataFidelity IsPrimary IsForeignKey ReferencedTable ReferencedColumn Length Precision Scale } Rows DisableUpdate TotalCount } }";
160
+ /** Generated wire call for Query PlatformSourceRows. */
161
+ export declare function platformSourceRows(transport: Transport, vars: PlatformSourceRowsVars): Promise<RowsResult>;
162
+ export interface PlatformSourceObjectsVars {
163
+ projectId: string;
164
+ sourceId: string;
165
+ parent?: SourceObjectRefInput | null;
166
+ kinds?: Array<SourceObjectKind> | null;
167
+ pageSize?: number | null;
168
+ pageOffset?: number | null;
169
+ }
170
+ export declare const PlatformSourceObjectsDocument = "query PlatformSourceObjects($projectId: ID!, $sourceId: ID!, $parent: SourceObjectRefInput, $kinds: [SourceObjectKind!], $pageSize: Int, $pageOffset: Int) { PlatformSourceObjects(projectId: $projectId, sourceId: $sourceId, parent: $parent, kinds: $kinds, pageSize: $pageSize, pageOffset: $pageOffset) { Ref { Kind Locator Path } Kind Name Path HasChildren Actions Metadata { Key Value } } }";
171
+ /** Generated wire call for Query PlatformSourceObjects. */
172
+ export declare function platformSourceObjects(transport: Transport, vars: PlatformSourceObjectsVars): Promise<Array<SourceObject>>;
173
+ export interface PlatformSourceColumnsVars {
174
+ projectId: string;
175
+ sourceId: string;
176
+ ref: SourceObjectRefInput;
177
+ }
178
+ export declare const PlatformSourceColumnsDocument = "query PlatformSourceColumns($projectId: ID!, $sourceId: ID!, $ref: SourceObjectRefInput!) { PlatformSourceColumns(projectId: $projectId, sourceId: $sourceId, ref: $ref) { Type Name MetadataFidelity IsPrimary IsForeignKey ReferencedTable ReferencedColumn Length Precision Scale } }";
179
+ /** Generated wire call for Query PlatformSourceColumns. */
180
+ export declare function platformSourceColumns(transport: Transport, vars: PlatformSourceColumnsVars): Promise<Array<Column>>;
181
+ export interface MyOrganizationsVars {
182
+ }
183
+ export declare const MyOrganizationsDocument = "query MyOrganizations { MyOrganizations { id name slug createdAt } }";
184
+ /** Generated wire call for Query MyOrganizations. */
185
+ export declare function myOrganizations(transport: Transport, vars: MyOrganizationsVars): Promise<Array<Organization>>;
186
+ export interface ProjectsVars {
187
+ orgId: string;
188
+ }
189
+ export declare const ProjectsDocument = "query Projects($orgId: ID!) { Projects(orgId: $orgId) { id orgId name slug description createdAt } }";
190
+ /** Generated wire call for Query Projects. */
191
+ export declare function projects(transport: Transport, vars: ProjectsVars): Promise<Array<Project>>;
192
+ export interface MyWorkspaceVars {
193
+ }
194
+ export declare const MyWorkspaceDocument = "query MyWorkspace { MyWorkspace { orgId projectId } }";
195
+ /** Generated wire call for Query MyWorkspace. */
196
+ export declare function myWorkspace(transport: Transport, vars: MyWorkspaceVars): Promise<Workspace>;
@@ -0,0 +1,145 @@
1
+ // GENERATED by sdk/tools/generate-core.mjs — DO NOT EDIT (manifest 4b84678f5fe7)
2
+ export const OntologyEntitiesDocument = "query OntologyEntities($projectId: ID!) { OntologyEntities(projectId: $projectId) { id projectId apiName displayName pluralDisplayName description primaryKey sourceId tableName schemaName storageMode provisioningStatus embeddingEnabled embeddingProperties status icon color createdAt updatedAt properties { id apiName displayName description columnName dataType arrayElementType isRequired visibility isSearchable isSortable isEditOnly sortOrder } links { id apiName targetOntologyApiName cardinality foreignKeyProperty targetForeignKeyProperty joinTable sourceColumnInJoinTable targetColumnInJoinTable displayName pluralDisplayName reverseDisplayName } } }";
3
+ /** Generated wire call for Query OntologyEntities. */
4
+ export async function ontologyEntities(transport, vars) {
5
+ const data = await transport.execute('OntologyEntities', OntologyEntitiesDocument, vars);
6
+ return data['OntologyEntities'];
7
+ }
8
+ export const OntologyEntityDocument = "query OntologyEntity($projectId: ID!, $id: ID!) { OntologyEntity(projectId: $projectId, id: $id) { id projectId apiName displayName pluralDisplayName description primaryKey sourceId tableName schemaName storageMode provisioningStatus embeddingEnabled embeddingProperties status icon color createdAt updatedAt properties { id apiName displayName description columnName dataType arrayElementType isRequired visibility isSearchable isSortable isEditOnly sortOrder } links { id apiName targetOntologyApiName cardinality foreignKeyProperty targetForeignKeyProperty joinTable sourceColumnInJoinTable targetColumnInJoinTable displayName pluralDisplayName reverseDisplayName } } }";
9
+ /** Generated wire call for Query OntologyEntity. */
10
+ export async function ontologyEntity(transport, vars) {
11
+ const data = await transport.execute('OntologyEntity', OntologyEntityDocument, vars);
12
+ return data['OntologyEntity'];
13
+ }
14
+ export const OntologyDescribeDocument = "query OntologyDescribe($projectId: ID!, $input: OntologyDescribeInput!) { OntologyDescribe(projectId: $projectId, input: $input) { text entities { name displayName description primaryKey fields { name displayName description type required searchable sortable } } relationships { name source sourceField target targetField cardinality kind } } }";
15
+ /** Generated wire call for Query OntologyDescribe. */
16
+ export async function ontologyDescribe(transport, vars) {
17
+ const data = await transport.execute('OntologyDescribe', OntologyDescribeDocument, vars);
18
+ return data['OntologyDescribe'];
19
+ }
20
+ export const OntologyRowsDocument = "query OntologyRows($projectId: ID!, $id: ID!, $pageSize: Int!, $pageOffset: Int!) { OntologyRows(projectId: $projectId, id: $id, pageSize: $pageSize, pageOffset: $pageOffset) { columns rows total } }";
21
+ /** Generated wire call for Query OntologyRows. */
22
+ export async function ontologyRows(transport, vars) {
23
+ const data = await transport.execute('OntologyRows', OntologyRowsDocument, vars);
24
+ return data['OntologyRows'];
25
+ }
26
+ export const OntologyQueryDocument = "query OntologyQuery($projectId: ID!, $input: OntologyQueryInput!) { OntologyQuery(projectId: $projectId, input: $input) { columns rows total } }";
27
+ /** Generated wire call for Query OntologyQuery. */
28
+ export async function ontologyQuery(transport, vars) {
29
+ const data = await transport.execute('OntologyQuery', OntologyQueryDocument, vars);
30
+ return data['OntologyQuery'];
31
+ }
32
+ export const OntologyAggregateDocument = "query OntologyAggregate($projectId: ID!, $id: ID!, $groupBy: [String!]!, $metrics: [OntologyAggregateMetricInput!]!, $where: WhereCondition, $sort: [SortCondition!], $pageSize: Int!, $pageOffset: Int!) { OntologyAggregate(projectId: $projectId, id: $id, groupBy: $groupBy, metrics: $metrics, where: $where, sort: $sort, pageSize: $pageSize, pageOffset: $pageOffset) { columns rows total } }";
33
+ /** Generated wire call for Query OntologyAggregate. */
34
+ export async function ontologyAggregate(transport, vars) {
35
+ const data = await transport.execute('OntologyAggregate', OntologyAggregateDocument, vars);
36
+ return data['OntologyAggregate'];
37
+ }
38
+ export const OntologyStatsDocument = "query OntologyStats($projectId: ID!, $id: ID!, $property: String!, $where: WhereCondition) { OntologyStats(projectId: $projectId, id: $id, property: $property, where: $where) { property min max total nonNull } }";
39
+ /** Generated wire call for Query OntologyStats. */
40
+ export async function ontologyStats(transport, vars) {
41
+ const data = await transport.execute('OntologyStats', OntologyStatsDocument, vars);
42
+ return data['OntologyStats'];
43
+ }
44
+ export const OntologySimilarDocument = "query OntologySimilar($projectId: ID!, $input: OntologySimilarInput!) { OntologySimilar(projectId: $projectId, input: $input) { rows { score values { key value } } } }";
45
+ /** Generated wire call for Query OntologySimilar. */
46
+ export async function ontologySimilar(transport, vars) {
47
+ const data = await transport.execute('OntologySimilar', OntologySimilarDocument, vars);
48
+ return data['OntologySimilar'];
49
+ }
50
+ export const OntologyFollowLinkDocument = "query OntologyFollowLink($projectId: ID!, $entityId: ID!, $pk: String!, $linkApiName: String!, $pageSize: Int!, $pageOffset: Int!) { OntologyFollowLink(projectId: $projectId, entityId: $entityId, pk: $pk, linkApiName: $linkApiName, pageSize: $pageSize, pageOffset: $pageOffset) { columns rows total } }";
51
+ /** Generated wire call for Query OntologyFollowLink. */
52
+ export async function ontologyFollowLink(transport, vars) {
53
+ const data = await transport.execute('OntologyFollowLink', OntologyFollowLinkDocument, vars);
54
+ return data['OntologyFollowLink'];
55
+ }
56
+ export const OntologyFollowIncomingLinkDocument = "query OntologyFollowIncomingLink($projectId: ID!, $entityId: ID!, $pk: String!, $sourceEntityId: ID!, $linkApiName: String!, $pageSize: Int!, $pageOffset: Int!) { OntologyFollowIncomingLink(projectId: $projectId, entityId: $entityId, pk: $pk, sourceEntityId: $sourceEntityId, linkApiName: $linkApiName, pageSize: $pageSize, pageOffset: $pageOffset) { columns rows total } }";
57
+ /** Generated wire call for Query OntologyFollowIncomingLink. */
58
+ export async function ontologyFollowIncomingLink(transport, vars) {
59
+ const data = await transport.execute('OntologyFollowIncomingLink', OntologyFollowIncomingLinkDocument, vars);
60
+ return data['OntologyFollowIncomingLink'];
61
+ }
62
+ export const OntologyFastLookupsDocument = "query OntologyFastLookups($projectId: ID!, $entityId: ID!) { OntologyFastLookups(projectId: $projectId, entityId: $entityId) { id entityId displayName fields status reason createdAt updatedAt } }";
63
+ /** Generated wire call for Query OntologyFastLookups. */
64
+ export async function ontologyFastLookups(transport, vars) {
65
+ const data = await transport.execute('OntologyFastLookups', OntologyFastLookupsDocument, vars);
66
+ return data['OntologyFastLookups'];
67
+ }
68
+ export const OntologyAddRowDocument = "mutation OntologyAddRow($projectId: ID!, $entityId: ID!, $values: [RecordInput!]!) { OntologyAddRow(projectId: $projectId, entityId: $entityId, values: $values) { Status } }";
69
+ /** Generated wire call for Mutation OntologyAddRow. */
70
+ export async function ontologyAddRow(transport, vars) {
71
+ const data = await transport.execute('OntologyAddRow', OntologyAddRowDocument, vars);
72
+ return data['OntologyAddRow'];
73
+ }
74
+ export const OntologyAddRowsDocument = "mutation OntologyAddRows($projectId: ID!, $entityId: ID!, $rows: [OntologyCreateRowInput!]!, $idempotencyKey: String) { OntologyAddRows(projectId: $projectId, entityId: $entityId, rows: $rows, idempotencyKey: $idempotencyKey) { inserted ids } }";
75
+ /** Generated wire call for Mutation OntologyAddRows. */
76
+ export async function ontologyAddRows(transport, vars) {
77
+ const data = await transport.execute('OntologyAddRows', OntologyAddRowsDocument, vars);
78
+ return data['OntologyAddRows'];
79
+ }
80
+ export const OntologyUpdateRowDocument = "mutation OntologyUpdateRow($projectId: ID!, $entityId: ID!, $values: [RecordInput!]!, $updatedColumns: [String!]!) { OntologyUpdateRow(projectId: $projectId, entityId: $entityId, values: $values, updatedColumns: $updatedColumns) { Status } }";
81
+ /** Generated wire call for Mutation OntologyUpdateRow. */
82
+ export async function ontologyUpdateRow(transport, vars) {
83
+ const data = await transport.execute('OntologyUpdateRow', OntologyUpdateRowDocument, vars);
84
+ return data['OntologyUpdateRow'];
85
+ }
86
+ export const OntologyDeleteRowDocument = "mutation OntologyDeleteRow($projectId: ID!, $entityId: ID!, $values: [RecordInput!]!) { OntologyDeleteRow(projectId: $projectId, entityId: $entityId, values: $values) { Status } }";
87
+ /** Generated wire call for Mutation OntologyDeleteRow. */
88
+ export async function ontologyDeleteRow(transport, vars) {
89
+ const data = await transport.execute('OntologyDeleteRow', OntologyDeleteRowDocument, vars);
90
+ return data['OntologyDeleteRow'];
91
+ }
92
+ export const ProjectDatasetsDocument = "query ProjectDatasets($projectId: ID!) { ProjectDatasets(projectId: $projectId) { id projectId sourceId name description schema { name type isNullable isPrimary } schemaMode ownerId rowCount sizeBytes createdAt updatedAt } }";
93
+ /** Generated wire call for Query ProjectDatasets. */
94
+ export async function projectDatasets(transport, vars) {
95
+ const data = await transport.execute('ProjectDatasets', ProjectDatasetsDocument, vars);
96
+ return data['ProjectDatasets'];
97
+ }
98
+ export const QueryDatasetDocument = "query QueryDataset($input: QueryDatasetInput!) { QueryDataset(input: $input) { columns rows total } }";
99
+ /** Generated wire call for Query QueryDataset. */
100
+ export async function queryDataset(transport, vars) {
101
+ const data = await transport.execute('QueryDataset', QueryDatasetDocument, vars);
102
+ return data['QueryDataset'];
103
+ }
104
+ export const ProjectSourcesDocument = "query ProjectSources($projectId: ID!) { ProjectSources(projectId: $projectId) { id projectId name databaseType createdBy createdAt ingestionStatus lastEventAt ingestionError eventsReceived } }";
105
+ /** Generated wire call for Query ProjectSources. */
106
+ export async function projectSources(transport, vars) {
107
+ const data = await transport.execute('ProjectSources', ProjectSourcesDocument, vars);
108
+ return data['ProjectSources'];
109
+ }
110
+ export const PlatformSourceRowsDocument = "query PlatformSourceRows($projectId: ID!, $sourceId: ID!, $ref: SourceObjectRefInput!, $where: WhereCondition, $sort: [SortCondition!], $pageSize: Int!, $pageOffset: Int!) { PlatformSourceRows(projectId: $projectId, sourceId: $sourceId, ref: $ref, where: $where, sort: $sort, pageSize: $pageSize, pageOffset: $pageOffset) { Columns { Type Name MetadataFidelity IsPrimary IsForeignKey ReferencedTable ReferencedColumn Length Precision Scale } Rows DisableUpdate TotalCount } }";
111
+ /** Generated wire call for Query PlatformSourceRows. */
112
+ export async function platformSourceRows(transport, vars) {
113
+ const data = await transport.execute('PlatformSourceRows', PlatformSourceRowsDocument, vars);
114
+ return data['PlatformSourceRows'];
115
+ }
116
+ export const PlatformSourceObjectsDocument = "query PlatformSourceObjects($projectId: ID!, $sourceId: ID!, $parent: SourceObjectRefInput, $kinds: [SourceObjectKind!], $pageSize: Int, $pageOffset: Int) { PlatformSourceObjects(projectId: $projectId, sourceId: $sourceId, parent: $parent, kinds: $kinds, pageSize: $pageSize, pageOffset: $pageOffset) { Ref { Kind Locator Path } Kind Name Path HasChildren Actions Metadata { Key Value } } }";
117
+ /** Generated wire call for Query PlatformSourceObjects. */
118
+ export async function platformSourceObjects(transport, vars) {
119
+ const data = await transport.execute('PlatformSourceObjects', PlatformSourceObjectsDocument, vars);
120
+ return data['PlatformSourceObjects'];
121
+ }
122
+ export const PlatformSourceColumnsDocument = "query PlatformSourceColumns($projectId: ID!, $sourceId: ID!, $ref: SourceObjectRefInput!) { PlatformSourceColumns(projectId: $projectId, sourceId: $sourceId, ref: $ref) { Type Name MetadataFidelity IsPrimary IsForeignKey ReferencedTable ReferencedColumn Length Precision Scale } }";
123
+ /** Generated wire call for Query PlatformSourceColumns. */
124
+ export async function platformSourceColumns(transport, vars) {
125
+ const data = await transport.execute('PlatformSourceColumns', PlatformSourceColumnsDocument, vars);
126
+ return data['PlatformSourceColumns'];
127
+ }
128
+ export const MyOrganizationsDocument = "query MyOrganizations { MyOrganizations { id name slug createdAt } }";
129
+ /** Generated wire call for Query MyOrganizations. */
130
+ export async function myOrganizations(transport, vars) {
131
+ const data = await transport.execute('MyOrganizations', MyOrganizationsDocument, vars);
132
+ return data['MyOrganizations'];
133
+ }
134
+ export const ProjectsDocument = "query Projects($orgId: ID!) { Projects(orgId: $orgId) { id orgId name slug description createdAt } }";
135
+ /** Generated wire call for Query Projects. */
136
+ export async function projects(transport, vars) {
137
+ const data = await transport.execute('Projects', ProjectsDocument, vars);
138
+ return data['Projects'];
139
+ }
140
+ export const MyWorkspaceDocument = "query MyWorkspace { MyWorkspace { orgId projectId } }";
141
+ /** Generated wire call for Query MyWorkspace. */
142
+ export async function myWorkspace(transport, vars) {
143
+ const data = await transport.execute('MyWorkspace', MyWorkspaceDocument, vars);
144
+ return data['MyWorkspace'];
145
+ }