Skip to main content
Version: 0.10

Module: models

Table of contents

Enumerations

Classes

Interfaces

Type Aliases

Functions

Type Aliases

AboutSubredditTypes

Ƭ AboutSubredditTypes: "comment" | "post" | "all"


AddRemovalNoteOptions

Ƭ AddRemovalNoteOptions: Prettify<PostRemovalNoteRequest>


AddWidgetData

Ƭ AddWidgetData: AddImageWidgetRequest & { type: "image" } | AddCalendarWidgetRequest & { type: "calendar" } | AddTextAreaWidgetRequest & { type: "textarea" } | AddButtonWidgetRequest & { type: "button" } | AddCommunityListWidgetRequest & { type: "community-list" } | AddPostFlairWidgetRequest & { type: "post-flair" } | AddCustomWidgetRequest & { type: "custom" }


AllowableFlairContent

Ƭ AllowableFlairContent: "all" | "emoji" | "text"


BackgroundImagePosition

Ƭ BackgroundImagePosition: "cover" | "tiled" | "centered"


BannerHeight

Ƭ BannerHeight: "small" | "medium" | "large"


BanUserOptions

Ƭ BanUserOptions: Object

Type declaration

NameType
context?string
duration?number
message?string
note?string
reason?string
subredditNamestring
usernamestring

BanWikiContributorOptions

Ƭ BanWikiContributorOptions: Object

Type declaration

NameType
duration?number
note?string
reason?string
subredditNamestring
usernamestring

CommentMediaTypes

Ƭ CommentMediaTypes: "giphy" | "static" | "animated" | "expression"


CommentSort

Ƭ CommentSort: "confidence" | "top" | "new" | "controversial" | "old" | "random" | "qa" | "live"


CommentSubmissionOptions

Ƭ CommentSubmissionOptions: { text: string } | { richtext: object | RichTextBuilder }


CommonSubmitPostOptions

Ƭ CommonSubmitPostOptions: Object

Type declaration

NameType
flairId?string
flairText?string
nsfw?boolean
sendreplies?boolean
spoiler?boolean
titlestring

CommunityNameFormat

Ƭ CommunityNameFormat: "slashtag" | "pretty" | "hide"


ConversationData

Ƭ ConversationData: Object

Type declaration

NameTypeDescription
authorsParticipant[]The authors of each message in the modmail conversation.
conversationType?stringA ConversationType specifies whether a conversation is with a subreddit itself, with another user, or with another subreddit entirely. - internal - This is a conversation with another user outside of the subreddit. The participant ID is that user's ID. - sr_user - This is a Mod Discussion, internal to the subreddit. There is no other participant. - sr_sr - This is a conversation is with another subreddit. The participant will have a subreddit ID.
id?stringConversation ID
isAuto?booleanIs the conversation automatically generated e.g. from automod, u/reddit
isHighlighted?booleanIs the conversation highlighted
isInternal?booleanIs the conversation internal (i.e. mod only)
lastModUpdate?stringThe 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.)
lastUnread?stringThe datetime of the last unread message within this conversation for the current viewer.
lastUpdated?stringThe datetime of the last time the conversation was update.
lastUserUpdate?stringThe last datetime a user made any interaction with the conversation
messages{ [id: string]: MessageData; }Conversation messages Example ts const arrayOfMessages = Object.values(conversation.messages); const messageById = conversation.messages[messageId];
modActions{ [id: string]: ModActionData; }Conversation mod actions Example ts const arrayOfModActions = Object.values(conversation.modActions); const modActionById = conversation.modActions[modActionId];
numMessages?numberNumber of messages (not actions) in the conversation
participant?ParticipantParticipant. Is absent for mod discussions
state?ModMailConversationStateState of the conversation
subject?stringSuject of the conversation
subreddit?{ displayName?: string ; id?: string }Subreddit owning the modmail conversation
subreddit.displayName?string-
subreddit.id?string-

ConversationResponse

Ƭ ConversationResponse: Object

Type declaration

NameType
conversationConversationData

ConversationStateFilter

Ƭ ConversationStateFilter: "all" | "new" | "inprogress" | "archived" | "appeals" | "join_requests" | "highlighted" | "mod" | "notifications" | "inbox" | "filtered" | "default"

A Conversation State is a way in which conversations may be filtered within the UI.

A conversation can be in more than one state. For example, a conversation may be both 'highlighted' and 'inprogress'.


ConversationUserData

Ƭ ConversationUserData: Object

Type declaration

NameTypeDescription
approveStatus?{ isApproved?: boolean }-
approveStatus.isApproved?boolean-
banStatus?{ endDate?: string ; isBanned?: boolean ; isPermanent?: boolean ; reason?: string }-
banStatus.endDate?string-
banStatus.isBanned?boolean-
banStatus.isPermanent?boolean-
banStatus.reason?string-
created?stringWhen was created
id?stringUser ID
isShadowBanned?boolean-
isSuspended?boolean-
muteStatus?{ endDate?: string ; isMuted?: boolean ; muteCount?: number ; reason?: string }-
muteStatus.endDate?string-
muteStatus.isMuted?boolean-
muteStatus.muteCount?number-
muteStatus.reason?string-
name?stringUsername
recentComments{ [id: string]: { comment?: string ; date?: string ; permalink?: string ; title?: string }; }Recent comments
recentConvos{ [id: string]: { date?: string ; id?: string ; permalink?: string ; subject?: string }; }Recent conversations
recentPosts{ [id: string]: { date?: string ; permalink?: string ; title?: string }; }Recent posts

CreateFlairTemplateOptions

Ƭ CreateFlairTemplateOptions: Object

Type declaration

NameTypeDescription
allowUserEdits?booleanWhether or not users are allowed to edit this flair template before using it.
allowableContent?AllowableFlairContentThe flair template's allowable content. Either 'all', 'emoji', or 'text'.
backgroundColor?stringThe background color of the flair. Either 'transparent' or a hex color code. e.g. #FFC0CB
maxEmojis?number-
modOnly?booleanWhether or not this flair template is only available to moderators.
subredditNamestringThe name of the subreddit to create the flair template in.
textstringThe text to display in the flair.
textColor?FlairTextColorEither 'dark' or 'light'.

CreateModNoteOptions

Ƭ CreateModNoteOptions: Prettify<PostNotesRequest & { label?: UserNoteLabel ; redditId?: T1ID | T3ID }>


CreateRelationshipOptions

Ƭ CreateRelationshipOptions: Object

Type declaration

NameType
banContext?string
banMessage?string
banReason?string
duration?number
note?string
permissions?ModeratorPermission[]
subredditNamestring
typeRelationshipType
usernamestring

CreateWikiPageOptions

Ƭ CreateWikiPageOptions: Object

Type declaration

NameTypeDescription
contentstringThe content of the page.
pagestringThe name of the page to create.
reason?stringThe reason for creating the page.
subredditNamestringThe name of the subreddit to create the page in.

CrosspostOptions

Ƭ CrosspostOptions: CommonSubmitPostOptions & { postId: string ; subredditName: string }


CustomizationFlag

Ƭ CustomizationFlag: "default" | "custom"


DeleteNotesOptions

Ƭ DeleteNotesOptions: Prettify<DeleteNotesRequest>


EditCommentOptions

Ƭ EditCommentOptions: CommentSubmissionOptions


EditFlairTemplateOptions

Ƭ EditFlairTemplateOptions: CreateFlairTemplateOptions & { id: string }


FlairBackgroundColor

Ƭ FlairBackgroundColor: `#${string}` | "transparent"


FlairSettings

Ƭ FlairSettings: Object

Type declaration

NameType
enabledboolean
usersCanAssignboolean
userFlairBackgroundColor?string
userFlairTextColor?string

FlairTextColor

Ƭ FlairTextColor: "light" | "dark"


GetCommentsByUserOptions

Ƭ GetCommentsByUserOptions: Object

Type declaration

NameType
after?string
before?string
limit?number
pageSize?number
sort?"hot" | "new" | "top" | "controversial"
timeframe?"hour" | "day" | "week" | "month" | "year" | "all"
usernamestring

GetCommentsOptions

Ƭ GetCommentsOptions: Object

Type declaration

NameType
commentId?string
depth?number
limit?number
pageSize?number
postIdstring
sort?CommentSort

GetConversationResponse

Ƭ GetConversationResponse: { conversation?: ConversationData ; participantSubreddit?: ParticipantSubreddit } & WithUserData


GetConversationsRequest

Ƭ GetConversationsRequest: Object

Type declaration

NameTypeDescription
after?stringmodmail conversation id
limit?numberan integer between 1 and 100 (default: 25)
sort?"recent" | "mod" | "user" | "unread"Sort by: - recent - Order by whenever anyone last updated the conversation, mod or participant - mod - Order by the last time a mod updated the conversation - user - Order by the last time a participant user updated the conversation - unread - Order by the most recent unread message in the conversation for this mod
state?ConversationStateFilterFilter by conversation state A conversation can be in more than one state. For example, a conversation may be both 'highlighted' and 'inprogress'.
subreddits?string[]array of subreddit names

GetConversationsResponse

Ƭ GetConversationsResponse: Object

Type declaration

NameTypeDescription
conversations{ [id: string]: ConversationData; }Conversations key-value map
viewerId?string-

GetHotPostsOptions

Ƭ GetHotPostsOptions: GetPostsOptions & { location?: "GLOBAL" | "US" | "AR" | "AU" | "BG" | "CA" | "CL" | "CO" | "HR" | "CZ" | "FI" | "FR" | "DE" | "GR" | "HU" | "IS" | "IN" | "IE" | "IT" | "JP" | "MY" | "MX" | "NZ" | "PH" | "PL" | "PT" | "PR" | "RO" | "RS" | "SG" | "ES" | "SE" | "TW" | "TH" | "TR" | "GB" | "US_WA" | "US_DE" | "US_DC" | "US_WI" | "US_WV" | "US_HI" | "US_FL" | "US_WY" | "US_NH" | "US_NJ" | "US_NM" | "US_TX" | "US_LA" | "US_NC" | "US_ND" | "US_NE" | "US_TN" | "US_NY" | "US_PA" | "US_CA" | "US_NV" | "US_VA" | "US_CO" | "US_AK" | "US_AL" | "US_AR" | "US_VT" | "US_IL" | "US_GA" | "US_IN" | "US_IA" | "US_OK" | "US_AZ" | "US_ID" | "US_CT" | "US_ME" | "US_MD" | "US_MA" | "US_OH" | "US_UT" | "US_MO" | "US_MN" | "US_MI" | "US_RI" | "US_KS" | "US_MT" | "US_MS" | "US_SC" | "US_KY" | "US_OR" | "US_SD" }


GetModNotesOptions

Ƭ GetModNotesOptions: Prettify<Pick<GetNotesRequest, "subreddit" | "user"> & { filter?: ModNoteType } & Pick<ListingFetchOptions, "limit" | "before">>


GetModerationLogOptions

Ƭ GetModerationLogOptions: ListingFetchOptions & { moderatorUsernames?: string[] ; subredditName: string ; type?: ModActionType }


GetPageRevisionsOptions

Ƭ GetPageRevisionsOptions: Object

Type declaration

NameTypeDescription
after?stringThe ID of the revision to start at.
limit?numberThe maximum number of revisions to get.
pagestringThe name of the page to get revisions for.
pageSize?numberThe number of revisions to get per request.
subredditNamestringThe name of the subreddit the page is in.

GetPostsByUserOptions

Ƭ GetPostsByUserOptions: Object

Type declaration

NameType
after?string
before?string
limit?number
pageSize?number
sort?"hot" | "new" | "top" | "controversial"
timeframe?"hour" | "day" | "week" | "month" | "year" | "all"
usernamestring

GetPostsOptions

Ƭ GetPostsOptions: ListingFetchOptions & { subredditName?: string }


GetPostsOptionsWithTimeframe

Ƭ GetPostsOptionsWithTimeframe: GetPostsOptions & { timeframe?: "hour" | "day" | "week" | "month" | "year" | "all" }


GetPrivateMessagesOptions

Ƭ GetPrivateMessagesOptions: Prettify<{ type?: "inbox" | "unread" | "sent" } & ListingFetchOptions>


GetSortedPostsOptions

Ƭ GetSortedPostsOptions: GetPostsOptionsWithTimeframe & { sort: "top" | "controversial" }


GetSubredditUsersByTypeOptions

Ƭ GetSubredditUsersByTypeOptions: ListingFetchOptions & { subredditName: string ; type: "banned" | "muted" | "wikibanned" | "contributors" | "wikicontributors" | "moderators" ; username?: string }


GetUserFlairBySubredditOptions

Ƭ GetUserFlairBySubredditOptions: UserFlairPageOptions & { name?: string ; subreddit: string }


GetUserFlairBySubredditResponse

Ƭ GetUserFlairBySubredditResponse: Object

Type declaration

NameTypeDescription
next?stringThe user id of the last user flair in this slice. Its presence indicates that there are more items that can be fetched. Pass this into the "after" parameter in the next call to get the next slice of data
prev?stringThe user id of the first user flair in this slice. Its presence indicates that there are items before this item that can be fetched. Pass this into the "before" parameter in the next call to get the previous slice of data
usersUserFlair[]The list of user flair

GetUserFlairOptions

Ƭ GetUserFlairOptions: UserFlairPageOptions & { usernames?: string[] }


GetUserOverviewOptions

Ƭ GetUserOverviewOptions: Object

Type declaration

NameType
after?string
before?string
limit?number
pageSize?number
sort?"hot" | "new" | "top" | "controversial"
timeframe?"hour" | "day" | "week" | "month" | "year" | "all"
usernamestring

ImagePosition

Ƭ ImagePosition: "cover" | "tiled"


InternalSetPostFlairOptions

Ƭ InternalSetPostFlairOptions: SetFlairOptions & { postId: T3ID }


LinkFlair

Ƭ LinkFlair: Object

Type declaration

NameTypeDescription
backgroundColor?stringFlair background color as a hex color string (# prefixed) Example ts "#FF4500"
cssClass?stringCustom CSS classes from the subreddit's stylesheet to apply to the flair if rendered as HTML
richtext{ elementType?: string ; emojiRef?: string ; text?: string ; url?: string }[]RichText object representation of the flair
templateId?stringFlair template ID to use when rendering this flair
text?stringPlain text representation of the flair
textColor?stringOne of: "light", "dark"
type?stringOne of: "text", "richtext"

ListingFetchOptions

Ƭ ListingFetchOptions: Object

Type declaration

NameType
after?string
before?string
limit?number
more?MoreObject
pageSize?number

ListingFetchResponse

Ƭ ListingFetchResponse<T>: Object

Type parameters

Name
T

Type declaration

NameType
after?string
before?string
childrenT[]
more?MoreObject

MenuPosition

Ƭ MenuPosition: "default" | "overlay"


MessageData

Ƭ MessageData: Object

Type declaration

NameTypeDescription
author?Participant-
body?stringMessage body
bodyMarkdown?string-
date?stringWhen was created
id?stringMessage ID
isInternal?boolean-
participatingAs?string-

ModActionData

Ƭ ModActionData: Object

Type declaration

NameTypeDescription
actionTypeModMailActionTypeType of the action
author?{ id?: number ; isAdmin?: boolean ; isDeleted?: boolean ; isHidden?: boolean ; isMod?: boolean ; name?: string }Action author
author.id?numberUser id
author.isAdmin?boolean-
author.isDeleted?boolean-
author.isHidden?boolean-
author.isMod?boolean-
author.name?stringUser name
date?stringWhen the action happened
id?stringAction id

ModActionTarget

Ƭ ModActionTarget: Object

Type declaration

NameType
author?string
body?string
idstring
permalink?string
title?string

ModActionType

Ƭ ModActionType: "banuser" | "unbanuser" | "spamlink" | "removelink" | "approvelink" | "spamcomment" | "removecomment" | "approvecomment" | "addmoderator" | "showcomment" | "invitemoderator" | "uninvitemoderator" | "acceptmoderatorinvite" | "removemoderator" | "addcontributor" | "removecontributor" | "editsettings" | "editflair" | "distinguish" | "marknsfw" | "wikibanned" | "wikicontributor" | "wikiunbanned" | "wikipagelisted" | "removewikicontributor" | "wikirevise" | "wikipermlevel" | "ignorereports" | "unignorereports" | "setpermissions" | "setsuggestedsort" | "sticky" | "unsticky" | "setcontestmode" | "unsetcontestmode" | "lock" | "unlock" | "muteuser" | "unmuteuser" | "createrule" | "editrule" | "reorderrules" | "deleterule" | "spoiler" | "unspoiler" | "modmail_enrollment" | "community_styling" | "community_widgets" | "markoriginalcontent" | "collections" | "events" | "create_award" | "disable_award" | "delete_award" | "enable_award" | "mod_award_given" | "hidden_award" | "add_community_topics" | "remove_community_topics" | "create_scheduled_post" | "edit_scheduled_post" | "delete_scheduled_post" | "submit_scheduled_post" | "edit_post_requirements" | "invitesubscriber" | "submit_content_rating_survey" | "adjust_post_crowd_control_level" | "enable_post_crowd_control_filter" | "disable_post_crowd_control_filter" | "deleteoverriddenclassification" | "overrideclassification" | "reordermoderators" | "snoozereports" | "unsnoozereports" | "addnote" | "deletenote" | "addremovalreason" | "createremovalreason" | "updateremovalreason" | "deleteremovalreason" | "reorderremovalreason" | "dev_platform_app_changed" | "dev_platform_app_disabled" | "dev_platform_app_enabled" | "dev_platform_app_installed" | "dev_platform_app_uninstalled"


ModLogOptions

Ƭ ModLogOptions<T>: Omit<AboutSubredditHelperOptions<T>, "location">

Type parameters

NameType
Textends AboutSubredditTypes

ModNoteType

Ƭ ModNoteType: "NOTE" | "APPROVAL" | "REMOVAL" | "BAN" | "MUTE" | "INVITE" | "SPAM" | "CONTENT_CHANGE" | "MOD_ACTION" | "ALL"


ModeratorPermission

Ƭ ModeratorPermission: "all" | "wiki" | "posts" | "access" | "mail" | "config" | "flair" | "chat_operator" | "chat_config"


MoreObject

Ƭ MoreObject: Object

Type declaration

NameType
childrenT1ID[]
depthnumber
parentIdT1ID | T3ID

OEmbed

Ƭ OEmbed: Object

oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly. See: https://oembed.com/

Type declaration

NameTypeDescription
authorName?stringThe name of the author/owner of the resource. E.g. "Reddit"
authorUrl?stringA URL for the author/owner of the resource. E.g. "https://www.youtube.com/@Reddit"
height?numberThe width in pixels required to display the HTML.
htmlstringThe HTML required to embed a video player. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities.
providerName?stringA URL for the author/owner of the resource. E.g. "YouTube"
providerUrl?stringThe name of the resource provider. E.g "https://www.youtube.com/"
thumbnailHeight?numberThe height of the optional thumbnail in pixels
thumbnailUrl?stringA URL to a thumbnail image representing the resource.
thumbnailWidth?numberThe width of the optional thumbnail in pixels
title?stringA text title, describing the resource.
typestringThe resource type. Valid values, along with value-specific parameters, are described below. E.g. "video"
versionstringThe oEmbed version number. This must be 1.0.
width?numberThe height in pixels required to display the HTML.

Participant

Ƭ Participant: Object

Conversation participant

Type declaration

NameType
id?number
isAdmin?boolean
isApproved?boolean
isDeleted?boolean
isHidden?boolean
isMod?boolean
isOp?boolean
isParticipant?boolean
name?string

PositionedImagePosition

Ƭ PositionedImagePosition: "left" | "right" | "centered"


PostTextOptions

Ƭ PostTextOptions: { text: string } | { richtext: object | RichTextBuilder }


RedditVideo

Ƭ RedditVideo: Object

Contains the data for a video hosted on Reddit that is in a post

Type declaration

NameTypeDescription
bitrateKbps?numberThe bitrate of the video in kilobits per second. E.g. 450
dashUrl?stringThe URL to the DASH playlist file. E.g. "https://v.redd.it/abc123/DASHPlaylist.mpd"
duration?numberThe duration of the video in seconds. E.g. 30
fallbackUrl?stringThe direct URL to the video. E.g. "https://v.redd.it/abc123/DASH_1080.mp4?source=fallback"
height?numberThe height of the video in pixels. E.g. 1080
hlsUrl?stringThe URL to the HLS playlist file. E.g. "https://v.redd.it/abc123/HLSPlaylist.m3u8"
isGif?booleanIf true, the video is a GIF
scrubberMediaUrl?stringThe URL to the scrubber media file. E.g. "https://v.redd.it/abc123/DASH_96.mp4"
transcodingStatus?stringThe status of the transcoding process. E.g. "completed"
width?numberThe width of the video in pixels. E.g. 1920

RelationshipType

Ƭ RelationshipType: "moderator_invite" | "contributor" | "banned" | "muted" | "wikibanned" | "wikicontributor"


RemovalReason

Ƭ RemovalReason: Object

An individual Removal Reason object.

Type declaration

NameTypeDescription
idstringThe ID of the removal reason.
messagestringThe message associated with the removal reason.
titlestringThe title of the removal reason.

RemoveRelationshipOptions

Ƭ RemoveRelationshipOptions: Object

Type declaration

NameType
subredditNamestring
typeRelationshipType | "moderator"
usernamestring

ReplyToCommentOptions

Ƭ ReplyToCommentOptions: CommentSubmissionOptions


SecureMedia

Ƭ SecureMedia: Object

Type declaration

NameTypeDescription
oembed?OEmbed-
redditVideo?RedditVideo-
type?stringThe type of the OEmbed media, if present (e.g. "youtube.com")

SendPrivateMessageAsSubredditOptions

Ƭ SendPrivateMessageAsSubredditOptions: SendPrivateMessageOptions & { fromSubredditName: string }


SendPrivateMessageOptions

Ƭ SendPrivateMessageOptions: Object

Type declaration

NameTypeDescription
subjectstringThe subject of the message.
textstringThe body of the message in markdown text format.
tostringRecipient username (without the leading u/), or /r/name for that subreddit's moderators.

SetFlairOptions

Ƭ SetFlairOptions: Object

Type declaration

NameTypeDescription
backgroundColor?stringThe flair background color. Either 'transparent' or a hex color code. e.g. #FFC0CB
cssClass?stringThe flair CSS class
flairTemplateId?stringThe flair template's ID
subredditNamestringThe name of the subreddit of the item to set the flair on
text?stringThe flair text
textColor?FlairTextColorThe flair text color. Either 'dark' or 'light'.

SetPostFlairOptions

Ƭ SetPostFlairOptions: SetFlairOptions & { postId: string }


SetUserFlairOptions

Ƭ SetUserFlairOptions: SetFlairOptions & { username: string }


SubmitCustomPostOptions

Ƭ SubmitCustomPostOptions: CommonSubmitPostOptions & { preview: JSX.Element }


SubmitLinkOptions

Ƭ SubmitLinkOptions: CommonSubmitPostOptions & { resubmit?: boolean ; url: string }


SubmitMediaOptions

Ƭ SubmitMediaOptions: CommonSubmitPostOptions & { kind: "image" | "video" | "videogif" ; videoPosterUrl: string }


SubmitPostOptions

Ƭ SubmitPostOptions: SubmitLinkOptions | SubmitSelfPostOptions | SubmitCustomPostOptions | SubmitMediaOptions & { subredditName: string }


SubmitSelfPostOptions

Ƭ SubmitSelfPostOptions: PostTextOptions & CommonSubmitPostOptions


SubredditData

Ƭ SubredditData: Object

Type declaration

NameType
communityIcon?string
displayName?string
icon?string
id?string
keyColor?string
lastUpdated?string
name?string
primaryColor?string
subscribers?number

SubredditSettings

Ƭ SubredditSettings: Object

Type declaration

NameTypeDescription
acceptFollowersbooleanWhether the subreddit accepts followers or not.
allOriginalContentbooleanWhether all content posted on the subreddit is original.
allowChatPostCreationbooleanWhether users are allowed to create chat posts on the subreddit.
allowDiscoverybooleanWhether the subreddit can be discovered through search.
allowGalleriesbooleanWhether the subreddit allows galleries.
allowImagesbooleanWhether the subreddit allows images.
allowPollsbooleanWhether the subreddit allows polls.
allowPredictionContributorsbooleanWhether contributors are allowed to make predictions on the subreddit.
allowPredictionsbooleanWhether predictions are allowed on the subreddit.
allowPredictionsTournamentbooleanWhether prediction tournaments are allowed on the subreddit.
allowTalksbooleanWhether talks are allowed on the subreddit.
allowVideoGifsbooleanWhether video GIFs are allowed on the subreddit.
allowVideosbooleanWhether videos are allowed on the subreddit.
allowedMediaInCommentsCommentMediaTypes[]List of allowed media types in the comments made in the subreddit.
allowedPostType"any" | "link" | "self"The types of post allowed in this subreddit. Either "any", "link", or "self".
bannerBackgroundColor?stringa 6-digit rgb hex color of the banner e.g. #AABBCC,
bannerBackgroundImage?stringThe background image of the banner.
bannerImage?stringThe URL of the banner image.
chatPostEnabledbooleanWhether chat posts are enabled on the subreddit.
collectionsEnabledbooleanWhether collections are enabled on the subreddit.
communityIcon?stringThe URL of the community icon.
crosspostablebooleanWhether crossposts can be made to this subreddit.
emojisEnabledbooleanWhether emojis are enabled on the subreddit.
eventPostsEnabledbooleanWhether event posts are enabled on the subreddit.
headerTitle?stringThe header title.
keyColor?stringThe 6-digit rgb hex color of the subreddit's key color, e.g. #AABBCC
linkFlairEnabledbooleanWhether link flairs are enabled on the subreddit.
mobileBannerImage?stringBanner image used on mobile apps.
originalContentTagEnabledbooleanWhether the Original Content tag is enabled.
postFlairsFlairSettingsThe post flair settings for the subreddit.
primaryColor?stringThe 6-digit rgb hex color of the subreddit's primary color, e.g. #AABBCC
restrictCommentingbooleanWhether commenting is restricted in the subreddit.
restrictPostingbooleanWhether posting is restricted in the subreddit.
shouldArchivePostsbooleanWhether posts in the subreddit should be automatically archived after 6 months.
spoilersEnabledbooleanWhether the Spoiler tag is enabled.
urlstringHTTP URL to the subreddit
userFlairsFlairSettingsThe user flair settings for the subreddit.
wikiEnabledbooleanWhether the wiki is enabled for the subreddit.

SubredditStyles

Ƭ SubredditStyles: Object

Type declaration

NameType
backgroundColor?string
backgroundImage?string
backgroundImagePosition?BackgroundImagePosition
bannerBackgroundColor?string
bannerBackgroundImage?string
bannerBackgroundImagePosition?ImagePosition
bannerCommunityName?string
bannerCommunityNameFormat?CommunityNameFormat
bannerHeight?BannerHeight
bannerOverlayColor?string
bannerPositionedImage?string
bannerPositionedImagePosition?PositionedImagePosition
bannerShowCommunityIcon?Visibility
highlightColor?string
icon?string
legacyBannerBackgroundImage?string
legacyPrimaryColor?string
menuBackgroundBlur?number
menuBackgroundColor?string
menuBackgroundImage?string
menuBackgroundOpacity?number
menuLinkColorActive?string
menuLinkColorHover?string
menuLinkColorInactive?string
menuPosition?MenuPosition
mobileBannerImage?string
mobileKeyColor?string
postBackgroundColor?string
postBackgroundImage?string
postBackgroundImagePosition?ImagePosition
postDownvoteCountColor?string
postDownvoteIconActive?string
postDownvoteIconInactive?string
postPlaceholderImage?string
postPlaceholderImagePosition?ImagePosition
postTitleColor?string
postUpvoteCountColor?string
postUpvoteIconActive?string
postUpvoteIconInactive?string
postVoteIcons?CustomizationFlag
primaryColor?string
secondaryBannerPositionedImage?string
sidebarWidgetBackgroundColor?string
sidebarWidgetHeaderColor?string
submenuBackgroundColor?string
submenuBackgroundStyle?CustomizationFlag

SubredditType

Ƭ SubredditType: "public" | "private" | "restricted" | "employees_only" | "gold_restricted" | "archived"


UnreadCountResponse

Ƭ UnreadCountResponse: Object

Type declaration

NameType
appeals?number
archived?number
filtered?number
highlighted?number
inprogress?number
joinRequests?number
mod?number
new?number
notifications?number

UpdatePageSettingsOptions

Ƭ UpdatePageSettingsOptions: Object

Type declaration

NameTypeDescription
listedbooleanWhether the page should be listed in the wiki index.
pagestringThe name of the page to update settings for.
permLevelWikiPagePermissionLevelThe permission level for the page.
subredditNamestringThe name of the subreddit the page is in.

UpdateWikiPageOptions

Ƭ UpdateWikiPageOptions: Object

Type declaration

NameTypeDescription
contentstringThe new content of the page.
pagestringThe name of the page to update.
reason?stringThe reason for updating the page.
subredditNamestringThe name of the subreddit the page is in.

UserFlair

Ƭ UserFlair: Object

Type declaration

NameTypeDescription
flairCssClass?stringThe CSS class applied to this flair in the UI.
flairText?stringThe text displayed in the UI for this flair.
user?stringThe username of the user to which this flair is assigned.

UserFlairPageOptions

Ƭ UserFlairPageOptions: Object

Type declaration

NameTypeDescription
after?stringA user id optionally provided which will result in a slice of user flairs, starting after this user, to be returned.
before?stringA user id optionally provided which will result in a slice of user flairs, starting before this user, to be returned.
limit?numberA limit to the number of flairs that will be returned. Default: 25, Max: 1000

UserNote

Ƭ UserNote: Object

Type declaration

NameType
label?UserNoteLabel
note?string
redditId?T1ID | T3ID | T5ID

UserNoteLabel

Ƭ UserNoteLabel: "BOT_BAN" | "PERMA_BAN" | "BAN" | "ABUSE_WARNING" | "SPAM_WARNING" | "SPAM_WATCH" | "SOLID_CONTRIBUTOR" | "HELPFUL_USER"


WithUserData

Ƭ WithUserData: Object


Visibility

Ƭ Visibility: "show" | "hide"

Type declaration

NameType
user?ConversationUserData

Functions

getModerationLog

getModerationLog(options, metadata): Listing<ModAction>

Parameters

NameType
optionsGetModerationLogOptions
metadataundefined | Metadata

Returns

Listing<ModAction>


getSubredditLeaderboard

getSubredditLeaderboard(subredditId, metadata): Promise<SubredditLeaderboard>

Parameters

NameType
subredditIdstring
metadataundefined | Metadata

Returns

Promise<SubredditLeaderboard>


getVaultByAddress

getVaultByAddress(address, metadata): Promise<Vault>

Parameters

NameType
addressstring
metadataundefined | Metadata

Returns

Promise<Vault>


getVaultByUserId

getVaultByUserId(userId, metadata): Promise<Vault>

Parameters

NameType
userId`t2_${string}`
metadataundefined | Metadata

Returns

Promise<Vault>

  • Table of contents
  • Type Aliases
    • AboutSubredditTypes
    • AddRemovalNoteOptions
    • AddWidgetData
    • AllowableFlairContent
    • BackgroundImagePosition
    • BannerHeight
    • BanUserOptions
    • BanWikiContributorOptions
    • CommentMediaTypes
    • CommentSort
    • CommentSubmissionOptions
    • CommonSubmitPostOptions
    • CommunityNameFormat
    • ConversationData
    • ConversationResponse
    • ConversationStateFilter
    • ConversationUserData
    • CreateFlairTemplateOptions
    • CreateModNoteOptions
    • CreateRelationshipOptions
    • CreateWikiPageOptions
    • CrosspostOptions
    • CustomizationFlag
    • DeleteNotesOptions
    • EditCommentOptions
    • EditFlairTemplateOptions
    • FlairBackgroundColor
    • FlairSettings
    • FlairTextColor
    • GetCommentsByUserOptions
    • GetCommentsOptions
    • GetConversationResponse
    • GetConversationsRequest
    • GetConversationsResponse
    • GetHotPostsOptions
    • GetModNotesOptions
    • GetModerationLogOptions
    • GetPageRevisionsOptions
    • GetPostsByUserOptions
    • GetPostsOptions
    • GetPostsOptionsWithTimeframe
    • GetPrivateMessagesOptions
    • GetSortedPostsOptions
    • GetSubredditUsersByTypeOptions
    • GetUserFlairBySubredditOptions
    • GetUserFlairBySubredditResponse
    • GetUserFlairOptions
    • GetUserOverviewOptions
    • ImagePosition
    • InternalSetPostFlairOptions
    • LinkFlair
    • ListingFetchOptions
    • ListingFetchResponse
    • MenuPosition
    • MessageData
    • ModActionData
    • ModActionTarget
    • ModActionType
    • ModLogOptions
    • ModNoteType
    • ModeratorPermission
    • MoreObject
    • OEmbed
    • Participant
    • PositionedImagePosition
    • PostTextOptions
    • RedditVideo
    • RelationshipType
    • RemovalReason
    • RemoveRelationshipOptions
    • ReplyToCommentOptions
    • SecureMedia
    • SendPrivateMessageAsSubredditOptions
    • SendPrivateMessageOptions
    • SetFlairOptions
    • SetPostFlairOptions
    • SetUserFlairOptions
    • SubmitCustomPostOptions
    • SubmitLinkOptions
    • SubmitMediaOptions
    • SubmitPostOptions
    • SubmitSelfPostOptions
    • SubredditData
    • SubredditSettings
    • SubredditStyles
    • SubredditType
    • UnreadCountResponse
    • UpdatePageSettingsOptions
    • UpdateWikiPageOptions
    • UserFlair
    • UserFlairPageOptions
    • UserNote
    • UserNoteLabel
    • WithUserData
    • Visibility
  • Functions
    • getModerationLog
    • getSubredditLeaderboard
    • getVaultByAddress
    • getVaultByUserId