docs(js-sdk): document onUploadInit callback for upload resume#95
Merged
Conversation
Adds an 'onUploadInit' subsection under 'Resume an interrupted upload' in docs/sdk/js-encryption.md covering the callback added in postguard-js#71 on UploadOptions and CreateEnvelopeOptions, with the signature, firing contract, persistence use case, and stream-handler caveat. Removes the stale 'Current limitation' paragraph that pointed at postguard-js#68 — that issue is resolved by #71. Closes #94
Contributor
Author
There was a problem hiding this comment.
Reviewed and verified (bot cannot self-approve, so this is a comment review):
- Source links resolve and the line ranges match the JSDoc at
dcdd6591(verified via raw.githubusercontent). UploadOptions.onUploadInitis atsrc/types.ts#L107-L112; theCreateEnvelopeOptionsforward is atsrc/types.ts#L246-L250. Both check out.- Examples for
Sealed.uploadandcreateEnvelopemirror the public API correctly. - The replaced "Current limitation" paragraph referenced the now-resolved postguard-js#68 follow-up; removal is appropriate.
npm run docs:buildsucceeds in ~6s; built page contains the new section.- Writing style holds: no banned words, no em dashes, no extraneous bold.
No blockers. LGTM, ready for @rubenhensen to merge.
Contributor
Author
|
Rule compliance pass found two issues in the PR body (docs content itself is clean):
No code changes. |
Contributor
Author
There was a problem hiding this comment.
Verified at commit 0111f3a (bot cannot self-approve, so this is a comment review with an approve verdict):
- Source links return HTTP 200 at
dcdd6591; both line ranges match the JSDoc and signatures (UploadOptionsL107-L112,CreateEnvelopeOptionsL246-L250). npm install+npm run docs:buildsucceed in ~23s; builtdist/sdk/js-encryption.htmlcontains the newonUploadInitsection.- Examples for both
Sealed.uploadandcreateEnvelopemirror the public API as defined in postguard-js types. - Replacing the old 'Current limitation' paragraph is correct now that the linked postguard-js follow-up is resolved.
- Writing style is clean: no banned words, no em dashes, no inflated bold.
Verdict: approve. Ready for @rubenhensen to merge.
rubenhensen
approved these changes
May 17, 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.
Summary
Documents the
onUploadInitcallback added in encryption4all/postguard-js#71 (merged atdcdd6591) onUploadOptionsandCreateEnvelopeOptions. Replaces the stale "Current limitation" paragraph indocs/sdk/js-encryption.mdthat pointed at encryption4all/postguard-js#68; that issue is now resolved.The new subsection under "Resume an interrupted upload" covers:
(info: { uuid: string; recoveryToken: string }) => voidupload_initresolves and before the first chunk PUT{uuid, recoveryToken}so a laterresumeUploadcan rehydrate after a process restartstarthandler; a throw errors the streamSealed.uploadandcreateEnvelopeSource verified against
src/types.ts#L107-L112(UploadOptions) andsrc/types.ts#L246-L250(CreateEnvelopeOptions) atdcdd6591f58976364f8220f4cedbe86d0e2bce3b.Closes #94
Test plan
npm run docs:buildsucceeds (~6s)dist/sdk/js-encryption.htmlcontains the newonUploadInitcontentReviewer quickstart
Then open http://localhost:5173/sdk/js-encryption.html#capture-recoverytoken-via-onuploadinit