Repository navigation
typescript SDK, node and ts upgrades - #13
Conversation
…P sends searchAttributes)
longquanzheng
left a comment
There was a problem hiding this comment.
would be nice to start with adding the CI workflow in github action, like other SDKs. otherwise looks great.
@longquanzheng are you referring running integration tests on PR merge? (like https://github.com/indeedeng/iwf-java-sdk/blob/main/.github/workflows/ci-integ-test.yml). I can get those in if so. We're also building out an internal repo with typescript samples (similar to all the java samples) and verifying 100% parity before merging this PR. We'll probably add a more generic version of those samples for the public space as well. |
yes exactly. |
AUTOPLAT-1868: adding type
Integration test action
…lowDataAttributes getAllWorkflowDataAttributes resolved the registry's exactly-declared keys and sent them as a key filter, so any runtime-named attribute written under a dataAttributePrefixDef was silently missing from the result. Send no filter instead, which the iwf server treats as "return everything" — matching Java's Client.getAllDataAttributes, which passes null keys for exactly this reason. getAllWorkflowSearchAttributes is intentionally left alone: Java also builds the full declared key-type list there, since the server needs the types to decode. Found while porting the Java integration suite (AUTOPLAT-1933), where PersistenceTest.testPersistenceWorkflow asserts 5 data attributes and the TS port saw 4. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
include prefix-declared data attributes in getAllWorkflowDataAttributes
…on-gap resolve wait for state gap
… and export workflow already started options
default waitForStateExecutionCompletion stateExecutionNumber to 1
…nd StateRecoveryTest
…eOptionsOverrideTest and AnyCommandCombinationTest
AUTOPLAT-1937: add method to get all internal channel command results…
Port all integration tests
prepare script to temporarily unblock ci
Make Failure Recovery settings consistent with Java SDK
This branch builds out the TypeScript SDK to feature parity with the Java, Python, and Go SDKs. The remaining differences are intentional and documented in IWF_SDK_FEATURES.md.
What's here
Parity audit
I audited the whole surface against the Java SDK and closed every gap it found — execute-failure recovery state, per-API persistence loading policies, useMemoForDataAttributes, no-wait "try-get" results, workflowAlreadyStartedOptions / skipUpdateReapply, sending registered search-attribute key-types on RPC, and the runtime validation Java does (single starting state, attribute-type checks, empty-decision rejection, duplicate recordEvent keys, publish-and-wait on one channel, duplicate registration, etc.). Also fixed getSearchAttributeInt precision and the datetime format handling.
Housekeeping
A few things are deliberately idiomatic for TS: a pluggable ObjectEncoder instead of Class-based typing, a flatter error model with boolean getters, and a single string-named RPC handler instead of Java's functional-interface variants.