From 7b01d3cd03b649c1c50cb1b75dc47b8601c52b24 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 10 Dec 2024 12:50:57 +0000 Subject: [PATCH] Update config endpoints --- packages/frontend-core/src/api/configs.ts | 27 +++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/frontend-core/src/api/configs.ts b/packages/frontend-core/src/api/configs.ts index c413f66df7..82f08e58a7 100644 --- a/packages/frontend-core/src/api/configs.ts +++ b/packages/frontend-core/src/api/configs.ts @@ -1,30 +1,29 @@ import { Config, + ConfigChecklistResponse, ConfigType, + DeleteConfigResponse, + FindConfigResponse, GetPublicOIDCConfigResponse, GetPublicSettingsResponse, OIDCLogosConfig, + SaveConfigRequest, + SaveConfigResponse, + UploadConfigFileResponse, } from "@budibase/types" import { BaseAPIClient } from "./types" export interface ConfigEndpoints { - getConfig: (type: ConfigType) => Promise> + getConfig: (type: ConfigType) => Promise getTenantConfig: (tentantId: string) => Promise getOIDCConfig: (tenantId: string) => Promise getOIDCLogos: () => Promise> - - // Missing request or response types - saveConfig: ( - config: Config - ) => Promise<{ type: ConfigType; _id: string; _rev: string }> - deleteConfig: (id: string, rev: string) => Promise<{ message: string }> - getChecklist: (tenantId: string) => Promise - uploadLogo: (data: any) => Promise<{ message: string; url: string }> - uploadFavicon: (data: any) => Promise<{ message: string; url: string }> - uploadOIDCLogo: ( - name: string, - data: any - ) => Promise<{ message: string; url: string }> + saveConfig: (config: SaveConfigRequest) => Promise + deleteConfig: (id: string, rev: string) => Promise + getChecklist: (tenantId: string) => Promise + uploadLogo: (data: any) => Promise + uploadFavicon: (data: any) => Promise + uploadOIDCLogo: (name: string, data: any) => Promise } export const buildConfigEndpoints = (API: BaseAPIClient): ConfigEndpoints => ({