/** * Standard in-app EOI (Letter of Intent) template. * * Rendered in-app via pdfme (HTML → PDF pipeline) for ports that prefer the * in-app PDF generation path over the Documenso template flow. * * Merge tokens use the {{section.field}} convention and match the * `EoiContext` shape produced by `buildEoiContext` in * `src/lib/services/eoi-context.ts`. The tokens are resolved by * `resolveTemplate` (Task 11.4 wires the expanded resolver). * * Related: * - Field mapping: docs/eoi-documenso-field-mapping.md * - Context builder: src/lib/services/eoi-context.ts * - Schema: document_templates (src/lib/db/schema/documents.ts) */ export const STANDARD_EOI_MERGE_FIELDS: string[] = [ 'date.today', 'date.year', 'port.name', 'port.defaultCurrency', 'client.fullName', 'client.nationality', 'client.primaryEmail', 'client.primaryPhone', 'client.address.street', 'client.address.city', 'client.address.country', 'yacht.name', 'yacht.hullNumber', 'yacht.flag', 'yacht.yearBuilt', 'yacht.lengthFt', 'yacht.widthFt', 'yacht.draftFt', 'yacht.lengthM', 'yacht.widthM', 'yacht.draftM', 'company.name', 'company.legalName', 'company.taxId', 'company.billingAddress', 'owner.type', 'owner.name', 'owner.legalName', 'berth.mooringNumber', 'berth.area', 'berth.lengthFt', 'berth.price', 'berth.priceCurrency', 'berth.tenureType', 'interest.stage', 'interest.leadCategory', 'interest.dateFirstContact', 'interest.notes', ]; export function getStandardEoiTemplateHtml(): string { return ` Expression of Interest — Letter of Intent
{{port.name}}
Expression of Interest — Letter of Intent
Date: {{date.today}}
Port: {{port.name}}

This Expression of Interest (the “EOI”) is entered into between {{port.name}} and the Applicant named below, and records the Applicant’s non-binding intent to proceed toward a berth acquisition at the port. It is subject to subsequent definitive documentation.

1. Applicant

Full name {{client.fullName}}
Nationality {{client.nationality}}
Email {{client.primaryEmail}}
Phone {{client.primaryPhone}}
Address

{{client.address.street}}

{{client.address.city}}

{{client.address.country}}

2. Yacht

Name {{yacht.name}}
Hull number {{yacht.hullNumber}}
Flag {{yacht.flag}}
Year built {{yacht.yearBuilt}}
Length (ft / m) {{yacht.lengthFt}} ft  /  {{yacht.lengthM}} m
Beam (ft / m) {{yacht.widthFt}} ft  /  {{yacht.widthM}} m
Draft (ft / m) {{yacht.draftFt}} ft  /  {{yacht.draftM}} m

3. Owner

Owner type: {{owner.type}}
Owner name: {{owner.name}} (legal: {{owner.legalName}})

Company name {{company.name}}
Legal name {{company.legalName}}
Tax ID {{company.taxId}}
Billing address {{company.billingAddress}}

The company block is populated only where the yacht is company-owned; for client-owned yachts these fields render empty.

4. Berth

Mooring number {{berth.mooringNumber}}
Area {{berth.area}}
Length {{berth.lengthFt}} ft
Price {{berth.price}} {{berth.priceCurrency}}
Tenure type {{berth.tenureType}}

5. Interest Summary

Pipeline stage {{interest.stage}}
Lead category {{interest.leadCategory}}
First contact {{interest.dateFirstContact}}
Notes {{interest.notes}}

6. Signatures

Applicant — {{client.fullName}}
Date: __________________
For and on behalf of {{port.name}}
Date: __________________
`; }