From 78f1690cb927977bb8aa9b712ad95c2369bd8539 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 5 Dec 2024 15:29:28 +0000 Subject: [PATCH] Update types for datasource endpoints --- packages/frontend-core/src/api/datasources.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/frontend-core/src/api/datasources.ts b/packages/frontend-core/src/api/datasources.ts index 5f0098b1eb..1d35a6c347 100644 --- a/packages/frontend-core/src/api/datasources.ts +++ b/packages/frontend-core/src/api/datasources.ts @@ -4,8 +4,10 @@ import { CreateDatasourceRequest, CreateDatasourceResponse, Datasource, + DeleteDatasourceResponse, FetchDatasourceInfoRequest, FetchDatasourceInfoResponse, + FetchExternalSchemaResponse, UpdateDatasourceRequest, UpdateDatasourceResponse, VerifyDatasourceRequest, @@ -17,7 +19,7 @@ export interface DatasourceEndpoints { getDatasources: () => Promise buildDatasourceSchema: ( datasourceId: string, - tablesFilter?: BuildSchemaFromSourceRequest["tablesFilter"] + tablesFilter?: string[] ) => Promise createDatasource: ( data: CreateDatasourceRequest @@ -25,14 +27,19 @@ export interface DatasourceEndpoints { updateDatasource: ( datasource: Datasource ) => Promise - deleteDatasource: (id: string, rev: string) => Promise + deleteDatasource: ( + id: string, + rev: string + ) => Promise validateDatasource: ( datasource: Datasource ) => Promise fetchInfoForDatasource: ( datasource: Datasource ) => Promise - fetchExternalSchema: (datasourceId: string) => Promise<{ schema: string }> + fetchExternalSchema: ( + datasourceId: string + ) => Promise } export const buildDatasourceEndpoints = (