Update types for datasource endpoints
This commit is contained in:
parent
7d4974a266
commit
78f1690cb9
|
@ -4,8 +4,10 @@ import {
|
||||||
CreateDatasourceRequest,
|
CreateDatasourceRequest,
|
||||||
CreateDatasourceResponse,
|
CreateDatasourceResponse,
|
||||||
Datasource,
|
Datasource,
|
||||||
|
DeleteDatasourceResponse,
|
||||||
FetchDatasourceInfoRequest,
|
FetchDatasourceInfoRequest,
|
||||||
FetchDatasourceInfoResponse,
|
FetchDatasourceInfoResponse,
|
||||||
|
FetchExternalSchemaResponse,
|
||||||
UpdateDatasourceRequest,
|
UpdateDatasourceRequest,
|
||||||
UpdateDatasourceResponse,
|
UpdateDatasourceResponse,
|
||||||
VerifyDatasourceRequest,
|
VerifyDatasourceRequest,
|
||||||
|
@ -17,7 +19,7 @@ export interface DatasourceEndpoints {
|
||||||
getDatasources: () => Promise<Datasource[]>
|
getDatasources: () => Promise<Datasource[]>
|
||||||
buildDatasourceSchema: (
|
buildDatasourceSchema: (
|
||||||
datasourceId: string,
|
datasourceId: string,
|
||||||
tablesFilter?: BuildSchemaFromSourceRequest["tablesFilter"]
|
tablesFilter?: string[]
|
||||||
) => Promise<BuildSchemaFromSourceResponse>
|
) => Promise<BuildSchemaFromSourceResponse>
|
||||||
createDatasource: (
|
createDatasource: (
|
||||||
data: CreateDatasourceRequest
|
data: CreateDatasourceRequest
|
||||||
|
@ -25,14 +27,19 @@ export interface DatasourceEndpoints {
|
||||||
updateDatasource: (
|
updateDatasource: (
|
||||||
datasource: Datasource
|
datasource: Datasource
|
||||||
) => Promise<UpdateDatasourceResponse>
|
) => Promise<UpdateDatasourceResponse>
|
||||||
deleteDatasource: (id: string, rev: string) => Promise<void>
|
deleteDatasource: (
|
||||||
|
id: string,
|
||||||
|
rev: string
|
||||||
|
) => Promise<DeleteDatasourceResponse>
|
||||||
validateDatasource: (
|
validateDatasource: (
|
||||||
datasource: Datasource
|
datasource: Datasource
|
||||||
) => Promise<VerifyDatasourceResponse>
|
) => Promise<VerifyDatasourceResponse>
|
||||||
fetchInfoForDatasource: (
|
fetchInfoForDatasource: (
|
||||||
datasource: Datasource
|
datasource: Datasource
|
||||||
) => Promise<FetchDatasourceInfoResponse>
|
) => Promise<FetchDatasourceInfoResponse>
|
||||||
fetchExternalSchema: (datasourceId: string) => Promise<{ schema: string }>
|
fetchExternalSchema: (
|
||||||
|
datasourceId: string
|
||||||
|
) => Promise<FetchExternalSchemaResponse>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const buildDatasourceEndpoints = (
|
export const buildDatasourceEndpoints = (
|
||||||
|
|
Loading…
Reference in New Issue