Skip to content

Automate

AutomateEntry

AutomateEntry = object

A automate entry.

Properties

createdAt

createdAt: Date

The date the entry was created.

id

id: ID

The ID of the entry.

name

name: string

The name of the entry.


AutomatePageContext

AutomatePageContext = object

Automate page context.

Properties

kind

kind: "Automate"

requestSelection

requestSelection: Selection<ID>

selection

selection: Selection<{ id: ID; kind: "AutomateSession"; } | { id: ID; kind: "AutomateEntry"; }>


AutomateSDK

AutomateSDK = object

Utilities to interact with the Automate page.

Properties

addEntryIndicator()

addEntryIndicator: (entryId: ID, indicator: AddIndicatorOptions) => Indicator

Add an indicator to an automate entry. Indicators are displayed next to the entry name in the collections tree.

Parameters
ParameterTypeDescription
entryIdIDThe ID of the entry to add the indicator to.
indicatorAddIndicatorOptionsThe indicator configuration.
Returns

Indicator

A handle object with a remove method to remove the indicator.

Example
ts
const indicator = sdk.automate.addEntryIndicator(entryId, {
  icon: "fas fa-exclamation-triangle",
  description: "Security warning",
});

// Later, remove the indicator
indicator.remove();
addRequestEditorExtension()

addRequestEditorExtension: (extension: Extension) => void

Add an extension to the request editor.

Parameters
ParameterTypeDescription
extensionExtensionThe extension to add.
Returns

void

addRequestViewMode()

addRequestViewMode: (options: RequestViewModeOptions) => void

Add a custom request view mode.

Parameters
ParameterTypeDescription
optionsRequestViewModeOptionsThe view mode options.
Returns

void

addResponseViewMode()

addResponseViewMode: (options: ResponseViewModeOptions) => void

Add a custom response view mode.

Parameters
ParameterTypeDescription
optionsResponseViewModeOptionsThe view mode options.
Returns

void

getEntries()

getEntries: (sessionId: ID) => AutomateEntry[]

Get the list of all automate entries.

Parameters
ParameterTypeDescription
sessionIdIDThe ID of the session to get the entries of.
Returns

AutomateEntry[]

The list of all automate entries.

getSessions()

getSessions: () => AutomateSession[]

Get the list of all automate sessions.

Returns

AutomateSession[]

The list of all automate sessions.


AutomateSession

AutomateSession = object

A automate session.

Properties

createdAt

createdAt: Date

The date the session was created.

entryIds

entryIds: ID[]

The IDs of all entries in this session.

id

id: ID

The ID of the session.

name

name: string

The name of the session.