@caido/sdk-frontend
This is the reference for the frontend SDK used by frontend plugins. Caido is the main interface that provides access to various services and functionalities.
SDK
Caido<T, E>
Caido<
T
,E
>:object
Utilities for frontend plugins.
Type Parameters
Type Parameter | Default type |
---|---|
T extends BackendEndpoints | Record <string , never > |
E extends BackendEvents | Record <string , never > |
Type declaration
assets
assets:
AssetsSDK
Utilities to interact with the plugin's static assets.
backend
backend:
BackendSDK
<T
,E
>
Utilities to interact with the backend plugin.
commandPalette
commandPalette:
CommandPaletteSDK
Utilities to interact with the command palette.
commands
commands:
CommandsSDK
Utilities to interact with commands
env
env:
EnvironmentSDK
Utilities to interact with the environment.
files
files:
FilesSDK
Utilities to interact with the Files page.
filters
filters:
FiltersSDK
Utilities to interact with Filters page.
findings
findings:
FindingsSDK
Utilities to interact with findings
footer
footer:
FooterSDK
Utilities to interact with the footer.
graphql
graphql:
GraphqlSDK
Utilities to interact with the GraphQL API.
httpHistory
httpHistory:
HTTPHistorySDK
Utilities to interact with the HTTP History page.
intercept
intercept:
InterceptSDK
Utilities to interact with the Intercept page.
matchReplace
matchReplace:
MatchReplaceSDK
Utilities to interact with Match and Replace page.
menu
menu:
MenuSDK
Utilities to insert menu items and context-menus throughout the UI.
navigation
navigation:
NavigationSDK
Utilities to interact with navigation.
replay
replay:
ReplaySDK
Utilities to interact with the Replay page.
runtime
runtime:
RuntimeSDK
Utilities to interact with the runtime.
scopes
scopes:
ScopesSDK
Utilities to interact with scopes
search
search:
SearchSDK
Utilities to interact with the Search page.
shortcuts
shortcuts:
ShortcutsSDK
Utilities to interact with shortcuts.
sidebar
sidebar:
SidebarSDK
Utilities to interact with the sidebar.
sitemap
sitemap:
SitemapSDK
Utilities to interact with the Sitemap page.
storage
storage:
StorageSDK
Utilities to interact with frontend-plugin storage.
ui
ui:
UISDK
Utilities to create UI components.
window
window:
WindowSDK
Utilities to interact with the active page.
workflows
workflows:
WorkflowSDK
Utilities to interact with workflows.
Backend
BackendEndpoints
BackendEndpoints:
object
Endpoints provided by the backend plugin.
Index Signature
[key
: string
]: (...args
: any
[]) => any
BackendEvents
BackendEvents:
object
Events emitted by the backend plugin.
Index Signature
[key
: string
]: (...args
: any
[]) => void
BackendSDK<T, E>
BackendSDK<
T
,E
>:{ [K in keyof T]: (args: Parameters<T[K]>) => PromisifiedReturnType<T[K]> }
&object
Utilities to interact with the backend plugin.
Type declaration
onEvent()
onEvent: <
K
>(event
:K
,callback
:E
[K
]) =>object
Subscribe to a backend event.
Type Parameters
Type Parameter |
---|
K extends keyof E |
Parameters
Parameter | Type | Description |
---|---|---|
event | K | The event to subscribe to. |
callback | E [K ] | The callback to call when the event is emitted. |
Returns
object
An object with a stop
method that can be called to stop listening to the event.
stop()
stop: () =>
void
Returns
void
Type Parameters
Type Parameter |
---|
T extends BackendEndpoints |
E extends BackendEvents |
UI
UISDK
UISDK:
object
Utilities to create UI components.
Type declaration
button()
button: (
options
?:object
) =>HTMLElement
Create a button.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | { label : string ; leadingIcon : Icon ; size : "small" | "medium" | "large" ; trailingIcon : Icon ; variant : "primary" | "secondary" | "tertiary" ; } | Options for the button. |
options.label ? | string | The label of the button. |
options.leadingIcon ? | Icon | The leading icon of the button. |
options.size ? | "small" | "medium" | "large" | The size of the button. |
options.trailingIcon ? | Icon | The trailing icon of the button. |
options.variant ? | "primary" | "secondary" | "tertiary" | The variant of the button. |
Returns
HTMLElement
The button element.
Example
const deleteButton = sdk.ui.button({
variant: "primary",
label: "Delete",
trailingIcon: "fas fa-trash-can",
size: "small",
});
card()
card: (
options
?:object
) =>HTMLElement
Create a card.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | { body : HTMLElement ; footer : HTMLElement ; header : HTMLElement ; } | Options for the card. |
options.body ? | HTMLElement | The body of the card. |
options.footer ? | HTMLElement | The footer of the card. |
options.header ? | HTMLElement | The header of the card. |
Returns
HTMLElement
The card element.
httpRequestEditor()
httpRequestEditor: () =>
HTTPRequestEditor
Create an HTTP request editor
Returns
The HTTP request editor.
httpResponseEditor()
httpResponseEditor: () =>
HTTPResponseEditor
Create an HTTP response editor
Returns
The HTTP response editor.
well()
well: (
options
?:object
) =>HTMLElement
Create a well.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | { body : HTMLElement ; footer : HTMLElement ; header : HTMLElement ; } | Options for the well. |
options.body ? | HTMLElement | The body of the well. |
options.footer ? | HTMLElement | The footer of the well. |
options.header ? | HTMLElement | The header of the well. |
Returns
HTMLElement
The well element.
Scopes
Scope
Scope:
object
Represents a scope.
Type declaration
allowlist
allowlist:
string
[]
The list of included items.
denylist
denylist:
string
[]
The list of excluded items.
id
id:
ID
The unique ID of the scope.
name
name:
string
The name of the scope.
ScopesSDK
ScopesSDK:
object
Utilities to interact with scopes
Type declaration
createScope()
createScope: (
options
:object
) =>Promise
<Scope
|undefined
>
Create a scope.
Parameters
Parameter | Type | Description |
---|---|---|
options | { allowlist : string []; denylist : string []; name : string ; } | Options for the scope. |
options.allowlist | string [] | The list of included items in the scope. |
options.denylist | string [] | The list of excluded items in the scope. |
options.name | string | The name of the scope. |
Returns
Promise
<Scope
| undefined
>
The created scope.
Example
const newScope = await sdk.scopes.createScope({
name: "Example",
allowlist: ["*example.com", "*github.com"],
denylist: ["*caido.io"],
});
deleteScope()
deleteScope: (
id
:ID
) =>Promise
<boolean
>
Delete a scope.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The id of the scope to delete. |
Returns
Promise
<boolean
>
Whether the scope was deleted.
getScopes()
getScopes: () =>
Scope
[]
Get all scopes.
Returns
Scope
[]
A list of scopes.
updateScope()
updateScope: (
id
:ID
,options
:object
) =>Promise
<Scope
|undefined
>
Update a scope.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The id of the scope to update. |
options | { allowlist : string []; denylist : string []; name : string ; } | Options for the scope. |
options.allowlist ? | string [] | The list of included items in the scope. |
options.denylist ? | string [] | The list of excluded items in the scope. |
options.name ? | string | The name of the scope. |
Returns
Promise
<Scope
| undefined
>
The updated scope.
Findings
Finding
Finding:
object
Represents a https://docs.caido.io/reference/features/logging/findings|Finding.
Type declaration
description?
optional
description:string
The description of the finding.
host
host:
string
The host of the request attached to this finding
id
id:
ID
The ID of the finding.
path
path:
string
The path of the request attached to this finding
reporter
reporter:
string
The reporter of the finding.
title
title:
string
The title of the finding.
FindingsSDK
FindingsSDK:
object
Utilities to interact with findings
Type declaration
createFinding()
createFinding: (
requestId
:ID
,options
:object
) =>Promise
<Finding
|undefined
>
Create a Finding.
Parameters
Parameter | Type | Description |
---|---|---|
requestId | ID | The id of the request the finding is associated with. |
options | { dedupeKey : string ; description : string ; reporter : string ; title : string ; } | Options for the finding. |
options.dedupeKey ? | string | If a finding with the same deduplication key already exists, it will not create a new finding. |
options.description ? | string | The description of the finding. |
options.reporter | string | The reporter of the finding. |
options.title | string | The title of the finding. |
Returns
Promise
<Finding
| undefined
>
The created finding.
Commands
CommandContext
CommandContext:
CommandContextBase
|CommandContextRequestRow
|CommandContextRequest
|CommandContextResponse
Represents the context in which a command is executed.
CommandContextBase
CommandContextBase:
object
The base context for a command. This context is used for commands that are not executed in a specific context, such as via shortcuts and the command palette.
Type declaration
type
type:
"BaseContext"
CommandContextRequest
CommandContextRequest:
object
The context for a command that is executed on a request pane.
Type declaration
request
request:
object
The request that is currently open in the request pane. If the request has not yet been saved in the database, the id will be undefined.
request.host
host:
string
request.id
id:
ID
|undefined
request.isTls
isTls:
boolean
request.path
path:
string
request.port
port:
number
request.query
query:
string
request.raw
raw:
string
request.streamId?
optional
streamId:ID
selection
selection:
string
The currently selected text in the request pane.
type
type:
"RequestContext"
CommandContextRequestRow
CommandContextRequestRow:
object
The context for a command that is executed on a row in the request table.
Type declaration
requests
requests:
object
[]
The requests that are selected in the request table.
type
type:
"RequestRowContext"
CommandContextResponse
CommandContextResponse:
object
The context for a command that is executed on a response pane.
Type declaration
request
request:
object
The request that is associated with the response.
request.host
host:
string
request.id
id:
ID
request.isTls
isTls:
boolean
request.path
path:
string
request.port
port:
number
request.query
query:
string
request.streamId?
optional
streamId:ID
response
response:
object
The response that is currently open in the response pane.
response.id
id:
ID
response.raw
raw:
string
response.roundtripTime
roundtripTime:
number
response.statusCode
statusCode:
number
selection
selection:
string
The currently selected text in the response pane.
type
type:
"ResponseContext"
CommandsSDK
CommandsSDK:
object
Utilities to interact with commands
Type declaration
register()
register: (
id
:CommandID
,options
:object
) =>void
Register a command.
Parameters
Parameter | Type | Description |
---|---|---|
id | CommandID | The id of the command. |
options | { group : string ; name : string ; run : (context : CommandContext ) => Promise <void > | void ; when : (context : CommandContext ) => Promise <boolean > | boolean ; } | Options for the command. |
options.group ? | string | The group this command belongs to. |
options.name | string | The name of the command. |
options.run | (context : CommandContext ) => Promise <void > | void | The function to run when the command is executed. |
options.when ? | (context : CommandContext ) => Promise <boolean > | boolean | A function to determine if the command is available. |
Returns
void
Example
sdk.commands.register("hello", {
name: "Print to console.",
run: () => console.log("Hello world!"),
group: "Custom Commands",
});
Menu
MenuItem
MenuItem:
RequestRowMenuItem
|SettingsMenuItem
|RequestMenuItem
|ResponseMenuItem
A content-menu item.
MenuSDK
MenuSDK:
object
Utilities to insert menu items and context-menus throughout the UI.
Type declaration
registerItem()
registerItem: (
item
:MenuItem
) =>void
Register a menu item.
Parameters
Parameter | Type | Description |
---|---|---|
item | MenuItem | The menu item to register. |
Returns
void
Example
sdk.menu.registerItem({
type: "Request",
commandId: "hello",
leadingIcon: "fas fa-hand",
});
RequestMenuItem
RequestMenuItem:
object
A context-menu item that appears when right-clicking a request pane.
Type declaration
commandId
commandId:
CommandID
The command ID to execute when the menu item is clicked.
leadingIcon?
optional
leadingIcon:string
The icon to display to the left of the menu item.
type
type:
"Request"
RequestRowMenuItem
RequestRowMenuItem:
object
A context-menu item that appears when right-clicking a request row.
Type declaration
commandId
commandId:
CommandID
The command ID to execute when the menu item is clicked.
leadingIcon?
optional
leadingIcon:string
The icon to display to the left of the menu item.
type
type:
"RequestRow"
ResponseMenuItem
ResponseMenuItem:
object
A context-menu item that appears when right-clicking a response pane.
Type declaration
commandId
commandId:
CommandID
The command ID to execute when the menu item is
leadingIcon?
optional
leadingIcon:string
The icon to display to the left of the menu item.
type
type:
"Response"
SettingsMenuItem
SettingsMenuItem:
object
A menu item that appears in the settings menu.
Type declaration
label
label:
string
The label of the menu item.
leadingIcon?
optional
leadingIcon:Icon
The Icon to display to the left of the menu item.
path
path:
string
The path that the user will be navigated to when the menu item is clicked The path must start with "/settings/".
type
type:
"Settings"
Navigation
NavigationSDK
NavigationSDK:
object
Utilities to interact with navigation.
Type declaration
addPage()
addPage: (
path
:string
,options
:object
) =>void
Add a page to the navigation.
Parameters
Parameter | Type | Description |
---|---|---|
path | string | The path of the page. |
options | { body : HTMLElement ; onEnter : () => void ; topbar : HTMLElement ; } | Options for the page. |
options.body | HTMLElement | The body of the page. |
options.onEnter ? | () => void | The callback to execute when the page is entered. |
options.topbar ? | HTMLElement | The topbar of the page. |
Returns
void
goTo()
goTo: (
path
:string
) =>void
Navigate to a path.
Parameters
Parameter | Type | Description |
---|---|---|
path | string | The path to navigate to. |
Returns
void
Example
sdk.navigation.goTo("/my-plugin-page");
Window
WindowSDK
WindowSDK:
object
Utilities to interact with the active page.
Type declaration
getActiveEditor()
getActiveEditor: () =>
Editor
|undefined
Get the active editor.
Returns
Editor
| undefined
The active editor.
showDialog()
showDialog: (
component
:ComponentDefinition
,options
?:DialogOptions
) =>Dialog
Show a dialog component.
Parameters
Parameter | Type | Description |
---|---|---|
component | ComponentDefinition | The custom slot content to display in the dialog. |
options ? | DialogOptions | Options for the dialog. |
Returns
A dialog object that can be used to close the dialog.
showToast()
showToast: (
message
:string
,options
?:object
) =>void
Show a toast message.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | The message to show. |
options ? | { duration : number ; variant : "success" | "error" | "warning" | "info" ; } | Options for the toast message. |
options.duration ? | number | The duration of the toast message in milliseconds. |
options.variant ? | "success" | "error" | "warning" | "info" | The variant of the toast message. |
Returns
void
Storage
StorageSDK
StorageSDK:
object
Utilities to interact with frontend-plugin storage.
Type declaration
get()
get: () =>
JSONValue
Get the storage.
Returns
The storage.
onChange()
onChange: (
callback
: (value
:JSONValue
) =>void
) =>void
Subscribe to storage changes.
Parameters
Parameter | Type | Description |
---|---|---|
callback | (value : JSONValue ) => void | The callback to call when the storage changes. |
Returns
void
set()
set: <
T
>(value
:JSONCompatible
<T
>) =>Promise
<void
>
Set the storage.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
value | JSONCompatible <T > | The value to set the storage to |
Returns
Promise
<void
>
A promise that resolves when the storage has been set.
Shortcuts
ShortcutsSDK
ShortcutsSDK:
object
Utilities to interact with shortcuts.
Type declaration
register()
register: (
commandId
:CommandID
,keys
:string
[]) =>void
Register a shortcut.
Parameters
Parameter | Type | Description |
---|---|---|
commandId | CommandID | The id of the command to run when the shortcut is triggered. |
keys | string [] | The keys of the shortcut. Check out KeyboardEvent.key for the list of supported keys. |
Returns
void
Command Palette
CommandPaletteSDK
CommandPaletteSDK:
object
Utilities to interact with the command palette.
Type declaration
register()
register: (
commandId
:CommandID
) =>void
Register a command.
Parameters
Parameter | Type | Description |
---|---|---|
commandId | CommandID | The id of the command to register. |
Returns
void
Sidebar
SidebarItem
SidebarItem:
object
Represents a sidebar item.
Type declaration
setCount()
setCount: (
count
:number
) =>void
Set the value of a notification badge next to the sidebar item.
Parameters
Parameter | Type | Description |
---|---|---|
count | number | The number to display in the badge. A value of 0 will hide the badge. |
Returns
void
SidebarSDK
SidebarSDK:
object
Utilities to interact with the sidebar.
Type declaration
registerItem()
registerItem: (
name
:string
,path
:string
,options
?:object
) =>SidebarItem
Register a sidebar item.
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the sidebar item. |
path | string | The path that the user will be navigated to when the sidebar item is clicked. |
options ? | { group : string ; icon : Icon ; isExternal : boolean ; } | Options for the sidebar item. |
options.group ? | string | The group the sidebar item belongs to. |
options.icon ? | Icon | The Icon of the sidebar item. |
options.isExternal ? | boolean | Whether the path points to an external URL. |
Returns
The created sidebar item.
Example
sdk.sidebar.registerItem("My Plugin", "/my-plugin-page", {
icon: "fas fa-rocket",
});
Replay
OpenTabOptions
OpenTabOptions:
object
Options for opening a tab.
Type declaration
select?
optional
select:boolean
Whether to select the tab after opening it. Defaults to true.
ReplayCollection
ReplayCollection:
object
A collection in Replay.
Type declaration
id
id:
ID
The ID of the collection.
name
name:
string
The name of the collection.
sessionIds
sessionIds:
ID
[]
The sessions in the collection.
ReplaySDK
ReplaySDK:
object
Utilities to interact with Replay.
Type declaration
addRequestEditorExtension()
addRequestEditorExtension: (
extension
:Extension
) =>void
Add an extension to the request editor.
Parameters
Parameter | Type | Description |
---|---|---|
extension | Extension | The extension to add. |
Returns
void
addToSlot
addToSlot:
DefineAddToSlotFn
<ReplaySlotContent
>
Add a component to a slot.
Param
The slot to add the component to.
Param
The content to add to the slot.
Example
addToSlot(ReplaySlot.SessionToolbarPrimary, {
kind: "Command",
commandId: "my-command",
icon: "my-icon",
});
addToSlot(ReplaySlot.SessionToolbarSecondary, {
kind: "Custom",
component: MyComponent,
});
addToSlot(ReplaySlot.Topbar, {
kind: "Button",
label: "My Button",
icon: "my-icon",
onClick: () => {
console.log("Button clicked");
},
});
closeTab()
closeTab: (
sessionId
:ID
) =>void
Close a replay tab for the given session.
Parameters
Parameter | Type | Description |
---|---|---|
sessionId | ID | The ID of the session to close. |
Returns
void
createCollection()
createCollection: (
name
:string
) =>Promise
<ReplayCollection
>
Create a new collection.
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the collection to create. |
Returns
Promise
<ReplayCollection
>
deleteCollection()
deleteCollection: (
id
:ID
) =>Promise
<boolean
>
Delete a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the collection to delete. |
Returns
Promise
<boolean
>
Whether the collection was deleted.
deleteSessions()
Delete a session.
Parameters
Parameter | Type | Description |
---|---|---|
sessionIds | ID [] | The IDs of the sessions to delete. |
Returns
Promise
<ID
[]>
getCollections()
getCollections: () =>
ReplayCollection
[]
Get the list of all replay collections.
Returns
The list of all replay collections.
getSessions()
getSessions: () =>
ReplaySession
[]
Get the list of all replay sessions.
Returns
The list of all replay sessions.
getTabs()
getTabs: () =>
ReplayTab
[]
Get the list of all open replay tabs.
Returns
The list of all open replay tabs.
moveSession()
moveSession: (
sessionId
:ID
,collectionId
:ID
) =>Promise
<ReplaySession
>
Move a session to a different collection.
Parameters
Parameter | Type | Description |
---|---|---|
sessionId | ID | The ID of the session to move. |
collectionId | ID | The ID of the collection to move the session to. |
Returns
Promise
<ReplaySession
>
The updated session.
openTab()
openTab: (
sessionId
:ID
,options
?:OpenTabOptions
) =>void
Open a replay tab for the given session.
Parameters
Parameter | Type | Description |
---|---|---|
sessionId | ID | The ID of the session to open. |
options ? | OpenTabOptions | The options for opening the tab. |
Returns
void
renameCollection()
renameCollection: (
id
:ID
,name
:string
) =>Promise
<ReplayCollection
>
Rename a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the collection to rename. |
name | string | The new name of the collection. |
Returns
Promise
<ReplayCollection
>
The updated collection.
renameSession()
renameSession: (
id
:ID
,name
:string
) =>Promise
<ReplaySession
>
Rename a session.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the session to rename. |
name | string | The new name of the session. |
Returns
Promise
<ReplaySession
>
The updated session.
sendRequest()
sendRequest: (
sessionId
:ID
,options
:SendRequestOptions
) =>Promise
<void
>
Send a request to the Replay backend.
Parameters
Parameter | Type | Description |
---|---|---|
sessionId | ID | - |
options | SendRequestOptions | The options for sending the request. |
Returns
Promise
<void
>
Example
sendRequest(sessionId, {
connectionInfo: {
SNI: "example.com",
host: "example.com",
isTLS: true,
port: 443,
},
raw: "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n",
updateContentLength: false,
});
ReplaySession
ReplaySession:
object
A session in Replay.
Type declaration
collectionId
collectionId:
ID
The ID of the collection the session belongs to.
id
id:
ID
The ID of the session.
name
name:
string
The name of the session.
ReplayTab
ReplayTab:
object
A replay tab.
Type declaration
sessionId
sessionId:
ID
The ID of the session associated with this tab.
SendRequestOptions
SendRequestOptions:
object
Options for sending a request.
Type declaration
background?
optional
background:boolean
Whether to send the request in the background without updating the UI. If true, the request will not update the UI. If false, the UI will be updated to display the session and the new request. Defaults to false.
connectionInfo
connectionInfo:
object
The connection information to use for the request.
connectionInfo.host
host:
string
The host to use for the request.
connectionInfo.isTLS
isTLS:
boolean
Whether the request is TLS.
connectionInfo.port
port:
number
The port to use for the request.
connectionInfo.SNI?
optional
SNI:string
The SNI to use for the request. If not provided, the SNI will be inferred from the host.
overwriteDraft?
optional
overwriteDraft:boolean
Whether to overwrite the editor's draft content. If true, draft content will be overwritten with the new request. If false, the draft will be kept. Defaults to true.
raw
raw:
string
The raw request to send.
updateContentLength?
optional
updateContentLength:boolean
Whether to update the content length automatically to match the body. Defaults to true.
ReplaySlot
const
ReplaySlot:object
The slots in the Replay UI.
Type declaration
SessionToolbarPrimary
readonly
SessionToolbarPrimary:"session-toolbar-primary"
The left side of the session toolbar.
SessionToolbarSecondary
readonly
SessionToolbarSecondary:"session-toolbar-secondary"
The right side of the session toolbar.
Topbar
readonly
Topbar:"topbar"
The left side of the topbar.
HTTP History
HTTPHistorySDK
HTTPHistorySDK:
object
Utilities to interact with the HTTP History page.
Type declaration
addRequestEditorExtension()
addRequestEditorExtension: (
extension
:Extension
) =>void
Add an extension to the request editor.
Parameters
Parameter | Type | Description |
---|---|---|
extension | Extension | The extension to add. |
Returns
void
addRequestViewMode()
addRequestViewMode: (
options
:RequestViewModeOptions
) =>void
Add a custom request view mode.
Parameters
Parameter | Type | Description |
---|---|---|
options | RequestViewModeOptions | The view mode options. |
Returns
void
addResponseEditorExtension()
addResponseEditorExtension: (
extension
:Extension
) =>void
Add an extension to the response editor.
Parameters
Parameter | Type | Description |
---|---|---|
extension | Extension | The extension to add. |
Returns
void
getQuery()
getQuery: () =>
HTTPQL
Get the current HTTPQL query.
Returns
The current HTTPQL query.
getScopeId()
getScopeId: () =>
ID
|undefined
Get the current scope ID.
Returns
ID
| undefined
The current scope ID.
setQuery()
setQuery: (
query
:HTTPQL
) =>void
Set the HTTPQL query that will be applied on the HTTP History table results.
Parameters
Parameter | Type | Description |
---|---|---|
query | HTTPQL | The HTTPQL query. |
Returns
void
setScope()
setScope: (
id
:ID
|undefined
) =>Promise
<void
>
Set the current scope.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | undefined | The ID of the scope to set. |
Returns
Promise
<void
>
Search
SearchSDK
SearchSDK:
object
Utilities to interact with the Search page.
Type declaration
getQuery()
getQuery: () =>
HTTPQL
Get the current HTTPQL query.
Returns
The current HTTPQL query.
getScopeId()
getScopeId: () =>
ID
|undefined
Get the current scope ID.
Returns
ID
| undefined
The current scope ID.
setQuery()
setQuery: (
query
:HTTPQL
) =>void
Set the HTTPQL query that will be applied on the search table results.
Parameters
Parameter | Type | Description |
---|---|---|
query | HTTPQL | The HTTPQL query. |
Returns
void
setScope()
setScope: (
id
:ID
|undefined
) =>Promise
<void
>
Set the current scope.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | undefined | The ID of the scope to set. |
Returns
Promise
<void
>
Files
Asset
Asset:
object
A static asset.
Type declaration
asArrayBuffer()
asArrayBuffer: () =>
Promise
<ArrayBuffer
>
Returns
Promise
<ArrayBuffer
>
asJson()
asJson: <
T
>() =>Promise
<T
>
Type Parameters
Type Parameter | Default type |
---|---|
T | unknown |
Returns
Promise
<T
>
asReadableStream()
asReadableStream: () =>
ReadableStream
Returns
ReadableStream
asString()
asString: () =>
Promise
<string
>
Returns
Promise
<string
>
AssetsSDK
AssetsSDK:
object
Utilities to interact with the plugin's static assets.
Type declaration
get()
get: (
path
:string
) =>Promise
<Asset
>
Get a file from the assets folder.
Parameters
Parameter | Type |
---|---|
path | string |
Returns
Promise
<Asset
>
The asset file.
FilesSDK
FilesSDK:
object
SDK for interacting with the Files page.
Type declaration
create()
create: (
file
:File
) =>Promise
<HostedFile
>
Uploads a file to the host.
Parameters
Parameter | Type | Description |
---|---|---|
file | File | The file to upload. |
Returns
Promise
<HostedFile
>
The uploaded file.
delete()
delete: (
id
:string
) =>Promise
<void
>
Deletes a file from the host.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The ID of the file to delete. |
Returns
Promise
<void
>
The deleted file.
getAll()
getAll: () =>
HostedFile
[]
Gets all hosted files.
Returns
The files.
rename()
rename: (
id
:string
,name
:string
) =>Promise
<HostedFile
>
Renames a file on the host.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The ID of the file to rename. |
name | string | The new name of the file. |
Returns
Promise
<HostedFile
>
The renamed file.
HostedFile
HostedFile:
object
A hosted file.
Type declaration
createdAt
createdAt:
Date
The date the file was created.
id
id:
string
The ID of the file.
name
name:
string
The name of the file.
path
path:
string
The path of the file.
size
size:
number
The size of the file in bytes.
updatedAt
updatedAt:
Date
The date the file was updated.
Environment
EnvironmentSDK
EnvironmentSDK:
object
Utilities to interact with the environment.
Type declaration
getVar()
getVar: (
name
:string
) =>string
|undefined
Get the value of an environment variable.
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the environment variable. |
Returns
string
| undefined
The value of the environment variable.
getVars()
getVars: () =>
EnvironmentVariable
[]
Get all environment variables available in the global environment and the selected environment.
Returns
All environment variables.
Filters
Filter
Filter:
object
Represents a filter.
Type declaration
alias
alias:
string
The alias of the filter. This alias is used when referencing the filter in an HTTPQL query (e.g. preset:my-alias
).
id
id:
ID
The ID of the filter.
name
name:
string
The name of the filter.
query
query:
HTTPQL
The HTTPQL expression of the filter.
FiltersSDK
FiltersSDK:
object
SDK for interacting with the Filters page.
Type declaration
create()
create: (
options
:object
) =>Promise
<Filter
>
Creates a filter.
Parameters
Parameter | Type | Description |
---|---|---|
options | { alias : string ; name : string ; query : HTTPQL ; } | Options for the filter. |
options.alias | string | The alias of the filter. Used when referencing the filter in an HTTPQL query (e.g. preset:my-alias ). Should be unique and follow the format [a-zA-Z0-9_-]+ . |
options.name | string | The name of the filter. Should be unique. |
options.query | HTTPQL | The HTTPQL query of the filter. |
Returns
Promise
<Filter
>
The created filter.
delete()
delete: (
id
:ID
) =>Promise
<void
>
Deletes a filter.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the filter to delete. |
Returns
Promise
<void
>
getAll()
getAll: () =>
Filter
[]
Gets all filters.
Returns
Filter
[]
The filters.
update()
Updates a filter.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the filter to update. |
options | { alias : string ; name : string ; query : HTTPQL ; } | Options for the filter. |
options.alias | string | The alias of the filter. |
options.name | string | The name of the filter. |
options.query | HTTPQL | The HTTPQL query of the filter. |
Returns
Promise
<Filter
>
The updated filter.
Footer
FooterSDK
FooterSDK:
object
Utilities to interact with the footer.
Type declaration
addToSlot
addToSlot:
DefineAddToSlotFn
<FooterSlotContent
>
Add a component to a slot.
Param
The slot to add the component to.
Param
The content to add to the slot.
Example
addToSlot(FooterSlot.FooterSlotPrimary, {
kind: "Command",
commandId: "my-command",
icon: "my-icon",
});
addToSlot(FooterSlot.FooterSlotPrimary, {
kind: "Button",
label: "My button",
icon: "fas fa-rocket",
onClick: () => {
console.log("Button clicked");
},
});
addToSlot(FooterSlot.FooterSlotSecondary, {
kind: "Custom",
component: MyComponent,
});
Intercept
InterceptSDK
InterceptSDK:
object
Utilities to interact with the Intercept page.
Type declaration
getScopeId()
getScopeId: () =>
ID
|undefined
Get the current scope ID.
Returns
ID
| undefined
The current scope ID.
setScope()
setScope: (
id
:ID
|undefined
) =>void
Set the current scope.
Parameters
Parameter | Type |
---|---|
id | ID | undefined |
Returns
void
Match and Replace
MatchReplaceCollection
MatchReplaceCollection:
object
A collection in Match and Replace.
Type declaration
id
id:
ID
name
name:
string
ruleIds
ruleIds:
ID
[]
MatchReplaceMatcherRaw
MatchReplaceMatcherRaw:
MatchReplaceMatcherRawRegex
|MatchReplaceMatcherRawValue
|MatchReplaceMatcherRawFull
A matcher for raw operations in Match and Replace.
MatchReplaceMatcherRawFull
MatchReplaceMatcherRawFull:
object
This matcher will match the entire section.
Type declaration
kind
kind:
"MatcherRawFull"
MatchReplaceMatcherRawRegex
MatchReplaceMatcherRawRegex:
object
This matcher will match using a regex over the section.
Type declaration
kind
kind:
"MatcherRawRegex"
regex
regex:
string
MatchReplaceMatcherRawValue
MatchReplaceMatcherRawValue:
object
This matcher will match the value if present in the section.
Type declaration
kind
kind:
"MatcherRawValue"
value
value:
string
MatchReplaceOperationBody
MatchReplaceOperationBody:
KeepOperation
<MatchReplaceOperationBodyRaw
>
An operation for the body section.
MatchReplaceOperationBodyRaw
MatchReplaceOperationBodyRaw:
object
A raw operation for the body section.
Type declaration
kind
kind:
"OperationBodyRaw"
matcher
matcher:
MatchReplaceMatcherRaw
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationFirstLineRaw
MatchReplaceOperationFirstLineRaw:
object
A raw operation for the request first line.
Type declaration
kind
kind:
"OperationFirstLineRaw"
matcher
matcher:
MatchReplaceMatcherRaw
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationHeader
MatchReplaceOperationHeader:
MatchReplaceOperationHeaderRaw
|MatchReplaceOperationHeaderAdd
|MatchReplaceOperationHeaderRemove
|MatchReplaceOperationHeaderUpdate
An operation for the header section.
MatchReplaceReplacer
MatchReplaceReplacer:
MatchReplaceReplacerTerm
|MatchReplaceReplacerWorkflow
A replacer in Match and Replace.
MatchReplaceReplacerTerm
MatchReplaceReplacerTerm:
object
A replacer that replaces with a term. If the matcher is a regex, groups will be interpolated.
Type declaration
kind
kind:
"ReplacerTerm"
term
term:
string
MatchReplaceReplacerWorkflow
MatchReplaceReplacerWorkflow:
object
A replacer that replaces with the result of a workflow. The input of the workflow depends on the operation and matcher.
Type declaration
kind
kind:
"ReplacerWorkflow"
workflowId
workflowId:
ID
MatchReplaceRule
MatchReplaceRule:
object
A rule in Match and Replace.
Type declaration
collectionId
collectionId:
ID
The ID of the collection the rule belongs to.
id
id:
ID
The ID of the rule.
isEnabled
isEnabled:
boolean
Whether the rule is enabled.
name
name:
string
The name of the rule.
query
query:
HTTPQL
The HTTPQL query to match the rule against. Only requests that match the query will be affected by the rule.
section
section:
MatchReplaceSection
The section of the rule.
MatchReplaceSDK
MatchReplaceSDK:
object
Utilities to interact with the Match and Replace page.
Type declaration
createCollection()
createCollection: (
options
:object
) =>Promise
<MatchReplaceCollection
>
Create a collection.
Parameters
Parameter | Type | Description |
---|---|---|
options | { name : string ; } | The options for the collection. |
options.name | string | The name of the collection. |
Returns
Promise
<MatchReplaceCollection
>
createRule()
createRule: (
options
:object
) =>Promise
<MatchReplaceRule
>
Create a rule.
Parameters
Parameter | Type | Description |
---|---|---|
options | { collectionId : ID ; name : string ; query : HTTPQL ; section : MatchReplaceSection ; } | The options for the rule. |
options.collectionId | ID | The ID of the collection the rule belongs to. |
options.name | string | The name of the rule. |
options.query | HTTPQL | The HTTPQL query to match the rule against. |
options.section | MatchReplaceSection | - |
Returns
Promise
<MatchReplaceRule
>
deleteCollection()
deleteCollection: (
id
:ID
) =>Promise
<void
>
Delete a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the collection. |
Returns
Promise
<void
>
deleteRule()
deleteRule: (
id
:ID
) =>Promise
<void
>
Delete a rule.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the rule. |
Returns
Promise
<void
>
getActiveRules()
getActiveRules: () =>
MatchReplaceRule
[]
Get all active rules. Rules are ordered in priority from highest to lowest.
Returns
All active rules.
getCollections()
getCollections: () =>
MatchReplaceCollection
[]
Get all collections.
Returns
getRules()
getRules: () =>
MatchReplaceRule
[]
Get all rules.
Returns
All rules.
selectRule()
selectRule: (
id
:ID
|undefined
) =>void
Select a rule to be displayed in the UI.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | undefined | The ID of the rule, or undefined to clear the selection. |
Returns
void
toggleRule()
toggleRule: (
id
:ID
,enabled
:boolean
) =>Promise
<void
>
Toggle a rule.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the rule. |
enabled | boolean | Whether the rule should be enabled. |
Returns
Promise
<void
>
updateCollection()
updateCollection: (
id
:ID
,options
:object
) =>Promise
<MatchReplaceCollection
>
Update a collection.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the collection. |
options | { name : string ; } | The new values for the collection. |
options.name | string | The new name of the collection. |
Returns
Promise
<MatchReplaceCollection
>
updateRule()
updateRule: (
id
:ID
,options
:object
) =>Promise
<MatchReplaceRule
>
Update a rule.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the rule. |
options | { name : string ; query : HTTPQL ; section : MatchReplaceSection ; } | The new values for the rule. |
options.name | string | The new name of the rule. |
options.query ? | HTTPQL | The new HTTPQL query of the rule. |
options.section | MatchReplaceSection | The new section of the rule. |
Returns
Promise
<MatchReplaceRule
>
MatchReplaceSectionRequestFirstLine
MatchReplaceSectionRequestFirstLine:
object
A section for the request first line.
Type declaration
kind
kind:
"SectionRequestFirstLine"
operation
operation:
MatchReplaceOperationFirstLine
MatchReplaceSectionResponseFirstLine
MatchReplaceSectionResponseFirstLine:
object
A section for the response first line.
Type declaration
kind
kind:
"SectionResponseFirstLine"
operation
operation:
MatchReplaceOperationFirstLine
Other
ButtonSlotContent
ButtonSlotContent:
DefineSlotContent
<"Button"
, {icon
:string
;label
:string
;onClick
: () =>void
; }>
CommandID
CommandID:
string
&object
A unique command identifier.
Type declaration
__commandId?
optional
__commandId:never
Example
"my-super-command"
CommandSlotContent
CommandSlotContent:
DefineSlotContent
<"Command"
, {commandId
:CommandID
;icon
:string
; }>
ComponentDefinition
ComponentDefinition:
object
A custom component that will be rendered in the UI.
Type declaration
component
component:
VueComponent
events?
optional
events:Record
<string
, (...args
:unknown
[]) =>void
>
props?
optional
props:Record
<string
,unknown
>
CustomSlotContent
CustomSlotContent:
DefineSlotContent
<"Custom"
, {definition
:ComponentDefinition
; }>
DefineAddToSlotFn()<TMap>
DefineAddToSlotFn<
TMap
>: <K
>(slot
:K
,spec
:TMap
[K
]) =>void
Type Parameters
Type Parameter |
---|
TMap extends Record <string , DefineSlotContent <string , Record <string , unknown >>> |
Type Parameters
Type Parameter |
---|
K extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
slot | K |
spec | TMap [K ] |
Returns
void
DefineSlotContent<TType, P>
DefineSlotContent<
TType
,P
>:object
&P
Type declaration
type
type:
TType
Type Parameters
Type Parameter |
---|
TType extends string |
P extends Record <string , unknown > |
Dialog
Dialog:
object
Type declaration
close()
close: () =>
void
Returns
void
DialogOptions
DialogOptions:
object
Type declaration
closable?
optional
closable:boolean
closeOnEscape?
optional
closeOnEscape:boolean
draggable?
optional
draggable:boolean
modal?
optional
modal:boolean
position?
optional
position:"left"
|"right"
|"top"
|"bottom"
|"center"
|"topleft"
|"topright"
|"bottomleft"
|"bottomright"
title?
optional
title:string
Editor
Editor:
object
Generic editor interface.
Type declaration
focus()
focus: () =>
void
Focus the editor.
Returns
void
getEditorView()
getEditorView: () =>
EditorView
Get the editor view.
Returns
EditorView
The CodeMirror EditorView.
getSelectedText()
getSelectedText: () =>
string
Get the currently selected text of the editor.
Returns
string
isReadOnly()
isReadOnly: () =>
boolean
Check whether the editor is read-only.
Returns
boolean
Whether the editor is read-only.
replaceSelectedText()
replaceSelectedText: (
text
:string
) =>void
Replace the currently selected text of the editor.
Parameters
Parameter | Type | Description |
---|---|---|
text | string | The text to replace the selection with. |
Returns
void
EnvironmentVariable
EnvironmentVariable:
object
Type declaration
isSecret
isSecret:
boolean
Whether the environment variable is a secret.
name
name:
string
The name of the environment variable.
value
value:
string
The value of the environment variable.
FooterSlot
FooterSlot: typeof
FooterSlot
[keyof typeofFooterSlot
]
FooterSlotContent
FooterSlotContent:
object
Type declaration
footer-primary
footer-primary:
ButtonSlotContent
|CustomSlotContent
|CommandSlotContent
footer-secondary
footer-secondary:
ButtonSlotContent
|CustomSlotContent
|CommandSlotContent
HTTPQL
HTTPQL:
string
&object
An HTTPQL expression.
Type declaration
__httpql?
optional
__httpql:never
Example
`req.method.eq:"POST"`
HTTPRequestEditor
HTTPRequestEditor:
object
Type declaration
getEditorView()
getEditorView: () =>
EditorView
Get the editor view.
Returns
EditorView
The CodeMirror EditorView.
getElement()
getElement: () =>
HTMLElement
Get the editor element. Append this to your DOM to display the editor.
Returns
HTMLElement
The editor element.
HTTPResponseEditor
HTTPResponseEditor:
object
Type declaration
getEditorView()
getEditorView: () =>
EditorView
Get the editor view.
Returns
EditorView
The CodeMirror EditorView.
getElement()
getElement: () =>
HTMLElement
Get the editor element. Append this to your DOM to display the editor.
Returns
HTMLElement
The editor element.
Icon
Icon:
string
&object
A https://fontawesome.com/icons|FontAwesome icon class.
Type declaration
__icon?
optional
__icon:never
Example
"fas fa-rocket"
ID
ID:
string
&object
A unique Caido identifier per type.
Type declaration
__id?
optional
__id:never
JSONCompatible<T>
JSONCompatible<
T
>:unknown
extendsT
?never
:{ [P in keyof T]: T[P] extends JSONValue ? T[P] : T[P] extends NotAssignableToJson ? never : JSONCompatible<T[P]> }
Type Parameters
Type Parameter |
---|
T |
JSONPrimitive
JSONPrimitive:
string
|number
|boolean
|null
|undefined
JSONValue
JSONValue:
JSONPrimitive
|JSONValue
[] | {}
KeepOperation<T>
KeepOperation<
T
>:T
&object
Type declaration
__operation?
optional
__operation:never
Type Parameters
Type Parameter |
---|
T |
ListenerHandle
ListenerHandle:
object
A handle for a listener.
Type declaration
stop()
stop: () =>
void
Stop the listener.
Returns
void
MatchReplaceMatcherName
MatchReplaceMatcherName:
object
Type declaration
kind
kind:
"MatcherName"
name
name:
string
MatchReplaceOperationFirstLine
MatchReplaceOperationFirstLine:
KeepOperation
<MatchReplaceOperationFirstLineRaw
>
MatchReplaceOperationHeaderAdd
MatchReplaceOperationHeaderAdd:
object
Type declaration
kind
kind:
"OperationHeaderAdd"
matcher
matcher:
MatchReplaceMatcherName
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationHeaderRaw
MatchReplaceOperationHeaderRaw:
object
Type declaration
kind
kind:
"OperationHeaderRaw"
matcher
matcher:
MatchReplaceMatcherRaw
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationHeaderRemove
MatchReplaceOperationHeaderRemove:
object
Type declaration
kind
kind:
"OperationHeaderRemove"
matcher
matcher:
MatchReplaceMatcherName
MatchReplaceOperationHeaderUpdate
MatchReplaceOperationHeaderUpdate:
object
Type declaration
kind
kind:
"OperationHeaderUpdate"
matcher
matcher:
MatchReplaceMatcherName
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationMethod
MatchReplaceOperationMethod:
KeepOperation
<MatchReplaceOperationMethodUpdate
>
MatchReplaceOperationMethodUpdate
MatchReplaceOperationMethodUpdate:
object
Type declaration
kind
kind:
"OperationMethodUpdate"
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationPath
MatchReplaceOperationPath:
KeepOperation
<MatchReplaceOperationPathRaw
>
MatchReplaceOperationPathRaw
MatchReplaceOperationPathRaw:
object
Type declaration
kind
kind:
"OperationPathRaw"
matcher
matcher:
MatchReplaceMatcherRaw
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationQuery
MatchReplaceOperationQuery:
MatchReplaceOperationQueryRaw
|MatchReplaceOperationQueryAdd
|MatchReplaceOperationQueryRemove
|MatchReplaceOperationQueryUpdate
MatchReplaceOperationQueryAdd
MatchReplaceOperationQueryAdd:
object
Type declaration
kind
kind:
"OperationQueryAdd"
matcher
matcher:
MatchReplaceMatcherName
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationQueryRaw
MatchReplaceOperationQueryRaw:
object
Type declaration
kind
kind:
"OperationQueryRaw"
matcher
matcher:
MatchReplaceMatcherRaw
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationQueryRemove
MatchReplaceOperationQueryRemove:
object
Type declaration
kind
kind:
"OperationQueryRemove"
matcher
matcher:
MatchReplaceMatcherName
MatchReplaceOperationQueryUpdate
MatchReplaceOperationQueryUpdate:
object
Type declaration
kind
kind:
"OperationQueryUpdate"
matcher
matcher:
MatchReplaceMatcherName
replacer
replacer:
MatchReplaceReplacer
MatchReplaceOperationStatusCode
MatchReplaceOperationStatusCode:
KeepOperation
<MatchReplaceOperationStatusCodeUpdate
>
MatchReplaceOperationStatusCodeUpdate
MatchReplaceOperationStatusCodeUpdate:
object
Type declaration
kind
kind:
"OperationStatusCodeUpdate"
replacer
replacer:
MatchReplaceReplacer
MatchReplaceSection
MatchReplaceSection:
MatchReplaceSectionRequestBody
|MatchReplaceSectionRequestFirstLine
|MatchReplaceSectionRequestHeader
|MatchReplaceSectionRequestMethod
|MatchReplaceSectionRequestPath
|MatchReplaceSectionRequestQuery
|MatchReplaceSectionResponseBody
|MatchReplaceSectionResponseFirstLine
|MatchReplaceSectionResponseHeader
|MatchReplaceSectionResponseStatusCode
MatchReplaceSectionRequestBody
MatchReplaceSectionRequestBody:
object
Type declaration
kind
kind:
"SectionRequestBody"
operation
operation:
MatchReplaceOperationBody
MatchReplaceSectionRequestHeader
MatchReplaceSectionRequestHeader:
object
Type declaration
kind
kind:
"SectionRequestHeader"
operation
operation:
MatchReplaceOperationHeader
MatchReplaceSectionRequestMethod
MatchReplaceSectionRequestMethod:
object
Type declaration
kind
kind:
"SectionRequestMethod"
operation
operation:
MatchReplaceOperationMethod
MatchReplaceSectionRequestPath
MatchReplaceSectionRequestPath:
object
Type declaration
kind
kind:
"SectionRequestPath"
operation
operation:
MatchReplaceOperationPath
MatchReplaceSectionRequestQuery
MatchReplaceSectionRequestQuery:
object
Type declaration
kind
kind:
"SectionRequestQuery"
operation
operation:
MatchReplaceOperationQuery
MatchReplaceSectionResponseBody
MatchReplaceSectionResponseBody:
object
Type declaration
kind
kind:
"SectionResponseBody"
operation
operation:
MatchReplaceOperationBody
MatchReplaceSectionResponseHeader
MatchReplaceSectionResponseHeader:
object
Type declaration
kind
kind:
"SectionResponseHeader"
operation
operation:
MatchReplaceOperationHeader
MatchReplaceSectionResponseStatusCode
MatchReplaceSectionResponseStatusCode:
object
Type declaration
kind
kind:
"SectionResponseStatusCode"
operation
operation:
MatchReplaceOperationStatusCode
NotAssignableToJson
NotAssignableToJson:
bigint
|symbol
|Function
OnCreatedWorkflowCallback()
OnCreatedWorkflowCallback: (
event
:object
) =>void
Parameters
Parameter | Type |
---|---|
event | { workflow : Workflow ; } |
event.workflow | Workflow |
Returns
void
OnDeletedWorkflowCallback()
OnDeletedWorkflowCallback: (
event
:object
) =>void
Parameters
Parameter | Type |
---|---|
event | { id : ID ; } |
event.id | ID |
Returns
void
OnUpdatedWorkflowCallback()
OnUpdatedWorkflowCallback: (
event
:object
) =>void
Parameters
Parameter | Type |
---|---|
event | { workflow : Workflow ; } |
event.workflow | Workflow |
Returns
void
PromisifiedReturnType<T>
PromisifiedReturnType<
T
>:ReturnType
<T
> extendsPromise
<infer U> ?Promise
<U
> :Promise
<ReturnType
<T
>>
Type Parameters
Type Parameter |
---|
T extends (...args : unknown []) => unknown |
ReplaySlot
ReplaySlot: typeof
ReplaySlot
[keyof typeofReplaySlot
]
ReplaySlotContent
ReplaySlotContent:
object
Type declaration
session-toolbar-primary
session-toolbar-primary:
ButtonSlotContent
|CustomSlotContent
|CommandSlotContent
session-toolbar-secondary
session-toolbar-secondary:
ButtonSlotContent
|CustomSlotContent
|CommandSlotContent
topbar
topbar:
ButtonSlotContent
|CustomSlotContent
|CommandSlotContent
RequestViewModeOptions
RequestViewModeOptions:
object
Type declaration
label
label:
string
The label of the view mode.
view
view:
ComponentDefinition
The component to render when the view mode is selected.
SlotContent
SlotContent:
ButtonSlotContent
|CustomSlotContent
|CommandSlotContent
FooterSlot
const
FooterSlot:object
Type declaration
FooterSlotPrimary
readonly
FooterSlotPrimary:"footer-primary"
FooterSlotSecondary
readonly
FooterSlotSecondary:"footer-secondary"
API
Renames and re-exports Caido
Runtime
RuntimeSDK
RuntimeSDK:
object
Utilities to interact with the runtime.
Type declaration
version
Get Signature
get version():
string
Get the current version of Caido.
Returns
string
Sitemap
SitemapSDK
SitemapSDK:
object
Utilities to interact with the Sitemap page.
Type declaration
getScopeId()
getScopeId: () =>
ID
|undefined
Get the current scope ID.
Returns
ID
| undefined
The current scope ID.
setScope()
setScope: (
id
:ID
|undefined
) =>void
Set the current scope.
Parameters
Parameter | Type | Description |
---|---|---|
id | ID | undefined | The ID of the scope to set. |
Returns
void
Workflows
Workflow
Workflow:
object
A workflow
Type declaration
description
description:
string
id
id:
string
kind
kind:
WorkflowKind
name
name:
string
WorkflowKind
WorkflowKind:
"Convert"
|"Active"
|"Passive"
The kind of workflow.
WorkflowSDK
WorkflowSDK:
object
Utilities to interact with workflows.
Type declaration
getWorkflows()
getWorkflows: () =>
Workflow
[]
Get all workflows.
Returns
Workflow
[]
All workflows.
onCreatedWorkflow()
onCreatedWorkflow: (
callback
:OnCreatedWorkflowCallback
) =>ListenerHandle
Register a callback to be called when a workflow is created.
Parameters
Parameter | Type | Description |
---|---|---|
callback | OnCreatedWorkflowCallback | The callback to be called. |
Returns
onDeletedWorkflow()
onDeletedWorkflow: (
callback
:OnDeletedWorkflowCallback
) =>ListenerHandle
Register a callback to be called when a workflow is deleted.
Parameters
Parameter | Type | Description |
---|---|---|
callback | OnDeletedWorkflowCallback | The callback to be called. |
Returns
onUpdatedWorkflow()
onUpdatedWorkflow: (
callback
:OnUpdatedWorkflowCallback
) =>ListenerHandle
Register a callback to be called when a workflow is updated.
Parameters
Parameter | Type | Description |
---|---|---|
callback | OnUpdatedWorkflowCallback | The callback to be called. |