/** One write of a twin: the subject's fields the write set, at its World time, its bookkeeping included. */ export type RunStep = { vendor: string; type: string; id: string; operation?: string; fields: Record; at: string; actor?: string; }; /** A request of a person's browser as the browser recorded it (ADR 0036 ยง8, "A request's life is what the browser * records"), by the browser that made it: its World time (ms), its method, its URL (a redirect's last), its resource * type and how it ended, `loaded` or `failed` with the browser's own failure text. */ export type RunRequest = { browser: string; at: number; answered: boolean; method: string; url: string; type: string; frame?: string; loader?: string; worker?: string; failed?: string; loaded?: true; }; /** A request an app made to a twin, as the twin's request journal kept it: its World instant, the twin, its method and * path (never a query or a body), its status, and its outcome as the app met it: `ok` (answered below 400), `fail` * (answered 400 or above) or `unknown` (its answer lost or dropped by a fault). */ export type RunCall = { at: string; vendor: string; method: string; path: string; status?: number; outcome: 'ok' | 'fail' | 'unknown'; }; /** One of a run's inputs: a person the user acted as in the app (`page`), a request a program made to a vendor * (`request`: `by` the scenario or by the user command's own process outside its browsers, with its method and its * path, as the twin's journal keeps them, which never holds a query or a body), or a fault the scenario placed * (`fault`: its timeline entry, its layer and kind, and the World instants it was placed and lifted). */ export type RunInput = { kind: 'page'; person: string; } | { kind: 'request'; by: 'scenario' | 'user'; vendor: string; method: string; url: string; person?: string; headers?: Record; body?: string; } | { kind: 'fault'; entry: number; layer: string; fault: string; vendor?: string; target?: string; placed: string; lifted: string; };