Upate screen endpoints

This commit is contained in:
Andrew Kingston 2024-12-05 16:02:10 +00:00
parent 923859b799
commit a42fd87c08
No known key found for this signature in database
1 changed files with 7 additions and 3 deletions

View File

@ -1,9 +1,13 @@
import { Screen } from "@budibase/types" import {
DeleteScreenResponse,
SaveScreenRequest,
SaveScreenResponse,
} from "@budibase/types"
import { BaseAPIClient } from "./types" import { BaseAPIClient } from "./types"
export interface ScreenEndpoints { export interface ScreenEndpoints {
saveScreen: (screen: Screen) => Promise<Screen> saveScreen: (screen: SaveScreenRequest) => Promise<SaveScreenResponse>
deleteScreen: (id: string, rev: string) => Promise<{ message: string }> deleteScreen: (id: string, rev: string) => Promise<DeleteScreenResponse>
} }
export const buildScreenEndpoints = (API: BaseAPIClient): ScreenEndpoints => ({ export const buildScreenEndpoints = (API: BaseAPIClient): ScreenEndpoints => ({