Update flag endpoints

This commit is contained in:
Andrew Kingston 2024-12-10 12:52:53 +00:00
parent 7b01d3cd03
commit 686273048e
No known key found for this signature in database
1 changed files with 9 additions and 5 deletions

View File

@ -1,12 +1,16 @@
import { Flags, SetUserFlagRequest, SetUserFlagResponse } from "@budibase/types"
import {
Flags,
GetUserFlagsResponse,
SetUserFlagRequest,
SetUserFlagResponse,
ToggleBetaFeatureResponse,
} from "@budibase/types"
import { BaseAPIClient } from "./types"
export interface FlagEndpoints {
getFlags: () => Promise<Flags>
// Missing request or response types
getFlags: () => Promise<GetUserFlagsResponse>
updateFlag: (flag: string, value: any) => Promise<SetUserFlagResponse>
toggleUiFeature: (value: string) => Promise<{ message: string }>
toggleUiFeature: (value: string) => Promise<ToggleBetaFeatureResponse>
}
export const buildFlagEndpoints = (API: BaseAPIClient): FlagEndpoints => ({