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?
optionalparentId: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 typeofSitemapEntryKind]
The kind of a sitemap entry.
Example
const entry = {
id: "123",
label: "Example",
kind: SitemapEntryKind.Request,
};SitemapPageContext
SitemapPageContext =
object
Sitemap page context.
Properties
entrySelection
kind
kind:
"Sitemap"
requestSelection
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
| Parameter | Type | Description |
|---|---|---|
entryId | ID | The ID of the entry to add the indicator to. |
indicator | AddIndicatorOptions | The indicator configuration. |
Returns
A handle object with a remove method to remove the indicator.
Example
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
| 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
addResponseViewMode()
addResponseViewMode: (
options:ResponseViewModeOptions) =>void
Add a custom response view mode.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | ResponseViewModeOptions | The 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
| Parameter | Type | Description |
|---|---|---|
entryId | ID | The 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
The list of all sitemap entries.
onEntryChildStateUpdate()
onEntryChildStateUpdate: (
callback: (event:SitemapEntryChildStateUpdateEvent) =>void) =>ListenerHandle
Listen for child state updates on a sitemap entry.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | (event: SitemapEntryChildStateUpdateEvent) => void | The callback function that receives the entry ID and new child state. |
Returns
A handle object with a stop method to stop listening.
Example
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
| Parameter | Type | Description |
|---|---|---|
id | ID | undefined | The ID of the scope to set. |
Returns
void
SitemapEntryKind
constSitemapEntryKind:object
The kind of a sitemap entry.
Type Declaration
Directory
readonlyDirectory:"DIRECTORY"
Domain
readonlyDomain:"DOMAIN"
Request
readonlyRequest:"REQUEST"
RequestBody
readonlyRequestBody:"REQUEST_BODY"
RequestQuery
readonlyRequestQuery:"REQUEST_QUERY"
