🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(billing): Update schema validation for existing redis api keys (#9662)
Michael Fröhlich75c7d0e44800
diff --git a/packages/shared/src/server/auth/types.ts b/packages/shared/src/server/auth/types.tsindex a3ac3faa38..d37a95e0e8 100644--- a/packages/shared/src/server/auth/types.ts+++ b/packages/shared/src/server/auth/types.ts@@ -16,7 +16,7 @@ const ApiKeyBaseSchema = z.object({orgId: z.string(),plan: z.enum(plans as unknown as [string, ...string[]]),rateLimitOverrides: CloudConfigRateLimit.nullish(),- isIngestionSuspended: z.boolean(),+ isIngestionSuspended: z.boolean().nullish(),});export const OrgEnrichedApiKey = z.discriminatedUnion("scope", [@@ -65,7 +65,7 @@ type ApiAccessScopeMetadata = {rateLimitOverrides: z.infer<typeof CloudConfigRateLimit>;apiKeyId: string;publicKey: string;- isIngestionSuspended: boolean;+ isIngestionSuspended: boolean | null | undefined;};export type ApiAccessScopeIngestion = BaseApiAccessScope &diff --git a/web/src/__tests__/api-auth.servertest.ts b/web/src/__tests__/api-auth.servertest.tsindex 952ab2b281..05866a817d 100644--- a/web/src/__tests__/api-auth.servertest.ts+++ b/web/src/__tests__/api-auth.servertest.ts@@ -317,7 +317,7 @@ describe("Authenticate API calls", () => {},],createdAt: apiKey?.createdAt.toISOString(),- isIngestionSuspended: expect.any(Boolean),+ isIngestionSuspended: expect.anything(),});await prisma.organization.update({@@ -436,7 +436,7 @@ describe("Authenticate API calls", () => {},],createdAt: apiKey?.createdAt.toISOString(),- isIngestionSuspended: expect.any(Boolean),+ isIngestionSuspended: expect.anything(),});await prisma.organization.update({@@ -549,7 +549,7 @@ describe("Authenticate API calls", () => {createdAt: expect.any(String),lastUsedAt: null,expiresAt: null,- isIngestionSuspended: expect.any(Boolean),+ isIngestionSuspended: expect.anything(),projectId: expect.any(String),orgId: "seed-org-id",plan: "cloud:hobby",@@ -646,7 +646,7 @@ describe("Authenticate API calls", () => {plan: "cloud:hobby",createdAt: apiKey?.createdAt.toISOString(),scope: "PROJECT",- isIngestionSuspended: expect.any(Boolean),+ isIngestionSuspended: expect.anything(),});await new ApiAuthService(prisma, redis).deleteApiKey(