feat(turbosign): support conditional (IF/THEN) fields across all SDKs - #71
Merged
Merged
Conversation
A signature field can now carry an optional `metadata` object that makes it
depend on a controlling checkbox: set `metadata.fieldKey` on a `checkbox` field,
and `metadata.conditional` = { controllingFieldKey, operator, action } on a
dependent field. `operator` is "is_checked" | "is_not_checked"; `action` is
"show" (hidden until met) | "unlock" (visible but read-only until met). It flows
through the single-step prepare-for-signing / prepare-for-review routes and rides
along in the already-serialized fields payload.
Implemented consistently in all six SDKs (JS/TS, Python, Go, PHP, Java, Ruby)
with matching types, examples, README sections, and tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Coordinated conditional-fields rollout — sibling PRs: TurboDocx/n8n-nodes-turbodocx#31 · TurboDocx/Docs#150 · TurboDocx/quickstart#24 |
This was referenced Aug 19, 2026
Merged
… SDKs
A dedicated, runnable example per language (JS/TS, Python, Go, PHP, Java, Ruby)
showing a checkbox that controls other fields: three controlling checkboxes drive
four dependents across show/unlock and is_checked/is_not_checked, including one
checkbox driving two dependents, plus a plain required signature. Uses
createSignatureReviewLink (no emails sent) and notes the InvalidConditionalRule
400 and the fail-open behavior.
All six author the identical wire shape — metadata.{fieldKey,
conditional{controllingFieldKey, operator, action}} — verified against the JS SDK
run end-to-end against the API. JS typechecks and Python compiles locally; the
typed SDKs are written to their real types (Go structs, PHP enums, Java
FieldMetadata factories) and build in CI.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
php-cs-fixer's ensure_fully_multiline requires one named argument per line on a multi-line call. The four dependent-field new Field(...) constructors had their args wrapped two-to-a-line, which failed the cs-fix --dry-run check. Reformat them one-arg-per-line to match; the single-line checkbox constructors are unaffected. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Adds support for TurboSign conditional (IF/THEN) fields to all six SDKs. A signature field can now carry an optional
metadataobject so a controlling checkbox drives a dependent field:checkboxfield:metadata.fieldKey— a stable id.metadata.conditional={ controllingFieldKey, operator, action }operator:"is_checked"|"is_not_checked"action:"show"(hidden until met) |"unlock"(visible but read-only until met)It flows through the single-step
sendSignature/createSignatureReviewLinkroutes and rides along in the already-serializedfieldspayload — no new serialization path.What changed
Implemented consistently across JS/TS, Python, Go, PHP, Java, Ruby: the
metadata/conditionaltypes (typed where the language is typed, pass-through where dynamic), advanced examples, README "Field Types" sections, and tests. The controlling checkbox type already existed in every SDK.Verification
npm test(54 pass) +tscbuild green.Notes
Part of a coordinated conditional-fields rollout across the TurboDocx public repos (Docs, n8n node, quickstart) — sibling PRs linked in a follow-up comment.