Update SDK Documentation#103
Open
caidobot wants to merge 1 commit into
Open
Conversation
73d85ed to
d8788b2
Compare
d8788b2 to
d613a0e
Compare
d613a0e to
c45be26
Compare
c45be26 to
1a5cb04
Compare
1a5cb04 to
08b7d5c
Compare
08b7d5c to
3a07f53
Compare
3a07f53 to
b4df646
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the generated SDK reference docs to reflect newer, more strongly-typed SDK surfaces (especially around UI component props, slot content, view modes, and backend plugin package specs), and introduces documentation for the frontend Websocket SDK.
Changes:
- Frontend SDK reference: parameterizes
ComponentDefinitionand many slot/view-mode types with explicit props types (including SDK-injected props), and adds missing prop-type definitions. - Adds the
WebsocketSDKreference and message view-mode extension types. - Backend SDK reference: introduces
DefinePluginPackageSpec, marks olderDefineAPI/DefineEventsas deprecated, and updatesAPISDKtyping to support spec-based APIs/events.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/reference/sdks/frontend/window.md | Introduces DialogComponent and narrows showDialog() to use it. |
| src/reference/sdks/frontend/websockets.md | Adds message view mode types and the new WebsocketSDK section. |
| src/reference/sdks/frontend/utils.md | Makes ComponentDefinition generic; adds ComponentProps*, QueryInput, StreamQL. |
| src/reference/sdks/frontend/slots.md | Parameterizes slot content types and adds slot props group types. |
| src/reference/sdks/frontend/sitemap.md | Updates request/response view-mode option types to include concrete props types. |
| src/reference/sdks/frontend/search.md | Fixes SearchSlotContent linking and adds a generic SearchSlotContent type. |
| src/reference/sdks/frontend/scopes.md | Adds generic ScopeSlotContent and updates addToSlot to reference it locally. |
| src/reference/sdks/frontend/response.md | Parameterizes response view-mode options and adds view-mode props types. |
| src/reference/sdks/frontend/request.md | Adds readable/writable request view-mode props types and parameterizes RequestViewModeOptions. |
| src/reference/sdks/frontend/replay.md | Adds ConnectionInfo, updates view-mode option typing, adjusts showEntry() signature, and adds generic ReplaySlotContent. |
| src/reference/sdks/frontend/other.md | Removes old slot content types and adds ResolvedAPI / ResolvedEvents helpers. |
| src/reference/sdks/frontend/match-and-replace.md | Adds websocket sections/operations and broadens rule queries to QueryInput. |
| src/reference/sdks/frontend/intercept.md | Updates request/response view-mode option typing to include concrete props types. |
| src/reference/sdks/frontend/index.md | Extends backend type parameter to include BackendSpec; adds websocket SDK entry. |
| src/reference/sdks/frontend/http-history.md | Updates view-mode option typing and adds generic HTTPHistorySlotContent. |
| src/reference/sdks/frontend/footer.md | Replaces explicit footer slot content object with generic mapped FooterSlotContent<TProps>. |
| src/reference/sdks/frontend/findings.md | Updates external Finding link and view-mode option typing. |
| src/reference/sdks/frontend/filter.md | Replaces explicit filter slot content object with generic mapped FilterSlotContent<TProps>. |
| src/reference/sdks/frontend/command-palette.md | Types custom view definitions with explicit props and adds command palette view props types. |
| src/reference/sdks/frontend/backend.md | Updates BackendSDK typing to use ResolvedAPI / ResolvedEvents and allows BackendSpec. |
| src/reference/sdks/backend/shared.md | Marks DefineAPI/DefineEvents as deprecated and adds DefinePluginPackageSpec. |
| src/reference/sdks/backend/other.md | Adds callback/spec helper types (APICallback, EventParameters, PluginPackageSpec, etc.). |
| src/reference/sdks/backend/index.md | Updates the introductory SDK link target. |
| src/reference/sdks/backend/api.md | Updates APISDK type parameters and improves callback/event argument typing via resolved spec helpers. |
Comments suppressed due to low confidence (1)
src/reference/sdks/frontend/websockets.md:86
- The description under
WebsocketPageContextsays "Certificate page context.", which appears to be a copy/paste error and is misleading in this reference page. Update it to describe the Websocket page context.
### WebsocketPageContext
> **WebsocketPageContext** = `object`
Certificate page context.
| ##### props? | ||
|
|
||
| > `optional` **props**: `Record`\<`string`, `unknown`\> | ||
| > `optional` **props**: [`ComponentProps`](#componentprops) |
Comment on lines
+102
to
+110
| ### ResolvedAPI | ||
|
|
||
| > **ReplaySlotContent** = `object` | ||
| > **ResolvedAPI**\<`T`\> = `T` *extends* `object` ? `A` : `T` | ||
|
|
||
| #### Properties | ||
| #### Type Parameters | ||
|
|
||
| ##### session-toolbar-primary | ||
| | Type Parameter | | ||
| | ------ | | ||
| | `T` | |
Comment on lines
+114
to
+123
| ### ResolvedEvents | ||
|
|
||
| > **session-toolbar-secondary**: [`ButtonSlotContent`](slots.md#buttonslotcontent) \| [`CustomSlotContent`](slots.md#customslotcontent) \| [`CommandSlotContent`](slots.md#commandslotcontent) | ||
| > **ResolvedEvents**\<`T`, `E`\> = `T` *extends* `object` ? `A` : `E` | ||
|
|
||
| ##### topbar | ||
| #### Type Parameters | ||
|
|
||
| > **topbar**: [`ButtonSlotContent`](slots.md#buttonslotcontent) \| [`CustomSlotContent`](slots.md#customslotcontent) \| [`CommandSlotContent`](slots.md#commandslotcontent) | ||
| | Type Parameter | | ||
| | ------ | | ||
| | `T` | | ||
| | `E` | |
Comment on lines
+435
to
+443
| ### ResolvedAPI | ||
|
|
||
| > **ResolvedAPI**\<`T`\> = `T` *extends* `object` ? `A` : `T` | ||
|
|
||
| #### Type Parameters | ||
|
|
||
| | Type Parameter | | ||
| | ------ | | ||
| | `T` | |
Comment on lines
+447
to
+456
| ### ResolvedEvents | ||
|
|
||
| > **ResolvedEvents**\<`T`, `Events`\> = `T` *extends* `object` ? `A` : `Events` | ||
|
|
||
| #### Type Parameters | ||
|
|
||
| | Type Parameter | | ||
| | ------ | | ||
| | `T` | | ||
| | `Events` | |
|
|
||
| This is the reference for the backend SDK used by backend plugins. | ||
| [SDK](#events) is the main interface that provides access to various services and functionalities. | ||
| [SDK](other.md#events) is the main interface that provides access to various services and functionalities. |
Comment on lines
+218
to
+232
| ### QueryInput | ||
|
|
||
| > **QueryInput** = [`HTTPQL`](#httpql) \| [`StreamQL`](#streamql) | ||
|
|
||
| A query input. | ||
|
|
||
| #### Examples | ||
|
|
||
| ```ts | ||
| `"req.method.eq:'POST'"` | ||
| ``` | ||
|
|
||
| ```ts | ||
| `"ws.raw.cont:'hello'"` | ||
| ``` |
Comment on lines
+361
to
+368
| > **MaybePromise**\<`T`\> = `T` \| `Promise`\<`T`\> | ||
|
|
||
| #### Type Parameters | ||
|
|
||
| | Type Parameter | | ||
| | ------ | | ||
| | `T` | | ||
|
|
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.