From c974df104eaf8b1298cdc7017181a3cd77d0b877 Mon Sep 17 00:00:00 2001 From: x032205 Date: Thu, 31 Jul 2025 20:28:02 -0400 Subject: [PATCH] Improve types --- .../app-connection/github/github-connection-schemas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/services/app-connection/github/github-connection-schemas.ts b/backend/src/services/app-connection/github/github-connection-schemas.ts index 2a39208c3..1b8aa9c3f 100644 --- a/backend/src/services/app-connection/github/github-connection-schemas.ts +++ b/backend/src/services/app-connection/github/github-connection-schemas.ts @@ -118,14 +118,14 @@ export const SanitizedGitHubConnectionSchema = z.discriminatedUnion("method", [ BaseGitHubConnectionSchema.extend({ method: z.literal(GitHubConnectionMethod.App), credentials: z.object({ - instanceType: z.string().optional(), + instanceType: z.union([z.literal("server"), z.literal("cloud")]).optional(), host: z.string().optional() }) }), BaseGitHubConnectionSchema.extend({ method: z.literal(GitHubConnectionMethod.OAuth), credentials: z.object({ - instanceType: z.string().optional(), + instanceType: z.union([z.literal("server"), z.literal("cloud")]).optional(), host: z.string().optional() }) })