Skip to main content

Function: recordEsignConsent()

recordEsignConsent(svc, input): Promise<void>

Defined in: src/server/services/agreements/esign.ts:13

Record the contractor's standing ESIGN consent (R.A. 8792) with the request's IP / user-agent and their authenticated identity. Idempotent — the first consent stands (a unique key on contractor_id

  • ignoreDuplicates preserves the original timestamp and evidence), so it's safe to call again at every signature. Service-role write (the consent table is SELECT-only RLS), so the caller must have already verified the contractor's session.

Parameters​

svc​

SupabaseClient<Database>

input​

companyId​

string

contractorId​

string

ip​

string | null

userAgent​

string | null

userId​

string

Returns​

Promise<void>