Merge branch 'chore/api-typing' of github.com:Budibase/budibase into chore/api-typing-2
This commit is contained in:
commit
f52bc41de0
|
@ -4,8 +4,8 @@ import {
|
|||
UserCtx,
|
||||
ApiKeyDoc,
|
||||
ApiKeyFetchResponse,
|
||||
ApiKeyUpdateRequest,
|
||||
ApiKeyUpdateResponse,
|
||||
UpdateApiKeyRequest,
|
||||
UpdateApiKeyResponse,
|
||||
} from "@budibase/types"
|
||||
|
||||
const KEYS_DOC = dbCore.StaticDatabases.GLOBAL.docs.apiKeys
|
||||
|
@ -40,7 +40,7 @@ export async function fetch(ctx: UserCtx<void, ApiKeyFetchResponse>) {
|
|||
}
|
||||
|
||||
export async function update(
|
||||
ctx: UserCtx<ApiKeyUpdateRequest, ApiKeyUpdateResponse>
|
||||
ctx: UserCtx<UpdateApiKeyRequest, UpdateApiKeyResponse>
|
||||
) {
|
||||
const key = ctx.params.key
|
||||
const value = ctx.request.body.value
|
||||
|
|
|
@ -64,7 +64,7 @@ import {
|
|||
FetchAppsResponse,
|
||||
UpdateAppClientResponse,
|
||||
RevertAppClientResponse,
|
||||
DestroyAppResponse,
|
||||
DeleteAppResponse,
|
||||
ImportToUpdateAppRequest,
|
||||
ImportToUpdateAppResponse,
|
||||
SetRevertableAppVersionRequest,
|
||||
|
@ -685,7 +685,7 @@ async function postDestroyApp(ctx: UserCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function destroy(ctx: UserCtx<void, DestroyAppResponse>) {
|
||||
export async function destroy(ctx: UserCtx<void, DeleteAppResponse>) {
|
||||
await preDestroyApp(ctx)
|
||||
const result = await destroyApp(ctx)
|
||||
await postDestroyApp(ctx)
|
||||
|
|
|
@ -25,7 +25,7 @@ import {
|
|||
DynamicVariable,
|
||||
FetchDatasourcesResponse,
|
||||
FindDatasourcesResponse,
|
||||
DestroyDatasourceResponse,
|
||||
DeleteDatasourceResponse,
|
||||
FetchExternalSchemaResponse,
|
||||
} from "@budibase/types"
|
||||
import sdk from "../../sdk"
|
||||
|
@ -264,7 +264,7 @@ async function destroyInternalTablesBySourceId(datasourceId: string) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function destroy(ctx: UserCtx<void, DestroyDatasourceResponse>) {
|
||||
export async function destroy(ctx: UserCtx<void, DeleteDatasourceResponse>) {
|
||||
const db = context.getAppDB()
|
||||
const datasourceId = ctx.params.datasourceId
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
export type ApiKeyFetchResponse = Record<string, string>
|
||||
|
||||
export interface ApiKeyUpdateRequest {
|
||||
export interface UpdateApiKeyRequest {
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface ApiKeyUpdateResponse {
|
||||
export interface UpdateApiKeyResponse {
|
||||
_id: string
|
||||
_rev: string
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ export interface BuildSchemaFromSourceResponse {
|
|||
export type FetchDatasourcesResponse = Datasource[]
|
||||
export type FindDatasourcesResponse = Datasource
|
||||
|
||||
export interface DestroyDatasourceResponse {
|
||||
export interface DeleteDatasourceResponse {
|
||||
message: string
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ export interface UpdateAppResponse extends App {}
|
|||
export interface UpdateAppClientResponse extends App {}
|
||||
export interface RevertAppClientResponse extends App {}
|
||||
|
||||
export interface DestroyAppResponse {
|
||||
export interface DeleteAppResponse {
|
||||
ok: boolean
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue