# Code generated by highflame-policy-codegen. DO NOT EDIT.
# Source: schemas/sentry/schema.cedarschema

"""Entity metadata for Sentry policy editor."""

from typing import TypedDict

class ServiceEntityMetadata(TypedDict):
    """Entity metadata for a service, extracted from Cedar schema appliesTo blocks."""

    principals: list[str]
    resources: list[str]
    actions: list[str]


class ActionEntityMetadata(TypedDict):
    """Entity metadata for a specific action."""

    principals: list[str]
    resources: list[str]


# Sentry entity metadata for UI components.
SENTRY_ENTITIES: ServiceEntityMetadata = {
    "principals": ["User"],
    "resources": ["ChatSession", "Document"],
    "actions": ["paste_content", "receive_response", "send_message", "upload_file"],
}

# Per-action entity mapping for Sentry.
SENTRY_ACTION_ENTITIES: dict[str, ActionEntityMetadata] = {
    "paste_content": {
        "principals": ["User"],
        "resources": ["ChatSession"],
    },
    "receive_response": {
        "principals": ["User"],
        "resources": ["ChatSession"],
    },
    "send_message": {
        "principals": ["User"],
        "resources": ["ChatSession"],
    },
    "upload_file": {
        "principals": ["User"],
        "resources": ["Document", "ChatSession"],
    },
}
