import type { AddSubredditRuleRequest, SubredditAboutRulesResponse_SubredditRule, UpdateSubredditRuleRequest } from '@devvit/protos/json/devvit/plugin/redditapi/subreddits/subreddits_msg.js'; type SubredditRuleProto = SubredditAboutRulesResponse_SubredditRule; /** * Options for creating a new subreddit rule. */ export type CreateRuleOptions = Omit & { kind: 'all' | 'link' | 'comment'; violationReason?: string; }; /** * New values for an existing rule. All fields are optional. If a field is not provided, the existing value will not be changed. */ export type UpdateRuleOptions = Partial> & { kind?: 'all' | 'link' | 'comment'; }; export declare class Rule { #private; constructor(ruleData: SubredditRuleProto, subredditName: string); /** * The name for the rule. */ get shortName(): string; /** * The full description of the rule. This appears on your subreddit's sidebar. */ get description(): string; /** * Which Reddit objects this rule applies to. One of "all", "link" (AKA posts), "comment". */ get kind(): 'all' | 'link' | 'comment'; /** * Text to show users when reporting content due to this rule. Defaults to the shortName. */ get violationReason(): string; /** * The zero-indexed rank of the rule on the subreddit sidebar. Lower numbers appear on top. */ get priority(): number; /** * The Unix timestamp of when the rule was created. */ get createdUtc(): number; get descriptionHtml(): string | undefined; /** * The name (without r/ prefix) of the subreddit the rule belongs to. */ get subredditName(): string; toJSON(): Pick & { descriptionHtml?: string; }; /** * Update an existing rule. * * @param options - New values for an existing rule. All fields are optional. If a field is not provided, the existing value will not be changed. * @param options.shortName - New name for the rule. The rule name must be unique within this subreddit. * @param options.description - New full description of the rule. * @param options.kind - Which Reddit objects this rule should apply to now. One of "all", "link", "comment". * @param options.violationReason - New text to show users when reporting content due to this rule. * To reset violationReason to the default value of shortName, pass the shortName or an empty string. */ update(options: Readonly): Promise; delete(): Promise; static getRules(subredditName: string): Promise; static createRule(subredditName: string, options: Readonly): Promise; static reorderRules(subredditName: string, rules: Rule[]): Promise; static delete(subredditName: string, shortName: string): Promise; } export {}; //# sourceMappingURL=Rule.d.ts.map