docs(js-sdk): Opened.decrypt({uuid}) may return DecryptDataResult#90
Open
dobby-coder[bot] wants to merge 2 commits into
Open
docs(js-sdk): Opened.decrypt({uuid}) may return DecryptDataResult#90dobby-coder[bot] wants to merge 2 commits into
dobby-coder[bot] wants to merge 2 commits into
Conversation
…uuid})
Reflects postguard-js#67 (merged 2026-05-13): when the payload was
uploaded with Sealed.upload({ data }), the SDK now unwraps the inner
data.bin entry and returns DecryptDataResult instead of
DecryptFileResult. Update the input table, rewrite the UUID section to
present the DecryptResult union with a narrowing snippet, and add a
one-line note to the repos/ snippet.
Closes #89
Style rule (postguard-docs writing-rules) caps em dashes at zero where possible, hard max 1 per 1,000 words. The added paragraphs introduced four em dashes; this swaps them for parentheses, periods, or colons. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
|
Rule compliance check: replaced four em dashes added by this PR with parentheses/periods/colons.
Rule: PostGuard writing style rules — em dashes target zero, hard max 1 per 1,000 words. Pre-existing em dashes elsewhere in these files were not touched (out of scope).
|
Contributor
Author
There was a problem hiding this comment.
Self-review (cannot --approve own PR — verdict: would-approve).
- Diff matches PR description: union return type documented, two-input table updated, narrowing example added, cross-link on
postguard-js.mdsnippet. - Source link verified:
curl -sIreturns 200, and lines 99-121 at146a7ab70ea8acc6071a4c773a8ae467c1c391a9/src/opened.tscontain thefiles.length === 1 && files[0] === 'data.bin'unwrap path described in prose. - Style: no em dashes in the added text (already swapped in the prior compliance pass), no banned vocabulary.
npm run docs:buildclean (~6s) locally; CI build green.
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.
Closes #89
Summary
Opened.decrypt({ uuid })now returnsDecryptDataResultwhen the payload was uploaded withSealed.upload({ data }), andDecryptFileResultotherwise.docs/sdk/js-decryption.mdto note that{ uuid }mirrors the upload mode.DecryptResultas a union, explains thedata.bindiscriminator briefly, and shows a runtime narrowing example using'plaintext' in result.docs/repos/postguard-js.mdsnippet pointing at the SDK page for the data-mode alternative.146a7ab70ea8acc6071a4c773a8ae467c1c391a9.Verification
npm run docs:buildclean (~6s).curl -sIreturns 200.Reviewer quickstart
`git fetch origin && git checkout docs/js-decrypt-uuid-data-result && npm install && npm run docs:dev`