From eca009920ce2dcb8b10940a59267fa87f8d8a0c4 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 12 Dec 2024 16:00:28 +0000 Subject: [PATCH] Fixing some type issue found during the frontend-core updates. --- packages/server/src/api/controllers/permission.ts | 4 ++-- packages/types/src/api/web/app/permission.ts | 2 +- packages/types/src/api/web/global/self.ts | 2 +- packages/types/src/documents/app/app.ts | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/controllers/permission.ts b/packages/server/src/api/controllers/permission.ts index 2ef197dbca..e38c736c20 100644 --- a/packages/server/src/api/controllers/permission.ts +++ b/packages/server/src/api/controllers/permission.ts @@ -9,7 +9,7 @@ import { RemovePermissionRequest, RemovePermissionResponse, FetchResourcePermissionInfoResponse, - FetchBuiltinPermissionsRequest, + FetchBuiltinPermissionsResponse, FetchPermissionLevelsRequest, } from "@budibase/types" import { @@ -22,7 +22,7 @@ import { PermissionUpdateType } from "../../sdk/app/permissions" const SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS export function fetchBuiltin( - ctx: UserCtx + ctx: UserCtx ) { ctx.body = Object.values(permissions.getBuiltinPermissions()) } diff --git a/packages/types/src/api/web/app/permission.ts b/packages/types/src/api/web/app/permission.ts index 1a19fb0834..407dc2be86 100644 --- a/packages/types/src/api/web/app/permission.ts +++ b/packages/types/src/api/web/app/permission.ts @@ -1,6 +1,6 @@ import { BuiltinPermission, PermissionLevel } from "../../../sdk" -export type FetchBuiltinPermissionsRequest = BuiltinPermission[] +export type FetchBuiltinPermissionsResponse = BuiltinPermission[] export type FetchPermissionLevelsRequest = string[] diff --git a/packages/types/src/api/web/global/self.ts b/packages/types/src/api/web/global/self.ts index 4ba51d2cd5..5f21a8ddc5 100644 --- a/packages/types/src/api/web/global/self.ts +++ b/packages/types/src/api/web/global/self.ts @@ -1,7 +1,7 @@ import { DevInfo, User } from "../../../documents" export interface GenerateAPIKeyRequest { - userId: string + userId?: string } export interface GenerateAPIKeyResponse extends DevInfo {} diff --git a/packages/types/src/documents/app/app.ts b/packages/types/src/documents/app/app.ts index 06fca8307c..e31dd1e9ac 100644 --- a/packages/types/src/documents/app/app.ts +++ b/packages/types/src/documents/app/app.ts @@ -28,6 +28,7 @@ export interface App extends Document { upgradableVersion?: string snippets?: Snippet[] creationVersion?: string + updatedBy?: string } export interface AppInstance {