# Support requests, version 1 Source: [`requests.proto`](proto/pharos/support/v1/requests.proto), which imports [`commands.proto`](proto/pharos/support/v1/commands.proto) and [`queries.proto`](proto/pharos/support/v1/queries.proto). Run `pnpm generate:contracts` after edits. Private commands are declared alongside public commands in `commands.proto`; their visibility annotations keep them outside the API's published operations. | Operation | Kind | Target | Notes | | --- | --- | --- | --- | | `CreateTicket` | command | the new ticket's ID, chosen by the browser | title and opening message body | | `CloseTicket` | command | the ticket | expected version is the ticket's revision | | `AddMessage` | command | the new message's ID, chosen by the browser | `ticket_id` and body | | `RequestCustomerLink` | command | the Pharos user ID | operator CLI credential only | | `ListTickets` | query | | the signed-in user's tickets | | `GetConversation` | query | | one ticket with its messages | | `GetCustomerLink` | query | | operator CLI credential only | Commands carry the shared `CommandMetadata`: command ID (the `Idempotency-Key`), target aggregate, expected version, correlation and the acting user (`actor_id`). The API sets `user_id` in queries and `actor_id` in commands from the session; a browser never supplies either. Command replies carry the shared `Outcome`; query replies carry their response or the shared `RequestError`. | Boundary | Value | | --- | --- | | Request exchange | `pharos.requests` (durable topic) | | Routing keys | `request.support.command`, `request.support.query` | | Owner queues | `ref.support.commands`, `ref.support.queries` | | Reply exchange and key | `pharos.replies`, `reply.support.` | Broker roles and permissions are generated from [`broker.json`](broker.json) into `services/beto/services/topology/permissions.generated.json`.