@voyant-travel/finance-react 0.119.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +75 -0
- package/dist/admin/booking-invoices-widget.d.ts +19 -0
- package/dist/admin/booking-invoices-widget.d.ts.map +1 -0
- package/dist/admin/booking-invoices-widget.js +204 -0
- package/dist/admin/booking-payment-policy-widget.d.ts +21 -0
- package/dist/admin/booking-payment-policy-widget.d.ts.map +1 -0
- package/dist/admin/booking-payment-policy-widget.js +128 -0
- package/dist/admin/booking-pending-payment-sessions-widget.d.ts +24 -0
- package/dist/admin/booking-pending-payment-sessions-widget.d.ts.map +1 -0
- package/dist/admin/booking-pending-payment-sessions-widget.js +139 -0
- package/dist/admin/credit-note-dialog.d.ts +9 -0
- package/dist/admin/credit-note-dialog.d.ts.map +1 -0
- package/dist/admin/credit-note-dialog.js +70 -0
- package/dist/admin/finance-shared.d.ts +7 -0
- package/dist/admin/finance-shared.d.ts.map +1 -0
- package/dist/admin/finance-shared.js +30 -0
- package/dist/admin/index.d.ts +99 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +286 -0
- package/dist/admin/invoice-detail-host.d.ts +19 -0
- package/dist/admin/invoice-detail-host.d.ts.map +1 -0
- package/dist/admin/invoice-detail-host.js +147 -0
- package/dist/admin/invoice-detail-sections.d.ts +31 -0
- package/dist/admin/invoice-detail-sections.d.ts.map +1 -0
- package/dist/admin/invoice-detail-sections.js +109 -0
- package/dist/admin/invoice-detail-skeleton.d.ts +11 -0
- package/dist/admin/invoice-detail-skeleton.d.ts.map +1 -0
- package/dist/admin/invoice-detail-skeleton.js +33 -0
- package/dist/admin/line-item-dialog.d.ts +10 -0
- package/dist/admin/line-item-dialog.d.ts.map +1 -0
- package/dist/admin/line-item-dialog.js +91 -0
- package/dist/admin/pages/invoice-detail.d.ts +8 -0
- package/dist/admin/pages/invoice-detail.d.ts.map +1 -0
- package/dist/admin/pages/invoice-detail.js +11 -0
- package/dist/admin/pages/invoices-index.d.ts +8 -0
- package/dist/admin/pages/invoices-index.d.ts.map +1 -0
- package/dist/admin/pages/invoices-index.js +14 -0
- package/dist/admin/pages/payment-detail.d.ts +8 -0
- package/dist/admin/pages/payment-detail.d.ts.map +1 -0
- package/dist/admin/pages/payment-detail.js +11 -0
- package/dist/admin/pages/payments-index.d.ts +9 -0
- package/dist/admin/pages/payments-index.d.ts.map +1 -0
- package/dist/admin/pages/payments-index.js +21 -0
- package/dist/admin/pages/profitability.d.ts +10 -0
- package/dist/admin/pages/profitability.d.ts.map +1 -0
- package/dist/admin/pages/profitability.js +32 -0
- package/dist/admin/pages/supplier-invoice-detail.d.ts +20 -0
- package/dist/admin/pages/supplier-invoice-detail.d.ts.map +1 -0
- package/dist/admin/pages/supplier-invoice-detail.js +102 -0
- package/dist/admin/pages/supplier-invoices-index.d.ts +9 -0
- package/dist/admin/pages/supplier-invoices-index.d.ts.map +1 -0
- package/dist/admin/pages/supplier-invoices-index.js +16 -0
- package/dist/admin/payment-detail-host.d.ts +12 -0
- package/dist/admin/payment-detail-host.d.ts.map +1 -0
- package/dist/admin/payment-detail-host.js +108 -0
- package/dist/admin/payment-detail-skeleton.d.ts +8 -0
- package/dist/admin/payment-detail-skeleton.d.ts.map +1 -0
- package/dist/admin/payment-detail-skeleton.js +15 -0
- package/dist/admin/payment-dialog.d.ts +9 -0
- package/dist/admin/payment-dialog.d.ts.map +1 -0
- package/dist/admin/payment-dialog.js +99 -0
- package/dist/admin/record-payment-dialog.d.ts +16 -0
- package/dist/admin/record-payment-dialog.d.ts.map +1 -0
- package/dist/admin/record-payment-dialog.js +219 -0
- package/dist/admin/supplier-payment-policy-widget.d.ts +18 -0
- package/dist/admin/supplier-payment-policy-widget.d.ts.map +1 -0
- package/dist/admin/supplier-payment-policy-widget.js +31 -0
- package/dist/admin/use-supplier-picker.d.ts +19 -0
- package/dist/admin/use-supplier-picker.d.ts.map +1 -0
- package/dist/admin/use-supplier-picker.js +30 -0
- package/dist/checkout-components/collect-payment-dialog.d.ts +45 -0
- package/dist/checkout-components/collect-payment-dialog.d.ts.map +1 -0
- package/dist/checkout-components/collect-payment-dialog.js +121 -0
- package/dist/checkout-components/payment-link-landing-page.d.ts +76 -0
- package/dist/checkout-components/payment-link-landing-page.d.ts.map +1 -0
- package/dist/checkout-components/payment-link-landing-page.js +173 -0
- package/dist/checkout-components/payment-step.d.ts +42 -0
- package/dist/checkout-components/payment-step.d.ts.map +1 -0
- package/dist/checkout-components/payment-step.js +113 -0
- package/dist/checkout-hooks/index.d.ts +5 -0
- package/dist/checkout-hooks/index.d.ts.map +1 -0
- package/dist/checkout-hooks/index.js +4 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.d.ts +20 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.d.ts.map +1 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.js +26 -0
- package/dist/checkout-hooks/use-collect-payment.d.ts +227 -0
- package/dist/checkout-hooks/use-collect-payment.d.ts.map +1 -0
- package/dist/checkout-hooks/use-collect-payment.js +80 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.d.ts +308 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.d.ts.map +1 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.js +35 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.d.ts +65 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.d.ts.map +1 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.js +27 -0
- package/dist/checkout-i18n/en.d.ts +3 -0
- package/dist/checkout-i18n/en.d.ts.map +1 -0
- package/dist/checkout-i18n/en.js +127 -0
- package/dist/checkout-i18n/index.d.ts +5 -0
- package/dist/checkout-i18n/index.d.ts.map +1 -0
- package/dist/checkout-i18n/index.js +3 -0
- package/dist/checkout-i18n/messages.d.ts +121 -0
- package/dist/checkout-i18n/messages.d.ts.map +1 -0
- package/dist/checkout-i18n/messages.js +1 -0
- package/dist/checkout-i18n/provider.d.ts +26 -0
- package/dist/checkout-i18n/provider.d.ts.map +1 -0
- package/dist/checkout-i18n/provider.js +41 -0
- package/dist/checkout-i18n/ro.d.ts +3 -0
- package/dist/checkout-i18n/ro.d.ts.map +1 -0
- package/dist/checkout-i18n/ro.js +127 -0
- package/dist/checkout-types.d.ts +53 -0
- package/dist/checkout-types.d.ts.map +1 -0
- package/dist/checkout-types.js +1 -0
- package/dist/checkout-ui.d.ts +7 -0
- package/dist/checkout-ui.d.ts.map +1 -0
- package/dist/checkout-ui.js +4 -0
- package/dist/checkout.d.ts +5 -0
- package/dist/checkout.d.ts.map +1 -0
- package/dist/checkout.js +3 -0
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +79 -0
- package/dist/components/accountant-portal/body.d.ts +8 -0
- package/dist/components/accountant-portal/body.d.ts.map +1 -0
- package/dist/components/accountant-portal/body.js +114 -0
- package/dist/components/accountant-portal/widgets.d.ts +13 -0
- package/dist/components/accountant-portal/widgets.d.ts.map +1 -0
- package/dist/components/accountant-portal/widgets.js +27 -0
- package/dist/components/accountant-portal.d.ts +10 -0
- package/dist/components/accountant-portal.d.ts.map +1 -0
- package/dist/components/accountant-portal.js +22 -0
- package/dist/components/accountant-share-dialog.d.ts +6 -0
- package/dist/components/accountant-share-dialog.d.ts.map +1 -0
- package/dist/components/accountant-share-dialog.js +53 -0
- package/dist/components/async-combobox.d.ts +33 -0
- package/dist/components/async-combobox.d.ts.map +1 -0
- package/dist/components/async-combobox.js +100 -0
- package/dist/components/booking-invoice-dialog.d.ts +63 -0
- package/dist/components/booking-invoice-dialog.d.ts.map +1 -0
- package/dist/components/booking-invoice-dialog.js +383 -0
- package/dist/components/cost-categories-page.d.ts +5 -0
- package/dist/components/cost-categories-page.d.ts.map +1 -0
- package/dist/components/cost-categories-page.js +30 -0
- package/dist/components/invoice-action-ledger-card.d.ts +15 -0
- package/dist/components/invoice-action-ledger-card.d.ts.map +1 -0
- package/dist/components/invoice-action-ledger-card.js +76 -0
- package/dist/components/invoice-bulk-actions.d.ts +10 -0
- package/dist/components/invoice-bulk-actions.d.ts.map +1 -0
- package/dist/components/invoice-bulk-actions.js +19 -0
- package/dist/components/invoice-detail-page/cards.d.ts +44 -0
- package/dist/components/invoice-detail-page/cards.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/cards.js +43 -0
- package/dist/components/invoice-detail-page/header.d.ts +15 -0
- package/dist/components/invoice-detail-page/header.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/header.js +30 -0
- package/dist/components/invoice-detail-page/notes-dialogs.d.ts +28 -0
- package/dist/components/invoice-detail-page/notes-dialogs.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/notes-dialogs.js +104 -0
- package/dist/components/invoice-detail-page/primitives.d.ts +47 -0
- package/dist/components/invoice-detail-page/primitives.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/primitives.js +76 -0
- package/dist/components/invoice-detail-page-with-action-ledger.d.ts +7 -0
- package/dist/components/invoice-detail-page-with-action-ledger.d.ts.map +1 -0
- package/dist/components/invoice-detail-page-with-action-ledger.js +11 -0
- package/dist/components/invoice-detail-page.d.ts +46 -0
- package/dist/components/invoice-detail-page.d.ts.map +1 -0
- package/dist/components/invoice-detail-page.js +134 -0
- package/dist/components/invoice-dialog.d.ts +9 -0
- package/dist/components/invoice-dialog.d.ts.map +1 -0
- package/dist/components/invoice-dialog.js +145 -0
- package/dist/components/invoice-number-series-dialog.d.ts +9 -0
- package/dist/components/invoice-number-series-dialog.d.ts.map +1 -0
- package/dist/components/invoice-number-series-dialog.js +134 -0
- package/dist/components/invoice-number-series-format.d.ts +3 -0
- package/dist/components/invoice-number-series-format.d.ts.map +1 -0
- package/dist/components/invoice-number-series-format.js +4 -0
- package/dist/components/invoice-number-series-page.d.ts +5 -0
- package/dist/components/invoice-number-series-page.d.ts.map +1 -0
- package/dist/components/invoice-number-series-page.js +55 -0
- package/dist/components/invoice-table-parts.d.ts +25 -0
- package/dist/components/invoice-table-parts.d.ts.map +1 -0
- package/dist/components/invoice-table-parts.js +32 -0
- package/dist/components/invoices-page-skeleton.d.ts +5 -0
- package/dist/components/invoices-page-skeleton.d.ts.map +1 -0
- package/dist/components/invoices-page-skeleton.js +13 -0
- package/dist/components/invoices-page.d.ts +6 -0
- package/dist/components/invoices-page.d.ts.map +1 -0
- package/dist/components/invoices-page.js +145 -0
- package/dist/components/payment-detail-page.d.ts +47 -0
- package/dist/components/payment-detail-page.d.ts.map +1 -0
- package/dist/components/payment-detail-page.js +90 -0
- package/dist/components/payment-policy-form.d.ts +49 -0
- package/dist/components/payment-policy-form.d.ts.map +1 -0
- package/dist/components/payment-policy-form.js +82 -0
- package/dist/components/payments-page/controls.d.ts +23 -0
- package/dist/components/payments-page/controls.d.ts.map +1 -0
- package/dist/components/payments-page/controls.js +20 -0
- package/dist/components/payments-page-skeleton.d.ts +5 -0
- package/dist/components/payments-page-skeleton.d.ts.map +1 -0
- package/dist/components/payments-page-skeleton.js +13 -0
- package/dist/components/payments-page.d.ts +20 -0
- package/dist/components/payments-page.d.ts.map +1 -0
- package/dist/components/payments-page.js +143 -0
- package/dist/components/profitability-page/sections.d.ts +24 -0
- package/dist/components/profitability-page/sections.d.ts.map +1 -0
- package/dist/components/profitability-page/sections.js +43 -0
- package/dist/components/profitability-page.d.ts +13 -0
- package/dist/components/profitability-page.d.ts.map +1 -0
- package/dist/components/profitability-page.js +175 -0
- package/dist/components/record-booking-payment-dialog/shared.d.ts +54 -0
- package/dist/components/record-booking-payment-dialog/shared.d.ts.map +1 -0
- package/dist/components/record-booking-payment-dialog/shared.js +47 -0
- package/dist/components/record-booking-payment-dialog.d.ts +4 -0
- package/dist/components/record-booking-payment-dialog.d.ts.map +1 -0
- package/dist/components/record-booking-payment-dialog.js +256 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.d.ts +34 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.js +119 -0
- package/dist/components/supplier-invoice-detail-page/shared.d.ts +64 -0
- package/dist/components/supplier-invoice-detail-page/shared.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page/shared.js +70 -0
- package/dist/components/supplier-invoice-detail-page.d.ts +4 -0
- package/dist/components/supplier-invoice-detail-page.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page.js +101 -0
- package/dist/components/supplier-invoice-form-dialog.d.ts +45 -0
- package/dist/components/supplier-invoice-form-dialog.d.ts.map +1 -0
- package/dist/components/supplier-invoice-form-dialog.js +102 -0
- package/dist/components/supplier-invoices-page.d.ts +14 -0
- package/dist/components/supplier-invoices-page.d.ts.map +1 -0
- package/dist/components/supplier-invoices-page.js +69 -0
- package/dist/components/supplier-payment-dialog.d.ts +7 -0
- package/dist/components/supplier-payment-dialog.d.ts.map +1 -0
- package/dist/components/supplier-payment-dialog.js +103 -0
- package/dist/components/taxes-page/policy-profile-sheet.d.ts +8 -0
- package/dist/components/taxes-page/policy-profile-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/policy-profile-sheet.js +52 -0
- package/dist/components/taxes-page/policy-rule-sheet.d.ts +10 -0
- package/dist/components/taxes-page/policy-rule-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/policy-rule-sheet.js +137 -0
- package/dist/components/taxes-page/shared.d.ts +128 -0
- package/dist/components/taxes-page/shared.d.ts.map +1 -0
- package/dist/components/taxes-page/shared.js +288 -0
- package/dist/components/taxes-page/sheets.d.ts +4 -0
- package/dist/components/taxes-page/sheets.d.ts.map +1 -0
- package/dist/components/taxes-page/sheets.js +3 -0
- package/dist/components/taxes-page/tax-sheet.d.ts +9 -0
- package/dist/components/taxes-page/tax-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/tax-sheet.js +108 -0
- package/dist/components/taxes-page.d.ts +4 -0
- package/dist/components/taxes-page.d.ts.map +1 -0
- package/dist/components/taxes-page.js +165 -0
- package/dist/hooks/index.d.ts +53 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +52 -0
- package/dist/hooks/use-accountant-share-mutation.d.ts +20 -0
- package/dist/hooks/use-accountant-share-mutation.d.ts.map +1 -0
- package/dist/hooks/use-accountant-share-mutation.js +27 -0
- package/dist/hooks/use-accountant-shares.d.ts +13 -0
- package/dist/hooks/use-accountant-shares.d.ts.map +1 -0
- package/dist/hooks/use-accountant-shares.js +8 -0
- package/dist/hooks/use-admin-booking-payments.d.ts +30 -0
- package/dist/hooks/use-admin-booking-payments.d.ts.map +1 -0
- package/dist/hooks/use-admin-booking-payments.js +18 -0
- package/dist/hooks/use-all-payments.d.ts +35 -0
- package/dist/hooks/use-all-payments.d.ts.map +1 -0
- package/dist/hooks/use-all-payments.js +12 -0
- package/dist/hooks/use-booking-guarantees.d.ts +82 -0
- package/dist/hooks/use-booking-guarantees.d.ts.map +1 -0
- package/dist/hooks/use-booking-guarantees.js +46 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.d.ts +44 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.js +27 -0
- package/dist/hooks/use-booking-payment-schedules.d.ts +63 -0
- package/dist/hooks/use-booking-payment-schedules.d.ts.map +1 -0
- package/dist/hooks/use-booking-payment-schedules.js +47 -0
- package/dist/hooks/use-cost-categories.d.ts +14 -0
- package/dist/hooks/use-cost-categories.d.ts.map +1 -0
- package/dist/hooks/use-cost-categories.js +9 -0
- package/dist/hooks/use-cost-category-mutation.d.ts +31 -0
- package/dist/hooks/use-cost-category-mutation.d.ts.map +1 -0
- package/dist/hooks/use-cost-category-mutation.js +27 -0
- package/dist/hooks/use-departure-profitability.d.ts +56 -0
- package/dist/hooks/use-departure-profitability.d.ts.map +1 -0
- package/dist/hooks/use-departure-profitability.js +12 -0
- package/dist/hooks/use-finance-action-ledger.d.ts +94 -0
- package/dist/hooks/use-finance-action-ledger.d.ts.map +1 -0
- package/dist/hooks/use-finance-action-ledger.js +20 -0
- package/dist/hooks/use-invoice-attachment-mutation.d.ts +43 -0
- package/dist/hooks/use-invoice-attachment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-attachment-mutation.js +39 -0
- package/dist/hooks/use-invoice-attachments.d.ts +18 -0
- package/dist/hooks/use-invoice-attachments.d.ts.map +1 -0
- package/dist/hooks/use-invoice-attachments.js +12 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.d.ts +51 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.js +66 -0
- package/dist/hooks/use-invoice-credit-note-mutation.d.ts +38 -0
- package/dist/hooks/use-invoice-credit-note-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-credit-note-mutation.js +35 -0
- package/dist/hooks/use-invoice-credit-notes.d.ts +17 -0
- package/dist/hooks/use-invoice-credit-notes.d.ts.map +1 -0
- package/dist/hooks/use-invoice-credit-notes.js +12 -0
- package/dist/hooks/use-invoice-fx-rate.d.ts +19 -0
- package/dist/hooks/use-invoice-fx-rate.d.ts.map +1 -0
- package/dist/hooks/use-invoice-fx-rate.js +13 -0
- package/dist/hooks/use-invoice-line-item-mutation.d.ts +40 -0
- package/dist/hooks/use-invoice-line-item-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-line-item-mutation.js +42 -0
- package/dist/hooks/use-invoice-line-items.d.ts +17 -0
- package/dist/hooks/use-invoice-line-items.d.ts.map +1 -0
- package/dist/hooks/use-invoice-line-items.js +12 -0
- package/dist/hooks/use-invoice-mutation.d.ts +225 -0
- package/dist/hooks/use-invoice-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-mutation.js +121 -0
- package/dist/hooks/use-invoice-note-mutation.d.ts +11 -0
- package/dist/hooks/use-invoice-note-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-note-mutation.js +23 -0
- package/dist/hooks/use-invoice-notes.d.ts +13 -0
- package/dist/hooks/use-invoice-notes.d.ts.map +1 -0
- package/dist/hooks/use-invoice-notes.js +12 -0
- package/dist/hooks/use-invoice-number-series-mutation.d.ts +62 -0
- package/dist/hooks/use-invoice-number-series-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-number-series-mutation.js +39 -0
- package/dist/hooks/use-invoice-number-series.d.ts +28 -0
- package/dist/hooks/use-invoice-number-series.d.ts.map +1 -0
- package/dist/hooks/use-invoice-number-series.js +12 -0
- package/dist/hooks/use-invoice-payment-mutation.d.ts +29 -0
- package/dist/hooks/use-invoice-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-payment-mutation.js +35 -0
- package/dist/hooks/use-invoice-payments.d.ts +21 -0
- package/dist/hooks/use-invoice-payments.d.ts.map +1 -0
- package/dist/hooks/use-invoice-payments.js +12 -0
- package/dist/hooks/use-invoice.d.ts +32 -0
- package/dist/hooks/use-invoice.d.ts.map +1 -0
- package/dist/hooks/use-invoice.js +12 -0
- package/dist/hooks/use-invoices.d.ts +36 -0
- package/dist/hooks/use-invoices.d.ts.map +1 -0
- package/dist/hooks/use-invoices.js +12 -0
- package/dist/hooks/use-payment-mutation.d.ts +57 -0
- package/dist/hooks/use-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-payment-mutation.js +59 -0
- package/dist/hooks/use-payment-session-mutation.d.ts +205 -0
- package/dist/hooks/use-payment-session-mutation.d.ts.map +1 -0
- package/dist/hooks/use-payment-session-mutation.js +38 -0
- package/dist/hooks/use-payment-sessions.d.ts +97 -0
- package/dist/hooks/use-payment-sessions.d.ts.map +1 -0
- package/dist/hooks/use-payment-sessions.js +17 -0
- package/dist/hooks/use-payment.d.ts +31 -0
- package/dist/hooks/use-payment.d.ts.map +1 -0
- package/dist/hooks/use-payment.js +12 -0
- package/dist/hooks/use-product-profitability.d.ts +52 -0
- package/dist/hooks/use-product-profitability.d.ts.map +1 -0
- package/dist/hooks/use-product-profitability.js +12 -0
- package/dist/hooks/use-public-booking-documents.d.ts +29 -0
- package/dist/hooks/use-public-booking-documents.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-documents.js +12 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts +47 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payment-options.js +12 -0
- package/dist/hooks/use-public-booking-payments.d.ts +24 -0
- package/dist/hooks/use-public-booking-payments.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payments.js +12 -0
- package/dist/hooks/use-public-finance-document-by-reference.d.ts +27 -0
- package/dist/hooks/use-public-finance-document-by-reference.d.ts.map +1 -0
- package/dist/hooks/use-public-finance-document-by-reference.js +12 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts +82 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session-mutation.js +33 -0
- package/dist/hooks/use-public-payment-session.d.ts +73 -0
- package/dist/hooks/use-public-payment-session.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session.js +12 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts +23 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-voucher-validation-mutation.js +17 -0
- package/dist/hooks/use-supplier-invoice-attachments.d.ts +17 -0
- package/dist/hooks/use-supplier-invoice-attachments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-attachments.js +12 -0
- package/dist/hooks/use-supplier-invoice-mutation.d.ts +353 -0
- package/dist/hooks/use-supplier-invoice-mutation.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-mutation.js +81 -0
- package/dist/hooks/use-supplier-invoice-payments.d.ts +26 -0
- package/dist/hooks/use-supplier-invoice-payments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-payments.js +12 -0
- package/dist/hooks/use-supplier-invoice.d.ts +65 -0
- package/dist/hooks/use-supplier-invoice.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice.js +12 -0
- package/dist/hooks/use-supplier-invoices.d.ts +36 -0
- package/dist/hooks/use-supplier-invoices.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoices.js +12 -0
- package/dist/hooks/use-supplier-payment-mutation.d.ts +55 -0
- package/dist/hooks/use-supplier-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-supplier-payment-mutation.js +35 -0
- package/dist/hooks/use-supplier-payments.d.ts +27 -0
- package/dist/hooks/use-supplier-payments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-payments.js +12 -0
- package/dist/hooks/use-traveler-profitability.d.ts +24 -0
- package/dist/hooks/use-traveler-profitability.d.ts.map +1 -0
- package/dist/hooks/use-traveler-profitability.js +11 -0
- package/dist/hooks/use-voucher-mutation.d.ts +105 -0
- package/dist/hooks/use-voucher-mutation.d.ts.map +1 -0
- package/dist/hooks/use-voucher-mutation.js +50 -0
- package/dist/hooks/use-voucher.d.ts +38 -0
- package/dist/hooks/use-voucher.d.ts.map +1 -0
- package/dist/hooks/use-voucher.js +17 -0
- package/dist/hooks/use-vouchers.d.ts +34 -0
- package/dist/hooks/use-vouchers.d.ts.map +1 -0
- package/dist/hooks/use-vouchers.js +18 -0
- package/dist/i18n/en/invoices.d.ts +278 -0
- package/dist/i18n/en/invoices.d.ts.map +1 -0
- package/dist/i18n/en/invoices.js +277 -0
- package/dist/i18n/en/numberingAndPayments.d.ts +387 -0
- package/dist/i18n/en/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/en/numberingAndPayments.js +386 -0
- package/dist/i18n/en/profitability.d.ts +147 -0
- package/dist/i18n/en/profitability.d.ts.map +1 -0
- package/dist/i18n/en/profitability.js +146 -0
- package/dist/i18n/en/suppliers.d.ts +187 -0
- package/dist/i18n/en/suppliers.d.ts.map +1 -0
- package/dist/i18n/en/suppliers.js +186 -0
- package/dist/i18n/en.d.ts +998 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +22 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages/core.d.ts +18 -0
- package/dist/i18n/messages/core.d.ts.map +1 -0
- package/dist/i18n/messages/core.js +30 -0
- package/dist/i18n/messages/invoices.d.ts +252 -0
- package/dist/i18n/messages/invoices.d.ts.map +1 -0
- package/dist/i18n/messages/invoices.js +1 -0
- package/dist/i18n/messages/numberingAndPayments.d.ts +277 -0
- package/dist/i18n/messages/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/messages/numberingAndPayments.js +1 -0
- package/dist/i18n/messages/profitability.d.ts +151 -0
- package/dist/i18n/messages/profitability.d.ts.map +1 -0
- package/dist/i18n/messages/profitability.js +1 -0
- package/dist/i18n/messages/suppliers.d.ts +167 -0
- package/dist/i18n/messages/suppliers.d.ts.map +1 -0
- package/dist/i18n/messages/suppliers.js +1 -0
- package/dist/i18n/messages.d.ts +29 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +2018 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro/invoices.d.ts +278 -0
- package/dist/i18n/ro/invoices.d.ts.map +1 -0
- package/dist/i18n/ro/invoices.js +277 -0
- package/dist/i18n/ro/numberingAndPayments.d.ts +387 -0
- package/dist/i18n/ro/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/ro/numberingAndPayments.js +386 -0
- package/dist/i18n/ro/profitability.d.ts +147 -0
- package/dist/i18n/ro/profitability.d.ts.map +1 -0
- package/dist/i18n/ro/profitability.js +146 -0
- package/dist/i18n/ro/suppliers.d.ts +187 -0
- package/dist/i18n/ro/suppliers.d.ts.map +1 -0
- package/dist/i18n/ro/suppliers.js +186 -0
- package/dist/i18n/ro.d.ts +998 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +22 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/operations.d.ts +484 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +52 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +195 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +49 -0
- package/dist/query-options/public-reporting.d.ts +2129 -0
- package/dist/query-options/public-reporting.d.ts.map +1 -0
- package/dist/query-options/public-reporting.js +193 -0
- package/dist/query-options-action-ledger.d.ts +382 -0
- package/dist/query-options-action-ledger.d.ts.map +1 -0
- package/dist/query-options-action-ledger.js +36 -0
- package/dist/query-options.d.ts +2057 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +328 -0
- package/dist/schemas/accountant.d.ts +168 -0
- package/dist/schemas/accountant.d.ts.map +1 -0
- package/dist/schemas/accountant.js +53 -0
- package/dist/schemas/action-ledger.d.ts +206 -0
- package/dist/schemas/action-ledger.d.ts.map +1 -0
- package/dist/schemas/action-ledger.js +83 -0
- package/dist/schemas/common.d.ts +17 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +10 -0
- package/dist/schemas/invoice.d.ts +1451 -0
- package/dist/schemas/invoice.d.ts.map +1 -0
- package/dist/schemas/invoice.js +438 -0
- package/dist/schemas/profitability.d.ts +333 -0
- package/dist/schemas/profitability.d.ts.map +1 -0
- package/dist/schemas/profitability.js +84 -0
- package/dist/schemas/public.d.ts +481 -0
- package/dist/schemas/public.d.ts.map +1 -0
- package/dist/schemas/public.js +9 -0
- package/dist/schemas/responses.d.ts +632 -0
- package/dist/schemas/responses.d.ts.map +1 -0
- package/dist/schemas/responses.js +27 -0
- package/dist/schemas/supplier.d.ts +226 -0
- package/dist/schemas/supplier.d.ts.map +1 -0
- package/dist/schemas/supplier.js +103 -0
- package/dist/schemas/vouchers.d.ts +283 -0
- package/dist/schemas/vouchers.d.ts.map +1 -0
- package/dist/schemas/vouchers.js +49 -0
- package/dist/schemas.d.ts +10 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +9 -0
- package/dist/ui.d.ts +27 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +26 -0
- package/package.json +181 -0
- package/src/styles.css +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../src/schemas/invoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,mBAAmB;;;;;;;;EAQ9B,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;EAAyD,CAAA;AACzF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAM/D,eAAO,MAAM,mBAAmB;;;;;;;;;;EAU9B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,eAAO,MAAM,sBAAsB;;;;EAAyC,CAAA;AAE5E,eAAO,MAAM,iBAAiB;;;;EAAiD,CAAA;AAE/E,eAAO,MAAM,gCAAgC;;;;EAAyC,CAAA;AACtF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF,eAAO,MAAM,8BAA8B;;;;EAAoB,CAAA;AAC/D,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAErF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAEvF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBvC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEjF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8C,CAAA;AAEpF,eAAO,MAAM,6BAA6B;;;;;;;;;;;iBAWxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA"}
|
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { arrayEnvelope, paginatedEnvelope, singleEnvelope } from "./common.js";
|
|
3
|
+
export const invoiceStatusSchema = z.enum([
|
|
4
|
+
"draft",
|
|
5
|
+
"pending_external_allocation",
|
|
6
|
+
"issued",
|
|
7
|
+
"partially_paid",
|
|
8
|
+
"paid",
|
|
9
|
+
"overdue",
|
|
10
|
+
"void",
|
|
11
|
+
]);
|
|
12
|
+
export const paymentStatusSchema = z.enum(["pending", "completed", "failed", "refunded"]);
|
|
13
|
+
// Mirrors the backend's `paymentMethodSchema` from
|
|
14
|
+
// `@voyant-travel/finance/validation-shared`. Kept inline rather than
|
|
15
|
+
// re-imported from `@voyant-travel/finance` so the browser bundle doesn't
|
|
16
|
+
// drag in drizzle and the rest of the server-only package.
|
|
17
|
+
export const paymentMethodSchema = z.enum([
|
|
18
|
+
"bank_transfer",
|
|
19
|
+
"credit_card",
|
|
20
|
+
"debit_card",
|
|
21
|
+
"cash",
|
|
22
|
+
"cheque",
|
|
23
|
+
"wallet",
|
|
24
|
+
"direct_bill",
|
|
25
|
+
"voucher",
|
|
26
|
+
"other",
|
|
27
|
+
]);
|
|
28
|
+
export const creditNoteStatusSchema = z.enum(["draft", "issued", "applied"]);
|
|
29
|
+
export const invoiceTypeSchema = z.enum(["invoice", "proforma", "credit_note"]);
|
|
30
|
+
export const invoiceNumberResetStrategySchema = z.enum(["never", "annual", "monthly"]);
|
|
31
|
+
export const invoiceNumberSeriesScopeSchema = invoiceTypeSchema;
|
|
32
|
+
export const invoiceNumberSeriesRecordSchema = z.object({
|
|
33
|
+
id: z.string(),
|
|
34
|
+
code: z.string(),
|
|
35
|
+
name: z.string(),
|
|
36
|
+
prefix: z.string(),
|
|
37
|
+
separator: z.string(),
|
|
38
|
+
padLength: z.number().int(),
|
|
39
|
+
currentSequence: z.number().int(),
|
|
40
|
+
resetStrategy: invoiceNumberResetStrategySchema,
|
|
41
|
+
resetAt: z.string().nullable(),
|
|
42
|
+
scope: invoiceNumberSeriesScopeSchema,
|
|
43
|
+
isDefault: z.boolean(),
|
|
44
|
+
externalProvider: z.string().nullable(),
|
|
45
|
+
externalConfigKey: z.string().nullable(),
|
|
46
|
+
active: z.boolean(),
|
|
47
|
+
createdAt: z.string(),
|
|
48
|
+
updatedAt: z.string(),
|
|
49
|
+
});
|
|
50
|
+
export const invoiceRecordSchema = z
|
|
51
|
+
.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
invoiceNumber: z.string(),
|
|
54
|
+
bookingId: z.string(),
|
|
55
|
+
personId: z.string().nullable(),
|
|
56
|
+
organizationId: z.string().nullable(),
|
|
57
|
+
/**
|
|
58
|
+
* `invoice` (final), `proforma` (placeholder pending bank transfer),
|
|
59
|
+
* or `credit_note` (refund / cancellation). Drives the type badge
|
|
60
|
+
* + filename on the booking detail page.
|
|
61
|
+
*/
|
|
62
|
+
invoiceType: invoiceTypeSchema.optional(),
|
|
63
|
+
status: invoiceStatusSchema,
|
|
64
|
+
currency: z.string(),
|
|
65
|
+
subtotalCents: z.number().int(),
|
|
66
|
+
taxCents: z.number().int(),
|
|
67
|
+
totalCents: z.number().int(),
|
|
68
|
+
paidCents: z.number().int(),
|
|
69
|
+
balanceDueCents: z.number().int(),
|
|
70
|
+
issueDate: z.string(),
|
|
71
|
+
dueDate: z.string(),
|
|
72
|
+
notes: z.string().nullable(),
|
|
73
|
+
voidedAt: z.string().nullable().optional(),
|
|
74
|
+
voidReason: z.string().nullable().optional(),
|
|
75
|
+
createdAt: z.string(),
|
|
76
|
+
updatedAt: z.string(),
|
|
77
|
+
/**
|
|
78
|
+
* Distinct payment-schedule ids referenced by this invoice's line
|
|
79
|
+
* items. Populated by the list endpoint so the booking-detail
|
|
80
|
+
* payment-schedule table can hide "Generate invoice/proforma" when
|
|
81
|
+
* a document already covers a row.
|
|
82
|
+
*/
|
|
83
|
+
bookingPaymentScheduleIds: z.array(z.string()).optional(),
|
|
84
|
+
/**
|
|
85
|
+
* For proforma rows, points at the final invoice that replaced
|
|
86
|
+
* this proforma (and is the inverse of `convertedFromInvoiceId`).
|
|
87
|
+
* Populated by `getInvoiceById` — letting the booking detail page
|
|
88
|
+
* surface "Invoiced" status + a deep link on a void proforma.
|
|
89
|
+
*/
|
|
90
|
+
convertedToInvoiceId: z.string().nullable().optional(),
|
|
91
|
+
convertedToInvoiceNumber: z.string().nullable().optional(),
|
|
92
|
+
})
|
|
93
|
+
// Permissive on extra columns the server may return (e.g.
|
|
94
|
+
// `convertedFromInvoiceId`, `baseCurrency`). Adding them all to the
|
|
95
|
+
// schema invites churn; passthrough lets the UI use what it needs.
|
|
96
|
+
.passthrough();
|
|
97
|
+
export const lineItemRecordSchema = z.object({
|
|
98
|
+
id: z.string(),
|
|
99
|
+
invoiceId: z.string(),
|
|
100
|
+
description: z.string(),
|
|
101
|
+
quantity: z.number().int(),
|
|
102
|
+
unitPriceCents: z.number().int(),
|
|
103
|
+
totalCents: z.number().int(),
|
|
104
|
+
taxRate: z.number().int().nullable(),
|
|
105
|
+
sortOrder: z.number().int(),
|
|
106
|
+
createdAt: z.string(),
|
|
107
|
+
});
|
|
108
|
+
export const paymentRecordSchema = z.object({
|
|
109
|
+
id: z.string(),
|
|
110
|
+
invoiceId: z.string(),
|
|
111
|
+
amountCents: z.number().int(),
|
|
112
|
+
currency: z.string(),
|
|
113
|
+
baseCurrency: z.string().nullable(),
|
|
114
|
+
baseAmountCents: z.number().int().nullable(),
|
|
115
|
+
fxRateSetId: z.string().nullable().optional(),
|
|
116
|
+
paymentMethod: z.string(),
|
|
117
|
+
status: paymentStatusSchema,
|
|
118
|
+
referenceNumber: z.string().nullable(),
|
|
119
|
+
paymentDate: z.string(),
|
|
120
|
+
notes: z.string().nullable(),
|
|
121
|
+
createdAt: z.string(),
|
|
122
|
+
});
|
|
123
|
+
export const creditNoteRecordSchema = z.object({
|
|
124
|
+
id: z.string(),
|
|
125
|
+
creditNoteNumber: z.string(),
|
|
126
|
+
invoiceId: z.string(),
|
|
127
|
+
status: creditNoteStatusSchema,
|
|
128
|
+
amountCents: z.number().int(),
|
|
129
|
+
currency: z.string(),
|
|
130
|
+
reason: z.string(),
|
|
131
|
+
notes: z.string().nullable(),
|
|
132
|
+
createdAt: z.string(),
|
|
133
|
+
});
|
|
134
|
+
export const financeNoteRecordSchema = z.object({
|
|
135
|
+
id: z.string(),
|
|
136
|
+
invoiceId: z.string(),
|
|
137
|
+
authorId: z.string(),
|
|
138
|
+
content: z.string(),
|
|
139
|
+
createdAt: z.string(),
|
|
140
|
+
});
|
|
141
|
+
export const supplierPaymentRecordSchema = z.object({
|
|
142
|
+
id: z.string(),
|
|
143
|
+
// AP payments may settle a whole invoice with no booking (§5.4).
|
|
144
|
+
bookingId: z.string().nullable(),
|
|
145
|
+
supplierInvoiceId: z.string().nullable().optional(),
|
|
146
|
+
supplierId: z.string().nullable(),
|
|
147
|
+
amountCents: z.number().int(),
|
|
148
|
+
currency: z.string(),
|
|
149
|
+
baseCurrency: z.string().nullable().optional(),
|
|
150
|
+
baseAmountCents: z.number().int().nullable().optional(),
|
|
151
|
+
fxRateSetId: z.string().nullable().optional(),
|
|
152
|
+
paymentMethod: z.string(),
|
|
153
|
+
status: paymentStatusSchema,
|
|
154
|
+
referenceNumber: z.string().nullable(),
|
|
155
|
+
paymentDate: z.string(),
|
|
156
|
+
notes: z.string().nullable().optional(),
|
|
157
|
+
createdAt: z.string(),
|
|
158
|
+
});
|
|
159
|
+
export const paymentKindSchema = z.enum(["customer", "supplier"]);
|
|
160
|
+
export const unifiedPaymentRecordSchema = z.object({
|
|
161
|
+
kind: paymentKindSchema,
|
|
162
|
+
id: z.string(),
|
|
163
|
+
invoiceId: z.string().nullable(),
|
|
164
|
+
invoiceNumber: z.string().nullable(),
|
|
165
|
+
bookingId: z.string().nullable(),
|
|
166
|
+
bookingNumber: z.string().nullable(),
|
|
167
|
+
supplierId: z.string().nullable(),
|
|
168
|
+
supplierName: z.string().nullable(),
|
|
169
|
+
personId: z.string().nullable(),
|
|
170
|
+
personName: z.string().nullable(),
|
|
171
|
+
organizationId: z.string().nullable(),
|
|
172
|
+
organizationName: z.string().nullable(),
|
|
173
|
+
amountCents: z.number().int(),
|
|
174
|
+
currency: z.string(),
|
|
175
|
+
baseCurrency: z.string().nullable(),
|
|
176
|
+
baseAmountCents: z.number().int().nullable(),
|
|
177
|
+
paymentMethod: z.string(),
|
|
178
|
+
status: paymentStatusSchema,
|
|
179
|
+
referenceNumber: z.string().nullable(),
|
|
180
|
+
paymentDate: z.string(),
|
|
181
|
+
notes: z.string().nullable(),
|
|
182
|
+
createdAt: z.string(),
|
|
183
|
+
updatedAt: z.string(),
|
|
184
|
+
});
|
|
185
|
+
export const paymentScheduleTypeSchema = z.enum([
|
|
186
|
+
"deposit",
|
|
187
|
+
"installment",
|
|
188
|
+
"balance",
|
|
189
|
+
"hold",
|
|
190
|
+
"other",
|
|
191
|
+
]);
|
|
192
|
+
export const paymentScheduleStatusSchema = z.enum([
|
|
193
|
+
"pending",
|
|
194
|
+
"due",
|
|
195
|
+
"paid",
|
|
196
|
+
"waived",
|
|
197
|
+
"cancelled",
|
|
198
|
+
"expired",
|
|
199
|
+
]);
|
|
200
|
+
export const bookingPaymentScheduleRecordSchema = z.object({
|
|
201
|
+
id: z.string(),
|
|
202
|
+
bookingId: z.string(),
|
|
203
|
+
bookingItemId: z.string().nullable(),
|
|
204
|
+
scheduleType: paymentScheduleTypeSchema,
|
|
205
|
+
status: paymentScheduleStatusSchema,
|
|
206
|
+
dueDate: z.string(),
|
|
207
|
+
currency: z.string(),
|
|
208
|
+
amountCents: z.number().int(),
|
|
209
|
+
notes: z.string().nullable(),
|
|
210
|
+
createdAt: z.string(),
|
|
211
|
+
updatedAt: z.string(),
|
|
212
|
+
});
|
|
213
|
+
export const bookingPaymentSchedulesResponse = arrayEnvelope(bookingPaymentScheduleRecordSchema);
|
|
214
|
+
// Payment sessions — admin surface of `/v1/admin/finance/payment-sessions`.
|
|
215
|
+
// Mirrors the backend's `payment_sessions` row (dates serialized to ISO
|
|
216
|
+
// strings); the status enum is kept inline like `paymentMethodSchema`
|
|
217
|
+
// above so the browser bundle doesn't drag in the server package.
|
|
218
|
+
export const paymentSessionStatusSchema = z.enum([
|
|
219
|
+
"pending",
|
|
220
|
+
"requires_redirect",
|
|
221
|
+
"processing",
|
|
222
|
+
"authorized",
|
|
223
|
+
"paid",
|
|
224
|
+
"failed",
|
|
225
|
+
"cancelled",
|
|
226
|
+
"expired",
|
|
227
|
+
]);
|
|
228
|
+
export const paymentTargetSchema = z.discriminatedUnion("type", [
|
|
229
|
+
z.object({ type: z.literal("booking"), bookingId: z.string() }),
|
|
230
|
+
z.object({ type: z.literal("invoice"), invoiceId: z.string() }),
|
|
231
|
+
z.object({ type: z.literal("booking_payment_schedule"), bookingPaymentScheduleId: z.string() }),
|
|
232
|
+
z.object({ type: z.literal("booking_guarantee"), bookingGuaranteeId: z.string() }),
|
|
233
|
+
z.object({ type: z.literal("flight_order"), flightOrderId: z.string() }),
|
|
234
|
+
z.object({ type: z.literal("program"), programId: z.string() }),
|
|
235
|
+
z.object({ type: z.literal("supplier_settlement"), supplierSettlementId: z.string() }),
|
|
236
|
+
z.object({ type: z.literal("channel_settlement"), channelSettlementId: z.string() }),
|
|
237
|
+
z.object({ type: z.literal("provider_reference"), provider: z.string(), reference: z.string() }),
|
|
238
|
+
z.object({ type: z.literal("legacy_order"), legacyOrderId: z.string() }),
|
|
239
|
+
]);
|
|
240
|
+
export const paymentProvenanceSchema = z.object({
|
|
241
|
+
source: z.enum([
|
|
242
|
+
"operator",
|
|
243
|
+
"storefront",
|
|
244
|
+
"customer_portal",
|
|
245
|
+
"payment_provider",
|
|
246
|
+
"supplier_channel",
|
|
247
|
+
"migration",
|
|
248
|
+
"other",
|
|
249
|
+
]),
|
|
250
|
+
provider: z.string().nullable().optional(),
|
|
251
|
+
reference: z.string().nullable().optional(),
|
|
252
|
+
idempotencyKey: z.string().nullable().optional(),
|
|
253
|
+
});
|
|
254
|
+
function derivePaymentTarget(value) {
|
|
255
|
+
if (value.bookingPaymentScheduleId) {
|
|
256
|
+
return {
|
|
257
|
+
type: "booking_payment_schedule",
|
|
258
|
+
bookingPaymentScheduleId: value.bookingPaymentScheduleId,
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
if (value.bookingGuaranteeId) {
|
|
262
|
+
return { type: "booking_guarantee", bookingGuaranteeId: value.bookingGuaranteeId };
|
|
263
|
+
}
|
|
264
|
+
if (value.invoiceId)
|
|
265
|
+
return { type: "invoice", invoiceId: value.invoiceId };
|
|
266
|
+
if (value.targetType === "flight_order" && value.targetId) {
|
|
267
|
+
return { type: "flight_order", flightOrderId: value.targetId };
|
|
268
|
+
}
|
|
269
|
+
if (value.bookingId)
|
|
270
|
+
return { type: "booking", bookingId: value.bookingId };
|
|
271
|
+
if (value.legacyOrderId) {
|
|
272
|
+
return { type: "legacy_order", legacyOrderId: value.legacyOrderId };
|
|
273
|
+
}
|
|
274
|
+
if (value.provider && value.externalReference) {
|
|
275
|
+
return {
|
|
276
|
+
type: "provider_reference",
|
|
277
|
+
provider: value.provider,
|
|
278
|
+
reference: value.externalReference,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
283
|
+
export const paymentSessionRecordSchema = z
|
|
284
|
+
.object({
|
|
285
|
+
id: z.string(),
|
|
286
|
+
target: paymentTargetSchema.nullable().optional(),
|
|
287
|
+
provenance: paymentProvenanceSchema.nullable().optional(),
|
|
288
|
+
targetType: z.string(),
|
|
289
|
+
targetId: z.string().nullable(),
|
|
290
|
+
bookingId: z.string().nullable(),
|
|
291
|
+
legacyOrderId: z.string().nullable().optional(),
|
|
292
|
+
orderId: z.string().nullable().optional(),
|
|
293
|
+
invoiceId: z.string().nullable(),
|
|
294
|
+
bookingPaymentScheduleId: z.string().nullable(),
|
|
295
|
+
bookingGuaranteeId: z.string().nullable(),
|
|
296
|
+
paymentInstrumentId: z.string().nullable(),
|
|
297
|
+
paymentAuthorizationId: z.string().nullable(),
|
|
298
|
+
paymentCaptureId: z.string().nullable(),
|
|
299
|
+
paymentId: z.string().nullable(),
|
|
300
|
+
status: paymentSessionStatusSchema,
|
|
301
|
+
provider: z.string().nullable(),
|
|
302
|
+
providerSessionId: z.string().nullable(),
|
|
303
|
+
providerPaymentId: z.string().nullable(),
|
|
304
|
+
externalReference: z.string().nullable(),
|
|
305
|
+
idempotencyKey: z.string().nullable(),
|
|
306
|
+
clientReference: z.string().nullable(),
|
|
307
|
+
currency: z.string(),
|
|
308
|
+
amountCents: z.number().int(),
|
|
309
|
+
paymentMethod: paymentMethodSchema.nullable(),
|
|
310
|
+
payerPersonId: z.string().nullable(),
|
|
311
|
+
payerOrganizationId: z.string().nullable(),
|
|
312
|
+
payerEmail: z.string().nullable(),
|
|
313
|
+
payerName: z.string().nullable(),
|
|
314
|
+
redirectUrl: z.string().nullable(),
|
|
315
|
+
returnUrl: z.string().nullable(),
|
|
316
|
+
cancelUrl: z.string().nullable(),
|
|
317
|
+
callbackUrl: z.string().nullable(),
|
|
318
|
+
expiresAt: z.string().nullable(),
|
|
319
|
+
completedAt: z.string().nullable(),
|
|
320
|
+
failedAt: z.string().nullable(),
|
|
321
|
+
cancelledAt: z.string().nullable(),
|
|
322
|
+
expiredAt: z.string().nullable(),
|
|
323
|
+
failureCode: z.string().nullable(),
|
|
324
|
+
failureMessage: z.string().nullable(),
|
|
325
|
+
notes: z.string().nullable(),
|
|
326
|
+
providerPayload: z.record(z.string(), z.unknown()).nullable(),
|
|
327
|
+
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
328
|
+
createdAt: z.string(),
|
|
329
|
+
updatedAt: z.string(),
|
|
330
|
+
})
|
|
331
|
+
.transform(({ orderId, legacyOrderId, target, provenance, ...value }) => {
|
|
332
|
+
const resolvedLegacyOrderId = legacyOrderId ?? orderId ?? null;
|
|
333
|
+
return {
|
|
334
|
+
...value,
|
|
335
|
+
legacyOrderId: resolvedLegacyOrderId,
|
|
336
|
+
target: target ??
|
|
337
|
+
derivePaymentTarget({
|
|
338
|
+
...value,
|
|
339
|
+
legacyOrderId: resolvedLegacyOrderId,
|
|
340
|
+
}),
|
|
341
|
+
provenance: provenance ?? null,
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
export const paymentSessionListResponse = paginatedEnvelope(paymentSessionRecordSchema);
|
|
345
|
+
export const paymentSessionSingleResponse = singleEnvelope(paymentSessionRecordSchema);
|
|
346
|
+
// Customer payment policy — structural mirror of `PaymentPolicy` /
|
|
347
|
+
// `PaymentPolicySource` from `@voyant-travel/finance/payment-policy`, kept
|
|
348
|
+
// inline for the same browser-bundle reason as the enums above.
|
|
349
|
+
export const financeDepositRuleSchema = z.object({
|
|
350
|
+
kind: z.enum(["none", "percent", "fixed_cents"]),
|
|
351
|
+
percent: z.number().min(0).max(100).optional(),
|
|
352
|
+
amountCents: z.number().int().min(0).optional(),
|
|
353
|
+
});
|
|
354
|
+
export const financePaymentPolicySchema = z.object({
|
|
355
|
+
deposit: financeDepositRuleSchema,
|
|
356
|
+
minDaysBeforeDepartureForDeposit: z.number().int().min(0),
|
|
357
|
+
balanceDueDaysBeforeDeparture: z.number().int().min(0),
|
|
358
|
+
balanceDueMinDaysFromNow: z.number().int().min(0),
|
|
359
|
+
});
|
|
360
|
+
export const financePaymentPolicySourceSchema = z.enum([
|
|
361
|
+
"booking",
|
|
362
|
+
"listing",
|
|
363
|
+
"category",
|
|
364
|
+
"supplier",
|
|
365
|
+
"operator_default",
|
|
366
|
+
]);
|
|
367
|
+
// `POST /v1/admin/bookings/:bookingId/payment-schedule/regenerate` —
|
|
368
|
+
// returns the regenerated schedule rows plus the persisted booking-level
|
|
369
|
+
// override (or null) and which cascade layer produced the schedule.
|
|
370
|
+
export const regenerateBookingPaymentScheduleResultSchema = z.object({
|
|
371
|
+
schedule: z.array(bookingPaymentScheduleRecordSchema),
|
|
372
|
+
bookingPolicy: financePaymentPolicySchema.nullable(),
|
|
373
|
+
cascadeSource: financePaymentPolicySourceSchema,
|
|
374
|
+
});
|
|
375
|
+
export const regenerateBookingPaymentScheduleResponse = singleEnvelope(regenerateBookingPaymentScheduleResultSchema);
|
|
376
|
+
export const invoiceFxRateRecordSchema = z.object({
|
|
377
|
+
baseCurrency: z.string(),
|
|
378
|
+
quoteCurrency: z.string(),
|
|
379
|
+
date: z.string().optional(),
|
|
380
|
+
rate: z.number(),
|
|
381
|
+
source: z.string().optional(),
|
|
382
|
+
quotedAt: z.string().optional(),
|
|
383
|
+
validUntil: z.string().optional(),
|
|
384
|
+
fxCommissionBps: z.number().int().nonnegative().default(0),
|
|
385
|
+
effectiveRate: z.number(),
|
|
386
|
+
fxCommissionInvoiceMention: z.string().optional(),
|
|
387
|
+
});
|
|
388
|
+
export const invoiceFxRateResponse = singleEnvelope(invoiceFxRateRecordSchema);
|
|
389
|
+
export const guaranteeTypeSchema = z.enum([
|
|
390
|
+
"deposit",
|
|
391
|
+
"credit_card",
|
|
392
|
+
"preauth",
|
|
393
|
+
"card_on_file",
|
|
394
|
+
"bank_transfer",
|
|
395
|
+
"voucher",
|
|
396
|
+
"agency_letter",
|
|
397
|
+
"other",
|
|
398
|
+
]);
|
|
399
|
+
export const guaranteeStatusSchema = z.enum([
|
|
400
|
+
"pending",
|
|
401
|
+
"active",
|
|
402
|
+
"released",
|
|
403
|
+
"failed",
|
|
404
|
+
"cancelled",
|
|
405
|
+
"expired",
|
|
406
|
+
]);
|
|
407
|
+
export const bookingGuaranteeRecordSchema = z.object({
|
|
408
|
+
id: z.string(),
|
|
409
|
+
bookingId: z.string(),
|
|
410
|
+
bookingPaymentScheduleId: z.string().nullable(),
|
|
411
|
+
bookingItemId: z.string().nullable(),
|
|
412
|
+
guaranteeType: guaranteeTypeSchema,
|
|
413
|
+
status: guaranteeStatusSchema,
|
|
414
|
+
currency: z.string().nullable(),
|
|
415
|
+
amountCents: z.number().int().nullable(),
|
|
416
|
+
provider: z.string().nullable(),
|
|
417
|
+
referenceNumber: z.string().nullable(),
|
|
418
|
+
guaranteedAt: z.string().nullable(),
|
|
419
|
+
expiresAt: z.string().nullable(),
|
|
420
|
+
releasedAt: z.string().nullable(),
|
|
421
|
+
notes: z.string().nullable(),
|
|
422
|
+
createdAt: z.string(),
|
|
423
|
+
updatedAt: z.string(),
|
|
424
|
+
});
|
|
425
|
+
export const bookingGuaranteesResponse = arrayEnvelope(bookingGuaranteeRecordSchema);
|
|
426
|
+
export const invoiceAttachmentRecordSchema = z.object({
|
|
427
|
+
id: z.string(),
|
|
428
|
+
invoiceId: z.string(),
|
|
429
|
+
kind: z.string(),
|
|
430
|
+
name: z.string(),
|
|
431
|
+
mimeType: z.string().nullable(),
|
|
432
|
+
fileSize: z.number().int().nullable(),
|
|
433
|
+
storageKey: z.string().nullable(),
|
|
434
|
+
checksum: z.string().nullable(),
|
|
435
|
+
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
436
|
+
createdAt: z.string(),
|
|
437
|
+
});
|
|
438
|
+
// ---------- supplier invoices (accounts payable) ----------
|