Update SDK Documentation - #129
Open
caidobot wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for caido-doc-developer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the SDK reference documentation to reflect newer frontend/backend SDK typing (generic component/slot props, backend spec typing), adds newly exposed SDK methods/types (e.g., Websocket SDK, replay helpers), and refreshes a few docs links/examples.
Changes:
- Introduce generic
ComponentDefinition<TProps>and propagate typed slot/view-mode props across multiple frontend SDK docs. - Add/expand documentation for new SDK capabilities (Websocket SDK, replay indicators/session creation, selected request/response getters, etc.).
- Deprecate older backend typing helpers in favor of a plugin package spec type, and refresh some documentation links.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| src/plugins/reference/sdks/workflow/other.md | Updates backend log retrieval documentation link. |
| src/plugins/reference/sdks/frontend/window.md | Documents DialogComponent typing and adds active request/response editor getters. |
| src/plugins/reference/sdks/frontend/websockets.md | Adds Websocket SDK/types for custom message view modes. |
| src/plugins/reference/sdks/frontend/utils.md | Makes ComponentDefinition generic; adds component prop helpers and query input types. |
| src/plugins/reference/sdks/frontend/slots.md | Adds typed slot-content props/groups and generics for slot content unions. |
| src/plugins/reference/sdks/frontend/sitemap.md | Tightens request/response view mode typing; adds selected request/response getters. |
| src/plugins/reference/sdks/frontend/search.md | Tightens view mode typing; adds selected request/response getters and typed slot content. |
| src/plugins/reference/sdks/frontend/scopes.md | Adds typed scope slot content and updates addToSlot typing. |
| src/plugins/reference/sdks/frontend/response.md | Adds generic response view-mode options and response view-mode props docs. |
| src/plugins/reference/sdks/frontend/request.md | Adds readable/writable request view-mode prop docs and generic options typing. |
| src/plugins/reference/sdks/frontend/replay.md | Expands replay SDK docs (indicators, sessions, WebSocket message view modes, selection getters). |
| src/plugins/reference/sdks/frontend/other.md | Refactors misc frontend types (HTTPQL editor props, resolved backend typing helpers). |
| src/plugins/reference/sdks/frontend/match-and-replace.md | Adds websocket match/replace sections and updates query typing to QueryInput. |
| src/plugins/reference/sdks/frontend/intercept.md | Tightens view mode typing; adds selected request/response getters. |
| src/plugins/reference/sdks/frontend/index.md | Expands SDK generic constraints; adds GraphQL error-handling guidance and websocket SDK property. |
| src/plugins/reference/sdks/frontend/http-history.md | Tightens view mode typing; adds selected request/response getters; adds typed slot content. |
| src/plugins/reference/sdks/frontend/footer.md | Converts footer slot content to a typed mapped type with generics. |
| src/plugins/reference/sdks/frontend/findings.md | Updates findings documentation link; tightens view mode typing; adds selected request/response getters. |
| src/plugins/reference/sdks/frontend/filter.md | Converts filter slot content to a typed mapped type with generics. |
| src/plugins/reference/sdks/frontend/files.md | Fixes ListenerHandle type links for hosted-file listeners. |
| src/plugins/reference/sdks/frontend/command-palette.md | Makes custom view component definition typed and documents view props. |
| src/plugins/reference/sdks/frontend/backend.md | Updates backend SDK typing to support BackendSpec and resolved API/events helpers. |
| src/plugins/reference/sdks/frontend/automate.md | Tightens view mode typing; adds selected request/response getters. |
| src/plugins/reference/sdks/frontend/ai.md | Adjusts upstream provider docs and reshapes provider fields/types. |
| src/plugins/reference/sdks/backend/shared.md | Deprecates DefineAPI/DefineEvents; introduces plugin package spec helper type. |
| src/plugins/reference/sdks/backend/other.md | Adds backend typing utilities for callbacks, spec validation, and resolved API/events. |
| src/plugins/reference/sdks/backend/index.md | Adjusts main SDK link target in backend SDK docs. |
| src/plugins/reference/sdks/backend/api.md | Updates API RPC typings to use resolved spec-based API/events. |
| src/plugins/reference/modules/llrt/buffer.md | Reformats a long MDN link line (currently introduces hard wraps). |
| src/plugins/reference/modules/extra/console.md | Updates backend log retrieval documentation link. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1660
to
+1662
| `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- | ||
| Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- | ||
| er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. |
| ### ResolvedAPI | ||
|
|
||
| > **ReplaySlotContent** = `object` | ||
| > **ResolvedAPI**\<`T`\> = `T` *extends* `object` ? `A` : `T` |
| ### ResolvedEvents | ||
|
|
||
| > **session-toolbar-secondary**: [`ButtonSlotContent`](slots.md#buttonslotcontent) \| [`CustomSlotContent`](slots.md#customslotcontent) \| [`CommandSlotContent`](slots.md#commandslotcontent) | ||
| > **ResolvedEvents**\<`T`, `E`\> = `T` *extends* `object` ? `A` : `E` |
| [`MaybePromise`](shared.md#maybepromise)\<`void`\> | ||
|
|
||
| *** | ||
|
|
|
|
||
| ### EventParameters | ||
|
|
||
| > **EventParameters**\<`T`\> = `T` *extends* [`AnyVoidFn`](#anyvoidfn) ? `A` : [`InvalidEventParametersMessage`](#invalideventparametersmessage) |
| #### Examples | ||
|
|
||
| ```ts | ||
| `"req.method.eq:'POST'"` |
| ``` | ||
|
|
||
| ```ts | ||
| `"ws.raw.cont:'hello'"` |
| #### Example | ||
|
|
||
| ```ts | ||
| `ws.raw.cont:"hello"` |
Comment on lines
+905
to
+907
| ### ReplaySessionKind | ||
|
|
||
| > **ReplaySessionKind** = *typeof* [`ReplaySessionKind`](#replaysessionkind)\[keyof *typeof* [`ReplaySessionKind`](#replaysessionkind-1)\] |
| *** | ||
|
|
||
| > `optional` **overwriteDraft**: `boolean` | ||
| ### ReplaySessionKind |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.