🪢 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
chore: fix admin api (#7530)
Max Deichmann7263a1554c12
diff --git a/web/src/features/admin-api/server/adminApiAuth.ts b/web/src/ee/features/admin-api/server/adminApiAuth.tssimilarity index 100%rename from web/src/features/admin-api/server/adminApiAuth.tsrename to web/src/ee/features/admin-api/server/adminApiAuth.tsdiff --git a/web/src/features/admin-api/memberships.ts b/web/src/ee/features/admin-api/server/memberships.tssimilarity index 100%rename from web/src/features/admin-api/memberships.tsrename to web/src/ee/features/admin-api/server/memberships.tsdiff --git a/web/src/features/admin-api/organizations/apiKeys/apiKeyById.ts b/web/src/ee/features/admin-api/server/organizations/apiKeys/apiKeyById.tssimilarity index 100%rename from web/src/features/admin-api/organizations/apiKeys/apiKeyById.tsrename to web/src/ee/features/admin-api/server/organizations/apiKeys/apiKeyById.tsdiff --git a/web/src/features/admin-api/organizations/apiKeys/index.ts b/web/src/ee/features/admin-api/server/organizations/apiKeys/index.tssimilarity index 100%rename from web/src/features/admin-api/organizations/apiKeys/index.tsrename to web/src/ee/features/admin-api/server/organizations/apiKeys/index.tsdiff --git a/web/src/features/admin-api/organizations/index.ts b/web/src/ee/features/admin-api/server/organizations/index.tssimilarity index 100%rename from web/src/features/admin-api/organizations/index.tsrename to web/src/ee/features/admin-api/server/organizations/index.tsdiff --git a/web/src/features/admin-api/organizations/organizationById.ts b/web/src/ee/features/admin-api/server/organizations/organizationById.tssimilarity index 100%rename from web/src/features/admin-api/organizations/organizationById.tsrename to web/src/ee/features/admin-api/server/organizations/organizationById.tsdiff --git a/web/src/features/admin-api/projects.ts b/web/src/ee/features/admin-api/server/projects.tssimilarity index 100%rename from web/src/features/admin-api/projects.tsrename to web/src/ee/features/admin-api/server/projects.tsdiff --git a/web/src/features/admin-api/projects/createProject.ts b/web/src/ee/features/admin-api/server/projects/createProject.tssimilarity index 100%rename from web/src/features/admin-api/projects/createProject.tsrename to web/src/ee/features/admin-api/server/projects/createProject.tsdiff --git a/web/src/features/admin-api/projects/projectById/apiKeys/apiKeyById.ts b/web/src/ee/features/admin-api/server/projects/projectById/apiKeys/apiKeyById.tssimilarity index 100%rename from web/src/features/admin-api/projects/projectById/apiKeys/apiKeyById.tsrename to web/src/ee/features/admin-api/server/projects/projectById/apiKeys/apiKeyById.tsdiff --git a/web/src/features/admin-api/projects/projectById/apiKeys/index.ts b/web/src/ee/features/admin-api/server/projects/projectById/apiKeys/index.tssimilarity index 100%rename from web/src/features/admin-api/projects/projectById/apiKeys/index.tsrename to web/src/ee/features/admin-api/server/projects/projectById/apiKeys/index.tsdiff --git a/web/src/features/admin-api/projects/projectById/index.ts b/web/src/ee/features/admin-api/server/projects/projectById/index.tssimilarity index 100%rename from web/src/features/admin-api/projects/projectById/index.tsrename to web/src/ee/features/admin-api/server/projects/projectById/index.tsdiff --git a/web/src/features/admin-api/projects/projectById/memberships/index.ts b/web/src/ee/features/admin-api/server/projects/projectById/memberships/index.tssimilarity index 100%rename from web/src/features/admin-api/projects/projectById/memberships/index.tsrename to web/src/ee/features/admin-api/server/projects/projectById/memberships/index.tsdiff --git a/web/src/pages/api/admin/api-keys/index.ts b/web/src/pages/api/admin/api-keys/index.tsindex 9af91c8a97..7f5b039d5f 100644--- a/web/src/pages/api/admin/api-keys/index.ts+++ b/web/src/pages/api/admin/api-keys/index.ts@@ -3,7 +3,7 @@ import { z } from "zod/v4";import { prisma } from "@langfuse/shared/src/db";import { logger, redis } from "@langfuse/shared/src/server";import { ApiAuthService } from "@/src/features/public-api/server/apiAuth";-import { AdminApiAuthService } from "@/src/features/admin-api/server/adminApiAuth";+import { AdminApiAuthService } from "@/src/ee/features/admin-api/server/adminApiAuth";/*This API route is used by Langfuse Cloud to delete API keys for a project. It will return 403 for self-hosters.diff --git a/web/src/pages/api/admin/bullmq/index.ts b/web/src/pages/api/admin/bullmq/index.tsindex 88a03c88e9..f4793fedf1 100644--- a/web/src/pages/api/admin/bullmq/index.ts+++ b/web/src/pages/api/admin/bullmq/index.ts@@ -6,7 +6,7 @@ import {getQueue,IngestionQueue,} from "@langfuse/shared/src/server";-import { AdminApiAuthService } from "@/src/features/admin-api/server/adminApiAuth";+import { AdminApiAuthService } from "@/src/ee/features/admin-api/server/adminApiAuth";/*This API route is used by Langfuse Cloud to retry failed bullmq jobs.diff --git a/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].ts b/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].tsindex 99951cbffe..b1cbe3adf7 100644--- a/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].ts+++ b/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].ts@@ -1,10 +1,10 @@import { type NextApiRequest, type NextApiResponse } from "next";import { logger } from "@langfuse/shared/src/server";-import { AdminApiAuthService } from "@/src/features/admin-api/server/adminApiAuth";+import { AdminApiAuthService } from "@/src/ee/features/admin-api/server/adminApiAuth";import {validateQueryParams,handleDeleteApiKey,-} from "@/src/features/admin-api/organizations/apiKeys/apiKeyById";+} from "@/src/ee/features/admin-api/server/organizations/apiKeys/apiKeyById";import { prisma } from "@langfuse/shared/src/db";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";import { getSelfHostedInstancePlanServerSide } from "@/src/features/entitlements/server/getPlan";diff --git a/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/index.ts b/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/index.tsindex 26037b7de4..ffae5a14f4 100644--- a/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/index.ts+++ b/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/index.ts@@ -1,11 +1,11 @@import { type NextApiRequest, type NextApiResponse } from "next";import { logger } from "@langfuse/shared/src/server";-import { AdminApiAuthService } from "@/src/features/admin-api/server/adminApiAuth";+import { AdminApiAuthService } from "@/src/ee/features/admin-api/server/adminApiAuth";import {validateQueryAndExtractId,handleGetApiKeys,handleCreateApiKey,-} from "@/src/features/admin-api/organizations/apiKeys";+} from "@/src/ee/features/admin-api/server/organizations/apiKeys";import { prisma } from "@langfuse/shared/src/db";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";import { getSelfHostedInstancePlanServerSide } from "@/src/features/entitlements/server/getPlan";diff --git a/web/src/pages/api/admin/organizations/[organizationId]/index.ts b/web/src/pages/api/admin/organizations/[organizationId]/index.tsindex 2cfa5a754b..f4f7d6d3d6 100644--- a/web/src/pages/api/admin/organizations/[organizationId]/index.ts+++ b/web/src/pages/api/admin/organizations/[organizationId]/index.ts@@ -1,11 +1,11 @@import { type NextApiRequest, type NextApiResponse } from "next";import { logger } from "@langfuse/shared/src/server";-import { AdminApiAuthService } from "@/src/features/admin-api/server/adminApiAuth";+import { AdminApiAuthService } from "@/src/ee/features/admin-api/server/adminApiAuth";import {handleGetOrganizationById,handleUpdateOrganization,handleDeleteOrganization,-} from "@/src/features/admin-api/organizations/organizationById";+} from "@/src/ee/features/admin-api/server/organizations/organizationById";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";import { getSelfHostedInstancePlanServerSide } from "@/src/features/entitlements/server/getPlan";diff --git a/web/src/pages/api/admin/organizations/index.ts b/web/src/pages/api/admin/organizations/index.tsindex 5377c4a087..17e5660b5a 100644--- a/web/src/pages/api/admin/organizations/index.ts+++ b/web/src/pages/api/admin/organizations/index.ts@@ -1,10 +1,10 @@import { type NextApiRequest, type NextApiResponse } from "next";import { logger } from "@langfuse/shared/src/server";-import { AdminApiAuthService } from "@/src/features/admin-api/server/adminApiAuth";+import { AdminApiAuthService } from "@/src/ee/features/admin-api/server/adminApiAuth";import {handleGetOrganizations,handleCreateOrganization,-} from "@/src/features/admin-api/organizations";+} from "@/src/ee/features/admin-api/server/organizations";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";import { getSelfHostedInstancePlanServerSide } from "@/src/features/entitlements/server/getPlan";diff --git a/web/src/pages/api/public/organizations/memberships/index.ts b/web/src/pages/api/public/organizations/memberships/index.tsindex 9ee82f3583..bd7d0b3e2a 100644--- a/web/src/pages/api/public/organizations/memberships/index.ts+++ b/web/src/pages/api/public/organizations/memberships/index.ts@@ -5,7 +5,7 @@ import { logger, redis } from "@langfuse/shared/src/server";import {handleGetMemberships,handleUpdateMembership,-} from "@/src/features/admin-api/memberships";+} from "@/src/ee/features/admin-api/server/memberships";import { type NextApiRequest, type NextApiResponse } from "next";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";diff --git a/web/src/pages/api/public/organizations/projects/index.ts b/web/src/pages/api/public/organizations/projects/index.tsindex b273ec38b7..98bfca62fa 100644--- a/web/src/pages/api/public/organizations/projects/index.ts+++ b/web/src/pages/api/public/organizations/projects/index.ts@@ -2,7 +2,7 @@ import { ApiAuthService } from "@/src/features/public-api/server/apiAuth";import { cors, runMiddleware } from "@/src/features/public-api/server/cors";import { prisma } from "@langfuse/shared/src/db";import { logger, redis } from "@langfuse/shared/src/server";-import { handleGetProjects } from "@/src/features/admin-api/projects";+import { handleGetProjects } from "@/src/ee/features/admin-api/server/projects";import { type NextApiRequest, type NextApiResponse } from "next";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";diff --git a/web/src/pages/api/public/projects/[projectId]/apiKeys/[apiKeyId].ts b/web/src/pages/api/public/projects/[projectId]/apiKeys/[apiKeyId].tsindex a5b81e1384..fa7c5bedff 100644--- a/web/src/pages/api/public/projects/[projectId]/apiKeys/[apiKeyId].ts+++ b/web/src/pages/api/public/projects/[projectId]/apiKeys/[apiKeyId].ts@@ -6,7 +6,7 @@ import { cors, runMiddleware } from "@/src/features/public-api/server/cors";import {validateQueryParams,handleDeleteApiKey,-} from "@/src/features/admin-api/projects/projectById/apiKeys/apiKeyById";+} from "@/src/ee/features/admin-api/server/projects/projectById/apiKeys/apiKeyById";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";export default async function handler(diff --git a/web/src/pages/api/public/projects/[projectId]/apiKeys/index.ts b/web/src/pages/api/public/projects/[projectId]/apiKeys/index.tsindex 838566d3b1..27644411fa 100644--- a/web/src/pages/api/public/projects/[projectId]/apiKeys/index.ts+++ b/web/src/pages/api/public/projects/[projectId]/apiKeys/index.ts@@ -7,7 +7,7 @@ import {validateQueryAndExtractId,handleGetApiKeys,handleCreateApiKey,-} from "@/src/features/admin-api/projects/projectById/apiKeys";+} from "@/src/ee/features/admin-api/server/projects/projectById/apiKeys";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";export default async function handler(diff --git a/web/src/pages/api/public/projects/[projectId]/index.ts b/web/src/pages/api/public/projects/[projectId]/index.tsindex 62190fcd89..7fc75247bf 100644--- a/web/src/pages/api/public/projects/[projectId]/index.ts+++ b/web/src/pages/api/public/projects/[projectId]/index.ts@@ -5,7 +5,7 @@ import { logger, redis } from "@langfuse/shared/src/server";import {handleUpdateProject,handleDeleteProject,-} from "@/src/features/admin-api/projects/projectById";+} from "@/src/ee/features/admin-api/server/projects/projectById";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";import { type NextApiRequest, type NextApiResponse } from "next";diff --git a/web/src/pages/api/public/projects/[projectId]/memberships/index.ts b/web/src/pages/api/public/projects/[projectId]/memberships/index.tsindex e8f3bcdea2..fe52103d31 100644--- a/web/src/pages/api/public/projects/[projectId]/memberships/index.ts+++ b/web/src/pages/api/public/projects/[projectId]/memberships/index.ts@@ -6,7 +6,7 @@ import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/haimport {handleGetMemberships,handleUpdateMembership,-} from "@/src/features/admin-api/projects/projectById/memberships";+} from "@/src/ee/features/admin-api/server/projects/projectById/memberships";import { type NextApiRequest, type NextApiResponse } from "next";diff --git a/web/src/pages/api/public/projects/index.ts b/web/src/pages/api/public/projects/index.tsindex b56e40daf3..16c8d25ef0 100644--- a/web/src/pages/api/public/projects/index.ts+++ b/web/src/pages/api/public/projects/index.ts@@ -2,7 +2,7 @@ import { ApiAuthService } from "@/src/features/public-api/server/apiAuth";import { cors, runMiddleware } from "@/src/features/public-api/server/cors";import { prisma } from "@langfuse/shared/src/db";import { logger, redis } from "@langfuse/shared/src/server";-import { handleCreateProject } from "@/src/features/admin-api/projects/createProject";+import { handleCreateProject } from "@/src/ee/features/admin-api/server/projects/createProject";import { type NextApiRequest, type NextApiResponse } from "next";import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";