:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(projects): bring /api/projects to parity with /api/environments V2 (#63169)
Yasen4d48bec0ffdd
diff --git a/ee/api/test/test_subscription.py b/ee/api/test/test_subscription.pyindex 8b03af1f0087..fb55eeea00c8 100644--- a/ee/api/test/test_subscription.py+++ b/ee/api/test/test_subscription.py@@ -1983,10 +1983,10 @@ class TestSubscriptionDeliveryAPI(APILicensedTest):response = self.client.get(f"/api/environments/{self.team.id}/subscriptions/{self.subscription.id}/deliveries/")assert response.status_code == status.HTTP_200_OK- def test_deliveries_not_available_on_legacy_project_path(self):+ def test_deliveries_available_on_project_path(self):self._create_delivery(idempotency_key="legacy-test")response = self.client.get(f"/api/projects/{self.team.id}/subscriptions/{self.subscription.id}/deliveries/")- assert response.status_code == status.HTTP_404_NOT_FOUND+ assert response.status_code == status.HTTP_200_OKdef test_retrieve_delivery_not_found_when_row_belongs_to_different_subscription(self):other = Subscription.objects.create(diff --git a/ee/urls.py b/ee/urls.pyindex 847f93480ecf..3316f64426c1 100644--- a/ee/urls.py+++ b/ee/urls.py@@ -30,7 +30,6 @@ from .api.scim import views as scim_viewsdef extend_api_router() -> None:from posthog.api import (- environments_router,organizations_router,register_legacy_dual_route_team_nested_viewset,router as root_router,@@ -55,9 +54,15 @@ def extend_api_router() -> None:)register_legacy_dual_route_team_nested_viewset(r"hooks", hooks.HookViewSet, "environment_hooks", ["team_id"])- _, env_subscriptions_router = register_legacy_dual_route_team_nested_viewset(+ project_subscriptions_router, env_subscriptions_router = register_legacy_dual_route_team_nested_viewset(r"subscriptions", subscription.SubscriptionViewSet, "environment_subscriptions", ["team_id"])+ project_subscriptions_router.register(+ r"deliveries",+ subscription.SubscriptionDeliveryViewSet,+ "project_subscription_deliveries",+ ["team_id", "subscription_id"],+ )env_subscriptions_router.register(r"deliveries",subscription.SubscriptionDeliveryViewSet,@@ -65,21 +70,23 @@ def extend_api_router() -> None:["team_id", "subscription_id"],)- environments_router.register(+ register_legacy_dual_route_team_nested_viewset(r"conversations", conversation.ConversationViewSet, "environment_conversations", ["team_id"])- environments_router.register(+ register_legacy_dual_route_team_nested_viewset(r"core_memory", core_memory.MaxCoreMemoryViewSet, "environment_core_memory", ["team_id"])- environments_router.register(r"max_tools", max_tools.MaxToolsViewSet, "environment_max_tools", ["team_id"])+ register_legacy_dual_route_team_nested_viewset(+ r"max_tools", max_tools.MaxToolsViewSet, "environment_max_tools", ["team_id"]+ )- environments_router.register(+ register_legacy_dual_route_team_nested_viewset(r"max_hands_free", hands_free.MaxHandsFreeViewSet, "environment_max_hands_free", ["team_id"])- environments_router.register(+ register_legacy_dual_route_team_nested_viewset(r"session_summaries", session_summaries.SessionSummariesViewSet, "environment_session_summaries", ["team_id"])diff --git a/frontend/src/scenes/subscriptions/subscriptionSceneLogic.test.ts b/frontend/src/scenes/subscriptions/subscriptionSceneLogic.test.tsindex 1f0604591a78..d4c029ad1ec3 100644--- a/frontend/src/scenes/subscriptions/subscriptionSceneLogic.test.ts+++ b/frontend/src/scenes/subscriptions/subscriptionSceneLogic.test.ts@@ -85,7 +85,7 @@ describe('subscriptionSceneLogic', () => {useMocks({get: {[`/api/projects/${MOCK_TEAM_ID}/subscriptions/1/`]: [200, MOCK_SUBSCRIPTION],- [`/api/environments/${MOCK_TEAM_ID}/subscriptions/1/deliveries/`]: (req) => {+ [`/api/projects/${MOCK_TEAM_ID}/subscriptions/1/deliveries/`]: (req) => {deliveriesRequestUrls.push(req.url.toString())return [200, { results: [], next: null, previous: null }]},@@ -117,7 +117,7 @@ describe('subscriptionSceneLogic', () => {useMocks({get: {[`/api/projects/${MOCK_TEAM_ID}/subscriptions/1/`]: [200, MOCK_SUBSCRIPTION],- [`/api/environments/${MOCK_TEAM_ID}/subscriptions/1/deliveries/`]: () => {+ [`/api/projects/${MOCK_TEAM_ID}/subscriptions/1/deliveries/`]: () => {deliveriesRequestUrls.push('deliveries')return [200, { results: [], next: null, previous: null }]},@@ -140,7 +140,7 @@ describe('subscriptionSceneLogic', () => {useMocks({get: {[`/api/projects/${MOCK_TEAM_ID}/subscriptions/1/`]: [200, MOCK_SUBSCRIPTION],- [`/api/environments/${MOCK_TEAM_ID}/subscriptions/1/deliveries/`]: () => {+ [`/api/projects/${MOCK_TEAM_ID}/subscriptions/1/deliveries/`]: () => {deliveriesRequestUrls.push('deliveries')return [200, { results: [], next: null, previous: null }]},@@ -165,7 +165,7 @@ describe('subscriptionSceneLogic', () => {useMocks({get: {[`/api/projects/${MOCK_TEAM_ID}/subscriptions/1/`]: [200, MOCK_SUBSCRIPTION],- [`/api/environments/${MOCK_TEAM_ID}/subscriptions/1/deliveries/`]: () => {+ [`/api/projects/${MOCK_TEAM_ID}/subscriptions/1/deliveries/`]: () => {deliveriesRequestUrls.push('deliveries')return [200, { results: [], next: null, previous: null }]},@@ -197,7 +197,7 @@ describe('subscriptionSceneLogic', () => {// Function form, not the `[200, body]` shorthand: useMocks serializes a bare array as// the whole response body, so only a function-returned tuple delivers the object itself.[`/api/projects/${MOCK_TEAM_ID}/subscriptions/2/`]: () => [200, MOCK_AI_SUBSCRIPTION],- [`/api/environments/${MOCK_TEAM_ID}/subscriptions/2/deliveries/`]: () => {+ [`/api/projects/${MOCK_TEAM_ID}/subscriptions/2/deliveries/`]: () => {deliveriesRequestUrls.push('deliveries')return [200, { results: [], next: null, previous: null }]},diff --git a/posthog/api/test/test_team_project_parity.py b/posthog/api/test/test_team_project_parity.pyindex 1f30bcdb794c..a23f11a92608 100644--- a/posthog/api/test/test_team_project_parity.py+++ b/posthog/api/test/test_team_project_parity.py@@ -1,5 +1,10 @@+import re+from posthog.test.base import BaseTest+from django.urls import get_resolver+from django.urls.resolvers import URLPattern, URLResolver+from rest_framework import viewsetsfrom posthog.api.project import ProjectBackwardCompatSerializer, ProjectViewSet@@ -8,12 +13,18 @@ from posthog.api.team import TeamSerializer, TeamViewSet# /api/projects/ (Project model) is the canonical surface; /api/environments/ (Team model) is the# backward-compat alias we intend to deprecate and permanently redirect onto /api/projects/. For that-# redirect to be safe, the project surface must be a SUPERSET of the environment surface: every field-# and action a client can reach on /api/environments/ must also exist on /api/projects/.+# redirect to be safe, the project surface must be a SUPERSET of the environment surface — at two levels:+# - RESOURCE parity: every serializer field and viewset action on the root Team viewset also exists on+# the root Project viewset (the superset tests below).+# - ROUTE parity: every URL reachable under /api/environments/ also resolves under /api/projects/. This is+# broader than the root viewset pair — it covers nested viewsets registered directly on+# `environments_router`, raw path()/include() mounts in urls.py, and resources that never opted into the+# dual-route helper. test_environment_only_routes_match_known_allowlist walks the resolved URL trees to+# catch those (the resource tests are blind to anything outside the root viewset pair).#-# These allowlists capture the only intentional differences. Anything outside them is drift — most-# likely a field or action added to the Team/environment side without mirroring it onto projects — and-# fails this test loudly so it gets fixed before it reaches clients.+# These allowlists capture the only intentional differences. Anything outside them is drift — most likely a+# field, action, or route added to the Team/environment side without mirroring it onto projects — and fails+# loudly so it gets fixed before it reaches clients.# Fields that legitimately exist only on the project surface (a genuine Project concept, not a Team field).# is_pending_deletion was added project-side on master; a project-only field is fine for the redirect target.@@ -22,6 +33,17 @@ PROJECT_ONLY_SERIALIZER_FIELDS = {"product_description", "is_pending_deletion"}# Actions that legitimately exist only on the project surface (operate on the Project, not the Team).PROJECT_ONLY_ACTIONS = {"change_organization"}+# Routes (normalized suffix after `/api/<prefix>/<id>/`, path params -> `{id}`) that legitimately resolve+# ONLY under /api/environments/ and must NOT be mirrored onto projects:+# - the customerio webhook is posted to a fixed env URL by a third party; redirecting it would break it,+# - the async-query progress endpoints are internal, keyed by the team that ran the query.+# Anything else env-only is drift — mirror it onto /api/projects/ (dual-route the viewset) instead.+KNOWN_ENVIRONMENT_ONLY_ROUTES: set[str] = {+ "messaging/customerio/webhook",+ "progress",+ "query/{id}/progress",+}+def _serializer_field_names(serializer_class) -> set[str]:return set(serializer_class().fields.keys())@@ -31,6 +53,47 @@ def _extra_action_names(viewset_class: type[viewsets.GenericViewSet]) -> set[strreturn {action.__name__ for action in viewset_class.get_extra_actions()}+_NAMED_GROUP = re.compile(r"\(\?P<[^>]+>(?:[^()]|\([^()]*\))*\)") # (?P<x>...) incl. one nested ()+_PATH_CONVERTER = re.compile(r"<(?:[a-zA-Z_]+:)?[^>]+>") # <int:x>, <drf_format_suffix:format>, <x>+++def _route_segment(pattern) -> str:+ # str() of a regex pattern carries a leading ^ anchor; strip per-segment so concatenation is clean.+ return str(pattern.pattern).lstrip("^")+++def _walk_routes(patterns, prefix=""):+ for entry in patterns:+ if isinstance(entry, URLResolver):+ yield from _walk_routes(entry.url_patterns, prefix + _route_segment(entry))+ elif isinstance(entry, URLPattern):+ yield prefix + _route_segment(entry)+++def _normalize_route(full: str, marker: str) -> str | None:+ if marker not in full:+ return None+ suffix = full[full.find(marker) + len(marker) :]+ suffix = _NAMED_GROUP.sub("{id}", suffix) # (?P<x>...) -> {id}+ suffix = _PATH_CONVERTER.sub("{id}", suffix) # <int:x> / <drf_format_suffix:format> -> {id}+ suffix = suffix.replace("\\", "") # drop escapes: \. -> .+ suffix = re.sub(r"\.\{id\}", "", suffix) # drop the DRF `.{format}` suffix variant+ for token in ("(?:", "(", ")", "?", "^", "$"): # nuke leftover regex grouping syntax+ suffix = suffix.replace(token, "")+ suffix = re.sub(r"^\{id\}/?", "", suffix) # drop the leading team/project id segment+ suffix = re.sub(r"/+", "/", suffix).strip("/")+ return suffix or None+++def _routes_under(marker: str) -> set[str]:+ routes: set[str] = set()+ for full in _walk_routes(get_resolver().url_patterns):+ norm = _normalize_route(full, marker)+ if norm is not None:+ routes.add(norm)+ return routes++class TestTeamProjectParity(BaseTest):def test_detail_serializer_is_a_superset_of_team_serializer(self):team_fields = _serializer_field_names(TeamSerializer)@@ -99,3 +162,26 @@ class TestTeamProjectParity(BaseTest):self.assertEqual(mismatches, {}, f"Shared actions expose different HTTP methods (team vs project): {mismatches}")++ def test_environment_only_routes_match_known_allowlist(self):+ # Route-level (URL-tree) parity: walk both prefixes' resolved patterns and assert the only routes+ # reachable solely under /api/environments/ are the known, intentionally environment-only ones.+ env_only = _routes_under("api/environments/") - _routes_under("api/projects/")++ unexpected = env_only - KNOWN_ENVIRONMENT_ONLY_ROUTES+ self.assertEqual(+ unexpected,+ set(),+ "New route(s) reachable only under /api/environments/ with no /api/projects/ counterpart: "+ f"{sorted(unexpected)}. A redirect from /api/environments/ to /api/projects/ would not reach them. "+ "Either mirror the route onto /api/projects/ (dual-route the viewset, or register it project-side) "+ "or, if it is intentionally environment-scoped, add it to KNOWN_ENVIRONMENT_ONLY_ROUTES with a reason.",+ )++ resolved = KNOWN_ENVIRONMENT_ONLY_ROUTES - env_only+ self.assertEqual(+ resolved,+ set(),+ "Route(s) in KNOWN_ENVIRONMENT_ONLY_ROUTES now have a /api/projects/ counterpart (or no longer "+ f"exist): {sorted(resolved)}. Remove them from the allowlist so it reflects only still-env-only routes.",+ )diff --git a/posthog/urls.py b/posthog/urls.pyindex 70ff62a43cb9..d6d5e3e6698a 100644--- a/posthog/urls.py+++ b/posthog/urls.py@@ -283,10 +283,18 @@ urlpatterns = ["api/environments/<int:parent_lookup_team_id>/mcp_analytics/",include("products.mcp_analytics.backend.presentation.urls"),),+ path(+ "api/projects/<int:parent_lookup_team_id>/mcp_analytics/",+ include("products.mcp_analytics.backend.presentation.urls"),+ ),path("api/environments/<int:parent_lookup_team_id>/property_access_controls/",include("products.access_control.backend.presentation.urls"),),+ path(+ "api/projects/<int:parent_lookup_team_id>/property_access_controls/",+ include("products.access_control.backend.presentation.urls"),+ ),opt_slash_path("api/support/ensure-zendesk-organization", csrf_exempt(ensure_zendesk_organization)),path("api/", include(router.urls)),# Override the tf_urls QRGeneratorView to use the cache-aware version (handles session race conditions)diff --git a/products/access_control/frontend/generated/api.ts b/products/access_control/frontend/generated/api.tsindex 3d459dcff4fb..737420707285 100644--- a/products/access_control/frontend/generated/api.ts+++ b/products/access_control/frontend/generated/api.ts@@ -31,8 +31,8 @@ export const getPropertyAccessControlsRetrieveUrl = (const stringifiedParams = normalizedParams.toString()return stringifiedParams.length > 0- ? `/api/environments/${projectId}/property_access_controls/?${stringifiedParams}`- : `/api/environments/${projectId}/property_access_controls/`+ ? `/api/projects/${projectId}/property_access_controls/?${stringifiedParams}`+ : `/api/projects/${projectId}/property_access_controls/`}/**@@ -50,7 +50,7 @@ export const propertyAccessControlsRetrieve = async (}export const getPropertyAccessControlsCreateUrl = (projectId: string) => {- return `/api/environments/${projectId}/property_access_controls/`+ return `/api/projects/${projectId}/property_access_controls/`}/**@@ -81,8 +81,8 @@ export const getPropertyAccessControlsDestroyUrl = (projectId: string, params: Pconst stringifiedParams = normalizedParams.toString()return stringifiedParams.length > 0- ? `/api/environments/${projectId}/property_access_controls/?${stringifiedParams}`- : `/api/environments/${projectId}/property_access_controls/`+ ? `/api/projects/${projectId}/property_access_controls/?${stringifiedParams}`+ : `/api/projects/${projectId}/property_access_controls/`}/**diff --git a/products/conversations/frontend/generated/api.ts b/products/conversations/frontend/generated/api.tsindex 33cd8fce95d6..041bb8952868 100644--- a/products/conversations/frontend/generated/api.ts+++ b/products/conversations/frontend/generated/api.ts@@ -64,8 +64,8 @@ export const getConversationsListUrl = (projectId: string, params?: Conversationconst stringifiedParams = normalizedParams.toString()return stringifiedParams.length > 0- ? `/api/environments/${projectId}/conversations/?${stringifiedParams}`- : `/api/environments/${projectId}/conversations/`+ ? `/api/projects/${projectId}/conversations/?${stringifiedParams}`+ : `/api/projects/${projectId}/conversations/`}export const conversationsList = async (@@ -80,7 +80,7 @@ export const conversationsList = async (}export const getConversationsCreateUrl = (projectId: string) => {- return `/api/environments/${projectId}/conversations/`+ return `/api/projects/${projectId}/conversations/`}/**@@ -103,7 +103,7 @@ export const conversationsCreate = async (}export const getConversationsRetrieveUrl = (projectId: string, conversation: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/`+ return `/api/projects/${projectId}/conversations/${conversation}/`}export const conversationsRetrieve = async (@@ -118,7 +118,7 @@ export const conversationsRetrieve = async (}export const getConversationsDestroyUrl = (projectId: string, conversation: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/`+ return `/api/projects/${projectId}/conversations/${conversation}/`}/**@@ -136,7 +136,7 @@ export const conversationsDestroy = async (}export const getConversationsAppendMessageCreateUrl = (projectId: string, conversation: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/append_message/`+ return `/api/projects/${projectId}/conversations/${conversation}/append_message/`}/**@@ -159,7 +159,7 @@ export const conversationsAppendMessageCreate = async (}export const getConversationsCancelPartialUpdateUrl = (projectId: string, conversation: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/cancel/`+ return `/api/projects/${projectId}/conversations/${conversation}/cancel/`}export const conversationsCancelPartialUpdate = async (@@ -177,7 +177,7 @@ export const conversationsCancelPartialUpdate = async (}export const getConversationsQueueRetrieveUrl = (projectId: string, conversation: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/queue/`+ return `/api/projects/${projectId}/conversations/${conversation}/queue/`}export const conversationsQueueRetrieve = async (@@ -192,7 +192,7 @@ export const conversationsQueueRetrieve = async (}export const getConversationsQueueCreateUrl = (projectId: string, conversation: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/queue/`+ return `/api/projects/${projectId}/conversations/${conversation}/queue/`}export const conversationsQueueCreate = async (@@ -210,7 +210,7 @@ export const conversationsQueueCreate = async (}export const getConversationsQueuePartialUpdateUrl = (projectId: string, conversation: string, queueId: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/queue/${queueId}/`+ return `/api/projects/${projectId}/conversations/${conversation}/queue/${queueId}/`}export const conversationsQueuePartialUpdate = async (@@ -229,7 +229,7 @@ export const conversationsQueuePartialUpdate = async (}export const getConversationsQueueDestroyUrl = (projectId: string, conversation: string, queueId: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/queue/${queueId}/`+ return `/api/projects/${projectId}/conversations/${conversation}/queue/${queueId}/`}export const conversationsQueueDestroy = async (@@ -245,7 +245,7 @@ export const conversationsQueueDestroy = async (}export const getConversationsQueueClearCreateUrl = (projectId: string, conversation: string) => {- return `/api/environments/${projectId}/conversations/${conversation}/queue/clear/`+ return `/api/projects/${projectId}/conversations/${conversation}/queue/clear/`}export const conversationsQueueClearCreate = async (diff --git a/products/mcp_analytics/frontend/generated/api.ts b/products/mcp_analytics/frontend/generated/api.tsindex 9befe14d2856..1653db615e32 100644--- a/products/mcp_analytics/frontend/generated/api.ts+++ b/products/mcp_analytics/frontend/generated/api.ts@@ -35,8 +35,8 @@ export const getMcpAnalyticsFeedbackListUrl = (projectId: string, params?: McpAnconst stringifiedParams = normalizedParams.toString()return stringifiedParams.length > 0- ? `/api/environments/${projectId}/mcp_analytics/feedback/?${stringifiedParams}`- : `/api/environments/${projectId}/mcp_analytics/feedback/`+ ? `/api/projects/${projectId}/mcp_analytics/feedback/?${stringifiedParams}`+ : `/api/projects/${projectId}/mcp_analytics/feedback/`}/**@@ -54,7 +54,7 @@ export const mcpAnalyticsFeedbackList = async (}export const getMcpAnalyticsFeedbackCreateUrl = (projectId: string) => {- return `/api/environments/${projectId}/mcp_analytics/feedback/`+ return `/api/projects/${projectId}/mcp_analytics/feedback/`}/**@@ -74,7 +74,7 @@ export const mcpAnalyticsFeedbackCreate = async (}export const getMcpAnalyticsIntentClustersRetrieveUrl = (projectId: string) => {- return `/api/environments/${projectId}/mcp_analytics/intent_clusters/`+ return `/api/projects/${projectId}/mcp_analytics/intent_clusters/`}/**@@ -91,7 +91,7 @@ export const mcpAnalyticsIntentClustersRetrieve = async (}export const getMcpAnalyticsIntentClustersRecomputeUrl = (projectId: string) => {- return `/api/environments/${projectId}/mcp_analytics/intent_clusters/recompute/`+ return `/api/projects/${projectId}/mcp_analytics/intent_clusters/recompute/`}/**@@ -122,8 +122,8 @@ export const getMcpAnalyticsMissingCapabilitiesListUrl = (const stringifiedParams = normalizedParams.toString()return stringifiedParams.length > 0- ? `/api/environments/${projectId}/mcp_analytics/missing_capabilities/?${stringifiedParams}`- : `/api/environments/${projectId}/mcp_analytics/missing_capabilities/`+ ? `/api/projects/${projectId}/mcp_analytics/missing_capabilities/?${stringifiedParams}`+ : `/api/projects/${projectId}/mcp_analytics/missing_capabilities/`}/**@@ -144,7 +144,7 @@ export const mcpAnalyticsMissingCapabilitiesList = async (}export const getMcpAnalyticsMissingCapabilitiesCreateUrl = (projectId: string) => {- return `/api/environments/${projectId}/mcp_analytics/missing_capabilities/`+ return `/api/projects/${projectId}/mcp_analytics/missing_capabilities/`}/**@@ -175,8 +175,8 @@ export const getMcpAnalyticsSessionsListUrl = (projectId: string, params?: McpAnconst stringifiedParams = normalizedParams.toString()return stringifiedParams.length > 0- ? `/api/environments/${projectId}/mcp_analytics/sessions/?${stringifiedParams}`- : `/api/environments/${projectId}/mcp_analytics/sessions/`+ ? `/api/projects/${projectId}/mcp_analytics/sessions/?${stringifiedParams}`+ : `/api/projects/${projectId}/mcp_analytics/sessions/`}/**@@ -194,7 +194,7 @@ export const mcpAnalyticsSessionsList = async (}export const getMcpAnalyticsSessionsGenerateIntentUrl = (projectId: string, id: string) => {- return `/api/environments/${projectId}/mcp_analytics/sessions/${id}/generate_intent/`+ return `/api/projects/${projectId}/mcp_analytics/sessions/${id}/generate_intent/`}/**@@ -227,8 +227,8 @@ export const getMcpAnalyticsSessionsToolCallsUrl = (const stringifiedParams = normalizedParams.toString()return stringifiedParams.length > 0- ? `/api/environments/${projectId}/mcp_analytics/sessions/${id}/tool_calls/?${stringifiedParams}`- : `/api/environments/${projectId}/mcp_analytics/sessions/${id}/tool_calls/`+ ? `/api/projects/${projectId}/mcp_analytics/sessions/${id}/tool_calls/?${stringifiedParams}`+ : `/api/projects/${projectId}/mcp_analytics/sessions/${id}/tool_calls/`}/**diff --git a/products/replay/frontend/generated/api.schemas.ts b/products/replay/frontend/generated/api.schemas.tsindex efa1a4e3edd7..f5d65a1c1979 100644--- a/products/replay/frontend/generated/api.schemas.ts+++ b/products/replay/frontend/generated/api.schemas.ts@@ -7,20 +7,6 @@* PostHog API - generated* OpenAPI spec version: 1.0.0*/-export interface SessionSummariesApi {- /**- * List of session IDs to summarize (max 300)- * @minItems 1- * @maxItems 300- */- session_ids: string[]- /**- * Optional focus area for the summarization- * @maxLength 500- */- focus_area?: string-}-/*** * `engineering` - Engineering* * `data` - Data@@ -325,6 +311,20 @@ export interface PatchedSessionRecordingApi {readonly matches_filters?: boolean}+export interface SessionSummariesApi {+ /**+ * List of session IDs to summarize (max 300)+ * @minItems 1+ * @maxItems 300+ */+ session_ids: string[]+ /**+ * Optional focus area for the summarization+ * @maxLength 500+ */+ focus_area?: string+}+/*** Headline outcome from the summary: `{success: bool, description: string}` or null if the summary did not record one. Useful for quickly classifying a session as success/failure.* @nullablediff --git a/products/replay/frontend/generated/api.ts b/products/replay/frontend/generated/api.tsindex b0e7639b270c..563b18967c16 100644--- a/products/replay/frontend/generated/api.ts+++ b/products/replay/frontend/generated/api.ts@@ -40,26 +40,6 @@ type NonReadonly<T> = [T] extends [UnionToIntersection<T>]}: DistributeReadOnlyOverUnions<T>-export const getCreateSessionSummariesIndividuallyUrl = (projectId: string) => {- return `/api/environments/${projectId}/session_summaries/create_session_summaries_individually/`-}--/**- * Generate AI individual summary for each session, without grouping.- */-export const createSessionSummariesIndividually = async (- projectId: string,- sessionSummariesApi: SessionSummariesApi,- options?: RequestInit-): Promise<SessionSummariesApi> => {- return apiMutator<SessionSummariesApi>(getCreateSessionSummariesIndividuallyUrl(projectId), {- ...options,- method: 'POST',- headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(sessionSummariesApi),- })-}-export const getSessionRecordingPlaylistsListUrl = (projectId: string,params?: SessionRecordingPlaylistsListParams@@ -329,6 +309,26 @@ export const sessionRecordingsDestroy = async (projectId: string, id: string, op})}+export const getCreateSessionSummariesIndividuallyUrl = (projectId: string) => {+ return `/api/projects/${projectId}/session_summaries/create_session_summaries_individually/`+}++/**+ * Generate AI individual summary for each session, without grouping.+ */+export const createSessionSummariesIndividually = async (+ projectId: string,+ sessionSummariesApi: SessionSummariesApi,+ options?: RequestInit+): Promise<SessionSummariesApi> => {+ return apiMutator<SessionSummariesApi>(getCreateSessionSummariesIndividuallyUrl(projectId), {+ ...options,+ method: 'POST',+ headers: { 'Content-Type': 'application/json', ...options?.headers },+ body: JSON.stringify(sessionSummariesApi),+ })+}+export const getSingleSessionSummariesListUrl = (projectId: string, params?: SingleSessionSummariesListParams) => {const normalizedParams = new URLSearchParams()diff --git a/products/replay/frontend/generated/api.zod.ts b/products/replay/frontend/generated/api.zod.tsindex 10141ceeaeaf..ff22bf1e2c1e 100644--- a/products/replay/frontend/generated/api.zod.ts+++ b/products/replay/frontend/generated/api.zod.ts@@ -9,26 +9,6 @@*/import * as zod from 'zod'-/**- * Generate AI individual summary for each session, without grouping.- */-export const createSessionSummariesIndividuallyBodySessionIdsMax = 300--export const createSessionSummariesIndividuallyBodyFocusAreaMax = 500--export const CreateSessionSummariesIndividuallyBody = /* @__PURE__ */ zod.object({- session_ids: zod- .array(zod.string())- .min(1)- .max(createSessionSummariesIndividuallyBodySessionIdsMax)- .describe('List of session IDs to summarize (max 300)'),- focus_area: zod- .string()- .max(createSessionSummariesIndividuallyBodyFocusAreaMax)- .optional()- .describe('Optional focus area for the summarization'),-})-export const sessionRecordingPlaylistsCreateBodyNameMax = 400export const sessionRecordingPlaylistsCreateBodyDerivedNameMax = 400@@ -196,3 +176,23 @@ export const SessionRecordingsPartialUpdateBody = /* @__PURE__ */ zod.object({}).optional(),})++/**+ * Generate AI individual summary for each session, without grouping.+ */+export const createSessionSummariesIndividuallyBodySessionIdsMax = 300++export const createSessionSummariesIndividuallyBodyFocusAreaMax = 500++export const CreateSessionSummariesIndividuallyBody = /* @__PURE__ */ zod.object({+ session_ids: zod+ .array(zod.string())+ .min(1)+ .max(createSessionSummariesIndividuallyBodySessionIdsMax)+ .describe('List of session IDs to summarize (max 300)'),+ focus_area: zod+ .string()+ .max(createSessionSummariesIndividuallyBodyFocusAreaMax)+ .optional()+ .describe('Optional focus area for the summarization'),+})diff --git a/products/session_summaries/frontend/generated/api.ts b/products/session_summaries/frontend/generated/api.tsindex 59e577fd3ca7..a4ccc502aa0b 100644--- a/products/session_summaries/frontend/generated/api.ts+++ b/products/session_summaries/frontend/generated/api.ts@@ -11,7 +11,7 @@ import { apiMutator } from '../../../../frontend/src/lib/api-orval-mutator'import type { PatchedSessionSummariesConfigApi, SessionSummariesApi, SessionSummariesConfigApi } from './api.schemas'export const getRetrieveSessionSummariesConfigUrl = (projectId: string) => {- return `/api/environments/${projectId}/session_summaries/config/`+ return `/api/projects/${projectId}/session_summaries/config/`}/**@@ -28,7 +28,7 @@ export const retrieveSessionSummariesConfig = async (}export const getUpdateSessionSummariesConfigUrl = (projectId: string) => {- return `/api/environments/${projectId}/session_summaries/config/`+ return `/api/projects/${projectId}/session_summaries/config/`}/**@@ -48,7 +48,7 @@ export const updateSessionSummariesConfig = async (}export const getCreateSessionSummariesUrl = (projectId: string) => {- return `/api/environments/${projectId}/session_summaries/create_session_summaries/`+ return `/api/projects/${projectId}/session_summaries/create_session_summaries/`}/**diff --git a/products/subscriptions/frontend/generated/api.schemas.ts b/products/subscriptions/frontend/generated/api.schemas.tsindex d28a3db4b649..2e2f2541feb4 100644--- a/products/subscriptions/frontend/generated/api.schemas.ts+++ b/products/subscriptions/frontend/generated/api.schemas.ts@@ -7,85 +7,6 @@* PostHog API - generated* OpenAPI spec version: 1.0.0*/-/**- * * `starting` - Starting- * * `completed` - Completed- * * `failed` - Failed- * * `skipped` - Skipped- */-export type SubscriptionDeliveryStatusEnumApi =- (typeof SubscriptionDeliveryStatusEnumApi)[keyof typeof SubscriptionDeliveryStatusEnumApi]--export const SubscriptionDeliveryStatusEnumApi = {- Starting: 'starting',- Completed: 'completed',- Failed: 'failed',- Skipped: 'skipped',-} as const--export interface SubscriptionDeliveryApi {- /** Primary key for this delivery row. */- readonly id: string- /** Parent subscription id. */- readonly subscription: number- /** Temporal workflow id for this delivery run. */- readonly temporal_workflow_id: string- /** Dedupes activity retries for the same logical run. */- readonly idempotency_key: string- /** Why the run started (e.g. scheduled, manual, target_change). */- readonly trigger_type: string- /**- * Planned send time when applicable.- * @nullable- */- readonly scheduled_at: string | null- /** Channel snapshot at send time (email or slack). */- readonly target_type: string- /** Destination snapshot at send time (emails, channel id, URL). */- readonly target_value: string- /**- * ExportedAsset ids generated for this send.- * @items.minimum -2147483648- * @items.maximum 2147483647- */- readonly exported_asset_ids: readonly number[]- /** Snapshot at send time: dashboard metadata, total_insight_count, and per-exported-insight entries (id, short_id, name, query_hash, cache_key, query_results, optional query_error). */- readonly content_snapshot: unknown- /** Per-destination outcomes; items use status success, failed, or partial. */- readonly recipient_results: unknown- /** Overall run status: starting, completed, failed, or skipped.- *- * * `starting` - Starting- * * `completed` - Completed- * * `failed` - Failed- * * `skipped` - Skipped */- readonly status: SubscriptionDeliveryStatusEnumApi- /** Top-level failure payload when status is failed, if any. */- readonly error: unknown- /** When the delivery row was created. */- readonly created_at: string- /** Last ORM update to this row. */- readonly last_updated_at: string- /**- * When the run finished, if applicable.- * @nullable- */- readonly finished_at: string | null- /**- * AI-generated summary included in this delivery, when one was produced.- * @nullable- */- readonly change_summary: string | null-}--export interface PaginatedSubscriptionDeliveryListApi {- /** @nullable */- next?: string | null- /** @nullable */- previous?: string | null- results: SubscriptionDeliveryApi[]-}-/*** * `insight` - Insight* * `dashboard` - Dashboard@@ -460,26 +381,84 @@ export interface PatchedSubscriptionApi {summary_prompt_guide?: string}-export type SubscriptionsDeliveriesListParams = {+/**+ * * `starting` - Starting+ * * `completed` - Completed+ * * `failed` - Failed+ * * `skipped` - Skipped+ */+export type SubscriptionDeliveryStatusEnumApi =+ (typeof SubscriptionDeliveryStatusEnumApi)[keyof typeof SubscriptionDeliveryStatusEnumApi]++export const SubscriptionDeliveryStatusEnumApi = {+ Starting: 'starting',+ Completed: 'completed',+ Failed: 'failed',+ Skipped: 'skipped',+} as const++export interface SubscriptionDeliveryApi {+ /** Primary key for this delivery row. */+ readonly id: string+ /** Parent subscription id. */+ readonly subscription: number+ /** Temporal workflow id for this delivery run. */+ readonly temporal_workflow_id: string+ /** Dedupes activity retries for the same logical run. */+ readonly idempotency_key: string+ /** Why the run started (e.g. scheduled, manual, target_change). */+ readonly trigger_type: string/**- * The pagination cursor value.+ * Planned send time when applicable.+ * @nullable*/- cursor?: string+ readonly scheduled_at: string | null+ /** Channel snapshot at send time (email or slack). */+ readonly target_type: string+ /** Destination snapshot at send time (emails, channel id, URL). */+ readonly target_value: string/**- * Return only deliveries in this run status (starting, completed, failed, or skipped).+ * ExportedAsset ids generated for this send.+ * @items.minimum -2147483648+ * @items.maximum 2147483647*/- status?: SubscriptionsDeliveriesListStatus+ readonly exported_asset_ids: readonly number[]+ /** Snapshot at send time: dashboard metadata, total_insight_count, and per-exported-insight entries (id, short_id, name, query_hash, cache_key, query_results, optional query_error). */+ readonly content_snapshot: unknown+ /** Per-destination outcomes; items use status success, failed, or partial. */+ readonly recipient_results: unknown+ /** Overall run status: starting, completed, failed, or skipped.+ *+ * * `starting` - Starting+ * * `completed` - Completed+ * * `failed` - Failed+ * * `skipped` - Skipped */+ readonly status: SubscriptionDeliveryStatusEnumApi+ /** Top-level failure payload when status is failed, if any. */+ readonly error: unknown+ /** When the delivery row was created. */+ readonly created_at: string+ /** Last ORM update to this row. */+ readonly last_updated_at: string+ /**+ * When the run finished, if applicable.+ * @nullable+ */+ readonly finished_at: string | null+ /**+ * AI-generated summary included in this delivery, when one was produced.+ * @nullable+ */+ readonly change_summary: string | null}-export type SubscriptionsDeliveriesListStatus =- (typeof SubscriptionsDeliveriesListStatus)[keyof typeof SubscriptionsDeliveriesListStatus]--export const SubscriptionsDeliveriesListStatus = {- Completed: 'completed',- Failed: 'failed',- Skipped: 'skipped',- Starting: 'starting',-} as const+export interface PaginatedSubscriptionDeliveryListApi {+ /** @nullable */+ next?: string | null+ /** @nullable */+ previous?: string | null+ results: SubscriptionDeliveryApi[]+}export type SubscriptionsListParams = {/**@@ -536,6 +515,27 @@ export const SubscriptionsListTargetType = {Slack: 'slack',} as const+export type SubscriptionsDeliveriesListParams = {+ /**+ * The pagination cursor value.+ */+ cursor?: string+ /**+ * Return only deliveries in this run status (starting, completed, failed, or skipped).+ */+ status?: SubscriptionsDeliveriesListStatus+}++export type SubscriptionsDeliveriesListStatus =+ (typeof SubscriptionsDeliveriesListStatus)[keyof typeof SubscriptionsDeliveriesListStatus]++export const SubscriptionsDeliveriesListStatus = {+ Completed: 'completed',+ Failed: 'failed',+ Skipped: 'skipped',+ Starting: 'starting',+} as const+export type SubscriptionsSummaryQuotaRetrieve200 = {active_count: number/** @nullable */diff --git a/products/subscriptions/frontend/generated/api.ts b/products/subscriptions/frontend/generated/api.tsindex a60e4934752e..88382323191d 100644--- a/products/subscriptions/frontend/generated/api.ts+++ b/products/subscriptions/frontend/generated/api.ts@@ -36,65 +36,6 @@ type NonReadonly<T> = [T] extends [UnionToIntersection<T>]}: DistributeReadOnlyOverUnions<T>-export const getSubscriptionsDeliveriesListUrl = (- projectId: string,- subscriptionId: number,- params?: SubscriptionsDeliveriesListParams-) => {- const normalizedParams = new URLSearchParams()-- Object.entries(params || {}).forEach(([key, value]) => {- if (value !== undefined) {- normalizedParams.append(key, value === null ? 'null' : String(value))- }- })-- const stringifiedParams = normalizedParams.toString()-- return stringifiedParams.length > 0- ? `/api/environments/${projectId}/subscriptions/${subscriptionId}/deliveries/?${stringifiedParams}`- : `/api/environments/${projectId}/subscriptions/${subscriptionId}/deliveries/`-}--/**- * Paginated delivery history for a subscription. Requires premium subscriptions.- * @summary List subscription deliveries- */-export const subscriptionsDeliveriesList = async (- projectId: string,- subscriptionId: number,- params?: SubscriptionsDeliveriesListParams,- options?: RequestInit-): Promise<PaginatedSubscriptionDeliveryListApi> => {- return apiMutator<PaginatedSubscriptionDeliveryListApi>(- getSubscriptionsDeliveriesListUrl(projectId, subscriptionId, params),- {- ...options,- method: 'GET',- }- )-}--export const getSubscriptionsDeliveriesRetrieveUrl = (projectId: string, subscriptionId: number, id: string) => {- return `/api/environments/${projectId}/subscriptions/${subscriptionId}/deliveries/${id}/`-}--/**- * Fetch one delivery row by id.- * @summary Retrieve subscription delivery- */-export const subscriptionsDeliveriesRetrieve = async (- projectId: string,- subscriptionId: number,- id: string,- options?: RequestInit-): Promise<SubscriptionDeliveryApi> => {- return apiMutator<SubscriptionDeliveryApi>(getSubscriptionsDeliveriesRetrieveUrl(projectId, subscriptionId, id), {- ...options,- method: 'GET',- })-}-export const getSubscriptionsListUrl = (projectId: string, params?: SubscriptionsListParams) => {const normalizedParams = new URLSearchParams()@@ -219,6 +160,65 @@ export const subscriptionsTestDeliveryCreate = async (})}+export const getSubscriptionsDeliveriesListUrl = (+ projectId: string,+ subscriptionId: number,+ params?: SubscriptionsDeliveriesListParams+) => {+ const normalizedParams = new URLSearchParams()++ Object.entries(params || {}).forEach(([key, value]) => {+ if (value !== undefined) {+ normalizedParams.append(key, value === null ? 'null' : String(value))+ }+ })++ const stringifiedParams = normalizedParams.toString()++ return stringifiedParams.length > 0+ ? `/api/projects/${projectId}/subscriptions/${subscriptionId}/deliveries/?${stringifiedParams}`+ : `/api/projects/${projectId}/subscriptions/${subscriptionId}/deliveries/`+}++/**+ * Paginated delivery history for a subscription. Requires premium subscriptions.+ * @summary List subscription deliveries+ */+export const subscriptionsDeliveriesList = async (+ projectId: string,+ subscriptionId: number,+ params?: SubscriptionsDeliveriesListParams,+ options?: RequestInit+): Promise<PaginatedSubscriptionDeliveryListApi> => {+ return apiMutator<PaginatedSubscriptionDeliveryListApi>(+ getSubscriptionsDeliveriesListUrl(projectId, subscriptionId, params),+ {+ ...options,+ method: 'GET',+ }+ )+}++export const getSubscriptionsDeliveriesRetrieveUrl = (projectId: string, subscriptionId: number, id: string) => {+ return `/api/projects/${projectId}/subscriptions/${subscriptionId}/deliveries/${id}/`+}++/**+ * Fetch one delivery row by id.+ * @summary Retrieve subscription delivery+ */+export const subscriptionsDeliveriesRetrieve = async (+ projectId: string,+ subscriptionId: number,+ id: string,+ options?: RequestInit+): Promise<SubscriptionDeliveryApi> => {+ return apiMutator<SubscriptionDeliveryApi>(getSubscriptionsDeliveriesRetrieveUrl(projectId, subscriptionId, id), {+ ...options,+ method: 'GET',+ })+}+export const getSubscriptionsSummaryQuotaRetrieveUrl = (projectId: string) => {return `/api/projects/${projectId}/subscriptions/summary_quota/`}diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 0474e340f699..1174f961872a 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -44326,6 +44326,17 @@ export namespace Schemas {offset?: number;};+ export type EnvironmentsConversationsListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };+export type EnvironmentsConversationsViewsListParams = {/*** Number of results to return per page.@@ -44348,6 +44359,17 @@ export namespace Schemas {offset?: number;};+ export type EnvironmentsCoreMemoryListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };+export type EnvironmentsCustomerJourneysListParams = {/*** Number of results to return per page.@@ -47290,6 +47312,62 @@ export namespace Schemas {offset?: number;};+ export type EnvironmentsMaxHandsFreeTokenCreate200 = { [key: string]: unknown };++ export type EnvironmentsMaxToolsCreateAndQueryInsightCreate200 = { [key: string]: unknown };++ export type EnvironmentsMcpAnalyticsFeedbackListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };++ export type EnvironmentsMcpAnalyticsMissingCapabilitiesListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };++ export type EnvironmentsMcpAnalyticsSessionsListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ /**+ * Sort column. Allowed: session_id, session_start, session_end, duration_seconds, tool_call_count, mcp_client_name, distinct_id. Prefix with '-' for descending. Defaults to '-session_start' (newest sessions first).+ */+ order_by?: string;+ /**+ * Case-insensitive substring filter matched against session_id, distinct_id, mcp_client_name, and tools_used.+ */+ search?: string;+ };++ export type EnvironmentsMcpAnalyticsSessionsToolCallsParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };+export type EnvironmentsMcpServerInstallationsListParams = {/*** Number of results to return per page.@@ -47782,6 +47860,28 @@ export namespace Schemas {offset?: number;};+ export type EnvironmentsPropertyAccessControlsRetrieveParams = {+ /**+ * The property definition ID to fetch access control rules for.+ */+ property_definition_id: string;+ };++ export type EnvironmentsPropertyAccessControlsDestroyParams = {+ /**+ * The organization member UUID whose override should be deleted.+ */+ organization_member?: string;+ /**+ * The property definition ID the rule applies to.+ */+ property_definition_id: string;+ /**+ * The role UUID whose override should be deleted.+ */+ role?: string;+ };+export type EnvironmentsQueryLogRetrieve200 = { [key: string]: unknown };export type EnvironmentsQueryCheckAuthForAsyncCreate200 = { [key: string]: unknown };@@ -47925,6 +48025,27 @@ export namespace Schemas {Slack: 'slack',} as const;+ export type EnvironmentsSubscriptionsDeliveriesListParams = {+ /**+ * The pagination cursor value.+ */+ cursor?: string;+ /**+ * Return only deliveries in this run status (starting, completed, failed, or skipped).+ */+ status?: EnvironmentsSubscriptionsDeliveriesListStatus;+ };++ export type EnvironmentsSubscriptionsDeliveriesListStatus = typeof EnvironmentsSubscriptionsDeliveriesListStatus[keyof typeof EnvironmentsSubscriptionsDeliveriesListStatus];+++ export const EnvironmentsSubscriptionsDeliveriesListStatus = {+ Completed: 'completed',+ Failed: 'failed',+ Skipped: 'skipped',+ Starting: 'starting',+ } as const;+export type EnvironmentsSubscriptionsSummaryQuotaRetrieve200 = {active_count: number;/** @nullable */@@ -48325,127 +48446,6 @@ export namespace Schemas {export type EnvironmentsWebVitalsRetrieve200 = { [key: string]: unknown };- export type ConversationsListParams = {- /**- * Number of results to return per page.- */- limit?: number;- /**- * The initial index from which to return the results.- */- offset?: number;- };-- export type CoreMemoryListParams = {- /**- * Number of results to return per page.- */- limit?: number;- /**- * The initial index from which to return the results.- */- offset?: number;- };-- export type MaxHandsFreeTokenCreate200 = { [key: string]: unknown };-- export type MaxToolsCreateAndQueryInsightCreate200 = { [key: string]: unknown };-- export type McpAnalyticsFeedbackListParams = {- /**- * Number of results to return per page.- */- limit?: number;- /**- * The initial index from which to return the results.- */- offset?: number;- };-- export type McpAnalyticsMissingCapabilitiesListParams = {- /**- * Number of results to return per page.- */- limit?: number;- /**- * The initial index from which to return the results.- */- offset?: number;- };-- export type McpAnalyticsSessionsListParams = {- /**- * Number of results to return per page.- */- limit?: number;- /**- * The initial index from which to return the results.- */- offset?: number;- /**- * Sort column. Allowed: session_id, session_start, session_end, duration_seconds, tool_call_count, mcp_client_name, distinct_id. Prefix with '-' for descending. Defaults to '-session_start' (newest sessions first).- */- order_by?: string;- /**- * Case-insensitive substring filter matched against session_id, distinct_id, mcp_client_name, and tools_used.- */- search?: string;- };-- export type McpAnalyticsSessionsToolCallsParams = {- /**- * Number of results to return per page.- */- limit?: number;- /**- * The initial index from which to return the results.- */- offset?: number;- };-- export type PropertyAccessControlsRetrieveParams = {- /**- * The property definition ID to fetch access control rules for.- */- property_definition_id: string;- };-- export type PropertyAccessControlsDestroyParams = {- /**- * The organization member UUID whose override should be deleted.- */- organization_member?: string;- /**- * The property definition ID the rule applies to.- */- property_definition_id: string;- /**- * The role UUID whose override should be deleted.- */- role?: string;- };-- export type SubscriptionsDeliveriesListParams = {- /**- * The pagination cursor value.- */- cursor?: string;- /**- * Return only deliveries in this run status (starting, completed, failed, or skipped).- */- status?: SubscriptionsDeliveriesListStatus;- };-- export type SubscriptionsDeliveriesListStatus = typeof SubscriptionsDeliveriesListStatus[keyof typeof SubscriptionsDeliveriesListStatus];--- export const SubscriptionsDeliveriesListStatus = {- Completed: 'completed',- Failed: 'failed',- Skipped: 'skipped',- Starting: 'starting',- } as const;-export type LlmAnalyticsPersonalSpendListParams = {/*** Start of the spend window. Accepts absolute dates (`2026-04-23`) or relative strings (`-7d`, `-1m`, etc.) — same parser used elsewhere in PostHog. Defaults to `-30d`. The window between `date_from` and `date_to` cannot exceed 90 days.@@ -49633,6 +49633,17 @@ export namespace Schemas {Task: 'task',} as const;+ export type ConversationsListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };+export type ConversationsTicketsListParams = {/*** Filter by assignee. Use `unassigned` for tickets with no assignee, `user:<user_id>` for a specific user, or `role:<role_uuid>` for a role.@@ -49767,6 +49778,17 @@ export namespace Schemas {offset?: number;};+ export type CoreMemoryListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };+export type CustomerJourneysListParams = {/*** Number of results to return per page.@@ -53270,6 +53292,62 @@ export namespace Schemas {offset?: number;};+ export type MaxHandsFreeTokenCreate200 = { [key: string]: unknown };++ export type MaxToolsCreateAndQueryInsightCreate200 = { [key: string]: unknown };++ export type McpAnalyticsFeedbackListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };++ export type McpAnalyticsMissingCapabilitiesListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };++ export type McpAnalyticsSessionsListParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ /**+ * Sort column. Allowed: session_id, session_start, session_end, duration_seconds, tool_call_count, mcp_client_name, distinct_id. Prefix with '-' for descending. Defaults to '-session_start' (newest sessions first).+ */+ order_by?: string;+ /**+ * Case-insensitive substring filter matched against session_id, distinct_id, mcp_client_name, and tools_used.+ */+ search?: string;+ };++ export type McpAnalyticsSessionsToolCallsParams = {+ /**+ * Number of results to return per page.+ */+ limit?: number;+ /**+ * The initial index from which to return the results.+ */+ offset?: number;+ };+export type McpServerInstallationsListParams = {/*** Number of results to return per page.@@ -53821,6 +53899,28 @@ export namespace Schemas {offset?: number;};+ export type PropertyAccessControlsRetrieveParams = {+ /**+ * The property definition ID to fetch access control rules for.+ */+ property_definition_id: string;+ };++ export type PropertyAccessControlsDestroyParams = {+ /**+ * The organization member UUID whose override should be deleted.+ */+ organization_member?: string;+ /**+ * The property definition ID the rule applies to.+ */+ property_definition_id: string;+ /**+ * The role UUID whose override should be deleted.+ */+ role?: string;+ };+export type PropertyDefinitionsListParams = {/*** If sent, response value will have `is_seen_on_filtered_events` populated. JSON-encoded@@ -54299,6 +54399,27 @@ export namespace Schemas {Slack: 'slack',} as const;+ export type SubscriptionsDeliveriesListParams = {+ /**+ * The pagination cursor value.+ */+ cursor?: string;+ /**+ * Return only deliveries in this run status (starting, completed, failed, or skipped).+ */+ status?: SubscriptionsDeliveriesListStatus;+ };++ export type SubscriptionsDeliveriesListStatus = typeof SubscriptionsDeliveriesListStatus[keyof typeof SubscriptionsDeliveriesListStatus];+++ export const SubscriptionsDeliveriesListStatus = {+ Completed: 'completed',+ Failed: 'failed',+ Skipped: 'skipped',+ Starting: 'starting',+ } as const;+export type SubscriptionsSummaryQuotaRetrieve200 = {active_count: number;/** @nullable */diff --git a/services/mcp/src/generated/subscriptions/api.ts b/services/mcp/src/generated/subscriptions/api.tsindex 0d33644465bb..132efb34d3f8 100644--- a/services/mcp/src/generated/subscriptions/api.ts+++ b/services/mcp/src/generated/subscriptions/api.ts@@ -8,41 +8,6 @@*/import * as zod from 'zod'-/**- * Paginated delivery history for a subscription. Requires premium subscriptions.- * @summary List subscription deliveries- */-export const SubscriptionsDeliveriesListParams = /* @__PURE__ */ zod.object({- project_id: zod- .string()- .describe(- "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."- ),- subscription_id: zod.number(),-})--export const SubscriptionsDeliveriesListQueryParams = /* @__PURE__ */ zod.object({- cursor: zod.string().optional().describe('The pagination cursor value.'),- status: zod- .enum(['completed', 'failed', 'skipped', 'starting'])- .optional()- .describe('Return only deliveries in this run status (starting, completed, failed, or skipped).'),-})--/**- * Fetch one delivery row by id.- * @summary Retrieve subscription delivery- */-export const SubscriptionsDeliveriesRetrieveParams = /* @__PURE__ */ zod.object({- id: zod.string().describe('A UUID string identifying this subscription delivery.'),- project_id: zod- .string()- .describe(- "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."- ),- subscription_id: zod.number(),-})-export const SubscriptionsListParams = /* @__PURE__ */ zod.object({project_id: zod.string()@@ -347,3 +312,38 @@ export const SubscriptionsTestDeliveryCreateParams = /* @__PURE__ */ zod.object("Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."),})++/**+ * Paginated delivery history for a subscription. Requires premium subscriptions.+ * @summary List subscription deliveries+ */+export const SubscriptionsDeliveriesListParams = /* @__PURE__ */ zod.object({+ project_id: zod+ .string()+ .describe(+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."+ ),+ subscription_id: zod.number(),+})++export const SubscriptionsDeliveriesListQueryParams = /* @__PURE__ */ zod.object({+ cursor: zod.string().optional().describe('The pagination cursor value.'),+ status: zod+ .enum(['completed', 'failed', 'skipped', 'starting'])+ .optional()+ .describe('Return only deliveries in this run status (starting, completed, failed, or skipped).'),+})++/**+ * Fetch one delivery row by id.+ * @summary Retrieve subscription delivery+ */+export const SubscriptionsDeliveriesRetrieveParams = /* @__PURE__ */ zod.object({+ id: zod.string().describe('A UUID string identifying this subscription delivery.'),+ project_id: zod+ .string()+ .describe(+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."+ ),+ subscription_id: zod.number(),+})diff --git a/services/mcp/src/tools/generated/subscriptions.ts b/services/mcp/src/tools/generated/subscriptions.tsindex 2987315d51cf..6fe38fc765b5 100644--- a/services/mcp/src/tools/generated/subscriptions.ts+++ b/services/mcp/src/tools/generated/subscriptions.ts@@ -122,7 +122,7 @@ const subscriptionsDeliveriesList = (): ToolBase<const projectId = await context.stateManager.getProjectId()const result = await context.api.request<Schemas.PaginatedSubscriptionDeliveryList>({method: 'GET',- path: `/api/environments/${encodeURIComponent(String(projectId))}/subscriptions/${encodeURIComponent(String(params.subscription_id))}/deliveries/`,+ path: `/api/projects/${encodeURIComponent(String(projectId))}/subscriptions/${encodeURIComponent(String(params.subscription_id))}/deliveries/`,query: {cursor: params.cursor,status: params.status,@@ -150,7 +150,7 @@ const subscriptionsDeliveriesRetrieve = (): ToolBase<const projectId = await context.stateManager.getProjectId()const result = await context.api.request<Schemas.SubscriptionDelivery>({method: 'GET',- path: `/api/environments/${encodeURIComponent(String(projectId))}/subscriptions/${encodeURIComponent(String(params.subscription_id))}/deliveries/${encodeURIComponent(String(params.id))}/`,+ path: `/api/projects/${encodeURIComponent(String(projectId))}/subscriptions/${encodeURIComponent(String(params.subscription_id))}/deliveries/${encodeURIComponent(String(params.id))}/`,})const filtered = omitResponseFields(result, ['content_snapshot', 'recipient_results', 'error']) as typeof resultreturn filtered