Skip to content

Commit 8cc81ba

Browse files
yanxue06cursoragent
andcommitted
docs(webhooks): drop poll content arm — not officially supported
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fde8af9 commit 8cc81ba

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

docs-src/webhooks/events.mdx.vel

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const dedupeKey = `${webhookId}:${payload.message.id}`;
151151

152152
#### Content shapes
153153

154-
`content` is a discriminated union tagged by `type`. Every arm has a fixed wire projection — function thunks (`read()`, `stream()`, async OG accessors) and server-internal fields (filesystem paths) are stripped before delivery, since neither survives `JSON.stringify` nor is useful to a remote handler. The SDK's <TypeTooltip name="Content" type={`{{ content.signature }}`} /> union has 14 published arms today plus two forward-compat arms (`rename`, `avatar`) the worker handles defensively; the two you'll see on the vast majority of inbound deliveries are `text` and `attachment`:
154+
`content` is a discriminated union tagged by `type`. Every arm has a fixed wire projection — function thunks (`read()`, `stream()`, async OG accessors) and server-internal fields (filesystem paths) are stripped before delivery, since neither survives `JSON.stringify` nor is useful to a remote handler. The SDK's <TypeTooltip name="Content" type={`{{ content.signature }}`} /> union has 12 published arms today plus two forward-compat arms (`rename`, `avatar`) the worker handles defensively; the two you'll see on the vast majority of inbound deliveries are `text` and `attachment`:
155155

156156
```ts
157157
type Content =
@@ -268,24 +268,6 @@ Every arm of the `Content` union, post-projection. Hand-written rather than vell
268268
| `items` | `SerializedInboundMessage[]` | Each item is a full inbound-message projection (recursed). The SDK forbids nested groups. |
269269
</Accordion>
270270

271-
<Accordion title="poll" description="A poll definition.">
272-
| Field | Type | Description |
273-
| --- | --- | --- |
274-
| `type` | `"poll"` | Discriminator. |
275-
| `title` | `string` | Poll title. |
276-
| `options` | `{ title: string }[]` | Available choices. |
277-
</Accordion>
278-
279-
<Accordion title="poll_option" description="A vote on a poll option.">
280-
| Field | Type | Description |
281-
| --- | --- | --- |
282-
| `type` | `"poll_option"` | Discriminator. |
283-
| `title` | `string` | Title of the chosen option. |
284-
| `option` | `{ title }` | Echo of the option for convenience. |
285-
| `poll` | `SerializedPoll` | Full poll context (which one was voted on). |
286-
| `selected` | `boolean` | `true` for selected, `false` for deselected. |
287-
</Accordion>
288-
289271
<Accordion title="effect" description="An iMessage-style effect wrapping inner content.">
290272
| Field | Type | Description |
291273
| --- | --- | --- |

0 commit comments

Comments
 (0)