Skip to main content

Function: sealAgreementPackage()

sealAgreementPackage(contractorId): Promise<SealResult>

Defined in: src/server/services/agreements/seal.ts:28

Seal the contractor's agreement package once it is fully executed: verify every document carries both the contractor's and the company's signature, render the sealed PDF from the FROZEN snapshot (the exact signed text — not a fresh re-merge), store it in the private contractor-agreements bucket, and move the package to completed with its storage path.

No-op (sealed:false) when there's no open package or it isn't fully signed yet, so it's safe to call after every signature. Idempotent: once completed, the package is terminal and won't be re-sealed.

Parameters

contractorId

string

Returns

Promise<SealResult>