var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
    if (kind === "m") throw new TypeError("Private method is not writable");
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _RedditAPIClient_metadata, _RedditAPIClient_modMailService;
import { Header } from '@devvit/shared-types/Header.js';
import { asT3ID, asTID, isT1ID, isT3ID } from '@devvit/shared-types/tid.js';
import { Devvit } from '../../devvit/Devvit.js';
import { AboutLocations, Comment, Flair, FlairTemplate, getModerationLog, getSubredditInfoById, getSubredditInfoByName, getSubredditLeaderboard, getSubredditStyles, getVaultByAddress, getVaultByUserId, ModMailService, ModNote, Post, PrivateMessage, Subreddit, User, Widget, WikiPage, } from './models/index.js';
/**
 * The Reddit API Client
 *
 * To use the Reddit API Client, add it to the plugin configuration at the top of the file.
 *
 * @example
 * ```ts
 *
 * Devvit.configure({
 *    redditAPI: true,
 *    // other plugins
 * })

 * // use within one of our capability handlers e.g. Menu Actions, Triggers, Scheduled Job Type, etc
 * async (event, context) => {
 *     const { reddit } = context
 *     const subreddit = await reddit.getSubredditById(context.subredditId);
 *     context.reddit.submitPost({
 *       subredditName: subreddit.name,
 *       title: 'test post',
 *       text: 'test body',
 *     })
 *     // additional code
 * }
 * ```
 */
export class RedditAPIClient {
    constructor(metadata) {
        _RedditAPIClient_metadata.set(this, void 0);
        _RedditAPIClient_modMailService.set(this, void 0);
        __classPrivateFieldSet(this, _RedditAPIClient_metadata, metadata, "f");
        __classPrivateFieldSet(this, _RedditAPIClient_modMailService, new ModMailService(metadata), "f");
    }
    /**
     * Get ModMail API object
     *
     * @example
     * ```ts
     * await reddit.modMail.reply({
     *   body: "Here is my message",
     *   conversationId: "abcd42";
     * })
     * ```
     */
    get modMail() {
        return __classPrivateFieldGet(this, _RedditAPIClient_modMailService, "f");
    }
    /**
     * Gets a {@link Subreddit} object by ID
     *
     * @deprecated Use {@link getSubredditInfoById} instead.
     * @param {string} id - The ID (starting with t5_) of the subreddit to retrieve. e.g. t5_2qjpg
     * @returns {Promise<Subreddit>} A Promise that resolves a Subreddit object.
     * @example
     * ```ts
     * const memes = await reddit.getSubredditById('t5_2qjpg');
     * ```
     */
    getSubredditById(id) {
        return Subreddit.getById(asTID(id), __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Gets a {@link SubredditInfo} object by ID
     *
     * @param {string} id - The ID (starting with t5_) of the subreddit to retrieve. e.g. t5_2qjpg
     * @returns {Promise<SubredditInfo>} A Promise that resolves a SubredditInfo object.
     * @example
     * ```ts
     * const memes = await reddit.getSubredditInfoById('t5_2qjpg');
     * ```
     */
    getSubredditInfoById(id) {
        return getSubredditInfoById(id, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Gets a {@link Subreddit} object by name
     *
     * @deprecated Use {@link getSubredditInfoByName} instead.
     * @param {string} name The name of a subreddit omitting the r/. This is case insensitive.
     * @returns {Promise<Subreddit>} A Promise that resolves a Subreddit object.
     * @example
     * ```ts
     * const askReddit = await reddit.getSubredditByName('askReddit');
     * ```
     */
    getSubredditByName(name) {
        return Subreddit.getByName(name, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Gets a {@link SubredditInfo} object by name
     *
     * @param {string} name The name of a subreddit omitting the r/. This is case insensitive.
     * @returns {Promise<SubredditInfo>} A Promise that resolves a SubredditInfo object.
     * @example
     * ```ts
     * const askReddit = await reddit.getSubredditInfoByName('askReddit');
     * ```
     */
    getSubredditInfoByName(name) {
        return getSubredditInfoByName(name, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Add a removal reason to a subreddit
     *
     * @param subredditName Name of the subreddit being removed.
     * @param options Options.
     * @param options.title The title of the removal reason.
     * @param options.message The message associated with the removal reason.
     * @example
     * ```ts
     * const newReason = await reddit.addSubredditRemovalReasons(
     *   'askReddit',
     *   {
     *     title: 'Spam',
     *     message: 'This is spam!'
     *   }
     * );
     * console.log(newReason.id)
     * ```
     *
     * @returns {string} Removal Reason ID
     */
    addSubredditRemovalReason(subredditName, options) {
        return Subreddit.addRemovalReason(subredditName, options.title, options.message, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the list of subreddit's removal reasons (ordered)
     *
     * @param subredditName
     * @example
     * ```ts
     * const reasons = await reddit.getSubredditRemovalReasons('askReddit');
     *
     * for (let reason of reasons) {
     *   console.log(reason.id, reason.message, reason.title)
     * }
     * ```
     *
     * @returns Ordered array of Removal Reasons
     */
    getSubredditRemovalReasons(subredditName) {
        return Subreddit.getRemovalReasons(subredditName, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Retrieves the current subreddit.
     *
     * @returns {Promise<Subreddit>} A Promise that resolves a Subreddit object.
     * @example
     * ```ts
     * const currentSubreddit = await reddit.getCurrentSubreddit();
     * ```
     */
    getCurrentSubreddit() {
        return Subreddit.getFromMetadata(__classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Gets a {@link Post} object by ID
     *
     * @param id
     * @returns A Promise that resolves to a Post object.
     */
    getPostById(id) {
        return Post.getById(asTID(id), __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Submits a new post to a subreddit.
     *
     * @param options - Either a self post or a link post.
     * @returns A Promise that resolves to a Post object.
     * @example
     * ```ts
     * const post = await reddit.submitPost({
     *   subredditName: 'devvit',
     *   title: 'Hello World',
     *   richtext: new RichTextBuilder()
     *     .heading({ level: 1 }, (h) => {
     *       h.rawText('Hello world');
     *     })
     *     .codeBlock({}, (cb) => cb.rawText('This post was created via the Devvit API'))
     *     .build()
     * });
     * ```
     */
    submitPost(options) {
        return Post.submit(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Crossposts a post to a subreddit.
     *
     * @param options - Options for crossposting a post
     * @param options.subredditName - The name of the subreddit to crosspost to
     * @param options.postId - The ID of the post to crosspost
     * @param options.title - The title of the crosspost
     * @returns - A Promise that resolves to a Post object.
     */
    crosspost(options) {
        return Post.crosspost(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Gets a {@link User} object by ID
     *
     * @param id - The ID (starting with t2_) of the user to retrieve. e.g. t2_1qjpg
     * @returns A Promise that resolves to a User object.
     * @example
     * ```ts
     * const user = await reddit.getUserById('t2_1qjpg');
     * ```
     */
    getUserById(id) {
        return User.getById(asTID(id), __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Gets a {@link User} object by username
     *
     * @param username - The username of the user omitting the u/. e.g. 'devvit'
     * @returns A Promise that resolves to a User object or undefined if user is
     *          not found (user doesn't exist, account suspended, etc).
     * @example
     * ```ts
     * const user = await reddit.getUserByUsername('devvit');
     * if (user) {
     *   console.log(user)
     * }
     * ```
     */
    getUserByUsername(username) {
        return User.getByUsername(username, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the current calling user.
     * Resolves to undefined for logged-out custom post renders.
     *
     * @returns A Promise that resolves to a User object or undefined
     * @example
     * ```ts
     * const user = await reddit.getCurrentUser();
     * ```
     */
    getCurrentUser() {
        return User.getFromMetadata(Header.User, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the user that the app runs as on the provided metadata.
     *
     * @returns A Promise that resolves to a User object.
     * @example
     * ```ts
     * const user = await reddit.getAppUser(metadata);
     * ```
     */
    getAppUser() {
        return User.getFromMetadata(Header.AppUser, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the snoovatar URL for a given username.
     *
     * @param username - The username of the snoovatar to retrieve
     * @returns A Promise that resolves to a URL of the snoovatar image if it exists.
     */
    getSnoovatarUrl(username) {
        return User.getSnoovatarUrl(username, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a {@link Comment} object by ID
     *
     * @param id - The ID (starting with t1_) of the comment to retrieve. e.g. t1_1qjpg
     * @returns A Promise that resolves to a Comment object.
     * @example
     * ```ts
     * const comment = await reddit.getCommentById('t1_1qjpg');
     * ```
     */
    getCommentById(id) {
        return Comment.getById(asTID(id), __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of comments from a specific post or comment.
     *
     * @param options - Options for the request
     * @param options.postId - The ID of the post e.g. 't3_1qjpg'
     * @param options.commentId - The ID of the comment e.g. 't1_1qjpg'
     * @param options.limit - The maximum number of comments to return. e.g. 1000
     * @param options.pageSize - The number of comments to return per request. e.g. 100
     * @param options.sort - The sort order of the comments. e.g. 'new'
     * @returns A Listing of Comment objects.
     * @example
     * ```ts
     * const comments = await reddit.getComments({
     *   postId: 't3_1qjpg',
     *   limit: 1000,
     *   pageSize: 100
     * }).all();
     * ```
     */
    getComments(options) {
        return Comment.getComments(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of comments by a specific user.
     *
     * @param options - Options for the request
     * @param options.username - The username of the user omitting the u/. e.g. 'spez'
     * @param options.sort - The sort order of the comments. e.g. 'new'
     * @param options.timeframe - The timeframe of the comments. e.g. 'all'
     * @param options.limit - The maximum number of comments to return. e.g. 1000
     * @param options.pageSize - The number of comments to return per request. e.g. 100
     * @returns A Listing of Comment objects.
     */
    getCommentsByUser(options) {
        return Comment.getCommentsByUser(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Submit a new comment to a post or comment.
     *
     * @param options - You must provide either `options.text` or `options.richtext` but not both.
     * @param options.id - The ID of the post or comment to comment on. e.g. 't3_1qjpg' for post and 't1_1qgif' for comment
     * @param options.text - The text of the comment
     * @param options.richtext - The rich text of the comment
     * @returns A Promise that resolves to a Comment object.
     */
    submitComment(options) {
        return Comment.submit({
            ...options,
            id: asTID(options.id),
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of controversial posts from a specific subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get posts from. e.g. 'memes'
     * @param options.timeframe - The timeframe to get posts from. e.g. 'day'
     * @param options.limit - The maximum number of posts to return. e.g. 1000
     * @param options.pageSize - The number of posts to return per request. e.g. 100
     * @returns A Listing of Post objects.
     * @example
     * ```ts
     * const posts = await reddit.getControversialPosts({
     *   subredditName: 'memes',
     *   timeframe: 'day',
     *   limit: 1000,
     *   pageSize: 100
     * }).all();
     * ```
     */
    getControversialPosts(options) {
        return Post.getControversialPosts(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of controversial posts from a specific subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get posts from. e.g. 'memes'
     * @param options.timeframe - The timeframe to get posts from. e.g. 'day'
     * @param options.limit - The maximum number of posts to return. e.g. 1000
     * @param options.pageSize - The number of posts to return per request. e.g. 100
     * @returns A Listing of Post objects.
     * @example
     * ```ts
     * const posts = await reddit.getControversialPosts({
     *   subredditName: 'memes',
     *   timeframe: 'day',
     *   limit: 1000,
     *   pageSize: 100
     * }).all();
     * ```
     */
    getTopPosts(options) {
        return Post.getTopPosts(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of hot posts from a specific subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get posts from. e.g. 'memes'
     * @param options.timeframe - The timeframe to get posts from. e.g. 'day'
     * @param options.limit - The maximum number of posts to return. e.g. 1000
     * @param options.pageSize - The number of posts to return per request. e.g. 100
     * @returns A Listing of Post objects.
     * @example
     * ```ts
     * const posts = await reddit.getHotPosts({
     *   subredditName: 'memes',
     *   timeframe: 'day',
     *   limit: 1000,
     *   pageSize: 100
     * }).all();
     * ```
     */
    getHotPosts(options) {
        return Post.getHotPosts(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of new posts from a specific subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get posts from. e.g. 'memes'
     * @param options.limit - The maximum number of posts to return. e.g. 1000
     * @param options.pageSize - The number of posts to return per request. e.g. 100
     * @returns A Listing of Post objects.
     * @example
     * ```ts
     * const posts = await reddit.getNewPosts({
     *   subredditName: 'memes',
     *   limit: 1000,
     *   pageSize: 100
     * }).all();
     * ```
     */
    getNewPosts(options) {
        return Post.getNewPosts(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of hot posts from a specific subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get posts from. e.g. 'memes'
     * @param options.timeframe - The timeframe to get posts from. e.g. 'day'
     * @param options.limit - The maximum number of posts to return. e.g. 1000
     * @param options.pageSize - The number of posts to return per request. e.g. 100
     * @returns A Listing of Post objects.
     * @example
     * ```ts
     * const posts = await reddit.getRisingPosts({
     *   subredditName: 'memes',
     *   timeframe: 'day',
     *   limit: 1000,
     *   pageSize: 100
     * }).all();
     * ```
     */
    getRisingPosts(options) {
        return Post.getRisingPosts(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of posts from a specific user.
     *
     * @param options - Options for the request
     * @param options.username - The username of the user omitting the u/. e.g. 'spez'
     * @param options.sort - The sort method to use. e.g. 'new'
     * @param options.timeframe - The timeframe to get posts from. e.g. 'day'
     * @param options.limit - The maximum number of posts to return. e.g. 1000
     * @param options.pageSize - The number of posts to return per request. e.g. 100
     * @returns A Listing of Post objects.
     */
    getPostsByUser(options) {
        return Post.getPostsByUser(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of posts and comments from a specific user.
     *
     * @param options - Options for the request
     * @param options.username - The username of the user omitting the u/. e.g. 'spez'
     * @param options.sort - The sort method to use. e.g. 'new'
     * @param options.timeframe - The timeframe to get posts from. e.g. 'day'
     * @param options.limit - The maximum number of posts to return. e.g. 1000
     * @param options.pageSize - The number of posts to return per request. e.g. 100
     * @returns A Listing of `Post` and `Comment` objects.
     */
    getCommentsAndPostsByUser(options) {
        return User.getOverview(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the moderation log for a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get the moderation log from. e.g. 'memes'
     * @param options.moderatorUsernames (optional) A moderator filter. Accepts an array of usernames
     * @param options.type (optional) Filter the entries by the type of the Moderator action
     * @param options.limit - (optional) The maximum number of ModActions to return. e.g. 1000
     * @param options.pageSize - (optional) The number of ModActions to return per request. e.g. 100
     * @returns A Listing of ModAction objects.
     * @example
     * ```ts
     * const modActions = await reddit.getModerationLog({
     *   subredditName: 'memes',
     *   moderatorUsernames: ['spez'],
     *   type: 'banuser',
     *   limit: 1000,
     *   pageSize: 100
     * }).all();
     * ```
     */
    getModerationLog(options) {
        return getModerationLog(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of users who have been approved to post in a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get the approved users from. e.g. 'memes'
     * @param options.username - Use this to see if a user is approved to post in the subreddit.
     * @param options.limit - The maximum number of users to return. e.g. 1000
     * @param options.pageSize - The number of users to return per request. e.g. 100
     * @returns A Listing of User objects.
     */
    getApprovedUsers(options) {
        return User.getSubredditUsersByType({
            type: 'contributors',
            ...options,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Approve a user to post in a subreddit.
     *
     * @param username - The username of the user to approve. e.g. 'spez'
     * @param subredditName - The name of the subreddit to approve the user in. e.g. 'memes'
     */
    approveUser(username, subredditName) {
        return User.createRelationship({
            username,
            subredditName,
            type: 'contributor',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Remove a user's approval to post in a subreddit.
     *
     * @param username - The username of the user to remove approval from. e.g. 'spez'
     * @param subredditName - The name of the subreddit to remove the user's approval from. e.g. 'memes'
     */
    removeUser(username, subredditName) {
        return User.removeRelationship({
            username,
            subredditName,
            type: 'contributor',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of users who are wiki contributors of a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get the wiki contributors from. e.g. 'memes'
     * @param options.username - Use this to see if a user is a wiki contributor for the subreddit.
     * @param options.limit - The maximum number of users to return. e.g. 1000
     * @param options.pageSize - The number of users to return per request. e.g. 100
     * @returns A Listing of User objects.
     */
    getWikiContributors(options) {
        return User.getSubredditUsersByType({
            type: 'wikicontributors',
            ...options,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Add a user as a wiki contributor for a subreddit.
     *
     * @param username - The username of the user to add as a wiki contributor. e.g. 'spez'
     * @param subredditName - The name of the subreddit to add the user as a wiki contributor. e.g. 'memes'
     */
    addWikiContributor(username, subredditName) {
        return User.createRelationship({
            username,
            subredditName,
            type: 'wikicontributor',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Remove a user's wiki contributor status for a subreddit.
     *
     * @param username - The username of the user to remove wiki contributor status from. e.g. 'spez'
     * @param subredditName - The name of the subreddit to remove the user's wiki contributor status from. e.g. 'memes'
     */
    removeWikiContributor(username, subredditName) {
        return User.removeRelationship({
            username,
            subredditName,
            type: 'wikicontributor',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of users who are banned from a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get the banned users from. e.g. 'memes'
     * @param options.username - Use this to see if a user is banned from the subreddit.
     * @param options.limit - The maximum number of users to return. e.g. 1000
     * @param options.pageSize - The number of users to return per request. e.g. 100
     * @returns A Listing of User objects.
     */
    getBannedUsers(options) {
        return User.getSubredditUsersByType({
            type: 'banned',
            ...options,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Ban a user from a subreddit.
     *
     * @param options - Options for the request
     * @param options.username - The username of the user to ban. e.g. 'spez'
     * @param options.subredditName - The name of the subreddit to ban the user from. e.g. 'memes'
     * @param options.note - A mod note for the ban. (optional)
     * @param options.duration - The number of days the user should be banned for. (optional)
     * @param options.message - A message to send to the user when they are banned. (optional)
     * @param options.context - The ID of the post or comment that caused the ban. (optional)
     * @param options.reason - The reason for the ban. (optional)
     */
    banUser(options) {
        return User.createRelationship({
            username: options.username,
            subredditName: options.subredditName,
            type: 'banned',
            banReason: options.reason,
            banMessage: options.message,
            note: options.note,
            duration: options.duration,
            banContext: options.context,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Unban a user from a subreddit.
     *
     * @param username - The username of the user to unban. e.g. 'spez'
     * @param subredditName - The name of the subreddit to unban the user from. e.g. 'memes'
     */
    unbanUser(username, subredditName) {
        return User.removeRelationship({
            username,
            subredditName,
            type: 'banned',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of users who are banned from contributing to the wiki on a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get the banned wiki contributors from. e.g. 'memes'
     * @param options.username - Use this to see if a user is banned from contributing to the wiki on a subreddit.
     * @param options.limit - The maximum number of users to return. e.g. 1000
     * @param options.pageSize - The number of users to return per request. e.g. 100
     * @returns A Listing of User objects.
     */
    getBannedWikiContributors(options) {
        return User.getSubredditUsersByType({
            type: 'wikibanned',
            ...options,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Ban a user from contributing to the wiki on a subreddit.
     *
     * @param options - Options for the request
     * @param options.username - The username of the user to ban. e.g. 'spez'
     * @param options.subredditName - The name of the subreddit to ban the user from contributing to the wiki on. e.g. 'memes'
     * @param options.reason - The reason for the ban. (optional)
     * @param options.duration - The number of days the user should be banned for. (optional)
     * @param options.note - A mod note for the ban. (optional)
     */
    banWikiContributor(options) {
        return User.createRelationship({
            ...options,
            type: 'wikibanned',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     *
     * @param username - The username of the user to unban. e.g. 'spez'
     * @param subredditName - The name of the subreddit to unban the user from contributing to the wiki on. e.g. 'memes'
     */
    unbanWikiContributor(username, subredditName) {
        return User.removeRelationship({
            username,
            subredditName,
            type: 'wikibanned',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of users who are moderators for a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get the moderators from. e.g. 'memes'
     * @param options.username - Use this to see if a user is a moderator of the subreddit.
     * @param options.limit - The maximum number of users to return. e.g. 1000
     * @param options.pageSize - The number of users to return per request. e.g. 100
     * @returns A Listing of User objects.
     */
    getModerators(options) {
        return User.getSubredditUsersByType({
            type: 'moderators',
            ...options,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Invite a user to become a moderator of a subreddit.
     *
     * @param options - Options for the request
     * @param options.username - The username of the user to invite. e.g. 'spez'
     * @param options.subredditName - The name of the subreddit to invite the user to moderate. e.g. 'memes'
     * @param options.permissions - The permissions to give the user. (optional) Defaults to 'all'.
     */
    inviteModerator(options) {
        return User.createRelationship({
            type: 'moderator_invite',
            subredditName: options.subredditName,
            username: options.username,
            permissions: options.permissions ?? [],
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Revoke a moderator invite for a user to a subreddit.
     *
     * @param username - The username of the user to revoke the invite for. e.g. 'spez'
     * @param subredditName - The name of the subreddit to revoke the invite for. e.g. 'memes'
     */
    revokeModeratorInvite(username, subredditName) {
        return User.removeRelationship({
            username,
            subredditName,
            type: 'moderator_invite',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Remove a user as a moderator of a subreddit.
     *
     * @param username - The username of the user to remove as a moderator. e.g. 'spez'
     * @param subredditName - The name of the subreddit to remove the user as a moderator from. e.g. 'memes'
     */
    removeModerator(username, subredditName) {
        return User.removeRelationship({
            type: 'moderator',
            subredditName,
            username,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Update the permissions of a moderator of a subreddit.
     *
     * @param username - The username of the user to update the permissions for. e.g. 'spez'
     * @param subredditName - The name of the subreddit. e.g. 'memes'
     * @param permissions - The permissions to give the user. e.g ['posts', 'wiki']
     */
    setModeratorPermissions(username, subredditName, permissions) {
        return User.setModeratorPermissions(username, subredditName, permissions, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of users who are muted in a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get the muted users from. e.g. 'memes'
     * @param options.username - Use this to see if a user is muted in the subreddit.
     * @param options.limit - The maximum number of users to return. e.g. 1000
     * @param options.pageSize - The number of users to return per request. e.g. 100
     * @returns A listing of User objects.
     */
    getMutedUsers(options) {
        return User.getSubredditUsersByType({
            type: 'muted',
            ...options,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Mute a user in a subreddit. Muting a user prevents them from sending modmail.
     *
     * @param options - Options for the request
     * @param options.username - The username of the user to mute. e.g. 'spez'
     * @param options.subredditName - The name of the subreddit to mute the user in. e.g. 'memes'
     * @param options.note - A mod note on why the user was muted. (optional)
     */
    muteUser(options) {
        return User.createRelationship({
            ...options,
            type: 'muted',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Unmute a user in a subreddit. Unmuting a user allows them to send modmail.
     *
     * @param username - The username of the user to unmute. e.g. 'spez'
     * @param subredditName - The name of the subreddit to unmute the user in. e.g. 'memes'
     */
    unmuteUser(username, subredditName) {
        return User.removeRelationship({
            username,
            subredditName,
            type: 'muted',
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a list of mod notes related to a user in a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to get the mod notes from. e.g. 'memes'
     * @param options.username - The username of the user to get the mod notes for. e.g. 'spez'
     * @param options.filter - Filter the mod notes by type. e.g. 'NOTE', 'BAN', 'APPROVAL'
     * @param options.limit - The maximum number of mod notes to return. e.g. 1000
     * @param options.pageSize - The number of mod notes to return per request. e.g. 100
     * @returns A listing of ModNote objects.
     */
    getModNotes(options) {
        return ModNote.get(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Delete a mod note.
     *
     * @param options - Options for the request
     * @param options.subreddit - The name of the subreddit to delete the mod note from. e.g. 'memes'
     * @param options.noteId - The ID of the mod note to delete (should have a ModNote_ prefix).
     * @returns True if it was deleted successfully; false otherwise.
     */
    deleteModNote(options) {
        return ModNote.delete(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Add a mod note.
     *
     * @param options - Options for the request
     * @param options.subreddit - The name of the subreddit to add the mod note to. e.g. 'memes'
     * @param options.user - The username of the user to add the mod note to. e.g. 'spez'
     * @param options.redditId - (optional) The ID of the comment or post to add the mod note to. e.g. 't3_1234'
     * @param options.label - (optional) The label of the mod note. e.g. 'SPAM_WARNING'
     * @param options.note - The text of the mod note.
     * @returns A Promise that resolves if the mod note was successfully added.
     */
    addModNote(options) {
        const req = {
            ...options,
            redditId: options.redditId ? asTID(options.redditId) : undefined,
        };
        return ModNote.add(req, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Add a mod note for why a post or comment was removed
     *
     * @param options.itemIds list of thing ids
     * @param options.reasonId id of a Removal Reason - you can leave this as an empty string if you don't have one
     * @param options.modNote the reason for removal (maximum 100 characters) (optional)
     */
    addRemovalNote(options) {
        return ModNote.addRemovalNote(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Sends a private message to a user.
     *
     * @param options - The options for sending the message.
     * @returns A Promise that resolves if the private message was successfully sent.
     */
    async sendPrivateMessage(options) {
        return PrivateMessage.send(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Sends a private message to a user on behalf of a subreddit.
     *
     * @param options - The options for sending the message as a subreddit.
     * @returns A Promise that resolves if the private message was successfully sent.
     */
    async sendPrivateMessageAsSubreddit(options) {
        return PrivateMessage.sendAsSubreddit(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Approve a post or comment.
     *
     * @param id - The id of the post (t3_) or comment (t1_) to approve.
     * @example
     * ```ts
     * await reddit.approve('t3_123456');
     * await reddit.approve('t1_123456');
     * ```
     */
    async approve(id) {
        if (isT1ID(id)) {
            return Comment.approve(id, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
        }
        else if (isT3ID(id)) {
            return Post.approve(id, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
        }
        throw new Error('id must start with either t1_ or t3_');
    }
    /**
     * Remove a post or comment.
     *
     * @param id - The id of the post (t3_) or comment (t1_) to remove.
     * @param isSpam - Is the post or comment being removed because it's spam?
     * @example
     * ```ts
     * await reddit.remove('t3_123456', false);
     * await reddit.remove('t1_123456', true);
     * ```
     */
    async remove(id, isSpam) {
        if (isT1ID(id)) {
            return Comment.remove(id, isSpam, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
        }
        else if (isT3ID(id)) {
            return Post.remove(id, isSpam, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
        }
        throw new Error('id must start with either t1_ or t3_');
    }
    /**
     * Get the list of post flair templates for a subreddit.
     *
     * @param subredditName - The name of the subreddit to get the post flair templates for.
     * @returns A Promise that resolves with an array of FlairTemplate objects.
     */
    async getPostFlairTemplates(subredditName) {
        return FlairTemplate.getPostFlairTemplates(subredditName, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the list of user flair templates for a subreddit.
     *
     * @param subredditName - The name of the subreddit to get the user flair templates for.
     * @returns A Promise that resolves with an array of FlairTemplate objects.
     */
    async getUserFlairTemplates(subredditName) {
        return FlairTemplate.getUserFlairTemplates(subredditName, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Create a post flair template for a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to create the flair template for.
     * @param options.allowableContent - The content that is allowed to be used with this flair template. e.g. 'all' or 'text' or 'emoji'
     * @param options.backgroundColor - The background color of the flair template. e.g. '#ff0000' or 'transparent'
     * @param options.maxEmojis - The maximum number of emojis that can be used with this flair template.
     * @param options.modOnly - Whether or not this flair template is only available to mods.
     * @param options.text - The text of the flair template.
     * @param options.textColor - The text color of the flair template. Either 'dark' or 'light'.
     * @param options.allowUserEdits - Whether or not users can edit the flair template when selecting a flair.
     * @returns The created FlairTemplate object.
     */
    async createPostFlairTemplate(options) {
        return FlairTemplate.createPostFlairTemplate(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Create a user flair template for a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to create the flair template for.
     * @param options.allowableContent - The content that is allowed to be used with this flair template. e.g. 'all' or 'text' or 'emoji'
     * @param options.backgroundColor - The background color of the flair template. e.g. '#ff0000' or 'transparent'
     * @param options.maxEmojis - The maximum number of emojis that can be used with this flair template.
     * @param options.modOnly - Whether or not this flair template is only available to mods.
     * @param options.text - The text of the flair template.
     * @param options.textColor - The text color of the flair template. Either 'dark' or 'light'.
     * @param options.allowUserEdits - Whether or not users can edit the flair template when selecting a flair.
     * @returns The created FlairTemplate object.
     */
    async createUserFlairTemplate(options) {
        return FlairTemplate.createUserFlairTemplate(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Edit a flair template for a subreddit. This can be either a post or user flair template.
     * Note: If you leave any of the options fields as undefined, they will reset to their default values.
     *
     * @param options - Options for the request
     * @param options.id - The ID of the flair template to edit.
     * @param options.subredditName - The name of the subreddit to create the flair template for.
     * @param options.allowableContent - The content that is allowed to be used with this flair template. e.g. 'all' or 'text' or 'emoji'
     * @param options.backgroundColor - The background color of the flair template. e.g. '#ff0000' or 'transparent'
     * @param options.maxEmojis - The maximum number of emojis that can be used with this flair template.
     * @param options.modOnly - Is this flair template only available to mods?
     * @param options.text - The text of the flair template.
     * @param options.textColor - The text color of the flair template. Either 'dark' or 'light'.
     * @param options.allowUserEdits - Can users can edit the flair template when selecting a flair?
     * @returns The edited FlairTemplate object.
     */
    async editFlairTemplate(options) {
        return FlairTemplate.editFlairTemplate(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Delete a flair template from a subreddit.
     *
     * @param subredditName - The name of the subreddit to delete the flair template from.
     * @param flairTemplateId - The ID of the flair template to delete.
     */
    async deleteFlairTemplate(subredditName, flairTemplateId) {
        return FlairTemplate.deleteFlairTemplate(subredditName, flairTemplateId, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Set the flair for a user in a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to set the flair for.
     * @param options.username - The username of the user to set the flair for.
     * @param options.flairTemplateId - The ID of the flair template to use.
     * @param options.text - The text of the flair.
     * @param options.cssClass - The CSS class of the flair.
     * @param options.backgroundColor - The background color of the flair.
     * @param options.textColor - The text color of the flair.
     */
    async setUserFlair(options) {
        return Flair.setUserFlair(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Remove the flair for a user in a subreddit.
     *
     * @param subredditName - The name of the subreddit to remove the flair from.
     * @param username - The username of the user to remove the flair from.
     */
    async removeUserFlair(subredditName, username) {
        return Flair.removeUserFlair(subredditName, username, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Set the flair for a post in a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit to set the flair for.
     * @param options.postId - The ID of the post to set the flair for.
     * @param options.flairTemplateId - The ID of the flair template to use.
     * @param options.text - The text of the flair.
     * @param options.cssClass - The CSS class of the flair.
     * @param options.backgroundColor - The background color of the flair.
     * @param options.textColor - The text color of the flair.
     */
    async setPostFlair(options) {
        return Flair.setPostFlair(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Remove the flair for a post in a subreddit.
     *
     * @param subredditName - The name of the subreddit to remove the flair from.
     * @param postId - The ID of the post to remove the flair from.
     */
    async removePostFlair(subredditName, postId) {
        return Flair.removePostFlair(subredditName, asT3ID(postId), __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the widgets for a subreddit.
     *
     * @param subredditName - The name of the subreddit to get the widgets for.
     * @returns - An array of Widget objects.
     */
    async getWidgets(subredditName) {
        return Widget.getWidgets(subredditName, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Delete a widget from a subreddit.
     *
     * @param subredditName - The name of the subreddit to delete the widget from.
     * @param widgetId - The ID of the widget to delete.
     */
    async deleteWidget(subredditName, widgetId) {
        return Widget.delete(subredditName, widgetId, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Add a widget to a subreddit.
     *
     * @param widgetData - The data for the widget to add.
     * @returns - The added Widget object.
     */
    async addWidget(widgetData) {
        return Widget.add(widgetData, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Reorder the widgets for a subreddit.
     *
     * @param subredditName - The name of the subreddit to reorder the widgets for.
     * @param orderByIds - An array of widget IDs in the order that they should be displayed.
     */
    async reorderWidgets(subredditName, orderByIds) {
        return Widget.reorder(subredditName, orderByIds, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get a wiki page from a subreddit.
     *
     * @param subredditName - The name of the subreddit to get the wiki page from.
     * @param page - The name of the wiki page to get.
     * @returns The requested WikiPage object.
     */
    async getWikiPage(subredditName, page) {
        return WikiPage.getPage(subredditName, page, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the wiki pages for a subreddit.
     *
     * @param subredditName - The name of the subreddit to get the wiki pages from.
     * @returns A list of the wiki page names for the subreddit.
     */
    async getWikiPages(subredditName) {
        return WikiPage.getPages(subredditName, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Create a new wiki page for a subreddit.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit the wiki is in.
     * @param options.page - The name of the wiki page to create.
     * @param options.content - The Markdown content of the wiki page.
     * @param options.reason - The reason for creating the wiki page.
     * @returns - The created WikiPage object.
     */
    async createWikiPage(options) {
        return WikiPage.createPage(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Update a wiki page.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit the wiki is in.
     * @param options.page - The name of the wiki page to update.
     * @param options.content - The Markdown content of the wiki page.
     * @param options.reason - The reason for updating the wiki page.
     * @returns The updated WikiPage object.
     */
    async updateWikiPage(options) {
        return WikiPage.updatePage(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the revisions for a wiki page.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit the wiki is in.
     * @param options.page - The name of the wiki page to get the revisions for.
     * @param options.limit - The maximum number of revisions to return.
     * @param options.after - The ID of the revision to start after.
     * @returns A Listing of WikiPageRevision objects.
     */
    getWikiPageRevisions(options) {
        return WikiPage.getPageRevisions(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Revert a wiki page to a previous revision.
     *
     * @param subredditName - The name of the subreddit the wiki is in.
     * @param page - The name of the wiki page to revert.
     * @param revisionId - The ID of the revision to revert to.
     */
    async revertWikiPage(subredditName, page, revisionId) {
        return WikiPage.revertPage(subredditName, page, revisionId, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get the settings for a wiki page.
     *
     * @param subredditName - The name of the subreddit the wiki is in.
     * @param page - The name of the wiki page to get the settings for.
     * @returns A WikiPageSettings object.
     */
    async getWikiPageSettings(subredditName, page) {
        return WikiPage.getPageSettings(subredditName, page, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Update the settings for a wiki page.
     *
     * @param options - Options for the request
     * @param options.subredditName - The name of the subreddit the wiki is in.
     * @param options.page - The name of the wiki page to update the settings for.
     * @param options.listed - Whether the wiki page should be listed in the wiki index.
     * @param options.permLevel - The permission level required to edit the wiki page.
     * @returns A WikiPageSettings object.
     */
    async updateWikiPageSettings(options) {
        return WikiPage.updatePageSettings(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Add an editor to a wiki page.
     *
     * @param subredditName - The name of the subreddit the wiki is in.
     * @param page - The name of the wiki page to add the editor to.
     * @param username - The username of the user to add as an editor.
     */
    async addEditorToWikiPage(subredditName, page, username) {
        return WikiPage.addEditor(subredditName, page, username, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Remove an editor from a wiki page.
     *
     * @param subredditName - The name of the subreddit the wiki is in.
     * @param page - The name of the wiki page to remove the editor from.
     * @param username - The username of the user to remove as an editor.
     */
    async removeEditorFromWikiPage(subredditName, page, username) {
        return WikiPage.removeEditor(subredditName, page, username, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Get private messages sent to the currently authenticated user.
     *
     * @param options - Options for the request
     * @param options.type - The type of messages to get.
     */
    getMessages(options) {
        return PrivateMessage.getMessages(options, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Mark all private messages as read.
     */
    markAllMessagesAsRead() {
        return PrivateMessage.markAllAsRead(__classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Report a Post or Comment
     *
     * The report is sent to the moderators of the subreddit for review.
     *
     * @param thing Post or Comment
     * @param options Options
     * @param options.reason Why the thing is reported
     *
     * @example
     * ```ts
     * await reddit.report(post, {
     *  reason: 'This is spam!',
     * })
     * ```
     */
    report(thing, options) {
        const client = Devvit.redditAPIPlugins.LinksAndComments;
        return client.Report({
            reason: options.reason,
            thingId: thing.id,
            srName: thing.subredditName,
            usernames: thing.authorName,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    getModQueue(options) {
        return Subreddit.aboutLocation({
            ...options,
            location: AboutLocations.Modqueue,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    getReports(options) {
        return Subreddit.aboutLocation({
            ...options,
            location: AboutLocations.Reports,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    getSpam(options) {
        return Subreddit.aboutLocation({
            ...options,
            location: AboutLocations.Spam,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    getUnmoderated(options) {
        return Subreddit.aboutLocation({
            ...options,
            location: AboutLocations.Unmoderated,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    getEdited(options) {
        return Subreddit.aboutLocation({
            ...options,
            location: AboutLocations.Edited,
        }, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Gets a {@link Vault} for the specified address.
     *
     * @param {string} address - The address (starting with 0x) of the Vault.
     * @example
     * ```ts
     * const vault = await reddit.getVaultByAddress('0x205ee28744456bDBf180A0Fa7De51e0F116d54Ed');
     * ```
     */
    getVaultByAddress(address) {
        return getVaultByAddress(address, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Gets a {@link Vault} for the specified user.
     *
     * @param {string} userId - The ID (starting with t2_) of the Vault owner.
     * @example
     * ```ts
     * const vault = await reddit.getVaultByUserId('t2_1w72');
     * ```
     */
    getVaultByUserId(userId) {
        return getVaultByUserId(asTID(userId), __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Returns a leaderboard for a given subreddit ID.
     *
     * @param subredditId ID of the subreddit for which the leaderboard is being queried.
     *
     * @returns {SubredditLeaderboard} Leaderboard for the given subreddit.
     */
    getSubredditLeaderboard(subredditId) {
        return getSubredditLeaderboard(subredditId, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
    /**
     * Returns the styles for a given subreddit ID.
     *
     * @param subredditId ID of the subreddit from which to retrieve the styles.
     *
     * @returns {SubredditStyles} Styles for the given subreddit.
     */
    getSubredditStyles(subredditId) {
        return getSubredditStyles(subredditId, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
    }
}
_RedditAPIClient_metadata = new WeakMap(), _RedditAPIClient_modMailService = new WeakMap();
