Update other endpoints

This commit is contained in:
Andrew Kingston 2024-12-05 15:38:53 +00:00
parent ca10a21f83
commit 7806eebc20
No known key found for this signature in database
1 changed files with 9 additions and 4 deletions

View File

@ -1,14 +1,19 @@
import { SystemStatusResponse } from "@budibase/types"
import {
FetchBuiltinPermissionsRequest,
FetchIntegrationsResponse,
GetVersionResponse,
SystemStatusResponse,
} from "@budibase/types"
import { BaseAPIClient } from "./types"
export interface OtherEndpoints {
getSystemStatus: () => Promise<SystemStatusResponse>
getBudibaseVersion: () => Promise<string>
getIntegrations: () => Promise<FetchIntegrationsResponse>
getBasePermissions: () => Promise<FetchBuiltinPermissionsRequest>
// Missing request or response types
getEnvironment: () => Promise<Record<string, any>>
getIntegrations: () => Promise<Record<string, any>>
getBasePermissions: () => Promise<any[]>
}
export const buildOtherEndpoints = (API: BaseAPIClient): OtherEndpoints => ({
@ -44,7 +49,7 @@ export const buildOtherEndpoints = (API: BaseAPIClient): OtherEndpoints => ({
*/
getBudibaseVersion: async () => {
return (
await API.get<{ version: string }>({
await API.get<GetVersionResponse>({
url: "/api/dev/version",
})
).version