/**
 * #post.ts
 *
 * Code generated by ts-proto. DO NOT EDIT.
 * @packageDocumentation
 */
import type { RequestContext } from "../../../../devvit/platform/v1/request_context.js";
import type { AppPermission } from "../../app_permission/v1/app_permission.js";
import type { ErrorMessage } from "../../common/v1/error_message.js";
import type { Installation } from "../../common/v1/installation.js";
import type { UserGeneratedContent } from "../../useractions/v1/useractions.js";
/** The height of the Post entrypoint. This is not expected to change often. */
export declare enum EntrypointHeight {
    HEIGHT_UNSPECIFIED = 0,
    REGULAR = 1,
    TALL = 2,
    UNRECOGNIZED = -1
}
/**
 * Matches the values in the MediaService.MimeType enum.
 * See: https://github.snooguts.net/reddit/media-api/blob/master/api/protos/reddit/foundation/media/v1/media.proto
 */
export declare enum ImageDataMimeType {
    GIF = 0,
    JPEG = 1,
    PNG = 2,
    WEBP = 3,
    MP4 = 4,
    QUICKTIME = 5,
    UNRECOGNIZED = -1
}
export type BatchGetDevvitPostRequest = {
    /**
     * List of t3_ post ids to get the DevvitPost for, eg ['t3_1g9qwle', 't3_1fdtrez']
     * Deprecated. Refer to the PostContext.Id field within RequestContext instead.
     *
     * @deprecated
     */
    postIds: string[];
    /** List of request contexts associated with each post. */
    requestContexts: RequestContext[];
};
export type BatchGetDevvitPostResponse = {
    /**
     * List of all DevvitPost responses, returned in the same order as the
     * requested post ids
     */
    posts: DevvitPost[];
};
export type DevvitPost = {
    /** Base64 encoded proto data representing the initial loading state of the post */
    initialRender: string;
    /** The installation corresponding to this Post */
    installation?: Installation | undefined;
    /** The fallback text that is displayed if the Post cannot be rendered */
    richtextFallback: string;
    /** Error message if an error occurred while fetching the DevvitPost */
    error?: ErrorMessage | undefined;
    /** JWT providing authentication for client requests to the Webbit backend */
    webbitToken: string;
    /**
     * URL base for all web view assets to be loaded from, beginning with "https://" and ending with "/".
     * Assets for this post can be found at {web_view_base_url}{asset_path}.
     */
    webViewBaseUrl: string;
    /** The entrypoint URL for the Post's initial webview, formatted like: https://{{slug}}-{{location}}-{{version}}-webview.devvit.net/{{path}}?token={{signed_request_context}} */
    entrypointUrl: string;
    /** JSON blob representing data on the Post, eg: { "devvit": { "splash": { "tagLine": "hello" } }, "riddle": "hello world" } */
    postData?: {
        [key: string]: any;
    } | undefined;
    /** The app permission granted by a user for the Post, if it exists. */
    appPermission?: AppPermission | undefined;
    /**
     * The list of entrypoints as defined in the app's devvit.json
     * Deprecated. Refer to entrypoints on WebViewClientData.AppConfig instead.
     *
     * @deprecated
     */
    entrypoints: Entrypoint[];
    /** JSON blob representing the WebViewClientData for the Post, eg: { "appConfig": { "entrypoints": { "leaderboard": "https://{{slug}}-{{location}}-{{version}}-webview.devvit.net/leaderboard.html" } } } */
    webViewClientData?: {
        [key: string]: any;
    } | undefined;
    /** The signed RequestContext JWT string. This is different from webbit_token and contains different fields. */
    signedRequestContext: string;
    /**
     * The height of the Post entrypoint.
     * Deprecated: Use styles.height instead.
     *
     * @deprecated
     */
    entrypointHeight: EntrypointHeight;
    /** The styles applied to the custom post. */
    styles?: CustomPostStyles | undefined;
};
export type CustomPostStyles = {
    /**
     * The default background color shown before an iframe is loaded. Must be in #RRGGBBAA (red, green, blue, alpha transparency) format with a leading hash.
     * The value is case-insensitive. Defaults to transparent (#00000000).
     */
    backgroundColor: string;
    /**
     * The dark mode background color shown before an iframe is loaded. Must be in #RRGGBBAA (red, green, blue, alpha transparency) format with a leading hash.
     * The value is case-insensitive. Defaults to transparent (#00000000).
     */
    backgroundColorDark: string;
    /**
     * The integer height of the post representing pixels. Defaults to the value of 'tall'.
     * Devvit Gateway handles mapping 'tall' or 'regular' to the pixel height.
     */
    heightPixels: number;
    /**
     * The height of the post. Defaults to 'tall'. This field is used to create or update the Post height.
     * Devvit Gateway maps 'tall' or 'regular' to the pixel height and returns both 'height_pixels' and 'height' to GQL.
     */
    height: EntrypointHeight;
};
/**
 * Deprecated. In AppConfig, entrypoints are now represented as a map of <entryname, entrypointUrl>
 *
 * @deprecated
 */
export type Entrypoint = {
    /** The name of the entrypoint, eg 'leaderboard' */
    name: string;
    /** The URL of the entrypoint. The URL does not include the context parameter and is formatted like: https://{{slug}}-{{location}}-{{version}}-webview.devvit.net/{{path}} */
    url: string;
};
export type CreateDevvitPostRequest = {
    /**
     * The UUID of the app that created the Post.
     * Deprecated, use app_slug instead.
     *
     * @deprecated
     */
    appId: string;
    /** Base64 encoded proto data representing the initial loading state of the Post */
    initialRender: string;
    /** The UUID of the installation corresponding to the app which created the Post */
    installationId: string;
    /** The t5_ subreddit where the Post is displayed */
    location: string;
    /** The fallback text that is displayed if the Post cannot be rendered */
    richtextFallback: string;
    /** The title of the Post */
    title: string;
    /** The dependencies used by the app that created the Post */
    appDependencies: AppDependency[];
    /** The IP address from the client request to create the Post. Required by post-service. */
    ipAddress: string;
    /** The slug of the app that created the Post */
    appSlug: string;
    /**
     * The t2_ author ID of the user to override creating the post as.
     * By default, the author of the post is set from the user ID in the current EdgeContext.
     * If this field is set, the request will only be allowed when invoked by privileged services.
     */
    authorIdOverride: string;
    /** User generated content on the Devvit post */
    userGeneratedContent?: UserGeneratedContent | undefined;
    /** Whether the post is NSFW */
    isNsfw: boolean;
    /** JSON blob representing data set on the Post, eg: { "devvit": { "splash": { "tagLine": "hello" } }, "riddle": "hello world" } */
    postData?: {
        [key: string]: any;
    } | undefined;
    /** The styles applied to the custom post. If not specified, Devvit Gateway will set default values. */
    styles?: CustomPostStyles | undefined;
};
export type AppDependency = {
    /** The name of the package dependency, eg: "@devvit/protos" */
    packageName: string;
    /** The version of the dependency, eg: "0.11.4" */
    version: string;
};
export type CreateDevvitPostResponse = {
    /** The t3_ id of the created Post, eg t3_1qobwz7 */
    id: string;
    /** Error message if an error occurred while creating the DevvitPost */
    error?: ErrorMessage | undefined;
};
export type UpdateDevvitPostRequest = {
    /** The t3_ id of the Post to update, eg t3_1qobwz7 */
    id: string;
    /**
     * The updated richtextFallback value of the Post
     * Deprecated, use text_fallback instead.
     *
     * @deprecated
     */
    richtextFallback: string;
    /** The IP address from the client request to update the Post. Required by post-service. */
    ipAddress: string;
    /** JSON blob representing the updated Post data, eg: { "devvit": { "splash": { "tagLine": "hello" } }, "riddle": "hello world" } */
    postData?: {
        [key: string]: any;
    } | undefined;
    /** The updated textFallback value of the Post */
    textFallback?: string | undefined;
};
export type UpdateDevvitPostResponse = {};
export type UpdateDevvitPostRenderRequest = {
    /** The t3_ id of the Post to update, eg t3_1qobwz7 */
    id: string;
    /**
     * The updated base64 encoded Block proto representing the initial loading state of the post.
     * See devvit.ui.block_kit.v1beta.Block (https://github.snooguts.net/reddit/reddit-devplatform-monorepo/blob/main/packages/protos/schema/devvit/ui/block_kit/v1beta/block.proto)
     */
    initialRender: string;
    /** The IP address from the client request to update the Post. Required by post-service. */
    ipAddress: string;
};
export type UpdateDevvitPostRenderResponse = {};
export type UpdateDevvitPostStylesRequest = {
    /** The t3_ id of the Post to update, eg t3_1qobwz7 */
    id: string;
    /** The updated styles applied to the custom post. */
    styles?: CustomPostStyles | undefined;
};
export type UpdateDevvitPostStylesResponse = {
    /** The t3_ id of the updated Post, eg t3_1qobwz7 */
    id: string;
    /** Error message if an error occurred while updating the DevvitPost styles */
    error?: ErrorMessage | undefined;
};
export type CreateCustomPostSnapshotRequest = {
    /**
     * ID of the snapshot containing the userId who created the snapshot and postId. Example: t2_mn8ek:t3_cj7zt.
     * Deprecated. Pass in user_id and post_id as separate fields instead.
     *
     * @deprecated
     */
    snapshotId: string;
    /** Base64 encoded proto data representing the initial loading state of the post. This is also known as the initial render. */
    renderConfig: string;
    /** Base64 encoded image data of the reported custom post. */
    imageData: string;
    /** t2_ ID of the user who reported the post, eg 't2_mn8ek' */
    userId: string;
    /** t3_ ID of the post being reported, eg 't3_cj7zt' */
    postId: string;
    /** The mime type of the image data. This is used by Devvit Gateway to upload the image data to MediaService. */
    mimeType: ImageDataMimeType;
    /**
     * The IP address from the client request to create the snapshot.
     * For snapshot requests containing image_data, this is required by MediaService to call SubmitMedia.
     */
    ipAddress: string;
};
export type CreateCustomPostSnapshotResponse = {
    /**
     * ID of the snapshot containing the userId who created the snapshot and postId. Example: t2_mn8ek:t3_cj7zt.
     * Deprecated. Use user_id and post_id instead.
     *
     * @deprecated
     */
    snapshotId: string;
    /** Base64 encoded proto data representing the initial loading state of the post. This is also known as the initial render. */
    renderConfig: string;
    /** Media ID of the image data uploaded to MediaService. */
    mediaId: string;
    /** t2_ ID of the user who reported the post, eg 't2_mn8ek' */
    userId: string;
    /** t3_ ID of the post being reported, eg 't3_cj7zt' */
    postId: string;
    /** The CDN URL of the image that was uploaded to MediaService, eg: 'https://i.redd.it/0sv100oqsqhg1.png' */
    mediaUrl: string;
};
export type GetCustomPostSnapshotRequest = {
    /**
     * ID of the snapshot containing the userId who created the snapshot and postId. Example: t2_mn8ek:t3_cj7zt.
     * Deprecated. Pass in user_id and post_id as separate fields instead.
     *
     * @deprecated
     */
    snapshotId: string;
    /** t2_ ID of the user who reported the post, eg 't2_mn8ek' */
    userId: string;
    /** t3_ ID of the post being reported, eg 't3_cj7zt' */
    postId: string;
};
export type GetCustomPostSnapshotResponse = {
    /** Base64 encoded proto data representing the initial loading state of the post. This is also known as the initial render. */
    renderConfig: string;
    /** Media ID of the image data uploaded to MediaService. */
    mediaId: string;
    /** The CDN URL of the image that was uploaded to MediaService, eg: 'https://i.redd.it/0sv100oqsqhg1.png' */
    mediaUrl: string;
};
//# sourceMappingURL=post.d.ts.map