// Package diplomail defines the public typed command identifiers // exposed at the authenticated Gateway -> Diplomatic Mail boundary. // // The gateway routes each `user.games.mail.*` ExecuteCommand into the // matching `/api/v1/user/games/{game_id}/mail/*` REST endpoint on the // backend; the wire envelopes and payload tables live in // `pkg/schema/fbs/diplomail.fbs`. package diplomail const ( // MessageTypeUserGamesMailInbox is the authenticated gateway // message type used to read the caller's diplomatic-mail inbox // for one game. Backend filters out rows whose `available_at` is // still nil (translation in flight). MessageTypeUserGamesMailInbox = "user.games.mail.inbox" // MessageTypeUserGamesMailSent is the authenticated gateway // message type used to read the caller's outgoing personal // messages for one game. Admin and system rows are not included. MessageTypeUserGamesMailSent = "user.games.mail.sent" // MessageTypeUserGamesMailMessageGet is the authenticated // gateway message type used to read a single message detail // addressed to the caller. The response carries the translation // rendering when one is cached for the caller's preferred // language. MessageTypeUserGamesMailMessageGet = "user.games.mail.message.get" // MessageTypeUserGamesMailSend is the authenticated gateway // message type used to send a single-recipient personal message. // Exactly one of `recipient_user_id` and `recipient_race_name` // must be supplied; the backend resolves the race-name shortcut // through `Memberships.ListMembers(gameID, "active")`. MessageTypeUserGamesMailSend = "user.games.mail.send" // MessageTypeUserGamesMailBroadcast is the authenticated gateway // message type used by paid-tier callers to broadcast a personal // message to every other active member of the game. MessageTypeUserGamesMailBroadcast = "user.games.mail.broadcast" // MessageTypeUserGamesMailAdmin is the authenticated gateway // message type used by the game owner to compose an admin-kind // notification. The wire shape is target-discriminated: `user` // addresses a single recipient (by id or race name); `all` // broadcasts to every member matching the requested scope. MessageTypeUserGamesMailAdmin = "user.games.mail.admin" // MessageTypeUserGamesMailRead is the authenticated gateway // message type used to mark a single message as read. Idempotent. MessageTypeUserGamesMailRead = "user.games.mail.read" // MessageTypeUserGamesMailDelete is the authenticated gateway // message type used to soft-delete a single message. The // recipient row must already be marked read. MessageTypeUserGamesMailDelete = "user.games.mail.delete" )