diff --git a/src/reference/sdks/frontend/ai.md b/src/reference/sdks/frontend/ai.md index 143a1ae..55331c2 100644 --- a/src/reference/sdks/frontend/ai.md +++ b/src/reference/sdks/frontend/ai.md @@ -67,3 +67,51 @@ Creates a new AI provider instance that can be used with the [ai](https://ai-sdk [`AIProvider`](#aiprovider) A provider instance compatible with the [ai](https://ai-sdk.dev/) library. + +##### getUpstreamProviders() + +> **getUpstreamProviders**: () => [`AIUpstreamProvider`](#aiupstreamprovider)[] + +Gets the list of upstream AI providers with their configuration status. + +###### Returns + +[`AIUpstreamProvider`](#aiupstreamprovider)[] + +An array of AI upstream providers with their configuration status. + +*** + +### AIUpstreamProvider + +> **AIUpstreamProvider** = `object` + +AI upstream provider information. + +#### Properties + +##### id + +> **id**: [`AIUpstreamProviderId`](#aiupstreamproviderid) + +##### status + +> **status**: [`AIUpstreamProviderStatus`](#aiupstreamproviderstatus) + +*** + +### AIUpstreamProviderId + +> **AIUpstreamProviderId** = `"anthropic"` \| `"google"` \| `"openai"` \| `"openrouter"` + +AI upstream provider ID. + +*** + +### AIUpstreamProviderStatus + +> **AIUpstreamProviderStatus** = `"Ready"` \| `"Missing"` + +AI upstream provider status. +Ready: The upstream provider is ready to use. +Missing: The upstream provider is not configured. diff --git a/src/reference/sdks/frontend/assistant.md b/src/reference/sdks/frontend/assistant.md new file mode 100644 index 0000000..4f506ef --- /dev/null +++ b/src/reference/sdks/frontend/assistant.md @@ -0,0 +1,13 @@ +# Assistant + +### AssistantPageContext + +> **AssistantPageContext** = `object` + +Assistant page context. + +#### Properties + +##### kind + +> **kind**: `"Assistant"` diff --git a/src/reference/sdks/frontend/automate.md b/src/reference/sdks/frontend/automate.md index 57c7f5b..a93ae66 100644 --- a/src/reference/sdks/frontend/automate.md +++ b/src/reference/sdks/frontend/automate.md @@ -1,5 +1,55 @@ # Automate +### AutomateEntry + +> **AutomateEntry** = `object` + +A automate entry. + +#### Properties + +##### createdAt + +> **createdAt**: `Date` + +The date the entry was created. + +##### id + +> **id**: [`ID`](utils.md#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`](utils.md#selection)\<[`ID`](utils.md#id)\> + +##### selection + +> **selection**: [`Selection`](utils.md#selection)\<\{ `id`: [`ID`](utils.md#id); `kind`: `"AutomateSession"`; \} \| \{ `id`: [`ID`](utils.md#id); `kind`: `"AutomateEntry"`; \}\> + +*** + ### AutomateSDK > **AutomateSDK** = `object` @@ -8,6 +58,38 @@ Utilities to interact with the Automate page. #### Properties +##### addEntryIndicator() + +> **addEntryIndicator**: (`entryId`: [`ID`](utils.md#id), `indicator`: [`AddIndicatorOptions`](utils.md#addindicatoroptions)) => [`Indicator`](utils.md#indicator) + +Add an indicator to an automate entry. +Indicators are displayed next to the entry name in the collections tree. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `entryId` | [`ID`](utils.md#id) | The ID of the entry to add the indicator to. | +| `indicator` | [`AddIndicatorOptions`](utils.md#addindicatoroptions) | The indicator configuration. | + +###### Returns + +[`Indicator`](utils.md#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` @@ -39,3 +121,83 @@ Add a custom request view mode. ###### Returns `void` + +##### addResponseViewMode() + +> **addResponseViewMode**: (`options`: [`ResponseViewModeOptions`](response.md#responseviewmodeoptions)) => `void` + +Add a custom response view mode. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `options` | [`ResponseViewModeOptions`](response.md#responseviewmodeoptions) | The view mode options. | + +###### Returns + +`void` + +##### getEntries() + +> **getEntries**: (`sessionId`: [`ID`](utils.md#id)) => [`AutomateEntry`](#automateentry)[] + +Get the list of all automate entries. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `sessionId` | [`ID`](utils.md#id) | The ID of the session to get the entries of. | + +###### Returns + +[`AutomateEntry`](#automateentry)[] + +The list of all automate entries. + +##### getSessions() + +> **getSessions**: () => [`AutomateSession`](#automatesession)[] + +Get the list of all automate sessions. + +###### Returns + +[`AutomateSession`](#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`](utils.md#id)[] + +The IDs of all entries in this session. + +##### id + +> **id**: [`ID`](utils.md#id) + +The ID of the session. + +##### name + +> **name**: `string` + +The name of the session. diff --git a/src/reference/sdks/frontend/backups.md b/src/reference/sdks/frontend/backups.md new file mode 100644 index 0000000..ccf5c13 --- /dev/null +++ b/src/reference/sdks/frontend/backups.md @@ -0,0 +1,13 @@ +# Backups + +### BackupsPageContext + +> **BackupsPageContext** = `object` + +Backups page context. + +#### Properties + +##### kind + +> **kind**: `"Backups"` diff --git a/src/reference/sdks/frontend/certificate.md b/src/reference/sdks/frontend/certificate.md new file mode 100644 index 0000000..c671707 --- /dev/null +++ b/src/reference/sdks/frontend/certificate.md @@ -0,0 +1,13 @@ +# Certificate + +### CertificatePageContext + +> **CertificatePageContext** = `object` + +Certificate page context. + +#### Properties + +##### kind + +> **kind**: `"Certificate"` diff --git a/src/reference/sdks/frontend/environment.md b/src/reference/sdks/frontend/environment.md index 602d84d..5683c49 100644 --- a/src/reference/sdks/frontend/environment.md +++ b/src/reference/sdks/frontend/environment.md @@ -1,5 +1,23 @@ # Environment +### EnvironmentPageContext + +> **EnvironmentPageContext** = `object` + +Environment page context. + +#### Properties + +##### kind + +> **kind**: `"Environment"` + +##### selection + +> **selection**: [`Selection`](utils.md#selection)\<[`ID`](utils.md#id)\> + +*** + ### EnvironmentSDK > **EnvironmentSDK** = `object` diff --git a/src/reference/sdks/frontend/exports.md b/src/reference/sdks/frontend/exports.md new file mode 100644 index 0000000..34209e9 --- /dev/null +++ b/src/reference/sdks/frontend/exports.md @@ -0,0 +1,13 @@ +# Exports + +### ExportsPageContext + +> **ExportsPageContext** = `object` + +Exports page context. + +#### Properties + +##### kind + +> **kind**: `"Exports"` diff --git a/src/reference/sdks/frontend/files.md b/src/reference/sdks/frontend/files.md index c7246b8..3b9e9d7 100644 --- a/src/reference/sdks/frontend/files.md +++ b/src/reference/sdks/frontend/files.md @@ -76,6 +76,20 @@ The asset file. *** +### FilesPageContext + +> **FilesPageContext** = `object` + +Files page context. + +#### Properties + +##### kind + +> **kind**: `"Files"` + +*** + ### FilesSDK > **FilesSDK** = `object` diff --git a/src/reference/sdks/frontend/filters.md b/src/reference/sdks/frontend/filters.md index 794de3f..1f24370 100644 --- a/src/reference/sdks/frontend/filters.md +++ b/src/reference/sdks/frontend/filters.md @@ -51,6 +51,24 @@ The HTTPQL expression of the filter. *** +### FilterPageContext + +> **FilterPageContext** = `object` + +Filter page context. + +#### Properties + +##### kind + +> **kind**: `"Filter"` + +##### selection + +> **selection**: [`Selection`](utils.md#selection)\<[`ID`](utils.md#id)\> + +*** + ### FiltersSDK > **FiltersSDK** = `object` diff --git a/src/reference/sdks/frontend/findings.md b/src/reference/sdks/frontend/findings.md index f88dfbe..2cf77b3 100644 --- a/src/reference/sdks/frontend/findings.md +++ b/src/reference/sdks/frontend/findings.md @@ -46,6 +46,24 @@ The title of the finding. *** +### FindingsPageContext + +> **FindingsPageContext** = `object` + +Findings page context. + +#### Properties + +##### kind + +> **kind**: `"Findings"` + +##### selection + +> **selection**: [`Selection`](utils.md#selection)\<[`ID`](utils.md#id)\> + +*** + ### FindingsSDK > **FindingsSDK** = `object` @@ -86,6 +104,22 @@ Add a custom request view mode. `void` +##### addResponseViewMode() + +> **addResponseViewMode**: (`options`: [`ResponseViewModeOptions`](response.md#responseviewmodeoptions)) => `void` + +Add a custom response view mode. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `options` | [`ResponseViewModeOptions`](response.md#responseviewmodeoptions) | The view mode options. | + +###### Returns + +`void` + ##### createFinding() > **createFinding**: (`requestId`: [`ID`](utils.md#id), `options`: `object`) => `Promise`\<[`Finding`](#finding) \| `undefined`\> diff --git a/src/reference/sdks/frontend/http-history.md b/src/reference/sdks/frontend/http-history.md index cb534ba..69ee21d 100644 --- a/src/reference/sdks/frontend/http-history.md +++ b/src/reference/sdks/frontend/http-history.md @@ -1,5 +1,23 @@ # HTTP History +### HTTPHistoryPageContext + +> **HTTPHistoryPageContext** = `object` + +HTTP history page context. + +#### Properties + +##### kind + +> **kind**: `"HTTPHistory"` + +##### selection + +> **selection**: [`Selection`](utils.md#selection)\<[`ID`](utils.md#id)\> + +*** + ### HTTPHistorySDK > **HTTPHistorySDK** = `object` @@ -56,6 +74,22 @@ Add an extension to the response editor. `void` +##### addResponseViewMode() + +> **addResponseViewMode**: (`options`: [`ResponseViewModeOptions`](response.md#responseviewmodeoptions)) => `void` + +Add a custom response view mode. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `options` | [`ResponseViewModeOptions`](response.md#responseviewmodeoptions) | The view mode options. | + +###### Returns + +`void` + ##### addToSlot > **addToSlot**: [`DefineAddToSlotFn`](slots.md#defineaddtoslotfn)\<[`HTTPHistorySlotContent`](other.md#httphistoryslotcontent)\> diff --git a/src/reference/sdks/frontend/index.md b/src/reference/sdks/frontend/index.md index 90aea36..8fce3b9 100644 --- a/src/reference/sdks/frontend/index.md +++ b/src/reference/sdks/frontend/index.md @@ -216,9 +216,13 @@ Utilities to interact with workflows. - [Search](search.md) - [Files](files.md) - [AI](ai.md) +- [Assistant](assistant.md) - [Automate](automate.md) +- [Backups](backups.md) +- [Certificate](certificate.md) - [Editor](editor.md) - [Environment](environment.md) +- [Exports](exports.md) - [Filter](filter.md) - [Filters](filters.md) - [Footer](footer.md) @@ -229,8 +233,10 @@ Utilities to interact with workflows. - [Other](other.md) - [Projects](projects.md) - [Request](request.md) +- [Response](response.md) - [Runtime](runtime.md) - [Sitemap](sitemap.md) - [Slots](slots.md) - [Utils](utils.md) +- [Websockets](websockets.md) - [Workflows](workflows.md) diff --git a/src/reference/sdks/frontend/intercept.md b/src/reference/sdks/frontend/intercept.md index 466bddb..70e9342 100644 --- a/src/reference/sdks/frontend/intercept.md +++ b/src/reference/sdks/frontend/intercept.md @@ -1,5 +1,45 @@ # Intercept +### InterceptMessageId + +> **InterceptMessageId** = `string` & `object` + +A unique intercept message identifier. + +#### Type Declaration + +##### \_\_interceptMessageId? + +> `optional` **\_\_interceptMessageId**: `never` + +*** + +### InterceptPageContext + +> **InterceptPageContext** = `object` + +Intercept page context. + +#### Properties + +##### kind + +> **kind**: `"Intercept"` + +##### requestSelection + +> **requestSelection**: [`Selection`](utils.md#selection)\<[`InterceptMessageId`](#interceptmessageid)\> + +##### responseSelection + +> **responseSelection**: [`Selection`](utils.md#selection)\<[`InterceptMessageId`](#interceptmessageid)\> + +##### websocketSelection + +> **websocketSelection**: [`Selection`](utils.md#selection)\<[`InterceptMessageId`](#interceptmessageid)\> + +*** + ### InterceptSDK > **InterceptSDK** = `object` diff --git a/src/reference/sdks/frontend/match-and-replace.md b/src/reference/sdks/frontend/match-and-replace.md index 3a19490..f6bf36f 100644 --- a/src/reference/sdks/frontend/match-and-replace.md +++ b/src/reference/sdks/frontend/match-and-replace.md @@ -496,6 +496,24 @@ An operation to update the response status code. *** +### MatchReplacePageContext + +> **MatchReplacePageContext** = `object` + +Match and Replace page context. + +#### Properties + +##### kind + +> **kind**: `"MatchReplace"` + +##### selection + +> **selection**: [`Selection`](utils.md#selection)\<[`ID`](utils.md#id)\> + +*** + ### MatchReplaceReplacer > **MatchReplaceReplacer** = [`MatchReplaceReplacerTerm`](#matchreplacereplacerterm) \| [`MatchReplaceReplacerWorkflow`](#matchreplacereplacerworkflow) @@ -597,6 +615,38 @@ Utilities to interact with the Match and Replace page. #### Properties +##### addRuleIndicator() + +> **addRuleIndicator**: (`ruleId`: [`ID`](utils.md#id), `indicator`: [`AddIndicatorOptions`](utils.md#addindicatoroptions)) => [`Indicator`](utils.md#indicator) + +Add an indicator to a rule. +Indicators are displayed next to the session name in the collections tree. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `ruleId` | [`ID`](utils.md#id) | The ID of the rule to add the indicator to. | +| `indicator` | [`AddIndicatorOptions`](utils.md#addindicatoroptions) | The indicator configuration. | + +###### Returns + +[`Indicator`](utils.md#indicator) + +A handle object with a `remove` method to remove the indicator. + +###### Example + +```ts +const indicator = sdk.matchReplace.addRuleIndicator(ruleId, { + icon: "fas fa-exclamation-triangle", + description: "Security warning", +}); + +// Later, remove the indicator +indicator.remove(); +``` + ##### addToSlot > **addToSlot**: [`DefineAddToSlotFn`](slots.md#defineaddtoslotfn)\<[`MatchReplaceSlotContent`](#matchreplaceslotcontent)\> diff --git a/src/reference/sdks/frontend/navigation.md b/src/reference/sdks/frontend/navigation.md index b7a0e5f..bc82c1c 100644 --- a/src/reference/sdks/frontend/navigation.md +++ b/src/reference/sdks/frontend/navigation.md @@ -150,7 +150,7 @@ Available route identifiers in Caido. ##### MatchReplace -> `readonly` **MatchReplace**: `"Tamper"` +> `readonly` **MatchReplace**: `"MatchReplace"` ##### Plugins diff --git a/src/reference/sdks/frontend/other.md b/src/reference/sdks/frontend/other.md index bd65aa8..1ea75b3 100644 --- a/src/reference/sdks/frontend/other.md +++ b/src/reference/sdks/frontend/other.md @@ -1,5 +1,11 @@ # Other +### ChildState + +> **ChildState** = \{ `kind`: `"Empty"`; \} \| \{ `kind`: `"NotLoaded"`; \} \| \{ `items`: [`ID`](utils.md#id)[]; `kind`: `"Loaded"`; \} + +*** + ### CommandID > **CommandID** = `string` & `object` @@ -171,6 +177,32 @@ A unique command identifier. *** +### SitemapRootEntry + +> **SitemapRootEntry** = `object` + +#### Properties + +##### childState + +> **childState**: [`ChildState`](#childstate) + +The child state of the entry. + +##### id + +> **id**: [`ID`](utils.md#id) + +The ID of the entry. + +##### label + +> **label**: `string` + +The label of the entry. + +*** + ### Source > **Source** = *typeof* [`Source`](match-and-replace.md#source)\[keyof *typeof* [`Source`](#source-1)\] diff --git a/src/reference/sdks/frontend/projects.md b/src/reference/sdks/frontend/projects.md index e2df94a..d70e1f2 100644 --- a/src/reference/sdks/frontend/projects.md +++ b/src/reference/sdks/frontend/projects.md @@ -1,5 +1,19 @@ # Projects +### ProjectsPageContext + +> **ProjectsPageContext** = `object` + +Projects page context. + +#### Properties + +##### kind + +> **kind**: `"Projects"` + +*** + ### ProjectsSDK > **ProjectsSDK** = `object` diff --git a/src/reference/sdks/frontend/replay.md b/src/reference/sdks/frontend/replay.md index 3a675e0..ac9ab56 100644 --- a/src/reference/sdks/frontend/replay.md +++ b/src/reference/sdks/frontend/replay.md @@ -105,6 +105,24 @@ The ID of the session this entry belongs to. *** +### ReplayPageContext + +> **ReplayPageContext** = `object` + +Replay page context. + +#### Properties + +##### kind + +> **kind**: `"Replay"` + +##### selection + +> **selection**: [`Selection`](utils.md#selection)\<[`ReplaySessionId`](#replaysessionid)\> + +*** + ### ReplaySDK > **ReplaySDK** = `object` @@ -145,6 +163,38 @@ Add a custom view mode for requests. `void` +##### addSessionIndicator() + +> **addSessionIndicator**: (`sessionId`: [`ID`](utils.md#id), `indicator`: [`AddIndicatorOptions`](utils.md#addindicatoroptions)) => [`Indicator`](utils.md#indicator) + +Add an indicator to a replay session. +Indicators are displayed next to the session name in the collections tree. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `sessionId` | [`ID`](utils.md#id) | The ID of the session to add the indicator to. | +| `indicator` | [`AddIndicatorOptions`](utils.md#addindicatoroptions) | The indicator configuration. | + +###### Returns + +[`Indicator`](utils.md#indicator) + +A handle object with a `remove` method to remove the indicator. + +###### Example + +```ts +const indicator = sdk.replay.addSessionIndicator(sessionId, { + icon: "fas fa-exclamation-triangle", + description: "Security warning", +}); + +// Later, remove the indicator +indicator.remove(); +``` + ##### addToSlot > **addToSlot**: [`DefineAddToSlotFn`](slots.md#defineaddtoslotfn)\<[`ReplaySlotContent`](other.md#replayslotcontent)\> @@ -623,6 +673,20 @@ The newly created replay session. *** +### ReplaySessionId + +> **ReplaySessionId** = `string` & `object` + +A unique replay session identifier. + +#### Type Declaration + +##### \_\_replaySessionId? + +> `optional` **\_\_replaySessionId**: `never` + +*** + ### ReplayTab > **ReplayTab** = `object` diff --git a/src/reference/sdks/frontend/response.md b/src/reference/sdks/frontend/response.md new file mode 100644 index 0000000..080482f --- /dev/null +++ b/src/reference/sdks/frontend/response.md @@ -0,0 +1,29 @@ +# Response + +### ResponseFull + +> **ResponseFull** = [`Prettify`](utils.md#prettify)\<[`As`](utils.md#as)\<`"ResponseFull"`\> & `object`\> + +A complete response with all metadata and raw content. + +*** + +### ResponseViewModeOptions + +> **ResponseViewModeOptions** = `object` + +Options for defining a custom response view mode. + +#### Properties + +##### label + +> **label**: `string` + +The label of the view mode. + +##### view + +> **view**: [`ComponentDefinition`](utils.md#componentdefinition) + +The component to render when the view mode is selected. diff --git a/src/reference/sdks/frontend/scopes.md b/src/reference/sdks/frontend/scopes.md index 905a7af..cfcb5bd 100644 --- a/src/reference/sdks/frontend/scopes.md +++ b/src/reference/sdks/frontend/scopes.md @@ -50,6 +50,24 @@ The name of the scope. *** +### ScopePageContext + +> **ScopePageContext** = `object` + +Scope page context. + +#### Properties + +##### kind + +> **kind**: `"Scope"` + +##### selection + +> **selection**: [`Selection`](utils.md#selection)\<[`ID`](utils.md#id)\> + +*** + ### ScopesSDK > **ScopesSDK** = `object` diff --git a/src/reference/sdks/frontend/search.md b/src/reference/sdks/frontend/search.md index 0e346e6..81d0496 100644 --- a/src/reference/sdks/frontend/search.md +++ b/src/reference/sdks/frontend/search.md @@ -1,5 +1,19 @@ # Search +### SearchPageContext + +> **SearchPageContext** = `object` + +Search page context. + +#### Properties + +##### kind + +> **kind**: `"Search"` + +*** + ### SearchSDK > **SearchSDK** = `object` @@ -40,6 +54,22 @@ Add a custom request view mode. `void` +##### addResponseViewMode() + +> **addResponseViewMode**: (`options`: [`ResponseViewModeOptions`](response.md#responseviewmodeoptions)) => `void` + +Add a custom response view mode. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `options` | [`ResponseViewModeOptions`](response.md#responseviewmodeoptions) | The view mode options. | + +###### Returns + +`void` + ##### addToSlot() > **addToSlot**: \<`T`\>(`slot`: `T`, `content`: [`SearchSlotContent`](other.md#searchslotcontent)\[`T`\]) => `void` diff --git a/src/reference/sdks/frontend/sitemap.md b/src/reference/sdks/frontend/sitemap.md index 68206c9..8e94a04 100644 --- a/src/reference/sdks/frontend/sitemap.md +++ b/src/reference/sdks/frontend/sitemap.md @@ -1,5 +1,107 @@ # Sitemap +### SitemapEntry + +> **SitemapEntry** = `object` + +An entry in sitemap. + +#### Properties + +##### childState + +> **childState**: [`ChildState`](other.md#childstate) + +The child state of the entry. + +##### id + +> **id**: [`ID`](utils.md#id) + +The ID of the entry. + +##### kind + +> **kind**: [`SitemapEntryKind`](#sitemapentrykind) + +The kind of the entry. + +##### label + +> **label**: `string` + +The label of the entry. + +##### parentId? + +> `optional` **parentId**: [`ID`](utils.md#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`](utils.md#id) + +The ID of the entry that changed. + +##### newChildState + +> **newChildState**: [`ChildState`](other.md#childstate) + +The new child state of the entry. + +*** + +### SitemapEntryKind + +> **SitemapEntryKind** = *typeof* [`SitemapEntryKind`](#sitemapentrykind)\[keyof *typeof* [`SitemapEntryKind`](#sitemapentrykind-2)\] + +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`](utils.md#selection)\<[`ID`](utils.md#id)\> + +##### kind + +> **kind**: `"Sitemap"` + +##### requestSelection + +> **requestSelection**: [`Selection`](utils.md#selection)\<[`ID`](utils.md#id)\> + +*** + ### SitemapSDK > **SitemapSDK** = `object` @@ -8,6 +110,38 @@ Utilities to interact with the Sitemap page. #### Properties +##### addEntryIndicator() + +> **addEntryIndicator**: (`entryId`: [`ID`](utils.md#id), `indicator`: [`AddIndicatorOptions`](utils.md#addindicatoroptions)) => [`Indicator`](utils.md#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`](utils.md#id) | The ID of the entry to add the indicator to. | +| `indicator` | [`AddIndicatorOptions`](utils.md#addindicatoroptions) | The indicator configuration. | + +###### Returns + +[`Indicator`](utils.md#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` @@ -40,6 +174,41 @@ Add a custom request view mode. `void` +##### addResponseViewMode() + +> **addResponseViewMode**: (`options`: [`ResponseViewModeOptions`](response.md#responseviewmodeoptions)) => `void` + +Add a custom response view mode. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `options` | [`ResponseViewModeOptions`](response.md#responseviewmodeoptions) | The view mode options. | + +###### Returns + +`void` + +##### getChildren() + +> **getChildren**: (`entryId`: [`ID`](utils.md#id)) => `Promise`\<[`SitemapEntry`](#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`](utils.md#id) | The ID of the entry to load children for. | + +###### Returns + +`Promise`\<[`SitemapEntry`](#sitemapentry)[]\> + +Promise that resolves when children are loaded. + ##### getScopeId() > **getScopeId**: () => [`ID`](utils.md#id) \| `undefined` @@ -52,6 +221,47 @@ Get the current scope ID. The current scope ID. +##### getTreeEntries() + +> **getTreeEntries**: () => [`SitemapRootEntry`](other.md#sitemaprootentry)[] + +Get the list of all sitemap entries in tree format. + +###### Returns + +[`SitemapRootEntry`](other.md#sitemaprootentry)[] + +The list of all sitemap entries. + +##### onEntryChildStateUpdate() + +> **onEntryChildStateUpdate**: (`callback`: (`event`: [`SitemapEntryChildStateUpdateEvent`](#sitemapentrychildstateupdateevent)) => `void`) => [`ListenerHandle`](utils.md#listenerhandle) + +Listen for child state updates on a sitemap entry. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `callback` | (`event`: [`SitemapEntryChildStateUpdateEvent`](#sitemapentrychildstateupdateevent)) => `void` | The callback function that receives the entry ID and new child state. | + +###### Returns + +[`ListenerHandle`](utils.md#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`](utils.md#id) \| `undefined`) => `void` @@ -67,3 +277,33 @@ Set the current scope. ###### 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"` diff --git a/src/reference/sdks/frontend/utils.md b/src/reference/sdks/frontend/utils.md index 8310ccb..c28b555 100644 --- a/src/reference/sdks/frontend/utils.md +++ b/src/reference/sdks/frontend/utils.md @@ -1,5 +1,24 @@ # Utils +### AddIndicatorOptions + +> **AddIndicatorOptions** = `object` + +Visual indicator displayed next to a item label in a tree component. +Includes an icon and an associated description. + +#### Properties + +##### description + +> **description**: `string` + +##### icon + +> **icon**: [`Icon`](#icon) + +*** + ### As > **As**\<`TType`\> = `object` @@ -96,6 +115,24 @@ A unique Caido identifier per type. *** +### Indicator + +> **Indicator** = `object` + +Providing operations that can be performed on a item indicator. + +#### Properties + +##### remove() + +> **remove**: () => `void` + +###### Returns + +`void` + +*** + ### ListenerHandle > **ListenerHandle** = `object` @@ -141,3 +178,18 @@ Utility type for converting endpoint return types to promises. | Type Parameter | | ------ | | `T` *extends* (...`args`: `unknown`[]) => `unknown` | + +*** + +### Selection + +> **Selection**\<`TId`\> = \{ `kind`: `"Empty"`; \} \| \{ `kind`: `"Selected"`; `main`: `TId`; `secondary`: `TId`[]; \} + +Generic selection type with main and secondary items. +Main represents the primary selected item, secondary represents additional selected items. + +#### Type Parameters + +| Type Parameter | +| ------ | +| `TId` | diff --git a/src/reference/sdks/frontend/websockets.md b/src/reference/sdks/frontend/websockets.md new file mode 100644 index 0000000..4f169fb --- /dev/null +++ b/src/reference/sdks/frontend/websockets.md @@ -0,0 +1,13 @@ +# Websockets + +### WebsocketPageContext + +> **WebsocketPageContext** = `object` + +Certificate page context. + +#### Properties + +##### kind + +> **kind**: `"Websocket"` diff --git a/src/reference/sdks/frontend/window.md b/src/reference/sdks/frontend/window.md index df74634..1df4c60 100644 --- a/src/reference/sdks/frontend/window.md +++ b/src/reference/sdks/frontend/window.md @@ -52,6 +52,28 @@ Options for configuring a dialog. *** +### GlobalContext + +> **GlobalContext** = `object` + +Represents the global context of the application. + +#### Properties + +##### page? + +> `optional` **page**: [`PageContext`](#pagecontext) + +*** + +### PageContext + +> **PageContext** = [`AssistantPageContext`](assistant.md#assistantpagecontext) \| [`AutomatePageContext`](automate.md#automatepagecontext) \| [`BackupsPageContext`](backups.md#backupspagecontext) \| [`CertificatePageContext`](certificate.md#certificatepagecontext) \| [`ExportsPageContext`](exports.md#exportspagecontext) \| [`EnvironmentPageContext`](environment.md#environmentpagecontext) \| [`FilterPageContext`](filters.md#filterpagecontext) \| [`FindingsPageContext`](findings.md#findingspagecontext) \| [`HTTPHistoryPageContext`](http-history.md#httphistorypagecontext) \| [`ReplayPageContext`](replay.md#replaypagecontext) \| [`ScopePageContext`](scopes.md#scopepagecontext) \| [`SearchPageContext`](search.md#searchpagecontext) \| [`WorkflowsPageContext`](workflows.md#workflowspagecontext) \| [`ProjectsPageContext`](projects.md#projectspagecontext) \| [`FilesPageContext`](files.md#filespagecontext) \| [`MatchReplacePageContext`](match-and-replace.md#matchreplacepagecontext) \| [`InterceptPageContext`](intercept.md#interceptpagecontext) \| [`SitemapPageContext`](sitemap.md#sitemappagecontext) \| [`WebsocketPageContext`](websockets.md#websocketpagecontext) + +Represents the context of the current page. + +*** + ### WindowSDK > **WindowSDK** = `object` @@ -72,6 +94,36 @@ Get the active editor. The active editor. +##### getContext() + +> **getContext**: () => [`GlobalContext`](#globalcontext) + +Get the current global context. + +###### Returns + +[`GlobalContext`](#globalcontext) + +The current global context. + +##### onContextChange() + +> **onContextChange**: (`callback`: (`context`: [`GlobalContext`](#globalcontext)) => `void`) => [`ListenerHandle`](utils.md#listenerhandle) + +Subscribe to global context changes. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `callback` | (`context`: [`GlobalContext`](#globalcontext)) => `void` | The callback to call when the context changes. | + +###### Returns + +[`ListenerHandle`](utils.md#listenerhandle) + +An object with a `stop` method that can be called to stop listening to context changes. + ##### showDialog() > **showDialog**: (`component`: [`ComponentDefinition`](utils.md#componentdefinition), `options?`: [`DialogOptions`](#dialogoptions)) => [`Dialog`](#dialog) diff --git a/src/reference/sdks/frontend/workflows.md b/src/reference/sdks/frontend/workflows.md index 8e9d349..86015f1 100644 --- a/src/reference/sdks/frontend/workflows.md +++ b/src/reference/sdks/frontend/workflows.md @@ -158,3 +158,17 @@ Register a callback to be called when a workflow is updated. ###### Returns [`ListenerHandle`](utils.md#listenerhandle) + +*** + +### WorkflowsPageContext + +> **WorkflowsPageContext** = `object` + +Workflows page context. + +#### Properties + +##### kind + +> **kind**: `"Workflows"`