diff --git a/packages/frontend-core/src/api/routes.ts b/packages/frontend-core/src/api/routes.ts index 1db7b473de..0adedf15e2 100644 --- a/packages/frontend-core/src/api/routes.ts +++ b/packages/frontend-core/src/api/routes.ts @@ -5,7 +5,6 @@ import { import { BaseAPIClient } from "./types" export interface RouteEndpoints { - // Missing request or response types fetchClientAppRoutes: () => Promise fetchAppRoutes: () => Promise } diff --git a/packages/frontend-core/src/api/self.ts b/packages/frontend-core/src/api/self.ts index 9e8c806b2f..db5b1226eb 100644 --- a/packages/frontend-core/src/api/self.ts +++ b/packages/frontend-core/src/api/self.ts @@ -1,21 +1,19 @@ import { - ContextUser, + AppSelfResponse, + FetchAPIKeyResponse, + GenerateAPIKeyResponse, + GetGlobalSelfResponse, UpdateSelfRequest, UpdateSelfResponse, - User, } from "@budibase/types" import { BaseAPIClient } from "./types" export interface SelfEndpoints { updateSelf: (user: UpdateSelfRequest) => Promise - - // Missing request or response types - generateAPIKey: () => Promise - fetchDeveloperInfo: () => Promise - - // There are flags and session attributes mixed in to the user - fetchBuilderSelf: () => Promise - fetchSelf: () => Promise<(ContextUser | {}) & { [key: string]: any }> + generateAPIKey: () => Promise + fetchDeveloperInfo: () => Promise + fetchBuilderSelf: () => Promise + fetchSelf: () => Promise } export const buildSelfEndpoints = (API: BaseAPIClient): SelfEndpoints => ({ @@ -24,7 +22,7 @@ export const buildSelfEndpoints = (API: BaseAPIClient): SelfEndpoints => ({ * assuming the user is a builder. */ generateAPIKey: async () => { - const response = await API.post({ + const response = await API.post({ url: "/api/global/self/api_key", }) return response?.apiKey