openapi: 3.1.0
info:
  title: tripl
  description: Analytics tracking plan service
  version: 0.1.0
paths:
  /api/v1/auth/register:
    post:
      tags:
        - auth
      summary: Register
      operationId: register_api_v1_auth_register_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthUserResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/login:
    post:
      tags:
        - auth
      summary: Login
      operationId: login_api_v1_auth_login_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthUserResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/logout:
    post:
      tags:
        - auth
      summary: Logout
      operationId: logout_api_v1_auth_logout_post
      responses:
        '204':
          description: Successful Response
  /api/v1/auth/me:
    get:
      tags:
        - auth
      summary: Get Me
      operationId: get_me_api_v1_auth_me_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthUserResponse'
  /api/v1/activity:
    get:
      tags:
        - activity
      summary: List Workspace Activity
      operationId: list_workspace_activity_api_v1_activity_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ActivityItemResponse'
                title: Response List Workspace Activity Api V1 Activity Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/activity/projects/{slug}:
    get:
      tags:
        - activity
      summary: List Project Activity
      operationId: list_project_activity_api_v1_activity_projects__slug__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ActivityItemResponse'
                title: >-
                  Response List Project Activity Api V1 Activity Projects  Slug 
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/ai/status:
    get:
      tags:
        - ai
      summary: Ai Status
      operationId: ai_status_api_v1_projects__slug__ai_status_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/ai/describe-event:
    post:
      tags:
        - ai
      summary: Describe Event
      operationId: describe_event_api_v1_projects__slug__ai_describe_event_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiDescribeEventRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiDescribeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/ai/describe-event-type:
    post:
      tags:
        - ai
      summary: Describe Event Type
      operationId: describe_event_type_api_v1_projects__slug__ai_describe_event_type_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiDescribeEventTypeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiDescribeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/ai/ask:
    post:
      tags:
        - ai
      summary: Ask Plan
      operationId: ask_plan_api_v1_projects__slug__ai_ask_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiAskRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiAskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/settings:
    get:
      tags:
        - settings
      summary: Get Service Settings
      operationId: get_service_settings_api_v1_settings_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceSettingsResponse'
    put:
      tags:
        - settings
      summary: Put Service Settings
      description: >-
        Upsert service overrides. Intentionally identical to PATCH: unset fields

        are left untouched (partial update), not reset. Kept as a stable alias
        for

        clients that issue PUT; settings are a sparse override map with no full

        "replace all" semantics.
      operationId: put_service_settings_api_v1_settings_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceSettingsUpdate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceSettingsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - settings
      summary: Patch Service Settings
      operationId: patch_service_settings_api_v1_settings_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceSettingsUpdate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceSettingsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/settings/ai:
    get:
      tags:
        - settings
      summary: Get Ai Settings
      operationId: get_ai_settings_api_v1_settings_ai_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiSettingsResponse'
    put:
      tags:
        - settings
      summary: Put Ai Settings
      description: >-
        Upsert AI overrides (partial: only fields present in the request body
        are

        applied, via exclude_unset). PUT — not PATCH — because the frontend AI

        settings form calls this endpoint; semantics are upsert, not
        replace-all.
      operationId: put_ai_settings_api_v1_settings_ai_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiSettingsUpdate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiSettingsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/settings/ai/test:
    post:
      tags:
        - settings
      summary: Test Ai Settings
      operationId: test_ai_settings_api_v1_settings_ai_test_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiSettingsTestRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettingsTestResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects:
    get:
      tags:
        - projects
      summary: List Projects
      operationId: list_projects_api_v1_projects_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ProjectResponse'
                type: array
                title: Response List Projects Api V1 Projects Get
    post:
      tags:
        - projects
      summary: Create Project
      operationId: create_project_api_v1_projects_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/demo:
    post:
      tags:
        - projects
      summary: Create Demo Project
      operationId: create_demo_project_api_v1_projects_demo_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
  /api/v1/projects/{slug}:
    get:
      tags:
        - projects
      summary: Get Project
      operationId: get_project_api_v1_projects__slug__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - projects
      summary: Update Project
      operationId: update_project_api_v1_projects__slug__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - projects
      summary: Delete Project
      operationId: delete_project_api_v1_projects__slug__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/anomaly-settings:
    get:
      tags:
        - anomaly-settings
      summary: Get Project Anomaly Settings
      operationId: get_project_anomaly_settings_api_v1_projects__slug__anomaly_settings_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAnomalySettingsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - anomaly-settings
      summary: Update Project Anomaly Settings
      operationId: >-
        update_project_anomaly_settings_api_v1_projects__slug__anomaly_settings_patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectAnomalySettingsUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAnomalySettingsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-destinations:
    get:
      tags:
        - alerting
      summary: List Alert Destinations
      operationId: list_alert_destinations_api_v1_projects__slug__alert_destinations_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertDestinationResponse'
                title: >-
                  Response List Alert Destinations Api V1 Projects  Slug  Alert
                  Destinations Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - alerting
      summary: Create Alert Destination
      operationId: create_alert_destination_api_v1_projects__slug__alert_destinations_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertDestinationCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertDestinationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/monitors-summary:
    get:
      tags:
        - alerting
      summary: Get Monitors Summary
      operationId: get_monitors_summary_api_v1_projects__slug__monitors_summary_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorsSummaryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-destinations/{destination_id}:
    get:
      tags:
        - alerting
      summary: Get Alert Destination
      operationId: >-
        get_alert_destination_api_v1_projects__slug__alert_destinations__destination_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: destination_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Destination Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertDestinationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - alerting
      summary: Update Alert Destination
      operationId: >-
        update_alert_destination_api_v1_projects__slug__alert_destinations__destination_id__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: destination_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Destination Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertDestinationUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertDestinationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - alerting
      summary: Delete Alert Destination
      operationId: >-
        delete_alert_destination_api_v1_projects__slug__alert_destinations__destination_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: destination_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Destination Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-destinations/{destination_id}/rules:
    post:
      tags:
        - alerting
      summary: Create Alert Rule
      operationId: >-
        create_alert_rule_api_v1_projects__slug__alert_destinations__destination_id__rules_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: destination_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Destination Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertRuleCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertRuleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-destinations/{destination_id}/rules/{rule_id}:
    patch:
      tags:
        - alerting
      summary: Update Alert Rule
      operationId: >-
        update_alert_rule_api_v1_projects__slug__alert_destinations__destination_id__rules__rule_id__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: destination_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Destination Id
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Rule Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertRuleUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertRuleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - alerting
      summary: Delete Alert Rule
      operationId: >-
        delete_alert_rule_api_v1_projects__slug__alert_destinations__destination_id__rules__rule_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: destination_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Destination Id
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Rule Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-destinations/{destination_id}/rules/{rule_id}/simulate:
    post:
      tags:
        - alerting
      summary: Simulate Alert Rule
      operationId: >-
        simulate_alert_rule_api_v1_projects__slug__alert_destinations__destination_id__rules__rule_id__simulate_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: destination_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Destination Id
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Rule Id
        - name: days
          in: query
          required: false
          schema:
            type: integer
            maximum: 90
            minimum: 1
            default: 7
            title: Days
        - name: cooldown_minutes_override
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 10080
                minimum: 0
              - type: 'null'
            title: Cooldown Minutes Override
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertRuleSimulateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-deliveries:
    get:
      tags:
        - alerting
      summary: List Alert Deliveries
      operationId: list_alert_deliveries_api_v1_projects__slug__alert_deliveries_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: channel
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Channel
        - name: destination_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Destination Id
        - name: rule_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Rule Id
        - name: scan_config_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Scan Config Id
        - name: date_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Date From
        - name: date_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Date To
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertDeliveryListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-deliveries/{delivery_id}:
    get:
      tags:
        - alerting
      summary: Get Alert Delivery
      operationId: >-
        get_alert_delivery_api_v1_projects__slug__alert_deliveries__delivery_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: delivery_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Delivery Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertDeliveryDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-deliveries/{delivery_id}/retry:
    post:
      tags:
        - alerting
      summary: Retry Alert Delivery
      operationId: >-
        retry_alert_delivery_api_v1_projects__slug__alert_deliveries__delivery_id__retry_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: delivery_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Delivery Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertDeliveryDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/monitors/{rule_id}:
    get:
      tags:
        - alerting
      summary: Get Monitor
      operationId: get_monitor_api_v1_projects__slug__monitors__rule_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Rule Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/monitors/{rule_id}/mute:
    post:
      tags:
        - alerting
      summary: Mute Monitor
      operationId: mute_monitor_api_v1_projects__slug__monitors__rule_id__mute_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Rule Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorMuteRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/monitors/{rule_id}/unmute:
    post:
      tags:
        - alerting
      summary: Unmute Monitor
      operationId: unmute_monitor_api_v1_projects__slug__monitors__rule_id__unmute_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Rule Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-inbox:
    get:
      tags:
        - alerting
      summary: List Alert Inbox
      operationId: list_alert_inbox_api_v1_projects__slug__alert_inbox_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertInboxListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/alert-inbox/{correlation_group_id}/actions:
    post:
      tags:
        - alerting
      summary: Apply Alert Inbox Action
      operationId: >-
        apply_alert_inbox_action_api_v1_projects__slug__alert_inbox__correlation_group_id__actions_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: correlation_group_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Correlation Group Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertInboxActionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertInboxGroupResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types:
    get:
      tags:
        - event-types
      summary: List Event Types
      operationId: list_event_types_api_v1_projects__slug__event_types_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventTypeResponse'
                title: >-
                  Response List Event Types Api V1 Projects  Slug  Event Types
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - event-types
      summary: Create Event Type
      operationId: create_event_type_api_v1_projects__slug__event_types_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventTypeCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventTypeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}:
    get:
      tags:
        - event-types
      summary: Get Event Type
      operationId: get_event_type_api_v1_projects__slug__event_types__event_type_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventTypeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - event-types
      summary: Update Event Type
      operationId: >-
        update_event_type_api_v1_projects__slug__event_types__event_type_id__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventTypeUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventTypeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - event-types
      summary: Delete Event Type
      operationId: >-
        delete_event_type_api_v1_projects__slug__event_types__event_type_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}/drifts:
    get:
      tags:
        - event-types
      summary: List Event Type Drifts
      operationId: >-
        list_event_type_drifts_api_v1_projects__slug__event_types__event_type_id__drifts_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaDriftListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/drifts/{drift_id}/actions:
    post:
      tags:
        - event-types
      summary: Apply Schema Drift Action
      operationId: >-
        apply_schema_drift_action_api_v1_projects__slug__event_types_drifts__drift_id__actions_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: drift_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Drift Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SchemaDriftActionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaDriftResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}/owners:
    get:
      tags:
        - event-type-owners
      summary: List Owners
      operationId: >-
        list_owners_api_v1_projects__slug__event_types__event_type_id__owners_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventTypeOwnerResponse'
                title: >-
                  Response List Owners Api V1 Projects  Slug  Event Types  Event
                  Type Id  Owners Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - event-type-owners
      summary: Add Owner
      operationId: add_owner_api_v1_projects__slug__event_types__event_type_id__owners_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventTypeOwnerCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventTypeOwnerResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}/owners/{owner_id}:
    delete:
      tags:
        - event-type-owners
      summary: Remove Owner
      operationId: >-
        remove_owner_api_v1_projects__slug__event_types__event_type_id__owners__owner_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
        - name: owner_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Owner Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}/fields:
    get:
      tags:
        - fields
      summary: List Fields
      operationId: >-
        list_fields_api_v1_projects__slug__event_types__event_type_id__fields_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FieldDefinitionResponse'
                title: >-
                  Response List Fields Api V1 Projects  Slug  Event Types  Event
                  Type Id  Fields Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - fields
      summary: Create Field
      operationId: >-
        create_field_api_v1_projects__slug__event_types__event_type_id__fields_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldDefinitionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldDefinitionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}/fields/bulk:
    post:
      tags:
        - fields
      summary: Bulk Create Fields
      operationId: >-
        bulk_create_fields_api_v1_projects__slug__event_types__event_type_id__fields_bulk_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldDefinitionBulkCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FieldDefinitionResponse'
                title: >-
                  Response Bulk Create Fields Api V1 Projects  Slug  Event
                  Types  Event Type Id  Fields Bulk Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}/fields/reorder:
    patch:
      tags:
        - fields
      summary: Reorder Fields
      operationId: >-
        reorder_fields_api_v1_projects__slug__event_types__event_type_id__fields_reorder_patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldReorder'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FieldDefinitionResponse'
                title: >-
                  Response Reorder Fields Api V1 Projects  Slug  Event Types 
                  Event Type Id  Fields Reorder Patch
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}/fields/{field_id}:
    patch:
      tags:
        - fields
      summary: Update Field
      operationId: >-
        update_field_api_v1_projects__slug__event_types__event_type_id__fields__field_id__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
        - name: field_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Field Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldDefinitionUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldDefinitionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - fields
      summary: Delete Field
      operationId: >-
        delete_field_api_v1_projects__slug__event_types__event_type_id__fields__field_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
        - name: field_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Field Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/relations:
    get:
      tags:
        - relations
      summary: List Relations
      operationId: list_relations_api_v1_projects__slug__relations_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelationResponse'
                title: Response List Relations Api V1 Projects  Slug  Relations Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - relations
      summary: Create Relation
      operationId: create_relation_api_v1_projects__slug__relations_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelationCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/relations/{relation_id}:
    delete:
      tags:
        - relations
      summary: Delete Relation
      operationId: delete_relation_api_v1_projects__slug__relations__relation_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: relation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Relation Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/meta-fields:
    get:
      tags:
        - meta-fields
      summary: List Meta Fields
      operationId: list_meta_fields_api_v1_projects__slug__meta_fields_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetaFieldResponse'
                title: >-
                  Response List Meta Fields Api V1 Projects  Slug  Meta Fields
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - meta-fields
      summary: Create Meta Field
      operationId: create_meta_field_api_v1_projects__slug__meta_fields_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaFieldCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/meta-fields/{meta_field_id}:
    patch:
      tags:
        - meta-fields
      summary: Update Meta Field
      operationId: >-
        update_meta_field_api_v1_projects__slug__meta_fields__meta_field_id__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: meta_field_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Meta Field Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaFieldUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaFieldResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - meta-fields
      summary: Delete Meta Field
      operationId: >-
        delete_meta_field_api_v1_projects__slug__meta_fields__meta_field_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: meta_field_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Meta Field Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events:
    get:
      tags:
        - events
      summary: List Events
      operationId: list_events_api_v1_projects__slug__events_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Event Type Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            title: Status
        - name: tag
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tag
        - name: silent_since_days
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 3650
                minimum: 0
              - type: 'null'
            title: Silent Since Days
        - name: field_value
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Field Value
        - name: meta_value
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Meta Value
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            minimum: 1
            default: 200
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - events
      summary: Create Event
      operationId: create_event_api_v1_projects__slug__events_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/tags:
    get:
      tags:
        - events
      summary: List Tags
      operationId: list_tags_api_v1_projects__slug__events_tags_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                title: Response List Tags Api V1 Projects  Slug  Events Tags Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/bulk:
    post:
      tags:
        - events
      summary: Bulk Create Events
      operationId: bulk_create_events_api_v1_projects__slug__events_bulk_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/EventCreate'
              title: Data
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventResponse'
                title: >-
                  Response Bulk Create Events Api V1 Projects  Slug  Events Bulk
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/bulk-delete:
    post:
      tags:
        - events
      summary: Bulk Delete Events
      operationId: bulk_delete_events_api_v1_projects__slug__events_bulk_delete_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventBulkDelete'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/bulk-update:
    post:
      tags:
        - events
      summary: Bulk Update Events
      operationId: bulk_update_events_api_v1_projects__slug__events_bulk_update_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventBulkUpdate'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/reorder:
    patch:
      tags:
        - events
      summary: Reorder Events
      operationId: reorder_events_api_v1_projects__slug__events_reorder_patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventReorder'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventResponse'
                title: >-
                  Response Reorder Events Api V1 Projects  Slug  Events Reorder
                  Patch
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}:
    get:
      tags:
        - events
      summary: Get Event
      operationId: get_event_api_v1_projects__slug__events__event_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - events
      summary: Update Event
      operationId: update_event_api_v1_projects__slug__events__event_id__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - events
      summary: Delete Event
      operationId: delete_event_api_v1_projects__slug__events__event_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/history:
    get:
      tags:
        - events
      summary: Get Event History
      operationId: get_event_history_api_v1_projects__slug__events__event_id__history_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventChangeResponse'
                title: >-
                  Response Get Event History Api V1 Projects  Slug  Events 
                  Event Id  History Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/move:
    patch:
      tags:
        - events
      summary: Move Event
      operationId: move_event_api_v1_projects__slug__events__event_id__move_patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventMove'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/photos:
    get:
      tags:
        - event-photos
      summary: List Event Photos
      operationId: list_event_photos_api_v1_projects__slug__events__event_id__photos_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventPhotoResponse'
                title: >-
                  Response List Event Photos Api V1 Projects  Slug  Events 
                  Event Id  Photos Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - event-photos
      summary: Upload Event Photo
      operationId: upload_event_photo_api_v1_projects__slug__events__event_id__photos_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_event_photo_api_v1_projects__slug__events__event_id__photos_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventPhotoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/photos/reorder:
    patch:
      tags:
        - event-photos
      summary: Reorder Event Photos
      operationId: >-
        reorder_event_photos_api_v1_projects__slug__events__event_id__photos_reorder_patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventPhotoReorder'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventPhotoResponse'
                title: >-
                  Response Reorder Event Photos Api V1 Projects  Slug  Events 
                  Event Id  Photos Reorder Patch
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/photos/{photo_id}:
    delete:
      tags:
        - event-photos
      summary: Delete Event Photo
      operationId: >-
        delete_event_photo_api_v1_projects__slug__events__event_id__photos__photo_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
        - name: photo_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Photo Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/photos/{photo_id}/file:
    get:
      tags:
        - event-photos
      summary: Download Event Photo
      description: >-
        Stream the photo bytes through the API.


        Used for the local backend (where blobs aren't web-reachable) and as a

        fallback if GCS URL generation ever fails. GCS-backed photos normally

        redirect to a signed URL on the list response, so this endpoint is
        rarely

        hit in production.
      operationId: >-
        download_event_photo_api_v1_projects__slug__events__event_id__photos__photo_id__file_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
        - name: photo_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Photo Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/photos/figma:
    post:
      tags:
        - event-photos
      summary: Attach Figma Spec
      operationId: >-
        attach_figma_spec_api_v1_projects__slug__events__event_id__photos_figma_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventPhotoFigmaCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventPhotoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/photos/{photo_id}/comments:
    get:
      tags:
        - event-photos
      summary: List Photo Comments
      operationId: >-
        list_photo_comments_api_v1_projects__slug__events__event_id__photos__photo_id__comments_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
        - name: photo_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Photo Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventPhotoCommentResponse'
                title: >-
                  Response List Photo Comments Api V1 Projects  Slug  Events 
                  Event Id  Photos  Photo Id  Comments Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - event-photos
      summary: Create Photo Comment
      operationId: >-
        create_photo_comment_api_v1_projects__slug__events__event_id__photos__photo_id__comments_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
        - name: photo_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Photo Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventPhotoCommentCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventPhotoCommentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/photos/{photo_id}/comments/{comment_id}:
    delete:
      tags:
        - event-photos
      summary: Delete Photo Comment
      operationId: >-
        delete_photo_comment_api_v1_projects__slug__events__event_id__photos__photo_id__comments__comment_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
        - name: photo_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Photo Id
        - name: comment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Comment Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/variables:
    get:
      tags:
        - variables
      summary: List Variables
      operationId: list_variables_api_v1_projects__slug__variables_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VariableResponse'
                title: Response List Variables Api V1 Projects  Slug  Variables Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - variables
      summary: Create Variable
      operationId: create_variable_api_v1_projects__slug__variables_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariableCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariableResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/variables/{variable_id}/values:
    get:
      tags:
        - variables
      summary: List Variable Values
      operationId: >-
        list_variable_values_api_v1_projects__slug__variables__variable_id__values_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: variable_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Variable Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VariableValueContextResponse'
                title: >-
                  Response List Variable Values Api V1 Projects  Slug 
                  Variables  Variable Id  Values Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/variables/{variable_id}:
    patch:
      tags:
        - variables
      summary: Update Variable
      operationId: update_variable_api_v1_projects__slug__variables__variable_id__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: variable_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Variable Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariableUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariableResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - variables
      summary: Delete Variable
      operationId: delete_variable_api_v1_projects__slug__variables__variable_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: variable_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Variable Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/data-sources:
    get:
      tags:
        - data-sources
      summary: List Data Sources
      operationId: list_data_sources_api_v1_data_sources_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/DataSourceResponse'
                type: array
                title: Response List Data Sources Api V1 Data Sources Get
    post:
      tags:
        - data-sources
      summary: Create Data Source
      operationId: create_data_source_api_v1_data_sources_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataSourceCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSourceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/data-sources/{ds_id}:
    get:
      tags:
        - data-sources
      summary: Get Data Source
      operationId: get_data_source_api_v1_data_sources__ds_id__get
      parameters:
        - name: ds_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Ds Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSourceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - data-sources
      summary: Update Data Source
      operationId: update_data_source_api_v1_data_sources__ds_id__patch
      parameters:
        - name: ds_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Ds Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataSourceUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSourceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - data-sources
      summary: Delete Data Source
      operationId: delete_data_source_api_v1_data_sources__ds_id__delete
      parameters:
        - name: ds_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Ds Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/data-sources/{ds_id}/stats:
    get:
      tags:
        - data-sources
      summary: Get Data Source Stats
      operationId: get_data_source_stats_api_v1_data_sources__ds_id__stats_get
      parameters:
        - name: ds_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Ds Id
        - name: window_hours
          in: query
          required: false
          schema:
            type: integer
            maximum: 720
            minimum: 1
            default: 48
            title: Window Hours
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSourceStatsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/data-sources/{ds_id}/schema:
    get:
      tags:
        - data-sources
      summary: Get Data Source Schema
      operationId: get_data_source_schema_api_v1_data_sources__ds_id__schema_get
      parameters:
        - name: ds_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Ds Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSourceSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/data-sources/{ds_id}/test:
    post:
      tags:
        - data-sources
      summary: Test Data Source Connection
      operationId: test_data_source_connection_api_v1_data_sources__ds_id__test_post
      parameters:
        - name: ds_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Ds Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSourceTestResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans:
    get:
      tags:
        - scans
      summary: List Scan Configs
      operationId: list_scan_configs_api_v1_projects__slug__scans_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScanConfigResponse'
                title: Response List Scan Configs Api V1 Projects  Slug  Scans Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - scans
      summary: Create Scan Config
      operationId: create_scan_config_api_v1_projects__slug__scans_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanConfigCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanConfigResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/preview:
    post:
      tags:
        - scans
      summary: Preview Scan Config
      description: Enqueue a preview job; poll GET /preview-jobs/{job_id} for the result.
      operationId: preview_scan_config_api_v1_projects__slug__scans_preview_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanConfigPreviewRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanPreviewJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/preview-jobs/{job_id}:
    get:
      tags:
        - scans
      summary: Get Scan Preview Job
      operationId: >-
        get_scan_preview_job_api_v1_projects__slug__scans_preview_jobs__job_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanPreviewJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_id}:
    get:
      tags:
        - scans
      summary: Get Scan Config
      operationId: get_scan_config_api_v1_projects__slug__scans__scan_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanConfigResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
        - scans
      summary: Update Scan Config
      operationId: update_scan_config_api_v1_projects__slug__scans__scan_id__patch
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanConfigUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanConfigResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - scans
      summary: Delete Scan Config
      operationId: delete_scan_config_api_v1_projects__slug__scans__scan_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_id}/run:
    post:
      tags:
        - scans
      summary: Run Scan
      operationId: run_scan_api_v1_projects__slug__scans__scan_id__run_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_id}/event-groups/apply:
    post:
      tags:
        - scans
      summary: Apply Scan Event Groups
      operationId: >-
        apply_scan_event_groups_api_v1_projects__slug__scans__scan_id__event_groups_apply_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_id}/metrics/replay:
    post:
      tags:
        - scans
      summary: Replay Scan Metrics
      operationId: >-
        replay_scan_metrics_api_v1_projects__slug__scans__scan_id__metrics_replay_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanMetricsReplayRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_id}/jobs:
    get:
      tags:
        - scans
      summary: List Scan Jobs
      operationId: list_scan_jobs_api_v1_projects__slug__scans__scan_id__jobs_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScanJobResponse'
                title: >-
                  Response List Scan Jobs Api V1 Projects  Slug  Scans  Scan Id 
                  Jobs Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_id}/jobs/{job_id}:
    get:
      tags:
        - scans
      summary: Get Scan Job
      operationId: get_scan_job_api_v1_projects__slug__scans__scan_id__jobs__job_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_id}/jobs/{job_id}/cancel:
    post:
      tags:
        - scans
      summary: Cancel Scan Job
      operationId: >-
        cancel_scan_job_api_v1_projects__slug__scans__scan_id__jobs__job_id__cancel_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Id
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanJobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/search:
    get:
      tags:
        - search
      summary: Search Project
      operationId: search_project_api_v1_projects__slug__search_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: q
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 500
            title: Q
        - name: types
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  enum:
                    - event
                    - event_type
                    - field
                    - meta_field
                    - variable
                    - relation
                    - tag
                  type: string
              - type: 'null'
            title: Types
        - name: include_archived
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Archived
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/search/reindex:
    post:
      tags:
        - search
      summary: Reindex Project Search
      operationId: reindex_project_search_api_v1_projects__slug__search_reindex_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchReindexResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events-metrics:
    get:
      tags:
        - metrics
      summary: Get Events Metrics
      operationId: get_events_metrics_api_v1_projects__slug__events_metrics_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Event Type Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: tag
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tag
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            title: Status
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventMetricsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/window-metrics:
    post:
      tags:
        - metrics
      summary: Get Events Window Metrics
      operationId: >-
        get_events_window_metrics_api_v1_projects__slug__events_window_metrics_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventWindowMetricsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventWindowMetricsResponse'
                title: >-
                  Response Get Events Window Metrics Api V1 Projects  Slug 
                  Events Window Metrics Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/overview/kpi-series:
    get:
      tags:
        - metrics
      summary: Get Overview Kpi Series
      operationId: get_overview_kpi_series_api_v1_projects__slug__overview_kpi_series_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: days
          in: query
          required: false
          schema:
            type: integer
            maximum: 365
            minimum: 1
            default: 14
            title: Days
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OverviewKpiSeriesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/overview/top-events:
    get:
      tags:
        - metrics
      summary: Get Overview Top Events
      operationId: get_overview_top_events_api_v1_projects__slug__overview_top_events_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: window_hours
          in: query
          required: false
          schema:
            type: integer
            maximum: 720
            minimum: 1
            default: 48
            title: Window Hours
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 6
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TopEventResponse'
                title: >-
                  Response Get Overview Top Events Api V1 Projects  Slug 
                  Overview Top Events Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/metrics/total:
    get:
      tags:
        - metrics
      summary: Get Project Total Metrics
      operationId: get_project_total_metrics_api_v1_projects__slug__metrics_total_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_config_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Scan Config Id
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventMetricsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/metrics:
    get:
      tags:
        - metrics
      summary: Get Event Metrics
      operationId: get_event_metrics_api_v1_projects__slug__events__event_id__metrics_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventMetricsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/events/{event_id}/metrics/breakdowns:
    get:
      tags:
        - metrics
      summary: Get Event Metric Breakdowns
      operationId: >-
        get_event_metric_breakdowns_api_v1_projects__slug__events__event_id__metrics_breakdowns_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Id
        - name: column
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Column
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventMetricBreakdownsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/event-types/{event_type_id}/metrics:
    get:
      tags:
        - metrics
      summary: Get Event Type Metrics
      operationId: >-
        get_event_type_metrics_api_v1_projects__slug__event_types__event_type_id__metrics_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_type_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Event Type Id
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventMetricsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/anomalies/signals:
    get:
      tags:
        - metrics
      summary: Get Active Signals
      description: |-
        Cacheable no-args variant. For filtering by a large event-id list
        (>>a few), prefer ``POST /anomalies/signals/query`` — GET's query-string
        overflow is real once you cross ~50 ids (proxy/browser limits).
      operationId: get_active_signals_api_v1_projects__slug__anomalies_signals_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: event_id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid
              - type: 'null'
            title: Event Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricSignalResponse'
                title: >-
                  Response Get Active Signals Api V1 Projects  Slug  Anomalies
                  Signals Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/anomalies/signals/query:
    post:
      tags:
        - metrics
      summary: Query Active Signals
      operationId: query_active_signals_api_v1_projects__slug__anomalies_signals_query_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActiveSignalsQuery'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricSignalResponse'
                title: >-
                  Response Query Active Signals Api V1 Projects  Slug  Anomalies
                  Signals Query Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_config_id}/top-movers:
    get:
      tags:
        - metrics
      summary: Get Top Movers
      description: Top-N breakdown rows that "moved" a given anomaly bucket, |z| desc.
      operationId: >-
        get_top_movers_api_v1_projects__slug__scans__scan_config_id__top_movers_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_config_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Config Id
        - name: scope_type
          in: query
          required: true
          schema:
            type: string
            title: Scope Type
        - name: scope_ref
          in: query
          required: true
          schema:
            type: string
            title: Scope Ref
        - name: bucket
          in: query
          required: true
          schema:
            type: string
            format: date-time
            title: Bucket
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TopMoverItem'
                title: >-
                  Response Get Top Movers Api V1 Projects  Slug  Scans  Scan
                  Config Id  Top Movers Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_config_id}/seasonality:
    get:
      tags:
        - metrics
      summary: Get Seasonality Heatmap
      description: 7×24 hour-of-day × weekday heatmap of volume and anomaly density.
      operationId: >-
        get_seasonality_heatmap_api_v1_projects__slug__scans__scan_config_id__seasonality_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_config_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Config Id
        - name: scope_type
          in: query
          required: true
          schema:
            type: string
            title: Scope Type
        - name: scope_ref
          in: query
          required: true
          schema:
            type: string
            title: Scope Ref
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeasonalityHeatmapResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_config_id}/breakdown-timeline:
    get:
      tags:
        - metrics
      summary: Get Breakdown Timeline
      description: Per-bucket count timeline for one breakdown_value (drill-down).
      operationId: >-
        get_breakdown_timeline_api_v1_projects__slug__scans__scan_config_id__breakdown_timeline_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_config_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Config Id
        - name: scope_type
          in: query
          required: true
          schema:
            type: string
            title: Scope Type
        - name: scope_ref
          in: query
          required: true
          schema:
            type: string
            title: Scope Ref
        - name: breakdown_column
          in: query
          required: true
          schema:
            type: string
            title: Breakdown Column
        - name: breakdown_value
          in: query
          required: true
          schema:
            type: string
            title: Breakdown Value
        - name: is_other
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Is Other
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BreakdownTimelineResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_config_id}/app-versions:
    get:
      tags:
        - metrics
      summary: Get App Version Series
      operationId: >-
        get_app_version_series_api_v1_projects__slug__scans__scan_config_id__app_versions_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_config_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Config Id
        - name: scope_type
          in: query
          required: false
          schema:
            type: string
            default: project_total
            title: Scope Type
        - name: scope_ref
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Scope Ref
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionSeriesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_config_id}/version-adoption:
    get:
      tags:
        - metrics
      summary: Get App Version Adoption
      operationId: >-
        get_app_version_adoption_api_v1_projects__slug__scans__scan_config_id__version_adoption_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_config_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Config Id
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionAdoptionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/scans/{scan_config_id}/release-regressions:
    get:
      tags:
        - metrics
      summary: Get Release Regressions
      operationId: >-
        get_release_regressions_api_v1_projects__slug__scans__scan_config_id__release_regressions_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scan_config_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Scan Config Id
        - name: scope_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Scope Type
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseRegressionsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/distribution-drifts:
    get:
      tags:
        - metrics
      summary: Get Distribution Drifts
      operationId: get_distribution_drifts_api_v1_projects__slug__distribution_drifts_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scope_type
          in: query
          required: true
          schema:
            type: string
            title: Scope Type
        - name: scope_ref
          in: query
          required: true
          schema:
            type: string
            title: Scope Ref
        - name: scan_config_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Scan Config Id
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributionDriftsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/annotations:
    get:
      tags:
        - chart-annotations
      summary: List Chart Annotations
      operationId: list_chart_annotations_api_v1_projects__slug__annotations_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: scope_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Scope Type
        - name: scope_ref
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Scope Ref
        - name: time_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Time From
        - name: time_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Time To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChartAnnotationResponse'
                title: >-
                  Response List Chart Annotations Api V1 Projects  Slug 
                  Annotations Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - chart-annotations
      summary: Create Chart Annotation
      operationId: create_chart_annotation_api_v1_projects__slug__annotations_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChartAnnotationCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChartAnnotationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/annotations/{annotation_id}:
    delete:
      tags:
        - chart-annotations
      summary: Delete Chart Annotation
      operationId: >-
        delete_chart_annotation_api_v1_projects__slug__annotations__annotation_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: annotation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Annotation Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches:
    get:
      tags:
        - plan-branches
      summary: List Branches
      operationId: list_branches_api_v1_projects__slug__branches_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanBranchList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - plan-branches
      summary: Create Branch
      operationId: create_branch_api_v1_projects__slug__branches_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanBranchCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanBranchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}:
    get:
      tags:
        - plan-branches
      summary: Get Branch
      operationId: get_branch_api_v1_projects__slug__branches__branch_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanBranchDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
        - plan-branches
      summary: Delete Branch
      operationId: delete_branch_api_v1_projects__slug__branches__branch_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/transition:
    post:
      tags:
        - plan-branches
      summary: Transition Branch
      operationId: >-
        transition_branch_api_v1_projects__slug__branches__branch_id__transition_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BranchTransitionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanBranchDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/reviewers:
    post:
      tags:
        - plan-branches
      summary: Add Reviewer
      operationId: add_reviewer_api_v1_projects__slug__branches__branch_id__reviewers_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BranchReviewerCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchReviewerResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/reviewers/{user_id}:
    delete:
      tags:
        - plan-branches
      summary: Remove Reviewer
      operationId: >-
        remove_reviewer_api_v1_projects__slug__branches__branch_id__reviewers__user_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/comments:
    get:
      tags:
        - plan-branches
      summary: List Comments
      operationId: list_comments_api_v1_projects__slug__branches__branch_id__comments_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BranchCommentResponse'
                title: >-
                  Response List Comments Api V1 Projects  Slug  Branches  Branch
                  Id  Comments Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - plan-branches
      summary: Create Comment
      operationId: create_comment_api_v1_projects__slug__branches__branch_id__comments_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BranchCommentCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchCommentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/comments/{comment_id}:
    delete:
      tags:
        - plan-branches
      summary: Delete Comment
      operationId: >-
        delete_comment_api_v1_projects__slug__branches__branch_id__comments__comment_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
        - name: comment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Comment Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/diff:
    get:
      tags:
        - plan-branches
      summary: Diff Branch
      operationId: diff_branch_api_v1_projects__slug__branches__branch_id__diff_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanBranchDiff'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/conflicts:
    get:
      tags:
        - plan-branches
      summary: Get Branch Conflicts
      operationId: >-
        get_branch_conflicts_api_v1_projects__slug__branches__branch_id__conflicts_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchConflictsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/resolutions:
    post:
      tags:
        - plan-branches
      summary: Save Branch Resolution
      operationId: >-
        save_branch_resolution_api_v1_projects__slug__branches__branch_id__resolutions_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolutionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolutionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/resolutions/{resolution_id}:
    delete:
      tags:
        - plan-branches
      summary: Delete Branch Resolution
      operationId: >-
        delete_branch_resolution_api_v1_projects__slug__branches__branch_id__resolutions__resolution_id__delete
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
        - name: resolution_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Resolution Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/branches/{branch_id}/merge:
    post:
      tags:
        - plan-branches
      summary: Merge Branch
      operationId: merge_branch_api_v1_projects__slug__branches__branch_id__merge_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: branch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Branch Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanBranchDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/revisions:
    post:
      tags:
        - plan-revisions
      summary: Create Revision
      operationId: create_revision_api_v1_projects__slug__revisions_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanRevisionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanRevisionDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
        - plan-revisions
      summary: List Revisions
      operationId: list_revisions_api_v1_projects__slug__revisions_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanRevisionList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/revisions/{revision_id}:
    get:
      tags:
        - plan-revisions
      summary: Get Revision
      operationId: get_revision_api_v1_projects__slug__revisions__revision_id__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: revision_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Revision Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanRevisionDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/revisions/{revision_id}/diff:
    get:
      tags:
        - plan-revisions
      summary: Diff Revision
      operationId: diff_revision_api_v1_projects__slug__revisions__revision_id__diff_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: revision_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Revision Id
        - name: compare_to
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Compare To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanDiff'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/reconciliation/shadow-events:
    get:
      tags:
        - reconciliation
      summary: List Shadow Events
      operationId: >-
        list_shadow_events_api_v1_projects__slug__reconciliation_shadow_events_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/ShadowEventStatus'
              - type: 'null'
            title: Status
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 100
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShadowEventListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/reconciliation/shadow-events/{candidate_id}/accept:
    post:
      tags:
        - reconciliation
      summary: Accept Shadow Event
      operationId: >-
        accept_shadow_event_api_v1_projects__slug__reconciliation_shadow_events__candidate_id__accept_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: candidate_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Candidate Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShadowEventAcceptRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShadowEventAcceptResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/reconciliation/shadow-events/{candidate_id}/dismiss:
    post:
      tags:
        - reconciliation
      summary: Dismiss Shadow Event
      operationId: >-
        dismiss_shadow_event_api_v1_projects__slug__reconciliation_shadow_events__candidate_id__dismiss_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: candidate_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Candidate Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShadowEventDismissResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/reconciliation/dead-events:
    get:
      tags:
        - reconciliation
      summary: List Dead Events
      operationId: list_dead_events_api_v1_projects__slug__reconciliation_dead_events_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: days
          in: query
          required: false
          schema:
            type: integer
            maximum: 365
            minimum: 1
            default: 30
            title: Days
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeadEventListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/reconciliation/dead-events/archive:
    post:
      tags:
        - reconciliation
      summary: Archive Dead Events
      operationId: >-
        archive_dead_events_api_v1_projects__slug__reconciliation_dead_events_archive_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeadEventArchiveRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeadEventArchiveResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/projects/{slug}/reconciliation/coverage:
    get:
      tags:
        - reconciliation
      summary: Get Coverage
      operationId: get_coverage_api_v1_projects__slug__reconciliation_coverage_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: days
          in: query
          required: false
          schema:
            type: integer
            maximum: 180
            minimum: 1
            default: 14
            title: Days
        - name: scan_config_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Scan Config Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoverageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/audit:
    get:
      tags:
        - audit
      summary: List Audit
      operationId: list_audit_api_v1_audit_get
      parameters:
        - name: project_slug
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Project Slug
        - name: action
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Action
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: User Id
        - name: user_email
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: User Email
        - name: since
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Since
        - name: until
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Until
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/users:
    get:
      tags:
        - users
      summary: List Users
      operationId: list_users_api_v1_users_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 200
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserListItem'
                title: Response List Users Api V1 Users Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/users/{user_id}:
    patch:
      tags:
        - users
      summary: Update User Role
      operationId: update_user_role_api_v1_users__user_id__patch
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRoleUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserListItem'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/me/api-keys:
    get:
      tags:
        - api-keys
      summary: List Api Keys
      operationId: list_api_keys_api_v1_me_api_keys_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ApiKeyResponse'
                type: array
                title: Response List Api Keys Api V1 Me Api Keys Get
    post:
      tags:
        - api-keys
      summary: Create Api Key
      operationId: create_api_key_api_v1_me_api_keys_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/me/api-keys/{key_id}:
    delete:
      tags:
        - api-keys
      summary: Revoke Api Key
      operationId: revoke_api_key_api_v1_me_api_keys__key_id__delete
      parameters:
        - name: key_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Key Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ActiveSignalsQuery:
      properties:
        event_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Event Ids
          default: []
      type: object
      title: ActiveSignalsQuery
    ActivityItemResponse:
      properties:
        id:
          type: string
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        project_slug:
          type: string
          title: Project Slug
        project_name:
          type: string
          title: Project Name
        type:
          type: string
          enum:
            - anomaly
            - scan
            - alert
            - event
          title: Type
        severity:
          type: string
          enum:
            - high
            - medium
            - low
          title: Severity
        title:
          type: string
          title: Title
        detail:
          type: string
          title: Detail
        occurred_at:
          type: string
          format: date-time
          title: Occurred At
        target_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Path
      type: object
      required:
        - id
        - project_id
        - project_slug
        - project_name
        - type
        - severity
        - title
        - detail
        - occurred_at
      title: ActivityItemResponse
    AiAskRequest:
      properties:
        question:
          type: string
          maxLength: 500
          minLength: 3
          title: Question
      type: object
      required:
        - question
      title: AiAskRequest
    AiAskResponse:
      properties:
        answer:
          type: string
          title: Answer
        sources:
          items:
            $ref: '#/components/schemas/AiAskSource'
          type: array
          title: Sources
        semantic_used:
          type: boolean
          title: Semantic Used
      type: object
      required:
        - answer
        - sources
        - semantic_used
      title: AiAskResponse
    AiAskSource:
      properties:
        title:
          type: string
          title: Title
        entity_type:
          type: string
          title: Entity Type
        route_path:
          type: string
          title: Route Path
      type: object
      required:
        - title
        - entity_type
        - route_path
      title: AiAskSource
    AiDescribeEventRequest:
      properties:
        event_id:
          type: string
          format: uuid
          title: Event Id
      type: object
      required:
        - event_id
      title: AiDescribeEventRequest
    AiDescribeEventTypeRequest:
      properties:
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
      type: object
      required:
        - event_type_id
      title: AiDescribeEventTypeRequest
    AiDescribeResponse:
      properties:
        description:
          type: string
          title: Description
        field_suggestions:
          items:
            $ref: '#/components/schemas/AiFieldSuggestion'
          type: array
          title: Field Suggestions
      type: object
      required:
        - description
        - field_suggestions
      title: AiDescribeResponse
    AiFieldSuggestion:
      properties:
        field_name:
          type: string
          title: Field Name
        description:
          type: string
          title: Description
      type: object
      required:
        - field_name
        - description
      title: AiFieldSuggestion
    AiSettings:
      properties:
        ai_enabled:
          type: boolean
          title: Ai Enabled
        ai_base_url:
          type: string
          title: Ai Base Url
        ai_model:
          type: string
          title: Ai Model
        ai_api_key_configured:
          type: boolean
          title: Ai Api Key Configured
        ai_timeout_seconds:
          type: integer
          title: Ai Timeout Seconds
        ai_max_output_tokens:
          type: integer
          title: Ai Max Output Tokens
        describe_system_prompt:
          type: string
          title: Describe System Prompt
        ask_system_prompt:
          type: string
          title: Ask System Prompt
        alert_explanation_system_prompt:
          type: string
          title: Alert Explanation System Prompt
        search_embeddings_enabled:
          type: boolean
          title: Search Embeddings Enabled
        search_embedding_provider:
          type: string
          title: Search Embedding Provider
        search_embedding_model:
          type: string
          title: Search Embedding Model
        search_embedding_api_key_configured:
          type: boolean
          title: Search Embedding Api Key Configured
        search_embedding_dimensions:
          type: integer
          title: Search Embedding Dimensions
      type: object
      required:
        - ai_enabled
        - ai_base_url
        - ai_model
        - ai_api_key_configured
        - ai_timeout_seconds
        - ai_max_output_tokens
        - describe_system_prompt
        - ask_system_prompt
        - alert_explanation_system_prompt
        - search_embeddings_enabled
        - search_embedding_provider
        - search_embedding_model
        - search_embedding_api_key_configured
        - search_embedding_dimensions
      title: AiSettings
    AiSettingsResponse:
      properties:
        ai:
          $ref: '#/components/schemas/AiSettings'
        overridden_fields:
          items:
            type: string
          type: array
          title: Overridden Fields
        sources:
          additionalProperties:
            type: string
            enum:
              - env
              - override
          type: object
          title: Sources
      type: object
      required:
        - ai
        - overridden_fields
        - sources
      title: AiSettingsResponse
    AiSettingsTestRequest:
      properties:
        prompt:
          type: string
          maxLength: 500
          minLength: 1
          title: Prompt
          default: Reply with the word ok if the LLM connection works.
      type: object
      title: AiSettingsTestRequest
    AiSettingsUpdate:
      properties:
        ai_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ai Enabled
        ai_base_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Base Url
        ai_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Model
        ai_api_key:
          anyOf:
            - type: string
              maxLength: 4096
            - type: 'null'
          title: Ai Api Key
        ai_timeout_seconds:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Ai Timeout Seconds
        ai_max_output_tokens:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Ai Max Output Tokens
        describe_system_prompt:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Describe System Prompt
        ask_system_prompt:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Ask System Prompt
        alert_explanation_system_prompt:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Alert Explanation System Prompt
        search_embeddings_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Search Embeddings Enabled
        search_embedding_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Search Embedding Provider
        search_embedding_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Search Embedding Model
        search_embedding_api_key:
          anyOf:
            - type: string
              maxLength: 4096
            - type: 'null'
          title: Search Embedding Api Key
      type: object
      title: AiSettingsUpdate
    AiStatusResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
      type: object
      required:
        - enabled
      title: AiStatusResponse
    AlertDeliveryDetailResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scan_job_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Scan Job Id
        destination_id:
          type: string
          format: uuid
          title: Destination Id
        rule_id:
          type: string
          format: uuid
          title: Rule Id
        destination_name:
          type: string
          title: Destination Name
        rule_name:
          type: string
          title: Rule Name
        scan_name:
          type: string
          title: Scan Name
        status:
          $ref: '#/components/schemas/AlertDeliveryStatus'
        channel:
          $ref: '#/components/schemas/AlertDestinationType'
        matched_count:
          type: integer
          title: Matched Count
        payload_snapshot:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Payload Snapshot
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        sent_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sent At
        items:
          items:
            $ref: '#/components/schemas/AlertDeliveryItemResponse'
          type: array
          title: Items
      type: object
      required:
        - id
        - project_id
        - scan_config_id
        - scan_job_id
        - destination_id
        - rule_id
        - destination_name
        - rule_name
        - scan_name
        - status
        - channel
        - matched_count
        - payload_snapshot
        - error_message
        - created_at
        - updated_at
        - sent_at
        - items
      title: AlertDeliveryDetailResponse
    AlertDeliveryItemResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        delivery_id:
          type: string
          format: uuid
          title: Delivery Id
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        scope_name:
          type: string
          title: Scope Name
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Id
        bucket:
          type: string
          format: date-time
          title: Bucket
        direction:
          $ref: '#/components/schemas/AnomalyDirection'
        actual_count:
          type: integer
          title: Actual Count
        expected_count:
          type: integer
          title: Expected Count
        absolute_delta:
          type: integer
          title: Absolute Delta
        percent_delta:
          type: number
          title: Percent Delta
        details_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Details Path
        monitoring_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Monitoring Path
        drift_field:
          anyOf:
            - type: string
            - type: 'null'
          title: Drift Field
        drift_type:
          anyOf:
            - $ref: '#/components/schemas/AlertDriftType'
            - type: 'null'
        sample_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Sample Value
        correlation_group_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Correlation Group Id
      type: object
      required:
        - id
        - delivery_id
        - scope_type
        - scope_ref
        - scope_name
        - event_type_id
        - event_id
        - bucket
        - direction
        - actual_count
        - expected_count
        - absolute_delta
        - percent_delta
        - details_path
        - monitoring_path
        - drift_field
        - drift_type
        - sample_value
      title: AlertDeliveryItemResponse
    AlertDeliveryListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AlertDeliveryResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
      type: object
      required:
        - items
        - total
      title: AlertDeliveryListResponse
    AlertDeliveryResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scan_job_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Scan Job Id
        destination_id:
          type: string
          format: uuid
          title: Destination Id
        rule_id:
          type: string
          format: uuid
          title: Rule Id
        destination_name:
          type: string
          title: Destination Name
        rule_name:
          type: string
          title: Rule Name
        scan_name:
          type: string
          title: Scan Name
        status:
          $ref: '#/components/schemas/AlertDeliveryStatus'
        channel:
          $ref: '#/components/schemas/AlertDestinationType'
        matched_count:
          type: integer
          title: Matched Count
        payload_snapshot:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Payload Snapshot
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        sent_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sent At
      type: object
      required:
        - id
        - project_id
        - scan_config_id
        - scan_job_id
        - destination_id
        - rule_id
        - destination_name
        - rule_name
        - scan_name
        - status
        - channel
        - matched_count
        - payload_snapshot
        - error_message
        - created_at
        - updated_at
        - sent_at
      title: AlertDeliveryResponse
    AlertDeliveryStatus:
      type: string
      enum:
        - pending
        - sent
        - failed
      title: AlertDeliveryStatus
    AlertDestinationCreate:
      properties:
        type:
          $ref: '#/components/schemas/AlertDestinationType'
        name:
          type: string
          title: Name
        enabled:
          type: boolean
          title: Enabled
          default: true
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
        bot_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Token
        chat_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chat Id
        target_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Url
        webhook_header_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Header Name
        webhook_header_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Header Value
        email_recipients:
          anyOf:
            - type: string
            - type: 'null'
          title: Email Recipients
        email_from_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Email From Address
        email_subject_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Email Subject Template
        jira_base_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Base Url
        jira_auth_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Auth Email
        jira_api_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Api Token
        jira_project_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Project Key
        jira_issue_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Issue Type
        linear_api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear Api Key
        linear_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear Team Id
        linear_state_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear State Id
        linear_label_ids:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear Label Ids
      type: object
      required:
        - type
        - name
      title: AlertDestinationCreate
    AlertDestinationResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        type:
          $ref: '#/components/schemas/AlertDestinationType'
        name:
          type: string
          title: Name
        enabled:
          type: boolean
          title: Enabled
        webhook_set:
          type: boolean
          title: Webhook Set
        bot_token_set:
          type: boolean
          title: Bot Token Set
        chat_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chat Id
        target_url_set:
          type: boolean
          title: Target Url Set
        webhook_header_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Header Name
        email_recipients:
          anyOf:
            - type: string
            - type: 'null'
          title: Email Recipients
        email_from_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Email From Address
        email_subject_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Email Subject Template
        jira_base_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Base Url
        jira_auth_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Auth Email
        jira_api_token_set:
          type: boolean
          title: Jira Api Token Set
        jira_project_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Project Key
        jira_issue_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Issue Type
        linear_api_key_set:
          type: boolean
          title: Linear Api Key Set
        linear_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear Team Id
        linear_state_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear State Id
        linear_label_ids:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear Label Ids
        rules:
          items:
            $ref: '#/components/schemas/AlertRuleResponse'
          type: array
          title: Rules
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - type
        - name
        - enabled
        - webhook_set
        - bot_token_set
        - chat_id
        - target_url_set
        - webhook_header_name
        - email_recipients
        - email_from_address
        - email_subject_template
        - jira_base_url
        - jira_auth_email
        - jira_api_token_set
        - jira_project_key
        - jira_issue_type
        - linear_api_key_set
        - linear_team_id
        - linear_state_id
        - linear_label_ids
        - rules
        - created_at
        - updated_at
      title: AlertDestinationResponse
    AlertDestinationType:
      type: string
      enum:
        - slack
        - telegram
        - webhook
        - email
        - jira
        - linear
      title: AlertDestinationType
    AlertDestinationUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
        bot_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Bot Token
        chat_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chat Id
        target_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Url
        webhook_header_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Header Name
        webhook_header_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Header Value
        email_recipients:
          anyOf:
            - type: string
            - type: 'null'
          title: Email Recipients
        email_from_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Email From Address
        email_subject_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Email Subject Template
        jira_base_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Base Url
        jira_auth_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Auth Email
        jira_api_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Api Token
        jira_project_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Project Key
        jira_issue_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Jira Issue Type
        linear_api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear Api Key
        linear_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear Team Id
        linear_state_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear State Id
        linear_label_ids:
          anyOf:
            - type: string
            - type: 'null'
          title: Linear Label Ids
      type: object
      title: AlertDestinationUpdate
    AlertDriftType:
      type: string
      enum:
        - new_field
        - missing_field
        - type_changed
        - enum_violation
        - required_null_violation
        - regex_violation
        - range_violation
        - distribution_shift
        - missing
        - volume_drop
      title: AlertDriftType
    AlertInboxActionRequest:
      properties:
        action:
          type: string
          enum:
            - acknowledge
            - resolve
            - mute
            - reopen
            - false_positive
          title: Action
        note:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Note
        muted_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Muted Until
      type: object
      required:
        - action
      title: AlertInboxActionRequest
    AlertInboxGroupResponse:
      properties:
        correlation_group_id:
          type: string
          format: uuid
          title: Correlation Group Id
        status:
          $ref: '#/components/schemas/AlertInboxStatus'
        muted_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Muted Until
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        false_positive_count:
          type: integer
          title: False Positive Count
          default: 0
        item_count:
          type: integer
          title: Item Count
        delivery_count:
          type: integer
          title: Delivery Count
        latest_bucket:
          type: string
          format: date-time
          title: Latest Bucket
        latest_delivery_at:
          type: string
          format: date-time
          title: Latest Delivery At
        direction:
          $ref: '#/components/schemas/AnomalyDirection'
        scope_names:
          items:
            type: string
          type: array
          title: Scope Names
        destination_names:
          items:
            type: string
          type: array
          title: Destination Names
        rule_names:
          items:
            type: string
          type: array
          title: Rule Names
        scan_names:
          items:
            type: string
          type: array
          title: Scan Names
        acted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Acted At
        acted_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Acted By
      type: object
      required:
        - correlation_group_id
        - status
        - item_count
        - delivery_count
        - latest_bucket
        - latest_delivery_at
        - direction
        - scope_names
        - destination_names
        - rule_names
        - scan_names
      title: AlertInboxGroupResponse
    AlertInboxListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AlertInboxGroupResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
      type: object
      required:
        - items
        - total
      title: AlertInboxListResponse
    AlertInboxStatus:
      type: string
      enum:
        - open
        - acknowledged
        - resolved
        - muted
        - false_positive
      title: AlertInboxStatus
    AlertMessageFormat:
      type: string
      enum:
        - plain
        - slack_mrkdwn
        - telegram_html
        - telegram_markdownv2
      title: AlertMessageFormat
    AlertRuleCreate:
      properties:
        name:
          type: string
          title: Name
        enabled:
          type: boolean
          title: Enabled
          default: true
        include_project_total:
          type: boolean
          title: Include Project Total
          default: true
        include_event_types:
          type: boolean
          title: Include Event Types
          default: true
        include_events:
          type: boolean
          title: Include Events
          default: true
        include_schema_drifts:
          type: boolean
          title: Include Schema Drifts
          default: false
        include_distribution_drifts:
          type: boolean
          title: Include Distribution Drifts
          default: false
        include_release_regressions:
          type: boolean
          title: Include Release Regressions
          default: false
        notify_on_spike:
          type: boolean
          title: Notify On Spike
          default: true
        notify_on_drop:
          type: boolean
          title: Notify On Drop
          default: true
        ai_explanation_enabled:
          type: boolean
          title: Ai Explanation Enabled
          default: false
        min_percent_delta:
          type: number
          minimum: 0
          title: Min Percent Delta
          default: 0
        min_absolute_delta:
          type: number
          minimum: 0
          title: Min Absolute Delta
          default: 0
        min_expected_count:
          type: number
          minimum: 0
          title: Min Expected Count
          default: 0
        cooldown_minutes:
          type: integer
          minimum: 1
          title: Cooldown Minutes
          default: 1440
        message_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Template
        items_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Items Template
        message_format:
          $ref: '#/components/schemas/AlertMessageFormat'
          default: plain
        filters:
          items:
            $ref: '#/components/schemas/AlertRuleFilterPayload'
          type: array
          title: Filters
      type: object
      required:
        - name
      title: AlertRuleCreate
    AlertRuleFilterField:
      type: string
      enum:
        - event_type
        - event
        - direction
      title: AlertRuleFilterField
    AlertRuleFilterOperator:
      type: string
      enum:
        - eq
        - ne
        - in
        - not_in
      title: AlertRuleFilterOperator
    AlertRuleFilterPayload:
      properties:
        field:
          $ref: '#/components/schemas/AlertRuleFilterField'
        operator:
          $ref: '#/components/schemas/AlertRuleFilterOperator'
        values:
          items:
            type: string
          type: array
          title: Values
      type: object
      required:
        - field
        - operator
      title: AlertRuleFilterPayload
    AlertRuleFilterResponse:
      properties:
        field:
          $ref: '#/components/schemas/AlertRuleFilterField'
        operator:
          $ref: '#/components/schemas/AlertRuleFilterOperator'
        values:
          items:
            type: string
          type: array
          title: Values
        id:
          type: string
          format: uuid
          title: Id
      type: object
      required:
        - field
        - operator
        - id
      title: AlertRuleFilterResponse
    AlertRuleResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        destination_id:
          type: string
          format: uuid
          title: Destination Id
        name:
          type: string
          title: Name
        enabled:
          type: boolean
          title: Enabled
        include_project_total:
          type: boolean
          title: Include Project Total
        include_event_types:
          type: boolean
          title: Include Event Types
        include_events:
          type: boolean
          title: Include Events
        include_schema_drifts:
          type: boolean
          title: Include Schema Drifts
        include_distribution_drifts:
          type: boolean
          title: Include Distribution Drifts
        include_release_regressions:
          type: boolean
          title: Include Release Regressions
        notify_on_spike:
          type: boolean
          title: Notify On Spike
        notify_on_drop:
          type: boolean
          title: Notify On Drop
        ai_explanation_enabled:
          type: boolean
          title: Ai Explanation Enabled
        min_percent_delta:
          type: number
          title: Min Percent Delta
        min_absolute_delta:
          type: number
          title: Min Absolute Delta
        min_expected_count:
          type: number
          title: Min Expected Count
        cooldown_minutes:
          type: integer
          title: Cooldown Minutes
        message_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Template
        items_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Items Template
        message_format:
          $ref: '#/components/schemas/AlertMessageFormat'
        filters:
          items:
            $ref: '#/components/schemas/AlertRuleFilterResponse'
          type: array
          title: Filters
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - destination_id
        - name
        - enabled
        - include_project_total
        - include_event_types
        - include_events
        - include_schema_drifts
        - include_distribution_drifts
        - include_release_regressions
        - notify_on_spike
        - notify_on_drop
        - ai_explanation_enabled
        - min_percent_delta
        - min_absolute_delta
        - min_expected_count
        - cooldown_minutes
        - message_template
        - items_template
        - message_format
        - filters
        - created_at
        - updated_at
      title: AlertRuleResponse
    AlertRuleSimulateResponse:
      properties:
        rule_id:
          type: string
          format: uuid
          title: Rule Id
        rule_name:
          type: string
          title: Rule Name
        days:
          type: integer
          title: Days
        window_from:
          type: string
          format: date-time
          title: Window From
        window_to:
          type: string
          format: date-time
          title: Window To
        anomalies_considered:
          type: integer
          title: Anomalies Considered
        matched_before_cooldown:
          type: integer
          title: Matched Before Cooldown
        firings:
          items:
            $ref: '#/components/schemas/SimulatedRuleFiring'
          type: array
          title: Firings
        noisy:
          type: boolean
          title: Noisy
        cooldown_minutes_used:
          type: integer
          title: Cooldown Minutes Used
        cooldown_minutes_saved:
          type: integer
          title: Cooldown Minutes Saved
        rendered_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Rendered Message
      type: object
      required:
        - rule_id
        - rule_name
        - days
        - window_from
        - window_to
        - anomalies_considered
        - matched_before_cooldown
        - firings
        - noisy
        - cooldown_minutes_used
        - cooldown_minutes_saved
      title: AlertRuleSimulateResponse
    AlertRuleUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        include_project_total:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Project Total
        include_event_types:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Event Types
        include_events:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Events
        include_schema_drifts:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Schema Drifts
        include_distribution_drifts:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Distribution Drifts
        include_release_regressions:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Release Regressions
        notify_on_spike:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Notify On Spike
        notify_on_drop:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Notify On Drop
        ai_explanation_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ai Explanation Enabled
        min_percent_delta:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Min Percent Delta
        min_absolute_delta:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Min Absolute Delta
        min_expected_count:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Min Expected Count
        cooldown_minutes:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Cooldown Minutes
        message_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Template
        items_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Items Template
        message_format:
          anyOf:
            - $ref: '#/components/schemas/AlertMessageFormat'
            - type: 'null'
        filters:
          anyOf:
            - items:
                $ref: '#/components/schemas/AlertRuleFilterPayload'
              type: array
            - type: 'null'
          title: Filters
      type: object
      title: AlertRuleUpdate
    AnomalyDirection:
      type: string
      enum:
        - spike
        - drop
      title: AnomalyDirection
    ApiKeyCreate:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        scope:
          $ref: '#/components/schemas/ApiKeyScope'
          default: read
        expires_in_days:
          anyOf:
            - type: integer
              maximum: 3650
              minimum: 1
            - type: 'null'
          title: Expires In Days
        project_slug:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Project Slug
      type: object
      required:
        - name
      title: ApiKeyCreate
    ApiKeyCreateResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        key_prefix:
          type: string
          title: Key Prefix
        scope:
          $ref: '#/components/schemas/ApiKeyScope'
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        revoked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Revoked At
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        created_at:
          type: string
          format: date-time
          title: Created At
        token:
          type: string
          title: Token
      type: object
      required:
        - id
        - name
        - key_prefix
        - scope
        - project_id
        - expires_at
        - revoked_at
        - last_used_at
        - created_at
        - token
      title: ApiKeyCreateResponse
      description: |-
        Returned only once at creation — embeds the raw token operators must
        copy immediately.
    ApiKeyResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        key_prefix:
          type: string
          title: Key Prefix
        scope:
          $ref: '#/components/schemas/ApiKeyScope'
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        revoked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Revoked At
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - name
        - key_prefix
        - scope
        - project_id
        - expires_at
        - revoked_at
        - last_used_at
        - created_at
      title: ApiKeyResponse
    ApiKeyScope:
      type: string
      enum:
        - read
        - write
      title: ApiKeyScope
    AppVersionAdoptionResponse:
      properties:
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        app_version_column:
          anyOf:
            - type: string
            - type: 'null'
          title: App Version Column
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        latest_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Version
        versions:
          items:
            $ref: '#/components/schemas/AppVersionInfo'
          type: array
          title: Versions
        series:
          items:
            $ref: '#/components/schemas/AppVersionMetricSeries'
          type: array
          title: Series
        totals:
          items:
            $ref: '#/components/schemas/BreakdownTimelinePoint'
          type: array
          title: Totals
      type: object
      required:
        - scan_config_id
        - scope_type
        - scope_ref
        - versions
        - series
        - totals
      title: AppVersionAdoptionResponse
    AppVersionInfo:
      properties:
        version:
          type: string
          title: Version
        is_other:
          type: boolean
          title: Is Other
          default: false
        is_latest:
          type: boolean
          title: Is Latest
          default: false
      type: object
      required:
        - version
      title: AppVersionInfo
    AppVersionMetricSeries:
      properties:
        version:
          type: string
          title: Version
        is_other:
          type: boolean
          title: Is Other
          default: false
        is_latest:
          type: boolean
          title: Is Latest
          default: false
        total_count:
          type: integer
          title: Total Count
        data:
          items:
            $ref: '#/components/schemas/EventMetricPoint'
          type: array
          title: Data
      type: object
      required:
        - version
        - total_count
        - data
      title: AppVersionMetricSeries
    AppVersionSeriesResponse:
      properties:
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        app_version_column:
          anyOf:
            - type: string
            - type: 'null'
          title: App Version Column
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        latest_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Version
        versions:
          items:
            $ref: '#/components/schemas/AppVersionInfo'
          type: array
          title: Versions
        series:
          items:
            $ref: '#/components/schemas/AppVersionMetricSeries'
          type: array
          title: Series
      type: object
      required:
        - scan_config_id
        - scope_type
        - scope_ref
        - versions
        - series
      title: AppVersionSeriesResponse
    AuditEntryResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        user_email:
          type: string
          title: User Email
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
        project_slug:
          type: string
          title: Project Slug
        action:
          type: string
          title: Action
        target_type:
          type: string
          title: Target Type
        target_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Target Id
        target_name:
          type: string
          title: Target Name
        payload:
          additionalProperties: true
          type: object
          title: Payload
      type: object
      required:
        - id
        - created_at
        - user_id
        - user_email
        - project_id
        - project_slug
        - action
        - target_type
        - target_id
        - target_name
        - payload
      title: AuditEntryResponse
    AuditListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AuditEntryResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
      type: object
      required:
        - items
        - total
      title: AuditListResponse
    AuthUserResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        role:
          $ref: '#/components/schemas/UserRole'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - email
        - name
        - role
        - created_at
        - updated_at
      title: AuthUserResponse
    Body_upload_event_photo_api_v1_projects__slug__events__event_id__photos_post:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
      type: object
      required:
        - file
      title: >-
        Body_upload_event_photo_api_v1_projects__slug__events__event_id__photos_post
    BranchApprovalResponse:
      properties:
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        approved_at:
          type: string
          format: date-time
          title: Approved At
      type: object
      required:
        - user_id
        - approved_at
      title: BranchApprovalResponse
    BranchCommentCreate:
      properties:
        body:
          type: string
          title: Body
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
      type: object
      required:
        - body
      title: BranchCommentCreate
    BranchCommentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        branch_id:
          type: string
          format: uuid
          title: Branch Id
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        body:
          type: string
          title: Body
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - branch_id
        - parent_id
        - user_id
        - body
        - created_at
        - updated_at
      title: BranchCommentResponse
    BranchConflictsResponse:
      properties:
        entities:
          items:
            $ref: '#/components/schemas/ConflictEntity'
          type: array
          title: Entities
        unresolved_count:
          type: integer
          title: Unresolved Count
      type: object
      required:
        - entities
        - unresolved_count
      title: BranchConflictsResponse
    BranchKind:
      type: string
      enum:
        - main
        - working
      title: BranchKind
    BranchReviewerCreate:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
      type: object
      required:
        - user_id
      title: BranchReviewerCreate
    BranchReviewerResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          type: string
          format: uuid
          title: User Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - user_id
        - created_at
      title: BranchReviewerResponse
    BranchStatus:
      type: string
      enum:
        - draft
        - ready_for_review
        - changes_requested
        - approved
        - merged
        - closed
      title: BranchStatus
      description: >-
        Review workflow states for a working branch.


        The ``main`` branch carries ``draft`` here but its status is ignored —
        code

        keys off ``kind == main``. Transitions between these states land in
        Phase 3.
    BranchTransitionRequest:
      properties:
        action:
          type: string
          enum:
            - submit
            - request_changes
            - approve
            - reopen
            - close
          title: Action
      type: object
      required:
        - action
      title: BranchTransitionRequest
    BreakdownTimelinePoint:
      properties:
        bucket:
          type: string
          format: date-time
          title: Bucket
        count:
          type: integer
          title: Count
      type: object
      required:
        - bucket
        - count
      title: BreakdownTimelinePoint
    BreakdownTimelineResponse:
      properties:
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        breakdown_column:
          type: string
          title: Breakdown Column
        breakdown_value:
          type: string
          title: Breakdown Value
        is_other:
          type: boolean
          title: Is Other
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        data:
          items:
            $ref: '#/components/schemas/BreakdownTimelinePoint'
          type: array
          title: Data
      type: object
      required:
        - scan_config_id
        - scope_type
        - scope_ref
        - breakdown_column
        - breakdown_value
        - is_other
        - interval
        - data
      title: BreakdownTimelineResponse
    ChartAnnotationCreate:
      properties:
        bucket:
          type: string
          format: date-time
          title: Bucket
        label:
          type: string
          maxLength: 200
          minLength: 1
          title: Label
        description:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Description
        color:
          type: string
          maxLength: 20
          title: Color
          default: '#ef4444'
        scope_type:
          anyOf:
            - $ref: '#/components/schemas/ChartAnnotationScopeType'
            - type: 'null'
        scope_ref:
          anyOf:
            - type: string
              maxLength: 120
            - type: 'null'
          title: Scope Ref
      type: object
      required:
        - bucket
        - label
      title: ChartAnnotationCreate
    ChartAnnotationResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        scope_type:
          anyOf:
            - $ref: '#/components/schemas/ChartAnnotationScopeType'
            - type: 'null'
        scope_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Scope Ref
        bucket:
          type: string
          format: date-time
          title: Bucket
        label:
          type: string
          title: Label
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        color:
          type: string
          title: Color
        created_by_user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By User Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - project_id
        - scope_type
        - scope_ref
        - bucket
        - label
        - description
        - color
        - created_by_user_id
        - created_at
      title: ChartAnnotationResponse
    ChartAnnotationScopeType:
      type: string
      enum:
        - project_total
        - event_type
        - event
      title: ChartAnnotationScopeType
    ColumnSchema:
      properties:
        name:
          type: string
          title: Name
        data_type:
          type: string
          title: Data Type
      type: object
      required:
        - name
        - data_type
      title: ColumnSchema
    ConflictEntity:
      properties:
        entity_type:
          type: string
          title: Entity Type
        name:
          type: string
          title: Name
        fields:
          items:
            $ref: '#/components/schemas/ConflictField'
          type: array
          title: Fields
      type: object
      required:
        - entity_type
        - name
        - fields
      title: ConflictEntity
    ConflictField:
      properties:
        field:
          type: string
          title: Field
        base:
          anyOf:
            - {}
            - type: 'null'
          title: Base
        ours:
          anyOf:
            - {}
            - type: 'null'
          title: Ours
        theirs:
          anyOf:
            - {}
            - type: 'null'
          title: Theirs
        choice:
          anyOf:
            - $ref: '#/components/schemas/MergeResolutionChoice'
            - type: 'null'
      type: object
      required:
        - field
        - base
        - ours
        - theirs
      title: ConflictField
      description: |-
        A single field that diverged on both sides of the merge.

        ``base`` is the value when the branch was created; ``ours`` is main's
        current value; ``theirs`` is the branch's current value. The reviewer
        picks ``choice`` to drive the merge for this field; ``None`` means
        unresolved (merge stays blocked).
    CoverageBucket:
      properties:
        bucket:
          type: string
          format: date-time
          title: Bucket
        total_count:
          type: integer
          title: Total Count
        matched_count:
          type: integer
          title: Matched Count
      type: object
      required:
        - bucket
        - total_count
        - matched_count
      title: CoverageBucket
    CoverageResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CoverageBucket'
          type: array
          title: Items
        summary:
          $ref: '#/components/schemas/CoverageSummary'
        days:
          type: integer
          title: Days
      type: object
      required:
        - items
        - summary
        - days
      title: CoverageResponse
    CoverageSummary:
      properties:
        total_count:
          type: integer
          title: Total Count
        matched_count:
          type: integer
          title: Matched Count
        coverage_pct:
          type: number
          title: Coverage Pct
      type: object
      required:
        - total_count
        - matched_count
        - coverage_pct
      title: CoverageSummary
    DBType:
      type: string
      enum:
        - clickhouse
        - postgres
        - bigquery
      title: DBType
    DataSourceCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        db_type:
          $ref: '#/components/schemas/DBType'
        host:
          type: string
          maxLength: 500
          minLength: 1
          title: Host
        port:
          type: integer
          maximum: 65535
          minimum: 1
          title: Port
          default: 8123
        database_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Database Name
        username:
          type: string
          title: Username
          default: ''
        password:
          type: string
          title: Password
          default: ''
        timeout_seconds:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Timeout Seconds
        extra_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Params
      type: object
      required:
        - name
        - db_type
        - host
        - database_name
      title: DataSourceCreate
    DataSourceResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        db_type:
          $ref: '#/components/schemas/DBType'
        host:
          type: string
          title: Host
        port:
          type: integer
          title: Port
        database_name:
          type: string
          title: Database Name
        username:
          type: string
          title: Username
        password_set:
          type: boolean
          title: Password Set
        timeout_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Timeout Seconds
        extra_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Params
        last_test_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Test At
        last_test_status:
          anyOf:
            - $ref: '#/components/schemas/TestStatus'
            - type: 'null'
        last_test_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Test Message
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - db_type
        - host
        - port
        - database_name
        - username
        - password_set
        - extra_params
        - last_test_at
        - last_test_status
        - last_test_message
        - created_at
        - updated_at
      title: DataSourceResponse
    DataSourceSchemaResponse:
      properties:
        tables:
          items:
            $ref: '#/components/schemas/TableSchema'
          type: array
          title: Tables
      type: object
      required:
        - tables
      title: DataSourceSchemaResponse
    DataSourceStatsResponse:
      properties:
        events_tracked:
          type: integer
          title: Events Tracked
        volume_window:
          type: integer
          title: Volume Window
        window_hours:
          type: integer
          title: Window Hours
        throughput:
          items:
            $ref: '#/components/schemas/DataSourceThroughputPoint'
          type: array
          title: Throughput
      type: object
      required:
        - events_tracked
        - volume_window
        - window_hours
        - throughput
      title: DataSourceStatsResponse
      description: Runtime activity for a data source, aggregated from EventMetric rollups.
    DataSourceTestResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        tested_at:
          type: string
          format: date-time
          title: Tested At
        data_source:
          $ref: '#/components/schemas/DataSourceResponse'
      type: object
      required:
        - success
        - message
        - tested_at
        - data_source
      title: DataSourceTestResponse
    DataSourceThroughputPoint:
      properties:
        bucket:
          type: string
          format: date-time
          title: Bucket
        count:
          type: integer
          title: Count
      type: object
      required:
        - bucket
        - count
      title: DataSourceThroughputPoint
    DataSourceUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        db_type:
          anyOf:
            - $ref: '#/components/schemas/DBType'
            - type: 'null'
        host:
          anyOf:
            - type: string
              maxLength: 500
              minLength: 1
            - type: 'null'
          title: Host
        port:
          anyOf:
            - type: integer
              maximum: 65535
              minimum: 1
            - type: 'null'
          title: Port
        database_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Database Name
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
        timeout_seconds:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Timeout Seconds
        extra_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Params
      type: object
      title: DataSourceUpdate
    DeadEventArchiveRequest:
      properties:
        event_ids:
          items:
            type: string
            format: uuid
          type: array
          minItems: 1
          title: Event Ids
        status:
          $ref: '#/components/schemas/EventStatus'
          default: archived
      type: object
      required:
        - event_ids
      title: DeadEventArchiveRequest
      description: |-
        Bulk-retire request for dead events.

        ``status`` is constrained to the two terminal lifecycle states so the
        action can only deprecate or archive — never resurrect — an event.
    DeadEventArchiveResponse:
      properties:
        event_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Event Ids
        status:
          $ref: '#/components/schemas/EventStatus'
        archived_count:
          type: integer
          title: Archived Count
      type: object
      required:
        - event_ids
        - status
        - archived_count
      title: DeadEventArchiveResponse
    DeadEventItem:
      properties:
        event_id:
          type: string
          format: uuid
          title: Event Id
        name:
          type: string
          title: Name
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
        event_type_name:
          type: string
          title: Event Type Name
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - event_id
        - name
        - event_type_id
        - event_type_name
        - last_seen_at
        - created_at
      title: DeadEventItem
    DeadEventListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DeadEventItem'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        days:
          type: integer
          title: Days
      type: object
      required:
        - items
        - total
        - days
      title: DeadEventListResponse
    DistributionDriftBand:
      type: string
      enum:
        - stable
        - minor
        - significant
      title: DistributionDriftBand
    DistributionDriftPoint:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        field_name:
          type: string
          title: Field Name
        bucket:
          type: string
          format: date-time
          title: Bucket
        psi:
          type: number
          title: Psi
        band:
          $ref: '#/components/schemas/DistributionDriftBand'
        baseline_total:
          type: integer
          title: Baseline Total
        current_total:
          type: integer
          title: Current Total
        top_movers:
          items:
            $ref: '#/components/schemas/DistributionDriftTopMover'
          type: array
          title: Top Movers
      type: object
      required:
        - id
        - scan_config_id
        - field_name
        - bucket
        - psi
        - band
        - baseline_total
        - current_total
        - top_movers
      title: DistributionDriftPoint
    DistributionDriftTopMover:
      properties:
        value:
          type: string
          title: Value
        baseline_share:
          type: number
          title: Baseline Share
        current_share:
          type: number
          title: Current Share
        contribution:
          type: number
          title: Contribution
      type: object
      required:
        - value
        - baseline_share
        - current_share
        - contribution
      title: DistributionDriftTopMover
    DistributionDriftsResponse:
      properties:
        scope:
          type: string
          title: Scope
        scan_config_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Scan Config Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        fields:
          items:
            type: string
          type: array
          title: Fields
        data:
          items:
            $ref: '#/components/schemas/DistributionDriftPoint'
          type: array
          title: Data
      type: object
      required:
        - scope
        - fields
        - data
      title: DistributionDriftsResponse
    EmailSettings:
      properties:
        smtp_host:
          type: string
          title: Smtp Host
        smtp_port:
          type: integer
          title: Smtp Port
        smtp_username:
          type: string
          title: Smtp Username
        smtp_password_configured:
          type: boolean
          title: Smtp Password Configured
        smtp_use_tls:
          type: boolean
          title: Smtp Use Tls
        smtp_from_address:
          type: string
          title: Smtp From Address
      type: object
      required:
        - smtp_host
        - smtp_port
        - smtp_username
        - smtp_password_configured
        - smtp_use_tls
        - smtp_from_address
      title: EmailSettings
    EmailSettingsUpdate:
      properties:
        smtp_host:
          anyOf:
            - type: string
            - type: 'null'
          title: Smtp Host
        smtp_port:
          anyOf:
            - type: integer
              maximum: 65535
              minimum: 1
            - type: 'null'
          title: Smtp Port
        smtp_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Smtp Username
        smtp_password:
          anyOf:
            - type: string
              maxLength: 4096
            - type: 'null'
          title: Smtp Password
        smtp_use_tls:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Smtp Use Tls
        smtp_from_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Smtp From Address
      type: object
      title: EmailSettingsUpdate
    EventBulkDelete:
      properties:
        event_ids:
          items:
            type: string
            format: uuid
          type: array
          minItems: 1
          title: Event Ids
      type: object
      required:
        - event_ids
      title: EventBulkDelete
    EventBulkUpdate:
      properties:
        event_ids:
          items:
            type: string
            format: uuid
          type: array
          minItems: 1
          title: Event Ids
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
        sunset_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sunset At
        owner_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Owner Id
        reviewed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Reviewed
      type: object
      required:
        - event_ids
      title: EventBulkUpdate
    EventChangeResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        event_id:
          type: string
          format: uuid
          title: Event Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        user_email:
          anyOf:
            - type: string
            - type: 'null'
          title: User Email
        field:
          type: string
          title: Field
        old_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Old Value
        new_value:
          anyOf:
            - type: string
            - type: 'null'
          title: New Value
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - event_id
        - field
        - created_at
      title: EventChangeResponse
    EventCreate:
      properties:
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
        name:
          type: string
          maxLength: 500
          minLength: 1
          title: Name
        description:
          type: string
          title: Description
          default: ''
        status:
          $ref: '#/components/schemas/EventStatus'
          default: draft
        sunset_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sunset At
        owner_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Owner Id
        reviewed:
          type: boolean
          title: Reviewed
          default: false
        metric_breakdown_columns:
          items:
            type: string
          type: array
          title: Metric Breakdown Columns
          default: []
        tags:
          items:
            type: string
          type: array
          title: Tags
          default: []
        field_values:
          items:
            $ref: '#/components/schemas/EventFieldValueIn'
          type: array
          title: Field Values
          default: []
        meta_values:
          items:
            $ref: '#/components/schemas/EventMetaValueIn'
          type: array
          title: Meta Values
          default: []
      type: object
      required:
        - event_type_id
        - name
      title: EventCreate
    EventFieldValueIn:
      properties:
        field_definition_id:
          type: string
          format: uuid
          title: Field Definition Id
        value:
          type: string
          title: Value
      type: object
      required:
        - field_definition_id
        - value
      title: EventFieldValueIn
    EventFieldValueResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        field_definition_id:
          type: string
          format: uuid
          title: Field Definition Id
        value:
          type: string
          title: Value
        variable_values:
          items:
            $ref: '#/components/schemas/EventFieldVariableValueResponse'
          type: array
          title: Variable Values
          default: []
      type: object
      required:
        - id
        - field_definition_id
        - value
      title: EventFieldValueResponse
    EventFieldVariableValueResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        variable_id:
          type: string
          format: uuid
          title: Variable Id
        variable_name:
          type: string
          title: Variable Name
        source_column:
          type: string
          title: Source Column
        value_kind:
          $ref: '#/components/schemas/VariableValueKind'
        observed_count:
          type: integer
          title: Observed Count
        values:
          items:
            type: string
          type: array
          title: Values
          default: []
      type: object
      required:
        - id
        - variable_id
        - variable_name
        - source_column
        - value_kind
        - observed_count
      title: EventFieldVariableValueResponse
    EventGroupCondition:
      properties:
        field:
          type: string
          maxLength: 255
          minLength: 1
          title: Field
        pattern:
          type: string
          maxLength: 500
          minLength: 1
          title: Pattern
      type: object
      required:
        - field
        - pattern
      title: EventGroupCondition
    EventGroupRule:
      properties:
        name:
          type: string
          maxLength: 500
          minLength: 1
          title: Name
        condition_logic:
          type: string
          enum:
            - all
            - any
          title: Condition Logic
          default: all
        conditions:
          items:
            $ref: '#/components/schemas/EventGroupCondition'
          type: array
          maxItems: 20
          minItems: 1
          title: Conditions
      type: object
      required:
        - name
        - conditions
      title: EventGroupRule
    EventListItemResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        order:
          type: integer
          title: Order
        status:
          $ref: '#/components/schemas/EventStatus'
        sunset_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sunset At
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
        owner_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Owner Id
        reviewed:
          type: boolean
          title: Reviewed
          default: false
        metric_breakdown_columns:
          items:
            type: string
          type: array
          title: Metric Breakdown Columns
          default: []
        drift_count:
          type: integer
          title: Drift Count
          default: 0
        tags:
          items:
            $ref: '#/components/schemas/EventTagResponse'
          type: array
          title: Tags
          default: []
        field_values:
          items:
            $ref: '#/components/schemas/EventFieldValueResponse'
          type: array
          title: Field Values
          default: []
        meta_values:
          items:
            $ref: '#/components/schemas/EventMetaValueResponse'
          type: array
          title: Meta Values
          default: []
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - event_type_id
        - name
        - description
        - order
        - status
        - created_at
        - updated_at
      title: EventListItemResponse
      description: >-
        Slim variant of EventResponse used by the list endpoint.


        Drops the nested ``event_type`` payload — the frontend already loads

        EventTypes separately and looks them up by id, so shipping the brief
        here

        is pure overhead at scale (and triggers an extra selectin SQL query).
    EventListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/EventListItemResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
      type: object
      required:
        - items
        - total
      title: EventListResponse
    EventMetaValueIn:
      properties:
        meta_field_definition_id:
          type: string
          format: uuid
          title: Meta Field Definition Id
        value:
          type: string
          title: Value
      type: object
      required:
        - meta_field_definition_id
        - value
      title: EventMetaValueIn
    EventMetaValueResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        meta_field_definition_id:
          type: string
          format: uuid
          title: Meta Field Definition Id
        value:
          type: string
          title: Value
      type: object
      required:
        - id
        - meta_field_definition_id
        - value
      title: EventMetaValueResponse
    EventMetricBreakdownSeries:
      properties:
        breakdown_value:
          type: string
          title: Breakdown Value
        is_other:
          type: boolean
          title: Is Other
          default: false
        total_count:
          type: integer
          title: Total Count
        data:
          items:
            $ref: '#/components/schemas/EventMetricPoint'
          type: array
          title: Data
      type: object
      required:
        - breakdown_value
        - total_count
        - data
      title: EventMetricBreakdownSeries
    EventMetricBreakdownsResponse:
      properties:
        event_id:
          type: string
          format: uuid
          title: Event Id
        scan_config_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Scan Config Id
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        columns:
          items:
            type: string
          type: array
          title: Columns
        selected_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Selected Column
        series:
          items:
            $ref: '#/components/schemas/EventMetricBreakdownSeries'
          type: array
          title: Series
      type: object
      required:
        - event_id
        - columns
        - series
      title: EventMetricBreakdownsResponse
    EventMetricPoint:
      properties:
        bucket:
          type: string
          format: date-time
          title: Bucket
        count:
          type: integer
          title: Count
        expected_count:
          anyOf:
            - type: number
            - type: 'null'
          title: Expected Count
        stddev:
          anyOf:
            - type: number
            - type: 'null'
          title: Stddev
        is_anomaly:
          type: boolean
          title: Is Anomaly
          default: false
        anomaly_direction:
          anyOf:
            - $ref: '#/components/schemas/AnomalyDirection'
            - type: 'null'
        z_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Z Score
      type: object
      required:
        - bucket
        - count
      title: EventMetricPoint
    EventMetricsResponse:
      properties:
        scope:
          type: string
          title: Scope
        scan_config_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Scan Config Id
        event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        latest_signal:
          anyOf:
            - $ref: '#/components/schemas/MetricSignalResponse'
            - type: 'null'
        data:
          items:
            $ref: '#/components/schemas/EventMetricPoint'
          type: array
          title: Data
        forecast:
          items:
            $ref: '#/components/schemas/ForecastPoint'
          type: array
          title: Forecast
          default: []
      type: object
      required:
        - scope
        - data
      title: EventMetricsResponse
    EventMove:
      properties:
        direction:
          type: string
          enum:
            - up
            - down
          title: Direction
        visible_event_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Visible Event Ids
      type: object
      required:
        - direction
      title: EventMove
    EventPhotoCommentCreate:
      properties:
        body:
          type: string
          maxLength: 4000
          minLength: 1
          title: Body
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
      type: object
      required:
        - body
      title: EventPhotoCommentCreate
    EventPhotoCommentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        photo_id:
          type: string
          format: uuid
          title: Photo Id
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        body:
          type: string
          title: Body
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - photo_id
        - parent_id
        - user_id
        - body
        - created_at
        - updated_at
      title: EventPhotoCommentResponse
    EventPhotoFigmaCreate:
      properties:
        url:
          type: string
          maxLength: 2000
          minLength: 1
          title: Url
        title:
          type: string
          maxLength: 500
          title: Title
          default: ''
      type: object
      required:
        - url
      title: EventPhotoFigmaCreate
      description: Attach a Figma frame/file as a design spec on this event.
    EventPhotoKind:
      type: string
      enum:
        - photo
        - figma
      title: EventPhotoKind
    EventPhotoReorder:
      properties:
        photo_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Photo Ids
      type: object
      required:
        - photo_ids
      title: EventPhotoReorder
    EventPhotoResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        event_id:
          type: string
          format: uuid
          title: Event Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        kind:
          $ref: '#/components/schemas/EventPhotoKind'
        original_filename:
          type: string
          title: Original Filename
        content_type:
          type: string
          title: Content Type
        size_bytes:
          type: integer
          title: Size Bytes
        storage_backend:
          anyOf:
            - $ref: '#/components/schemas/EventPhotoStorageBackend'
            - type: 'null'
        sort_order:
          type: integer
          title: Sort Order
        url:
          type: string
          title: Url
        external_url:
          anyOf:
            - type: string
            - type: 'null'
          title: External Url
        uploaded_by_user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Uploaded By User Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - event_id
        - project_id
        - kind
        - original_filename
        - content_type
        - size_bytes
        - storage_backend
        - sort_order
        - url
        - created_at
      title: EventPhotoResponse
    EventPhotoStorageBackend:
      type: string
      enum:
        - local
        - gcs
      title: EventPhotoStorageBackend
    EventReorder:
      properties:
        event_ids:
          items:
            type: string
            format: uuid
          type: array
          minItems: 1
          title: Event Ids
      type: object
      required:
        - event_ids
      title: EventReorder
    EventResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
        event_type:
          $ref: '#/components/schemas/EventTypeBrief'
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        order:
          type: integer
          title: Order
        status:
          $ref: '#/components/schemas/EventStatus'
        sunset_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sunset At
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
        owner_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Owner Id
        reviewed:
          type: boolean
          title: Reviewed
          default: false
        metric_breakdown_columns:
          items:
            type: string
          type: array
          title: Metric Breakdown Columns
          default: []
        drift_count:
          type: integer
          title: Drift Count
          default: 0
        tags:
          items:
            $ref: '#/components/schemas/EventTagResponse'
          type: array
          title: Tags
          default: []
        field_values:
          items:
            $ref: '#/components/schemas/EventFieldValueResponse'
          type: array
          title: Field Values
          default: []
        meta_values:
          items:
            $ref: '#/components/schemas/EventMetaValueResponse'
          type: array
          title: Meta Values
          default: []
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - event_type_id
        - event_type
        - name
        - description
        - order
        - status
        - created_at
        - updated_at
      title: EventResponse
    EventStatus:
      type: string
      enum:
        - draft
        - in_review
        - ready_for_dev
        - implemented
        - live
        - deprecated
        - archived
      title: EventStatus
    EventTagResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: EventTagResponse
    EventTypeBrief:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
        color:
          type: string
          title: Color
      type: object
      required:
        - id
        - name
        - display_name
        - color
      title: EventTypeBrief
    EventTypeCreate:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        display_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Display Name
        description:
          type: string
          title: Description
          default: ''
        color:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          title: Color
          default: '#6366f1'
        order:
          type: integer
          title: Order
          default: 0
        field_definitions:
          items:
            $ref: '#/components/schemas/FieldDefinitionCreate'
          type: array
          title: Field Definitions
      type: object
      required:
        - name
        - display_name
      title: EventTypeCreate
    EventTypeOwnerCreate:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
      type: object
      required:
        - user_id
      title: EventTypeOwnerCreate
    EventTypeOwnerResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
        user_id:
          type: string
          format: uuid
          title: User Id
        user_email:
          type: string
          title: User Email
        user_name:
          type: string
          title: User Name
        granted_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Granted By
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - event_type_id
        - user_id
        - user_email
        - user_name
        - granted_by
        - created_at
      title: EventTypeOwnerResponse
    EventTypeResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
        description:
          type: string
          title: Description
        color:
          type: string
          title: Color
        order:
          type: integer
          title: Order
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        field_definitions:
          items:
            $ref: '#/components/schemas/FieldDefinitionResponse'
          type: array
          title: Field Definitions
          default: []
      type: object
      required:
        - id
        - project_id
        - name
        - display_name
        - description
        - color
        - order
        - created_at
        - updated_at
      title: EventTypeResponse
    EventTypeUpdate:
      properties:
        display_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Display Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        color:
          anyOf:
            - type: string
              pattern: ^#[0-9a-fA-F]{6}$
            - type: 'null'
          title: Color
        order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Order
      type: object
      title: EventTypeUpdate
    EventUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 500
              minLength: 1
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
        sunset_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sunset At
        owner_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Owner Id
        reviewed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Reviewed
        metric_breakdown_columns:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Metric Breakdown Columns
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        field_values:
          anyOf:
            - items:
                $ref: '#/components/schemas/EventFieldValueIn'
              type: array
            - type: 'null'
          title: Field Values
        meta_values:
          anyOf:
            - items:
                $ref: '#/components/schemas/EventMetaValueIn'
              type: array
            - type: 'null'
          title: Meta Values
      type: object
      title: EventUpdate
    EventWindowMetricsRequest:
      properties:
        event_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Event Ids
        time_from:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Time From
        time_to:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Time To
      type: object
      required:
        - event_ids
      title: EventWindowMetricsRequest
    EventWindowMetricsResponse:
      properties:
        event_id:
          type: string
          format: uuid
          title: Event Id
        scan_config_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Scan Config Id
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        total_count:
          type: integer
          title: Total Count
        data:
          items:
            $ref: '#/components/schemas/EventMetricPoint'
          type: array
          title: Data
      type: object
      required:
        - event_id
        - total_count
        - data
      title: EventWindowMetricsResponse
    FieldDefinitionBulkCreate:
      properties:
        fields:
          items:
            $ref: '#/components/schemas/FieldDefinitionCreate'
          type: array
          minItems: 1
          title: Fields
      type: object
      required:
        - fields
      title: FieldDefinitionBulkCreate
    FieldDefinitionCreate:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        display_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Display Name
        field_type:
          $ref: '#/components/schemas/FieldDefinitionType'
        is_required:
          type: boolean
          title: Is Required
          default: false
        enum_options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Enum Options
        description:
          type: string
          title: Description
          default: ''
        order:
          type: integer
          title: Order
          default: 0
        sensitivity:
          $ref: '#/components/schemas/Sensitivity'
          default: none
        contract_required_max_null_rate:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Contract Required Max Null Rate
        contract_regex:
          anyOf:
            - type: string
              maxLength: 500
              minLength: 1
            - type: 'null'
          title: Contract Regex
        contract_min_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Contract Min Value
        contract_max_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Contract Max Value
        contract_max_bad_rate:
          type: number
          maximum: 1
          minimum: 0
          title: Contract Max Bad Rate
          default: 0
      type: object
      required:
        - name
        - display_name
        - field_type
      title: FieldDefinitionCreate
    FieldDefinitionResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
        field_type:
          $ref: '#/components/schemas/FieldDefinitionType'
        is_required:
          type: boolean
          title: Is Required
        enum_options:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Enum Options
        description:
          type: string
          title: Description
        order:
          type: integer
          title: Order
        sensitivity:
          $ref: '#/components/schemas/Sensitivity'
        contract_required_max_null_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Contract Required Max Null Rate
        contract_regex:
          anyOf:
            - type: string
            - type: 'null'
          title: Contract Regex
        contract_min_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Contract Min Value
        contract_max_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Contract Max Value
        contract_max_bad_rate:
          type: number
          title: Contract Max Bad Rate
      type: object
      required:
        - id
        - event_type_id
        - name
        - display_name
        - field_type
        - is_required
        - enum_options
        - description
        - order
        - sensitivity
        - contract_required_max_null_rate
        - contract_regex
        - contract_min_value
        - contract_max_value
        - contract_max_bad_rate
      title: FieldDefinitionResponse
    FieldDefinitionType:
      type: string
      enum:
        - string
        - number
        - boolean
        - json
        - enum
        - url
      title: FieldDefinitionType
    FieldDefinitionUpdate:
      properties:
        display_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Display Name
        field_type:
          anyOf:
            - $ref: '#/components/schemas/FieldDefinitionType'
            - type: 'null'
        is_required:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Required
        enum_options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Enum Options
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Order
        sensitivity:
          anyOf:
            - $ref: '#/components/schemas/Sensitivity'
            - type: 'null'
        contract_required_max_null_rate:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Contract Required Max Null Rate
        contract_regex:
          anyOf:
            - type: string
              maxLength: 500
              minLength: 1
            - type: 'null'
          title: Contract Regex
        contract_min_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Contract Min Value
        contract_max_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Contract Max Value
        contract_max_bad_rate:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Contract Max Bad Rate
      type: object
      title: FieldDefinitionUpdate
    FieldReorder:
      properties:
        field_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Field Ids
      type: object
      required:
        - field_ids
      title: FieldReorder
    ForecastPoint:
      properties:
        bucket:
          type: string
          format: date-time
          title: Bucket
        expected_count:
          type: number
          title: Expected Count
        stddev:
          type: number
          title: Stddev
      type: object
      required:
        - bucket
        - expected_count
        - stddev
      title: ForecastPoint
      description: |-
        One-step-ahead expected value emitted alongside the historical series.

        `bucket` is the timestamp of the bucket *being forecast* (i.e. one
        interval past the last actual point). `expected_count` and `stddev` come
        from the same STL/MSTL decomposition used for anomaly detection.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LoginRequest:
      properties:
        email:
          type: string
          maxLength: 320
          minLength: 3
          title: Email
        password:
          type: string
          maxLength: 255
          minLength: 8
          title: Password
      type: object
      required:
        - email
        - password
      title: LoginRequest
    MergeResolutionChoice:
      type: string
      enum:
        - ours
        - theirs
      title: MergeResolutionChoice
    MetaFieldCreate:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        display_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Display Name
        field_type:
          $ref: '#/components/schemas/MetaFieldType'
        is_required:
          type: boolean
          title: Is Required
          default: false
        enum_options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Enum Options
        default_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Value
        link_template:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Link Template
        order:
          type: integer
          title: Order
          default: 0
        sensitivity:
          $ref: '#/components/schemas/Sensitivity'
          default: none
      type: object
      required:
        - name
        - display_name
        - field_type
      title: MetaFieldCreate
    MetaFieldResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
        field_type:
          $ref: '#/components/schemas/MetaFieldType'
        is_required:
          type: boolean
          title: Is Required
        enum_options:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Enum Options
        default_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Value
        link_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Link Template
        order:
          type: integer
          title: Order
        sensitivity:
          $ref: '#/components/schemas/Sensitivity'
      type: object
      required:
        - id
        - project_id
        - name
        - display_name
        - field_type
        - is_required
        - enum_options
        - default_value
        - link_template
        - order
        - sensitivity
      title: MetaFieldResponse
    MetaFieldType:
      type: string
      enum:
        - string
        - url
        - boolean
        - enum
        - date
      title: MetaFieldType
    MetaFieldUpdate:
      properties:
        display_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Display Name
        field_type:
          anyOf:
            - $ref: '#/components/schemas/MetaFieldType'
            - type: 'null'
        is_required:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Required
        enum_options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Enum Options
        default_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Value
        link_template:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Link Template
        order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Order
        sensitivity:
          anyOf:
            - $ref: '#/components/schemas/Sensitivity'
            - type: 'null'
      type: object
      title: MetaFieldUpdate
    MetricScopeType:
      type: string
      enum:
        - project_total
        - event_type
        - event
        - schema
        - distribution
        - release_regression
      title: MetricScopeType
    MetricSignalResponse:
      properties:
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        state:
          type: string
          title: State
        event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        bucket:
          type: string
          format: date-time
          title: Bucket
        actual_count:
          type: integer
          title: Actual Count
        expected_count:
          type: number
          title: Expected Count
        stddev:
          type: number
          title: Stddev
        z_score:
          type: number
          title: Z Score
        direction:
          $ref: '#/components/schemas/AnomalyDirection'
      type: object
      required:
        - scan_config_id
        - scope_type
        - scope_ref
        - state
        - bucket
        - actual_count
        - expected_count
        - stddev
        - z_score
        - direction
      title: MetricSignalResponse
    MonitorDetailResponse:
      properties:
        rule_id:
          type: string
          format: uuid
          title: Rule Id
        rule_name:
          type: string
          title: Rule Name
        destination_id:
          type: string
          format: uuid
          title: Destination Id
        destination_name:
          type: string
          title: Destination Name
        destination_type:
          type: string
          title: Destination Type
        enabled:
          type: boolean
          title: Enabled
        status:
          type: string
          enum:
            - firing
            - warning
            - healthy
          title: Status
        active_scope_count:
          type: integer
          title: Active Scope Count
        firing_scope_count:
          type: integer
          title: Firing Scope Count
        last_anomaly_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Anomaly At
        last_notified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Notified At
        notify_on_spike:
          type: boolean
          title: Notify On Spike
        notify_on_drop:
          type: boolean
          title: Notify On Drop
        min_percent_delta:
          type: number
          title: Min Percent Delta
        min_expected_count:
          type: number
          title: Min Expected Count
        cooldown_minutes:
          type: integer
          title: Cooldown Minutes
        muted:
          type: boolean
          title: Muted
          default: false
        muted_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Muted Until
        rule_enabled:
          type: boolean
          title: Rule Enabled
        destination_enabled:
          type: boolean
          title: Destination Enabled
        include_project_total:
          type: boolean
          title: Include Project Total
        include_event_types:
          type: boolean
          title: Include Event Types
        include_events:
          type: boolean
          title: Include Events
        include_schema_drifts:
          type: boolean
          title: Include Schema Drifts
        include_distribution_drifts:
          type: boolean
          title: Include Distribution Drifts
        include_release_regressions:
          type: boolean
          title: Include Release Regressions
        total_deliveries:
          type: integer
          title: Total Deliveries
        last_delivery_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Delivery At
        last_delivery_status:
          anyOf:
            - $ref: '#/components/schemas/AlertDeliveryStatus'
            - type: 'null'
      type: object
      required:
        - rule_id
        - rule_name
        - destination_id
        - destination_name
        - destination_type
        - enabled
        - status
        - active_scope_count
        - firing_scope_count
        - notify_on_spike
        - notify_on_drop
        - min_percent_delta
        - min_expected_count
        - cooldown_minutes
        - rule_enabled
        - destination_enabled
        - include_project_total
        - include_event_types
        - include_events
        - include_schema_drifts
        - include_distribution_drifts
        - include_release_regressions
        - total_deliveries
      title: MonitorDetailResponse
      description: A single monitor with the extra context a drill-in detail view needs.
    MonitorMuteRequest:
      properties:
        muted_until:
          type: string
          format: date-time
          title: Muted Until
      type: object
      required:
        - muted_until
      title: MonitorMuteRequest
    MonitorSummaryItem:
      properties:
        rule_id:
          type: string
          format: uuid
          title: Rule Id
        rule_name:
          type: string
          title: Rule Name
        destination_id:
          type: string
          format: uuid
          title: Destination Id
        destination_name:
          type: string
          title: Destination Name
        destination_type:
          type: string
          title: Destination Type
        enabled:
          type: boolean
          title: Enabled
        status:
          type: string
          enum:
            - firing
            - warning
            - healthy
          title: Status
        active_scope_count:
          type: integer
          title: Active Scope Count
        firing_scope_count:
          type: integer
          title: Firing Scope Count
        last_anomaly_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Anomaly At
        last_notified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Notified At
        notify_on_spike:
          type: boolean
          title: Notify On Spike
        notify_on_drop:
          type: boolean
          title: Notify On Drop
        min_percent_delta:
          type: number
          title: Min Percent Delta
        min_expected_count:
          type: number
          title: Min Expected Count
        cooldown_minutes:
          type: integer
          title: Cooldown Minutes
        muted:
          type: boolean
          title: Muted
          default: false
        muted_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Muted Until
      type: object
      required:
        - rule_id
        - rule_name
        - destination_id
        - destination_name
        - destination_type
        - enabled
        - status
        - active_scope_count
        - firing_scope_count
        - notify_on_spike
        - notify_on_drop
        - min_percent_delta
        - min_expected_count
        - cooldown_minutes
      title: MonitorSummaryItem
      description: One alert rule rolled up into a single monitor status.
    MonitorsSummaryResponse:
      properties:
        monitors:
          items:
            $ref: '#/components/schemas/MonitorSummaryItem'
          type: array
          title: Monitors
        firing_count:
          type: integer
          title: Firing Count
        warning_count:
          type: integer
          title: Warning Count
        healthy_count:
          type: integer
          title: Healthy Count
        total:
          type: integer
          title: Total
      type: object
      required:
        - monitors
        - firing_count
        - warning_count
        - healthy_count
        - total
      title: MonitorsSummaryResponse
    ObservabilitySettings:
      properties:
        request_id_header:
          type: string
          title: Request Id Header
        log_level:
          type: string
          title: Log Level
        log_json:
          type: boolean
          title: Log Json
        prometheus_metrics_enabled:
          type: boolean
          title: Prometheus Metrics Enabled
        otel_exporter_otlp_endpoint:
          type: string
          title: Otel Exporter Otlp Endpoint
        otel_service_name:
          type: string
          title: Otel Service Name
      type: object
      required:
        - request_id_header
        - log_level
        - log_json
        - prometheus_metrics_enabled
        - otel_exporter_otlp_endpoint
        - otel_service_name
      title: ObservabilitySettings
    ObservabilitySettingsUpdate:
      properties:
        request_id_header:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Request Id Header
        log_level:
          anyOf:
            - type: string
              maxLength: 20
              minLength: 1
            - type: 'null'
          title: Log Level
        log_json:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Log Json
        prometheus_metrics_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Prometheus Metrics Enabled
        otel_exporter_otlp_endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Otel Exporter Otlp Endpoint
        otel_service_name:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Otel Service Name
      type: object
      title: ObservabilitySettingsUpdate
    OverviewKpiSeriesResponse:
      properties:
        days:
          type: integer
          title: Days
        active_events:
          items:
            type: integer
          type: array
          title: Active Events
      type: object
      required:
        - days
        - active_events
      title: OverviewKpiSeriesResponse
      description: >-
        Real daily series behind Overview KPI sparklines.


        Only ``active_events`` (new events created per day, from
        Event.created_at)

        has genuine history; other KPIs (open signals, review-pending) have no

        time series until snapshotting is added, so they are intentionally
        omitted

        rather than fabricated.
    PlanBranchCreate:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
          default: ''
      type: object
      required:
        - name
      title: PlanBranchCreate
    PlanBranchDetailResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        kind:
          $ref: '#/components/schemas/BranchKind'
        status:
          $ref: '#/components/schemas/BranchStatus'
        description:
          type: string
          title: Description
        base_revision_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Base Revision Id
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
        merged_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Merged At
        merged_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Merged By
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        reviewers:
          items:
            $ref: '#/components/schemas/BranchReviewerResponse'
          type: array
          title: Reviewers
        approvals:
          items:
            $ref: '#/components/schemas/BranchApprovalResponse'
          type: array
          title: Approvals
      type: object
      required:
        - id
        - project_id
        - name
        - kind
        - status
        - description
        - base_revision_id
        - created_by
        - merged_at
        - merged_by
        - created_at
        - updated_at
        - reviewers
        - approvals
      title: PlanBranchDetailResponse
    PlanBranchDiff:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/PlanDiffEntry'
          type: array
          title: Entries
        summary:
          additionalProperties:
            type: integer
          type: object
          title: Summary
        behind_base:
          type: boolean
          title: Behind Base
      type: object
      required:
        - entries
        - summary
        - behind_base
      title: PlanBranchDiff
    PlanBranchList:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PlanBranchResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
      type: object
      required:
        - items
        - total
      title: PlanBranchList
    PlanBranchResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        kind:
          $ref: '#/components/schemas/BranchKind'
        status:
          $ref: '#/components/schemas/BranchStatus'
        description:
          type: string
          title: Description
        base_revision_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Base Revision Id
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
        merged_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Merged At
        merged_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Merged By
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - name
        - kind
        - status
        - description
        - base_revision_id
        - created_by
        - merged_at
        - merged_by
        - created_at
        - updated_at
      title: PlanBranchResponse
    PlanDiff:
      properties:
        revision_id:
          type: string
          format: uuid
          title: Revision Id
        compare_to:
          type: string
          format: uuid
          title: Compare To
        entries:
          items:
            $ref: '#/components/schemas/PlanDiffEntry'
          type: array
          title: Entries
        summary:
          additionalProperties:
            type: integer
          type: object
          title: Summary
      type: object
      required:
        - revision_id
        - compare_to
        - entries
        - summary
      title: PlanDiff
    PlanDiffEntry:
      properties:
        entity_type:
          type: string
          enum:
            - event_type
            - field_definition
            - event
            - variable
            - meta_field
            - relation
          title: Entity Type
        kind:
          type: string
          enum:
            - added
            - removed
            - changed
          title: Kind
        name:
          type: string
          title: Name
        parent:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent
        changes:
          items:
            type: string
          type: array
          title: Changes
      type: object
      required:
        - entity_type
        - kind
        - name
      title: PlanDiffEntry
    PlanRevisionCreate:
      properties:
        summary:
          type: string
          maxLength: 2000
          title: Summary
          default: ''
      type: object
      title: PlanRevisionCreate
    PlanRevisionDetail:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        summary:
          type: string
          title: Summary
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
        entity_counts:
          additionalProperties:
            type: integer
          type: object
          title: Entity Counts
        payload:
          additionalProperties: true
          type: object
          title: Payload
      type: object
      required:
        - id
        - project_id
        - summary
        - created_at
        - created_by
        - entity_counts
        - payload
      title: PlanRevisionDetail
    PlanRevisionList:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PlanRevisionSummary'
          type: array
          title: Items
        total:
          type: integer
          title: Total
      type: object
      required:
        - items
        - total
      title: PlanRevisionList
    PlanRevisionSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        summary:
          type: string
          title: Summary
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
        entity_counts:
          additionalProperties:
            type: integer
          type: object
          title: Entity Counts
      type: object
      required:
        - id
        - project_id
        - summary
        - created_at
        - created_by
        - entity_counts
      title: PlanRevisionSummary
      description: List-view of a revision — payload omitted to keep responses small.
    ProjectAnomalySettingsResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        anomaly_detection_enabled:
          type: boolean
          title: Anomaly Detection Enabled
        detect_project_total:
          type: boolean
          title: Detect Project Total
        detect_event_types:
          type: boolean
          title: Detect Event Types
        detect_events:
          type: boolean
          title: Detect Events
        baseline_window_buckets:
          type: integer
          title: Baseline Window Buckets
        min_history_buckets:
          type: integer
          title: Min History Buckets
        sigma_threshold:
          type: number
          title: Sigma Threshold
        min_expected_count:
          type: integer
          title: Min Expected Count
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - anomaly_detection_enabled
        - detect_project_total
        - detect_event_types
        - detect_events
        - baseline_window_buckets
        - min_history_buckets
        - sigma_threshold
        - min_expected_count
        - created_at
        - updated_at
      title: ProjectAnomalySettingsResponse
    ProjectAnomalySettingsUpdate:
      properties:
        anomaly_detection_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Anomaly Detection Enabled
        detect_project_total:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Detect Project Total
        detect_event_types:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Detect Event Types
        detect_events:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Detect Events
        baseline_window_buckets:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Baseline Window Buckets
        min_history_buckets:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Min History Buckets
        sigma_threshold:
          anyOf:
            - type: number
              minimum: 0.1
            - type: 'null'
          title: Sigma Threshold
        min_expected_count:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Min Expected Count
      type: object
      title: ProjectAnomalySettingsUpdate
    ProjectCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        slug:
          type: string
          maxLength: 255
          minLength: 1
          pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
          title: Slug
        description:
          type: string
          title: Description
          default: ''
      type: object
      required:
        - name
        - slug
      title: ProjectCreate
    ProjectLatestScanJob:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scan_name:
          type: string
          title: Scan Name
        status:
          $ref: '#/components/schemas/ScanJobStatus'
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        result_summary:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result Summary
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - scan_config_id
        - scan_name
        - status
        - started_at
        - completed_at
        - result_summary
        - error_message
        - created_at
      title: ProjectLatestScanJob
    ProjectLatestSignal:
      properties:
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scan_name:
          type: string
          title: Scan Name
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        scope_name:
          type: string
          title: Scope Name
        state:
          type: string
          title: State
        bucket:
          type: string
          format: date-time
          title: Bucket
        actual_count:
          type: integer
          title: Actual Count
        expected_count:
          type: number
          title: Expected Count
        z_score:
          type: number
          title: Z Score
        direction:
          $ref: '#/components/schemas/AnomalyDirection'
      type: object
      required:
        - scan_config_id
        - scan_name
        - scope_type
        - scope_ref
        - scope_name
        - state
        - bucket
        - actual_count
        - expected_count
        - z_score
        - direction
      title: ProjectLatestSignal
    ProjectResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        slug:
          type: string
          title: Slug
        description:
          type: string
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        summary:
          $ref: '#/components/schemas/ProjectSummary'
      type: object
      required:
        - id
        - name
        - slug
        - description
        - created_at
        - updated_at
      title: ProjectResponse
    ProjectSummary:
      properties:
        event_type_count:
          type: integer
          title: Event Type Count
          default: 0
        event_count:
          type: integer
          title: Event Count
          default: 0
        active_event_count:
          type: integer
          title: Active Event Count
          default: 0
        implemented_event_count:
          type: integer
          title: Implemented Event Count
          default: 0
        review_pending_event_count:
          type: integer
          title: Review Pending Event Count
          default: 0
        archived_event_count:
          type: integer
          title: Archived Event Count
          default: 0
        variable_count:
          type: integer
          title: Variable Count
          default: 0
        scan_count:
          type: integer
          title: Scan Count
          default: 0
        alert_destination_count:
          type: integer
          title: Alert Destination Count
          default: 0
        monitoring_signal_count:
          type: integer
          title: Monitoring Signal Count
          default: 0
        firing_monitor_count:
          type: integer
          title: Firing Monitor Count
          default: 0
        latest_scan_job:
          anyOf:
            - $ref: '#/components/schemas/ProjectLatestScanJob'
            - type: 'null'
        latest_signal:
          anyOf:
            - $ref: '#/components/schemas/ProjectLatestSignal'
            - type: 'null'
      type: object
      title: ProjectSummary
    ProjectUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        slug:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
              pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
            - type: 'null'
          title: Slug
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      title: ProjectUpdate
    RegisterRequest:
      properties:
        email:
          type: string
          format: email
          title: Email
        password:
          type: string
          maxLength: 255
          minLength: 8
          title: Password
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
      type: object
      required:
        - email
        - password
      title: RegisterRequest
    RelationCreate:
      properties:
        source_event_type_id:
          type: string
          format: uuid
          title: Source Event Type Id
        target_event_type_id:
          type: string
          format: uuid
          title: Target Event Type Id
        source_field_id:
          type: string
          format: uuid
          title: Source Field Id
        target_field_id:
          type: string
          format: uuid
          title: Target Field Id
        relation_type:
          type: string
          title: Relation Type
          default: belongs_to
        description:
          type: string
          title: Description
          default: ''
      type: object
      required:
        - source_event_type_id
        - target_event_type_id
        - source_field_id
        - target_field_id
      title: RelationCreate
    RelationResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        source_event_type_id:
          type: string
          format: uuid
          title: Source Event Type Id
        target_event_type_id:
          type: string
          format: uuid
          title: Target Event Type Id
        source_field_id:
          type: string
          format: uuid
          title: Source Field Id
        target_field_id:
          type: string
          format: uuid
          title: Target Field Id
        relation_type:
          type: string
          title: Relation Type
        description:
          type: string
          title: Description
      type: object
      required:
        - id
        - project_id
        - source_event_type_id
        - target_event_type_id
        - source_field_id
        - target_field_id
        - relation_type
        - description
      title: RelationResponse
    ReleaseRegressionItem:
      properties:
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        scope_name:
          type: string
          title: Scope Name
        event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        kind:
          $ref: '#/components/schemas/ReleaseRegressionKind'
        version:
          type: string
          title: Version
        previous_version:
          type: string
          title: Previous Version
        observed_count:
          type: integer
          title: Observed Count
        expected_count:
          type: number
          title: Expected Count
        ratio:
          type: number
          title: Ratio
        share_prev:
          type: number
          title: Share Prev
        share_new:
          type: number
          title: Share New
        release_share:
          type: number
          title: Release Share
        window_from:
          type: string
          format: date-time
          title: Window From
        window_to:
          type: string
          format: date-time
          title: Window To
      type: object
      required:
        - scope_type
        - scope_ref
        - scope_name
        - kind
        - version
        - previous_version
        - observed_count
        - expected_count
        - ratio
        - share_prev
        - share_new
        - release_share
        - window_from
        - window_to
      title: ReleaseRegressionItem
      description: One event (or event type) that regressed in the latest active release.
    ReleaseRegressionKind:
      type: string
      enum:
        - missing
        - volume_drop
      title: ReleaseRegressionKind
    ReleaseRegressionsResponse:
      properties:
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        app_version_column:
          anyOf:
            - type: string
            - type: 'null'
          title: App Version Column
        latest_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Version
        items:
          items:
            $ref: '#/components/schemas/ReleaseRegressionItem'
          type: array
          title: Items
      type: object
      required:
        - scan_config_id
        - items
      title: ReleaseRegressionsResponse
    ResolutionCreate:
      properties:
        entity_type:
          type: string
          title: Entity Type
        entity_name:
          type: string
          title: Entity Name
        field_name:
          type: string
          title: Field Name
        choice:
          $ref: '#/components/schemas/MergeResolutionChoice'
      type: object
      required:
        - entity_type
        - entity_name
        - field_name
        - choice
      title: ResolutionCreate
    ResolutionResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        branch_id:
          type: string
          format: uuid
          title: Branch Id
        entity_type:
          type: string
          title: Entity Type
        entity_name:
          type: string
          title: Entity Name
        field_name:
          type: string
          title: Field Name
        choice:
          $ref: '#/components/schemas/MergeResolutionChoice'
        resolved_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Resolved By
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - branch_id
        - entity_type
        - entity_name
        - field_name
        - choice
        - resolved_by
        - created_at
      title: ResolutionResponse
    RuntimeSettings:
      properties:
        app_base_url:
          type: string
          title: App Base Url
        scan_row_limit_default:
          type: integer
          title: Scan Row Limit Default
        metrics_row_limit_default:
          type: integer
          title: Metrics Row Limit Default
      type: object
      required:
        - app_base_url
        - scan_row_limit_default
        - metrics_row_limit_default
      title: RuntimeSettings
    RuntimeSettingsUpdate:
      properties:
        app_base_url:
          anyOf:
            - type: string
            - type: 'null'
          title: App Base Url
        scan_row_limit_default:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Scan Row Limit Default
        metrics_row_limit_default:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Metrics Row Limit Default
      type: object
      title: RuntimeSettingsUpdate
    ScanConfigCreate:
      properties:
        data_source_id:
          type: string
          format: uuid
          title: Data Source Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        base_query:
          type: string
          minLength: 1
          title: Base Query
        event_type_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Type Column
        time_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Time Column
        event_name_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Name Format
        json_value_paths:
          items:
            type: string
          type: array
          title: Json Value Paths
        event_group_rules:
          items:
            $ref: '#/components/schemas/EventGroupRule'
          type: array
          title: Event Group Rules
        metric_breakdown_columns:
          items:
            type: string
          type: array
          title: Metric Breakdown Columns
        metric_breakdown_values_limit:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Metric Breakdown Values Limit
        distribution_drift_fields:
          items:
            type: string
          type: array
          title: Distribution Drift Fields
        cardinality_threshold:
          type: integer
          minimum: 1
          title: Cardinality Threshold
          default: 100
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        replay_chunk_interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        scan_lookback_hours:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Scan Lookback Hours
        scan_row_limit:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Scan Row Limit
        metrics_row_limit:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Metrics Row Limit
        app_version_column:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: App Version Column
        app_version_keep_releases:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: App Version Keep Releases
      type: object
      required:
        - data_source_id
        - name
        - base_query
      title: ScanConfigCreate
    ScanConfigPreviewRequest:
      properties:
        data_source_id:
          type: string
          format: uuid
          title: Data Source Id
        base_query:
          type: string
          minLength: 1
          title: Base Query
        limit:
          type: integer
          maximum: 50
          minimum: 1
          title: Limit
          default: 10
        json_value_paths:
          items:
            type: string
          type: array
          title: Json Value Paths
        time_column:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Time Column
        scan_lookback_hours:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Scan Lookback Hours
        include_json_paths:
          type: boolean
          title: Include Json Paths
          default: false
      type: object
      required:
        - data_source_id
        - base_query
      title: ScanConfigPreviewRequest
    ScanConfigResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        data_source_id:
          type: string
          format: uuid
          title: Data Source Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        name:
          type: string
          title: Name
        base_query:
          type: string
          title: Base Query
        event_type_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Type Column
        time_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Time Column
        event_name_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Name Format
        json_value_paths:
          items:
            type: string
          type: array
          title: Json Value Paths
        event_group_rules:
          items:
            $ref: '#/components/schemas/EventGroupRule'
          type: array
          title: Event Group Rules
        metric_breakdown_columns:
          items:
            type: string
          type: array
          title: Metric Breakdown Columns
        metric_breakdown_values_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Metric Breakdown Values Limit
        distribution_drift_fields:
          items:
            type: string
          type: array
          title: Distribution Drift Fields
        cardinality_threshold:
          type: integer
          title: Cardinality Threshold
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        replay_chunk_interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        scan_lookback_hours:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scan Lookback Hours
        scan_row_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scan Row Limit
        metrics_row_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Metrics Row Limit
        app_version_column:
          anyOf:
            - type: string
            - type: 'null'
          title: App Version Column
        app_version_keep_releases:
          anyOf:
            - type: integer
            - type: 'null'
          title: App Version Keep Releases
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - data_source_id
        - project_id
        - event_type_id
        - name
        - base_query
        - event_type_column
        - time_column
        - event_name_format
        - json_value_paths
        - event_group_rules
        - metric_breakdown_columns
        - metric_breakdown_values_limit
        - distribution_drift_fields
        - cardinality_threshold
        - interval
        - replay_chunk_interval
        - scan_lookback_hours
        - scan_row_limit
        - metrics_row_limit
        - app_version_column
        - app_version_keep_releases
        - created_at
        - updated_at
      title: ScanConfigResponse
    ScanConfigUpdate:
      properties:
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        base_query:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Base Query
        event_type_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Type Column
        time_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Time Column
        event_name_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Name Format
        json_value_paths:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Json Value Paths
        event_group_rules:
          anyOf:
            - items:
                $ref: '#/components/schemas/EventGroupRule'
              type: array
            - type: 'null'
          title: Event Group Rules
        metric_breakdown_columns:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Metric Breakdown Columns
        metric_breakdown_values_limit:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Metric Breakdown Values Limit
        distribution_drift_fields:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Distribution Drift Fields
        cardinality_threshold:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Cardinality Threshold
        interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        replay_chunk_interval:
          anyOf:
            - $ref: '#/components/schemas/ScanInterval'
            - type: 'null'
        scan_lookback_hours:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Scan Lookback Hours
        scan_row_limit:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Scan Row Limit
        metrics_row_limit:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Metrics Row Limit
        app_version_column:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: App Version Column
        app_version_keep_releases:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: App Version Keep Releases
      type: object
      title: ScanConfigUpdate
    ScanInterval:
      type: string
      enum:
        - 15m
        - 1h
        - 6h
        - 1d
        - 1w
      title: ScanInterval
    ScanJobResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        status:
          $ref: '#/components/schemas/ScanJobStatus'
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        result_summary:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result Summary
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - scan_config_id
        - status
        - started_at
        - completed_at
        - result_summary
        - error_message
        - created_at
        - updated_at
      title: ScanJobResponse
    ScanJobStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - cancelled
      title: ScanJobStatus
    ScanMetricsReplayRequest:
      properties:
        time_from:
          type: string
          format: date-time
          title: Time From
        time_to:
          type: string
          format: date-time
          title: Time To
      type: object
      required:
        - time_from
        - time_to
      title: ScanMetricsReplayRequest
    ScanPreviewJobResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          $ref: '#/components/schemas/ScanJobStatus'
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        result_summary:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result Summary
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - status
        - started_at
        - completed_at
        - result_summary
        - error_message
        - created_at
        - updated_at
      title: ScanPreviewJobResponse
    SchemaDriftActionRequest:
      properties:
        action:
          type: string
          enum:
            - accept
            - snooze
            - false_positive
            - reopen
          title: Action
        note:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Note
        snoozed_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Snoozed Until
      type: object
      required:
        - action
      title: SchemaDriftActionRequest
    SchemaDriftListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/SchemaDriftResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
      type: object
      required:
        - items
        - total
      title: SchemaDriftListResponse
    SchemaDriftResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
        scan_config_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Scan Config Id
        field_name:
          type: string
          title: Field Name
        drift_type:
          $ref: '#/components/schemas/SchemaDriftType'
        observed_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Observed Type
        declared_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Declared Type
        sample_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Sample Value
        status:
          $ref: '#/components/schemas/SchemaDriftStatus'
          default: open
        resolution_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolution Note
        snoozed_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Snoozed Until
        resolved_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Resolved At
        resolved_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Resolved By
        detected_at:
          type: string
          format: date-time
          title: Detected At
      type: object
      required:
        - id
        - event_type_id
        - scan_config_id
        - field_name
        - drift_type
        - observed_type
        - declared_type
        - sample_value
        - detected_at
      title: SchemaDriftResponse
    SchemaDriftStatus:
      type: string
      enum:
        - open
        - accepted
        - snoozed
        - false_positive
      title: SchemaDriftStatus
    SchemaDriftType:
      type: string
      enum:
        - new_field
        - missing_field
        - type_changed
        - enum_violation
        - required_null_violation
        - regex_violation
        - range_violation
      title: SchemaDriftType
    SearchEventVariableValue:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        variable_id:
          type: string
          format: uuid
          title: Variable Id
        variable_name:
          type: string
          title: Variable Name
        field_definition_id:
          type: string
          format: uuid
          title: Field Definition Id
        field_name:
          type: string
          title: Field Name
        field_display_name:
          type: string
          title: Field Display Name
        source_column:
          type: string
          title: Source Column
        value_kind:
          $ref: '#/components/schemas/VariableValueKind'
        observed_count:
          type: integer
          title: Observed Count
        values:
          items:
            type: string
          type: array
          title: Values
          default: []
      type: object
      required:
        - id
        - variable_id
        - variable_name
        - field_definition_id
        - field_name
        - field_display_name
        - source_column
        - value_kind
        - observed_count
      title: SearchEventVariableValue
    SearchReindexResponse:
      properties:
        documents_indexed:
          type: integer
          minimum: 0
          title: Documents Indexed
        embeddings_scheduled:
          type: boolean
          title: Embeddings Scheduled
          default: false
      type: object
      required:
        - documents_indexed
      title: SearchReindexResponse
    SearchResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/SearchResult'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        semantic_used:
          type: boolean
          title: Semantic Used
          default: false
      type: object
      required:
        - items
        - total
      title: SearchResponse
    SearchResult:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        entity_type:
          type: string
          enum:
            - event
            - event_type
            - field
            - meta_field
            - variable
            - relation
            - tag
          title: Entity Type
        entity_id:
          type: string
          format: uuid
          title: Entity Id
        parent_event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Event Id
        event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        implemented:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Implemented
        variable_values:
          items:
            $ref: '#/components/schemas/SearchEventVariableValue'
          type: array
          title: Variable Values
          default: []
        title:
          type: string
          title: Title
        subtitle:
          type: string
          title: Subtitle
          default: ''
        description:
          type: string
          title: Description
          default: ''
        snippet:
          type: string
          title: Snippet
          default: ''
        route_path:
          type: string
          title: Route Path
        score:
          type: number
          title: Score
        confidence:
          type: number
          title: Confidence
          default: 0
        highlights:
          items:
            type: string
          type: array
          title: Highlights
          default: []
        semantic_used:
          type: boolean
          title: Semantic Used
          default: false
      type: object
      required:
        - id
        - entity_type
        - entity_id
        - title
        - route_path
        - score
      title: SearchResult
    SeasonalityCell:
      properties:
        weekday:
          type: integer
          title: Weekday
        hour:
          type: integer
          title: Hour
        count:
          type: integer
          title: Count
        anomaly_count:
          type: integer
          title: Anomaly Count
      type: object
      required:
        - weekday
        - hour
        - count
        - anomaly_count
      title: SeasonalityCell
      description: |-
        One cell of the 7×24 hour-of-day × weekday seasonality heatmap.

        `weekday` is ISO-style with Monday=0..Sunday=6 to match Python's
        `datetime.weekday()`. `count` is the total volume observed in that
        slot across the queried time range; `anomaly_count` is the number of
        detected anomalies whose bucket fell into the same slot.
    SeasonalityHeatmapResponse:
      properties:
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        cells:
          items:
            $ref: '#/components/schemas/SeasonalityCell'
          type: array
          title: Cells
        max_count:
          type: integer
          title: Max Count
        total_count:
          type: integer
          title: Total Count
      type: object
      required:
        - scan_config_id
        - scope_type
        - scope_ref
        - cells
        - max_count
        - total_count
      title: SeasonalityHeatmapResponse
    SecuritySettings:
      properties:
        cors_allow_origins:
          type: string
          title: Cors Allow Origins
        session_cookie_name:
          type: string
          title: Session Cookie Name
        session_ttl_hours:
          type: integer
          title: Session Ttl Hours
        session_cookie_secure:
          type: boolean
          title: Session Cookie Secure
        security_headers_enabled:
          type: boolean
          title: Security Headers Enabled
        hsts_enabled:
          type: boolean
          title: Hsts Enabled
        hsts_max_age_seconds:
          type: integer
          title: Hsts Max Age Seconds
        content_security_policy:
          type: string
          title: Content Security Policy
        rate_limit_enabled:
          type: boolean
          title: Rate Limit Enabled
        rate_limit_login_per_minute:
          type: integer
          title: Rate Limit Login Per Minute
        rate_limit_register_per_hour:
          type: integer
          title: Rate Limit Register Per Hour
        rate_limit_trust_forwarded_for:
          type: boolean
          title: Rate Limit Trust Forwarded For
      type: object
      required:
        - cors_allow_origins
        - session_cookie_name
        - session_ttl_hours
        - session_cookie_secure
        - security_headers_enabled
        - hsts_enabled
        - hsts_max_age_seconds
        - content_security_policy
        - rate_limit_enabled
        - rate_limit_login_per_minute
        - rate_limit_register_per_hour
        - rate_limit_trust_forwarded_for
      title: SecuritySettings
    SecuritySettingsUpdate:
      properties:
        cors_allow_origins:
          anyOf:
            - type: string
            - type: 'null'
          title: Cors Allow Origins
        session_cookie_name:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Session Cookie Name
        session_ttl_hours:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Session Ttl Hours
        session_cookie_secure:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Session Cookie Secure
        security_headers_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Security Headers Enabled
        hsts_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hsts Enabled
        hsts_max_age_seconds:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Hsts Max Age Seconds
        content_security_policy:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Security Policy
        rate_limit_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Rate Limit Enabled
        rate_limit_login_per_minute:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Rate Limit Login Per Minute
        rate_limit_register_per_hour:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Rate Limit Register Per Hour
        rate_limit_trust_forwarded_for:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Rate Limit Trust Forwarded For
      type: object
      title: SecuritySettingsUpdate
    Sensitivity:
      type: string
      enum:
        - none
        - pii
        - phi
        - financial
        - secret
      title: Sensitivity
    ServiceSettingsResponse:
      properties:
        runtime:
          $ref: '#/components/schemas/RuntimeSettings'
        security:
          $ref: '#/components/schemas/SecuritySettings'
        storage:
          $ref: '#/components/schemas/StorageSettings'
        observability:
          $ref: '#/components/schemas/ObservabilitySettings'
        email:
          $ref: '#/components/schemas/EmailSettings'
        ai:
          $ref: '#/components/schemas/AiSettings'
        system:
          $ref: '#/components/schemas/SystemSettings'
        overridden_fields:
          items:
            type: string
          type: array
          title: Overridden Fields
        sources:
          additionalProperties:
            type: string
            enum:
              - env
              - override
          type: object
          title: Sources
      type: object
      required:
        - runtime
        - security
        - storage
        - observability
        - email
        - ai
        - system
        - overridden_fields
        - sources
      title: ServiceSettingsResponse
    ServiceSettingsUpdate:
      properties:
        runtime:
          anyOf:
            - $ref: '#/components/schemas/RuntimeSettingsUpdate'
            - type: 'null'
        security:
          anyOf:
            - $ref: '#/components/schemas/SecuritySettingsUpdate'
            - type: 'null'
        storage:
          anyOf:
            - $ref: '#/components/schemas/StorageSettingsUpdate'
            - type: 'null'
        observability:
          anyOf:
            - $ref: '#/components/schemas/ObservabilitySettingsUpdate'
            - type: 'null'
        email:
          anyOf:
            - $ref: '#/components/schemas/EmailSettingsUpdate'
            - type: 'null'
        ai:
          anyOf:
            - $ref: '#/components/schemas/AiSettingsUpdate'
            - type: 'null'
      type: object
      title: ServiceSettingsUpdate
    SettingsTestResponse:
      properties:
        ok:
          type: boolean
          title: Ok
        message:
          type: string
          title: Message
      type: object
      required:
        - ok
        - message
      title: SettingsTestResponse
    ShadowEventAcceptRequest:
      properties:
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        name:
          anyOf:
            - type: string
              maxLength: 500
              minLength: 1
            - type: 'null'
          title: Name
      type: object
      title: ShadowEventAcceptRequest
    ShadowEventAcceptResponse:
      properties:
        candidate_id:
          type: string
          format: uuid
          title: Candidate Id
        event_id:
          type: string
          format: uuid
          title: Event Id
        status:
          $ref: '#/components/schemas/ShadowEventStatus'
      type: object
      required:
        - candidate_id
        - event_id
        - status
      title: ShadowEventAcceptResponse
    ShadowEventCandidateResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        scan_config_id:
          type: string
          format: uuid
          title: Scan Config Id
        scan_config_name:
          type: string
          title: Scan Config Name
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        event_type_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Type Name
        event_name:
          type: string
          title: Event Name
        observed_count:
          type: integer
          title: Observed Count
        first_seen_at:
          type: string
          format: date-time
          title: First Seen At
        last_seen_at:
          type: string
          format: date-time
          title: Last Seen At
        status:
          $ref: '#/components/schemas/ShadowEventStatus'
        accepted_event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Accepted Event Id
      type: object
      required:
        - id
        - scan_config_id
        - scan_config_name
        - event_type_id
        - event_type_name
        - event_name
        - observed_count
        - first_seen_at
        - last_seen_at
        - status
        - accepted_event_id
      title: ShadowEventCandidateResponse
    ShadowEventDismissResponse:
      properties:
        candidate_id:
          type: string
          format: uuid
          title: Candidate Id
        status:
          $ref: '#/components/schemas/ShadowEventStatus'
      type: object
      required:
        - candidate_id
        - status
      title: ShadowEventDismissResponse
    ShadowEventListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ShadowEventCandidateResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        new_count:
          type: integer
          title: New Count
      type: object
      required:
        - items
        - total
        - new_count
      title: ShadowEventListResponse
    ShadowEventStatus:
      type: string
      enum:
        - new
        - accepted
        - dismissed
      title: ShadowEventStatus
    SimulatedRuleFiring:
      properties:
        anomaly_id:
          type: string
          format: uuid
          title: Anomaly Id
        scope_type:
          $ref: '#/components/schemas/MetricScopeType'
        scope_ref:
          type: string
          title: Scope Ref
        scope_name:
          type: string
          title: Scope Name
        event_type_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Type Id
        event_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Event Id
        drift_field:
          anyOf:
            - type: string
            - type: 'null'
          title: Drift Field
        drift_type:
          anyOf:
            - $ref: '#/components/schemas/AlertDriftType'
            - type: 'null'
        sample_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Sample Value
        bucket:
          type: string
          format: date-time
          title: Bucket
        direction:
          $ref: '#/components/schemas/AnomalyDirection'
        actual_count:
          type: integer
          title: Actual Count
        expected_count:
          type: number
          title: Expected Count
        absolute_delta:
          type: number
          title: Absolute Delta
        percent_delta:
          type: number
          title: Percent Delta
        rendered_item:
          anyOf:
            - type: string
            - type: 'null'
          title: Rendered Item
      type: object
      required:
        - anomaly_id
        - scope_type
        - scope_ref
        - scope_name
        - event_type_id
        - event_id
        - bucket
        - direction
        - actual_count
        - expected_count
        - absolute_delta
        - percent_delta
      title: SimulatedRuleFiring
      description: One virtual delivery the rule would have triggered during the window.
    StorageSettings:
      properties:
        photo_storage_backend:
          type: string
          title: Photo Storage Backend
        photo_local_dir:
          type: string
          title: Photo Local Dir
        photo_max_size_mb:
          type: integer
          title: Photo Max Size Mb
        photo_allowed_mime:
          type: string
          title: Photo Allowed Mime
        gcs_photo_bucket:
          type: string
          title: Gcs Photo Bucket
        gcs_photo_credentials_path:
          type: string
          title: Gcs Photo Credentials Path
        gcs_photo_public:
          type: boolean
          title: Gcs Photo Public
        gcs_photo_signed_url_ttl_seconds:
          type: integer
          title: Gcs Photo Signed Url Ttl Seconds
      type: object
      required:
        - photo_storage_backend
        - photo_local_dir
        - photo_max_size_mb
        - photo_allowed_mime
        - gcs_photo_bucket
        - gcs_photo_credentials_path
        - gcs_photo_public
        - gcs_photo_signed_url_ttl_seconds
      title: StorageSettings
    StorageSettingsUpdate:
      properties:
        photo_storage_backend:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo Storage Backend
        photo_local_dir:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo Local Dir
        photo_max_size_mb:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Photo Max Size Mb
        photo_allowed_mime:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo Allowed Mime
        gcs_photo_bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: Gcs Photo Bucket
        gcs_photo_credentials_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Gcs Photo Credentials Path
        gcs_photo_public:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Gcs Photo Public
        gcs_photo_signed_url_ttl_seconds:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Gcs Photo Signed Url Ttl Seconds
      type: object
      title: StorageSettingsUpdate
    SystemSettings:
      properties:
        debug:
          type: boolean
          title: Debug
        database_url_configured:
          type: boolean
          title: Database Url Configured
        sync_database_url_configured:
          type: boolean
          title: Sync Database Url Configured
        rabbitmq_url_configured:
          type: boolean
          title: Rabbitmq Url Configured
        redis_url_configured:
          type: boolean
          title: Redis Url Configured
        encryption_key_configured:
          type: boolean
          title: Encryption Key Configured
        openai_api_key_configured:
          type: boolean
          title: Openai Api Key Configured
      type: object
      required:
        - debug
        - database_url_configured
        - sync_database_url_configured
        - rabbitmq_url_configured
        - redis_url_configured
        - encryption_key_configured
        - openai_api_key_configured
      title: SystemSettings
    TableSchema:
      properties:
        name:
          type: string
          title: Name
        columns:
          items:
            $ref: '#/components/schemas/ColumnSchema'
          type: array
          title: Columns
      type: object
      required:
        - name
        - columns
      title: TableSchema
    TestStatus:
      type: string
      enum:
        - success
        - failed
      title: TestStatus
    TopEventResponse:
      properties:
        event_id:
          type: string
          format: uuid
          title: Event Id
        name:
          type: string
          title: Name
        event_type_id:
          type: string
          format: uuid
          title: Event Type Id
        total_count:
          type: integer
          title: Total Count
      type: object
      required:
        - event_id
        - name
        - event_type_id
        - total_count
      title: TopEventResponse
      description: One row of the Overview "Top events by volume" widget.
    TopMoverItem:
      properties:
        breakdown_column:
          type: string
          title: Breakdown Column
        breakdown_value:
          type: string
          title: Breakdown Value
        is_other:
          type: boolean
          title: Is Other
        actual_count:
          type: integer
          title: Actual Count
        expected_count:
          type: number
          title: Expected Count
        stddev:
          type: number
          title: Stddev
        z_score:
          type: number
          title: Z Score
        direction:
          $ref: '#/components/schemas/AnomalyDirection'
      type: object
      required:
        - breakdown_column
        - breakdown_value
        - is_other
        - actual_count
        - expected_count
        - stddev
        - z_score
        - direction
      title: TopMoverItem
      description: One row of "what moved this anomaly" — backed by MetricBreakdownAnomaly.
    UserListItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        role:
          $ref: '#/components/schemas/UserRole'
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - email
        - name
        - role
        - created_at
      title: UserListItem
    UserRole:
      type: string
      enum:
        - owner
        - editor
        - viewer
      title: UserRole
    UserRoleUpdate:
      properties:
        role:
          $ref: '#/components/schemas/UserRole'
      type: object
      required:
        - role
      title: UserRoleUpdate
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VariableCreate:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          pattern: ^[a-z][a-z0-9_]*$
          title: Name
        variable_type:
          $ref: '#/components/schemas/VariableType'
          default: string
        description:
          type: string
          title: Description
          default: ''
      type: object
      required:
        - name
      title: VariableCreate
    VariableResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        source_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Name
        variable_type:
          $ref: '#/components/schemas/VariableType'
        description:
          type: string
          title: Description
        event_count:
          type: integer
          title: Event Count
          default: 0
        context_count:
          type: integer
          title: Context Count
          default: 0
        low_context_count:
          type: integer
          title: Low Context Count
          default: 0
        high_context_count:
          type: integer
          title: High Context Count
          default: 0
        sample_values:
          items:
            type: string
          type: array
          title: Sample Values
          default: []
      type: object
      required:
        - id
        - project_id
        - name
        - source_name
        - variable_type
        - description
      title: VariableResponse
    VariableType:
      type: string
      enum:
        - string
        - number
        - boolean
        - date
        - datetime
        - json
        - string_array
        - number_array
      title: VariableType
    VariableUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
              pattern: ^[a-z][a-z0-9_.]*$
            - type: 'null'
          title: Name
        variable_type:
          anyOf:
            - $ref: '#/components/schemas/VariableType'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      title: VariableUpdate
    VariableValueContextResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        variable_id:
          type: string
          format: uuid
          title: Variable Id
        variable_name:
          type: string
          title: Variable Name
        event_id:
          type: string
          format: uuid
          title: Event Id
        event_name:
          type: string
          title: Event Name
        field_definition_id:
          type: string
          format: uuid
          title: Field Definition Id
        field_name:
          type: string
          title: Field Name
        field_display_name:
          type: string
          title: Field Display Name
        source_column:
          type: string
          title: Source Column
        value_kind:
          $ref: '#/components/schemas/VariableValueKind'
        observed_count:
          type: integer
          title: Observed Count
        values:
          items:
            type: string
          type: array
          title: Values
          default: []
      type: object
      required:
        - id
        - variable_id
        - variable_name
        - event_id
        - event_name
        - field_definition_id
        - field_name
        - field_display_name
        - source_column
        - value_kind
        - observed_count
      title: VariableValueContextResponse
    VariableValueKind:
      type: string
      enum:
        - low
        - high
      title: VariableValueKind
tags:
  - name: auth
    description: Login, registration, logout, and current-user lookup.
  - name: users
    description: User administration and role management.
  - name: projects
    description: Projects (tracking plans) and their lifecycle.
  - name: events
    description: Tracked events within a project's plan.
  - name: event-types
    description: Event type definitions and metadata.
  - name: event-type-owners
    description: Ownership assignments for event types.
  - name: fields
    description: Field definitions attached to event types.
  - name: meta-fields
    description: Project-wide meta/context fields.
  - name: variables
    description: Reusable variables referenced by the plan.
  - name: relations
    description: Relationships between plan entities.
  - name: scans
    description: Scan configs and warehouse scan/preview jobs.
  - name: metrics
    description: Computed metrics and metric definitions.
  - name: reconciliation
    description: Plan-vs-warehouse reconciliation runs.
  - name: plan-branches
    description: Working branches of a tracking plan.
  - name: plan-revisions
    description: Committed plan revisions and history.
  - name: chart-annotations
    description: Annotations overlaid on metric charts.
  - name: anomaly-settings
    description: Per-project anomaly detection settings.
  - name: alerting
    description: Alert rules and delivery destinations.
  - name: data-sources
    description: Warehouse/data-source connections and secrets.
  - name: event-photos
    description: Photo attachments for events.
  - name: search
    description: Hybrid lexical/semantic search over plan content.
  - name: ai
    description: AI-assisted descriptions and Q&A.
  - name: activity
    description: Recent activity feed.
  - name: audit
    description: Audit log of mutating actions.
  - name: api-keys
    description: Personal API keys for programmatic access.
  - name: settings
    description: Instance-level application settings.
