import { CheckCircle2, Info } from 'lucide-react'; import { RegistryDrivenForm } from '@/components/admin/shared/registry-driven-form'; import { DocumensoTestButton } from '@/components/admin/documenso/documenso-test-button'; import { EmbeddedSigningCard } from '@/components/admin/documenso/embedded-signing-card'; import { TemplateSyncButton } from '@/components/admin/documenso/template-sync-button'; import { PageHeader } from '@/components/shared/page-header'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; // All field arrays removed — every Documenso setting now flows through // `RegistryDrivenForm`, which surfaces the env-fallback / port / global // source badge on each field. The settings themselves live in // `src/lib/settings/registry.ts` under sections `documenso.api` / // `.signers` / `.templates` / `.behavior`. export default function DocumensoSettingsPage() { return (

The CRM supports both Documenso 1.13.x (v1) and 2.x (v2). v1 is the default for backwards compatibility. v2 is recommended for new ports and unlocks the features below. Switching versions does not require any code changes - version-aware client methods pick the right endpoint per port. Switch, save, then run the test-connection button to confirm the chosen instance is actually on the matching Documenso version.

v2-only capabilities the CRM already uses when you pick v2

v2 capabilities deferred (would need new code paths)

  • Single-shot /template/use {' '} with v2 prefillFields by ID - current EOI flow uses{' '} /api/v1/templates/{'{id}'}/generate-document with{' '} formValues keyed by name. v2 instances accept both during their backward-compat window; full migration requires per-template field-ID capture in admin settings.
  • Update envelope metadata after creation (/envelope/update) {' '} - change title / subject / redirectUrl on a doc already in DRAFT/PENDING without re-generating.
  • Non-SIGNER recipient roles (CC / VIEWER) - APPROVER role is already used by the EOI template; CC + VIEWER not yet exposed in the recipient builder. Useful for sales managers who want a copy without a signature slot.

Sequential signing and post-signing redirect URL are now wired - see the new "v2 signing behaviour" card below to configure them.

} /> } />
); }