import type { SimulatorCallRecord } from './phoneCalls.js'; /** * Canonical full-device simulator payload (`simulator_json` / `detail.simulator`). * Framework-agnostic; consumed by simulator-react adapters and simulator-device UI. */ import type { SimulatorApp } from './simulatorApp.js'; /** A stable authored record to open on the starting screen. */ export type SimulatorEntryTarget = { kind: 'conversation' | 'email' | 'contact' | 'call' | 'photo' | 'vault-entry'; id: string; } | { kind: 'vault-folder'; folder: string | null; }; /** Where the scenario starts: which app and which screen within it. */ export interface SimulatorEntryPoint { app: SimulatorApp; /** App-specific screen id; for internet see {@link SimulatorInternetScreenId}. */ screen: string; /** Optional record selection; screen-only documents remain supported. */ target?: SimulatorEntryTarget; } /** One item on the device main (bottom) menu. */ export interface SimulatorMainMenuItem { id: string; label: string; app?: SimulatorApp; } /** Device-level config: main menu and secondary (app) defaults. */ export interface SimulatorDevice { main_menu_items?: SimulatorMainMenuItem[]; secondary_defaults?: Partial>; } /** Single contact; shared by phone, messages, etc. */ /** A labeled contact endpoint. Value preserves display text; number is an optional dialable canonical number. */ export interface SimulatorContactValue { label: string; value: string; number?: string; } export interface SimulatorContact { id: string; display_name: string; phone_numbers?: SimulatorContactValue[]; email_addresses?: SimulatorContactValue[]; number?: string; email?: string; } /** Official/trusted directory entry on the device. */ export interface SimulatorDirectoryEntry { id: string; label: string; contact_id?: string | null; number?: string | null; url?: string | null; description?: string | null; } export interface SimulatorEmailMessageRow extends Omit { folder_id: string; /** Full message body; summary-only messages may provide a snippet instead. */ body?: string; } export interface SimulatorPayloadEmailLink { href: string; text: string; title?: string; } export interface SimulatorEmailMessageDetail { id: string; subject: string; from: string; from_addr?: string; from_display_name?: string; to?: string; bcc?: string; cc?: string; date_at?: string; unread?: boolean; body: string; reply_to?: string; return_path?: string; links?: SimulatorPayloadEmailLink[]; attachment_name?: string; attachment_type?: string; attachment_behavior?: string; snippet?: string; } export interface SimulatorEmailApp { messages?: SimulatorEmailMessageRow[]; detail?: SimulatorEmailMessageDetail | null; } export interface SmsMessageAttachment { label: string; url?: string; } export interface SmsThreadMessage { /** Stable host identity for history reconciliation; optional for authored scenario messages. */ id?: string; from: 'them' | 'me'; /** Authored sender selected from the conversation's contact numbers. */ sender_number?: string; text: string; delay_seconds?: number; timestamp?: string; attachment?: SmsMessageAttachment; } export interface SimulatorSmsThreadSummary { id: string; contact_name?: string; contact_number?: string; snippet?: string; last_at?: string; unread?: boolean; } export interface SimulatorSmsThreadDetail { id?: string; messages: SmsThreadMessage[]; sender_display_name?: string; sender_number?: string; last_at?: string; unread?: boolean; } export interface SimulatorMessagesApp { threads?: SimulatorSmsThreadSummary[]; thread_detail?: SimulatorSmsThreadDetail | null; } export interface BrowserFormField { name: string; type: 'text' | 'password' | 'email'; label: string; } export interface SimulatorPageButton { label?: string; href?: string; target_page_id?: string; } export interface SimulatorInternetPage { id: string; url: string; title: string; layout?: string; content?: string; buttons?: SimulatorPageButton[]; submit_target_page_id?: string | null; logo_url?: string | null; warning_banner?: string | null; show_media_placeholder?: boolean; } export interface SimulatorInternetForm { id: string; page_id?: string; fields: BrowserFormField[]; } export interface SimulatorInternetApp { pages?: SimulatorInternetPage[]; forms?: SimulatorInternetForm[]; } export interface SimulatorPhoneIncomingCall { phone_number?: string; caller_name?: string; caller_title?: string; transcript?: string; avatar_url?: string; } export interface SimulatorPayloadCallEntry { id: string; number?: string; name?: string; direction?: 'in' | 'out' | 'missed' | 'voicemail'; timestamp?: string; /** Whole elapsed seconds; omit when the duration is unknown. */ duration_seconds?: number; } export interface SimulatorPhoneApp { calls?: SimulatorCallRecord[]; history?: SimulatorPayloadCallEntry[]; contacts?: string[]; dial?: { digits?: string; }; incoming_call?: SimulatorPhoneIncomingCall | null; voicemail?: { phone_number?: string; transcript?: string; caller_name?: string; timestamp?: string; }; } export interface SimulatorPayloadHomeWidget { id: string; type?: string; label?: string; } export interface SimulatorPayloadFeaturedApp { id: string; name: string; } export interface SimulatorPayloadSettingsSection { id: string; title: string; } export interface SimulatorHomeApp { home?: { widgets?: SimulatorPayloadHomeWidget[]; }; store?: { featured_apps?: SimulatorPayloadFeaturedApp[]; }; settings?: { sections?: SimulatorPayloadSettingsSection[]; }; } /** * Full-device simulator payload (simulator_json). * * Describes the complete simulated device state: entry point, apps, shared contacts, * and directory entries. TreeSpec handles outcomes and branching. */ export interface SimulatorDevicePayload { device?: SimulatorDevice; entry_point?: SimulatorEntryPoint; contacts?: SimulatorContact[]; phone?: SimulatorPhoneApp; email?: SimulatorEmailApp; messages?: SimulatorMessagesApp; internet?: SimulatorInternetApp; home?: SimulatorHomeApp; directory?: SimulatorDirectoryEntry[]; } /** Built-in phone screen IDs; browser page IDs remain free-form. */ export declare const SimulatorPhoneScreenId: Readonly<{ readonly History: 'history'; readonly Contacts: 'contacts'; readonly AddContact: 'add_contact'; readonly Dial: 'dial'; readonly IncomingCall: 'incoming_call'; readonly Voicemail: 'voicemail'; readonly Directory: 'directory'; }>; export type SimulatorPhoneScreenId = (typeof SimulatorPhoneScreenId)[keyof typeof SimulatorPhoneScreenId]; export declare function isPhoneScreen(value: unknown): value is SimulatorPhoneScreenId; /** Built-in email screen IDs; browser page IDs remain free-form. */ export declare const SimulatorEmailScreenId: Readonly<{ readonly List: 'list'; readonly Detail: 'detail'; readonly Compose: 'compose'; readonly Outbox: 'outbox'; readonly Trash: 'trash'; }>; export type SimulatorEmailScreenId = (typeof SimulatorEmailScreenId)[keyof typeof SimulatorEmailScreenId]; export declare function isEmailScreen(value: unknown): value is SimulatorEmailScreenId; /** Built-in messages screen IDs; browser page IDs remain free-form. */ export declare const SimulatorMessagesScreenId: Readonly<{ readonly Threads: 'threads'; readonly ThreadDetail: 'thread_detail'; readonly NewThread: 'new_thread'; }>; export type SimulatorMessagesScreenId = (typeof SimulatorMessagesScreenId)[keyof typeof SimulatorMessagesScreenId]; export declare function isMessagesScreen(value: unknown): value is SimulatorMessagesScreenId; /** Built-in internet screen IDs; browser page IDs remain free-form. */ export declare const SimulatorInternetScreenId: Readonly<{ readonly Pages: 'pages'; readonly Page: 'page'; }>; export type SimulatorInternetScreenId = (typeof SimulatorInternetScreenId)[keyof typeof SimulatorInternetScreenId]; /** Built-in home screen IDs; browser page IDs remain free-form. */ export declare const SimulatorHomeScreenId: Readonly<{ readonly Home: 'home'; readonly Store: 'store'; readonly Settings: 'settings'; }>; export type SimulatorHomeScreenId = (typeof SimulatorHomeScreenId)[keyof typeof SimulatorHomeScreenId]; export declare function isHomeScreen(value: unknown): value is SimulatorHomeScreenId; /** Union of app screen id types for authoring helpers. */ export type SimulatorScreenId = SimulatorPhoneScreenId | SimulatorEmailScreenId | SimulatorMessagesScreenId | SimulatorInternetScreenId | SimulatorHomeScreenId; //# sourceMappingURL=devicePayload.d.ts.map