"""Pydantic schemas for the github_cli Lambda event/response contracts.""" from typing import Literal from pydantic import BaseModel, Field from .common import Auth0ActionResult, TerraformHit class SearchTextInOrgEvent(BaseModel): """Event for the 'search-text-in-org' action.""" action: Literal['search-text-in-org'] email: str = Field(min_length=1) full_name: str = Field(min_length=1) org: str dry_run: bool = False repo_filter: str | None = None ticket_id: str = '' class SearchTextInOrgResponse(BaseModel): """Response from the 'search-text-in-org' action.""" ticket_id: str email: str full_name: str terraform_hits: list[TerraformHit] class OffboardUserWithCopilotEvent(BaseModel): """Event for the 'offboard-user-with-copilot' action.""" action: Literal['offboard-user-with-copilot'] ticket_id: str email: str = Field(min_length=1) full_name: str = Field(min_length=1) last_working_day: str repo: str | None = None base_branch: str dry_run: bool = False operation: Literal['offboard', 'suspend'] = 'offboard' auth0_results: list[Auth0ActionResult] = [] terraform_hits: list[TerraformHit] = [] class OffboardUserWithCopilotResponse(BaseModel): """Response from the 'offboard-user-with-copilot' action.""" ticket_id: str dry_run: bool issue_urls: list[str] issue_numbers: list[int]