Update other endpoints
This commit is contained in:
parent
ca10a21f83
commit
7806eebc20
|
@ -1,14 +1,19 @@
|
||||||
import { SystemStatusResponse } from "@budibase/types"
|
import {
|
||||||
|
FetchBuiltinPermissionsRequest,
|
||||||
|
FetchIntegrationsResponse,
|
||||||
|
GetVersionResponse,
|
||||||
|
SystemStatusResponse,
|
||||||
|
} from "@budibase/types"
|
||||||
import { BaseAPIClient } from "./types"
|
import { BaseAPIClient } from "./types"
|
||||||
|
|
||||||
export interface OtherEndpoints {
|
export interface OtherEndpoints {
|
||||||
getSystemStatus: () => Promise<SystemStatusResponse>
|
getSystemStatus: () => Promise<SystemStatusResponse>
|
||||||
getBudibaseVersion: () => Promise<string>
|
getBudibaseVersion: () => Promise<string>
|
||||||
|
getIntegrations: () => Promise<FetchIntegrationsResponse>
|
||||||
|
getBasePermissions: () => Promise<FetchBuiltinPermissionsRequest>
|
||||||
|
|
||||||
// Missing request or response types
|
// Missing request or response types
|
||||||
getEnvironment: () => Promise<Record<string, any>>
|
getEnvironment: () => Promise<Record<string, any>>
|
||||||
getIntegrations: () => Promise<Record<string, any>>
|
|
||||||
getBasePermissions: () => Promise<any[]>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const buildOtherEndpoints = (API: BaseAPIClient): OtherEndpoints => ({
|
export const buildOtherEndpoints = (API: BaseAPIClient): OtherEndpoints => ({
|
||||||
|
@ -44,7 +49,7 @@ export const buildOtherEndpoints = (API: BaseAPIClient): OtherEndpoints => ({
|
||||||
*/
|
*/
|
||||||
getBudibaseVersion: async () => {
|
getBudibaseVersion: async () => {
|
||||||
return (
|
return (
|
||||||
await API.get<{ version: string }>({
|
await API.get<GetVersionResponse>({
|
||||||
url: "/api/dev/version",
|
url: "/api/dev/version",
|
||||||
})
|
})
|
||||||
).version
|
).version
|
||||||
|
|
Loading…
Reference in New Issue