import { type AdminExtension, type SelectedAdminExtensionFactoryContext } from "@voyant-travel/admin"; /** * Semantic destinations the finance admin surfaces navigate to * (packaged-admin RFC §4.7). Keys shared with other domains * (`invoice.detail`, `booking.detail`, `person.detail`, * `organization.detail`, `payment.detail`) come from the bookings-ui * augmentation bound above; declared here are the finance-owned list * targets plus `supplier.detail`, re-declared shape-locked — also declared * by `@voyant-travel/catalog-react/admin`, and interface merging requires the * member shape to stay identical across packages. */ declare module "@voyant-travel/admin" { interface AdminDestinations { /** The invoices list page (the finance area's landing surface). */ "invoice.list": Record; /** The payments list page. */ "payment.list": Record; /** A supplier's detail page. */ "supplier.detail": { supplierId: string; }; /** The supplier-invoices (accounts payable) list page. */ "supplierInvoice.list": Record; /** A supplier invoice's detail page. */ "supplierInvoice.detail": { supplierInvoiceId: string; }; } } export type { BookingInvoicesWidgetProps } from "./booking-invoices-widget.js"; export type { BookingPaymentPolicyWidgetProps } from "./booking-payment-policy-widget.js"; export type { BookingPendingPaymentSessionsWidgetProps } from "./booking-pending-payment-sessions-widget.js"; export type { CreditNoteDialogProps } from "./credit-note-dialog.js"; export type { InvoiceDetailHostProps } from "./invoice-detail-host.js"; export { InvoiceDetailSkeleton } from "./invoice-detail-skeleton.js"; export type { LineItemDialogProps } from "./line-item-dialog.js"; export type { PaymentDetailHostProps } from "./payment-detail-host.js"; export { PaymentDetailSkeleton } from "./payment-detail-skeleton.js"; export type { PaymentDialogProps } from "./payment-dialog.js"; export type { RecordPaymentDialogProps } from "./record-payment-dialog.js"; export type { SupplierPaymentPolicyWidgetProps } from "./supplier-payment-policy-widget.js"; export type { SupplierPicker } from "./use-supplier-picker.js"; export interface CreateFinanceAdminExtensionOptions { /** Mount path of the finance pages inside the admin workspace. Default `/finance`. */ basePath?: string; /** Localized page titles. Defaults are the English operator nav labels. */ labels?: { invoices?: string; invoiceNumberSeries?: string; payments?: string; supplierInvoices?: string; profitability?: string; }; } /** * The finance admin contribution (packaged-admin RFC Phase 3, * `@voyant-travel/-ui/admin` convention). * * NAVIGATION: the general-purpose factory remains neutral. The graph-selected * factory below adds the standard operator Finance group. * * ROUTES: all eight contributions carry the FULL route implementation * (packaged-admin RFC §4.8 endgame) — a lazy `page` module loader, a data * loader fed by the host runtime (`baseUrl` + cookie-forwarding fetcher), * `ssr: "data-only"`, and the pending skeleton where the operator route had * one — so the host needs no per-route files for them. Pages stay * code-split: this factory never references a page component statically; * each `page:` dynamically imports its specific module (never a barrel), and * param-taking pages read the matched `$id` off `AdminRoutePageProps` and * bind it onto {@link InvoiceDetailHost} / {@link PaymentDetailHost}. * Cross-route links resolve through the semantic destinations declared * above. The supplier-invoices pages carry their previously app-owned wiring * package-side now: attachment uploads post to the starter-level * `/v1/admin/uploads` route through the shared finance provider context (the * `BookingInvoicesWidget` precedent), inline supplier creation rides the * suppliers package's `useSupplierMutation`, and the allocation dialog's * cross-domain target search composes the bookings / products / * availability packages' query options through the same context client. * * WIDGETS: the cycle-resolution piece (RFC §4.7). The booking detail page * needs the finance-owned invoices card, but this package peer-depends on * `@voyant-travel/bookings-react/ui`, so the bookings host cannot import it. Instead * this extension contributes {@link BookingInvoicesWidget} on the * `booking.details.invoices-tab` slot the bookings host exposes; the host * mounts its Invoices tab whenever a contribution targets that slot and * hands the widget its typed slot context as props. The Finance tab's * payment-links card ({@link BookingPendingPaymentSessionsWidget}) and * payment-policy override card ({@link BookingPaymentPolicyWidget}) travel * the same way on `booking.details.finance-start` / `…finance-end`. The * same pattern resolves the finance-ui ↔ suppliers-ui cycle: the supplier detail page's * customer-payment-policy card ships as {@link SupplierPaymentPolicyWidget} * on the `supplier.details.payment-policy` slot the supplier host exposes. */ export declare function createFinanceAdminExtension(options?: CreateFinanceAdminExtensionOptions): AdminExtension; export declare function createSelectedFinanceAdminExtension({ navMessages, }: SelectedAdminExtensionFactoryContext): AdminExtension;