import { T3 } from '@devvit/shared-types/tid.js'; export declare enum FlairType { User = "USER_FLAIR", Post = "LINK_FLAIR" } export type AllowableFlairContent = 'all' | 'emoji' | 'text'; export type FlairTextColor = 'light' | 'dark'; export type FlairBackgroundColor = `#${string}` | 'transparent'; export type CreateFlairTemplateOptions = { /** The name of the subreddit to create the flair template in. */ subredditName: string; /** The flair template's allowable content. Either 'all', 'emoji', or 'text'. */ allowableContent?: AllowableFlairContent; /** The background color of the flair. Either 'transparent' or a hex color code. e.g. #FFC0CB */ backgroundColor?: string; maxEmojis?: number; /** Whether or not this flair template is only available to moderators. */ modOnly?: boolean; /** The text to display in the flair. */ text: string; /** Either 'dark' or 'light'. */ textColor?: FlairTextColor; /** Whether or not users are allowed to edit this flair template before using it. */ allowUserEdits?: boolean; }; export type EditFlairTemplateOptions = CreateFlairTemplateOptions & { id: string; }; export declare class FlairTemplate { #private; /** The flair template's ID */ get id(): string; /** The flair template's text */ get text(): string; /** The flair template's text color. Either 'dark' or 'light'. */ get textColor(): FlairTextColor; /** The flair template's background color. Either 'transparent' or a hex color code. e.g. #FFC0CB */ get backgroundColor(): FlairBackgroundColor; /** The flair template's allowable content. Either 'all', 'emoji', or 'text'. */ get allowableContent(): AllowableFlairContent; /** Is the flair template only available to moderators? */ get modOnly(): boolean; /** The flair template's maximum number of emojis. */ get maxEmojis(): number; /** Does the flair template allow users to edit their flair? */ get allowUserEdits(): boolean; /** Delete this flair template */ delete(): Promise; /** Edit this flair template */ edit(options: Partial>): Promise; } export type SetFlairOptions = { /** The name of the subreddit of the item to set the flair on */ subredditName: string; /** The flair template's ID */ flairTemplateId?: string; /** The flair text */ text?: string; /** The flair CSS class */ cssClass?: string; /** The flair text color. Either 'dark' or 'light'. */ textColor?: FlairTextColor; /** The flair background color. Either 'transparent' or a hex color code. e.g. #FFC0CB */ backgroundColor?: string; }; export type SetUserFlairOptions = SetFlairOptions & { /** The username of the user to set the flair on */ username: string; }; export type SetPostFlairOptions = SetFlairOptions & { /** The ID of the post to set the flair on */ postId: T3; }; export type InternalSetPostFlairOptions = SetFlairOptions & { postId: T3; }; export type SetUserFlairBatchConfig = { /** The username of the user to edit the flair on */ username: string; /** The flair text. Can't contain the comma character (",") */ text?: string | undefined; /** The flair CSS class */ cssClass?: string | undefined; }; export type UserFlairPageOptions = { /** A user id optionally provided which will result in a slice of user flairs, starting after this user, to be returned. */ after?: string; /** A user id optionally provided which will result in a slice of user flairs, starting before this user, to be returned. */ before?: string; /** A limit to the number of flairs that will be returned. Default: 25, Max: 1000 */ limit?: number; }; export type GetUserFlairBySubredditOptions = UserFlairPageOptions & { /** The subreddit associated with the flair being retrieved. */ subreddit: string; /** The username associated with the flair being retrieved. */ name?: string; }; export type UserFlair = { /** The CSS class applied to this flair in the UI. */ flairCssClass?: string | undefined; /** The username of the user to which this flair is assigned.*/ user?: string | undefined; /** The text displayed in the UI for this flair. */ flairText?: string | undefined; }; export type GetUserFlairBySubredditResponse = { /** The list of user flair */ users: UserFlair[]; /** The 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 */ next?: string | undefined; /** The 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 */ prev?: string | undefined; }; /** This type is used for both the link and author flairs on Post and Comment objects. */ export type CommonFlair = { /** * One of: "text", "richtext" */ type?: string | undefined; /** * Flair template ID to use when rendering this flair */ templateId?: string | undefined; /** * Plain text representation of the flair */ text?: string | undefined; /** * RichText object representation of the flair */ richtext: { /** * Enum of element types. e.g. emoji or text */ elementType?: string | undefined; /** * Text to show up in the flair, e.g. "Need Advice" */ text?: string | undefined; /** * Emoji references, e.g. ":rainbow:" */ emojiRef?: string | undefined; /** * url string, e.g. "https://reddit.com/" */ url?: string | undefined; }[]; /** * Custom CSS classes from the subreddit's stylesheet to apply to the flair if rendered as HTML */ cssClass?: string | undefined; /** * One of: "light", "dark" */ textColor?: string | undefined; /** * Flair background color as a hex color string (# prefixed) * @example "#FF4500" */ backgroundColor?: string | undefined; }; export declare class Flair { #private; } //# sourceMappingURL=Flair.d.ts.map