/** * Zod schemas that validate the host event detail contract. * Paired with host-event-contract.ts, which defines the types and lightweight guards. */ import * as z from "zod/mini"; import { type NavigationOutcome } from "./host-event-contract.js"; import { type WidgetFrameAppearance } from "./widget-frame-appearance.js"; export declare const widgetFrameAppearanceSchema: z.ZodMiniPipe, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"none">; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"page">; border: z.ZodMiniString; borderRadius: z.ZodMiniString; boxShadow: z.ZodMiniString; resolvedBorder: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; style: z.ZodMiniEnum<{ dashed: "dashed"; dotted: "dotted"; double: "double"; groove: "groove"; hidden: "hidden"; inset: "inset"; none: "none"; outset: "outset"; ridge: "ridge"; solid: "solid"; }>; widthPx: z.ZodMiniNumber; }, z.core.$strict>>; resolvedBorderRadius: z.ZodMiniOptional; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; topRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomLeft: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; }, z.core.$strict>>; resolvedBoxShadow: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; offsetXPx: z.ZodMiniNumber; offsetYPx: z.ZodMiniNumber; blurRadiusPx: z.ZodMiniNumber; spreadRadiusPx: z.ZodMiniNumber; inset: z.ZodMiniBoolean; }, z.core.$strict>>>; }, z.core.$strict>], "kind">>; /** * Canonical shape when a command (open, prerender, prefetch) settles and core * has allocated a flow handle. flowRunId is present for open/prerender, absent for prefetch. */ export declare const flowHandleSettlementResultSchema: z.ZodMiniObject<{ flowHandleId: z.ZodMiniString; flowRunId: z.ZodMiniOptional>; }, z.core.$strict>; export type FlowHandleSettlementResult = z.output; export declare const commandSettledDetailSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ requestId: z.ZodMiniString; instanceId: z.ZodMiniNullable>; kind: z.ZodMiniEnum<{ close: "close"; configure: "configure"; emitHostSignal: "emitHostSignal"; error: "error"; hostContextUpdated: "hostContextUpdated"; hostSignal: "hostSignal"; identify: "identify"; init: "init"; "instanceFeedback.capture": "instanceFeedback.capture"; "instanceFeedback.listMine": "instanceFeedback.listMine"; open: "open"; prefetch: "prefetch"; prerender: "prerender"; reset: "reset"; setContainer: "setContainer"; setDefaultContainerPolicy: "setDefaultContainerPolicy"; setTargetingPlan: "setTargetingPlan"; telemetry: "telemetry"; track: "track"; updateHostContext: "updateHostContext"; }>; ok: z.ZodMiniLiteral; result: z.ZodMiniOptional; }, z.core.$strict>, z.ZodMiniObject<{ requestId: z.ZodMiniString; instanceId: z.ZodMiniNullable>; kind: z.ZodMiniEnum<{ close: "close"; configure: "configure"; emitHostSignal: "emitHostSignal"; error: "error"; hostContextUpdated: "hostContextUpdated"; hostSignal: "hostSignal"; identify: "identify"; init: "init"; "instanceFeedback.capture": "instanceFeedback.capture"; "instanceFeedback.listMine": "instanceFeedback.listMine"; open: "open"; prefetch: "prefetch"; prerender: "prerender"; reset: "reset"; setContainer: "setContainer"; setDefaultContainerPolicy: "setDefaultContainerPolicy"; setTargetingPlan: "setTargetingPlan"; telemetry: "telemetry"; track: "track"; updateHostContext: "updateHostContext"; }>; ok: z.ZodMiniLiteral; error: z.ZodMiniObject<{ message: z.ZodMiniString; code: z.ZodMiniOptional>; }, z.core.$strict>; }, z.core.$strict>], "ok">; export type { CommandSettledDetail } from "./host-event-contract.js"; export declare const widgetLayoutTransitionScheduleSchema: z.ZodMiniObject<{ sequence: z.ZodMiniNumber; transactionId: z.ZodMiniString; startAtEpochMs: z.ZodMiniNumber; }, z.core.$strict>; export declare const flowStateChangedDetailSchema: z.ZodMiniObject<{ isOpen: z.ZodMiniBoolean; isLoading: z.ZodMiniBoolean; width: z.ZodMiniOptional>; height: z.ZodMiniOptional>; transitionPolicy: z.ZodMiniOptional; durationMs: z.ZodMiniLiteral<0>; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"timed">; durationMs: z.ZodMiniNumber; easing: z.ZodMiniTuple, z.ZodMiniNumber, z.ZodMiniNumber, z.ZodMiniNumber], null>; }, z.core.$strict>], "kind">>; instanceId: z.ZodMiniString; flowHandleId: z.ZodMiniString; }, z.core.$strict>; export type { FlowStateChangedDetail } from "./host-event-contract.js"; export declare const flowLayoutUpdatedDetailSchema: z.ZodMiniObject<{ instanceId: z.ZodMiniString; flowHandleId: z.ZodMiniString; width: z.ZodMiniNumber; height: z.ZodMiniNumber; transitionPolicy: z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"timed">; durationMs: z.ZodMiniNumber; easing: z.ZodMiniTuple, z.ZodMiniNumber, z.ZodMiniNumber, z.ZodMiniNumber], null>; }, z.core.$strict>; }, z.core.$strict>; export type { FlowLayoutUpdatedDetail } from "./host-event-contract.js"; export declare const instanceFlowStateChangedDetailSchema: z.ZodMiniObject<{ isOpen: z.ZodMiniBoolean; isLoading: z.ZodMiniBoolean; width: z.ZodMiniOptional>; height: z.ZodMiniOptional>; transitionPolicy: z.ZodMiniOptional; durationMs: z.ZodMiniLiteral<0>; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"timed">; durationMs: z.ZodMiniNumber; easing: z.ZodMiniTuple, z.ZodMiniNumber, z.ZodMiniNumber, z.ZodMiniNumber], null>; }, z.core.$strict>], "kind">>; instanceId: z.ZodMiniString; shouldRender: z.ZodMiniOptional>; flowHandleId: z.ZodMiniOptional>; }, z.core.$strict>; export type { InstanceFlowStateChangedDetail } from "./host-event-contract.js"; export declare const viewHostSnapshotSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ isOpen: z.ZodMiniBoolean; isLoading: z.ZodMiniBoolean; width: z.ZodMiniOptional>; height: z.ZodMiniOptional>; transitionPolicy: z.ZodMiniOptional; durationMs: z.ZodMiniLiteral<0>; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"timed">; durationMs: z.ZodMiniNumber; easing: z.ZodMiniTuple, z.ZodMiniNumber, z.ZodMiniNumber, z.ZodMiniNumber], null>; }, z.core.$strict>], "kind">>; frameAppearance: z.ZodMiniOptional, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"none">; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"page">; border: z.ZodMiniString; borderRadius: z.ZodMiniString; boxShadow: z.ZodMiniString; resolvedBorder: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; style: z.ZodMiniEnum<{ dashed: "dashed"; dotted: "dotted"; double: "double"; groove: "groove"; hidden: "hidden"; inset: "inset"; none: "none"; outset: "outset"; ridge: "ridge"; solid: "solid"; }>; widthPx: z.ZodMiniNumber; }, z.core.$strict>>; resolvedBorderRadius: z.ZodMiniOptional; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; topRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomLeft: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; }, z.core.$strict>>; resolvedBoxShadow: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; offsetXPx: z.ZodMiniNumber; offsetYPx: z.ZodMiniNumber; blurRadiusPx: z.ZodMiniNumber; spreadRadiusPx: z.ZodMiniNumber; inset: z.ZodMiniBoolean; }, z.core.$strict>>>; }, z.core.$strict>], "kind">>>; transitionSchedule: z.ZodMiniOptional; transactionId: z.ZodMiniString; startAtEpochMs: z.ZodMiniNumber; }, z.core.$strict>>; kind: z.ZodMiniLiteral<"flowRun">; flowRunId: z.ZodMiniString; flowHandleId: z.ZodMiniOptional>; }, z.core.$strict>, z.ZodMiniObject<{ isOpen: z.ZodMiniBoolean; isLoading: z.ZodMiniBoolean; width: z.ZodMiniOptional>; height: z.ZodMiniOptional>; transitionPolicy: z.ZodMiniOptional; durationMs: z.ZodMiniLiteral<0>; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"timed">; durationMs: z.ZodMiniNumber; easing: z.ZodMiniTuple, z.ZodMiniNumber, z.ZodMiniNumber, z.ZodMiniNumber], null>; }, z.core.$strict>], "kind">>; frameAppearance: z.ZodMiniOptional, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"none">; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"page">; border: z.ZodMiniString; borderRadius: z.ZodMiniString; boxShadow: z.ZodMiniString; resolvedBorder: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; style: z.ZodMiniEnum<{ dashed: "dashed"; dotted: "dotted"; double: "double"; groove: "groove"; hidden: "hidden"; inset: "inset"; none: "none"; outset: "outset"; ridge: "ridge"; solid: "solid"; }>; widthPx: z.ZodMiniNumber; }, z.core.$strict>>; resolvedBorderRadius: z.ZodMiniOptional; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; topRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomLeft: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; }, z.core.$strict>>; resolvedBoxShadow: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; offsetXPx: z.ZodMiniNumber; offsetYPx: z.ZodMiniNumber; blurRadiusPx: z.ZodMiniNumber; spreadRadiusPx: z.ZodMiniNumber; inset: z.ZodMiniBoolean; }, z.core.$strict>>>; }, z.core.$strict>], "kind">>>; transitionSchedule: z.ZodMiniOptional; transactionId: z.ZodMiniString; startAtEpochMs: z.ZodMiniNumber; }, z.core.$strict>>; kind: z.ZodMiniLiteral<"pendingFlowHandle">; flowHandleId: z.ZodMiniString; }, z.core.$strict>], "kind">; export declare const instanceViewHostSnapshotsChangedDetailSchema: z.ZodMiniObject<{ instanceId: z.ZodMiniString; snapshots: z.ZodMiniArray; isLoading: z.ZodMiniBoolean; width: z.ZodMiniOptional>; height: z.ZodMiniOptional>; transitionPolicy: z.ZodMiniOptional; durationMs: z.ZodMiniLiteral<0>; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"timed">; durationMs: z.ZodMiniNumber; easing: z.ZodMiniTuple, z.ZodMiniNumber, z.ZodMiniNumber, z.ZodMiniNumber], null>; }, z.core.$strict>], "kind">>; frameAppearance: z.ZodMiniOptional, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"none">; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"page">; border: z.ZodMiniString; borderRadius: z.ZodMiniString; boxShadow: z.ZodMiniString; resolvedBorder: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; style: z.ZodMiniEnum<{ dashed: "dashed"; dotted: "dotted"; double: "double"; groove: "groove"; hidden: "hidden"; inset: "inset"; none: "none"; outset: "outset"; ridge: "ridge"; solid: "solid"; }>; widthPx: z.ZodMiniNumber; }, z.core.$strict>>; resolvedBorderRadius: z.ZodMiniOptional; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; topRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomLeft: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; }, z.core.$strict>>; resolvedBoxShadow: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; offsetXPx: z.ZodMiniNumber; offsetYPx: z.ZodMiniNumber; blurRadiusPx: z.ZodMiniNumber; spreadRadiusPx: z.ZodMiniNumber; inset: z.ZodMiniBoolean; }, z.core.$strict>>>; }, z.core.$strict>], "kind">>>; transitionSchedule: z.ZodMiniOptional; transactionId: z.ZodMiniString; startAtEpochMs: z.ZodMiniNumber; }, z.core.$strict>>; kind: z.ZodMiniLiteral<"flowRun">; flowRunId: z.ZodMiniString; flowHandleId: z.ZodMiniOptional>; }, z.core.$strict>, z.ZodMiniObject<{ isOpen: z.ZodMiniBoolean; isLoading: z.ZodMiniBoolean; width: z.ZodMiniOptional>; height: z.ZodMiniOptional>; transitionPolicy: z.ZodMiniOptional; durationMs: z.ZodMiniLiteral<0>; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"timed">; durationMs: z.ZodMiniNumber; easing: z.ZodMiniTuple, z.ZodMiniNumber, z.ZodMiniNumber, z.ZodMiniNumber], null>; }, z.core.$strict>], "kind">>; frameAppearance: z.ZodMiniOptional, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"none">; }, z.core.$strict>, z.ZodMiniObject<{ kind: z.ZodMiniLiteral<"page">; border: z.ZodMiniString; borderRadius: z.ZodMiniString; boxShadow: z.ZodMiniString; resolvedBorder: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; style: z.ZodMiniEnum<{ dashed: "dashed"; dotted: "dotted"; double: "double"; groove: "groove"; hidden: "hidden"; inset: "inset"; none: "none"; outset: "outset"; ridge: "ridge"; solid: "solid"; }>; widthPx: z.ZodMiniNumber; }, z.core.$strict>>; resolvedBorderRadius: z.ZodMiniOptional; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; topRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomRight: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; bottomLeft: z.ZodMiniObject<{ horizontalPx: z.ZodMiniNumber; verticalPx: z.ZodMiniNumber; }, z.core.$strict>; }, z.core.$strict>>; resolvedBoxShadow: z.ZodMiniOptional; red: z.ZodMiniNumber; green: z.ZodMiniNumber; blue: z.ZodMiniNumber; alpha: z.ZodMiniNumber; }, z.core.$strict>; offsetXPx: z.ZodMiniNumber; offsetYPx: z.ZodMiniNumber; blurRadiusPx: z.ZodMiniNumber; spreadRadiusPx: z.ZodMiniNumber; inset: z.ZodMiniBoolean; }, z.core.$strict>>>; }, z.core.$strict>], "kind">>>; transitionSchedule: z.ZodMiniOptional; transactionId: z.ZodMiniString; startAtEpochMs: z.ZodMiniNumber; }, z.core.$strict>>; kind: z.ZodMiniLiteral<"pendingFlowHandle">; flowHandleId: z.ZodMiniString; }, z.core.$strict>], "kind">>; }, z.core.$strict>; export type { InstanceViewHostSnapshotsChangedDetail, ViewHostSnapshot, } from "./host-event-contract.js"; export declare const openRequestedDetailSchema: z.ZodMiniObject<{ instanceId: z.ZodMiniString; source: z.ZodMiniEnum<{ command: "command"; targeting: "targeting"; }>; flowId: z.ZodMiniString; flowHandleId: z.ZodMiniOptional>; hideCloseButton: z.ZodMiniOptional>; }, z.core.$strict>; export type { OpenRequestedDetail } from "./host-event-contract.js"; export declare const navigationRequestedDetailSchema: z.ZodMiniObject<{ instanceId: z.ZodMiniString; url: z.ZodMiniString; target: z.ZodMiniOptional>; version: z.ZodMiniNumber; settle: z.ZodMiniOptional void, (outcome: NavigationOutcome) => void>>; }, z.core.$strict>; export type { NavigationRequestedDetail } from "./host-event-contract.js"; export declare const handleInvalidatedDetailSchema: z.ZodMiniObject<{ instanceId: z.ZodMiniString; handleKind: z.ZodMiniString; handleId: z.ZodMiniString; reasonCode: z.ZodMiniEnum<{ CLOSED: "CLOSED"; INTERNAL: "INTERNAL"; OWNERSHIP_CONFLICT: "OWNERSHIP_CONFLICT"; OWNER_DISPOSED: "OWNER_DISPOSED"; RESET: "RESET"; STALE_HANDLE: "STALE_HANDLE"; UPSTREAM_INVALIDATED: "UPSTREAM_INVALIDATED"; }>; reasonMessage: z.ZodMiniOptional>; relatedRequestId: z.ZodMiniOptional>; source: z.ZodMiniEnum<{ core: "core"; loader: "loader"; }>; at: z.ZodMiniNumber; }, z.core.$strict>; export type { HandleInvalidatedDetail } from "./host-event-contract.js"; /** * Parse unknown result into FlowHandleSettlementResult. Returns null if invalid. */ export declare function parseFlowHandleSettlementResult(result: unknown): FlowHandleSettlementResult | null; /** * Extract flow handle from a successful command settlement when the command * is one that can return a handle (open, prerender, prefetch). Returns null * if detail is not ok, kind is not one of those, or result does not match * flowHandleSettlementResultSchema. */ export declare function getFlowHandleFromSettlementDetail(detail: { ok: boolean; kind: string; result?: unknown; }): FlowHandleSettlementResult | null; export type { FlowHandleAllocationFromSettlement } from "./host-event-contract.js"; export { getFlowHandleAllocationFromSettlement } from "./host-event-contract.js"; //# sourceMappingURL=host-event-schemas.d.ts.map