Account for responses from app endpoints
This commit is contained in:
parent
d5eaa6ee3e
commit
22d8994431
|
@ -1,6 +1,7 @@
|
||||||
import { sdk } from "@budibase/shared-core"
|
import { sdk } from "@budibase/shared-core"
|
||||||
import { BaseAPIClient } from "./types"
|
import { BaseAPIClient } from "./types"
|
||||||
import {
|
import {
|
||||||
|
AddAppSampleDataResponse,
|
||||||
ClearDevLockResponse,
|
ClearDevLockResponse,
|
||||||
CreateAppRequest,
|
CreateAppRequest,
|
||||||
CreateAppResponse,
|
CreateAppResponse,
|
||||||
|
@ -18,7 +19,9 @@ import {
|
||||||
RevertAppClientResponse,
|
RevertAppClientResponse,
|
||||||
RevertAppResponse,
|
RevertAppResponse,
|
||||||
SetRevertableAppVersionRequest,
|
SetRevertableAppVersionRequest,
|
||||||
|
SetRevertableAppVersionResponse,
|
||||||
SyncAppResponse,
|
SyncAppResponse,
|
||||||
|
UnpublishAppResponse,
|
||||||
UpdateAppClientResponse,
|
UpdateAppClientResponse,
|
||||||
UpdateAppRequest,
|
UpdateAppRequest,
|
||||||
UpdateAppResponse,
|
UpdateAppResponse,
|
||||||
|
@ -30,7 +33,7 @@ export interface AppEndpoints {
|
||||||
appId: string,
|
appId: string,
|
||||||
metadata: UpdateAppRequest
|
metadata: UpdateAppRequest
|
||||||
) => Promise<UpdateAppResponse>
|
) => Promise<UpdateAppResponse>
|
||||||
unpublishApp: (appId: string) => Promise<void>
|
unpublishApp: (appId: string) => Promise<UnpublishAppResponse>
|
||||||
publishAppChanges: (appId: string) => Promise<PublishAppResponse>
|
publishAppChanges: (appId: string) => Promise<PublishAppResponse>
|
||||||
revertAppChanges: (appId: string) => Promise<RevertAppResponse>
|
revertAppChanges: (appId: string) => Promise<RevertAppResponse>
|
||||||
updateAppClientVersion: (appId: string) => Promise<UpdateAppClientResponse>
|
updateAppClientVersion: (appId: string) => Promise<UpdateAppClientResponse>
|
||||||
|
@ -56,8 +59,8 @@ export interface AppEndpoints {
|
||||||
setRevertableVersion: (
|
setRevertableVersion: (
|
||||||
appId: string,
|
appId: string,
|
||||||
revertableVersion: string
|
revertableVersion: string
|
||||||
) => Promise<void>
|
) => Promise<SetRevertableAppVersionResponse>
|
||||||
addSampleData: (appId: string) => Promise<void>
|
addSampleData: (appId: string) => Promise<AddAppSampleDataResponse>
|
||||||
|
|
||||||
// Missing request or response types
|
// Missing request or response types
|
||||||
importApps: (apps: any) => Promise<any>
|
importApps: (apps: any) => Promise<any>
|
||||||
|
@ -272,7 +275,10 @@ export const buildAppEndpoints = (API: BaseAPIClient): AppEndpoints => ({
|
||||||
* @param revertableVersion the version number
|
* @param revertableVersion the version number
|
||||||
*/
|
*/
|
||||||
setRevertableVersion: async (appId, revertableVersion) => {
|
setRevertableVersion: async (appId, revertableVersion) => {
|
||||||
return await API.post<SetRevertableAppVersionRequest>({
|
return await API.post<
|
||||||
|
SetRevertableAppVersionRequest,
|
||||||
|
SetRevertableAppVersionResponse
|
||||||
|
>({
|
||||||
url: `/api/applications/${appId}/setRevertableVersion`,
|
url: `/api/applications/${appId}/setRevertableVersion`,
|
||||||
body: {
|
body: {
|
||||||
revertableVersion,
|
revertableVersion,
|
||||||
|
|
Loading…
Reference in New Issue