feat: WIP Contnet managemtn

This commit is contained in:
Nathnael
2026-08-08 09:37:28 +00:00
parent ee25de8817
commit 41e8c08ba3
48 changed files with 6601 additions and 657 deletions

View File

@@ -11,6 +11,8 @@ export * from "./ethiopian-regions.catalog";
export * from "./notifications";
export * from "./booking-window-ws";
export * from "./support-chat";
export * from "./portal-content";
export * from "./portal-content.defaults";
export enum TradeDirection {
IMPORT = "IMPORT",

View File

@@ -0,0 +1,375 @@
import type { SupportDocPayloadMap } from "./portal-content";
/**
* The copy the portal shipped with, transcribed from what used to be
* `edr-freight-web/portal/src/pages/support/content.ts` and the inline blocks
* of `HelpPage.tsx`.
*
* Two mechanical changes from the original:
*
* 1. `Section { body: string[]; bullets: string[] }` collapses to one markdown
* string — paragraphs separated by a blank line, bullets as `- ` lines.
* 2. The support email/phone/office, previously string-interpolated into the
* privacy and terms prose at build time, are now `{{supportEmail}}`-style
* placeholders resolved against the CONTACT document at read time. That is
* what stops the legal text keeping a stale phone number after an edit.
*
* It lives in the shared package because three consumers need the same bytes
* and any drift between them would only surface during an outage: the API
* seeds the database from it and serves it for any row still missing, and the
* portal renders it while the request is in flight or if the API is down.
* Once seeded, the database is authoritative and this is only a floor.
*/
export const SUPPORT_CONTENT_DEFAULTS: SupportDocPayloadMap = {
CONTACT: {
email: "support@edrfreight.com",
phone: "+251 11 000 0000",
office: "Addis Ababa, Ethiopia",
hours: "Monday Saturday, 8:30 AM 5:30 PM (EAT)",
},
HELP: {
title: "Help & Support",
subtitle:
"Get answers fast — watch the walkthrough, browse the common topics, check the FAQ, or reach our team directly.",
sections: [
{
id: "help-walkthrough",
heading: "Portal walkthrough",
body: "A guided tour of the portal — registering your company, raising a booking against a contract, and settling an invoice.",
media: [
{
id: "help-walkthrough-video",
kind: "video",
// Ships with the app rather than MinIO, so it is used verbatim.
src: "/assets/edr-portal-guide.webm",
caption: null,
},
],
},
{
id: "help-chat",
heading: "Chat with our team",
body: "Signed-in customers can open a support conversation from the headset button at the bottom right of every portal page. You can send screenshots and documents in the chat, and replies appear there and as a notification.\n\n[Open the portal](/portal)",
media: [],
},
{
id: "help-contact",
heading: "Contact us",
body: "- **Email** — [{{supportEmail}}](mailto:{{supportEmail}}). Best for document issues and anything needing an attachment.\n- **Phone** — [{{supportPhone}}](tel:{{supportPhoneTel}}). Best for urgent problems with cargo already in transit.\n- **Head office** — {{supportOffice}}. Walk-in support during working hours.\n- **Support hours** — {{supportHours}}. Outside these hours, email us and we reply the next working day.",
media: [],
},
{
id: "help-topics",
heading: "Common topics",
body: "- **[Account & onboarding](/faq)** — registering your company, uploading your trade licence and TIN, and getting an operational profile approved.\n- **[Contracts](/faq)** — requesting a freight contract, reviewing its terms and signing it with your saved signature and stamp.\n- **[Bookings & tracking](/faq)** — raising a booking against a contract, adding last-mile transport and following the consignment along the corridor.\n- **[Invoices & payments](/faq)** — finding invoices, paying through the bank channels and confirming a payment that has not yet settled.",
media: [],
},
{
id: "help-checklist",
heading: "What to include when you contact us",
body: "- Your company name and the email you sign in with.\n- The reference of the contract, booking or invoice involved.\n- What you expected to happen and what happened instead.\n- A screenshot of any error message the portal showed.",
media: [],
},
],
},
FAQ: {
title: "Frequently Asked Questions",
subtitle:
"Answers to the questions customers ask most about registering, booking cargo and settling invoices on EDR Freight.",
groups: [
{
id: "faq-getting-started",
title: "Getting started",
items: [
{
id: "faq-open-account",
question: "How do I open an account on EDR Freight?",
answer:
"Sign up with your work email and verify the one-time code we send you. After you set a password, the onboarding wizard collects your company details, trade licence, TIN certificate and the operational services you need (importer, exporter, freight forwarder or transporter). Submit the wizard and our team reviews the application.",
},
{
id: "faq-approval-time",
question: "How long does account approval take?",
answer:
"Most complete applications are reviewed within two working days. You will see the status on your dashboard, and we email you when a profile is approved or when a document needs to be re-uploaded.",
},
{
id: "faq-rejected",
question: "My profile was rejected. What now?",
answer:
"The rejection notice states the reason. Open Settings, correct the details or replace the document that was flagged, and re-apply — you do not need to create a new account.",
},
{
id: "faq-multiple-services",
question: "Can one company hold several operational services?",
answer:
"Yes. A company can hold importer, exporter, freight forwarder and transporter profiles at the same time. Each is approved separately, and the header lets you switch between the ones you hold.",
},
],
},
{
id: "faq-contracts-bookings",
title: "Contracts and bookings",
items: [
{
id: "faq-contract-vs-booking",
question: "What is the difference between a contract and a booking?",
answer:
"A contract is the commercial agreement covering a cargo movement — route, commodity, volume and rates. A booking is a single shipment executed under that contract. You create the contract once, then raise bookings against it for each consignment.",
},
{
id: "faq-create-booking",
question: "How do I create a booking?",
answer:
"Open the contract from the Contracts list and choose New Booking. Provide the consignment details, containers or tonnage, and the last-mile requirement if you need one. Bookings can also be started from the Bookings page, which routes you through contract selection first.",
},
{
id: "faq-sign-contract",
question: "Why do I have to sign a contract before shipping?",
answer:
"The contract document is the binding agreement for the movement. You must scroll to the end, accept the terms, and sign it with your saved signature and stamp before EDR schedules any wagon against it.",
},
{
id: "faq-signature-setup",
question: "Where do I set up my signature and stamp?",
answer:
"Under Signature & Stamp in the portal. It is saved once and reused for every contract you sign, so you do not have to upload it per document.",
},
{
id: "faq-change-booking",
question: "Can I change a booking after submitting it?",
answer:
"You can edit a booking while it is still pending review. Once EDR has confirmed it and allocated capacity, changes go through our operations team — contact support with the booking reference.",
},
{
id: "faq-track-consignment",
question: "How do I track a consignment?",
answer:
"Open the booking and use the tracking panel, which shows the current milestone, the wagon or container assigned, and the timestamps recorded at each corridor point.",
},
],
},
{
id: "faq-invoices-payments",
title: "Invoices and payments",
items: [
{
id: "faq-find-invoices",
question: "Where do I find my invoices?",
answer:
"The Invoices page lists every invoice raised against your company, with its status, due date and outstanding balance. Open any invoice to see its line items and download a PDF copy.",
},
{
id: "faq-payment-methods",
question: "Which payment methods are supported?",
answer:
"Payments are made through the integrated bank channels shown at checkout. After you complete the payment on the bank's page you are returned to the portal, and the invoice status updates once the bank confirms the transaction.",
},
{
id: "faq-payment-not-settled",
question:
"My payment was deducted but the invoice still shows unpaid.",
answer:
"Bank confirmations can lag by a few minutes. Use the Check Payment Status page linked from your receipt; if it still has not settled after an hour, email support with the invoice number and the bank reference and we will reconcile it.",
},
{
id: "faq-rounding",
question: "Why is my invoice amount rounded?",
answer:
"Some bank channels only accept whole-birr amounts, so invoices routed through them are rounded up to the nearest birr. The rounding is shown on the invoice detail page.",
},
],
},
{
id: "faq-account-security",
title: "Account and security",
items: [
{
id: "faq-reset-password",
question: "How do I reset my password?",
answer:
"Use Forgot Password on the sign-in page. We email you a reset link that is valid for a limited time. If a member of our staff issued the link, it works the same way even if you are already signed in.",
},
{
id: "faq-add-colleagues",
question: "Can I add colleagues to my company account?",
answer:
"Yes. Company administrators can invite additional users from Settings. Each user signs in with their own credentials, and actions are recorded against the individual who performed them.",
},
{
id: "faq-update-company",
question: "How do I update company details after approval?",
answer:
"Edit them in Settings. Changes to regulated fields — trade licence, TIN, legal name — are re-verified by our team before they take effect.",
},
],
},
],
footer: {
heading: "Still need a hand?",
body: "Our team is on {{supportEmail}} and {{supportPhone}}, or you can start a chat from the support button inside the portal.",
ctaLabel: "Go to Help & Support",
ctaTo: "/help",
},
},
PRIVACY: {
title: "Privacy Policy",
subtitle:
"How EDR Freight collects, uses, shares and protects the information you provide when you use the platform.",
lastUpdated: "6 August 2026",
sections: [
{
id: "privacy-1",
heading: "1. Introduction",
body: 'The Ethio-Djibouti Standard Gauge Rail Share Company ("EDR", "we", "us") operates the EDR Freight platform, which lets customers register their business, agree freight contracts, raise bookings, track consignments and settle invoices online.\n\nThis policy explains what personal and business information we collect through the platform, why we collect it, how long we keep it and what rights you have over it. It applies to the EDR Freight customer portal and the services reached through it.',
},
{
id: "privacy-2",
heading: "2. Information we collect",
body: "We collect information you give us, information generated by your use of the platform, and information we receive from the regulators and financial institutions we work with.\n\n- Account details — name, work email address, phone number and the credentials used to sign in.\n- Company and compliance records — legal name, trade licence, TIN certificate, VAT registration, ownership and manager details, and the operational services you apply for.\n- Identity verification data — where you verify through a national identity service, the verification result and the attributes that service returns to us.\n- Operational data — contracts, bookings, consignment and cargo details, container and wagon assignments, tracking events and delivery confirmations.\n- Financial data — invoices, payment references, transaction status and settlement confirmations received from banks. We do not store your card numbers or online banking credentials.\n- Support data — the messages and files you send us through the in-app support chat or by email.\n- Technical data — IP address, device and browser information, and event logs generated when you use the platform.",
},
{
id: "privacy-3",
heading: "3. How we use your information",
body: "- To create and administer your account and verify that your company is entitled to the services it applies for.\n- To perform the freight contracts and bookings you place, including allocating capacity and coordinating rail and last-mile movements.\n- To issue invoices, process payments and keep the accounting records the law requires us to keep.\n- To provide customer support and respond to the questions and complaints you raise.\n- To keep the platform secure, detect misuse and investigate incidents.\n- To meet our legal, tax, customs and regulatory obligations in Ethiopia and Djibouti.\n- To improve the platform — measuring which features are used and where users encounter errors, using aggregated and pseudonymised data wherever that is sufficient.",
},
{
id: "privacy-4",
heading: "4. Legal basis for processing",
body: "We process your information because it is necessary to perform the contract between you and EDR, because we have a legal obligation to do so (customs, tax and transport regulation), or because we have a legitimate interest in operating and securing the platform. Where we rely on your consent — for example, optional marketing messages — you can withdraw it at any time.",
},
{
id: "privacy-5",
heading: "5. Sharing your information",
body: "We do not sell your information. We share it only where it is necessary to deliver the service or where the law requires it.\n\n- Government and regulatory bodies — customs, revenue and transport authorities in Ethiopia and Djibouti, to the extent required for the movement of your cargo.\n- Ports, terminals and last-mile transporters involved in executing your bookings.\n- Banks and payment providers, to initiate and reconcile the payments you make.\n- Technology suppliers who host and maintain the platform on our behalf, under contracts that restrict them to processing data on our instructions.\n- Courts, law enforcement and other authorities where we are legally compelled to disclose.",
},
{
id: "privacy-6",
heading: "6. International transfers",
body: "Cross-border freight inherently involves parties in more than one country, so consignment and clearance information is shared with counterparties and authorities in Djibouti as well as Ethiopia. Where we transfer information outside Ethiopia, we do so only as far as the movement requires or the law permits, and we require recipients to protect it to a comparable standard.",
},
{
id: "privacy-7",
heading: "7. Data retention",
body: "We keep account and company records for as long as your account is active. Contract, booking, customs and financial records are kept for the period required by Ethiopian commercial, tax and customs law after the relevant transaction, because we are obliged to be able to produce them. Support conversations and technical logs are kept for a shorter period, sufficient to resolve disputes and investigate security incidents.",
},
{
id: "privacy-8",
heading: "8. Security",
body: "Access to the platform requires authentication, and staff access to customer records is limited to what each role needs. Data is transmitted over encrypted connections and stored on systems protected by access controls and logging. No system is perfectly secure, so please keep your credentials confidential and tell us immediately if you believe your account has been compromised.",
},
{
id: "privacy-9",
heading: "9. Your rights",
body: "Subject to Ethiopian law, you may ask us to give you a copy of the personal information we hold about you, correct it if it is inaccurate, restrict or object to certain processing, or delete it where we are not required to keep it. Requests are handled through the contact details below; we may need to verify your identity before acting.",
},
{
id: "privacy-10",
heading: "10. Cookies and similar technologies",
body: "The platform uses cookies and browser storage to keep you signed in, remember your interface preferences and measure how the product is used so we can fix problems. Essential cookies cannot be turned off without breaking sign-in. You can clear or block the rest through your browser settings.",
},
{
id: "privacy-11",
heading: "11. Children",
body: "The platform is a business service and is not directed at children. We do not knowingly collect information from anyone under 18.",
},
{
id: "privacy-12",
heading: "12. Changes to this policy",
body: "We may update this policy as the platform and the law change. Material changes are announced in the portal before they take effect, and the date at the top of this page always reflects the current version.",
},
{
id: "privacy-13",
heading: "13. Contact us",
body: "Questions about this policy or about how we handle your information can be sent to {{supportEmail}}, called in on {{supportPhone}}, or addressed to our head office in {{supportOffice}}.",
},
],
},
TERMS: {
title: "Terms of Service",
subtitle:
"The terms on which EDR provides the EDR Freight platform and the freight services you request through it.",
lastUpdated: "6 August 2026",
sections: [
{
id: "terms-1",
heading: "1. These terms",
body: 'These terms govern your use of the EDR Freight platform operated by the Ethio-Djibouti Standard Gauge Rail Share Company ("EDR"). By creating an account or using the platform, the company you represent agrees to them.\n\nThe platform is the channel through which you register, request and manage freight services. The commercial terms of each movement — routes, rates, volumes and payment terms — are set out in the freight contract you sign in the platform. Where a signed contract and these terms conflict, the signed contract governs that movement.',
},
{
id: "terms-2",
heading: "2. Eligibility and accounts",
body: "- The platform is for registered businesses. You confirm that you are authorised to act for the company you register and to bind it to these terms.\n- The information and documents you submit — trade licence, TIN, VAT registration, ownership details — must be accurate, current and genuine.\n- Accounts and operational profiles are activated only after EDR has reviewed and approved them, and approval may be refused or withdrawn.\n- You are responsible for keeping credentials confidential and for everything done under your account. Tell us at once if you suspect unauthorised use.",
},
{
id: "terms-3",
heading: "3. Contracts and bookings",
body: "- A freight contract takes effect when it is signed in the platform by you and countersigned by EDR.\n- A booking is a request for a specific movement under a contract. It becomes binding when EDR confirms it and allocates capacity — submission alone does not reserve a wagon or container.\n- You are responsible for the accuracy of consignment data: commodity description, weight, dimensions, container numbers, hazardous classification and consignee details.\n- Capacity is finite. EDR may decline, defer or reschedule a booking where capacity, safety, operating conditions or regulatory direction require it.",
},
{
id: "terms-4",
heading: "4. Cargo, documents and compliance",
body: "- You must obtain and provide every permit, customs declaration and clearance document the movement requires, and you warrant that the cargo may lawfully be carried.\n- Prohibited and restricted goods may not be tendered without EDR's prior written agreement and any licence the law requires.\n- Cargo must be packed, secured and, where applicable, labelled to the standard the mode of carriage requires. EDR may inspect, refuse or offload cargo that is misdeclared or unsafe.\n- You are liable for fines, demurrage, storage charges and losses arising from misdeclared cargo, missing documents or delays attributable to you.",
},
{
id: "terms-5",
heading: "5. Rates, invoicing and payment",
body: "- Charges are calculated from the rates in your contract, the tariffs published in the platform, and any accessorial services actually rendered.\n- Invoices are issued in the platform and are payable by the due date shown on them, through the payment channels the platform offers.\n- Payment is confirmed when the funds are confirmed by the bank, not when payment is initiated.\n- Overdue amounts may attract interest and may result in suspension of new bookings or of the account until the balance is cleared.\n- Taxes and statutory duties are your responsibility unless the contract expressly says otherwise.",
},
{
id: "terms-6",
heading: "6. Delivery, delay and liability",
body: "Transit times shown in the platform are estimates based on planned schedules. They are not guarantees, and EDR is not liable for indirect or consequential loss, loss of profit or loss of market arising from delay.\n\nEDR's liability for loss of or damage to cargo is limited to the extent set out in the applicable freight contract and in the transport law governing the carriage. Claims must be notified in writing within the period the contract specifies; late claims may be rejected.\n\nNeither party is liable for failure to perform caused by events beyond its reasonable control, including natural disasters, industrial action, civil unrest, infrastructure failure, or acts of government and regulatory authorities.",
},
{
id: "terms-7",
heading: "7. Acceptable use of the platform",
body: "- Use the platform only for its intended purpose and in accordance with applicable law.\n- Do not attempt to gain unauthorised access, probe or disrupt the service, or interfere with other customers' data.\n- Do not scrape, resell or redistribute platform content, rates or data without written permission.\n- Do not upload malware or content that infringes the rights of others.",
},
{
id: "terms-8",
heading: "8. Electronic signatures and records",
body: "You agree that contracts signed in the platform using your stored signature and stamp are validly executed, that the records the platform keeps of those signatures are admissible evidence of them, and that they carry the same effect as signatures on paper.",
},
{
id: "terms-9",
heading: "9. Availability and changes to the service",
body: "We aim to keep the platform available, but it may be interrupted for maintenance, upgrades or reasons outside our control. We may add, change or withdraw features. Where a change materially affects how you use the platform, we will give reasonable notice in the portal.",
},
{
id: "terms-10",
heading: "10. Suspension and termination",
body: "We may suspend or terminate access where these terms are breached, where documents prove to be false, where amounts remain unpaid, or where the law or a regulator requires it. You may stop using the platform at any time. Termination does not affect obligations already incurred — cargo in transit, invoices outstanding, or records we are required to retain.",
},
{
id: "terms-11",
heading: "11. Intellectual property",
body: "The platform, its software, design and content belong to EDR or its licensors. You are granted a non-exclusive, non-transferable right to use it for your own freight operations. Your commercial and consignment data remains yours; you grant us the right to process it as needed to deliver the service and as described in the Privacy Policy.",
},
{
id: "terms-12",
heading: "12. Confidentiality and data protection",
body: "Each party will keep the other's non-public commercial information confidential and use it only for the purposes of the services. Our handling of personal information is described in the Privacy Policy, which forms part of these terms.",
},
{
id: "terms-13",
heading: "13. Governing law and disputes",
body: "These terms are governed by the laws of the Federal Democratic Republic of Ethiopia. The parties will first attempt to resolve any dispute amicably; failing that, the dispute is subject to the jurisdiction of the competent courts of Ethiopia, without prejudice to any arbitration clause agreed in a specific freight contract.",
},
{
id: "terms-14",
heading: "14. Changes to these terms",
body: "We may update these terms as the service and the law change. Updates are published here and announced in the portal. Continuing to use the platform after an update takes effect means you accept the revised terms.",
},
{
id: "terms-15",
heading: "15. Contact",
body: "For questions about these terms, write to {{supportEmail}} or call {{supportPhone}}.",
},
],
},
};

View File

@@ -0,0 +1,206 @@
/**
* Customer-facing copy for the freight portal's public pages — /help, /faq,
* /terms and /privacy. Edited in the backoffice, served to the portal by one
* public endpoint, and versioned so a bad edit can be rolled back.
*
* Body copy is **markdown**. It is rendered with `react-markdown` and no
* `rehype-raw`, so raw HTML inside it is inert — the fields that actually need
* validating are the structured ones that land in `href`/`src` attributes.
*/
/** One editable document. Each is a row in `freight.support_documents`. */
export const SUPPORT_DOC_SLUGS = [
"CONTACT",
"HELP",
"FAQ",
"PRIVACY",
"TERMS",
] as const;
export type SupportDocSlug = (typeof SUPPORT_DOC_SLUGS)[number];
/** MinIO key prefix every uploaded help attachment is stored under. */
export const SUPPORT_MEDIA_PREFIX = "support-content/";
/**
* Marks a MinIO object reference inside markdown, e.g.
* `![Wagon](minio:support-content/abc.png)`.
*
* Stored copy always holds the *key*, never a signed URL: a presigned URL
* expires, so writing one into the saved markdown would silently rot every
* embedded image a few hours later. The API swaps these for freshly signed
* URLs on each read instead.
*/
export const PORTAL_MEDIA_URI_SCHEME = "minio:";
/** 50 MB — walkthrough videos are the large case. */
export const SUPPORT_MEDIA_MAX_BYTES = 50 * 1024 * 1024;
export type PortalMediaKind = "image" | "video";
/** An image or video attached to a help section. */
export interface PortalMedia {
id: string;
kind: PortalMediaKind;
/**
* Stored: a MinIO object key, a same-origin `/path`, or an `https://` URL.
* Served: the same value with MinIO keys replaced by a fresh presigned URL —
* the API rewrites this field in place, so the portal just renders it.
*/
src: string;
caption?: string | null;
}
/**
* Placeholders usable inside any markdown or link field. They are substituted
* against the CONTACT document when the portal reads the bundle, which is what
* keeps the support address in the privacy/terms prose from drifting out of
* sync with the contact cards.
*
* `supportPhoneTel` is the whitespace-stripped phone, for `tel:` hrefs.
*/
export const PORTAL_CONTENT_VARS = [
"supportEmail",
"supportPhone",
"supportPhoneTel",
"supportOffice",
"supportHours",
] as const;
export type PortalContentVar = (typeof PORTAL_CONTENT_VARS)[number];
/** Slug `CONTACT`. The one place support contact details are edited. */
export interface PortalSupportContact {
email: string;
phone: string;
office: string;
hours: string;
}
/** One numbered section of a legal document. `body` is markdown. */
export interface PortalDocSection {
/** Stable per-section id — the React key, since headings can collide. */
id: string;
heading: string;
body: string;
}
/** Slugs `PRIVACY` and `TERMS` — same shape, separate documents. */
export interface PortalLegalContent {
title: string;
subtitle: string;
/** Free text, e.g. "6 August 2026". Shown as "Last updated …". */
lastUpdated: string;
sections: PortalDocSection[];
}
export interface PortalFaqItem {
id: string;
question: string;
/** Markdown. */
answer: string;
}
export interface PortalFaqGroup {
id: string;
title: string;
items: PortalFaqItem[];
}
/** A call-to-action card closing a page. `body` is markdown. */
export interface PortalCtaCard {
heading: string;
body: string;
ctaLabel: string;
/** In-app route (`/help`) or absolute URL. */
ctaTo: string;
}
/** Slug `FAQ`. */
export interface PortalFaqContent {
title: string;
subtitle: string;
groups: PortalFaqGroup[];
/** The "Still need a hand?" card. Null hides it. */
footer: PortalCtaCard | null;
}
/**
* One free-form block of the help page: a heading, a full markdown body, and
* any number of attached images or videos.
*
* Deliberately not a fixed set of typed blocks (video / channels / topics /
* checklist, as this once was). The help page is the one document whose shape
* genuinely changes with what support needs to explain that quarter, so it is
* built rather than filled in — add, reorder and delete sections freely.
*/
export interface PortalHelpSection {
id: string;
heading: string;
/**
* Markdown. Embedded images reference uploads as
* `![alt](minio:support-content/<file>)` — see {@link PORTAL_MEDIA_URI_SCHEME}.
*/
body: string;
/** Rendered under the body, in order. */
media: PortalMedia[];
}
/** Slug `HELP`. */
export interface PortalHelpContent {
title: string;
subtitle: string;
sections: PortalHelpSection[];
}
/** Payload shape per slug — the jsonb column's type, keyed by document. */
export interface SupportDocPayloadMap {
CONTACT: PortalSupportContact;
HELP: PortalHelpContent;
FAQ: PortalFaqContent;
PRIVACY: PortalLegalContent;
TERMS: PortalLegalContent;
}
export type SupportDocPayload = SupportDocPayloadMap[SupportDocSlug];
/** What `GET /api/support-content` returns — everything the portal needs. */
export interface PortalContentBundle {
contact: PortalSupportContact;
help: PortalHelpContent;
faq: PortalFaqContent;
privacy: PortalLegalContent;
terms: PortalLegalContent;
}
// ── Backoffice (staff) projections ─────────────────────────────────────────
/** A document row without its payload — the admin list. */
export interface SupportDocumentSummary {
id: string;
slug: SupportDocSlug;
version: number;
updatedAt: string;
updatedById: string | null;
}
export interface SupportDocumentDetail<
S extends SupportDocSlug = SupportDocSlug,
> extends SupportDocumentSummary {
slug: S;
payload: SupportDocPayloadMap[S];
}
/** A history row without its payload — the version list. */
export interface SupportDocVersionSummary {
id: string;
version: number;
actorId: string | null;
note: string | null;
createdAt: string;
}
/** A history row with its payload — fetched when a version is previewed. */
export interface SupportDocVersionDetail extends SupportDocVersionSummary {
payload: SupportDocPayload;
}