Update flag endpoints
This commit is contained in:
parent
7b01d3cd03
commit
686273048e
|
@ -1,12 +1,16 @@
|
||||||
import { Flags, SetUserFlagRequest, SetUserFlagResponse } from "@budibase/types"
|
import {
|
||||||
|
Flags,
|
||||||
|
GetUserFlagsResponse,
|
||||||
|
SetUserFlagRequest,
|
||||||
|
SetUserFlagResponse,
|
||||||
|
ToggleBetaFeatureResponse,
|
||||||
|
} from "@budibase/types"
|
||||||
import { BaseAPIClient } from "./types"
|
import { BaseAPIClient } from "./types"
|
||||||
|
|
||||||
export interface FlagEndpoints {
|
export interface FlagEndpoints {
|
||||||
getFlags: () => Promise<Flags>
|
getFlags: () => Promise<GetUserFlagsResponse>
|
||||||
|
|
||||||
// Missing request or response types
|
|
||||||
updateFlag: (flag: string, value: any) => Promise<SetUserFlagResponse>
|
updateFlag: (flag: string, value: any) => Promise<SetUserFlagResponse>
|
||||||
toggleUiFeature: (value: string) => Promise<{ message: string }>
|
toggleUiFeature: (value: string) => Promise<ToggleBetaFeatureResponse>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const buildFlagEndpoints = (API: BaseAPIClient): FlagEndpoints => ({
|
export const buildFlagEndpoints = (API: BaseAPIClient): FlagEndpoints => ({
|
||||||
|
|
Loading…
Reference in New Issue