tocmo0nlord 53285ed5a6 Step 11: DocuSeal e-signature (client-facing docs; mocked)
familylaw.docuseal.client (AbstractModel): _create_submission isolates the real
DocuSeal Pro API call (the mock point); send() records submission + flips status.
Pro-tier + internet-facing/isolated-host caveats documented in-module.

familylaw.document (_inherit): signature_status/submission id/signer_email/signed_date.
- action_send_for_signature: attorney-only + requires APPROVED (Gate 1 holds);
  requires signer email. Court filings stay /s/ + Portal, NOT DocuSeal.
- _process_signature_event: webhook handler core — flips sent->signed (or declined);
  unknown submissions are a safe no-op (never raises on stray events).

controllers/main.py: thin POST /familylaw/docuseal/webhook (public, csrf off, shared
-secret check, fail-closed) delegating to the handler. The one internet-facing route.
Send-for-signature button + signature fields on the document form.

Tests (familylaw_step11, DocuSeal mocked): cannot send draft/in-review (Gate 1);
approved sends + records submission; requires signer email; attorney-only; webhook
marks signed/declined; signed alias; unknown-submission no-op.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 04:23:55 +00:00
Description
No description provided
3.2 MiB
Languages
Python 100%