Merge pull request #15171 from Budibase/fix/type-fixes

API typing fixes
This commit is contained in:
Michael Drury 2024-12-12 16:09:05 +00:00 committed by GitHub
commit cf98669c2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import {
RemovePermissionRequest, RemovePermissionRequest,
RemovePermissionResponse, RemovePermissionResponse,
FetchResourcePermissionInfoResponse, FetchResourcePermissionInfoResponse,
FetchBuiltinPermissionsRequest, FetchBuiltinPermissionsResponse,
FetchPermissionLevelsRequest, FetchPermissionLevelsRequest,
} from "@budibase/types" } from "@budibase/types"
import { import {
@ -22,7 +22,7 @@ import { PermissionUpdateType } from "../../sdk/app/permissions"
const SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS const SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS
export function fetchBuiltin( export function fetchBuiltin(
ctx: UserCtx<void, FetchBuiltinPermissionsRequest> ctx: UserCtx<void, FetchBuiltinPermissionsResponse>
) { ) {
ctx.body = Object.values(permissions.getBuiltinPermissions()) ctx.body = Object.values(permissions.getBuiltinPermissions())
} }

View File

@ -1,6 +1,6 @@
import { BuiltinPermission, PermissionLevel } from "../../../sdk" import { BuiltinPermission, PermissionLevel } from "../../../sdk"
export type FetchBuiltinPermissionsRequest = BuiltinPermission[] export type FetchBuiltinPermissionsResponse = BuiltinPermission[]
export type FetchPermissionLevelsRequest = string[] export type FetchPermissionLevelsRequest = string[]

View File

@ -1,7 +1,7 @@
import { DevInfo, User } from "../../../documents" import { DevInfo, User } from "../../../documents"
export interface GenerateAPIKeyRequest { export interface GenerateAPIKeyRequest {
userId: string userId?: string
} }
export interface GenerateAPIKeyResponse extends DevInfo {} export interface GenerateAPIKeyResponse extends DevInfo {}

View File

@ -28,6 +28,7 @@ export interface App extends Document {
upgradableVersion?: string upgradableVersion?: string
snippets?: Snippet[] snippets?: Snippet[]
creationVersion?: string creationVersion?: string
updatedBy?: string
} }
export interface AppInstance { export interface AppInstance {