docs(sdk/js): document tier-based envelope strategy and EnvelopeResult.attachment breaking change - #39
Merged
Merged
Conversation
…t.attachment breaking change Closes #34 - Add tier model table (1/2/3) to createEnvelope() in sdk/js-email-helpers.md, with PG_MAX_URL_FRAGMENT_SIZE and PG_MAX_ATTACHMENT_SIZE constants and the uploadToCryptify opt-out. - Update EnvelopeResult fields: attachment is File | null, plus tier and uploadUuid. - Drop the in-body armor reference from extractCiphertext(), document extractUploadUuid() for tier 2/3 ciphertext recovery. - Update repos/postguard-js.md envelope example comment to reflect File | null and the new fields. - Flag the unconditional envelope.attachment.arrayBuffer() call in the Thunderbird addon snippet (repos/postguard-tb-addon.md) as needing a null branch for tier 3. Source: postguard-js merge commit 91c84855 (PR #34).
rubenhensen
approved these changes
May 2, 2026
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 #34. Source PR: encryption4all/postguard-js#34 (merge commit
91c84855).Summary
docs/sdk/js-email-helpers.md—createEnvelope()rewritten to document the three-tier model (URL fragment / local attachment / Cryptify upload), thePG_MAX_URL_FRAGMENT_SIZEandPG_MAX_ATTACHMENT_SIZEconstants, theuploadToCryptifyopt-out, and the newtier/uploadUuidresult fields. Result table now listsattachment: File | null. A breaking-change note covers the dropped in-body armor div.extractCiphertext()updated: in-body armor extraction is gone,htmlBodyis accepted only for compatibility. NewextractUploadUuid()section added so callers can recover tier 3 ciphertext via Cryptify.docs/repos/postguard-js.md— inline comment in thepg.emailexample updated fromenvelope.attachment → File("postguard.encrypted")toFile | nullplus the newtieranduploadUuidfields.docs/repos/postguard-tb-addon.md— added a warning admonition flagging that the snippet'senvelope.attachment.arrayBuffer()call assumes a non-null attachment, so the addon needs a null branch for tier 3. Snippet itself unchanged (it still matches the pinned commit).All new source citations point at the merge commit on encryption4all/postguard-js (
91c84855b4613e9c8c1fe65fc0f5a4dc4c6d11d6).Verification
npm run docs:buildsucceeds.Reviewer quickstart
git fetch origin && git checkout dobby/envelope-tiers && npm install && npm run docs:dev