Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

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.ts
similarity index 100%
rename from web/src/features/admin-api/server/adminApiAuth.ts
rename to web/src/ee/features/admin-api/server/adminApiAuth.ts
diff --git a/web/src/features/admin-api/memberships.ts b/web/src/ee/features/admin-api/server/memberships.ts
similarity index 100%
rename from web/src/features/admin-api/memberships.ts
rename to web/src/ee/features/admin-api/server/memberships.ts
diff --git a/web/src/features/admin-api/organizations/apiKeys/apiKeyById.ts b/web/src/ee/features/admin-api/server/organizations/apiKeys/apiKeyById.ts
similarity index 100%
rename from web/src/features/admin-api/organizations/apiKeys/apiKeyById.ts
rename to web/src/ee/features/admin-api/server/organizations/apiKeys/apiKeyById.ts
diff --git a/web/src/features/admin-api/organizations/apiKeys/index.ts b/web/src/ee/features/admin-api/server/organizations/apiKeys/index.ts
similarity index 100%
rename from web/src/features/admin-api/organizations/apiKeys/index.ts
rename to web/src/ee/features/admin-api/server/organizations/apiKeys/index.ts
diff --git a/web/src/features/admin-api/organizations/index.ts b/web/src/ee/features/admin-api/server/organizations/index.ts
similarity index 100%
rename from web/src/features/admin-api/organizations/index.ts
rename to web/src/ee/features/admin-api/server/organizations/index.ts
diff --git a/web/src/features/admin-api/organizations/organizationById.ts b/web/src/ee/features/admin-api/server/organizations/organizationById.ts
similarity index 100%
rename from web/src/features/admin-api/organizations/organizationById.ts
rename to web/src/ee/features/admin-api/server/organizations/organizationById.ts
diff --git a/web/src/features/admin-api/projects.ts b/web/src/ee/features/admin-api/server/projects.ts
similarity index 100%
rename from web/src/features/admin-api/projects.ts
rename to web/src/ee/features/admin-api/server/projects.ts
diff --git a/web/src/features/admin-api/projects/createProject.ts b/web/src/ee/features/admin-api/server/projects/createProject.ts
similarity index 100%
rename from web/src/features/admin-api/projects/createProject.ts
rename to web/src/ee/features/admin-api/server/projects/createProject.ts
diff --git a/web/src/features/admin-api/projects/projectById/apiKeys/apiKeyById.ts b/web/src/ee/features/admin-api/server/projects/projectById/apiKeys/apiKeyById.ts
similarity index 100%
rename from web/src/features/admin-api/projects/projectById/apiKeys/apiKeyById.ts
rename to web/src/ee/features/admin-api/server/projects/projectById/apiKeys/apiKeyById.ts
diff --git a/web/src/features/admin-api/projects/projectById/apiKeys/index.ts b/web/src/ee/features/admin-api/server/projects/projectById/apiKeys/index.ts
similarity index 100%
rename from web/src/features/admin-api/projects/projectById/apiKeys/index.ts
rename to web/src/ee/features/admin-api/server/projects/projectById/apiKeys/index.ts
diff --git a/web/src/features/admin-api/projects/projectById/index.ts b/web/src/ee/features/admin-api/server/projects/projectById/index.ts
similarity index 100%
rename from web/src/features/admin-api/projects/projectById/index.ts
rename to web/src/ee/features/admin-api/server/projects/projectById/index.ts
diff --git a/web/src/features/admin-api/projects/projectById/memberships/index.ts b/web/src/ee/features/admin-api/server/projects/projectById/memberships/index.ts
similarity index 100%
rename from web/src/features/admin-api/projects/projectById/memberships/index.ts
rename to web/src/ee/features/admin-api/server/projects/projectById/memberships/index.ts
diff --git a/web/src/pages/api/admin/api-keys/index.ts b/web/src/pages/api/admin/api-keys/index.ts
index 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.ts
index 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].ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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].ts
index 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.ts
index 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.ts
index 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.ts
index 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/ha
import {
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.ts
index 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";