import { SignatureDocument, SignatureSignerInput } from '@happyvertical/signatures'; import { AgreementExecutionCollection } from '../../agreements/collections/AgreementExecutionCollection.js'; import { ExecutedAgreementCollection } from '../../agreements/collections/ExecutedAgreementCollection.js'; import { AgreementExecutionService } from '../../agreements/services/AgreementExecutionService.js'; import { AgreementExecutionResult } from '../../agreements/types.js'; import { ReferralAgreementCollection } from '../collections/ReferralAgreementCollection.js'; import { ReferralAgreement } from '../models/ReferralAgreement.js'; export declare const REFERRAL_AGREEMENT_SOURCE_KIND = "referral_agreement"; export interface ReferralAgreementExecutionServiceDeps { agreements: ReferralAgreementCollection; executions: AgreementExecutionCollection; executedAgreements: ExecutedAgreementCollection; executionService: AgreementExecutionService; now?: () => Date; } export interface RequestReferralAgreementSignatureInput { tenantId: string; agreementId: string; document: SignatureDocument; signers: readonly SignatureSignerInput[]; title?: string; message?: string; signingOrder?: boolean; expiresInDays?: number; providerAccountRef?: string; credentialRef?: string; signal?: AbortSignal; } export interface ApplyExecutedReferralAgreementInput { tenantId: string; agreementId: string; executedAgreementId?: string; at?: Date; } export declare class ReferralAgreementExecutionService { private readonly deps; private readonly now; constructor(deps: ReferralAgreementExecutionServiceDeps); requestSignature(input: RequestReferralAgreementSignatureInput): Promise; /** * Bind completed immutable evidence, activate the signed version, and end * the prior active version only when the new effective date has arrived. */ applyExecutedAgreement(input: ApplyExecutedReferralAgreementInput): Promise; /** Scheduled/reconciliation hook for future-dated signed amendments. */ supersedePriorIfEffective(input: ApplyExecutedReferralAgreementInput): Promise; private supersedePriors; private findPriorActive; private requireAgreement; private runTransaction; private assertTenant; private assertAgreementTenant; } export default ReferralAgreementExecutionService; //# sourceMappingURL=ReferralAgreementExecutionService.d.ts.map