@recordreplay/protocol
Advanced tools
Comparing version 0.1.0 to 0.2.0
import { metadataChange, uploadedData, sessionError } from "../../protocol/Recording"; | ||
import { missingRegions, unprocessedRegions, mouseEvents } from "../../protocol/Session"; | ||
import { missingRegions, unprocessedRegions, mouseEvents, SessionId } from "../../protocol/Session"; | ||
import { paintPoints } from "../../protocol/Graphics"; | ||
@@ -11,23 +11,23 @@ import { newSource } from "../../protocol/Debugger"; | ||
*/ | ||
(event: "Recording.metadataChange", parameters: metadataChange): void; | ||
(sessionId: SessionId, event: "Recording.metadataChange", parameters: metadataChange): void; | ||
/** | ||
* Describes how much of a recording's data has been uploaded to the cloud service. | ||
*/ | ||
(event: "Recording.uploadedData", parameters: uploadedData): void; | ||
(sessionId: SessionId, event: "Recording.uploadedData", parameters: uploadedData): void; | ||
/** | ||
* Emitted when a session has died due to a server side problem. | ||
*/ | ||
(event: "Recording.sessionError", parameters: sessionError): void; | ||
(sessionId: SessionId, event: "Recording.sessionError", parameters: sessionError): void; | ||
/** | ||
* Event describing regions of the recording that have not been uploaded. | ||
*/ | ||
(event: "Session.missingRegions", parameters: missingRegions): void; | ||
(sessionId: SessionId, event: "Session.missingRegions", parameters: missingRegions): void; | ||
/** | ||
* Event describing regions of the recording that have not been processed. | ||
*/ | ||
(event: "Session.unprocessedRegions", parameters: unprocessedRegions): void; | ||
(sessionId: SessionId, event: "Session.unprocessedRegions", parameters: unprocessedRegions): void; | ||
/** | ||
* Describes some mouse events that occur in the recording. | ||
*/ | ||
(event: "Session.mouseEvents", parameters: mouseEvents): void; | ||
(sessionId: SessionId, event: "Session.mouseEvents", parameters: mouseEvents): void; | ||
/** | ||
@@ -37,15 +37,15 @@ * Describes some points in the recording at which paints occurred. No paint | ||
*/ | ||
(event: "Graphics.paintPoints", parameters: paintPoints): void; | ||
(sessionId: SessionId, event: "Graphics.paintPoints", parameters: paintPoints): void; | ||
/** | ||
* Describes a source in the recording. | ||
*/ | ||
(event: "Debugger.newSource", parameters: newSource): void; | ||
(sessionId: SessionId, event: "Debugger.newSource", parameters: newSource): void; | ||
/** | ||
* Describes a console message in the recording. | ||
*/ | ||
(event: "Console.newMessage", parameters: newMessage): void; | ||
(sessionId: SessionId, event: "Console.newMessage", parameters: newMessage): void; | ||
/** | ||
* Describes some results of an analysis. | ||
*/ | ||
(event: "Analysis.analysisResult", parameters: analysisResult): void; | ||
(sessionId: SessionId, event: "Analysis.analysisResult", parameters: analysisResult): void; | ||
/** | ||
@@ -56,7 +56,7 @@ * Describes an error that occurred when running an analysis mapper or reducer | ||
*/ | ||
(event: "Analysis.analysisError", parameters: analysisError): void; | ||
(sessionId: SessionId, event: "Analysis.analysisError", parameters: analysisError): void; | ||
/** | ||
* Describes some points at which an analysis will run. | ||
*/ | ||
(event: "Analysis.analysisPoints", parameters: analysisPoints): void; | ||
(sessionId: SessionId, event: "Analysis.analysisPoints", parameters: analysisPoints): void; | ||
} |
@@ -12,15 +12,15 @@ import { getDescriptionParameters, getDescriptionResult, getMetadataParameters, getMetadataResult, setMetadataParameters, setMetadataResult, metadataStartListeningParameters, metadataStartListeningResult, metadataStopListeningParameters, metadataStopListeningResult, createSessionParameters, createSessionResult, releaseSessionParameters, releaseSessionResult, processRecordingParameters, processRecordingResult } from "../../protocol/Recording"; | ||
import { createRecordingParameters, createRecordingResult, setRecordingMetadataParameters, setRecordingMetadataResult, addRecordingDataParameters, addRecordingDataResult, addRecordingDescriptionParameters, addRecordingDescriptionResult, hasResourceParameters, hasResourceResult, addResourceParameters, addResourceResult, addRecordingResourceParameters, addRecordingResourceResult, echoParameters, echoResult, labelTestSessionParameters, labelTestSessionResult, getRecordingsParameters, getRecordingsResult } from "../../protocol/Internal"; | ||
export interface ProtocolMessageHandlers { | ||
export interface ProtocolMessageHandlers<T> { | ||
/** | ||
* Get a description of a recording. | ||
*/ | ||
"Recording.getDescription": (parameters: getDescriptionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getDescriptionResult | null> | getDescriptionResult | null; | ||
"Recording.getDescription": (handler: T, parameters: getDescriptionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getDescriptionResult | null> | getDescriptionResult | null; | ||
/** | ||
* Get an entry in a recording's metadata key/value store. | ||
*/ | ||
"Recording.getMetadata": (parameters: getMetadataParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getMetadataResult | null> | getMetadataResult | null; | ||
"Recording.getMetadata": (handler: T, parameters: getMetadataParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getMetadataResult | null> | getMetadataResult | null; | ||
/** | ||
* Set an entry in a recording's metadata. | ||
*/ | ||
"Recording.setMetadata": (parameters: setMetadataParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<setMetadataResult | null> | setMetadataResult | null; | ||
"Recording.setMetadata": (handler: T, parameters: setMetadataParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<setMetadataResult | null> | setMetadataResult | null; | ||
/** | ||
@@ -31,7 +31,7 @@ * Listen for changes to an entry in a recording's metadata. When listening, | ||
*/ | ||
"Recording.metadataStartListening": (parameters: metadataStartListeningParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<metadataStartListeningResult | null> | metadataStartListeningResult | null; | ||
"Recording.metadataStartListening": (handler: T, parameters: metadataStartListeningParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<metadataStartListeningResult | null> | metadataStartListeningResult | null; | ||
/** | ||
* Stop listening for changes to an entry in a recording's metadata. | ||
*/ | ||
"Recording.metadataStopListening": (parameters: metadataStopListeningParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<metadataStopListeningResult | null> | metadataStopListeningResult | null; | ||
"Recording.metadataStopListening": (handler: T, parameters: metadataStopListeningParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<metadataStopListeningResult | null> | metadataStopListeningResult | null; | ||
/** | ||
@@ -44,7 +44,7 @@ * Create a session for inspecting a recording. This command does not return | ||
*/ | ||
"Recording.createSession": (parameters: createSessionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<createSessionResult | null> | createSessionResult | null; | ||
"Recording.createSession": (handler: T, parameters: createSessionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<createSessionResult | null> | createSessionResult | null; | ||
/** | ||
* Release a session and allow its resources to be reclaimed. | ||
*/ | ||
"Recording.releaseSession": (parameters: releaseSessionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<releaseSessionResult | null> | releaseSessionResult | null; | ||
"Recording.releaseSession": (handler: T, parameters: releaseSessionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<releaseSessionResult | null> | releaseSessionResult | null; | ||
/** | ||
@@ -56,3 +56,3 @@ * Begin processing a recording, even if no sessions have been created for it. | ||
*/ | ||
"Recording.processRecording": (parameters: processRecordingParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<processRecordingResult | null> | processRecordingResult | null; | ||
"Recording.processRecording": (handler: T, parameters: processRecordingParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<processRecordingResult | null> | processRecordingResult | null; | ||
/** | ||
@@ -65,3 +65,3 @@ * Does not return until the recording is fully processed. Before returning, | ||
*/ | ||
"Session.ensureProcessed": (parameters: ensureProcessedParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<ensureProcessedResult | null> | ensureProcessedResult | null; | ||
"Session.ensureProcessed": (handler: T, parameters: ensureProcessedParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<ensureProcessedResult | null> | ensureProcessedResult | null; | ||
/** | ||
@@ -73,15 +73,15 @@ * Find all points in the recording at which a mouse move or click occurred. | ||
*/ | ||
"Session.findMouseEvents": (parameters: findMouseEventsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findMouseEventsResult | null> | findMouseEventsResult | null; | ||
"Session.findMouseEvents": (handler: T, parameters: findMouseEventsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findMouseEventsResult | null> | findMouseEventsResult | null; | ||
/** | ||
* Get the last execution point in the recording. | ||
*/ | ||
"Session.getEndpoint": (parameters: getEndpointParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getEndpointResult | null> | getEndpointResult | null; | ||
"Session.getEndpoint": (handler: T, parameters: getEndpointParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getEndpointResult | null> | getEndpointResult | null; | ||
/** | ||
* Create a pause describing the state at an execution point. | ||
*/ | ||
"Session.createPause": (parameters: createPauseParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<createPauseResult | null> | createPauseResult | null; | ||
"Session.createPause": (handler: T, parameters: createPauseParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<createPauseResult | null> | createPauseResult | null; | ||
/** | ||
* Release a pause and allow its resources to be reclaimed. | ||
*/ | ||
"Session.releasePause": (parameters: releasePauseParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<releasePauseResult | null> | releasePauseResult | null; | ||
"Session.releasePause": (handler: T, parameters: releasePauseParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<releasePauseResult | null> | releasePauseResult | null; | ||
/** | ||
@@ -93,7 +93,7 @@ * Find all points in the recording at which paints occurred. Does not return | ||
*/ | ||
"Graphics.findPaints": (parameters: findPaintsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findPaintsResult | null> | findPaintsResult | null; | ||
"Graphics.findPaints": (handler: T, parameters: findPaintsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findPaintsResult | null> | findPaintsResult | null; | ||
/** | ||
* Get the graphics at a point where a paint occurred. | ||
*/ | ||
"Graphics.getPaintContents": (parameters: getPaintContentsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getPaintContentsResult | null> | getPaintContentsResult | null; | ||
"Graphics.getPaintContents": (handler: T, parameters: getPaintContentsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getPaintContentsResult | null> | getPaintContentsResult | null; | ||
/** | ||
@@ -104,3 +104,3 @@ * Get the value of <code>window.devicePixelRatio</code>. This is the ratio of | ||
*/ | ||
"Graphics.getDevicePixelRatio": (parameters: getDevicePixelRatioParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getDevicePixelRatioResult | null> | getDevicePixelRatioResult | null; | ||
"Graphics.getDevicePixelRatio": (handler: T, parameters: getDevicePixelRatioParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getDevicePixelRatioResult | null> | getDevicePixelRatioResult | null; | ||
/** | ||
@@ -111,7 +111,7 @@ * Find all sources in the recording. Does not return until the recording is | ||
*/ | ||
"Debugger.findSources": (parameters: findSourcesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findSourcesResult | null> | findSourcesResult | null; | ||
"Debugger.findSources": (handler: T, parameters: findSourcesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findSourcesResult | null> | findSourcesResult | null; | ||
/** | ||
* Get the contents of a source. | ||
*/ | ||
"Debugger.getSourceContents": (parameters: getSourceContentsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getSourceContentsResult | null> | getSourceContentsResult | null; | ||
"Debugger.getSourceContents": (handler: T, parameters: getSourceContentsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getSourceContentsResult | null> | getSourceContentsResult | null; | ||
/** | ||
@@ -121,31 +121,31 @@ * Get a compact representation of the locations where breakpoints can be set | ||
*/ | ||
"Debugger.getPossibleBreakpoints": (parameters: getPossibleBreakpointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getPossibleBreakpointsResult | null> | getPossibleBreakpointsResult | null; | ||
"Debugger.getPossibleBreakpoints": (handler: T, parameters: getPossibleBreakpointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getPossibleBreakpointsResult | null> | getPossibleBreakpointsResult | null; | ||
/** | ||
* Get the mapped location for a source location. | ||
*/ | ||
"Debugger.getMappedLocation": (parameters: getMappedLocationParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getMappedLocationResult | null> | getMappedLocationResult | null; | ||
"Debugger.getMappedLocation": (handler: T, parameters: getMappedLocationParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getMappedLocationResult | null> | getMappedLocationResult | null; | ||
/** | ||
* Set a breakpoint at a location. | ||
*/ | ||
"Debugger.setBreakpoint": (parameters: setBreakpointParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<setBreakpointResult | null> | setBreakpointResult | null; | ||
"Debugger.setBreakpoint": (handler: T, parameters: setBreakpointParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<setBreakpointResult | null> | setBreakpointResult | null; | ||
/** | ||
* Remove a breakpoint. | ||
*/ | ||
"Debugger.removeBreakpoint": (parameters: removeBreakpointParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<removeBreakpointResult | null> | removeBreakpointResult | null; | ||
"Debugger.removeBreakpoint": (handler: T, parameters: removeBreakpointParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<removeBreakpointResult | null> | removeBreakpointResult | null; | ||
/** | ||
* Find where to pause when running forward from a point. | ||
*/ | ||
"Debugger.findResumeTarget": (parameters: findResumeTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findResumeTargetResult | null> | findResumeTargetResult | null; | ||
"Debugger.findResumeTarget": (handler: T, parameters: findResumeTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findResumeTargetResult | null> | findResumeTargetResult | null; | ||
/** | ||
* Find where to pause when rewinding from a point. | ||
*/ | ||
"Debugger.findRewindTarget": (parameters: findRewindTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findRewindTargetResult | null> | findRewindTargetResult | null; | ||
"Debugger.findRewindTarget": (handler: T, parameters: findRewindTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findRewindTargetResult | null> | findRewindTargetResult | null; | ||
/** | ||
* Find where to pause when reverse-stepping from a point. | ||
*/ | ||
"Debugger.findReverseStepOverTarget": (parameters: findReverseStepOverTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findReverseStepOverTargetResult | null> | findReverseStepOverTargetResult | null; | ||
"Debugger.findReverseStepOverTarget": (handler: T, parameters: findReverseStepOverTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findReverseStepOverTargetResult | null> | findReverseStepOverTargetResult | null; | ||
/** | ||
* Find where to pause when stepping from a point. | ||
*/ | ||
"Debugger.findStepOverTarget": (parameters: findStepOverTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findStepOverTargetResult | null> | findStepOverTargetResult | null; | ||
"Debugger.findStepOverTarget": (handler: T, parameters: findStepOverTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findStepOverTargetResult | null> | findStepOverTargetResult | null; | ||
/** | ||
@@ -155,7 +155,7 @@ * Find where to pause when stepping from a point and stopping at the entry of | ||
*/ | ||
"Debugger.findStepInTarget": (parameters: findStepInTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findStepInTargetResult | null> | findStepInTargetResult | null; | ||
"Debugger.findStepInTarget": (handler: T, parameters: findStepInTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findStepInTargetResult | null> | findStepInTargetResult | null; | ||
/** | ||
* Find where to pause when stepping out from a frame to the caller. | ||
*/ | ||
"Debugger.findStepOutTarget": (parameters: findStepOutTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findStepOutTargetResult | null> | findStepOutTargetResult | null; | ||
"Debugger.findStepOutTarget": (handler: T, parameters: findStepOutTargetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findStepOutTargetResult | null> | findStepOutTargetResult | null; | ||
/** | ||
@@ -166,7 +166,7 @@ * Blackbox a source or a region in it. Resume commands like | ||
*/ | ||
"Debugger.blackboxSource": (parameters: blackboxSourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<blackboxSourceResult | null> | blackboxSourceResult | null; | ||
"Debugger.blackboxSource": (handler: T, parameters: blackboxSourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<blackboxSourceResult | null> | blackboxSourceResult | null; | ||
/** | ||
* Unblackbox a source or a region in it. | ||
*/ | ||
"Debugger.unblackboxSource": (parameters: unblackboxSourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<unblackboxSourceResult | null> | unblackboxSourceResult | null; | ||
"Debugger.unblackboxSource": (handler: T, parameters: unblackboxSourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<unblackboxSourceResult | null> | unblackboxSourceResult | null; | ||
/** | ||
@@ -177,3 +177,3 @@ * Find all messages in the recording. Does not return until the recording is | ||
*/ | ||
"Console.findMessages": (parameters: findMessagesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findMessagesResult | null> | findMessagesResult | null; | ||
"Console.findMessages": (handler: T, parameters: findMessagesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findMessagesResult | null> | findMessagesResult | null; | ||
/** | ||
@@ -183,51 +183,51 @@ * Evaluate an expression in the context of a call frame. This command is | ||
*/ | ||
"Pause.evaluateInFrame": (parameters: evaluateInFrameParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<evaluateInFrameResult | null> | evaluateInFrameResult | null; | ||
"Pause.evaluateInFrame": (handler: T, parameters: evaluateInFrameParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<evaluateInFrameResult | null> | evaluateInFrameResult | null; | ||
/** | ||
* Evaluate an expression in a global context. This command is effectful. | ||
*/ | ||
"Pause.evaluateInGlobal": (parameters: evaluateInGlobalParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<evaluateInGlobalResult | null> | evaluateInGlobalResult | null; | ||
"Pause.evaluateInGlobal": (handler: T, parameters: evaluateInGlobalParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<evaluateInGlobalResult | null> | evaluateInGlobalResult | null; | ||
/** | ||
* Read a property from an object. This command is effectful. | ||
*/ | ||
"Pause.getObjectProperty": (parameters: getObjectPropertyParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getObjectPropertyResult | null> | getObjectPropertyResult | null; | ||
"Pause.getObjectProperty": (handler: T, parameters: getObjectPropertyParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getObjectPropertyResult | null> | getObjectPropertyResult | null; | ||
/** | ||
* Call a function object. This command is effectful. | ||
*/ | ||
"Pause.callFunction": (parameters: callFunctionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<callFunctionResult | null> | callFunctionResult | null; | ||
"Pause.callFunction": (handler: T, parameters: callFunctionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<callFunctionResult | null> | callFunctionResult | null; | ||
/** | ||
* Read a property from an object, then call the result. This command is effectful. | ||
*/ | ||
"Pause.callObjectProperty": (parameters: callObjectPropertyParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<callObjectPropertyResult | null> | callObjectPropertyResult | null; | ||
"Pause.callObjectProperty": (handler: T, parameters: callObjectPropertyParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<callObjectPropertyResult | null> | callObjectPropertyResult | null; | ||
/** | ||
* Load a preview for an object. | ||
*/ | ||
"Pause.getObjectPreview": (parameters: getObjectPreviewParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getObjectPreviewResult | null> | getObjectPreviewResult | null; | ||
"Pause.getObjectPreview": (handler: T, parameters: getObjectPreviewParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getObjectPreviewResult | null> | getObjectPreviewResult | null; | ||
/** | ||
* Load a scope's contents. | ||
*/ | ||
"Pause.getScope": (parameters: getScopeParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getScopeResult | null> | getScopeResult | null; | ||
"Pause.getScope": (handler: T, parameters: getScopeParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getScopeResult | null> | getScopeResult | null; | ||
/** | ||
* Get the topmost frame on the stack. | ||
*/ | ||
"Pause.getTopFrame": (parameters: getTopFrameParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getTopFrameResult | null> | getTopFrameResult | null; | ||
"Pause.getTopFrame": (handler: T, parameters: getTopFrameParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getTopFrameResult | null> | getTopFrameResult | null; | ||
/** | ||
* Get all frames on the stack. | ||
*/ | ||
"Pause.getAllFrames": (parameters: getAllFramesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getAllFramesResult | null> | getAllFramesResult | null; | ||
"Pause.getAllFrames": (handler: T, parameters: getAllFramesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getAllFramesResult | null> | getAllFramesResult | null; | ||
/** | ||
* Get the values of a frame's arguments. | ||
*/ | ||
"Pause.getFrameArguments": (parameters: getFrameArgumentsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getFrameArgumentsResult | null> | getFrameArgumentsResult | null; | ||
"Pause.getFrameArguments": (handler: T, parameters: getFrameArgumentsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getFrameArgumentsResult | null> | getFrameArgumentsResult | null; | ||
/** | ||
* Get the points of all steps that are executed by a frame. | ||
*/ | ||
"Pause.getFrameSteps": (parameters: getFrameStepsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getFrameStepsResult | null> | getFrameStepsResult | null; | ||
"Pause.getFrameSteps": (handler: T, parameters: getFrameStepsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getFrameStepsResult | null> | getFrameStepsResult | null; | ||
/** | ||
* Get any exception that is being thrown at this point. | ||
*/ | ||
"Pause.getExceptionValue": (parameters: getExceptionValueParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getExceptionValueResult | null> | getExceptionValueResult | null; | ||
"Pause.getExceptionValue": (handler: T, parameters: getExceptionValueParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getExceptionValueResult | null> | getExceptionValueResult | null; | ||
/** | ||
* Get the page's root document. | ||
*/ | ||
"DOM.getDocument": (parameters: getDocumentParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getDocumentResult | null> | getDocumentResult | null; | ||
"DOM.getDocument": (handler: T, parameters: getDocumentParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getDocumentResult | null> | getDocumentResult | null; | ||
/** | ||
@@ -237,59 +237,59 @@ * Load previews for an object and its transitive parents up to the | ||
*/ | ||
"DOM.getParentNodes": (parameters: getParentNodesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getParentNodesResult | null> | getParentNodesResult | null; | ||
"DOM.getParentNodes": (handler: T, parameters: getParentNodesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getParentNodesResult | null> | getParentNodesResult | null; | ||
/** | ||
* Call querySelector() on a node in the page. | ||
*/ | ||
"DOM.querySelector": (parameters: querySelectorParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<querySelectorResult | null> | querySelectorResult | null; | ||
"DOM.querySelector": (handler: T, parameters: querySelectorParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<querySelectorResult | null> | querySelectorResult | null; | ||
/** | ||
* Get the event listeners attached to a node in the page. | ||
*/ | ||
"DOM.getEventListeners": (parameters: getEventListenersParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getEventListenersResult | null> | getEventListenersResult | null; | ||
"DOM.getEventListeners": (handler: T, parameters: getEventListenersParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getEventListenersResult | null> | getEventListenersResult | null; | ||
/** | ||
* Get boxes for a node. | ||
*/ | ||
"DOM.getBoxModel": (parameters: getBoxModelParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getBoxModelResult | null> | getBoxModelResult | null; | ||
"DOM.getBoxModel": (handler: T, parameters: getBoxModelParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getBoxModelResult | null> | getBoxModelResult | null; | ||
/** | ||
* Get the bounding client rect for a node. | ||
*/ | ||
"DOM.getBoundingClientRect": (parameters: getBoundingClientRectParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getBoundingClientRectResult | null> | getBoundingClientRectResult | null; | ||
"DOM.getBoundingClientRect": (handler: T, parameters: getBoundingClientRectParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getBoundingClientRectResult | null> | getBoundingClientRectResult | null; | ||
/** | ||
* Get the bounding client rect for all elements on the page. | ||
*/ | ||
"DOM.getAllBoundingClientRects": (parameters: getAllBoundingClientRectsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getAllBoundingClientRectsResult | null> | getAllBoundingClientRectsResult | null; | ||
"DOM.getAllBoundingClientRects": (handler: T, parameters: getAllBoundingClientRectsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getAllBoundingClientRectsResult | null> | getAllBoundingClientRectsResult | null; | ||
/** | ||
* Search the DOM for nodes containing a string. | ||
*/ | ||
"DOM.performSearch": (parameters: performSearchParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<performSearchResult | null> | performSearchResult | null; | ||
"DOM.performSearch": (handler: T, parameters: performSearchParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<performSearchResult | null> | performSearchResult | null; | ||
/** | ||
* Get the styles computed for a node. | ||
*/ | ||
"CSS.getComputedStyle": (parameters: getComputedStyleParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getComputedStyleResult | null> | getComputedStyleResult | null; | ||
"CSS.getComputedStyle": (handler: T, parameters: getComputedStyleParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getComputedStyleResult | null> | getComputedStyleResult | null; | ||
/** | ||
* Get the style rules being applied to a node. | ||
*/ | ||
"CSS.getAppliedRules": (parameters: getAppliedRulesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getAppliedRulesResult | null> | getAppliedRulesResult | null; | ||
"CSS.getAppliedRules": (handler: T, parameters: getAppliedRulesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getAppliedRulesResult | null> | getAppliedRulesResult | null; | ||
/** | ||
* Start specifying a new analysis. | ||
*/ | ||
"Analysis.createAnalysis": (parameters: createAnalysisParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<createAnalysisResult | null> | createAnalysisResult | null; | ||
"Analysis.createAnalysis": (handler: T, parameters: createAnalysisParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<createAnalysisResult | null> | createAnalysisResult | null; | ||
/** | ||
* Apply the analysis to every point where a source location executes. | ||
*/ | ||
"Analysis.addLocation": (parameters: addLocationParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addLocationResult | null> | addLocationResult | null; | ||
"Analysis.addLocation": (handler: T, parameters: addLocationParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addLocationResult | null> | addLocationResult | null; | ||
/** | ||
* Apply the analysis to every function entry point in a region of a source. | ||
*/ | ||
"Analysis.addFunctionEntryPoints": (parameters: addFunctionEntryPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addFunctionEntryPointsResult | null> | addFunctionEntryPointsResult | null; | ||
"Analysis.addFunctionEntryPoints": (handler: T, parameters: addFunctionEntryPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addFunctionEntryPointsResult | null> | addFunctionEntryPointsResult | null; | ||
/** | ||
* Apply the analysis to a random selection of points. | ||
*/ | ||
"Analysis.addRandomPoints": (parameters: addRandomPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addRandomPointsResult | null> | addRandomPointsResult | null; | ||
"Analysis.addRandomPoints": (handler: T, parameters: addRandomPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addRandomPointsResult | null> | addRandomPointsResult | null; | ||
/** | ||
* Apply the analysis to the entry point of every handler for an event. | ||
*/ | ||
"Analysis.addEventHandlerEntryPoints": (parameters: addEventHandlerEntryPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addEventHandlerEntryPointsResult | null> | addEventHandlerEntryPointsResult | null; | ||
"Analysis.addEventHandlerEntryPoints": (handler: T, parameters: addEventHandlerEntryPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addEventHandlerEntryPointsResult | null> | addEventHandlerEntryPointsResult | null; | ||
/** | ||
* Apply the analysis to every point where an exception is thrown. | ||
*/ | ||
"Analysis.addExceptionPoints": (parameters: addExceptionPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addExceptionPointsResult | null> | addExceptionPointsResult | null; | ||
"Analysis.addExceptionPoints": (handler: T, parameters: addExceptionPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addExceptionPointsResult | null> | addExceptionPointsResult | null; | ||
/** | ||
@@ -301,3 +301,3 @@ * Run the analysis. After this is called, <code>analysisResult</code> and/or | ||
*/ | ||
"Analysis.runAnalysis": (parameters: runAnalysisParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<runAnalysisResult | null> | runAnalysisResult | null; | ||
"Analysis.runAnalysis": (handler: T, parameters: runAnalysisParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<runAnalysisResult | null> | runAnalysisResult | null; | ||
/** | ||
@@ -308,3 +308,3 @@ * Release an analysis and its server side resources. If the analysis is | ||
*/ | ||
"Analysis.releaseAnalysis": (parameters: releaseAnalysisParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<releaseAnalysisResult | null> | releaseAnalysisResult | null; | ||
"Analysis.releaseAnalysis": (handler: T, parameters: releaseAnalysisParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<releaseAnalysisResult | null> | releaseAnalysisResult | null; | ||
/** | ||
@@ -316,11 +316,11 @@ * Find the set of execution points at which an analysis will run. After this | ||
*/ | ||
"Analysis.findAnalysisPoints": (parameters: findAnalysisPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findAnalysisPointsResult | null> | findAnalysisPointsResult | null; | ||
"Analysis.findAnalysisPoints": (handler: T, parameters: findAnalysisPointsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<findAnalysisPointsResult | null> | findAnalysisPointsResult | null; | ||
/** | ||
* Get the function ID / offset to use for a source location, if there is one. | ||
*/ | ||
"Target.convertLocationToFunctionOffset": (parameters: convertLocationToFunctionOffsetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<convertLocationToFunctionOffsetResult | null> | convertLocationToFunctionOffsetResult | null; | ||
"Target.convertLocationToFunctionOffset": (handler: T, parameters: convertLocationToFunctionOffsetParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<convertLocationToFunctionOffsetResult | null> | convertLocationToFunctionOffsetResult | null; | ||
/** | ||
* Get the location to use for a function ID / offset. | ||
*/ | ||
"Target.convertFunctionOffsetToLocation": (parameters: convertFunctionOffsetToLocationParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<convertFunctionOffsetToLocationResult | null> | convertFunctionOffsetToLocationResult | null; | ||
"Target.convertFunctionOffsetToLocation": (handler: T, parameters: convertFunctionOffsetToLocationParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<convertFunctionOffsetToLocationResult | null> | convertFunctionOffsetToLocationResult | null; | ||
/** | ||
@@ -330,19 +330,19 @@ * Get the offsets at which execution should pause when stepping around within | ||
*/ | ||
"Target.getStepOffsets": (parameters: getStepOffsetsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getStepOffsetsResult | null> | getStepOffsetsResult | null; | ||
"Target.getStepOffsets": (handler: T, parameters: getStepOffsetsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getStepOffsetsResult | null> | getStepOffsetsResult | null; | ||
/** | ||
* Get the most complete contents known for an HTML file. | ||
*/ | ||
"Target.getHTMLSource": (parameters: getHTMLSourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getHTMLSourceResult | null> | getHTMLSourceResult | null; | ||
"Target.getHTMLSource": (handler: T, parameters: getHTMLSourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getHTMLSourceResult | null> | getHTMLSourceResult | null; | ||
/** | ||
* Get the IDs of all functions in a range within a source. | ||
*/ | ||
"Target.getFunctionsInRange": (parameters: getFunctionsInRangeParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getFunctionsInRangeResult | null> | getFunctionsInRangeResult | null; | ||
"Target.getFunctionsInRange": (handler: T, parameters: getFunctionsInRangeParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getFunctionsInRangeResult | null> | getFunctionsInRangeResult | null; | ||
/** | ||
* Get any source map URL associated with a source. | ||
*/ | ||
"Target.getSourceMapURL": (parameters: getSourceMapURLParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getSourceMapURLResult | null> | getSourceMapURLResult | null; | ||
"Target.getSourceMapURL": (handler: T, parameters: getSourceMapURLParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getSourceMapURLResult | null> | getSourceMapURLResult | null; | ||
/** | ||
* Get any source map URL associated with a style sheet. | ||
*/ | ||
"Target.getSheetSourceMapURL": (parameters: getSheetSourceMapURLParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getSheetSourceMapURLResult | null> | getSheetSourceMapURLResult | null; | ||
"Target.getSheetSourceMapURL": (handler: T, parameters: getSheetSourceMapURLParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getSheetSourceMapURLResult | null> | getSheetSourceMapURLResult | null; | ||
/** | ||
@@ -353,3 +353,3 @@ * This command might be sent from within a RecordReplayOnConsoleMessage() call | ||
*/ | ||
"Target.getCurrentMessageContents": (parameters: getCurrentMessageContentsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getCurrentMessageContentsResult | null> | getCurrentMessageContentsResult | null; | ||
"Target.getCurrentMessageContents": (handler: T, parameters: getCurrentMessageContentsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getCurrentMessageContentsResult | null> | getCurrentMessageContentsResult | null; | ||
/** | ||
@@ -360,3 +360,3 @@ * Count the number of stack frames on the stack. This is equivalent to using | ||
*/ | ||
"Target.countStackFrames": (parameters: countStackFramesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<countStackFramesResult | null> | countStackFramesResult | null; | ||
"Target.countStackFrames": (handler: T, parameters: countStackFramesParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<countStackFramesResult | null> | countStackFramesResult | null; | ||
/** | ||
@@ -367,11 +367,11 @@ * If the topmost frame on the stack is a generator frame which can be popped | ||
*/ | ||
"Target.currentGeneratorId": (parameters: currentGeneratorIdParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<currentGeneratorIdResult | null> | currentGeneratorIdResult | null; | ||
"Target.currentGeneratorId": (handler: T, parameters: currentGeneratorIdParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<currentGeneratorIdResult | null> | currentGeneratorIdResult | null; | ||
/** | ||
* Get the location of the top frame on the stack, if there is one. | ||
*/ | ||
"Target.topFrameLocation": (parameters: topFrameLocationParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<topFrameLocationResult | null> | topFrameLocationResult | null; | ||
"Target.topFrameLocation": (handler: T, parameters: topFrameLocationParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<topFrameLocationResult | null> | topFrameLocationResult | null; | ||
/** | ||
* Create a new recording. | ||
*/ | ||
"Internal.createRecording": (parameters: createRecordingParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<createRecordingResult | null> | createRecordingResult | null; | ||
"Internal.createRecording": (handler: T, parameters: createRecordingParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<createRecordingResult | null> | createRecordingResult | null; | ||
/** | ||
@@ -383,3 +383,3 @@ * Adds metadata that is associated with the entire recording in question, | ||
*/ | ||
"Internal.setRecordingMetadata": (parameters: setRecordingMetadataParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<setRecordingMetadataResult | null> | setRecordingMetadataResult | null; | ||
"Internal.setRecordingMetadata": (handler: T, parameters: setRecordingMetadataParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<setRecordingMetadataResult | null> | setRecordingMetadataResult | null; | ||
/** | ||
@@ -391,31 +391,417 @@ * Add data to a recording. The next message sent after this must be a binary | ||
*/ | ||
"Internal.addRecordingData": (parameters: addRecordingDataParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addRecordingDataResult | null> | addRecordingDataResult | null; | ||
"Internal.addRecordingData": (handler: T, parameters: addRecordingDataParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addRecordingDataResult | null> | addRecordingDataResult | null; | ||
/** | ||
* Add metadata about a recording. | ||
*/ | ||
"Internal.addRecordingDescription": (parameters: addRecordingDescriptionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addRecordingDescriptionResult | null> | addRecordingDescriptionResult | null; | ||
"Internal.addRecordingDescription": (handler: T, parameters: addRecordingDescriptionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addRecordingDescriptionResult | null> | addRecordingDescriptionResult | null; | ||
/** | ||
* Determine whether a resource is known to the cloud service. | ||
*/ | ||
"Internal.hasResource": (parameters: hasResourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<hasResourceResult | null> | hasResourceResult | null; | ||
"Internal.hasResource": (handler: T, parameters: hasResourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<hasResourceResult | null> | hasResourceResult | null; | ||
/** | ||
* Upload a resource's contents to the cloud service. | ||
*/ | ||
"Internal.addResource": (parameters: addResourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addResourceResult | null> | addResourceResult | null; | ||
"Internal.addResource": (handler: T, parameters: addResourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addResourceResult | null> | addResourceResult | null; | ||
/** | ||
* Associate a resource with a recording. | ||
*/ | ||
"Internal.addRecordingResource": (parameters: addRecordingResourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addRecordingResourceResult | null> | addRecordingResourceResult | null; | ||
"Internal.addRecordingResource": (handler: T, parameters: addRecordingResourceParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<addRecordingResourceResult | null> | addRecordingResourceResult | null; | ||
/** | ||
* For testing network issues. | ||
*/ | ||
"Internal.echo": (parameters: echoParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<echoResult | null> | echoResult | null; | ||
"Internal.echo": (handler: T, parameters: echoParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<echoResult | null> | echoResult | null; | ||
/** | ||
* Mark a session which was created for an automated test. | ||
*/ | ||
"Internal.labelTestSession": (parameters: labelTestSessionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<labelTestSessionResult | null> | labelTestSessionResult | null; | ||
"Internal.labelTestSession": (handler: T, parameters: labelTestSessionParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<labelTestSessionResult | null> | labelTestSessionResult | null; | ||
/** | ||
* Get the user's recordings | ||
*/ | ||
"Internal.getRecordings": (parameters: getRecordingsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getRecordingsResult | null> | getRecordingsResult | null; | ||
"Internal.getRecordings": (handler: T, parameters: getRecordingsParameters, sessionId?: SessionId, pauseId?: PauseId) => Promise<getRecordingsResult | null> | getRecordingsResult | null; | ||
} | ||
export interface addMessageHandler<T> { | ||
/** | ||
* Get a description of a recording. | ||
*/ | ||
(message: "Recording.getDescription", messageHandler: (handler: T, parameters: getDescriptionParameters) => Promise<getDescriptionResult | null> | getDescriptionResult | null): void; | ||
/** | ||
* Get an entry in a recording's metadata key/value store. | ||
*/ | ||
(message: "Recording.getMetadata", messageHandler: (handler: T, parameters: getMetadataParameters) => Promise<getMetadataResult | null> | getMetadataResult | null): void; | ||
/** | ||
* Set an entry in a recording's metadata. | ||
*/ | ||
(message: "Recording.setMetadata", messageHandler: (handler: T, parameters: setMetadataParameters) => Promise<setMetadataResult | null> | setMetadataResult | null): void; | ||
/** | ||
* Listen for changes to an entry in a recording's metadata. When listening, | ||
* <code>metadataChange</code> events will be emitted whenever the entry's | ||
* value changes. | ||
*/ | ||
(message: "Recording.metadataStartListening", messageHandler: (handler: T, parameters: metadataStartListeningParameters) => Promise<metadataStartListeningResult | null> | metadataStartListeningResult | null): void; | ||
/** | ||
* Stop listening for changes to an entry in a recording's metadata. | ||
*/ | ||
(message: "Recording.metadataStopListening", messageHandler: (handler: T, parameters: metadataStopListeningParameters) => Promise<metadataStopListeningResult | null> | metadataStopListeningResult | null): void; | ||
/** | ||
* Create a session for inspecting a recording. This command does not return | ||
* until the recording's contents have been fully received. If the contents | ||
* are incomplete, <code>uploadedData</code> events will be periodically | ||
* emitted before the command returns. After creating, a <code>sessionError</code> | ||
* events may be emitted later if the session dies unexpectedly. | ||
*/ | ||
(message: "Recording.createSession", messageHandler: (handler: T, parameters: createSessionParameters) => Promise<createSessionResult | null> | createSessionResult | null): void; | ||
/** | ||
* Release a session and allow its resources to be reclaimed. | ||
*/ | ||
(message: "Recording.releaseSession", messageHandler: (handler: T, parameters: releaseSessionParameters) => Promise<releaseSessionResult | null> | releaseSessionResult | null): void; | ||
/** | ||
* Begin processing a recording, even if no sessions have been created for it. | ||
* After calling this, sessions created for the recording (on this connection, | ||
* or another) may start in a partially or fully processed state and start | ||
* being used immediately. | ||
*/ | ||
(message: "Recording.processRecording", messageHandler: (handler: T, parameters: processRecordingParameters) => Promise<processRecordingResult | null> | processRecordingResult | null): void; | ||
/** | ||
* Does not return until the recording is fully processed. Before returning, | ||
* <code>missingRegions</code> and <code>unprocessedRegions</code> events will | ||
* be periodically emitted. Commands which require inspecting the recording | ||
* will not return until that part of the recording has been processed, | ||
* see <code>ProcessingLevel</code> for details. | ||
*/ | ||
(message: "Session.ensureProcessed", messageHandler: (handler: T, parameters: ensureProcessedParameters) => Promise<ensureProcessedResult | null> | ensureProcessedResult | null): void; | ||
/** | ||
* Find all points in the recording at which a mouse move or click occurred. | ||
* Does not return until the recording is fully processed. Before returning, | ||
* <code>mouseEvents</code> events will be periodically emitted. The union | ||
* of all these events describes all mouse events in the recording. | ||
*/ | ||
(message: "Session.findMouseEvents", messageHandler: (handler: T, parameters: findMouseEventsParameters) => Promise<findMouseEventsResult | null> | findMouseEventsResult | null): void; | ||
/** | ||
* Get the last execution point in the recording. | ||
*/ | ||
(message: "Session.getEndpoint", messageHandler: (handler: T, parameters: getEndpointParameters) => Promise<getEndpointResult | null> | getEndpointResult | null): void; | ||
/** | ||
* Create a pause describing the state at an execution point. | ||
*/ | ||
(message: "Session.createPause", messageHandler: (handler: T, parameters: createPauseParameters) => Promise<createPauseResult | null> | createPauseResult | null): void; | ||
/** | ||
* Release a pause and allow its resources to be reclaimed. | ||
*/ | ||
(message: "Session.releasePause", messageHandler: (handler: T, parameters: releasePauseParameters) => Promise<releasePauseResult | null> | releasePauseResult | null): void; | ||
/** | ||
* Find all points in the recording at which paints occurred. Does not return | ||
* until the recording is fully processed. Before returning, | ||
* <code>paintPoints</code> events will be periodically emitted. The union | ||
* of all these events describes all paint points in the recording. | ||
*/ | ||
(message: "Graphics.findPaints", messageHandler: (handler: T, parameters: findPaintsParameters) => Promise<findPaintsResult | null> | findPaintsResult | null): void; | ||
/** | ||
* Get the graphics at a point where a paint occurred. | ||
*/ | ||
(message: "Graphics.getPaintContents", messageHandler: (handler: T, parameters: getPaintContentsParameters) => Promise<getPaintContentsResult | null> | getPaintContentsResult | null): void; | ||
/** | ||
* Get the value of <code>window.devicePixelRatio</code>. This is the ratio of | ||
* pixels in screen shots to pixels used by DOM/CSS data such as | ||
* <code>DOM.getBoundingClientRect</code>. | ||
*/ | ||
(message: "Graphics.getDevicePixelRatio", messageHandler: (handler: T, parameters: getDevicePixelRatioParameters) => Promise<getDevicePixelRatioResult | null> | getDevicePixelRatioResult | null): void; | ||
/** | ||
* Find all sources in the recording. Does not return until the recording is | ||
* fully processed. Before returning, <code>newSource</code> events will be | ||
* emitted for every source in the recording. | ||
*/ | ||
(message: "Debugger.findSources", messageHandler: (handler: T, parameters: findSourcesParameters) => Promise<findSourcesResult | null> | findSourcesResult | null): void; | ||
/** | ||
* Get the contents of a source. | ||
*/ | ||
(message: "Debugger.getSourceContents", messageHandler: (handler: T, parameters: getSourceContentsParameters) => Promise<getSourceContentsResult | null> | getSourceContentsResult | null): void; | ||
/** | ||
* Get a compact representation of the locations where breakpoints can be set | ||
* in a region of a source. | ||
*/ | ||
(message: "Debugger.getPossibleBreakpoints", messageHandler: (handler: T, parameters: getPossibleBreakpointsParameters) => Promise<getPossibleBreakpointsResult | null> | getPossibleBreakpointsResult | null): void; | ||
/** | ||
* Get the mapped location for a source location. | ||
*/ | ||
(message: "Debugger.getMappedLocation", messageHandler: (handler: T, parameters: getMappedLocationParameters) => Promise<getMappedLocationResult | null> | getMappedLocationResult | null): void; | ||
/** | ||
* Set a breakpoint at a location. | ||
*/ | ||
(message: "Debugger.setBreakpoint", messageHandler: (handler: T, parameters: setBreakpointParameters) => Promise<setBreakpointResult | null> | setBreakpointResult | null): void; | ||
/** | ||
* Remove a breakpoint. | ||
*/ | ||
(message: "Debugger.removeBreakpoint", messageHandler: (handler: T, parameters: removeBreakpointParameters) => Promise<removeBreakpointResult | null> | removeBreakpointResult | null): void; | ||
/** | ||
* Find where to pause when running forward from a point. | ||
*/ | ||
(message: "Debugger.findResumeTarget", messageHandler: (handler: T, parameters: findResumeTargetParameters) => Promise<findResumeTargetResult | null> | findResumeTargetResult | null): void; | ||
/** | ||
* Find where to pause when rewinding from a point. | ||
*/ | ||
(message: "Debugger.findRewindTarget", messageHandler: (handler: T, parameters: findRewindTargetParameters) => Promise<findRewindTargetResult | null> | findRewindTargetResult | null): void; | ||
/** | ||
* Find where to pause when reverse-stepping from a point. | ||
*/ | ||
(message: "Debugger.findReverseStepOverTarget", messageHandler: (handler: T, parameters: findReverseStepOverTargetParameters) => Promise<findReverseStepOverTargetResult | null> | findReverseStepOverTargetResult | null): void; | ||
/** | ||
* Find where to pause when stepping from a point. | ||
*/ | ||
(message: "Debugger.findStepOverTarget", messageHandler: (handler: T, parameters: findStepOverTargetParameters) => Promise<findStepOverTargetResult | null> | findStepOverTargetResult | null): void; | ||
/** | ||
* Find where to pause when stepping from a point and stopping at the entry of | ||
* any encountered call. | ||
*/ | ||
(message: "Debugger.findStepInTarget", messageHandler: (handler: T, parameters: findStepInTargetParameters) => Promise<findStepInTargetResult | null> | findStepInTargetResult | null): void; | ||
/** | ||
* Find where to pause when stepping out from a frame to the caller. | ||
*/ | ||
(message: "Debugger.findStepOutTarget", messageHandler: (handler: T, parameters: findStepOutTargetParameters) => Promise<findStepOutTargetResult | null> | findStepOutTargetResult | null): void; | ||
/** | ||
* Blackbox a source or a region in it. Resume commands like | ||
* <code>findResumeTarget</code> will not return execution points in | ||
* blackboxed regions of a source. | ||
*/ | ||
(message: "Debugger.blackboxSource", messageHandler: (handler: T, parameters: blackboxSourceParameters) => Promise<blackboxSourceResult | null> | blackboxSourceResult | null): void; | ||
/** | ||
* Unblackbox a source or a region in it. | ||
*/ | ||
(message: "Debugger.unblackboxSource", messageHandler: (handler: T, parameters: unblackboxSourceParameters) => Promise<unblackboxSourceResult | null> | unblackboxSourceResult | null): void; | ||
/** | ||
* Find all messages in the recording. Does not return until the recording is | ||
* fully processed. Before returning, <code>newMessage</code> events will be | ||
* emitted for every console message in the recording. | ||
*/ | ||
(message: "Console.findMessages", messageHandler: (handler: T, parameters: findMessagesParameters) => Promise<findMessagesResult | null> | findMessagesResult | null): void; | ||
/** | ||
* Evaluate an expression in the context of a call frame. This command is | ||
* effectful. | ||
*/ | ||
(message: "Pause.evaluateInFrame", messageHandler: (handler: T, parameters: evaluateInFrameParameters) => Promise<evaluateInFrameResult | null> | evaluateInFrameResult | null): void; | ||
/** | ||
* Evaluate an expression in a global context. This command is effectful. | ||
*/ | ||
(message: "Pause.evaluateInGlobal", messageHandler: (handler: T, parameters: evaluateInGlobalParameters) => Promise<evaluateInGlobalResult | null> | evaluateInGlobalResult | null): void; | ||
/** | ||
* Read a property from an object. This command is effectful. | ||
*/ | ||
(message: "Pause.getObjectProperty", messageHandler: (handler: T, parameters: getObjectPropertyParameters) => Promise<getObjectPropertyResult | null> | getObjectPropertyResult | null): void; | ||
/** | ||
* Call a function object. This command is effectful. | ||
*/ | ||
(message: "Pause.callFunction", messageHandler: (handler: T, parameters: callFunctionParameters) => Promise<callFunctionResult | null> | callFunctionResult | null): void; | ||
/** | ||
* Read a property from an object, then call the result. This command is effectful. | ||
*/ | ||
(message: "Pause.callObjectProperty", messageHandler: (handler: T, parameters: callObjectPropertyParameters) => Promise<callObjectPropertyResult | null> | callObjectPropertyResult | null): void; | ||
/** | ||
* Load a preview for an object. | ||
*/ | ||
(message: "Pause.getObjectPreview", messageHandler: (handler: T, parameters: getObjectPreviewParameters) => Promise<getObjectPreviewResult | null> | getObjectPreviewResult | null): void; | ||
/** | ||
* Load a scope's contents. | ||
*/ | ||
(message: "Pause.getScope", messageHandler: (handler: T, parameters: getScopeParameters) => Promise<getScopeResult | null> | getScopeResult | null): void; | ||
/** | ||
* Get the topmost frame on the stack. | ||
*/ | ||
(message: "Pause.getTopFrame", messageHandler: (handler: T, parameters: getTopFrameParameters) => Promise<getTopFrameResult | null> | getTopFrameResult | null): void; | ||
/** | ||
* Get all frames on the stack. | ||
*/ | ||
(message: "Pause.getAllFrames", messageHandler: (handler: T, parameters: getAllFramesParameters) => Promise<getAllFramesResult | null> | getAllFramesResult | null): void; | ||
/** | ||
* Get the values of a frame's arguments. | ||
*/ | ||
(message: "Pause.getFrameArguments", messageHandler: (handler: T, parameters: getFrameArgumentsParameters) => Promise<getFrameArgumentsResult | null> | getFrameArgumentsResult | null): void; | ||
/** | ||
* Get the points of all steps that are executed by a frame. | ||
*/ | ||
(message: "Pause.getFrameSteps", messageHandler: (handler: T, parameters: getFrameStepsParameters) => Promise<getFrameStepsResult | null> | getFrameStepsResult | null): void; | ||
/** | ||
* Get any exception that is being thrown at this point. | ||
*/ | ||
(message: "Pause.getExceptionValue", messageHandler: (handler: T, parameters: getExceptionValueParameters) => Promise<getExceptionValueResult | null> | getExceptionValueResult | null): void; | ||
/** | ||
* Get the page's root document. | ||
*/ | ||
(message: "DOM.getDocument", messageHandler: (handler: T, parameters: getDocumentParameters) => Promise<getDocumentResult | null> | getDocumentResult | null): void; | ||
/** | ||
* Load previews for an object and its transitive parents up to the | ||
* root document. | ||
*/ | ||
(message: "DOM.getParentNodes", messageHandler: (handler: T, parameters: getParentNodesParameters) => Promise<getParentNodesResult | null> | getParentNodesResult | null): void; | ||
/** | ||
* Call querySelector() on a node in the page. | ||
*/ | ||
(message: "DOM.querySelector", messageHandler: (handler: T, parameters: querySelectorParameters) => Promise<querySelectorResult | null> | querySelectorResult | null): void; | ||
/** | ||
* Get the event listeners attached to a node in the page. | ||
*/ | ||
(message: "DOM.getEventListeners", messageHandler: (handler: T, parameters: getEventListenersParameters) => Promise<getEventListenersResult | null> | getEventListenersResult | null): void; | ||
/** | ||
* Get boxes for a node. | ||
*/ | ||
(message: "DOM.getBoxModel", messageHandler: (handler: T, parameters: getBoxModelParameters) => Promise<getBoxModelResult | null> | getBoxModelResult | null): void; | ||
/** | ||
* Get the bounding client rect for a node. | ||
*/ | ||
(message: "DOM.getBoundingClientRect", messageHandler: (handler: T, parameters: getBoundingClientRectParameters) => Promise<getBoundingClientRectResult | null> | getBoundingClientRectResult | null): void; | ||
/** | ||
* Get the bounding client rect for all elements on the page. | ||
*/ | ||
(message: "DOM.getAllBoundingClientRects", messageHandler: (handler: T, parameters: getAllBoundingClientRectsParameters) => Promise<getAllBoundingClientRectsResult | null> | getAllBoundingClientRectsResult | null): void; | ||
/** | ||
* Search the DOM for nodes containing a string. | ||
*/ | ||
(message: "DOM.performSearch", messageHandler: (handler: T, parameters: performSearchParameters) => Promise<performSearchResult | null> | performSearchResult | null): void; | ||
/** | ||
* Get the styles computed for a node. | ||
*/ | ||
(message: "CSS.getComputedStyle", messageHandler: (handler: T, parameters: getComputedStyleParameters) => Promise<getComputedStyleResult | null> | getComputedStyleResult | null): void; | ||
/** | ||
* Get the style rules being applied to a node. | ||
*/ | ||
(message: "CSS.getAppliedRules", messageHandler: (handler: T, parameters: getAppliedRulesParameters) => Promise<getAppliedRulesResult | null> | getAppliedRulesResult | null): void; | ||
/** | ||
* Start specifying a new analysis. | ||
*/ | ||
(message: "Analysis.createAnalysis", messageHandler: (handler: T, parameters: createAnalysisParameters) => Promise<createAnalysisResult | null> | createAnalysisResult | null): void; | ||
/** | ||
* Apply the analysis to every point where a source location executes. | ||
*/ | ||
(message: "Analysis.addLocation", messageHandler: (handler: T, parameters: addLocationParameters) => Promise<addLocationResult | null> | addLocationResult | null): void; | ||
/** | ||
* Apply the analysis to every function entry point in a region of a source. | ||
*/ | ||
(message: "Analysis.addFunctionEntryPoints", messageHandler: (handler: T, parameters: addFunctionEntryPointsParameters) => Promise<addFunctionEntryPointsResult | null> | addFunctionEntryPointsResult | null): void; | ||
/** | ||
* Apply the analysis to a random selection of points. | ||
*/ | ||
(message: "Analysis.addRandomPoints", messageHandler: (handler: T, parameters: addRandomPointsParameters) => Promise<addRandomPointsResult | null> | addRandomPointsResult | null): void; | ||
/** | ||
* Apply the analysis to the entry point of every handler for an event. | ||
*/ | ||
(message: "Analysis.addEventHandlerEntryPoints", messageHandler: (handler: T, parameters: addEventHandlerEntryPointsParameters) => Promise<addEventHandlerEntryPointsResult | null> | addEventHandlerEntryPointsResult | null): void; | ||
/** | ||
* Apply the analysis to every point where an exception is thrown. | ||
*/ | ||
(message: "Analysis.addExceptionPoints", messageHandler: (handler: T, parameters: addExceptionPointsParameters) => Promise<addExceptionPointsResult | null> | addExceptionPointsResult | null): void; | ||
/** | ||
* Run the analysis. After this is called, <code>analysisResult</code> and/or | ||
* <code>analysisError</code> events will be emitted as results are gathered. | ||
* Does not return until the analysis has finished and all events have been | ||
* emitted. | ||
*/ | ||
(message: "Analysis.runAnalysis", messageHandler: (handler: T, parameters: runAnalysisParameters) => Promise<runAnalysisResult | null> | runAnalysisResult | null): void; | ||
/** | ||
* Release an analysis and its server side resources. If the analysis is | ||
* running, it will be canceled, preventing further <code>analysisResult</code> | ||
* and <code>analysisError</code> events from being emitted. | ||
*/ | ||
(message: "Analysis.releaseAnalysis", messageHandler: (handler: T, parameters: releaseAnalysisParameters) => Promise<releaseAnalysisResult | null> | releaseAnalysisResult | null): void; | ||
/** | ||
* Find the set of execution points at which an analysis will run. After this | ||
* is called, <code>analysisPoints</code> events will be emitted as the points | ||
* are found. Does not return until events for all points have been emitted. | ||
* Can only be used after the analysis has started running. | ||
*/ | ||
(message: "Analysis.findAnalysisPoints", messageHandler: (handler: T, parameters: findAnalysisPointsParameters) => Promise<findAnalysisPointsResult | null> | findAnalysisPointsResult | null): void; | ||
/** | ||
* Get the function ID / offset to use for a source location, if there is one. | ||
*/ | ||
(message: "Target.convertLocationToFunctionOffset", messageHandler: (handler: T, parameters: convertLocationToFunctionOffsetParameters) => Promise<convertLocationToFunctionOffsetResult | null> | convertLocationToFunctionOffsetResult | null): void; | ||
/** | ||
* Get the location to use for a function ID / offset. | ||
*/ | ||
(message: "Target.convertFunctionOffsetToLocation", messageHandler: (handler: T, parameters: convertFunctionOffsetToLocationParameters) => Promise<convertFunctionOffsetToLocationResult | null> | convertFunctionOffsetToLocationResult | null): void; | ||
/** | ||
* Get the offsets at which execution should pause when stepping around within | ||
* a frame for a function. | ||
*/ | ||
(message: "Target.getStepOffsets", messageHandler: (handler: T, parameters: getStepOffsetsParameters) => Promise<getStepOffsetsResult | null> | getStepOffsetsResult | null): void; | ||
/** | ||
* Get the most complete contents known for an HTML file. | ||
*/ | ||
(message: "Target.getHTMLSource", messageHandler: (handler: T, parameters: getHTMLSourceParameters) => Promise<getHTMLSourceResult | null> | getHTMLSourceResult | null): void; | ||
/** | ||
* Get the IDs of all functions in a range within a source. | ||
*/ | ||
(message: "Target.getFunctionsInRange", messageHandler: (handler: T, parameters: getFunctionsInRangeParameters) => Promise<getFunctionsInRangeResult | null> | getFunctionsInRangeResult | null): void; | ||
/** | ||
* Get any source map URL associated with a source. | ||
*/ | ||
(message: "Target.getSourceMapURL", messageHandler: (handler: T, parameters: getSourceMapURLParameters) => Promise<getSourceMapURLResult | null> | getSourceMapURLResult | null): void; | ||
/** | ||
* Get any source map URL associated with a style sheet. | ||
*/ | ||
(message: "Target.getSheetSourceMapURL", messageHandler: (handler: T, parameters: getSheetSourceMapURLParameters) => Promise<getSheetSourceMapURLResult | null> | getSheetSourceMapURLResult | null): void; | ||
/** | ||
* This command might be sent from within a RecordReplayOnConsoleMessage() call | ||
* to get contents of the new message. Properties in the result have the same | ||
* meaning as for <code>Console.Message</code>. | ||
*/ | ||
(message: "Target.getCurrentMessageContents", messageHandler: (handler: T, parameters: getCurrentMessageContentsParameters) => Promise<getCurrentMessageContentsResult | null> | getCurrentMessageContentsResult | null): void; | ||
/** | ||
* Count the number of stack frames on the stack. This is equivalent to using | ||
* the size of the stack returned by <code>Pause.getAllFrames</code>, but can | ||
* be implemented more efficiently. | ||
*/ | ||
(message: "Target.countStackFrames", messageHandler: (handler: T, parameters: countStackFramesParameters) => Promise<countStackFramesResult | null> | countStackFramesResult | null): void; | ||
/** | ||
* If the topmost frame on the stack is a generator frame which can be popped | ||
* and pushed on the stack repeatedly, return a unique ID for the frame which | ||
* will be consistent across each of those pops and pushes. | ||
*/ | ||
(message: "Target.currentGeneratorId", messageHandler: (handler: T, parameters: currentGeneratorIdParameters) => Promise<currentGeneratorIdResult | null> | currentGeneratorIdResult | null): void; | ||
/** | ||
* Get the location of the top frame on the stack, if there is one. | ||
*/ | ||
(message: "Target.topFrameLocation", messageHandler: (handler: T, parameters: topFrameLocationParameters) => Promise<topFrameLocationResult | null> | topFrameLocationResult | null): void; | ||
/** | ||
* Create a new recording. | ||
*/ | ||
(message: "Internal.createRecording", messageHandler: (handler: T, parameters: createRecordingParameters) => Promise<createRecordingResult | null> | createRecordingResult | null): void; | ||
/** | ||
* Adds metadata that is associated with the entire recording in question, | ||
* as identified by the id field in the recordingData field. This includes things | ||
* like the URL being recorded as well as the token that is associated with the | ||
* user who started this recording. | ||
*/ | ||
(message: "Internal.setRecordingMetadata", messageHandler: (handler: T, parameters: setRecordingMetadataParameters) => Promise<setRecordingMetadataResult | null> | setRecordingMetadataResult | null): void; | ||
/** | ||
* Add data to a recording. The next message sent after this must be a binary | ||
* message with the data described by this message. Uploaded recordings are not | ||
* explicitly finished; replay sessions created for a recording will include | ||
* all data which was successfully uploaded. | ||
*/ | ||
(message: "Internal.addRecordingData", messageHandler: (handler: T, parameters: addRecordingDataParameters) => Promise<addRecordingDataResult | null> | addRecordingDataResult | null): void; | ||
/** | ||
* Add metadata about a recording. | ||
*/ | ||
(message: "Internal.addRecordingDescription", messageHandler: (handler: T, parameters: addRecordingDescriptionParameters) => Promise<addRecordingDescriptionResult | null> | addRecordingDescriptionResult | null): void; | ||
/** | ||
* Determine whether a resource is known to the cloud service. | ||
*/ | ||
(message: "Internal.hasResource", messageHandler: (handler: T, parameters: hasResourceParameters) => Promise<hasResourceResult | null> | hasResourceResult | null): void; | ||
/** | ||
* Upload a resource's contents to the cloud service. | ||
*/ | ||
(message: "Internal.addResource", messageHandler: (handler: T, parameters: addResourceParameters) => Promise<addResourceResult | null> | addResourceResult | null): void; | ||
/** | ||
* Associate a resource with a recording. | ||
*/ | ||
(message: "Internal.addRecordingResource", messageHandler: (handler: T, parameters: addRecordingResourceParameters) => Promise<addRecordingResourceResult | null> | addRecordingResourceResult | null): void; | ||
/** | ||
* For testing network issues. | ||
*/ | ||
(message: "Internal.echo", messageHandler: (handler: T, parameters: echoParameters) => Promise<echoResult | null> | echoResult | null): void; | ||
/** | ||
* Mark a session which was created for an automated test. | ||
*/ | ||
(message: "Internal.labelTestSession", messageHandler: (handler: T, parameters: labelTestSessionParameters) => Promise<labelTestSessionResult | null> | labelTestSessionResult | null): void; | ||
/** | ||
* Get the user's recordings | ||
*/ | ||
(message: "Internal.getRecordings", messageHandler: (handler: T, parameters: getRecordingsParameters) => Promise<getRecordingsResult | null> | getRecordingsResult | null): void; | ||
} |
{ | ||
"name": "@recordreplay/protocol", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Definition of the protocol used by the Record Replay web service", | ||
@@ -5,0 +5,0 @@ "author": "", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
389261
8335