/** * #wiki_msg.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ import type { WrappedUserObject } from "../common/common_msg.js"; export type GetWikiPagesRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; }; export type GetWikiPagesResponse = { /** String value: "wikipagelisting" */ kind: string; /** A list of wiki page names. */ data: string[]; }; export type GetWikiPageRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** The name of the wiki page. */ page: string; /** * The revision ID (UUID) of the wiki page to retrieve. Setting this value will return the wiki page * version at that revision, and leaving it empty will return the latest version. */ revisionId?: string | undefined; }; export type WikiPage = { /** The markdown content of the wiki page. */ contentMd: string; /** The HTML content of the wiki page. */ contentHtml: string; /** The revision ID of the wiki page. */ revisionId: string; /** The date of the wiki page's last revision. */ revisionDate: number; /** Whether the wiki page can be revised. */ mayRevise: boolean; /** The reason for the wiki page's last revision. */ reason?: string | undefined; /** The user who last edited the wiki page. */ revisionBy?: WrappedUserObject | undefined; }; export type GetWikiPageResponse = { /** String value: "wikipage" */ kind: string; /** The data of the wiki page. */ data?: WikiPage | undefined; }; export type EditWikiPageRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** The name of the wiki page. */ page: string; /** The new content of the wiki page. */ content: string; /** The reason for the edit. */ reason: string; }; export type HideWikiPageRevisionRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** The name of the wiki page. */ page: string; /** The revision ID to hide. */ revision: string; }; export type HideWikiPageRevisionResponse = { /** Whether the revision was hidden. */ status: boolean; }; export type GetWikiPageRevisionsRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** The name of the wiki page. */ page: string; /** * Revision ID * Return Revisions in the listing up to this Revision (non-inclusive) * Note: Do not use `before` and `after` in the same request */ after?: string | undefined; /** * Revision ID * Return Revisions in the listing starting after this Revision (non-inclusive) * Note: Do not use `before` and `after` in the same request */ before?: string | undefined; /** The maximum number of revisions to return. */ limit?: number | undefined; /** * The number of items seen so far. * Use when fetching subsequent pages with `before` or `after`. */ count?: number | undefined; /** (optional) Show all results regardless of user preferences */ show?: boolean | undefined; /** (optional) expand subreddits */ srDetail?: boolean | undefined; }; export type WikiPageRevision = { /** ID of the revision. */ id: string; /** The name of the wiki page. */ page: string; /** The date of the revision. */ timestamp: number; /** The reason for the revision. */ reason: string; /** Whether the revision is hidden. */ revisionHidden: boolean; /** The user who made the revision. */ author?: WrappedUserObject | undefined; }; export type WikiPageRevisionListing = { /** String value: "Listing" */ kind: string; /** The data of the wiki page revision listing. */ data?: WikiPageRevisionListing_Data | undefined; }; export type WikiPageRevisionListing_Data = { /** * If present, use this as the `after` parameter when calling the same * API again to fetch the next page */ after?: string | undefined; /** * If present, use this as the `before` parameter when calling the same * API again to fetch the previous page */ before?: string | undefined; /** Contents of the current page of the listing */ children: WikiPageRevision[]; /** * Number of objects in `children` * Note: Only counts immediate entries in `children` and does not count * nested objects such as comment trees */ dist?: number | undefined; }; export type GetWikiRevisionsRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** * Revision ID * Return Revisions in the listing up to this Revision (non-inclusive) * Note: Do not use `before` and `after` in the same request */ after?: string | undefined; /** * Revision ID * Return Revisions in the listing starting after this Revision (non-inclusive) * Note: Do not use `before` and `after` in the same request */ before?: string | undefined; /** The maximum number of revisions to return. */ limit?: number | undefined; /** * The number of items seen so far. * Use when fetching subsequent pages with `before` or `after`. */ count?: number | undefined; /** (optional) Show all results regardless of user preferences */ show?: boolean | undefined; /** (optional) expand subreddits */ srDetail?: boolean | undefined; }; export type RevertWikiPageRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** The name of the wiki page. */ page: string; /** The revision ID to revert to. */ revision: string; }; export type GetWikiPageSettingsRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** The name of the wiki page. */ page: string; }; export type WikiPageSettings = { /** String value: "wikipagesettings" */ kind: string; /** The data of the wiki page settings. */ data?: WikiPageSettings_Data | undefined; }; export type WikiPageSettings_Data = { /** The permission level required to edit the wiki page. */ permLevel: number; /** The users who can edit the wiki page. */ editors: WrappedUserObject[]; /** Whether the wiki page is listed. */ listed: boolean; }; export type UpdateWikiPageSettingsRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** The name of the wiki page. */ page: string; /** * The permission level required to edit the wiki page. * 0: Use subreddit wiki permissions * 1: Only approved wiki contributors for this page may edit * 2: Only mods may edit and view */ permlevel: number; /** Whether the wiki page is listed. "on" to list, empty string to hide. */ listed: string; }; export type AllowEditorRequest = { /** The subreddit omitting the r/ prefix. */ subreddit: string; /** The name of the wiki page. */ page: string; /** Either "add" or "del". */ act: string; /** The username of the user to allow or deny. */ username: string; }; //# sourceMappingURL=wiki_msg.d.ts.map