/** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface InteractionToNextPaintEvent { /** * Schema version. */ version: "1.0.0"; /** * Interaction to Next Paint with attributions via web-vitals v4.x schema. See more (https://github.com/GoogleChrome/web-vitals/blob/main/src/types/inp.ts) */ value: number; /** * Attributions for INP */ attribution?: { /** * A selector identifying the element that the user first interacted with as part of the frame where the INP candidate interaction occurred. If this value is an empty string, that generally means the element was removed from the DOM after the interaction. */ interactionTarget?: string; /** * The time when the user first interacted during the frame where the INP candidate interaction occurred (if more than one interaction occurred within the frame, only the first time is reported). */ interactionTime?: number; /** * The best-guess timestamp of the next paint after the interaction. In general, this timestamp is the same as the `startTime + duration` of the event timing entry. However, since `duration` values are rounded to the nearest 8ms, it can sometimes appear that the paint occurred before processing ended (which cannot happen). This value clamps the paint time so it's always after `processingEnd` from the Event Timing API and `renderStart` from the Long Animation Frame API (where available). It also averages the duration values for all entries in the same animation frame, which should be closer to the "real" value. */ nextPaintTime?: number; /** * The type of interaction, based on the event type of the `event` entry that corresponds to the interaction (i.e. the first `event` entry containing an `interactionId` dispatched in a given animation frame). For "pointerdown", "pointerup", or "click" events this will be "pointer", and for "keydown" or "keyup" events this will be "keyboard". */ interactionType?: "pointer" | "keyboard"; /** * The time from when the user interacted with the page until when the browser was first able to start processing event listeners for that interaction. This time captures the delay before event processing can begin due to the main thread being busy with other work. */ inputDelay?: number; /** * The time from when the first event listener started running in response to the user interaction until when all event listener processing has finished. */ processingDuration?: number; /** * The time from when the browser finished processing all event listeners for the user interaction until the next frame is presented on the screen and visible to the user. This time includes work on the main thread (such as `requestAnimationFrame()` callbacks, `ResizeObserver` and `IntersectionObserver` callbacks, and style/layout calculation) as well as off-main-thread work (such as compositor, GPU, and raster work). */ presentationDelay?: number; /** * The loading state of the document at the time when the interaction corresponding to INP occurred (see `LoadState` for details). If the interaction occurred while the document was loading and executing script (e.g. usually in the `dom-interactive` phase) it can result in long delays. */ loadState?: "loading" | "dom-interactive" | "dom-content-loaded" | "complete"; }; }