diff --git a/src/reference/sdks/backend/index.md b/src/reference/sdks/backend/index.md index e3f6be6..e52550d 100644 --- a/src/reference/sdks/backend/index.md +++ b/src/reference/sdks/backend/index.md @@ -80,6 +80,12 @@ The SDK for the Requests service. The SDK for the runtime information. +##### scope + +> **scope**: [`ScopeSDK`](index.md#scopesdk) + +The SDK for the Scope service. + ## Meta ### MetaSDK @@ -1764,6 +1770,14 @@ The name of the reporter. `string` +##### getRequestId() + +The ID of the associated [Request](index.md#request-1). + +###### Returns + +`string` + ##### getTitle() The title of the finding. @@ -2706,3 +2720,57 @@ Get the current version of Caido. ###### Returns `string` + +## Scope + +### Scope + +> **Scope**: `object` + +A saved immutable Scope. + +#### Type declaration + +##### allowlist + +> `readonly` **allowlist**: `string`[] + +The allowlist of the scope. + +##### denylist + +> `readonly` **denylist**: `string`[] + +The denylist of the scope. + +##### id + +> `readonly` **id**: [`ID`](index.md#id) + +The unique Caido [ID](index.md#id) of the scope. + +##### name + +> `readonly` **name**: `string` + +The name of the scope. + +*** + +### ScopeSDK + +> **ScopeSDK**: `object` + +The SDK for the Scope service. + +#### Type declaration + +##### getAll() + +Get all the scopes. + +###### Returns + +`Promise`\<[`Scope`](index.md#scope-1)[]\> + +An array of [Scope](index.md#scope-1) diff --git a/src/reference/sdks/frontend/index.md b/src/reference/sdks/frontend/index.md index 3f24455..7851175 100644 --- a/src/reference/sdks/frontend/index.md +++ b/src/reference/sdks/frontend/index.md @@ -68,6 +68,12 @@ Utilities to interact with Filters page. Utilities to interact with findings +##### footer + +> **footer**: [`FooterSDK`](index.md#footersdk) + +Utilities to interact with the footer. + ##### graphql > **graphql**: `GraphqlSDK` @@ -1008,6 +1014,23 @@ Get the active editor. The active editor. +##### showDialog() + +> **showDialog**: (`component`: [`CustomSlotContent`](index.md#customslotcontenttprops), `options`?: [`DialogOptions`](index.md#dialogoptions)) => `void` + +Show a dialog component. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `component` | [`CustomSlotContent`](index.md#customslotcontenttprops) | The custom slot content to display in the dialog. | +| `options`? | [`DialogOptions`](index.md#dialogoptions) | Options for the dialog. | + +###### Returns + +`void` + ##### showToast() > **showToast**: (`message`: `string`, `options`?: `object`) => `void` @@ -1126,7 +1149,7 @@ Utilities to interact with the command palette. #### Type declaration -##### register() +##### ~~register()~~ > **register**: (`commandId`: `string`) => `void` @@ -1142,6 +1165,10 @@ Register a command. `void` +###### Deprecated + +Use `sdk.commandPalette.addToSlot` instead. + ## Sidebar ### SidebarItem @@ -1247,6 +1274,60 @@ 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`](index.md#defineaddtoslotfntmap)\<\{ `session-toolbar-primary`: [`ButtonSlotContent`](index.md#buttonslotcontent) \| [`CustomSlotContent`](index.md#customslotcontenttprops) \| [`CommandSlotContent`](index.md#commandslotcontent); `session-toolbar-secondary`: [`ButtonSlotContent`](index.md#buttonslotcontent) \| [`CustomSlotContent`](index.md#customslotcontenttprops) \| [`CommandSlotContent`](index.md#commandslotcontent); `topbar`: [`ButtonSlotContent`](index.md#buttonslotcontent) \| [`CustomSlotContent`](index.md#customslotcontenttprops) \| [`CommandSlotContent`](index.md#commandslotcontent); \}\> + +Add a component to a slot. + +###### Param + +The slot to add the component to. + +###### Param + +The content to add to the slot. + +###### Example + +```ts +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`](index.md#id-3)) => `void` @@ -1263,6 +1344,56 @@ Close a replay tab for the given session. `void` +##### createCollection() + +> **createCollection**: (`name`: `string`) => `Promise`\<[`ReplayCollection`](index.md#replaycollection)\> + +Create a new collection. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `name` | `string` | The name of the collection to create. | + +###### Returns + +`Promise`\<[`ReplayCollection`](index.md#replaycollection)\> + +##### deleteCollection() + +> **deleteCollection**: (`id`: [`ID`](index.md#id-3)) => `Promise`\<`boolean`\> + +Delete a collection. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `id` | [`ID`](index.md#id-3) | The ID of the collection to delete. | + +###### Returns + +`Promise`\<`boolean`\> + +Whether the collection was deleted. + +##### deleteSessions() + +> **deleteSessions**: (`sessionIds`: [`ID`](index.md#id-3)[]) => `Promise`\<[`ID`](index.md#id-3)[]\> + +Delete a session. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `sessionIds` | [`ID`](index.md#id-3)[] | The IDs of the sessions to delete. | + +###### Returns + +`Promise`\<[`ID`](index.md#id-3)[]\> + ##### getCollections() > **getCollections**: () => [`ReplayCollection`](index.md#replaycollection)[] @@ -1299,6 +1430,25 @@ Get the list of all open replay tabs. The list of all open replay tabs. +##### moveSession() + +> **moveSession**: (`sessionId`: [`ID`](index.md#id-3), `collectionId`: [`ID`](index.md#id-3)) => `Promise`\<[`ReplaySession`](index.md#replaysession)\> + +Move a session to a different collection. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `sessionId` | [`ID`](index.md#id-3) | The ID of the session to move. | +| `collectionId` | [`ID`](index.md#id-3) | The ID of the collection to move the session to. | + +###### Returns + +`Promise`\<[`ReplaySession`](index.md#replaysession)\> + +The updated session. + ##### openTab() > **openTab**: (`sessionId`: [`ID`](index.md#id-3)) => `void` @@ -1315,6 +1465,25 @@ Open a replay tab for the given session. `void` +##### renameCollection() + +> **renameCollection**: (`id`: [`ID`](index.md#id-3), `name`: `string`) => `Promise`\<[`ReplayCollection`](index.md#replaycollection)\> + +Rename a collection. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `id` | [`ID`](index.md#id-3) | The ID of the collection to rename. | +| `name` | `string` | The new name of the collection. | + +###### Returns + +`Promise`\<[`ReplayCollection`](index.md#replaycollection)\> + +The updated collection. + ##### renameSession() > **renameSession**: (`id`: [`ID`](index.md#id-3), `name`: `string`) => `Promise`\<[`ReplaySession`](index.md#replaysession)\> @@ -1897,6 +2066,54 @@ Updates a filter. The updated filter. +## Footer + +### FooterSDK + +> **FooterSDK**: `object` + +Utilities to interact with the footer. + +#### Type declaration + +##### addToSlot + +> **addToSlot**: [`DefineAddToSlotFn`](index.md#defineaddtoslotfntmap)\<\{ `footer-primary`: [`ButtonSlotContent`](index.md#buttonslotcontent) \| [`CustomSlotContent`](index.md#customslotcontenttprops) \| [`CommandSlotContent`](index.md#commandslotcontent); `footer-secondary`: [`ButtonSlotContent`](index.md#buttonslotcontent) \| [`CustomSlotContent`](index.md#customslotcontenttprops) \| [`CommandSlotContent`](index.md#commandslotcontent); \}\> + +Add a component to a slot. + +###### Param + +The slot to add the component to. + +###### Param + +The content to add to the slot. + +###### Example + +```ts +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 @@ -2391,6 +2608,12 @@ A section for the response first line. ## Other +### ButtonSlotContent + +> **ButtonSlotContent**: [`DefineSlotContent`](index.md#defineslotcontentttype-p)\<`"Button"`, \{ `icon`: `string`; `label`: `string`; `onClick`: () => `void`; \}\> + +*** + ### CommandID > **CommandID**: `string` & `object` @@ -2411,6 +2634,104 @@ A unique command identifier. *** +### CommandSlotContent + +> **CommandSlotContent**: [`DefineSlotContent`](index.md#defineslotcontentttype-p)\<`"Command"`, \{ `commandId`: [`CommandID`](index.md#commandid); `icon`: `string`; \}\> + +*** + +### CustomSlotContent\ + +> **CustomSlotContent**\<`TProps`\>: [`DefineSlotContent`](index.md#defineslotcontentttype-p)\<`"Custom"`, \{ `component`: `Component`\<`TProps`\>; \}\> + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `TProps` *extends* `Record`\<`string`, `unknown`\> | `Record`\<`string`, `unknown`\> | + +*** + +### DefineAddToSlotFn()\ + +> **DefineAddToSlotFn**\<`TMap`\>: \<`K`\>(`slot`: `K`, `spec`: `TMap`\[`K`\]) => `void` + +#### Type Parameters + +| Type Parameter | +| ------ | +| `TMap` *extends* `Record`\<`string`, [`DefineSlotContent`](index.md#defineslotcontentttype-p)\<`string`, `Record`\<`string`, `unknown`\>\>\> | + +#### Type Parameters + +| Type Parameter | +| ------ | +| `K` *extends* `string` \| `number` \| `symbol` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `slot` | `K` | +| `spec` | `TMap`\[`K`\] | + +#### Returns + +`void` + +*** + +### DefineSlotContent\ + +> **DefineSlotContent**\<`TType`, `P`\>: `object` & `P` + +#### Type declaration + +##### type + +> **type**: `TType` + +#### Type Parameters + +| Type Parameter | +| ------ | +| `TType` *extends* `string` | +| `P` *extends* `Record`\<`string`, `unknown`\> | + +*** + +### 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` @@ -2507,6 +2828,12 @@ The value of the environment variable. *** +### FooterSlot + +> **FooterSlot**: *typeof* [`FooterSlot`](index.md#footerslot-1)\[keyof *typeof* [`FooterSlot`](index.md#footerslot-1)\] + +*** + ### HTTPQL > **HTTPQL**: `string` & `object` @@ -3142,6 +3469,54 @@ Stop the listener. *** +### ReplaySlot + +> **ReplaySlot**: *typeof* [`ReplaySlot`](index.md#replayslot-1)\[keyof *typeof* [`ReplaySlot`](index.md#replayslot-1)\] + +*** + +### SlotContent + +> **SlotContent**: [`ButtonSlotContent`](index.md#buttonslotcontent) \| [`CustomSlotContent`](index.md#customslotcontenttprops) \| [`CommandSlotContent`](index.md#commandslotcontent) + +*** + +### FooterSlot + +> `const` **FooterSlot**: `object` + +#### Type declaration + +##### FooterSlotPrimary + +> `readonly` **FooterSlotPrimary**: `"footer-primary"` + +##### FooterSlotSecondary + +> `readonly` **FooterSlotSecondary**: `"footer-secondary"` + +*** + +### ReplaySlot + +> `const` **ReplaySlot**: `object` + +#### Type declaration + +##### SessionToolbarPrimary + +> `readonly` **SessionToolbarPrimary**: `"session-toolbar-primary"` + +##### SessionToolbarSecondary + +> `readonly` **SessionToolbarSecondary**: `"session-toolbar-secondary"` + +##### Topbar + +> `readonly` **Topbar**: `"topbar"` + +*** + ### API Renames and re-exports [Caido](index.md#caidot-e) diff --git a/src/reference/sdks/workflow/index.md b/src/reference/sdks/workflow/index.md index ed1a166..d6cc66a 100644 --- a/src/reference/sdks/workflow/index.md +++ b/src/reference/sdks/workflow/index.md @@ -57,6 +57,12 @@ The SDK for the Requests service. The SDK for the runtime information. +##### scope + +> **scope**: [`ScopeSDK`](index.md#scopesdk) + +The SDK for the Scope service. + ##### asString() Converts bytes to a string. @@ -1616,6 +1622,14 @@ The name of the reporter. `string` +##### getRequestId() + +The ID of the associated [Request](index.md#request-2). + +###### Returns + +`string` + ##### getTitle() The title of the finding. @@ -2277,3 +2291,57 @@ Get the current version of Caido. ###### Returns `string` + +## Scope + +### Scope + +> **Scope**: `object` + +A saved immutable Scope. + +#### Type declaration + +##### allowlist + +> `readonly` **allowlist**: `string`[] + +The allowlist of the scope. + +##### denylist + +> `readonly` **denylist**: `string`[] + +The denylist of the scope. + +##### id + +> `readonly` **id**: [`ID`](index.md#id) + +The unique Caido [ID](index.md#id) of the scope. + +##### name + +> `readonly` **name**: `string` + +The name of the scope. + +*** + +### ScopeSDK + +> **ScopeSDK**: `object` + +The SDK for the Scope service. + +#### Type declaration + +##### getAll() + +Get all the scopes. + +###### Returns + +`Promise`\<[`Scope`](index.md#scope)[]\> + +An array of [Scope](index.md#scope)