Skip to content

docs(sdk/js): document tier-based envelope strategy and EnvelopeResult.attachment breaking change - #39

Merged
rubenhensen merged 1 commit into
mainfrom
dobby/envelope-tiers
May 2, 2026
Merged

docs(sdk/js): document tier-based envelope strategy and EnvelopeResult.attachment breaking change#39
rubenhensen merged 1 commit into
mainfrom
dobby/envelope-tiers

Conversation

@dobby-coder

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

Copy link
Copy Markdown
Contributor

Closes #34. Source PR: encryption4all/postguard-js#34 (merge commit 91c84855).

Summary

  • docs/sdk/js-email-helpers.mdcreateEnvelope() rewritten to document the three-tier model (URL fragment / local attachment / Cryptify upload), the PG_MAX_URL_FRAGMENT_SIZE and PG_MAX_ATTACHMENT_SIZE constants, the uploadToCryptify opt-out, and the new tier / uploadUuid result fields. Result table now lists attachment: File | null. A breaking-change note covers the dropped in-body armor div.
  • extractCiphertext() updated: in-body armor extraction is gone, htmlBody is accepted only for compatibility. New extractUploadUuid() section added so callers can recover tier 3 ciphertext via Cryptify.
  • docs/repos/postguard-js.md — inline comment in the pg.email example updated from envelope.attachment → File("postguard.encrypted") to File | null plus the new tier and uploadUuid fields.
  • docs/repos/postguard-tb-addon.md — added a warning admonition flagging that the snippet's envelope.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:build succeeds.
  • Banned-word scan against the project style guide: clean.
  • One em dash introduced across all changes (rule: target zero, hard max 1 per 1,000 words — within budget).

Reviewer quickstart

git fetch origin && git checkout dobby/envelope-tiers && npm install && npm run docs:dev

…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
rubenhensen merged commit 842842c into main May 2, 2026
1 check passed
@rubenhensen
rubenhensen deleted the dobby/envelope-tiers branch May 2, 2026 10:33
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(sdk/js): document tier-based envelope strategy and EnvelopeResult.attachment breaking change

1 participant