diff --git a/packages/frontend-core/src/api/app.ts b/packages/frontend-core/src/api/app.ts index 20fc80cbee..eab5d33567 100644 --- a/packages/frontend-core/src/api/app.ts +++ b/packages/frontend-core/src/api/app.ts @@ -1,6 +1,7 @@ import { sdk } from "@budibase/shared-core" import { BaseAPIClient } from "./types" import { + AddAppSampleDataResponse, ClearDevLockResponse, CreateAppRequest, CreateAppResponse, @@ -18,7 +19,9 @@ import { RevertAppClientResponse, RevertAppResponse, SetRevertableAppVersionRequest, + SetRevertableAppVersionResponse, SyncAppResponse, + UnpublishAppResponse, UpdateAppClientResponse, UpdateAppRequest, UpdateAppResponse, @@ -30,7 +33,7 @@ export interface AppEndpoints { appId: string, metadata: UpdateAppRequest ) => Promise - unpublishApp: (appId: string) => Promise + unpublishApp: (appId: string) => Promise publishAppChanges: (appId: string) => Promise revertAppChanges: (appId: string) => Promise updateAppClientVersion: (appId: string) => Promise @@ -56,8 +59,8 @@ export interface AppEndpoints { setRevertableVersion: ( appId: string, revertableVersion: string - ) => Promise - addSampleData: (appId: string) => Promise + ) => Promise + addSampleData: (appId: string) => Promise // Missing request or response types importApps: (apps: any) => Promise @@ -272,7 +275,10 @@ export const buildAppEndpoints = (API: BaseAPIClient): AppEndpoints => ({ * @param revertableVersion the version number */ setRevertableVersion: async (appId, revertableVersion) => { - return await API.post({ + return await API.post< + SetRevertableAppVersionRequest, + SetRevertableAppVersionResponse + >({ url: `/api/applications/${appId}/setRevertableVersion`, body: { revertableVersion,