Skip to content

Sitemap ​

SitemapEntry ​

SitemapEntry = object

An entry in sitemap.

Properties ​

childState ​

childState: ChildState

The child state of the entry.

id ​

id: ID

The ID of the entry.

kind ​

kind: SitemapEntryKind

The kind of the entry.

label ​

label: string

The label of the entry.

parentId? ​

optional parentId: ID

The ID of the parent entry.


SitemapEntryChildStateUpdateEvent ​

SitemapEntryChildStateUpdateEvent = object

Event fired when the child state of a sitemap entry changes.

Properties ​

entryId ​

entryId: ID

The ID of the entry that changed.

newChildState ​

newChildState: ChildState

The new child state of the entry.


SitemapEntryKind ​

SitemapEntryKind = typeof SitemapEntryKind[keyof typeof SitemapEntryKind]

The kind of a sitemap entry.

Example ​

ts
const entry = {
  id: "123",
  label: "Example",
  kind: SitemapEntryKind.Request,
};

SitemapPageContext ​

SitemapPageContext = object

Sitemap page context.

Properties ​

entrySelection ​

entrySelection: Selection<ID>

kind ​

kind: "Sitemap"

requestSelection ​

requestSelection: Selection<ID>


SitemapSDK ​

SitemapSDK = object

Utilities to interact with the Sitemap page.

Properties ​

addEntryIndicator() ​

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

Add an indicator to a sitemap session. 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.sitemap.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

getChildren() ​

getChildren: (entryId: ID) => Promise<SitemapEntry[]>

Load children for a sitemap entry. This will fetch and load children if they haven't been loaded yet.

Parameters ​
ParameterTypeDescription
entryIdIDThe ID of the entry to load children for.
Returns ​

Promise<SitemapEntry[]>

Promise that resolves when children are loaded.

getScopeId() ​

getScopeId: () => ID | undefined

Get the current scope ID.

Returns ​

ID | undefined

The current scope ID.

getTreeEntries() ​

getTreeEntries: () => SitemapRootEntry[]

Get the list of all sitemap entries in tree format.

Returns ​

SitemapRootEntry[]

The list of all sitemap entries.

onEntryChildStateUpdate() ​

onEntryChildStateUpdate: (callback: (event: SitemapEntryChildStateUpdateEvent) => void) => ListenerHandle

Listen for child state updates on a sitemap entry.

Parameters ​
ParameterTypeDescription
callback(event: SitemapEntryChildStateUpdateEvent) => voidThe callback function that receives the entry ID and new child state.
Returns ​

ListenerHandle

A handle object with a stop method to stop listening.

Example ​
ts
const handle = sdk.sitemap.onEntryChildStateUpdate((entryId, newChildState) => {
  console.log(`Entry ${entryId} child state changed:`, newChildState);
});

// Later, stop listening
handle.stop();
setScope() ​

setScope: (id: ID | undefined) => void

Set the current scope.

Parameters ​
ParameterTypeDescription
idID | undefinedThe ID of the scope to set.
Returns ​

void


SitemapEntryKind ​

const SitemapEntryKind: object

The kind of a sitemap entry.

Type Declaration ​

Directory ​

readonly Directory: "DIRECTORY"

Domain ​

readonly Domain: "DOMAIN"

Request ​

readonly Request: "REQUEST"

RequestBody ​

readonly RequestBody: "REQUEST_BODY"

RequestQuery ​

readonly RequestQuery: "REQUEST_QUERY"