/** * #post_message.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ import type { CanRunAsUserEffect } from "../../../effect_types/v1alpha/app_permission.js"; import type { CreateOrderEffect } from "../../../effect_types/v1alpha/create_order.js"; import type { NavigateToUrlEffect } from "../../../effect_types/v1alpha/navigate_to_url.js"; import type { RealtimeSubscriptionsEffect } from "../../../effect_types/v1alpha/realtime_subscription.js"; import type { ShowFormEffect } from "../../../effect_types/v1alpha/show_form.js"; import type { ShowToastEffect } from "../../../effect_types/v1alpha/show_toast.js"; import type { UpdateRequestContextEffect } from "../../../effect_types/v1alpha/update_request_context.js"; import type { WebViewImmersiveModeEffect } from "./immersive_mode.js"; import type { WebViewLoginPromptEffect } from "./login.js"; import type { WebViewScreenshotResponseEffect } from "./screenshot.js"; import type { WebViewShareEffect } from "./share.js"; import type { WebViewTelemetryEffect } from "./telemetry.js"; /** * Blocks only. * * @deprecated */ export declare enum WebViewInternalMessageScope { /** CLIENT - Message is intended for the client only */ CLIENT = 0, UNRECOGNIZED = -1 } /** * `devvit-internal` message from web view to client via postMessage(). Used * often for sending effects from the iframe. */ export type WebViewInternalMessage = { /** type: devvit-internal */ type: string; /** * Scope of the message, used to determine where the message should be sent. * Blocks only. * * @deprecated */ scope: WebViewInternalMessageScope; /** * WebViewTelemetryClickEffect or WebViewTelemetryLoadedEffect. Use * `telemetry` instead. * * @deprecated */ analytics?: { [key: string]: any; } | undefined; /** * Blocks only. * @deprecated Use effect_type instead * * @deprecated */ effect?: { [key: string]: any; } | undefined; /** * Blocks only. * @deprecated Use effect_type instead * * @deprecated */ realtimeEffect?: RealtimeSubscriptionsEffect | undefined; immersiveMode?: WebViewImmersiveModeEffect | undefined; share?: WebViewShareEffect | undefined; showToast?: ShowToastEffect | undefined; navigateToUrl?: NavigateToUrlEffect | undefined; showForm?: ShowFormEffect | undefined; createOrder?: CreateOrderEffect | undefined; realtime?: RealtimeSubscriptionsEffect | undefined; canRunAsUser?: CanRunAsUserEffect | undefined; telemetry?: WebViewTelemetryEffect | undefined; updateRequestContext?: UpdateRequestContextEffect | undefined; screenshot?: WebViewScreenshotResponseEffect | undefined; loginPrompt?: WebViewLoginPromptEffect | undefined; /** Identifier for correlating effect responses to effect requests. */ id?: string | undefined; }; /** * Generic structure of messages sent via postMessage from web view block. * Blocks only. * * @deprecated */ export type WebViewPostMessage = { /** See comments for each message */ type: string; /** One of the following messages converted to a Struct */ data?: { [key: string]: any; } | undefined; }; /** * Arbitrary `devvit-message` message, sent by block app to a web view block. * Blocks only. * * @deprecated */ export type WebViewAppMessage = { /** * Any serializable value given to postMessage in a WebView * Blocks only. * @deprecated Use json_string instead * * @deprecated */ message?: any | undefined; /** JSON string payload */ jsonString?: string | undefined; }; /** * `devvit-state` message. Used to pass stateful data into a web view. Blocks * only. * * @deprecated */ export type WebViewStateMessage = { state?: { [key: string]: any; } | undefined; }; /** * Message wrapper for messages sent by block app to a web view block. Composed * by `WebViewEffect`. Blocks only. * * @deprecated */ export type WebViewPostMessageEffect = { /** ID of the WebView block */ webViewId: string; app?: WebViewAppMessage | undefined; /** * WebViewUIEventMessage event = 4; * WebViewUIEnvironmentMessage environment = 5; */ state?: WebViewStateMessage | undefined; }; //# sourceMappingURL=post_message.d.ts.map