Update types for datasource endpoints

This commit is contained in:
Andrew Kingston 2024-12-05 15:29:28 +00:00
parent 7d4974a266
commit 78f1690cb9
No known key found for this signature in database
1 changed files with 10 additions and 3 deletions

View File

@ -4,8 +4,10 @@ import {
CreateDatasourceRequest,
CreateDatasourceResponse,
Datasource,
DeleteDatasourceResponse,
FetchDatasourceInfoRequest,
FetchDatasourceInfoResponse,
FetchExternalSchemaResponse,
UpdateDatasourceRequest,
UpdateDatasourceResponse,
VerifyDatasourceRequest,
@ -17,7 +19,7 @@ export interface DatasourceEndpoints {
getDatasources: () => Promise<Datasource[]>
buildDatasourceSchema: (
datasourceId: string,
tablesFilter?: BuildSchemaFromSourceRequest["tablesFilter"]
tablesFilter?: string[]
) => Promise<BuildSchemaFromSourceResponse>
createDatasource: (
data: CreateDatasourceRequest
@ -25,14 +27,19 @@ export interface DatasourceEndpoints {
updateDatasource: (
datasource: Datasource
) => Promise<UpdateDatasourceResponse>
deleteDatasource: (id: string, rev: string) => Promise<void>
deleteDatasource: (
id: string,
rev: string
) => Promise<DeleteDatasourceResponse>
validateDatasource: (
datasource: Datasource
) => Promise<VerifyDatasourceResponse>
fetchInfoForDatasource: (
datasource: Datasource
) => Promise<FetchDatasourceInfoResponse>
fetchExternalSchema: (datasourceId: string) => Promise<{ schema: string }>
fetchExternalSchema: (
datasourceId: string
) => Promise<FetchExternalSchemaResponse>
}
export const buildDatasourceEndpoints = (