Function: createAgreementPackage()
createAgreementPackage(
contractorId,opts?):Promise<GeneratedPackage>
Defined in: src/server/services/agreements/package.ts:36
Generate (or regenerate) the contractor's package: build the live merge data, render the included
documents, and freeze both as the snapshot on a single non-terminal contractor_agreements row.
A regenerate replaces the open row in place and bumps version. Throws if the contractor has no
position config / assignment to merge from (surfaced to the admin as "can't generate yet").
Parameters
contractorId
string
opts?
createdBy?
string | null
Returns
Promise<GeneratedPackage>