Update and correct all public JSDoc in AVClient and AVVerifier - #371
Merged
Conversation
av-mads
approved these changes
Jun 30, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 19 changed files in this pull request and generated 8 comments.
Files not reviewed (3)
- docs/assets/hierarchy.js: Generated file
- docs/assets/navigation.js: Generated file
- docs/assets/search.js: Generated file
Comments suppressed due to low confidence (1)
lib/av_client.ts:184
AVClient.requestAccessCodeaccepts an optionalballotReference, butIAVClientstill declaresrequestAccessCode(opaqueVoterId: string, email: string)only. Consumers typing againstIAVClientwon’t be able to passballotReferenceeven though it’s supported by the concrete implementation.
public async requestAccessCode(
opaqueVoterId: string,
email: string,
ballotReference?: string,
): Promise<void> {
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 26 changed files in this pull request and generated 4 comments.
Files not reviewed (3)
- docs/assets/hierarchy.js: Generated file
- docs/assets/navigation.js: Generated file
- docs/assets/search.js: Generated file
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 26 changed files in this pull request and generated 7 comments.
Files not reviewed (3)
- docs/assets/hierarchy.js: Generated file
- docs/assets/navigation.js: Generated file
- docs/assets/search.js: Generated file
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 26 changed files in this pull request and generated 2 comments.
Files not reviewed (3)
- docs/assets/hierarchy.js: Generated file
- docs/assets/navigation.js: Generated file
- docs/assets/search.js: Generated file
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.
AB#29388
JSDoc Update — AVClient & AVVerifier
What changed
All public method documentation in
lib/av_client.tsandlib/av_verifier.tswas reviewedline-by-line against the actual code and cross-referenced with real usage in
election-clientand
IVR. Every claim was verified against the source before being written.AVClient
initialize@throws InvalidConfigErrorwhen injected config fails validation (validateLatestConfiginelection_config.tsthrows it)requestAccessCodeVoterRecordNotFound→VoterRecordNotFoundError; added@throws EmailDoesNotMatchVoterRecordError(also thrown by the coordinator)createVoterRegistrationidentityConfirmationTokenis set viasetIdentityToken, the identity path is used regardless ofauthorizationMode— this matches the `expireVoterSessionsgenerateProofOfElectionCodesas documented prerequisite (method usesthis.proofOfElectionCodes); added@throws InvalidTokenError(thrown whenjwtDecodereturns null)extendVoterSessionsthis.voterSession.address— the no-op fires whenaddressis falsy, but ifvoterSessionitself is undefined a TypeError is thrownchallengeBallotsubmitCommitmentOpeningsis called withoutawait(fire-and-forget); removed incorrect@throws NetworkError; addedconstructBallotas prerequisite (it generatesvoterCommitmentOpeningandverifierItemused here)waitForVerifierRegistrationGET /verification/verifiertoGET /verification/verifiers/{address}(path param, plural — verified inbulletin_board.ts:124)disableVoterthis.voterSession.content.votingRoundReferenceAVVerifier
validateReceiptparseReceipt→validateTrackingCode→verifyAddress→validateReceipt(DBB sig). Previous doc had tracking code check lastgetReadableContestSelections@throws InvalidOptionError— thrown bymakeOptionFinderinoption_finder.ts:13when an option reference is not foundPublic API exports
Error classes thrown by public methods but previously unexported were added to the module's
public surface so consumers can catch them by type:
av_client.ts— addedInvalidTokenError,VoterRecordNotFoundErrorav_verifier.ts— addedInvalidContestError,InvalidOptionError,InvalidReceiptError,InvalidTrackingCodeError,NetworkErrorDocs
Regenerated
docs/viayarn docs(TypeDoc 0.28). Result: 0 errors, 0 warnings.What did not change
purgeDatawas not reintroduced (removed in PR Remove purgeData method and bump version to 6.4.1-beta.2 #367).Files modified
lib/av_client.ts— JSDoc only, plus two new error exportslib/av_verifier.ts— JSDoc only, plus error imports/exportsdocs/— regenerated output (TypeDoc)