/** * #custom_post.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ import type { BlockRenderRequest, BlockRenderResponse } from "../../../ui/block_kit/v1beta/rendering.js"; import type { Effect } from "../../../ui/effects/v1alpha/effect.js"; /** * Dimensions describe the layout characteristics of a custom post within Devvit. * They are used to allow Devvitors to create responsive experiences within their post. For * example, they can use this API to conditionally render an element on small viewports only. * * @deprecated Use devvit.ui.events.v1alpha.UIDimensions instead. * * @deprecated */ export type Dimensions = { /** Unitless pixels describing the content box height for the custom post */ height: number; /** Unitless pixels describing the content box width for the custom post */ width: number; /** Describes the device pixel ratio for a device. */ scale: number; /** Web only: describes the font scaling pixel ratio for a browser window. */ fontScale?: number | undefined; }; /** * **DO NOT EDIT** * * This message is deprecated and should be fixed in time to maintain backwards compatability. * * @deprecated */ export type RenderPostRequest = { /** Stateful data received from a previous response */ state?: { [key: string]: any; } | undefined; /** Render the post with Blocks */ blocks?: BlockRenderRequest | undefined; /** Dimensions provides a way for the entry point to provide layout information to the proto. */ dimensions?: Dimensions | undefined; }; /** * **DO NOT EDIT** * * This message is deprecated and should be fixed in time to maintain backwards compatability. * * @deprecated */ export type RenderPostResponse = { /** Stateful data to send back to your app with events */ state?: { [key: string]: any; } | undefined; /** Optional list of Effects to execute on the client */ effects: Effect[]; /** Blocks UI rendering of the post */ blocks?: BlockRenderResponse | undefined; }; //# sourceMappingURL=custom_post.d.ts.map