Skip to content

docs(js-sdk): Opened.decrypt({uuid}) may return DecryptDataResult#90

Open
dobby-coder[bot] wants to merge 2 commits into
mainfrom
docs/js-decrypt-uuid-data-result
Open

docs(js-sdk): Opened.decrypt({uuid}) may return DecryptDataResult#90
dobby-coder[bot] wants to merge 2 commits into
mainfrom
docs/js-decrypt-uuid-data-result

Conversation

@dobby-coder
Copy link
Copy Markdown
Contributor

@dobby-coder dobby-coder Bot commented May 14, 2026

Closes #89

Summary

  • Documents the behaviour from encryption4all/postguard-js#67 (merged 2026-05-13): Opened.decrypt({ uuid }) now returns DecryptDataResult when the payload was uploaded with Sealed.upload({ data }), and DecryptFileResult otherwise.
  • Updates the two-input table in docs/sdk/js-decryption.md to note that { uuid } mirrors the upload mode.
  • Rewrites the "Decrypt from Cryptify UUID" section to present DecryptResult as a union, explains the data.bin discriminator briefly, and shows a runtime narrowing example using 'plaintext' in result.
  • Adds a one-line note to the docs/repos/postguard-js.md snippet pointing at the SDK page for the data-mode alternative.
  • Adds a source link pinned to merge commit 146a7ab70ea8acc6071a4c773a8ae467c1c391a9.

Verification

  • npm run docs:build clean (~6s).
  • Source link curl -sI returns 200.

Reviewer quickstart

`git fetch origin && git checkout docs/js-decrypt-uuid-data-result && npm install && npm run docs:dev`

…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
@dobby-coder dobby-coder Bot requested a review from rubenhensen May 14, 2026 21:49
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>
@dobby-coder
Copy link
Copy Markdown
Contributor Author

dobby-coder Bot commented May 14, 2026

Rule compliance check: replaced four em dashes added by this PR with parentheses/periods/colons.

  • docs/sdk/js-decryption.md table row: mirrors the upload mode — see belowmirrors the upload mode (see below)
  • docs/sdk/js-decryption.md code-block comments: // DecryptDataResult — payload was…// DecryptDataResult: payload was… (same for the DecryptFileResult branch)
  • docs/repos/postguard-js.md: Narrow with 'plaintext' in result — see [Decryption — Decrypt from Cryptify UUID](…)Narrow with 'plaintext' in result. See [Decrypt from Cryptify UUID](…) for details.

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).

npm run docs:build clean (~6s).

Copy link
Copy Markdown
Contributor Author

@dobby-coder dobby-coder Bot left a comment

Choose a reason for hiding this comment

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

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.md snippet.
  • Source link verified: curl -sI returns 200, and lines 99-121 at 146a7ab70ea8acc6071a4c773a8ae467c1c391a9/src/opened.ts contain the files.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:build clean (~6s) locally; CI build green.

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.

docs(js-sdk): Opened.decrypt({uuid}) may now return DecryptDataResult when payload was uploaded via {data}

0 participants