import type { JsRequestBuilder, Response, Runtime } from '@devvit/multiplatform/ui-shared-shared.js'; import type { Metadata } from '@devvit/protos/lib/Types.js'; import type { LinkedBundle } from '@devvit/protos/types/devvit/runtime/bundle.js'; import type { Block } from '@devvit/protos/types/devvit/ui/block_kit/v1beta/block.js'; import type { UIEnvironment, UIResponse } from '@devvit/protos/types/devvit/ui/block_kit/v1beta/ui.js'; import type { Effect } from '@devvit/protos/types/devvit/ui/effects/v1alpha/effect.js'; import type { UIEvent } from '@devvit/protos/types/devvit/ui/events/v1alpha/event.js'; import type { LiteLoadResponse } from '@devvit/runtime-lite/client/ClientShared.js'; import type { PluginCallback } from '@devvit/runtime-lite/runtime/RuntimeLite.js'; import { type UIProps, type UIState, type WrappedEvent, WrappedRequest, WrappedResponse } from './mappers.js'; import type { UIApp } from './remote-app.js'; export declare const RenderPostContent = "RenderPostContent"; export declare const supportedMethods: Set<"RenderPostContent">; export type SupportedMethod = Parameters<(typeof supportedMethods)['has']>[0]; export declare class UIRequestBuilder implements JsRequestBuilder { #private; constructor(env: UIEnvironment); set env(env: UIEnvironment); set props(props: UIProps); build(state: UIState, events: WrappedEvent[]): WrappedRequest; } export declare class ReplayUIResponse implements UIResponse, Response { blocks?: Block | undefined; effects: Effect[]; state?: UIState; events: UIEvent[]; constructor(rsp: UIResponse); get replay(): UIEvent[]; } export declare class LocalRuntime implements Runtime { #private; metadata: Readonly | undefined; onPluginCall?: PluginCallback | undefined; isReady(): boolean; set runtimeDebugLogging(on: boolean); /** Set the runtime source code. */ setLocalSrc(src: string | Blob | undefined, name: string, onInitError?: (error: unknown) => void): void; unload(): void; /** * Load an app bundle into the local runtime, if available. The bundle is * assumed to implement a UIApp. */ load(app: Readonly): Promise; handle(method: string, req: WrappedRequest, cb: (rsp: WrappedResponse) => void, err: (err: Error) => void): void; /** * No-ops for web, but used on native! */ pause(): void; reset(): void; resume(): void; snapshot(): unknown; } export declare class RemoteRuntime implements Runtime { metadata: Readonly | undefined; /** A client to the remote runtime. */ remote?: UIApp | undefined; isReady(): boolean; load(remote: UIApp | undefined): void; handle(method: string, req: WrappedRequest, cb: (p0: WrappedResponse) => void, err: (p0: Error) => void): void; /** * No-ops for web, but used on native! */ pause(): void; reset(): void; resume(): void; snapshot(): unknown; } //# sourceMappingURL=runtimes.d.ts.map