: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
chore(error-tracking): declare the schemas the issues and rules UI rely on (#104257)
Julian Bez4148aa1dccf9
diff --git a/posthog/settings/web.py b/posthog/settings/web.pyindex 85545ee061fd..c183db0c470e 100644--- a/posthog/settings/web.py+++ b/posthog/settings/web.py@@ -609,6 +609,9 @@ SPECTACULAR_SETTINGS = {"ShiftBandKindEnum": ["inserted", "deleted"],"ExperimentStatusEnum": ["draft", "running", "paused", "exposure_frozen", "stopped"],"ErrorTrackingIssueStatusEnum": ["archived", "active", "resolved", "pending_release", "suppressed", "all"],+ # The subset a client may write. Shared by the single-issue and bulk write serializers,+ # and `status` is too generic a field name for drf-spectacular to name a third set on it.+ "ErrorTrackingIssueWritableStatusEnum": ["active", "resolved", "suppressed"],# ResolvedAccess types source and source_subject as literals on a dataclass, so no Choices# class carries them. The lists are derived from those literals."ResolvedAccessSourceEnum": "products.access_control.backend.facade.enums.RESOLVED_ACCESS_SOURCE_CHOICES",diff --git a/products/error_tracking/backend/presentation/views/assignment_rules.py b/products/error_tracking/backend/presentation/views/assignment_rules.pyindex eb4c6a223caa..0f9c8bf9c6e5 100644--- a/products/error_tracking/backend/presentation/views/assignment_rules.py+++ b/products/error_tracking/backend/presentation/views/assignment_rules.py@@ -2,7 +2,7 @@ from uuid import UUIDimport structlogimport posthoganalytics-from drf_spectacular.utils import OpenApiResponse, extend_schema_field+from drf_spectacular.utils import OpenApiResponse, extend_schema, extend_schema_fieldfrom pydantic import ValidationError as PydanticValidationErrorfrom rest_framework import serializers, status, viewsetsfrom rest_framework.exceptions import NotFound, ValidationError@@ -127,6 +127,13 @@ class ErrorTrackingAssignmentRuleSerializer(serializers.Serializer):return {"type": obj.assignee.type, "id": obj.assignee.id}+class ErrorTrackingAssignmentRuleReorderRequestSerializer(serializers.Serializer):+ orders = serializers.DictField(+ child=serializers.IntegerField(),+ help_text="Mapping from assignment rule UUID to its new evaluation order.",+ )++class ErrorTrackingAssignmentRuleViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):scope_object = "error_tracking"scope_object_write_actions = ["create", "update", "partial_update", "destroy", "reorder"]@@ -209,6 +216,7 @@ class ErrorTrackingAssignmentRuleViewSet(TeamAndOrgViewSetMixin, viewsets.Generi)return Response(self.get_serializer(rule).data, status=status.HTTP_201_CREATED)+ @extend_schema(request=ErrorTrackingAssignmentRuleReorderRequestSerializer, responses={204: None})@action(methods=["PATCH"], detail=False)def reorder(self, request, **kwargs) -> Response:orders: dict[str, int] = request.data.get("orders", {})diff --git a/products/error_tracking/backend/presentation/views/bypass_rules.py b/products/error_tracking/backend/presentation/views/bypass_rules.pyindex 6586a292b964..e45a9051b4a1 100644--- a/products/error_tracking/backend/presentation/views/bypass_rules.py+++ b/products/error_tracking/backend/presentation/views/bypass_rules.py@@ -1,6 +1,6 @@import structlogimport posthoganalytics-from drf_spectacular.utils import OpenApiResponse, extend_schema_field+from drf_spectacular.utils import OpenApiResponse, extend_schema, extend_schema_fieldfrom pydantic import ValidationError as PydanticValidationErrorfrom rest_framework import serializers, status, viewsetsfrom rest_framework.exceptions import NotFound, ValidationError@@ -81,6 +81,13 @@ class ErrorTrackingBypassRuleUpdateRequestSerializer(serializers.Serializer):)+class ErrorTrackingBypassRuleReorderRequestSerializer(serializers.Serializer):+ orders = serializers.DictField(+ child=serializers.IntegerField(),+ help_text="Mapping from bypass rule UUID to its new evaluation order.",+ )++class ErrorTrackingBypassRuleViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):scope_object = "error_tracking"scope_object_write_actions = ["create", "update", "partial_update", "destroy", "reorder"]@@ -158,6 +165,7 @@ class ErrorTrackingBypassRuleViewSet(TeamAndOrgViewSetMixin, viewsets.GenericVie)return Response(self.get_serializer(rule).data, status=status.HTTP_201_CREATED)+ @extend_schema(request=ErrorTrackingBypassRuleReorderRequestSerializer, responses={204: None})@action(methods=["PATCH"], detail=False)def reorder(self, request, **kwargs) -> Response:orders: dict[str, int] = request.data.get("orders", {})diff --git a/products/error_tracking/backend/presentation/views/fingerprints.py b/products/error_tracking/backend/presentation/views/fingerprints.pyindex cf2ff502ed98..4a1d1dcb588f 100644--- a/products/error_tracking/backend/presentation/views/fingerprints.py+++ b/products/error_tracking/backend/presentation/views/fingerprints.py@@ -25,6 +25,17 @@ class ErrorTrackingFingerprintViewSet(TeamAndOrgViewSetMixin, ForbidDestroyModelscope_object_write_actions: list[str] = []serializer_class = ErrorTrackingFingerprintSerializer+ @extend_schema(+ parameters=[+ OpenApiParameter(+ name="issue_id",+ type=OpenApiTypes.UUID,+ location=OpenApiParameter.QUERY,+ required=False,+ description="Return only the fingerprints of this issue.",+ )+ ]+ )def list(self, request, *args, **kwargs):issue_id: UUID | None = Noneissue_id_param = self.request.GET.get("issue_id")diff --git a/products/error_tracking/backend/presentation/views/grouping_rules.py b/products/error_tracking/backend/presentation/views/grouping_rules.pyindex 305838048bfe..b124b2b132de 100644--- a/products/error_tracking/backend/presentation/views/grouping_rules.py+++ b/products/error_tracking/backend/presentation/views/grouping_rules.py@@ -139,6 +139,13 @@ class ErrorTrackingGroupingRuleListResponseSerializer(serializers.Serializer):results = ErrorTrackingGroupingRuleSerializer(many=True)+class ErrorTrackingGroupingRuleReorderRequestSerializer(serializers.Serializer):+ orders = serializers.DictField(+ child=serializers.IntegerField(),+ help_text="Mapping from grouping rule UUID to its new evaluation order.",+ )++class ErrorTrackingGroupingRuleViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):scope_object = "error_tracking"scope_object_write_actions = ["create", "update", "partial_update", "destroy", "reorder"]@@ -219,6 +226,7 @@ class ErrorTrackingGroupingRuleViewSet(TeamAndOrgViewSetMixin, viewsets.GenericV)return Response(self.get_serializer(rule).data, status=status.HTTP_201_CREATED)+ @extend_schema(request=ErrorTrackingGroupingRuleReorderRequestSerializer, responses={204: None})@action(methods=["PATCH"], detail=False)def reorder(self, request, **kwargs) -> Response:orders: dict[str, int] = request.data.get("orders", {})diff --git a/products/error_tracking/backend/presentation/views/issues.py b/products/error_tracking/backend/presentation/views/issues.pyindex 5f27851b8903..83494974ea7b 100644--- a/products/error_tracking/backend/presentation/views/issues.py+++ b/products/error_tracking/backend/presentation/views/issues.py@@ -5,7 +5,8 @@ from django.http import JsonResponseimport structlogimport posthoganalytics-from drf_spectacular.utils import OpenApiResponse+from drf_spectacular.types import OpenApiTypes+from drf_spectacular.utils import OpenApiParameter, OpenApiResponsefrom rest_framework import request, serializers, status, viewsetsfrom rest_framework.exceptions import NotFound, ValidationErrorfrom rest_framework.response import Response@@ -157,6 +158,53 @@ class ErrorTrackingIssueWriteSerializer(serializers.Serializer):)+class ErrorTrackingIssueBulkRequestSerializer(serializers.Serializer):+ action = serializers.ChoiceField(+ choices=["set_status", "assign"],+ help_text="Which mutation to apply to every listed issue.",+ )+ ids = serializers.ListField(+ child=serializers.UUIDField(),+ allow_empty=False,+ help_text="IDs of the issues to update.",+ )+ status = serializers.ChoiceField(+ choices=WRITABLE_ISSUE_STATUSES,+ required=False,+ help_text="Status to set. Required when action is set_status.",+ )+ assignee = ErrorTrackingIssueAssigneeWriteSerializer(+ required=False,+ allow_null=True,+ help_text="Assignment target. Required when action is assign; null unassigns.",+ )+++class ErrorTrackingIssueCohortRequestSerializer(serializers.Serializer):+ cohortId = serializers.IntegerField(help_text="ID of the cohort to attach to the issue.")+++class ErrorTrackingIssueRedirectResponseSerializer(serializers.Serializer):+ issue_id = serializers.UUIDField(help_text="Issue the requested fingerprint now belongs to.")+++class ErrorTrackingIssueSuccessResponseSerializer(serializers.Serializer):+ success = serializers.BooleanField(help_text="Whether the update completed successfully.")+++class ErrorTrackingIssueExistsResponseSerializer(serializers.Serializer):+ exists = serializers.BooleanField(help_text="Whether the project has recorded any issue at all.")+++class ErrorTrackingIssueValueSerializer(serializers.Serializer):+ name = serializers.CharField(help_text="One distinct value of the requested property.")+++class ErrorTrackingIssueValuesResponseSerializer(serializers.Serializer):+ results = ErrorTrackingIssueValueSerializer(many=True, help_text="Distinct values, for the taxonomic filter.")+ refreshing = serializers.BooleanField(help_text="Always false. Kept for the taxonomic filter's shared shape.")++class ErrorTrackingIssueMergeRequestSerializer(serializers.Serializer):ids = serializers.ListField(child=serializers.UUIDField(),@@ -224,6 +272,24 @@ class ErrorTrackingIssueViewSet(TeamAndOrgViewSetMixin, ForbidDestroyModel, viewlambda limit, offset: facade_api.list_issues_detailed(self.team.id, limit=limit, offset=offset),)+ @extend_schema(+ parameters=[+ OpenApiParameter(+ name="fingerprint",+ type=OpenApiTypes.STR,+ location=OpenApiParameter.QUERY,+ required=False,+ description="Resolve the issue that currently owns this fingerprint first.",+ )+ ],+ responses={+ 200: ErrorTrackingIssueReadSerializer,+ 308: OpenApiResponse(+ response=ErrorTrackingIssueRedirectResponseSerializer,+ description="The fingerprint belongs to a different issue now.",+ ),+ },+ )def retrieve(self, request: request.Request, *args: object, **kwargs: object) -> Response | JsonResponse:issue_id = UUID(str(kwargs["pk"]))fingerprint = self.request.GET.get("fingerprint")@@ -263,6 +329,7 @@ class ErrorTrackingIssueViewSet(TeamAndOrgViewSetMixin, ForbidDestroyModel, viewraise NotFound("Issue not found")return Response(ErrorTrackingIssueReadSerializer(issue).data)+ @extend_schema(responses={200: ErrorTrackingIssueExistsResponseSerializer})@action(methods=["GET"], detail=False)def exists(self, request: request.Request, **kwargs: object) -> Response:return Response({"exists": facade_api.issue_exists(self.team.id)})@@ -329,6 +396,10 @@ class ErrorTrackingIssueViewSet(TeamAndOrgViewSetMixin, ForbidDestroyModel, viewraise ValidationError(str(err))return Response({"success": True})+ @extend_schema(+ request=ErrorTrackingIssueCohortRequestSerializer,+ responses={200: ErrorTrackingIssueSuccessResponseSerializer},+ )@action(methods=["PUT"], detail=True)def cohort(self, request: request.Request, *args: object, pk: object = None, **kwargs: object) -> Response:cohort_id = request.data.get("cohortId", None)@@ -349,6 +420,25 @@ class ErrorTrackingIssueViewSet(TeamAndOrgViewSetMixin, ForbidDestroyModel, viewreturn Response({"success": True})+ @extend_schema(+ parameters=[+ OpenApiParameter(+ name="key",+ type=OpenApiTypes.STR,+ location=OpenApiParameter.QUERY,+ required=True,+ description="Issue property to list values for.",+ ),+ OpenApiParameter(+ name="value",+ type=OpenApiTypes.STR,+ location=OpenApiParameter.QUERY,+ required=False,+ description="Substring the returned values must contain.",+ ),+ ],+ responses={200: ErrorTrackingIssueValuesResponseSerializer},+ )@action(methods=["GET"], detail=False)def values(self, request: request.Request, **kwargs: object) -> Response:value = request.GET.get("value", None)@@ -356,6 +446,10 @@ class ErrorTrackingIssueViewSet(TeamAndOrgViewSetMixin, ForbidDestroyModel, viewissue_values = facade_api.get_issue_values(self.team.id, key, value)return Response({"results": [{"name": value} for value in issue_values], "refreshing": False})+ @extend_schema(+ request=ErrorTrackingIssueBulkRequestSerializer,+ responses={200: ErrorTrackingIssueSuccessResponseSerializer},+ )@action(methods=["POST"], detail=False)def bulk(self, request: request.Request, **kwargs: object) -> Response:try:diff --git a/products/error_tracking/backend/presentation/views/recommendations.py b/products/error_tracking/backend/presentation/views/recommendations.pyindex 5a22cfbdf249..bc0d4b98b8d2 100644--- a/products/error_tracking/backend/presentation/views/recommendations.py+++ b/products/error_tracking/backend/presentation/views/recommendations.py@@ -1,4 +1,5 @@-from drf_spectacular.utils import extend_schema+from drf_spectacular.types import OpenApiTypes+from drf_spectacular.utils import OpenApiParameter, extend_schemafrom rest_framework import serializers, status, viewsetsfrom rest_framework.decorators import actionfrom rest_framework.exceptions import NotFound@@ -31,6 +32,17 @@ class ErrorTrackingRecommendationViewSet(TeamAndOrgViewSetMixin, viewsets.Generiscope_object_write_actions = ["refresh", "dismiss", "restore"]serializer_class = ErrorTrackingRecommendationSerializer+ @extend_schema(+ parameters=[+ OpenApiParameter(+ name="poll",+ type=OpenApiTypes.BOOL,+ location=OpenApiParameter.QUERY,+ required=False,+ description="True reads the current state without scheduling a refresh.",+ )+ ]+ )def list(self, request: Request, *args, **kwargs) -> Response:# When the frontend is polling for status updates we skip the kick# so each poll is a cheap read of the current state.@@ -43,7 +55,19 @@ class ErrorTrackingRecommendationViewSet(TeamAndOrgViewSetMixin, viewsets.Generireturn self.get_paginated_response(self.get_serializer(page, many=True).data)return Response(self.get_serializer(recommendations, many=True).data)- @extend_schema(request=None, responses=ErrorTrackingRecommendationSerializer)+ @extend_schema(+ request=None,+ responses=ErrorTrackingRecommendationSerializer,+ parameters=[+ OpenApiParameter(+ name="force",+ type=OpenApiTypes.BOOL,+ location=OpenApiParameter.QUERY,+ required=False,+ description="False skips the recompute when the current result is still fresh. Defaults to true.",+ )+ ],+ )@action(detail=True, methods=["post"])def refresh(self, request: Request, *args, pk=None, **kwargs) -> Response:force = request.query_params.get("force", "true").lower() != "false"diff --git a/products/error_tracking/backend/presentation/views/spike_detection_config.py b/products/error_tracking/backend/presentation/views/spike_detection_config.pyindex 621a9d74d1f9..b7c40fec70d3 100644--- a/products/error_tracking/backend/presentation/views/spike_detection_config.py+++ b/products/error_tracking/backend/presentation/views/spike_detection_config.py@@ -1,4 +1,4 @@-from drf_spectacular.utils import extend_schema+from drf_spectacular.utils import extend_schema, extend_schema_serializerfrom rest_framework import serializers, status, viewsetsfrom rest_framework.decorators import actionfrom rest_framework.response import Response@@ -8,6 +8,9 @@ from posthog.api.routing import TeamAndOrgViewSetMixinfrom products.error_tracking.backend.facade import api as error_tracking_api+# many=False: the read action is named `list` for routing but returns the project's single+# config. Without this drf-spectacular types the response as an array of configs.+@extend_schema_serializer(many=False)class ErrorTrackingSpikeDetectionConfigSerializer(serializers.Serializer):snooze_duration_minutes = serializers.IntegerField(min_value=1,diff --git a/products/error_tracking/backend/presentation/views/spike_events.py b/products/error_tracking/backend/presentation/views/spike_events.pyindex ce156048c3cd..e0cc19afb587 100644--- a/products/error_tracking/backend/presentation/views/spike_events.py+++ b/products/error_tracking/backend/presentation/views/spike_events.py@@ -1,3 +1,5 @@+from drf_spectacular.types import OpenApiTypes+from drf_spectacular.utils import OpenApiParameter, extend_schemafrom rest_framework import viewsetsfrom rest_framework_dataclasses.serializers import DataclassSerializer@@ -19,6 +21,38 @@ class ErrorTrackingSpikeEventViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViescope_object = "error_tracking"serializer_class = ErrorTrackingSpikeEventSerializer+ @extend_schema(+ parameters=[+ OpenApiParameter(+ name="issue_ids",+ type=OpenApiTypes.STR,+ location=OpenApiParameter.QUERY,+ required=False,+ description="Comma-separated issue UUIDs to include.",+ ),+ OpenApiParameter(+ name="date_from",+ type=OpenApiTypes.DATETIME,+ location=OpenApiParameter.QUERY,+ required=False,+ description="Include spikes detected at or after this time.",+ ),+ OpenApiParameter(+ name="date_to",+ type=OpenApiTypes.DATETIME,+ location=OpenApiParameter.QUERY,+ required=False,+ description="Include spikes detected at or before this time.",+ ),+ OpenApiParameter(+ name="order_by",+ type=OpenApiTypes.STR,+ location=OpenApiParameter.QUERY,+ required=False,+ description="Field to order by. Prefix with a hyphen for descending.",+ ),+ ]+ )def list(self, request, *args, **kwargs):issue_ids_param = request.query_params.get("issue_ids")issue_ids = [uid.strip() for uid in issue_ids_param.split(",") if uid.strip()] if issue_ids_param else Nonediff --git a/products/error_tracking/backend/presentation/views/suppression_rules.py b/products/error_tracking/backend/presentation/views/suppression_rules.pyindex 7a6a3aad9380..b9f9de53063d 100644--- a/products/error_tracking/backend/presentation/views/suppression_rules.py+++ b/products/error_tracking/backend/presentation/views/suppression_rules.py@@ -1,6 +1,6 @@import structlogimport posthoganalytics-from drf_spectacular.utils import OpenApiResponse, extend_schema_field+from drf_spectacular.utils import OpenApiResponse, extend_schema, extend_schema_fieldfrom pydantic import ValidationError as PydanticValidationErrorfrom rest_framework import serializers, status, viewsetsfrom rest_framework.exceptions import NotFound, ValidationError@@ -88,6 +88,13 @@ class ErrorTrackingSuppressionRuleUpdateRequestSerializer(serializers.Serializer)+class ErrorTrackingSuppressionRuleReorderRequestSerializer(serializers.Serializer):+ orders = serializers.DictField(+ child=serializers.IntegerField(),+ help_text="Mapping from suppression rule UUID to its new evaluation order.",+ )++class ErrorTrackingSuppressionRuleViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):scope_object = "error_tracking"scope_object_write_actions = ["create", "update", "partial_update", "destroy", "reorder"]@@ -172,6 +179,7 @@ class ErrorTrackingSuppressionRuleViewSet(TeamAndOrgViewSetMixin, viewsets.Gener)return Response(self.get_serializer(rule).data, status=status.HTTP_201_CREATED)+ @extend_schema(request=ErrorTrackingSuppressionRuleReorderRequestSerializer, responses={204: None})@action(methods=["PATCH"], detail=False)def reorder(self, request, **kwargs) -> Response:orders: dict[str, int] = request.data.get("orders", {})diff --git a/products/error_tracking/frontend/generated/api.schemas.ts b/products/error_tracking/frontend/generated/api.schemas.tsindex c2f8986f6f09..6227d07f4dac 100644--- a/products/error_tracking/frontend/generated/api.schemas.ts+++ b/products/error_tracking/frontend/generated/api.schemas.ts@@ -631,22 +631,13 @@ export interface PatchedErrorTrackingAssignmentRuleUpdateRequestApi {}/**- * @nullable+ * Mapping from assignment rule UUID to its new evaluation order.*/-export type PatchedErrorTrackingAssignmentRuleApiAssignee = {- readonly type?: 'user' | 'role'- readonly id?: number | string-} | null+export type PatchedErrorTrackingAssignmentRuleReorderRequestApiOrders = { [key: string]: number }-export interface PatchedErrorTrackingAssignmentRuleApi {- readonly id?: string- filters?: unknown- /** @nullable */- readonly assignee?: PatchedErrorTrackingAssignmentRuleApiAssignee- order_key?: number- disabled_data?: unknown- readonly created_at?: string- readonly updated_at?: string+export interface PatchedErrorTrackingAssignmentRuleReorderRequestApi {+ /** Mapping from assignment rule UUID to its new evaluation order. */+ orders?: PatchedErrorTrackingAssignmentRuleReorderRequestApiOrders}export interface ErrorTrackingBypassRuleApi {@@ -688,19 +679,14 @@ export interface PatchedErrorTrackingBypassRuleUpdateRequestApi {filters?: PropertyGroupFilterValueApi}-export interface PatchedErrorTrackingBypassRuleApi {- /** Unique identifier of the bypass rule. */- readonly id?: string- /** Property-group filters that define which incoming error events bypass rate limiting. */- filters?: unknown- /** Position of the rule in the team's ordered list. Rules are evaluated greedily in ascending order. */- order_key?: number- /** Populated when the rule has been automatically disabled (for example, after its filters failed to evaluate during ingestion). Null while the rule is active. */- disabled_data?: unknown- /** When the rule was created. */- readonly created_at?: string- /** When the rule was last updated. */- readonly updated_at?: string+/**+ * Mapping from bypass rule UUID to its new evaluation order.+ */+export type PatchedErrorTrackingBypassRuleReorderRequestApiOrders = { [key: string]: number }++export interface PatchedErrorTrackingBypassRuleReorderRequestApi {+ /** Mapping from bypass rule UUID to its new evaluation order. */+ orders?: PatchedErrorTrackingBypassRuleReorderRequestApiOrders}export interface ErrorTrackingExternalReferenceIntegrationResultApi {@@ -897,35 +883,13 @@ export interface PatchedErrorTrackingGroupingRuleUpdateRequestApi {}/**- * @nullable- */-export type PatchedErrorTrackingGroupingRuleApiAssignee = {- readonly type?: 'user' | 'role'- readonly id?: number | string-} | null--/**- * Issue linked to this rule- * @nullable+ * Mapping from grouping rule UUID to its new evaluation order.*/-export type PatchedErrorTrackingGroupingRuleApiIssue = { [key: string]: string } | null+export type PatchedErrorTrackingGroupingRuleReorderRequestApiOrders = { [key: string]: number }-export interface PatchedErrorTrackingGroupingRuleApi {- readonly id?: string- filters?: unknown- /** @nullable */- readonly assignee?: PatchedErrorTrackingGroupingRuleApiAssignee- /** @nullable */- description?: string | null- /**- * Issue linked to this rule- * @nullable- */- readonly issue?: PatchedErrorTrackingGroupingRuleApiIssue- order_key?: number- disabled_data?: unknown- readonly created_at?: string- readonly updated_at?: string+export interface PatchedErrorTrackingGroupingRuleReorderRequestApi {+ /** Mapping from grouping rule UUID to its new evaluation order. */+ orders?: PatchedErrorTrackingGroupingRuleReorderRequestApiOrders}export type ErrorTrackingIssueSeverityApi =@@ -976,15 +940,20 @@ export interface PaginatedErrorTrackingIssueReadListApi {results: ErrorTrackingIssueReadApi[]}+export interface ErrorTrackingIssueRedirectResponseApi {+ /** Issue the requested fingerprint now belongs to. */+ issue_id: string+}+/*** * `active` - active* * `resolved` - resolved* * `suppressed` - suppressed*/-export type ErrorTrackingIssueWriteStatusEnumApi =- (typeof ErrorTrackingIssueWriteStatusEnumApi)[keyof typeof ErrorTrackingIssueWriteStatusEnumApi]+export type ErrorTrackingIssueWritableStatusEnumApi =+ (typeof ErrorTrackingIssueWritableStatusEnumApi)[keyof typeof ErrorTrackingIssueWritableStatusEnumApi]-export const ErrorTrackingIssueWriteStatusEnumApi = {+export const ErrorTrackingIssueWritableStatusEnumApi = {Active: 'active',Resolved: 'resolved',Suppressed: 'suppressed',@@ -996,7 +965,7 @@ export interface ErrorTrackingIssueWriteApi {* * `active` - active* * `resolved` - resolved* * `suppressed` - suppressed */- status?: ErrorTrackingIssueWriteStatusEnumApi+ status?: ErrorTrackingIssueWritableStatusEnumApi/** Issue severity to set, or null to remove the assigned severity. */severity?: ErrorTrackingIssueSeverityApi | null/**@@ -1017,7 +986,7 @@ export interface PatchedErrorTrackingIssueWriteApi {* * `active` - active* * `resolved` - resolved* * `suppressed` - suppressed */- status?: ErrorTrackingIssueWriteStatusEnumApi+ status?: ErrorTrackingIssueWritableStatusEnumApi/** Issue severity to set, or null to remove the assigned severity. */severity?: ErrorTrackingIssueSeverityApi | null/**@@ -1054,6 +1023,16 @@ export interface ErrorTrackingIssueAssignResponseApi {success: boolean}+export interface ErrorTrackingIssueCohortRequestApi {+ /** ID of the cohort to attach to the issue. */+ cohortId: number+}++export interface ErrorTrackingIssueSuccessResponseApi {+ /** Whether the update completed successfully. */+ success: boolean+}+export interface ErrorTrackingIssueMergeRequestApi {/** IDs of the issues to merge into the current issue. */ids: string[]@@ -1085,6 +1064,53 @@ export interface ErrorTrackingIssueSplitResponseApi {new_issue_ids: string[]}+/**+ * * `set_status` - set_status+ * * `assign` - assign+ */+export type ErrorTrackingIssueBulkRequestActionEnumApi =+ (typeof ErrorTrackingIssueBulkRequestActionEnumApi)[keyof typeof ErrorTrackingIssueBulkRequestActionEnumApi]++export const ErrorTrackingIssueBulkRequestActionEnumApi = {+ SetStatus: 'set_status',+ Assign: 'assign',+} as const++export interface ErrorTrackingIssueBulkRequestApi {+ /** Which mutation to apply to every listed issue.+ *+ * * `set_status` - set_status+ * * `assign` - assign */+ action: ErrorTrackingIssueBulkRequestActionEnumApi+ /** IDs of the issues to update. */+ ids: string[]+ /** Status to set. Required when action is set_status.+ *+ * * `active` - active+ * * `resolved` - resolved+ * * `suppressed` - suppressed */+ status?: ErrorTrackingIssueWritableStatusEnumApi+ /** Assignment target. Required when action is assign; null unassigns. */+ assignee?: ErrorTrackingIssueAssigneeWriteApi | null+}++export interface ErrorTrackingIssueExistsResponseApi {+ /** Whether the project has recorded any issue at all. */+ exists: boolean+}++export interface ErrorTrackingIssueValueApi {+ /** One distinct value of the requested property. */+ name: string+}++export interface ErrorTrackingIssueValuesResponseApi {+ /** Distinct values, for the taxonomic filter. */+ results: ErrorTrackingIssueValueApi[]+ /** Always false. Kept for the taxonomic filter's shared shape. */+ refreshing: boolean+}+export interface ErrorTrackingDateRangeApi {/** Start of the date range as an ISO timestamp or relative date such as -7d. Defaults to -7d. */date_from?: string@@ -2114,14 +2140,14 @@ export interface PatchedErrorTrackingSuppressionRuleUpdateRequestApi {sampling_rate?: number}-export interface PatchedErrorTrackingSuppressionRuleApi {- readonly id?: string- filters?: unknown- order_key?: number- disabled_data?: unknown- sampling_rate?: number- readonly created_at?: string- readonly updated_at?: string+/**+ * Mapping from suppression rule UUID to its new evaluation order.+ */+export type PatchedErrorTrackingSuppressionRuleReorderRequestApiOrders = { [key: string]: number }++export interface PatchedErrorTrackingSuppressionRuleReorderRequestApi {+ /** Mapping from suppression rule UUID to its new evaluation order. */+ orders?: PatchedErrorTrackingSuppressionRuleReorderRequestApiOrders}export interface ErrorTrackingSymbolSetApi {@@ -2309,6 +2335,10 @@ export type ErrorTrackingExternalReferencesSearchIssuesRetrieveParams = {}export type ErrorTrackingFingerprintsListParams = {+ /**+ * Return only the fingerprints of this issue.+ */+ issue_id?: string/*** Number of results to return per page.*/@@ -2383,6 +2413,24 @@ export type ErrorTrackingIssuesListParams = {offset?: number}+export type ErrorTrackingIssuesRetrieveParams = {+ /**+ * Resolve the issue that currently owns this fingerprint first.+ */+ fingerprint?: string+}++export type ErrorTrackingIssuesValuesRetrieveParams = {+ /**+ * Issue property to list values for.+ */+ key: string+ /**+ * Substring the returned values must contain.+ */+ value?: string+}+export type ErrorTrackingRecommendationsListParams = {/*** Number of results to return per page.@@ -2392,6 +2440,17 @@ export type ErrorTrackingRecommendationsListParams = {* The initial index from which to return the results.*/offset?: number+ /**+ * True reads the current state without scheduling a refresh.+ */+ poll?: boolean+}++export type ErrorTrackingRecommendationsRefreshCreateParams = {+ /**+ * False skips the recompute when the current result is still fresh. Defaults to true.+ */+ force?: boolean}export type ErrorTrackingReleasesListParams = {@@ -2406,6 +2465,18 @@ export type ErrorTrackingReleasesListParams = {}export type ErrorTrackingSpikeEventsListParams = {+ /**+ * Include spikes detected at or after this time.+ */+ date_from?: string+ /**+ * Include spikes detected at or before this time.+ */+ date_to?: string+ /**+ * Comma-separated issue UUIDs to include.+ */+ issue_ids?: string/*** Number of results to return per page.*/@@ -2414,6 +2485,10 @@ export type ErrorTrackingSpikeEventsListParams = {* The initial index from which to return the results.*/offset?: number+ /**+ * Field to order by. Prefix with a hyphen for descending.+ */+ order_by?: string}export type ErrorTrackingStackFramesListParams = {diff --git a/products/error_tracking/frontend/generated/api.ts b/products/error_tracking/frontend/generated/api.tsindex ec157a016fbd..8baa761c2d23 100644--- a/products/error_tracking/frontend/generated/api.ts+++ b/products/error_tracking/frontend/generated/api.ts@@ -37,21 +37,29 @@ import type {ErrorTrackingGroupingRuleListResponseApi,ErrorTrackingGroupingRuleUpdateRequestApi,ErrorTrackingIssueAssignResponseApi,+ ErrorTrackingIssueBulkRequestApi,+ ErrorTrackingIssueCohortRequestApi,ErrorTrackingIssueDetailApi,ErrorTrackingIssueEventsQueryRequestApi,ErrorTrackingIssueEventsResponseApi,+ ErrorTrackingIssueExistsResponseApi,ErrorTrackingIssueMergeRequestApi,ErrorTrackingIssueMergeResponseApi,ErrorTrackingIssueQueryRequestApi,ErrorTrackingIssueReadApi,ErrorTrackingIssueSplitRequestApi,ErrorTrackingIssueSplitResponseApi,+ ErrorTrackingIssueSuccessResponseApi,+ ErrorTrackingIssueValuesResponseApi,ErrorTrackingIssueWriteApi,ErrorTrackingIssuesListParams,ErrorTrackingIssuesListQueryRequestApi,ErrorTrackingIssuesListResponseApi,+ ErrorTrackingIssuesRetrieveParams,+ ErrorTrackingIssuesValuesRetrieveParams,ErrorTrackingRecommendationApi,ErrorTrackingRecommendationsListParams,+ ErrorTrackingRecommendationsRefreshCreateParams,ErrorTrackingReleaseApi,ErrorTrackingReleaseCreateRequestApi,ErrorTrackingReleaseUpdateRequestApi,@@ -94,11 +102,11 @@ import type {PaginatedErrorTrackingSuppressionRuleListApi,PaginatedErrorTrackingSymbolSetListApi,PatchedErrorTrackingAlertUpdateRequestApi,- PatchedErrorTrackingAssignmentRuleApi,+ PatchedErrorTrackingAssignmentRuleReorderRequestApi,PatchedErrorTrackingAssignmentRuleUpdateRequestApi,- PatchedErrorTrackingBypassRuleApi,+ PatchedErrorTrackingBypassRuleReorderRequestApi,PatchedErrorTrackingBypassRuleUpdateRequestApi,- PatchedErrorTrackingGroupingRuleApi,+ PatchedErrorTrackingGroupingRuleReorderRequestApi,PatchedErrorTrackingGroupingRuleUpdateRequestApi,PatchedErrorTrackingIssueAssignRequestApi,PatchedErrorTrackingIssueWriteApi,@@ -107,7 +115,7 @@ import type {PatchedErrorTrackingSeverityRuleReorderRequestApi,PatchedErrorTrackingSeverityRuleUpdateRequestApi,PatchedErrorTrackingSpikeDetectionConfigApi,- PatchedErrorTrackingSuppressionRuleApi,+ PatchedErrorTrackingSuppressionRuleReorderRequestApi,PatchedErrorTrackingSuppressionRuleUpdateRequestApi,_SymbolSetDownloadResponseApi,} from './api.schemas'@@ -361,14 +369,14 @@ export const getErrorTrackingAssignmentRulesReorderPartialUpdateUrl = (projectIdexport const errorTrackingAssignmentRulesReorderPartialUpdate = async (projectId: string,- patchedErrorTrackingAssignmentRuleApi?: NonReadonly<PatchedErrorTrackingAssignmentRuleApi>,+ patchedErrorTrackingAssignmentRuleReorderRequestApi?: PatchedErrorTrackingAssignmentRuleReorderRequestApi,options?: RequestInit): Promise<void> => {return apiMutator<void>(getErrorTrackingAssignmentRulesReorderPartialUpdateUrl(projectId), {...options,method: 'PATCH',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(patchedErrorTrackingAssignmentRuleApi),+ body: JSON.stringify(patchedErrorTrackingAssignmentRuleReorderRequestApi),})}@@ -488,14 +496,14 @@ export const getErrorTrackingBypassRulesReorderPartialUpdateUrl = (projectId: stexport const errorTrackingBypassRulesReorderPartialUpdate = async (projectId: string,- patchedErrorTrackingBypassRuleApi?: NonReadonly<PatchedErrorTrackingBypassRuleApi>,+ patchedErrorTrackingBypassRuleReorderRequestApi?: PatchedErrorTrackingBypassRuleReorderRequestApi,options?: RequestInit): Promise<void> => {return apiMutator<void>(getErrorTrackingBypassRulesReorderPartialUpdateUrl(projectId), {...options,method: 'PATCH',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(patchedErrorTrackingBypassRuleApi),+ body: JSON.stringify(patchedErrorTrackingBypassRuleReorderRequestApi),})}@@ -909,14 +917,14 @@ export const getErrorTrackingGroupingRulesReorderPartialUpdateUrl = (projectId:export const errorTrackingGroupingRulesReorderPartialUpdate = async (projectId: string,- patchedErrorTrackingGroupingRuleApi?: NonReadonly<PatchedErrorTrackingGroupingRuleApi>,+ patchedErrorTrackingGroupingRuleReorderRequestApi?: PatchedErrorTrackingGroupingRuleReorderRequestApi,options?: RequestInit): Promise<void> => {return apiMutator<void>(getErrorTrackingGroupingRulesReorderPartialUpdateUrl(projectId), {...options,method: 'PATCH',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(patchedErrorTrackingGroupingRuleApi),+ body: JSON.stringify(patchedErrorTrackingGroupingRuleReorderRequestApi),})}@@ -947,16 +955,33 @@ export const errorTrackingIssuesList = async (})}-export const getErrorTrackingIssuesRetrieveUrl = (projectId: string, id: string) => {- return `/api/projects/${projectId}/error_tracking/issues/${id}/`+export const getErrorTrackingIssuesRetrieveUrl = (+ projectId: string,+ id: string,+ params?: ErrorTrackingIssuesRetrieveParams+) => {+ 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}/error_tracking/issues/${id}/?${stringifiedParams}`+ : `/api/projects/${projectId}/error_tracking/issues/${id}/`}export const errorTrackingIssuesRetrieve = async (projectId: string,id: string,+ params?: ErrorTrackingIssuesRetrieveParams,options?: RequestInit): Promise<ErrorTrackingIssueReadApi> => {- return apiMutator<ErrorTrackingIssueReadApi>(getErrorTrackingIssuesRetrieveUrl(projectId, id), {+ return apiMutator<ErrorTrackingIssueReadApi>(getErrorTrackingIssuesRetrieveUrl(projectId, id, params), {...options,method: 'GET',})@@ -1059,14 +1084,14 @@ export const getErrorTrackingIssuesCohortUpdateUrl = (projectId: string, id: strexport const errorTrackingIssuesCohortUpdate = async (projectId: string,id: string,- errorTrackingIssueReadApi: NonReadonly<ErrorTrackingIssueReadApi>,+ errorTrackingIssueCohortRequestApi: ErrorTrackingIssueCohortRequestApi,options?: RequestInit-): Promise<void> => {- return apiMutator<void>(getErrorTrackingIssuesCohortUpdateUrl(projectId, id), {+): Promise<ErrorTrackingIssueSuccessResponseApi> => {+ return apiMutator<ErrorTrackingIssueSuccessResponseApi>(getErrorTrackingIssuesCohortUpdateUrl(projectId, id), {...options,method: 'PUT',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(errorTrackingIssueReadApi),+ body: JSON.stringify(errorTrackingIssueCohortRequestApi),})}@@ -1126,14 +1151,14 @@ export const getErrorTrackingIssuesBulkCreateUrl = (projectId: string) => {export const errorTrackingIssuesBulkCreate = async (projectId: string,- errorTrackingIssueReadApi: NonReadonly<ErrorTrackingIssueReadApi>,+ errorTrackingIssueBulkRequestApi: ErrorTrackingIssueBulkRequestApi,options?: RequestInit-): Promise<void> => {- return apiMutator<void>(getErrorTrackingIssuesBulkCreateUrl(projectId), {+): Promise<ErrorTrackingIssueSuccessResponseApi> => {+ return apiMutator<ErrorTrackingIssueSuccessResponseApi>(getErrorTrackingIssuesBulkCreateUrl(projectId), {...options,method: 'POST',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(errorTrackingIssueReadApi),+ body: JSON.stringify(errorTrackingIssueBulkRequestApi),})}@@ -1141,19 +1166,41 @@ export const getErrorTrackingIssuesExistsRetrieveUrl = (projectId: string) => {return `/api/projects/${projectId}/error_tracking/issues/exists/`}-export const errorTrackingIssuesExistsRetrieve = async (projectId: string, options?: RequestInit): Promise<void> => {- return apiMutator<void>(getErrorTrackingIssuesExistsRetrieveUrl(projectId), {+export const errorTrackingIssuesExistsRetrieve = async (+ projectId: string,+ options?: RequestInit+): Promise<ErrorTrackingIssueExistsResponseApi> => {+ return apiMutator<ErrorTrackingIssueExistsResponseApi>(getErrorTrackingIssuesExistsRetrieveUrl(projectId), {...options,method: 'GET',})}-export const getErrorTrackingIssuesValuesRetrieveUrl = (projectId: string) => {- return `/api/projects/${projectId}/error_tracking/issues/values/`+export const getErrorTrackingIssuesValuesRetrieveUrl = (+ projectId: string,+ params: ErrorTrackingIssuesValuesRetrieveParams+) => {+ 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}/error_tracking/issues/values/?${stringifiedParams}`+ : `/api/projects/${projectId}/error_tracking/issues/values/`}-export const errorTrackingIssuesValuesRetrieve = async (projectId: string, options?: RequestInit): Promise<void> => {- return apiMutator<void>(getErrorTrackingIssuesValuesRetrieveUrl(projectId), {+export const errorTrackingIssuesValuesRetrieve = async (+ projectId: string,+ params: ErrorTrackingIssuesValuesRetrieveParams,+ options?: RequestInit+): Promise<ErrorTrackingIssueValuesResponseApi> => {+ return apiMutator<ErrorTrackingIssueValuesResponseApi>(getErrorTrackingIssuesValuesRetrieveUrl(projectId, params), {...options,method: 'GET',})@@ -1270,19 +1317,39 @@ export const errorTrackingRecommendationsDismissCreate = async (})}-export const getErrorTrackingRecommendationsRefreshCreateUrl = (projectId: string, id: string) => {- return `/api/projects/${projectId}/error_tracking/recommendations/${id}/refresh/`+export const getErrorTrackingRecommendationsRefreshCreateUrl = (+ projectId: string,+ id: string,+ params?: ErrorTrackingRecommendationsRefreshCreateParams+) => {+ 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}/error_tracking/recommendations/${id}/refresh/?${stringifiedParams}`+ : `/api/projects/${projectId}/error_tracking/recommendations/${id}/refresh/`}export const errorTrackingRecommendationsRefreshCreate = async (projectId: string,id: string,+ params?: ErrorTrackingRecommendationsRefreshCreateParams,options?: RequestInit): Promise<ErrorTrackingRecommendationApi> => {- return apiMutator<ErrorTrackingRecommendationApi>(getErrorTrackingRecommendationsRefreshCreateUrl(projectId, id), {- ...options,- method: 'POST',- })+ return apiMutator<ErrorTrackingRecommendationApi>(+ getErrorTrackingRecommendationsRefreshCreateUrl(projectId, id, params),+ {+ ...options,+ method: 'POST',+ }+ )}export const getErrorTrackingRecommendationsRestoreCreateUrl = (projectId: string, id: string) => {@@ -1577,8 +1644,8 @@ export const getErrorTrackingSpikeDetectionConfigListUrl = (projectId: string) =export const errorTrackingSpikeDetectionConfigList = async (projectId: string,options?: RequestInit-): Promise<ErrorTrackingSpikeDetectionConfigApi[]> => {- return apiMutator<ErrorTrackingSpikeDetectionConfigApi[]>(getErrorTrackingSpikeDetectionConfigListUrl(projectId), {+): Promise<ErrorTrackingSpikeDetectionConfigApi> => {+ return apiMutator<ErrorTrackingSpikeDetectionConfigApi>(getErrorTrackingSpikeDetectionConfigListUrl(projectId), {...options,method: 'GET',})@@ -1833,14 +1900,14 @@ export const getErrorTrackingSuppressionRulesReorderPartialUpdateUrl = (projectIexport const errorTrackingSuppressionRulesReorderPartialUpdate = async (projectId: string,- patchedErrorTrackingSuppressionRuleApi?: NonReadonly<PatchedErrorTrackingSuppressionRuleApi>,+ patchedErrorTrackingSuppressionRuleReorderRequestApi?: PatchedErrorTrackingSuppressionRuleReorderRequestApi,options?: RequestInit): Promise<void> => {return apiMutator<void>(getErrorTrackingSuppressionRulesReorderPartialUpdateUrl(projectId), {...options,method: 'PATCH',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(patchedErrorTrackingSuppressionRuleApi),+ body: JSON.stringify(patchedErrorTrackingSuppressionRuleReorderRequestApi),})}diff --git a/products/error_tracking/frontend/generated/api.zod.ts b/products/error_tracking/frontend/generated/api.zod.tsindex b418c071b9bb..dda1826e833a 100644--- a/products/error_tracking/frontend/generated/api.zod.ts+++ b/products/error_tracking/frontend/generated/api.zod.ts@@ -324,9 +324,10 @@ export const ErrorTrackingAssignmentRulesPartialUpdateBody = /* @__PURE__ */ zod})export const ErrorTrackingAssignmentRulesReorderPartialUpdateBody = /* @__PURE__ */ zod.object({- filters: zod.unknown().optional(),- order_key: zod.number().optional(),- disabled_data: zod.unknown().optional(),+ orders: zod+ .record(zod.string(), zod.number())+ .optional()+ .describe('Mapping from assignment rule UUID to its new evaluation order.'),})export const ErrorTrackingBypassRulesCreateBody = /* @__PURE__ */ zod.object({@@ -359,20 +360,10 @@ export const ErrorTrackingBypassRulesPartialUpdateBody = /* @__PURE__ */ zod.obj})export const ErrorTrackingBypassRulesReorderPartialUpdateBody = /* @__PURE__ */ zod.object({- filters: zod- .unknown()- .optional()- .describe('Property-group filters that define which incoming error events bypass rate limiting.'),- order_key: zod- .number()- .optional()- .describe("Position of the rule in the team's ordered list. Rules are evaluated greedily in ascending order."),- disabled_data: zod- .unknown()+ orders: zod+ .record(zod.string(), zod.number()).optional()- .describe(- 'Populated when the rule has been automatically disabled (for example, after its filters failed to evaluate during ingestion). Null while the rule is active.'- ),+ .describe('Mapping from bypass rule UUID to its new evaluation order.'),})export const ErrorTrackingExternalReferencesCreateBody = /* @__PURE__ */ zod@@ -465,10 +456,10 @@ export const ErrorTrackingGroupingRulesPartialUpdateBody = /* @__PURE__ */ zod.o})export const ErrorTrackingGroupingRulesReorderPartialUpdateBody = /* @__PURE__ */ zod.object({- filters: zod.unknown().optional(),- description: zod.string().nullish(),- order_key: zod.number().optional(),- disabled_data: zod.unknown().optional(),+ orders: zod+ .record(zod.string(), zod.number())+ .optional()+ .describe('Mapping from grouping rule UUID to its new evaluation order.'),})export const ErrorTrackingIssuesUpdateBody = /* @__PURE__ */ zod.object({@@ -519,51 +510,9 @@ export const ErrorTrackingIssuesAssignPartialUpdateBody = /* @__PURE__ */ zod.ob.describe('Assignment target. Set to null or omit to remove the current assignment.'),})-export const ErrorTrackingIssuesCohortUpdateBody = /* @__PURE__ */ zod- .object({- id: zod.uuid(),- status: zod.string(),- severity: zod- .union([zod.enum(['low', 'medium', 'high', 'critical']), zod.null()])- .describe('Issue severity, or null when no severity is assigned.'),- name: zod.string().nullable(),- description: zod.string().nullable(),- first_seen: zod.iso.datetime({ offset: true }).nullable(),- assignee: zod.union([- zod.object({- id: zod.union([zod.number(), zod.string(), zod.null()]),- type: zod.string(),- }),- zod.null(),- ]),- external_issues: zod.array(- zod- .object({- id: zod.uuid().describe('Unique ID of the external reference.'),- integration: zod- .object({- id: zod.number().describe('ID of the integration backing this external reference.'),- kind: zod- .string()- .describe("Integration provider, e.g. 'github', 'gitlab', 'linear', or 'jira'."),- display_name: zod.string().describe('Human-readable name of the connected integration.'),- })- .describe('The connected integration this reference was created through.'),- external_url: zod.string().describe("URL of the linked external issue in the provider's system."),- external_id: zod.string().describe('Provider-native identifier of the linked issue.'),- title: zod.string().describe('Title of the linked issue.'),- })- .describe('Read-only shape of an external reference, shared by every response.')- ),- cohort: zod.union([- zod.object({- id: zod.number(),- name: zod.string(),- }),- zod.null(),- ]),- })- .describe('Read-only serializer for issue contract types returned by the facade.')+export const ErrorTrackingIssuesCohortUpdateBody = /* @__PURE__ */ zod.object({+ cohortId: zod.number().describe('ID of the cohort to attach to the issue.'),+})export const ErrorTrackingIssuesMergeCreateBody = /* @__PURE__ */ zod.object({ids: zod.array(zod.uuid()).describe('IDs of the issues to merge into the current issue.'),@@ -588,51 +537,35 @@ export const ErrorTrackingIssuesSplitCreateBody = /* @__PURE__ */ zod.object({.describe('Fingerprints to split into new issues. Each fingerprint becomes its own new issue.'),})-export const ErrorTrackingIssuesBulkCreateBody = /* @__PURE__ */ zod- .object({- id: zod.uuid(),- status: zod.string(),- severity: zod- .union([zod.enum(['low', 'medium', 'high', 'critical']), zod.null()])- .describe('Issue severity, or null when no severity is assigned.'),- name: zod.string().nullable(),- description: zod.string().nullable(),- first_seen: zod.iso.datetime({ offset: true }).nullable(),- assignee: zod.union([- zod.object({- id: zod.union([zod.number(), zod.string(), zod.null()]),- type: zod.string(),- }),- zod.null(),- ]),- external_issues: zod.array(- zod- .object({- id: zod.uuid().describe('Unique ID of the external reference.'),- integration: zod- .object({- id: zod.number().describe('ID of the integration backing this external reference.'),- kind: zod- .string()- .describe("Integration provider, e.g. 'github', 'gitlab', 'linear', or 'jira'."),- display_name: zod.string().describe('Human-readable name of the connected integration.'),- })- .describe('The connected integration this reference was created through.'),- external_url: zod.string().describe("URL of the linked external issue in the provider's system."),- external_id: zod.string().describe('Provider-native identifier of the linked issue.'),- title: zod.string().describe('Title of the linked issue.'),- })- .describe('Read-only shape of an external reference, shared by every response.')+export const ErrorTrackingIssuesBulkCreateBody = /* @__PURE__ */ zod.object({+ action: zod+ .enum(['set_status', 'assign'])+ .describe('\* `set_status` - set_status\n\* `assign` - assign')+ .describe(+ 'Which mutation to apply to every listed issue.\n\n\* `set_status` - set_status\n\* `assign` - assign'),- cohort: zod.union([+ ids: zod.array(zod.uuid()).describe('IDs of the issues to update.'),+ status: zod+ .enum(['active', 'resolved', 'suppressed'])+ .describe('\* `active` - active\n\* `resolved` - resolved\n\* `suppressed` - suppressed')+ .optional()+ .describe(+ 'Status to set. Required when action is set_status.\n\n\* `active` - active\n\* `resolved` - resolved\n\* `suppressed` - suppressed'+ ),+ assignee: zod+ .union([zod.object({- id: zod.number(),- name: zod.string(),+ id: zod.union([zod.number(), zod.string()]).describe('User ID or role UUID to assign the issue to.'),+ type: zod+ .enum(['user', 'role'])+ .describe('\* `user` - user\n\* `role` - role')+ .describe('Assignment target type: user or role.\n\n\* `user` - user\n\* `role` - role'),}),zod.null(),- ]),- })- .describe('Read-only serializer for issue contract types returned by the facade.')+ ])+ .optional()+ .describe('Assignment target. Required when action is assign; null unassigns.'),+})/*** Fetch one error tracking issue with impact counts, top in_app frame, latest release, and optional sparkline.@@ -1310,10 +1243,10 @@ export const ErrorTrackingSuppressionRulesPartialUpdateBody = /* @__PURE__ */ zo})export const ErrorTrackingSuppressionRulesReorderPartialUpdateBody = /* @__PURE__ */ zod.object({- filters: zod.unknown().optional(),- order_key: zod.number().optional(),- disabled_data: zod.unknown().optional(),- sampling_rate: zod.number().optional(),+ orders: zod+ .record(zod.string(), zod.number())+ .optional()+ .describe('Mapping from suppression rule UUID to its new evaluation order.'),})export const ErrorTrackingSymbolSetsFinishUploadUpdateBody = /* @__PURE__ */ zod.object({diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 73cd32bdf073..7fba7f56bffc 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -35183,11 +35183,60 @@ export namespace Schemas {type: AssigneeTypeEnum;}+ /**+ * * `set_status` - set_status+ * * `assign` - assign+ */+ export type ErrorTrackingIssueBulkRequestActionEnum = typeof ErrorTrackingIssueBulkRequestActionEnum[keyof typeof ErrorTrackingIssueBulkRequestActionEnum];+++ export const ErrorTrackingIssueBulkRequestActionEnum = {+ SetStatus: 'set_status',+ Assign: 'assign',+ } as const;++ /**+ * * `active` - active+ * * `resolved` - resolved+ * * `suppressed` - suppressed+ */+ export type ErrorTrackingIssueWritableStatusEnum = typeof ErrorTrackingIssueWritableStatusEnum[keyof typeof ErrorTrackingIssueWritableStatusEnum];+++ export const ErrorTrackingIssueWritableStatusEnum = {+ Active: 'active',+ Resolved: 'resolved',+ Suppressed: 'suppressed',+ } as const;++ export interface ErrorTrackingIssueBulkRequest {+ /** Which mutation to apply to every listed issue.+ *+ * * `set_status` - set_status+ * * `assign` - assign */+ action: ErrorTrackingIssueBulkRequestActionEnum;+ /** IDs of the issues to update. */+ ids: string[];+ /** Status to set. Required when action is set_status.+ *+ * * `active` - active+ * * `resolved` - resolved+ * * `suppressed` - suppressed */+ status?: ErrorTrackingIssueWritableStatusEnum;+ /** Assignment target. Required when action is assign; null unassigns. */+ assignee?: ErrorTrackingIssueAssigneeWrite | null;+ }+export interface ErrorTrackingIssueCohortRead {id: number;name: string;}+ export interface ErrorTrackingIssueCohortRequest {+ /** ID of the cohort to attach to the issue. */+ cohortId: number;+ }+export type ErrorTrackingIssueSeverity = typeof ErrorTrackingIssueSeverity[keyof typeof ErrorTrackingIssueSeverity];@@ -35427,6 +35476,11 @@ export namespace Schemas {nextOffset?: number;}+ export interface ErrorTrackingIssueExistsResponse {+ /** Whether the project has recorded any issue at all. */+ exists: boolean;+ }+export interface ErrorTrackingIssueListItem {/** Error tracking issue ID. */id: string;@@ -35534,6 +35588,11 @@ export namespace Schemas {cohort: ErrorTrackingIssueCohortRead | null;}+ export interface ErrorTrackingIssueRedirectResponse {+ /** Issue the requested fingerprint now belongs to. */+ issue_id: string;+ }+export interface ErrorTrackingIssueRelease {build?: string | null;/** Occurrences per bucket, aligned with the response's `buckets`. */@@ -35602,19 +35661,22 @@ export namespace Schemas {All: 'all',} as const;- /**- * * `active` - active- * * `resolved` - resolved- * * `suppressed` - suppressed- */- export type ErrorTrackingIssueWriteStatusEnum = typeof ErrorTrackingIssueWriteStatusEnum[keyof typeof ErrorTrackingIssueWriteStatusEnum];+ export interface ErrorTrackingIssueSuccessResponse {+ /** Whether the update completed successfully. */+ success: boolean;+ }+ export interface ErrorTrackingIssueValue {+ /** One distinct value of the requested property. */+ name: string;+ }- export const ErrorTrackingIssueWriteStatusEnum = {- Active: 'active',- Resolved: 'resolved',- Suppressed: 'suppressed',- } as const;+ export interface ErrorTrackingIssueValuesResponse {+ /** Distinct values, for the taxonomic filter. */+ results: ErrorTrackingIssueValue[];+ /** Always false. Kept for the taxonomic filter's shared shape. */+ refreshing: boolean;+ }export interface ErrorTrackingIssueWrite {/** Issue status to set. Deprecated archived and pending_release values are rejected.@@ -35622,7 +35684,7 @@ export namespace Schemas {* * `active` - active* * `resolved` - resolved* * `suppressed` - suppressed */- status?: ErrorTrackingIssueWriteStatusEnum;+ status?: ErrorTrackingIssueWritableStatusEnum;/** Issue severity to set, or null to remove the assigned severity. */severity?: ErrorTrackingIssueSeverity | null;/**@@ -69396,22 +69458,13 @@ export namespace Schemas {}/**- * @nullable+ * Mapping from assignment rule UUID to its new evaluation order.*/- export type PatchedErrorTrackingAssignmentRuleAssignee = {- readonly type?: 'user' | 'role';- readonly id?: number | string;- } | null;+ export type PatchedErrorTrackingAssignmentRuleReorderRequestOrders = {[key: string]: number};- export interface PatchedErrorTrackingAssignmentRule {- readonly id?: string;- filters?: unknown;- /** @nullable */- readonly assignee?: PatchedErrorTrackingAssignmentRuleAssignee;- order_key?: number;- disabled_data?: unknown;- readonly created_at?: string;- readonly updated_at?: string;+ export interface PatchedErrorTrackingAssignmentRuleReorderRequest {+ /** Mapping from assignment rule UUID to its new evaluation order. */+ orders?: PatchedErrorTrackingAssignmentRuleReorderRequestOrders;}export interface PatchedErrorTrackingAssignmentRuleUpdateRequest {@@ -69421,19 +69474,14 @@ export namespace Schemas {assignee?: ErrorTrackingAssignmentRuleAssigneeRequest | null;}- export interface PatchedErrorTrackingBypassRule {- /** Unique identifier of the bypass rule. */- readonly id?: string;- /** Property-group filters that define which incoming error events bypass rate limiting. */- filters?: unknown;- /** Position of the rule in the team's ordered list. Rules are evaluated greedily in ascending order. */- order_key?: number;- /** Populated when the rule has been automatically disabled (for example, after its filters failed to evaluate during ingestion). Null while the rule is active. */- disabled_data?: unknown;- /** When the rule was created. */- readonly created_at?: string;- /** When the rule was last updated. */- readonly updated_at?: string;+ /**+ * Mapping from bypass rule UUID to its new evaluation order.+ */+ export type PatchedErrorTrackingBypassRuleReorderRequestOrders = {[key: string]: number};++ export interface PatchedErrorTrackingBypassRuleReorderRequest {+ /** Mapping from bypass rule UUID to its new evaluation order. */+ orders?: PatchedErrorTrackingBypassRuleReorderRequestOrders;}export interface PatchedErrorTrackingBypassRuleUpdateRequest {@@ -69442,35 +69490,13 @@ export namespace Schemas {}/**- * @nullable+ * Mapping from grouping rule UUID to its new evaluation order.*/- export type PatchedErrorTrackingGroupingRuleAssignee = {- readonly type?: 'user' | 'role';- readonly id?: number | string;- } | null;-- /**- * Issue linked to this rule- * @nullable- */- export type PatchedErrorTrackingGroupingRuleIssue = {[key: string]: string} | null;+ export type PatchedErrorTrackingGroupingRuleReorderRequestOrders = {[key: string]: number};- export interface PatchedErrorTrackingGroupingRule {- readonly id?: string;- filters?: unknown;- /** @nullable */- readonly assignee?: PatchedErrorTrackingGroupingRuleAssignee;- /** @nullable */- description?: string | null;- /**- * Issue linked to this rule- * @nullable- */- readonly issue?: PatchedErrorTrackingGroupingRuleIssue;- order_key?: number;- disabled_data?: unknown;- readonly created_at?: string;- readonly updated_at?: string;+ export interface PatchedErrorTrackingGroupingRuleReorderRequest {+ /** Mapping from grouping rule UUID to its new evaluation order. */+ orders?: PatchedErrorTrackingGroupingRuleReorderRequestOrders;}export interface PatchedErrorTrackingGroupingRuleUpdateRequest {@@ -69489,7 +69515,7 @@ export namespace Schemas {* * `active` - active* * `resolved` - resolved* * `suppressed` - suppressed */- status?: ErrorTrackingIssueWriteStatusEnum;+ status?: ErrorTrackingIssueWritableStatusEnum;/** Issue severity to set, or null to remove the assigned severity. */severity?: ErrorTrackingIssueSeverity | null;/**@@ -69601,14 +69627,14 @@ export namespace Schemas {threshold?: number;}- export interface PatchedErrorTrackingSuppressionRule {- readonly id?: string;- filters?: unknown;- order_key?: number;- disabled_data?: unknown;- sampling_rate?: number;- readonly created_at?: string;- readonly updated_at?: string;+ /**+ * Mapping from suppression rule UUID to its new evaluation order.+ */+ export type PatchedErrorTrackingSuppressionRuleReorderRequestOrders = {[key: string]: number};++ export interface PatchedErrorTrackingSuppressionRuleReorderRequest {+ /** Mapping from suppression rule UUID to its new evaluation order. */+ orders?: PatchedErrorTrackingSuppressionRuleReorderRequestOrders;}export interface PatchedErrorTrackingSuppressionRuleUpdateRequest {@@ -105110,6 +105136,10 @@ export namespace Schemas {};export type ErrorTrackingFingerprintsListParams = {+ /**+ * Return only the fingerprints of this issue.+ */+ issue_id?: string;/*** Number of results to return per page.*/@@ -105184,6 +105214,24 @@ export namespace Schemas {offset?: number;};+ export type ErrorTrackingIssuesRetrieveParams = {+ /**+ * Resolve the issue that currently owns this fingerprint first.+ */+ fingerprint?: string;+ };++ export type ErrorTrackingIssuesValuesRetrieveParams = {+ /**+ * Issue property to list values for.+ */+ key: string;+ /**+ * Substring the returned values must contain.+ */+ value?: string;+ };+export type ErrorTrackingRecommendationsListParams = {/*** Number of results to return per page.@@ -105193,6 +105241,17 @@ export namespace Schemas {* The initial index from which to return the results.*/offset?: number;+ /**+ * True reads the current state without scheduling a refresh.+ */+ poll?: boolean;+ };++ export type ErrorTrackingRecommendationsRefreshCreateParams = {+ /**+ * False skips the recompute when the current result is still fresh. Defaults to true.+ */+ force?: boolean;};export type ErrorTrackingReleasesListParams = {@@ -105207,6 +105266,18 @@ export namespace Schemas {};export type ErrorTrackingSpikeEventsListParams = {+ /**+ * Include spikes detected at or after this time.+ */+ date_from?: string;+ /**+ * Include spikes detected at or before this time.+ */+ date_to?: string;+ /**+ * Comma-separated issue UUIDs to include.+ */+ issue_ids?: string;/*** Number of results to return per page.*/@@ -105215,6 +105286,10 @@ export namespace Schemas {* The initial index from which to return the results.*/offset?: number;+ /**+ * Field to order by. Prefix with a hyphen for descending.+ */+ order_by?: string;};export type ErrorTrackingStackFramesListParams = {diff --git a/services/mcp/src/generated/error_tracking/api.ts b/services/mcp/src/generated/error_tracking/api.tsindex 8c7f671d08d2..3e6664e396dc 100644--- a/services/mcp/src/generated/error_tracking/api.ts+++ b/services/mcp/src/generated/error_tracking/api.ts@@ -8579,6 +8579,7 @@ export const ErrorTrackingRecommendationsListParams = () => zod.object({export const ErrorTrackingRecommendationsListQueryParams = () => zod.object({limit: zod.number().optional().describe('Number of results to return per page.'),offset: zod.number().optional().describe('The initial index from which to return the results.'),+ poll: zod.boolean().optional().describe('True reads the current state without scheduling a refresh.'),})export const ErrorTrackingSettingsRetrieveSettingsRetrieveParams = () => zod.object({diff --git a/services/mcp/src/tools/generated/error_tracking.ts b/services/mcp/src/tools/generated/error_tracking.tsindex 19ab8ac0ebaf..e8536cdd3fa5 100644--- a/services/mcp/src/tools/generated/error_tracking.ts+++ b/services/mcp/src/tools/generated/error_tracking.ts@@ -409,6 +409,7 @@ const errorTrackingRecommendationsList = (): ToolBase<query: {limit: params.limit,offset: params.offset,+ poll: params.poll,},})return resultdiff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/error-tracking-recommendations-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/error-tracking-recommendations-list.jsonindex 8331b796ac73..5de7a8f9bad2 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/error-tracking-recommendations-list.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/error-tracking-recommendations-list.json@@ -8,6 +8,10 @@"offset": {"description": "The initial index from which to return the results.","type": "number"+ },+ "poll": {+ "description": "True reads the current state without scheduling a refresh.",+ "type": "boolean"}},"type": "object"