/** * #newmodmail_msg.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ import type { Any } from "../../../../google/protobuf/any.js"; /** Shared Objects */ export type ConversationData = { /** Is the conversation automatically generated e.g. from automod, u/reddit */ isAuto?: boolean | undefined; /** Participant. Is absent for mod discussions */ participant?: Participant | undefined; /** List of object ids (denormalized). E.g. [{id: 'qwer42', key: 'messages'}, {id: 'abcd33', key: 'modActions'}] */ objIds: ConversationData_ObjId[]; /** NOTE: is_repliable will always be true currently (at the time of writing this comment) */ isRepliable?: boolean | undefined; /** The last datetime a user made any interaction with the conversation */ lastUserUpdate?: string | undefined; /** Is the conversation internal (i.e. mod only) */ isInternal?: boolean | undefined; /** * The last datetime a mod from the owning subreddit made any interaction with the conversation. * (Note that if this is a subreddit to subreddit conversation, the mods of * the participant subreddit are irrelevant and do not affect this field.) */ lastModUpdate?: string | undefined; authors: Participant[]; /** The last time the conversation was updated (includes actions) */ lastUpdated?: string | undefined; /** Id of the first corresponding message in the legacy message system */ legacyFirstMessageId?: string | undefined; state?: number | undefined; /** * Type of conversation: * - `internal` (mod discussion) * - `sr_user` (between a subreddit and user) * - `sr_sr` (between two subreddits) */ conversationType?: string | undefined; /** The datetime of the last unread message within this conversation for the current viewer. */ lastUnread?: string | undefined; /** The subreddit that owns the conversation. */ owner?: ConversationData_Owner | undefined; /** Suject of the conversation */ subject?: string | undefined; /** Conversation ID */ id?: string | undefined; /** Is the conversation highlighted */ isHighlighted?: boolean | undefined; /** Number of messages (not actions) in the conversation */ numMessages?: number | undefined; /** from createconversationmessageresponse */ modActions: { [key: string]: ModActionData; }; }; export type ConversationData_ObjId = { /** Id of an object (e.g. message ID or modAction ID) */ id?: string | undefined; /** Property name of the object collection (e.g. 'messages' or 'modActions') */ key?: string | undefined; }; export type ConversationData_Owner = { /** Subreddit display name */ displayName?: string | undefined; /** always 'subreddit' */ type?: string | undefined; /** Subreddit id */ id?: string | undefined; }; export type ConversationData_ModActionsEntry = { key: string; value?: ModActionData | undefined; }; export type MessageData = { body?: string | undefined; author?: Participant | undefined; isInternal?: boolean | undefined; date?: string | undefined; bodyMarkdown?: string | undefined; id?: string | undefined; participatingAs?: string | undefined; }; export type ConversationUserData = { recentComments: { [key: string]: ConversationUserData_CommentData; }; muteStatus?: ConversationUserData_MuteStatus | undefined; name?: string | undefined; created?: string | undefined; banStatus?: ConversationUserData_BanStatus | undefined; isSuspended?: boolean | undefined; approveStatus?: ConversationUserData_ApproveStatus | undefined; isShadowBanned?: boolean | undefined; recentPosts: { [key: string]: ConversationUserData_PostData; }; recentConvos: { [key: string]: ConversationUserData_ConvoData; }; id?: string | undefined; }; export type ConversationUserData_CommentData = { comment?: string | undefined; date?: string | undefined; permalink?: string | undefined; title?: string | undefined; }; export type ConversationUserData_MuteStatus = { muteCount?: number | undefined; isMuted?: boolean | undefined; endDate?: string | undefined; reason?: string | undefined; }; export type ConversationUserData_BanStatus = { isBanned?: boolean | undefined; isPermanent?: boolean | undefined; endDate?: string | undefined; reason?: string | undefined; }; export type ConversationUserData_ApproveStatus = { isApproved?: boolean | undefined; }; export type ConversationUserData_PostData = { date?: string | undefined; permalink?: string | undefined; title?: string | undefined; }; export type ConversationUserData_ConvoData = { date?: string | undefined; permalink?: string | undefined; id?: string | undefined; subject?: string | undefined; }; export type ConversationUserData_RecentCommentsEntry = { key: string; value?: ConversationUserData_CommentData | undefined; }; export type ConversationUserData_RecentPostsEntry = { key: string; value?: ConversationUserData_PostData | undefined; }; export type ConversationUserData_RecentConvosEntry = { key: string; value?: ConversationUserData_ConvoData | undefined; }; export type Participant = { isMod?: boolean | undefined; isAdmin?: boolean | undefined; name?: string | undefined; isOp?: boolean | undefined; isParticipant?: boolean | undefined; isApproved?: boolean | undefined; isHidden?: boolean | undefined; id?: number | undefined; isDeleted?: boolean | undefined; }; export type ModActionData = { date?: string | undefined; actionTypeId?: number | undefined; id?: string | undefined; author?: ModActionData_ModActionAuthor | undefined; }; export type ModActionData_ModActionAuthor = { isMod?: boolean | undefined; isAdmin?: boolean | undefined; name?: string | undefined; isHidden?: boolean | undefined; id?: number | undefined; isDeleted?: boolean | undefined; }; /** Requests */ export type BulkReadConversationsRequest = { /** comma-delimited list of subreddit names (e.g. 'pics,worldnews' */ entity: string; /** * one of (all, appeals, notifications, inbox, filtered, inprogress, mod, archived, default, * highlighted, join_requests, new) */ state: string; }; export type GetConversationsRequest = { /** id36 of a modmail */ after?: string | undefined; /** comma-delimited list of subreddit names */ entity?: string | undefined; /** an integer between 1 and 100 (default: 25) */ limit?: number | undefined; /** one of (recent, mod, user, unread) */ sort?: string | undefined; /** * one of (all, appeals, notifications, inbox, filtered, inprogress, mod, archived, default, * highlighted, join_requests, new) */ state?: string | undefined; }; export type CreateConversationRequest = { /** raw markdown text */ body: string; /** is author hidden? */ isAuthorHidden: boolean; /** subreddit name */ srName: string; /** subject of the conversation. max 100 characters. */ subject: string; /** a user (e.g. u/username), a subreddit (e.g. r/subreddit) or null */ to?: string | undefined; }; export type GetConversationRequest = { /** id36 of a modmail conversation id */ conversationId: string; /** mark read? */ markRead: boolean; }; export type CreateConversationMessageRequest = { /** markdown text */ body: string; isAuthorHidden: boolean; isInternal: boolean; /** id36 of a modmail conversation id */ conversationId: string; }; export type BasicConversationRequest = { /** id36 of a modmail conversation id */ conversationId: string; }; export type BasicConversationsRequest = { /** comma seperated list of id36 of a modmail conversation ids */ conversationIds: string; }; export type MuteConversationRequest = { /** id36 of a modmail conversation id */ conversationId: string; /** how long? one of (72, 168, 672) */ numHours: number; }; export type TempBanRequest = { /** id36 of a modmail conversation id */ conversationId: string; /** duration in days, max 999 */ duration: number; }; /** Responses */ export type BulkReadConversationsResponse = { conversationIds: string[]; }; export type GetConversationsResponse = { conversations: { [key: string]: ConversationData; }; messages: { [key: string]: MessageData; }; viewerId?: string | undefined; conversationIds: string[]; }; export type GetConversationsResponse_ConversationsEntry = { key: string; value?: ConversationData | undefined; }; export type GetConversationsResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type CreateConversationResponse = { conversation?: ConversationData | undefined; messages: { [key: string]: MessageData; }; modActions: { [key: string]: ModActionData; }; /** error case */ fields: string[]; reason?: string | undefined; message?: string | undefined; explanation?: string | undefined; user?: ConversationUserData | undefined; }; export type CreateConversationResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type CreateConversationResponse_ModActionsEntry = { key: string; value?: ModActionData | undefined; }; export type GetConversationResponse = { conversation?: ConversationData | undefined; messages: { [key: string]: MessageData; }; modActions: { [key: string]: ModActionData; }; participantSubreddit?: Any | undefined; user?: ConversationUserData | undefined; }; export type GetConversationResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type GetConversationResponse_ModActionsEntry = { key: string; value?: ModActionData | undefined; }; export type CreateConversationMessageResponse = { conversation?: ConversationData | undefined; messages: { [key: string]: MessageData; }; user?: ConversationUserData | undefined; }; export type CreateConversationMessageResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type ApproveConversationResponse = { conversations?: ConversationData | undefined; messages: { [key: string]: MessageData; }; user?: ConversationUserData | undefined; modActions: { [key: string]: ModActionData; }; /** error case */ fields: string[]; reason?: string | undefined; message?: string | undefined; explanation?: string | undefined; }; export type ApproveConversationResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type ApproveConversationResponse_ModActionsEntry = { key: string; value?: ModActionData | undefined; }; export type ArchiveConversationResponse = { /** @deprecated use `conversation` */ conversations?: ConversationData | undefined; messages: { [key: string]: MessageData; }; modActions: { [key: string]: ModActionData; }; conversation?: ConversationData | undefined; }; export type ArchiveConversationResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type ArchiveConversationResponse_ModActionsEntry = { key: string; value?: ModActionData | undefined; }; export type HighlightConversationResponse = { /** @deprecated use `conversation` */ conversations?: ConversationData | undefined; messages: { [key: string]: MessageData; }; modActions: { [key: string]: ModActionData; }; conversation?: ConversationData | undefined; }; export type HighlightConversationResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type HighlightConversationResponse_ModActionsEntry = { key: string; value?: ModActionData | undefined; }; export type MuteConversationResponse = { conversations?: ConversationData | undefined; messages: { [key: string]: MessageData; }; user?: ConversationUserData | undefined; modActions: { [key: string]: ModActionData; }; }; export type MuteConversationResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type MuteConversationResponse_ModActionsEntry = { key: string; value?: ModActionData | undefined; }; export type TempBanResponse = { conversations?: ConversationData | undefined; messages: { [key: string]: MessageData; }; user?: ConversationUserData | undefined; modActions: { [key: string]: ModActionData; }; /** error case */ fields: string[]; reason?: string | undefined; message?: string | undefined; }; export type TempBanResponse_MessagesEntry = { key: string; value?: MessageData | undefined; }; export type TempBanResponse_ModActionsEntry = { key: string; value?: ModActionData | undefined; }; export type SubredditsResponse = { subreddits: { [key: string]: SubredditsResponse_SubredditData; }; }; export type SubredditsResponse_SubredditData = { communityIcon?: string | undefined; keyColor?: string | undefined; displayName?: string | undefined; name?: string | undefined; subscribers?: number | undefined; primaryColor?: string | undefined; id?: string | undefined; lastUpdated?: string | undefined; icon?: string | undefined; }; export type SubredditsResponse_SubredditsEntry = { key: string; value?: SubredditsResponse_SubredditData | undefined; }; export type UnreadCountResponse = { archived?: number | undefined; appeals?: number | undefined; highlighted?: number | undefined; notifications?: number | undefined; joinRequests?: number | undefined; filtered?: number | undefined; new?: number | undefined; inprogress?: number | undefined; mod?: number | undefined; }; export type CreateModmailConversationRequest = { /** Subject of the conversation, eg: "Welcome to the subreddit!" */ subject: string; /** Body of the conversation. Supports markdown formatting. Eg: "**Hello** \n Welcome to the subreddit!" */ bodyMarkdown: string; /** Subreddit ID, eg: "t5_2qjpg" */ subredditId: string; /** Author ID, eg: "t2_7gyht" */ authorId: string; /** Is the conversation internal (i.e. mod only)? */ isInternal: boolean; /** Type of participant in the conversation, eg: "PARTICIPANT_USER" */ participantType: string; /** Type of conversation, eg: "SR_USER" */ conversationType: string; }; export type CreateModmailConversationResponse = { /** ID of the created conversation, eg: "qwer42" */ conversationId: string; }; //# sourceMappingURL=newmodmail_msg.d.ts.map