Skip to content

Document typed Search Attributes for the TypeScript SDK - #5865

Merged
Duncanma merged 1 commit into
mainfrom
duncan/typed-search-attributes-docs-825687
Dec 3, 2026
Merged

Duncanma merged 1 commit into
mainfrom
duncan/typed-search-attributes-docs-825687

Conversation

@Duncanma

@Duncanma Duncanma commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Fixes temporalio/sdk-typescript#1908. The TypeScript observability page showed only the deprecated searchAttributes record, with no example of the typed API.

Changes

  • develop/typescript/platform/observability.mdx: shows how to define keys with defineSearchAttributeKey, set values with WorkflowOptions.typedSearchAttributes, read them with get on the Client and in the Workflow, upsert key-value pairs, and remove an attribute by upserting null. Says the searchAttributes option is deprecated.
  • develop/typescript/workflows/workflow-streams.mdx: names typedSearchAttributes instead of searchAttributes as 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.mdx defines the same keys in three files and reads values with wf.searchAttributes?.LoanStatus?.[0].
  • design-patterns/resumable-activity.mdx (TypeScript tab) calls upsertSearchAttributes({ TransferStatus: [status] }).

Both are hand-written code covered by the Snipsync migration.

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.
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
temporal-documentation Ready Ready Preview Dec 2, 2026 11:52pm UTC

Request Review

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Snipsync coverage

SDK code lines in docs/ that come from Snipsync: 62.7% → 62.7% (±0.0 pts), 26,543 of 42,355 lines.

Section Snipsync lines Inline lines Snipsync % Change
develop/typescript 3,752 → 3,757 313 92.3% → 92.3% ±0.0 pts
All sections

All languages: 53.7% (27,410 of 51,073 lines).

Section Snipsync lines Inline lines Snipsync %
design-patterns 26 7,808 0.3%
develop/python 5,748 536 91.5%
develop/java 4,639 49 99.0%
guides 34 4,446 0.8%
develop/go 4,384 93 97.9%
develop/typescript 3,757 313 92.3%
develop/dotnet 3,029 7 99.8%
develop/rust 1,571 0 100.0%
develop/php 1,394 0 100.0%
develop/ruby 1,302 2 99.8%
develop 484 606 44.4%
production-deployment 116 746 13.5%
encyclopedia 0 837 0.0%
develop/worker-performance 48 177 21.3%
cloud 0 127 0.0%
references 0 48 0.0%
best-practices 11 17 39.3%
Language Snipsync lines Inline lines Snipsync %
Python 5,891 6,568 47.3%
Go 4,524 3,194 58.6%
Java 4,724 2,593 64.6%
TypeScript 3,924 2,777 58.6%
C# 3,104 464 87.0%
Rust 1,609 31 98.1%
Ruby 1,373 161 89.5%
PHP 1,394 24 98.3%
Snipsync origin Lines
temporalio/documentation-sdk-code-examples 21,252
temporalio/samples-python 2,821
temporalio/samples-typescript 743
temporalio/samples-dotnet 655
temporalio/features 464
temporalio/samples-go 413
temporalio/samples-java 184
temporalio/reference-app-orders-go 11

Compared with 978ccf6. Counts non-blank lines in fenced code blocks and <CodeSnippet> elements tagged with an SDK language. Hand-written code isn't compiled anywhere; code Snipsync pulls from a sample repository is built in that repository's CI. See UTILITIES.md.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

@Duncanma
Duncanma marked this pull request as ready for review December 3, 2026 00:04
@Duncanma
Duncanma requested a review from a team as a code owner December 3, 2026 00:04
Copilot AI balanced review requested due to automatic review settings December 3, 2026 00:04
@Duncanma
Duncanma merged commit f262516 into main Dec 3, 2026
21 checks passed
@Duncanma
Duncanma deleted the duncan/typed-search-attributes-docs-825687 branch December 3, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

This branch was successfully deployed

1 active deployment
Preview — 542a7c03 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Update documentation and examples on how to use typedSearchAttributes

2 participants