Repository navigation
Document typed Search Attributes for the TypeScript SDK - #5865
Conversation
The TypeScript observability page only showed the deprecated searchAttributes record. Show defineSearchAttributeKey, WorkflowOptions.typedSearchAttributes, WorkflowInfo.typedSearchAttributes, and removing an attribute by upserting null. Samples come from temporalio/documentation-sdk-code-examples branch duncan/ts-typed-search-attributes, which must merge first. For temporalio/sdk-typescript#1908.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Snipsync coverageSDK code lines in
All sectionsAll languages: 53.7% (27,410 of 51,073 lines).
Compared with |
📖 Docs PR preview links
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the documentation updates covering typed Search Attributes and legacy-option deprecation.
No open issues 🎉
What changed in this PR
Updates the TypeScript SDK documentation to demonstrate typed Search Attributes and identify the legacy searchAttributes option as deprecated.
Changes:
- Adds examples for shared typed keys, setting and reading values, upserting attributes, and removing them with
null. - Updates Continue-As-New guidance to reference
typedSearchAttributes.
| File | Description |
|---|---|
docs/develop/typescript/workflows/workflow-streams.mdx |
Names the typed Continue-As-New option. |
docs/develop/typescript/platform/observability.mdx |
Documents typed Search Attribute usage and legacy-option deprecation. |
Review effort: Balanced
Fixes temporalio/sdk-typescript#1908. The TypeScript observability page showed only the deprecated
searchAttributesrecord, with no example of the typed API.Changes
develop/typescript/platform/observability.mdx: shows how to define keys withdefineSearchAttributeKey, set values withWorkflowOptions.typedSearchAttributes, read them withgeton the Client and in the Workflow, upsert key-value pairs, and remove an attribute by upsertingnull. Says thesearchAttributesoption is deprecated.develop/typescript/workflows/workflow-streams.mdx: namestypedSearchAttributesinstead ofsearchAttributesas a Continue-As-New option.Blocked on
temporalio/documentation-sdk-code-examples#319, which holds the samples these snippets come from. I filled the snippets from that branch locally, and the source links already point at
blob/main, so the Snipsync run after it merges should produce no diff. Keep this PR a draft until #319 merges.Follow-ups not in this PR
guides/recover-without-restart.mdxdefines the same keys in three files and reads values withwf.searchAttributes?.LoanStatus?.[0].design-patterns/resumable-activity.mdx(TypeScript tab) callsupsertSearchAttributes({ TransferStatus: [status] }).Both are hand-written code covered by the Snipsync migration.