@recordreplay/protocol
Version:
Definition of the protocol used by the Record Replay web service
1,040 lines • 221 kB
JSON
{
"version": {
"major": "0",
"minor": "1"
},
"domains": [
{
"domain": "Recording",
"description": "The Recording domain defines methods for managing recordings.",
"types": [
{
"id": "RecordingId",
"description": "Globally unique identifier for a recording.",
"type": "string"
},
{
"id": "BuildId",
"description": "Unique identifier for the software used to produce a recording.",
"type": "string"
},
{
"id": "TimeStamp",
"description": "A point in time within a recording, specified as the elapsed time in\nmilliseconds since the recording started. Sub-millisecond resolution\nis possible.",
"type": "number"
},
{
"id": "TimeRange",
"description": "Description for a range of time within a recording.",
"type": "object",
"properties": [
{
"name": "begin",
"$ref": "TimeStamp"
},
{
"name": "end",
"$ref": "TimeStamp"
}
]
},
{
"id": "ExecutionPoint",
"description": "Identifier for a point within a recording at which the program state can be\ninspected. Execution points are integers encoded as base-10 numeric strings,\nsuch that smaller numbered points precede larger numbered ones. They can be\ncompared by e.g. converting to BigInts and then comparing those BigInts.",
"type": "string"
},
{
"id": "PointRange",
"description": "A range between two execution points in a recording.",
"type": "object",
"properties": [
{
"name": "begin",
"$ref": "ExecutionPoint"
},
{
"name": "end",
"$ref": "ExecutionPoint"
}
]
},
{
"id": "TimeStampedPoint",
"description": "An execution point and its associated time stamp. Recordings always have a\nbeginning execution point with value \"0\" and a time stamp of zero.",
"type": "object",
"properties": [
{
"name": "point",
"$ref": "ExecutionPoint"
},
{
"name": "time",
"$ref": "TimeStamp"
}
]
},
{
"id": "TimeStampedPointRange",
"description": "A range between two points, with associated time stamps.",
"type": "object",
"properties": [
{
"name": "begin",
"$ref": "TimeStampedPoint"
},
{
"name": "end",
"$ref": "TimeStampedPoint"
}
]
},
{
"id": "MouseEvent",
"description": "A mouse event that occurs somewhere in a recording.",
"$ref": "TimeStampedPoint",
"properties": [
{
"name": "kind",
"description": "Kind of mouse event.",
"$ref": "MouseEventKind"
},
{
"name": "clientX",
"description": "X coordinate of the event, relative to the upper left of the page's main window.",
"type": "integer"
},
{
"name": "clientY",
"description": "Y coordinate of the event, relative to the upper left of the page's main window.",
"type": "integer"
}
]
},
{
"id": "MouseEventKind",
"description": "Kinds of mouse events described in a recording.",
"type": "string",
"enum": [
"mousemove",
"mousedown"
]
},
{
"id": "KeyboardEvent",
"description": "A keyboard event that occurs somewhere in a recording.",
"$ref": "TimeStampedPoint",
"properties": [
{
"name": "kind",
"description": "Kind of mouse event.",
"$ref": "KeyboardEventKind"
},
{
"name": "key",
"description": "The DOM-spec key representing the key being pressed. See\nhttps://www.w3.org/TR/uievents-code/ for more information.\nNote: Depending on the platform being recorded, not all key events may be recordable.",
"type": "string"
}
]
},
{
"id": "KeyboardEventKind",
"description": "Kinds of keyboard events described in a recording.\nNote: Platforms should prefer to record key down/up events if possible, but keypress\nis provided as a simpler fallback for platforms unable to track down/up events.",
"type": "string",
"enum": [
"keydown",
"keyup",
"keypress"
]
},
{
"id": "NavigationEvent",
"description": "A navigate operation that occurs somewhere in a recording.",
"$ref": "TimeStampedPoint",
"properties": [
{
"name": "kind",
"description": "The kind of navigation that occured, if known.",
"optional": true,
"type": "string"
},
{
"name": "url",
"description": "The URL that the top-level page navigated to.",
"type": "string"
}
]
},
{
"id": "Annotation",
"description": "An annotation that was added to a recording.",
"$ref": "TimeStampedPoint",
"properties": [
{
"name": "kind",
"description": "Kind of annotation.",
"type": "string"
},
{
"name": "contents",
"description": "Data associated with the annotation.",
"type": "string"
}
]
},
{
"id": "SourceMapId",
"description": "An opaque source map identifier.",
"type": "string"
},
{
"id": "SourceMapTargetHash",
"description": "The hash of a target for the sourcemap.\n\nSee Resource.FileHash for further info in the expected format for\nthis hash string.",
"type": "string"
}
],
"commands": [
{
"name": "getDescription",
"description": "Get a description of a recording.",
"parameters": [
{
"name": "recordingId",
"description": "Recording to get the description for.",
"$ref": "RecordingId"
}
],
"returns": [
{
"name": "duration",
"description": "Duration of the recording.",
"$ref": "TimeStamp"
},
{
"name": "length",
"description": "Byte length of the recording.",
"type": "integer"
}
]
},
{
"name": "createSession",
"description": "Create a session for inspecting a recording. This command does not return\nuntil the recording's contents have been fully received, unless\n<code>loadPoint</code> is specified. If the contents\nare incomplete, <code>uploadedData</code> events will be periodically\nemitted before the command returns. After creating, a <code>sessionError</code>\nevents may be emitted later if the session dies unexpectedly.",
"parameters": [
{
"name": "recordingId",
"description": "Recording to load into the session.",
"$ref": "RecordingId"
},
{
"name": "loadPoint",
"description": "Instead of waiting for the recording to be fully received, only wait until\nenough of the recording has been received that this point can be loaded.",
"optional": true,
"$ref": "ExecutionPoint"
},
{
"name": "experimentalSettings",
"description": "Settings which can be used to configure the session in ways that are not\nyet officially supported in the protocol.",
"optional": true,
"type": "object"
}
],
"returns": [
{
"name": "sessionId",
"description": "Identifier for the new session.",
"$ref": "Session.SessionId"
}
]
},
{
"name": "releaseSession",
"description": "Release a session and allow its resources to be reclaimed.",
"parameters": [
{
"name": "sessionId",
"description": "Session to release.",
"$ref": "Session.SessionId"
}
]
},
{
"name": "processRecording",
"description": "Begin processing a recording, even if no sessions have been created for it.\nAfter calling this, sessions created for the recording (on this connection,\nor another) may start in a partially or fully processed state and start\nbeing used immediately.",
"parameters": [
{
"name": "recordingId",
"$ref": "RecordingId"
}
]
},
{
"name": "addSourceMap",
"description": "Add a sourcemap to the recording.\n\nThe sourcemap will be applied to any file that matches the given\nset of target hash filters.",
"parameters": [
{
"name": "recordingId",
"description": "Recording to apply the sourcemap to.",
"$ref": "RecordingId"
},
{
"name": "targetContentHash",
"description": "Limit this sourcemap to only apply to sources with this content hash.",
"optional": true,
"$ref": "SourceMapTargetHash"
},
{
"name": "targetURLHash",
"description": "Limit this sourcemap to only apply to sources with this url hash.",
"optional": true,
"$ref": "SourceMapTargetHash"
},
{
"name": "targetMapURLHash",
"description": "Limit this sourcemap to only apply to sources with this source-map-url hash.\ne.g. The hash of the 'url' value from Target.getSourceMapURL/Target.getSheetSourceMapURL\nto tie this map to.\n\nUsing the url or content hash of the source itself is recommended for more\nspecificity, but if there is no URL and the content is unknown, such as\nin the case for inline CSS, this is necessary.",
"optional": true,
"$ref": "SourceMapTargetHash"
},
{
"name": "resource",
"description": "The sourcemap's resource data.",
"$ref": "Resource.Proof"
},
{
"name": "baseURL",
"description": "The baseURL to use when resolving relative paths in the map.",
"type": "string"
}
],
"returns": [
{
"name": "id",
"$ref": "SourceMapId"
}
]
},
{
"name": "addOriginalSource",
"description": "Add original source content to a given sourcemap.\n\nSourceMaps do not always contain the original source, so this\nthis allows users to explicitly associate the correct source content\nwith a source in the map.",
"parameters": [
{
"name": "recordingId",
"description": "Recording to get the description for.",
"$ref": "RecordingId"
},
{
"name": "resource",
"description": "The original source's resource data.",
"$ref": "Resource.Proof"
},
{
"name": "parentId",
"description": "The parent sourcemap's id.",
"$ref": "SourceMapId"
},
{
"name": "parentOffset",
"description": "The offset in the parent sourcemap's 'sources'.",
"type": "number"
}
]
}
],
"events": [
{
"name": "uploadedData",
"description": "Describes how much of a recording's data has been uploaded to the cloud service.",
"parameters": [
{
"name": "recordingId",
"description": "Recording being described.",
"$ref": "RecordingId"
},
{
"name": "uploaded",
"description": "How many bytes of recording data have been received by the cloud service.",
"type": "integer"
},
{
"name": "length",
"description": "Total size of the recording in bytes, if known.",
"optional": true,
"type": "integer"
}
]
},
{
"name": "awaitingSourcemaps",
"description": "Emitted during 'createSession' if all recording data has been received, but\nsourcemaps are still pending.",
"parameters": [
{
"name": "recordingId",
"description": "Recording being described.",
"$ref": "RecordingId"
}
]
},
{
"name": "sessionError",
"description": "Emitted when a session has died due to a server side problem.",
"parameters": [
{
"name": "sessionId",
"description": "Session which died.",
"$ref": "Session.SessionId"
},
{
"name": "code",
"description": "Numeric code for the error.",
"type": "integer"
},
{
"name": "message",
"description": "Description of the error.",
"type": "string"
}
]
}
]
},
{
"domain": "Resource",
"description": "The commands for uploading and processing resource files.",
"types": [
{
"id": "Token",
"description": "An opaque salt value that can be used to create a Proof for a file.\n\nThis string should be prepended to the file's content when calculating\nthe file's salted hash for the Proof.",
"type": "string"
},
{
"id": "FileHash",
"description": "A string representing hashed resource file content.\n\nAll hashes should be computed with SHA256 and prefixed with \"sha256:\"\nAll hashes should be computed using the UTF8 encoding of their content.\nAll hashes should be encoded as hex.",
"type": "string"
},
{
"id": "Proof",
"description": "An object representing knowledge of a file's full content.",
"type": "object",
"properties": [
{
"name": "token",
"$ref": "Token"
},
{
"name": "saltedHash",
"$ref": "FileHash"
}
]
}
],
"commands": [
{
"name": "token",
"description": "Get the token to use when computing the hashes of a given file.",
"parameters": [
{
"name": "hash",
"description": "The file's unsalted hash.",
"$ref": "FileHash"
}
],
"returns": [
{
"name": "token",
"description": "The token to use to create a proof for this file.",
"$ref": "Token"
},
{
"name": "expiration",
"description": "The unixtime when the token will be invalidated, in seconds.",
"type": "number"
}
]
},
{
"name": "exists",
"description": "Check if a given resource already exists on our servers.",
"parameters": [
{
"name": "resource",
"$ref": "Proof"
}
],
"returns": [
{
"name": "exists",
"type": "boolean"
}
]
},
{
"name": "create",
"description": "Upload a file, and for ease of use, get a resource proof for it.",
"parameters": [
{
"name": "content",
"description": "The content you wish to upload.",
"type": "string"
}
],
"returns": [
{
"name": "resource",
"description": "Proof that can be passed back to the server to reference this asset.",
"$ref": "Proof"
}
]
}
]
},
{
"domain": "Authentication",
"description": "The Authentication domain defines a command for authenticating the current user.",
"commands": [
{
"name": "setAccessToken",
"description": "Set the user's current access token",
"parameters": [
{
"name": "accessToken",
"type": "string"
}
]
}
]
},
{
"domain": "Session",
"description": "The Session domain defines methods for using recording sessions. In order to\ninspect a recording, it must first be loaded into a session via\n<code>Recording.createSession</code>.\n\nAfter the session is created, it may be in an unprocessed or partially\nprocessed state. As documented, some commands do not return until the session\nhas fully processed the recording. Processing starts automatically after the\nsession is created.\n\n<br><br>All commands and events in this domain must include a <code>sessionId</code>.",
"sessionId": true,
"types": [
{
"id": "SessionId",
"description": "Unique identifier for a session which a recording has been loaded into.",
"type": "string"
},
{
"id": "ProcessingLevel",
"description": "Level at which a recording can be processed. After <code>basic</code>\nprocessing, all console messages, sources, paints, and mouse events will\nbe available immediately.",
"type": "string",
"enum": [
"basic"
]
}
],
"commands": [
{
"name": "ensureProcessed",
"description": "Does not return until the recording is fully processed. Before returning,\n<code>missingRegions</code> and <code>unprocessedRegions</code> events will\nbe periodically emitted. Commands which require inspecting the recording\nwill not return until that part of the recording has been processed,\nsee <code>ProcessingLevel</code> for details.",
"parameters": [
{
"name": "level",
"description": "Level at which the recording should be processed before returning.\nDefaults to <code>basic</code> if omitted.",
"optional": true,
"$ref": "ProcessingLevel"
}
]
},
{
"name": "findMouseEvents",
"description": "Find all points in the recording at which a mouse move or click occurred.\nDoes not return until the recording is fully processed. Before returning,\n<code>mouseEvents</code> events will be periodically emitted. The union\nof all these events describes all mouse events in the recording."
},
{
"name": "findKeyboardEvents",
"description": "Find all points in the recording at which a keyboard event occurred.\nDoes not return until the recording is fully processed. Before returning,\n<code>keyboardEvents</code> events will be periodically emitted. The union\nof all these events describes all keyboard events in the recording."
},
{
"name": "findNavigationEvents"
},
{
"name": "findAnnotations",
"description": "Find all points in the recording at which an annotation was added via the\nRecordReplayOnAnnotation driver API. Does not return until the recording\nis fully processed. Before returning, <code>annotations</code> events will\nbe periodically emitted, which describe all annotations in the recording,\nor all annotations of the provided kind.",
"parameters": [
{
"name": "kind",
"description": "Any kind to restrict the returned annotations to.",
"optional": true,
"type": "string"
}
]
},
{
"name": "getAnnotationKinds",
"description": "Get the different kinds of annotations in the recording.",
"returns": [
{
"name": "kinds",
"type": "array",
"items": {
"type": "string"
}
}
]
},
{
"name": "getEndpoint",
"description": "Get the last execution point in the recording.",
"returns": [
{
"name": "endpoint",
"$ref": "Recording.TimeStampedPoint"
}
]
},
{
"name": "getPointNearTime",
"description": "Get a point near a given time in the recording.",
"parameters": [
{
"name": "time",
"type": "number"
}
],
"returns": [
{
"name": "point",
"$ref": "Recording.TimeStampedPoint"
}
]
},
{
"name": "createPause",
"description": "Create a pause describing the state at an execution point.",
"parameters": [
{
"name": "point",
"description": "Point to create the pause at.",
"$ref": "Recording.ExecutionPoint"
}
],
"returns": [
{
"name": "pauseId",
"description": "Identifier for the new pause.",
"$ref": "Pause.PauseId"
},
{
"name": "stack",
"description": "Stack contents, omitted if there are no frames on the stack at this point.",
"optional": true,
"$ref": "Pause.CallStack"
},
{
"name": "data",
"description": "Data describing the frames on the stack and the in scope\nvariables of the topmost frame.",
"$ref": "Pause.PauseData"
}
]
},
{
"name": "releasePause",
"description": "Release a pause and allow its resources to be reclaimed.",
"parameters": [
{
"name": "pauseId",
"$ref": "Pause.PauseId"
}
]
},
{
"name": "listenForLoadChanges",
"description": "Listen for changes in the loading status of parts of the recording.\nDoes not return until the session has been released. Before returning,\n<code>loadedRegions</code> events will be emitted when their status changes.\nBy default, the entire recording is loaded. If the recording is long enough,\nearlier loaded regions may be unloaded to reduce backend resource usage.\nPauses cannot be created or used in unloaded parts of the recording,\nand execution information for analyses and other commands like\n<code>Debugger.getHitCounts</code> will not be available."
},
{
"name": "loadRegion",
"description": "Request that an unloaded part of the recording start loading.\n\nAfter this command returns, any future commands that are sent will use the\nnew loading set of regions, and might need to wait until they finish loading\nbefore they return.\n\nCommands which are sent before this returns or which were still in progress\nwhen this was sent may use either the earlier loaded regions, the newly\nloaded regions, or some combination of the two.",
"parameters": [
{
"name": "region",
"description": "Region to load.",
"$ref": "Recording.TimeRange"
}
]
},
{
"name": "unloadRegion",
"description": "Request that part of the recording be unloaded. As for <code>Session.loadRegion</code>,\nthe newly loaded regions will take effect after the command returns, and commands\nwhich are sent before this returns or are in progress when it is sent may or may\nnot use the newly loaded regions.",
"parameters": [
{
"name": "region",
"description": "Region to unload.",
"$ref": "Recording.TimeRange"
}
]
},
{
"name": "getBuildId",
"description": "Get the identifier of the build used to produce the recording.",
"returns": [
{
"name": "buildId",
"description": "Build identifier originally passed to the RecordReplayAttach API when\nrecording. The build ID includes the platform, target (e.g. gecko,\nchromium, or node), build date, and a unique identifier. The format\nof a build ID is not currently consistent between platforms, and is\nsubject to change over time.",
"type": "string"
}
]
}
],
"events": [
{
"name": "missingRegions",
"description": "Event describing regions of the recording that have not been uploaded.",
"parameters": [
{
"name": "regions",
"description": "Regions that have not been uploaded.",
"type": "array",
"items": {
"$ref": "Recording.TimeRange"
}
}
]
},
{
"name": "unprocessedRegions",
"description": "Event describing regions of the recording that have not been processed.",
"parameters": [
{
"name": "level",
"description": "Level at which the regions are unprocessed.",
"$ref": "ProcessingLevel"
},
{
"name": "regions",
"description": "Regions of the recording that haven't been processed at the associated\nlevel.",
"type": "array",
"items": {
"$ref": "Recording.TimeStampedPointRange"
}
}
]
},
{
"name": "mouseEvents",
"description": "Describes some mouse events that occur in the recording.",
"parameters": [
{
"name": "events",
"type": "array",
"items": {
"$ref": "Recording.MouseEvent"
}
}
]
},
{
"name": "keyboardEvents",
"description": "Describes some keyboard events that occur in the recording.",
"parameters": [
{
"name": "events",
"type": "array",
"items": {
"$ref": "Recording.KeyboardEvent"
}
}
]
},
{
"name": "navigationEvents",
"description": "Describes some navigate events that occur in the recording.",
"parameters": [
{
"name": "events",
"type": "array",
"items": {
"$ref": "Recording.NavigationEvent"
}
}
]
},
{
"name": "annotations",
"description": "Describes some annotations in the recording.",
"parameters": [
{
"name": "annotations",
"type": "array",
"items": {
"$ref": "Recording.Annotation"
}
}
]
},
{
"name": "loadedRegions",
"description": "Describes the regions of the recording which are loading or loaded.",
"parameters": [
{
"name": "loaded",
"description": "Timespans which are fully loaded.",
"type": "array",
"items": {
"$ref": "Recording.TimeStampedPointRange"
}
},
{
"name": "loading",
"description": "Timespans which are in the process of loading. Pauses in these regions\ncan still be used, but will be slower.",
"type": "array",
"items": {
"$ref": "Recording.TimeStampedPointRange"
}
},
{
"name": "indexed",
"description": "Timespans which have been indexed. Note: Indexed timespans are a subset\nof loading in the same way that loaded is a subset of loading.",
"type": "array",
"items": {
"$ref": "Recording.TimeStampedPointRange"
}
}
]
},
{
"name": "newMetric",
"description": "Placeholder event for metrics being emitted.",
"parameters": [
{
"name": "data",
"type": "object"
}
]
},
{
"name": "experimentalEvent",
"description": "An event indicating that something happened in a way that is not yet officially\nsupported in the protocol. This will only be emitted for sessions which\nspecified experimental settings when they were created.",
"parameters": [
{
"name": "kind",
"description": "Kind of the event.",
"type": "string"
},
{
"name": "data",
"description": "Any associated data for the event.",
"optional": true,
"type": "object"
}
]
}
]
},
{
"domain": "Graphics",
"description": "The Graphics domain defines methods for accessing a recording's graphics data.\n\n<br><br>All commands and events in this domain must include a <code>sessionId</code>.",
"sessionId": true,
"commands": [
{
"name": "findPaints",
"description": "Find all points in the recording at which paints occurred. Does not return\nuntil the recording is fully processed. Before returning,\n<code>paintPoints</code> events will be periodically emitted. The union\nof all these events describes all paint points in the recording."
},
{
"name": "getPlaybackVideo",
"description": "Get the playback video data for this session. Does not return until the\nrecording is fully processed. Before returning,\n<code>playbackVideoFragment</code> events will be periodically emitted. The\nconcatenation of all these events constitutes the playback video data."
},
{
"name": "getPaintContents",
"description": "Get the graphics at a point where a paint occurred.",
"parameters": [
{
"name": "point",
"description": "Execution point to get the graphics for. This must have been listed in\na <code>paintPoints</code> event.",
"$ref": "Recording.ExecutionPoint"
},
{
"name": "mimeType",
"description": "Encoding format for the returned screen.",
"$ref": "MimeType"
},
{
"name": "resizeHeight",
"description": "If specified, the returned screen will be scaled to the specified height.",
"optional": true,
"type": "integer"
}
],
"returns": [
{
"name": "screen",
"description": "Screen shot of the rendered graphics.",
"$ref": "ScreenShot"
}
]
},
{
"name": "getDevicePixelRatio",
"description": "Get the value of <code>window.devicePixelRatio</code>. This is the ratio of\npixels in screen shots to pixels used by DOM/CSS data such as\n<code>DOM.getBoundingClientRect</code>.",
"returns": [
{
"name": "ratio",
"type": "number"
}
]
}
],
"events": [
{
"name": "paintPoints",
"description": "Describes some points in the recording at which paints occurred. No paint\nwill occur for the recording's beginning execution point.",
"parameters": [
{
"name": "paints",
"type": "array",
"items": {
"$ref": "PaintPoint"
}
}
]
},
{
"name": "playbackVideoFragment",
"description": "Describes the next fragment of playback video data, as part of the response\nto the getPlaybackVideo request.",
"parameters": [
{
"name": "fragment",
"type": "string"
}
]
}
],
"types": [
{
"id": "MimeType",
"description": "Graphics encoding format.",
"type": "string",
"enum": [
"image/jpeg",
"image/png"
]
},
{
"id": "ScreenShotHash",
"description": "Compact hash code for a screen shot.",
"type": "string"
},
{
"id": "ScreenShotDescription",
"description": "Compact description of the graphics rendered at some point.",
"type": "object",
"properties": [
{
"name": "mimeType",
"description": "Encoding used for the screen shot.",
"$ref": "MimeType"
},
{
"name": "hash",
"description": "Hash code for the screen shot's graphics data.",
"$ref": "ScreenShotHash"
}
]
},
{
"id": "ScreenShot",
"description": "Complete contents of the graphics rendered at some point.",
"$ref": "ScreenShotDescription",
"properties": [
{
"name": "data",
"description": "Raw graphics data encoded in base64.",
"type": "string"
},
{
"name": "scale",
"description": "The size of a CSS pixel relative to a pixel in this screenshot",
"type": "number"
}
]
},
{
"id": "PaintPoint",
"description": "Information about a point where a paint occurred.",
"$ref": "Recording.TimeStampedPoint",
"properties": [
{
"name": "screenShots",
"description": "Available screen shots for the graphics rendered at this point.",
"type": "array",
"items": {
"$ref": "ScreenShotDescription"
}
}
]
}
]
},
{
"domain": "Debugger",
"description": "The Debugger domain defines methods for accessing sources in the recording\nand navigating around the recording using breakpoints, stepping, and so forth.\n\n<br><br>All commands and events in this domain must include a <code>sessionId</code>.",
"sessionId": true,
"commands": [
{
"name": "findSources",
"description": "Find all sources in the recording. Does not return until the recording is\nfully processed. Before returning, <code>newSource</code> events will be\nemitted for every source in the recording."
},
{
"name": "getSourceContents",
"description": "Get the contents of a source.",
"parameters": [
{
"name": "sourceId",
"description": "Source to fetch the contents for.",
"$ref": "SourceId"
}
],
"returns": [
{
"name": "contents",
"description": "Contents of the source.",
"type": "string"
},
{
"name": "contentType",
"description": "Content type of the source contents.",
"$ref": "ContentType"
}
]
},
{
"name": "getSourceMap",
"description": "Get the sourcemap of a source.",
"parameters": [
{
"name": "sourceId",
"description": "Source to fetch the sourcemap for.",
"$ref": "SourceId"
}
],
"returns": [
{
"name": "contents",
"description": "The sourcemap of the source (if there is one).",
"optional": true,
"type": "string"
}
]
},
{
"name": "getScopeMap",
"description": "Get the mapping of generated to original variable names for the given\nlocation (which must be in a generated source).",
"parameters": [
{
"name": "location",
"description": "Location in a generated source to fetch the scopemap for.",
"$ref": "Location"
}
],
"returns": [
{
"name": "map",
"description": "The mapping of generated to original variable names.",
"optional": true,
"type": "array",
"items": {
"$ref": "VariableMapping"
}
}
]
},
{
"name": "getPossibleBreakpoints",
"description": "Get a compact representation of the lo