@voyant-travel/bookings-react 0.119.3
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 +87 -0
- package/dist/admin/booking-contract-dialog.d.ts +22 -0
- package/dist/admin/booking-contract-dialog.d.ts.map +1 -0
- package/dist/admin/booking-contract-dialog.js +161 -0
- package/dist/admin/booking-detail-host.d.ts +103 -0
- package/dist/admin/booking-detail-host.d.ts.map +1 -0
- package/dist/admin/booking-detail-host.js +127 -0
- package/dist/admin/booking-detail-skeleton.d.ts +7 -0
- package/dist/admin/booking-detail-skeleton.d.ts.map +1 -0
- package/dist/admin/booking-detail-skeleton.js +24 -0
- package/dist/admin/booking-documents-table.d.ts +13 -0
- package/dist/admin/booking-documents-table.d.ts.map +1 -0
- package/dist/admin/booking-documents-table.js +259 -0
- package/dist/admin/booking-invoice-sheet.d.ts +18 -0
- package/dist/admin/booking-invoice-sheet.d.ts.map +1 -0
- package/dist/admin/booking-invoice-sheet.js +101 -0
- package/dist/admin/booking-journey-host.d.ts +24 -0
- package/dist/admin/booking-journey-host.d.ts.map +1 -0
- package/dist/admin/booking-journey-host.js +278 -0
- package/dist/admin/bookings-host.d.ts +26 -0
- package/dist/admin/bookings-host.d.ts.map +1 -0
- package/dist/admin/bookings-host.js +18 -0
- package/dist/admin/bookings-list-skeleton.d.ts +10 -0
- package/dist/admin/bookings-list-skeleton.d.ts.map +1 -0
- package/dist/admin/bookings-list-skeleton.js +25 -0
- package/dist/admin/index.d.ts +273 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +331 -0
- package/dist/admin/journey-billing-duplicate-warning.d.ts +3 -0
- package/dist/admin/journey-billing-duplicate-warning.d.ts.map +1 -0
- package/dist/admin/journey-billing-duplicate-warning.js +26 -0
- package/dist/admin/journey-departure-picker.d.ts +7 -0
- package/dist/admin/journey-departure-picker.d.ts.map +1 -0
- package/dist/admin/journey-departure-picker.js +100 -0
- package/dist/admin/journey-units-picker.d.ts +11 -0
- package/dist/admin/journey-units-picker.d.ts.map +1 -0
- package/dist/admin/journey-units-picker.js +60 -0
- package/dist/admin/journey-voucher-picker.d.ts +3 -0
- package/dist/admin/journey-voucher-picker.d.ts.map +1 -0
- package/dist/admin/journey-voucher-picker.js +71 -0
- package/dist/admin/pages/booking-compose-page.d.ts +9 -0
- package/dist/admin/pages/booking-compose-page.d.ts.map +1 -0
- package/dist/admin/pages/booking-compose-page.js +17 -0
- package/dist/admin/pages/booking-detail-page.d.ts +11 -0
- package/dist/admin/pages/booking-detail-page.d.ts.map +1 -0
- package/dist/admin/pages/booking-detail-page.js +14 -0
- package/dist/admin/pages/booking-journey-page.d.ts +12 -0
- package/dist/admin/pages/booking-journey-page.d.ts.map +1 -0
- package/dist/admin/pages/booking-journey-page.js +26 -0
- package/dist/admin/pages/booking-new-page.d.ts +15 -0
- package/dist/admin/pages/booking-new-page.d.ts.map +1 -0
- package/dist/admin/pages/booking-new-page.js +50 -0
- package/dist/admin/pages/bookings-index-page.d.ts +20 -0
- package/dist/admin/pages/bookings-index-page.d.ts.map +1 -0
- package/dist/admin/pages/bookings-index-page.js +18 -0
- package/dist/admin/person-bookings-widget.d.ts +13 -0
- package/dist/admin/person-bookings-widget.d.ts.map +1 -0
- package/dist/admin/person-bookings-widget.js +48 -0
- package/dist/admin/slots.d.ts +31 -0
- package/dist/admin/slots.d.ts.map +1 -0
- package/dist/admin/slots.js +30 -0
- package/dist/admin/use-booking-action-ledger-events.d.ts +15 -0
- package/dist/admin/use-booking-action-ledger-events.d.ts.map +1 -0
- package/dist/admin/use-booking-action-ledger-events.js +66 -0
- package/dist/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +59 -0
- package/dist/components/booking-activity-timeline.d.ts +32 -0
- package/dist/components/booking-activity-timeline.d.ts.map +1 -0
- package/dist/components/booking-activity-timeline.js +147 -0
- package/dist/components/booking-billing-dialog.d.ts +16 -0
- package/dist/components/booking-billing-dialog.d.ts.map +1 -0
- package/dist/components/booking-billing-dialog.js +315 -0
- package/dist/components/booking-cancellation-dialog.d.ts +18 -0
- package/dist/components/booking-cancellation-dialog.d.ts.map +1 -0
- package/dist/components/booking-cancellation-dialog.js +79 -0
- package/dist/components/booking-combobox.d.ts +13 -0
- package/dist/components/booking-combobox.d.ts.map +1 -0
- package/dist/components/booking-combobox.js +44 -0
- package/dist/components/booking-create-form-utils.d.ts +56 -0
- package/dist/components/booking-create-form-utils.d.ts.map +1 -0
- package/dist/components/booking-create-form-utils.js +216 -0
- package/dist/components/booking-create-page.d.ts +14 -0
- package/dist/components/booking-create-page.d.ts.map +1 -0
- package/dist/components/booking-create-page.js +11 -0
- package/dist/components/booking-create-preview-card.d.ts +26 -0
- package/dist/components/booking-create-preview-card.d.ts.map +1 -0
- package/dist/components/booking-create-preview-card.js +107 -0
- package/dist/components/booking-create-product-extras-picker.d.ts +18 -0
- package/dist/components/booking-create-product-extras-picker.d.ts.map +1 -0
- package/dist/components/booking-create-product-extras-picker.js +82 -0
- package/dist/components/booking-create-sheet.d.ts +34 -0
- package/dist/components/booking-create-sheet.d.ts.map +1 -0
- package/dist/components/booking-create-sheet.js +811 -0
- package/dist/components/booking-create-utils.d.ts +66 -0
- package/dist/components/booking-create-utils.d.ts.map +1 -0
- package/dist/components/booking-create-utils.js +185 -0
- package/dist/components/booking-detail-page.d.ts +126 -0
- package/dist/components/booking-detail-page.d.ts.map +1 -0
- package/dist/components/booking-detail-page.js +264 -0
- package/dist/components/booking-dialog.d.ts +28 -0
- package/dist/components/booking-dialog.d.ts.map +1 -0
- package/dist/components/booking-dialog.js +130 -0
- package/dist/components/booking-document-dialog.d.ts +8 -0
- package/dist/components/booking-document-dialog.d.ts.map +1 -0
- package/dist/components/booking-document-dialog.js +83 -0
- package/dist/components/booking-document-list.d.ts +5 -0
- package/dist/components/booking-document-list.d.ts.map +1 -0
- package/dist/components/booking-document-list.js +43 -0
- package/dist/components/booking-group-link-dialog.d.ts +10 -0
- package/dist/components/booking-group-link-dialog.d.ts.map +1 -0
- package/dist/components/booking-group-link-dialog.js +79 -0
- package/dist/components/booking-group-section.d.ts +27 -0
- package/dist/components/booking-group-section.d.ts.map +1 -0
- package/dist/components/booking-group-section.js +51 -0
- package/dist/components/booking-guarantee-dialog.d.ts +10 -0
- package/dist/components/booking-guarantee-dialog.d.ts.map +1 -0
- package/dist/components/booking-guarantee-dialog.js +123 -0
- package/dist/components/booking-guarantee-list.d.ts +5 -0
- package/dist/components/booking-guarantee-list.d.ts.map +1 -0
- package/dist/components/booking-guarantee-list.js +86 -0
- package/dist/components/booking-item-dialog.d.ts +10 -0
- package/dist/components/booking-item-dialog.d.ts.map +1 -0
- package/dist/components/booking-item-dialog.js +155 -0
- package/dist/components/booking-item-list.d.ts +12 -0
- package/dist/components/booking-item-list.d.ts.map +1 -0
- package/dist/components/booking-item-list.js +191 -0
- package/dist/components/booking-item-travelers.d.ts +6 -0
- package/dist/components/booking-item-travelers.d.ts.map +1 -0
- package/dist/components/booking-item-travelers.js +57 -0
- package/dist/components/booking-list-filters.d.ts +43 -0
- package/dist/components/booking-list-filters.d.ts.map +1 -0
- package/dist/components/booking-list-filters.js +192 -0
- package/dist/components/booking-list.d.ts +50 -0
- package/dist/components/booking-list.d.ts.map +1 -0
- package/dist/components/booking-list.js +352 -0
- package/dist/components/booking-note-dialog.d.ts +16 -0
- package/dist/components/booking-note-dialog.d.ts.map +1 -0
- package/dist/components/booking-note-dialog.js +41 -0
- package/dist/components/booking-notes.d.ts +5 -0
- package/dist/components/booking-notes.d.ts.map +1 -0
- package/dist/components/booking-notes.js +45 -0
- package/dist/components/booking-payment-reconciliation-banner.d.ts +5 -0
- package/dist/components/booking-payment-reconciliation-banner.d.ts.map +1 -0
- package/dist/components/booking-payment-reconciliation-banner.js +91 -0
- package/dist/components/booking-payment-schedule-dialog.d.ts +10 -0
- package/dist/components/booking-payment-schedule-dialog.d.ts.map +1 -0
- package/dist/components/booking-payment-schedule-dialog.js +117 -0
- package/dist/components/booking-payment-schedule-list.d.ts +10 -0
- package/dist/components/booking-payment-schedule-list.d.ts.map +1 -0
- package/dist/components/booking-payment-schedule-list.js +217 -0
- package/dist/components/booking-payments-summary.d.ts +83 -0
- package/dist/components/booking-payments-summary.d.ts.map +1 -0
- package/dist/components/booking-payments-summary.js +176 -0
- package/dist/components/booking-quick-view-sheet.d.ts +14 -0
- package/dist/components/booking-quick-view-sheet.d.ts.map +1 -0
- package/dist/components/booking-quick-view-sheet.js +283 -0
- package/dist/components/bookings-page.d.ts +19 -0
- package/dist/components/bookings-page.d.ts.map +1 -0
- package/dist/components/bookings-page.js +9 -0
- package/dist/components/file-dropzone.d.ts +25 -0
- package/dist/components/file-dropzone.d.ts.map +1 -0
- package/dist/components/file-dropzone.js +102 -0
- package/dist/components/icon-action-button.d.ts +18 -0
- package/dist/components/icon-action-button.d.ts.map +1 -0
- package/dist/components/icon-action-button.js +13 -0
- package/dist/components/option-units-stepper-section.d.ts +111 -0
- package/dist/components/option-units-stepper-section.d.ts.map +1 -0
- package/dist/components/option-units-stepper-section.js +276 -0
- package/dist/components/payment-schedule-section.d.ts +91 -0
- package/dist/components/payment-schedule-section.d.ts.map +1 -0
- package/dist/components/payment-schedule-section.js +206 -0
- package/dist/components/person-picker-section.d.ts +71 -0
- package/dist/components/person-picker-section.d.ts.map +1 -0
- package/dist/components/person-picker-section.js +160 -0
- package/dist/components/price-breakdown-section.d.ts +83 -0
- package/dist/components/price-breakdown-section.d.ts.map +1 -0
- package/dist/components/price-breakdown-section.js +278 -0
- package/dist/components/product-picker-section.d.ts +29 -0
- package/dist/components/product-picker-section.d.ts.map +1 -0
- package/dist/components/product-picker-section.js +74 -0
- package/dist/components/shared-room-section.d.ts +40 -0
- package/dist/components/shared-room-section.d.ts.map +1 -0
- package/dist/components/shared-room-section.js +99 -0
- package/dist/components/status-badge.d.ts +24 -0
- package/dist/components/status-badge.d.ts.map +1 -0
- package/dist/components/status-badge.js +65 -0
- package/dist/components/status-change-dialog.d.ts +10 -0
- package/dist/components/status-change-dialog.d.ts.map +1 -0
- package/dist/components/status-change-dialog.js +57 -0
- package/dist/components/supplier-status-dialog.d.ts +10 -0
- package/dist/components/supplier-status-dialog.d.ts.map +1 -0
- package/dist/components/supplier-status-dialog.js +98 -0
- package/dist/components/supplier-status-list.d.ts +5 -0
- package/dist/components/supplier-status-list.d.ts.map +1 -0
- package/dist/components/supplier-status-list.js +115 -0
- package/dist/components/traveler-category-buttons.d.ts +26 -0
- package/dist/components/traveler-category-buttons.d.ts.map +1 -0
- package/dist/components/traveler-category-buttons.js +35 -0
- package/dist/components/traveler-dialog.d.ts +10 -0
- package/dist/components/traveler-dialog.d.ts.map +1 -0
- package/dist/components/traveler-dialog.js +256 -0
- package/dist/components/traveler-list.d.ts +6 -0
- package/dist/components/traveler-list.d.ts.map +1 -0
- package/dist/components/traveler-list.js +295 -0
- package/dist/components/travelers-section-controls.d.ts +52 -0
- package/dist/components/travelers-section-controls.d.ts.map +1 -0
- package/dist/components/travelers-section-controls.js +206 -0
- package/dist/components/travelers-section.d.ts +159 -0
- package/dist/components/travelers-section.d.ts.map +1 -0
- package/dist/components/travelers-section.js +355 -0
- package/dist/components/voucher-picker-section.d.ts +50 -0
- package/dist/components/voucher-picker-section.d.ts.map +1 -0
- package/dist/components/voucher-picker-section.js +79 -0
- package/dist/extras/client.d.ts +14 -0
- package/dist/extras/client.d.ts.map +1 -0
- package/dist/extras/client.js +58 -0
- package/dist/extras/components/extra-catalog-card.d.ts +13 -0
- package/dist/extras/components/extra-catalog-card.d.ts.map +1 -0
- package/dist/extras/components/extra-catalog-card.js +52 -0
- package/dist/extras/components/product-combobox.d.ts +9 -0
- package/dist/extras/components/product-combobox.d.ts.map +1 -0
- package/dist/extras/components/product-combobox.js +46 -0
- package/dist/extras/components/slot-extras-manifest-panel.d.ts +6 -0
- package/dist/extras/components/slot-extras-manifest-panel.d.ts.map +1 -0
- package/dist/extras/components/slot-extras-manifest-panel.js +108 -0
- package/dist/extras/hooks/index.d.ts +5 -0
- package/dist/extras/hooks/index.d.ts.map +1 -0
- package/dist/extras/hooks/index.js +4 -0
- package/dist/extras/hooks/use-product-extra.d.ts +24 -0
- package/dist/extras/hooks/use-product-extra.d.ts.map +1 -0
- package/dist/extras/hooks/use-product-extra.js +12 -0
- package/dist/extras/hooks/use-product-extras.d.ts +30 -0
- package/dist/extras/hooks/use-product-extras.d.ts.map +1 -0
- package/dist/extras/hooks/use-product-extras.js +12 -0
- package/dist/extras/hooks/use-slot-extra-manifest-mutation.d.ts +48 -0
- package/dist/extras/hooks/use-slot-extra-manifest-mutation.d.ts.map +1 -0
- package/dist/extras/hooks/use-slot-extra-manifest-mutation.js +26 -0
- package/dist/extras/hooks/use-slot-extra-manifest.d.ts +68 -0
- package/dist/extras/hooks/use-slot-extra-manifest.d.ts.map +1 -0
- package/dist/extras/hooks/use-slot-extra-manifest.js +11 -0
- package/dist/extras/i18n/en.d.ts +52 -0
- package/dist/extras/i18n/en.d.ts.map +1 -0
- package/dist/extras/i18n/en.js +51 -0
- package/dist/extras/i18n/index.d.ts +5 -0
- package/dist/extras/i18n/index.d.ts.map +1 -0
- package/dist/extras/i18n/index.js +3 -0
- package/dist/extras/i18n/messages.d.ts +37 -0
- package/dist/extras/i18n/messages.d.ts.map +1 -0
- package/dist/extras/i18n/messages.js +1 -0
- package/dist/extras/i18n/provider.d.ts +126 -0
- package/dist/extras/i18n/provider.d.ts.map +1 -0
- package/dist/extras/i18n/provider.js +44 -0
- package/dist/extras/i18n/ro.d.ts +52 -0
- package/dist/extras/i18n/ro.d.ts.map +1 -0
- package/dist/extras/i18n/ro.js +51 -0
- package/dist/extras/index.d.ts +7 -0
- package/dist/extras/index.d.ts.map +1 -0
- package/dist/extras/index.js +6 -0
- package/dist/extras/provider.d.ts +2 -0
- package/dist/extras/provider.d.ts.map +1 -0
- package/dist/extras/provider.js +1 -0
- package/dist/extras/query-keys.d.ts +16 -0
- package/dist/extras/query-keys.d.ts.map +1 -0
- package/dist/extras/query-keys.js +8 -0
- package/dist/extras/query-options.d.ts +455 -0
- package/dist/extras/query-options.d.ts.map +1 -0
- package/dist/extras/query-options.js +44 -0
- package/dist/extras/schemas.d.ts +416 -0
- package/dist/extras/schemas.d.ts.map +1 -0
- package/dist/extras/schemas.js +89 -0
- package/dist/extras/ui.d.ts +4 -0
- package/dist/extras/ui.d.ts.map +1 -0
- package/dist/extras/ui.js +3 -0
- package/dist/extras.d.ts +10 -0
- package/dist/extras.d.ts.map +1 -0
- package/dist/extras.js +9 -0
- package/dist/hooks/index.d.ts +36 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +35 -0
- package/dist/hooks/use-booking-action-ledger.d.ts +63 -0
- package/dist/hooks/use-booking-action-ledger.d.ts.map +1 -0
- package/dist/hooks/use-booking-action-ledger.js +34 -0
- package/dist/hooks/use-booking-activity.d.ts +17 -0
- package/dist/hooks/use-booking-activity.d.ts.map +1 -0
- package/dist/hooks/use-booking-activity.js +12 -0
- package/dist/hooks/use-booking-cancel-mutation.d.ts +69 -0
- package/dist/hooks/use-booking-cancel-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-cancel-mutation.js +24 -0
- package/dist/hooks/use-booking-contract-generation.d.ts +31 -0
- package/dist/hooks/use-booking-contract-generation.d.ts.map +1 -0
- package/dist/hooks/use-booking-contract-generation.js +36 -0
- package/dist/hooks/use-booking-convert-mutation.d.ts +81 -0
- package/dist/hooks/use-booking-convert-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-convert-mutation.js +24 -0
- package/dist/hooks/use-booking-create-mutation.d.ts +337 -0
- package/dist/hooks/use-booking-create-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-create-mutation.js +43 -0
- package/dist/hooks/use-booking-documents.d.ts +41 -0
- package/dist/hooks/use-booking-documents.d.ts.map +1 -0
- package/dist/hooks/use-booking-documents.js +46 -0
- package/dist/hooks/use-booking-dual-create-mutation.d.ts +338 -0
- package/dist/hooks/use-booking-dual-create-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-dual-create-mutation.js +45 -0
- package/dist/hooks/use-booking-group-for-booking.d.ts +24 -0
- package/dist/hooks/use-booking-group-for-booking.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-for-booking.js +12 -0
- package/dist/hooks/use-booking-group-member-mutation.d.ts +27 -0
- package/dist/hooks/use-booking-group-member-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-member-mutation.js +38 -0
- package/dist/hooks/use-booking-group-mutation.d.ts +40 -0
- package/dist/hooks/use-booking-group-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-mutation.js +32 -0
- package/dist/hooks/use-booking-group.d.ts +85 -0
- package/dist/hooks/use-booking-group.d.ts.map +1 -0
- package/dist/hooks/use-booking-group.js +12 -0
- package/dist/hooks/use-booking-groups.d.ts +21 -0
- package/dist/hooks/use-booking-groups.d.ts.map +1 -0
- package/dist/hooks/use-booking-groups.js +12 -0
- package/dist/hooks/use-booking-item-mutation.d.ts +101 -0
- package/dist/hooks/use-booking-item-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-item-mutation.js +42 -0
- package/dist/hooks/use-booking-item-travelers.d.ts +32 -0
- package/dist/hooks/use-booking-item-travelers.d.ts.map +1 -0
- package/dist/hooks/use-booking-item-travelers.js +48 -0
- package/dist/hooks/use-booking-items.d.ts +36 -0
- package/dist/hooks/use-booking-items.d.ts.map +1 -0
- package/dist/hooks/use-booking-items.js +12 -0
- package/dist/hooks/use-booking-mutation.d.ts +158 -0
- package/dist/hooks/use-booking-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-mutation.js +39 -0
- package/dist/hooks/use-booking-note-mutation.d.ts +39 -0
- package/dist/hooks/use-booking-note-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-note-mutation.js +44 -0
- package/dist/hooks/use-booking-notes.d.ts +15 -0
- package/dist/hooks/use-booking-notes.d.ts.map +1 -0
- package/dist/hooks/use-booking-notes.js +12 -0
- package/dist/hooks/use-booking-primary-product.d.ts +28 -0
- package/dist/hooks/use-booking-primary-product.d.ts.map +1 -0
- package/dist/hooks/use-booking-primary-product.js +20 -0
- package/dist/hooks/use-booking-status-mutation.d.ts +156 -0
- package/dist/hooks/use-booking-status-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-status-mutation.js +54 -0
- package/dist/hooks/use-booking-tax-preview.d.ts +29 -0
- package/dist/hooks/use-booking-tax-preview.d.ts.map +1 -0
- package/dist/hooks/use-booking-tax-preview.js +21 -0
- package/dist/hooks/use-booking.d.ts +67 -0
- package/dist/hooks/use-booking.d.ts.map +1 -0
- package/dist/hooks/use-booking.js +12 -0
- package/dist/hooks/use-bookings.d.ts +71 -0
- package/dist/hooks/use-bookings.d.ts.map +1 -0
- package/dist/hooks/use-bookings.js +12 -0
- package/dist/hooks/use-pricing-preview.d.ts +61 -0
- package/dist/hooks/use-pricing-preview.d.ts.map +1 -0
- package/dist/hooks/use-pricing-preview.js +18 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.d.ts +148 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.js +35 -0
- package/dist/hooks/use-public-booking-session-state.d.ts +16 -0
- package/dist/hooks/use-public-booking-session-state.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session-state.js +12 -0
- package/dist/hooks/use-public-booking-session.d.ts +101 -0
- package/dist/hooks/use-public-booking-session.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session.js +12 -0
- package/dist/hooks/use-reveal-traveler.d.ts +54 -0
- package/dist/hooks/use-reveal-traveler.d.ts.map +1 -0
- package/dist/hooks/use-reveal-traveler.js +18 -0
- package/dist/hooks/use-sharing-groups.d.ts +41 -0
- package/dist/hooks/use-sharing-groups.d.ts.map +1 -0
- package/dist/hooks/use-sharing-groups.js +20 -0
- package/dist/hooks/use-supplier-status-mutation.d.ts +46 -0
- package/dist/hooks/use-supplier-status-mutation.d.ts.map +1 -0
- package/dist/hooks/use-supplier-status-mutation.js +39 -0
- package/dist/hooks/use-supplier-statuses.d.ts +20 -0
- package/dist/hooks/use-supplier-statuses.d.ts.map +1 -0
- package/dist/hooks/use-supplier-statuses.js +12 -0
- package/dist/hooks/use-traveler-mutation.d.ts +55 -0
- package/dist/hooks/use-traveler-mutation.d.ts.map +1 -0
- package/dist/hooks/use-traveler-mutation.js +42 -0
- package/dist/hooks/use-traveler-with-travel-details-mutation.d.ts +120 -0
- package/dist/hooks/use-traveler-with-travel-details-mutation.d.ts.map +1 -0
- package/dist/hooks/use-traveler-with-travel-details-mutation.js +43 -0
- package/dist/hooks/use-travelers.d.ts +23 -0
- package/dist/hooks/use-travelers.d.ts.map +1 -0
- package/dist/hooks/use-travelers.js +12 -0
- package/dist/i18n/en-base.d.ts +295 -0
- package/dist/i18n/en-base.d.ts.map +1 -0
- package/dist/i18n/en-base.js +294 -0
- package/dist/i18n/en-create-list.d.ts +327 -0
- package/dist/i18n/en-create-list.d.ts.map +1 -0
- package/dist/i18n/en-create-list.js +326 -0
- package/dist/i18n/en-journey.d.ts +229 -0
- package/dist/i18n/en-journey.d.ts.map +1 -0
- package/dist/i18n/en-journey.js +228 -0
- package/dist/i18n/en-operations.d.ts +382 -0
- package/dist/i18n/en-operations.d.ts.map +1 -0
- package/dist/i18n/en-operations.js +381 -0
- package/dist/i18n/en-sections.d.ts +360 -0
- package/dist/i18n/en-sections.d.ts.map +1 -0
- package/dist/i18n/en-sections.js +359 -0
- package/dist/i18n/en.d.ts +1581 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +12 -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-base.d.ts +251 -0
- package/dist/i18n/messages-base.d.ts.map +1 -0
- package/dist/i18n/messages-base.js +1 -0
- package/dist/i18n/messages-create-list.d.ts +310 -0
- package/dist/i18n/messages-create-list.d.ts.map +1 -0
- package/dist/i18n/messages-create-list.js +1 -0
- package/dist/i18n/messages-journey.d.ts +198 -0
- package/dist/i18n/messages-journey.d.ts.map +1 -0
- package/dist/i18n/messages-journey.js +1 -0
- package/dist/i18n/messages-operations.d.ts +362 -0
- package/dist/i18n/messages-operations.d.ts.map +1 -0
- package/dist/i18n/messages-operations.js +1 -0
- package/dist/i18n/messages-sections.d.ts +312 -0
- package/dist/i18n/messages-sections.d.ts.map +1 -0
- package/dist/i18n/messages-sections.js +1 -0
- package/dist/i18n/messages.d.ts +7 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +3185 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +45 -0
- package/dist/i18n/ro-base.d.ts +295 -0
- package/dist/i18n/ro-base.d.ts.map +1 -0
- package/dist/i18n/ro-base.js +294 -0
- package/dist/i18n/ro-create-list.d.ts +327 -0
- package/dist/i18n/ro-create-list.d.ts.map +1 -0
- package/dist/i18n/ro-create-list.js +326 -0
- package/dist/i18n/ro-journey.d.ts +229 -0
- package/dist/i18n/ro-journey.d.ts.map +1 -0
- package/dist/i18n/ro-journey.js +228 -0
- package/dist/i18n/ro-operations.d.ts +382 -0
- package/dist/i18n/ro-operations.d.ts.map +1 -0
- package/dist/i18n/ro-operations.js +381 -0
- package/dist/i18n/ro-sections.d.ts +360 -0
- package/dist/i18n/ro-sections.d.ts.map +1 -0
- package/dist/i18n/ro-sections.js +359 -0
- package/dist/i18n/ro.d.ts +1581 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +12 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/journey/components/booking-journey-rules.d.ts +48 -0
- package/dist/journey/components/booking-journey-rules.d.ts.map +1 -0
- package/dist/journey/components/booking-journey-rules.js +235 -0
- package/dist/journey/components/booking-journey.d.ts +3 -0
- package/dist/journey/components/booking-journey.d.ts.map +1 -0
- package/dist/journey/components/booking-journey.js +368 -0
- package/dist/journey/components/configure-step-skeleton.d.ts +8 -0
- package/dist/journey/components/configure-step-skeleton.d.ts.map +1 -0
- package/dist/journey/components/configure-step-skeleton.js +11 -0
- package/dist/journey/components/contract-preview-dialog.d.ts +47 -0
- package/dist/journey/components/contract-preview-dialog.d.ts.map +1 -0
- package/dist/journey/components/contract-preview-dialog.js +124 -0
- package/dist/journey/components/journey-steps/accommodation-step.d.ts +3 -0
- package/dist/journey/components/journey-steps/accommodation-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/accommodation-step.js +71 -0
- package/dist/journey/components/journey-steps/addons-step.d.ts +3 -0
- package/dist/journey/components/journey-steps/addons-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/addons-step.js +40 -0
- package/dist/journey/components/journey-steps/billing-step.d.ts +8 -0
- package/dist/journey/components/journey-steps/billing-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/billing-step.js +78 -0
- package/dist/journey/components/journey-steps/configure-steps.d.ts +28 -0
- package/dist/journey/components/journey-steps/configure-steps.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/configure-steps.js +232 -0
- package/dist/journey/components/journey-steps/documents-step.d.ts +11 -0
- package/dist/journey/components/journey-steps/documents-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/documents-step.js +36 -0
- package/dist/journey/components/journey-steps/payment-step.d.ts +29 -0
- package/dist/journey/components/journey-steps/payment-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/payment-step.js +225 -0
- package/dist/journey/components/journey-steps/review-step.d.ts +27 -0
- package/dist/journey/components/journey-steps/review-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/review-step.js +18 -0
- package/dist/journey/components/journey-steps/shared.d.ts +75 -0
- package/dist/journey/components/journey-steps/shared.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/shared.js +108 -0
- package/dist/journey/components/journey-steps/travelers-step.d.ts +7 -0
- package/dist/journey/components/journey-steps/travelers-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/travelers-step.js +201 -0
- package/dist/journey/components/journey-steps.d.ts +21 -0
- package/dist/journey/components/journey-steps.d.ts.map +1 -0
- package/dist/journey/components/journey-steps.js +20 -0
- package/dist/journey/components/side-panel.d.ts +17 -0
- package/dist/journey/components/side-panel.d.ts.map +1 -0
- package/dist/journey/components/side-panel.js +245 -0
- package/dist/journey/components/stacked-journey.d.ts +30 -0
- package/dist/journey/components/stacked-journey.d.ts.map +1 -0
- package/dist/journey/components/stacked-journey.js +50 -0
- package/dist/journey/components/step-header.d.ts +7 -0
- package/dist/journey/components/step-header.d.ts.map +1 -0
- package/dist/journey/components/step-header.js +12 -0
- package/dist/journey/index.d.ts +18 -0
- package/dist/journey/index.d.ts.map +1 -0
- package/dist/journey/index.js +17 -0
- package/dist/journey/lib/draft-state.d.ts +35 -0
- package/dist/journey/lib/draft-state.d.ts.map +1 -0
- package/dist/journey/lib/draft-state.js +57 -0
- package/dist/journey/lib/pax-band-dependencies.d.ts +27 -0
- package/dist/journey/lib/pax-band-dependencies.d.ts.map +1 -0
- package/dist/journey/lib/pax-band-dependencies.js +50 -0
- package/dist/journey/lib/payment-schedule.d.ts +19 -0
- package/dist/journey/lib/payment-schedule.d.ts.map +1 -0
- package/dist/journey/lib/payment-schedule.js +90 -0
- package/dist/journey/types.d.ts +403 -0
- package/dist/journey/types.d.ts.map +1 -0
- package/dist/journey/types.js +19 -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 +74 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +26 -0
- package/dist/query-options.d.ts +2534 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +233 -0
- package/dist/requirements/client.d.ts +14 -0
- package/dist/requirements/client.d.ts.map +1 -0
- package/dist/requirements/client.js +59 -0
- package/dist/requirements/components/booking-requirements-contact-tab.d.ts +8 -0
- package/dist/requirements/components/booking-requirements-contact-tab.d.ts.map +1 -0
- package/dist/requirements/components/booking-requirements-contact-tab.js +8 -0
- package/dist/requirements/components/booking-requirements-questions-tab.d.ts +14 -0
- package/dist/requirements/components/booking-requirements-questions-tab.d.ts.map +1 -0
- package/dist/requirements/components/booking-requirements-questions-tab.js +17 -0
- package/dist/requirements/constants.d.ts +114 -0
- package/dist/requirements/constants.d.ts.map +1 -0
- package/dist/requirements/constants.js +45 -0
- package/dist/requirements/hooks/index.d.ts +6 -0
- package/dist/requirements/hooks/index.d.ts.map +1 -0
- package/dist/requirements/hooks/index.js +6 -0
- package/dist/requirements/hooks/use-booking-questions.d.ts +24 -0
- package/dist/requirements/hooks/use-booking-questions.d.ts.map +1 -0
- package/dist/requirements/hooks/use-booking-questions.js +9 -0
- package/dist/requirements/hooks/use-contact-requirements.d.ts +22 -0
- package/dist/requirements/hooks/use-contact-requirements.d.ts.map +1 -0
- package/dist/requirements/hooks/use-contact-requirements.js +9 -0
- package/dist/requirements/hooks/use-products.d.ts +16 -0
- package/dist/requirements/hooks/use-products.d.ts.map +1 -0
- package/dist/requirements/hooks/use-products.js +9 -0
- package/dist/requirements/hooks/use-question-options.d.ts +19 -0
- package/dist/requirements/hooks/use-question-options.d.ts.map +1 -0
- package/dist/requirements/hooks/use-question-options.js +9 -0
- package/dist/requirements/hooks/use-transport-requirements.d.ts +30 -0
- package/dist/requirements/hooks/use-transport-requirements.d.ts.map +1 -0
- package/dist/requirements/hooks/use-transport-requirements.js +9 -0
- package/dist/requirements/i18n/en.d.ts +94 -0
- package/dist/requirements/i18n/en.d.ts.map +1 -0
- package/dist/requirements/i18n/en.js +93 -0
- package/dist/requirements/i18n/index.d.ts +5 -0
- package/dist/requirements/i18n/index.d.ts.map +1 -0
- package/dist/requirements/i18n/index.js +3 -0
- package/dist/requirements/i18n/messages.d.ts +59 -0
- package/dist/requirements/i18n/messages.d.ts.map +1 -0
- package/dist/requirements/i18n/messages.js +1 -0
- package/dist/requirements/i18n/provider.d.ts +210 -0
- package/dist/requirements/i18n/provider.d.ts.map +1 -0
- package/dist/requirements/i18n/provider.js +44 -0
- package/dist/requirements/i18n/ro.d.ts +94 -0
- package/dist/requirements/i18n/ro.d.ts.map +1 -0
- package/dist/requirements/i18n/ro.js +93 -0
- package/dist/requirements/index.d.ts +9 -0
- package/dist/requirements/index.d.ts.map +1 -0
- package/dist/requirements/index.js +8 -0
- package/dist/requirements/provider.d.ts +2 -0
- package/dist/requirements/provider.d.ts.map +1 -0
- package/dist/requirements/provider.js +1 -0
- package/dist/requirements/query-keys.d.ts +33 -0
- package/dist/requirements/query-keys.d.ts.map +1 -0
- package/dist/requirements/query-keys.js +13 -0
- package/dist/requirements/query-options.d.ts +371 -0
- package/dist/requirements/query-options.d.ts.map +1 -0
- package/dist/requirements/query-options.js +80 -0
- package/dist/requirements/schemas.d.ts +320 -0
- package/dist/requirements/schemas.d.ts.map +1 -0
- package/dist/requirements/schemas.js +121 -0
- package/dist/requirements/ui.d.ts +4 -0
- package/dist/requirements/ui.d.ts.map +1 -0
- package/dist/requirements/ui.js +3 -0
- package/dist/requirements/utils.d.ts +2 -0
- package/dist/requirements/utils.d.ts.map +1 -0
- package/dist/requirements/utils.js +4 -0
- package/dist/schemas.d.ts +2070 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +507 -0
- package/dist/status-presentation.d.ts +34 -0
- package/dist/status-presentation.d.ts.map +1 -0
- package/dist/status-presentation.js +38 -0
- package/dist/ui.d.ts +43 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +42 -0
- package/package.json +256 -0
- package/src/requirements/styles.css +1 -0
- package/src/styles.css +13 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { BookingCreateInput } from "./use-booking-create-mutation.js";
|
|
3
|
+
/**
|
|
4
|
+
* Sub-booking payload for dual-create. Same shape as createBooking input
|
|
5
|
+
* minus `groupMembership` — the dual endpoint manages the group itself.
|
|
6
|
+
*/
|
|
7
|
+
export type DualCreateSubBookingInput = Omit<BookingCreateInput, "groupMembership">;
|
|
8
|
+
export interface DualCreateGroupInput {
|
|
9
|
+
kind?: "shared_room" | "other";
|
|
10
|
+
label?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* option_unit the shared group occupies. The dual flow lives-or-dies on
|
|
13
|
+
* matching this across both bookings — when set, both sub-bookings should
|
|
14
|
+
* target the same optionUnitId in their travelers/allocations.
|
|
15
|
+
*/
|
|
16
|
+
optionUnitId?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface DualCreateBookingInput {
|
|
19
|
+
primary: DualCreateSubBookingInput;
|
|
20
|
+
secondary: DualCreateSubBookingInput;
|
|
21
|
+
group?: DualCreateGroupInput;
|
|
22
|
+
}
|
|
23
|
+
declare const dualCreateResultSchema: z.ZodObject<{
|
|
24
|
+
primary: z.ZodObject<{
|
|
25
|
+
booking: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
bookingNumber: z.ZodString;
|
|
28
|
+
status: z.ZodEnum<{
|
|
29
|
+
draft: "draft";
|
|
30
|
+
expired: "expired";
|
|
31
|
+
cancelled: "cancelled";
|
|
32
|
+
completed: "completed";
|
|
33
|
+
confirmed: "confirmed";
|
|
34
|
+
on_hold: "on_hold";
|
|
35
|
+
awaiting_payment: "awaiting_payment";
|
|
36
|
+
in_progress: "in_progress";
|
|
37
|
+
}>;
|
|
38
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
39
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
40
|
+
sellCurrency: z.ZodString;
|
|
41
|
+
sellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
42
|
+
costAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
43
|
+
marginPercent: z.ZodNullable<z.ZodNumber>;
|
|
44
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
45
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
46
|
+
startsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
+
pax: z.ZodNullable<z.ZodNumber>;
|
|
49
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
title: z.ZodString;
|
|
52
|
+
itemType: z.ZodString;
|
|
53
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
54
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
+
startsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
}, z.core.$strip>>>;
|
|
58
|
+
internalNotes: z.ZodNullable<z.ZodString>;
|
|
59
|
+
communicationLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
|
+
contactFirstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
contactLastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
+
contactPartyType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
63
|
+
individual: "individual";
|
|
64
|
+
company: "company";
|
|
65
|
+
}>>>;
|
|
66
|
+
contactTaxId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
contactEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
contactPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
contactPreferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
contactCountry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
contactRegion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
|
+
contactCity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
contactAddressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
contactAddressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
contactPostalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
customerPaymentPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
77
|
+
deposit: z.ZodObject<{
|
|
78
|
+
kind: z.ZodEnum<{
|
|
79
|
+
none: "none";
|
|
80
|
+
percent: "percent";
|
|
81
|
+
fixed_cents: "fixed_cents";
|
|
82
|
+
}>;
|
|
83
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
87
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
88
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
89
|
+
}, z.core.$strip>>>;
|
|
90
|
+
priceOverride: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
91
|
+
isManual: z.ZodLiteral<true>;
|
|
92
|
+
originalAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
93
|
+
overriddenAmountCents: z.ZodNumber;
|
|
94
|
+
currency: z.ZodString;
|
|
95
|
+
reason: z.ZodString;
|
|
96
|
+
overriddenBy: z.ZodString;
|
|
97
|
+
overriddenAt: z.ZodString;
|
|
98
|
+
}, z.core.$strip>>>;
|
|
99
|
+
createdAt: z.ZodString;
|
|
100
|
+
updatedAt: z.ZodString;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
travelers: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
103
|
+
paymentSchedules: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
104
|
+
voucherRedemption: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
secondary: z.ZodObject<{
|
|
107
|
+
booking: z.ZodObject<{
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
bookingNumber: z.ZodString;
|
|
110
|
+
status: z.ZodEnum<{
|
|
111
|
+
draft: "draft";
|
|
112
|
+
expired: "expired";
|
|
113
|
+
cancelled: "cancelled";
|
|
114
|
+
completed: "completed";
|
|
115
|
+
confirmed: "confirmed";
|
|
116
|
+
on_hold: "on_hold";
|
|
117
|
+
awaiting_payment: "awaiting_payment";
|
|
118
|
+
in_progress: "in_progress";
|
|
119
|
+
}>;
|
|
120
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
121
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
122
|
+
sellCurrency: z.ZodString;
|
|
123
|
+
sellAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
124
|
+
costAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
125
|
+
marginPercent: z.ZodNullable<z.ZodNumber>;
|
|
126
|
+
startDate: z.ZodNullable<z.ZodString>;
|
|
127
|
+
endDate: z.ZodNullable<z.ZodString>;
|
|
128
|
+
startsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
129
|
+
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
|
+
pax: z.ZodNullable<z.ZodNumber>;
|
|
131
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
title: z.ZodString;
|
|
134
|
+
itemType: z.ZodString;
|
|
135
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
136
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
137
|
+
startsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
|
+
}, z.core.$strip>>>;
|
|
140
|
+
internalNotes: z.ZodNullable<z.ZodString>;
|
|
141
|
+
communicationLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
|
+
contactFirstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
143
|
+
contactLastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
+
contactPartyType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
145
|
+
individual: "individual";
|
|
146
|
+
company: "company";
|
|
147
|
+
}>>>;
|
|
148
|
+
contactTaxId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
+
contactEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
|
+
contactPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
151
|
+
contactPreferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
152
|
+
contactCountry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
153
|
+
contactRegion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
154
|
+
contactCity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
|
+
contactAddressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
contactAddressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
157
|
+
contactPostalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
customerPaymentPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
159
|
+
deposit: z.ZodObject<{
|
|
160
|
+
kind: z.ZodEnum<{
|
|
161
|
+
none: "none";
|
|
162
|
+
percent: "percent";
|
|
163
|
+
fixed_cents: "fixed_cents";
|
|
164
|
+
}>;
|
|
165
|
+
percent: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
minDaysBeforeDepartureForDeposit: z.ZodNumber;
|
|
169
|
+
balanceDueDaysBeforeDeparture: z.ZodNumber;
|
|
170
|
+
balanceDueMinDaysFromNow: z.ZodNumber;
|
|
171
|
+
}, z.core.$strip>>>;
|
|
172
|
+
priceOverride: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
173
|
+
isManual: z.ZodLiteral<true>;
|
|
174
|
+
originalAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
175
|
+
overriddenAmountCents: z.ZodNumber;
|
|
176
|
+
currency: z.ZodString;
|
|
177
|
+
reason: z.ZodString;
|
|
178
|
+
overriddenBy: z.ZodString;
|
|
179
|
+
overriddenAt: z.ZodString;
|
|
180
|
+
}, z.core.$strip>>>;
|
|
181
|
+
createdAt: z.ZodString;
|
|
182
|
+
updatedAt: z.ZodString;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
travelers: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
185
|
+
paymentSchedules: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
186
|
+
voucherRedemption: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
group: z.ZodUnknown;
|
|
189
|
+
primaryMember: z.ZodUnknown;
|
|
190
|
+
secondaryMember: z.ZodUnknown;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
export type DualCreateBookingResult = z.infer<typeof dualCreateResultSchema>;
|
|
193
|
+
/**
|
|
194
|
+
* Atomic dual-booking (partaj) create: calls `POST /v1/bookings/dual-create`
|
|
195
|
+
* which wraps two createBooking calls + one booking_group in a single
|
|
196
|
+
* transaction. Use this over calling useBookingCreateMutation twice
|
|
197
|
+
* from a submit handler — a failure on the second call there would leave
|
|
198
|
+
* the first booking orphaned.
|
|
199
|
+
*/
|
|
200
|
+
export declare function useBookingDualCreateMutation(): import("@tanstack/react-query").UseMutationResult<{
|
|
201
|
+
primary: {
|
|
202
|
+
booking: {
|
|
203
|
+
id: string;
|
|
204
|
+
bookingNumber: string;
|
|
205
|
+
status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
|
|
206
|
+
personId: string | null;
|
|
207
|
+
organizationId: string | null;
|
|
208
|
+
sellCurrency: string;
|
|
209
|
+
sellAmountCents: number | null;
|
|
210
|
+
costAmountCents: number | null;
|
|
211
|
+
marginPercent: number | null;
|
|
212
|
+
startDate: string | null;
|
|
213
|
+
endDate: string | null;
|
|
214
|
+
pax: number | null;
|
|
215
|
+
internalNotes: string | null;
|
|
216
|
+
createdAt: string;
|
|
217
|
+
updatedAt: string;
|
|
218
|
+
startsAt?: string | null | undefined;
|
|
219
|
+
endsAt?: string | null | undefined;
|
|
220
|
+
items?: {
|
|
221
|
+
id: string;
|
|
222
|
+
title: string;
|
|
223
|
+
itemType: string;
|
|
224
|
+
productId: string | null;
|
|
225
|
+
productName?: string | null | undefined;
|
|
226
|
+
startsAt?: string | null | undefined;
|
|
227
|
+
endsAt?: string | null | undefined;
|
|
228
|
+
}[] | undefined;
|
|
229
|
+
communicationLanguage?: string | null | undefined;
|
|
230
|
+
contactFirstName?: string | null | undefined;
|
|
231
|
+
contactLastName?: string | null | undefined;
|
|
232
|
+
contactPartyType?: "individual" | "company" | null | undefined;
|
|
233
|
+
contactTaxId?: string | null | undefined;
|
|
234
|
+
contactEmail?: string | null | undefined;
|
|
235
|
+
contactPhone?: string | null | undefined;
|
|
236
|
+
contactPreferredLanguage?: string | null | undefined;
|
|
237
|
+
contactCountry?: string | null | undefined;
|
|
238
|
+
contactRegion?: string | null | undefined;
|
|
239
|
+
contactCity?: string | null | undefined;
|
|
240
|
+
contactAddressLine1?: string | null | undefined;
|
|
241
|
+
contactAddressLine2?: string | null | undefined;
|
|
242
|
+
contactPostalCode?: string | null | undefined;
|
|
243
|
+
customerPaymentPolicy?: {
|
|
244
|
+
deposit: {
|
|
245
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
246
|
+
percent?: number | undefined;
|
|
247
|
+
amountCents?: number | undefined;
|
|
248
|
+
};
|
|
249
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
250
|
+
balanceDueDaysBeforeDeparture: number;
|
|
251
|
+
balanceDueMinDaysFromNow: number;
|
|
252
|
+
} | null | undefined;
|
|
253
|
+
priceOverride?: {
|
|
254
|
+
isManual: true;
|
|
255
|
+
originalAmountCents: number | null;
|
|
256
|
+
overriddenAmountCents: number;
|
|
257
|
+
currency: string;
|
|
258
|
+
reason: string;
|
|
259
|
+
overriddenBy: string;
|
|
260
|
+
overriddenAt: string;
|
|
261
|
+
} | null | undefined;
|
|
262
|
+
};
|
|
263
|
+
travelers?: unknown[] | undefined;
|
|
264
|
+
paymentSchedules?: unknown[] | undefined;
|
|
265
|
+
voucherRedemption?: unknown;
|
|
266
|
+
};
|
|
267
|
+
secondary: {
|
|
268
|
+
booking: {
|
|
269
|
+
id: string;
|
|
270
|
+
bookingNumber: string;
|
|
271
|
+
status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
|
|
272
|
+
personId: string | null;
|
|
273
|
+
organizationId: string | null;
|
|
274
|
+
sellCurrency: string;
|
|
275
|
+
sellAmountCents: number | null;
|
|
276
|
+
costAmountCents: number | null;
|
|
277
|
+
marginPercent: number | null;
|
|
278
|
+
startDate: string | null;
|
|
279
|
+
endDate: string | null;
|
|
280
|
+
pax: number | null;
|
|
281
|
+
internalNotes: string | null;
|
|
282
|
+
createdAt: string;
|
|
283
|
+
updatedAt: string;
|
|
284
|
+
startsAt?: string | null | undefined;
|
|
285
|
+
endsAt?: string | null | undefined;
|
|
286
|
+
items?: {
|
|
287
|
+
id: string;
|
|
288
|
+
title: string;
|
|
289
|
+
itemType: string;
|
|
290
|
+
productId: string | null;
|
|
291
|
+
productName?: string | null | undefined;
|
|
292
|
+
startsAt?: string | null | undefined;
|
|
293
|
+
endsAt?: string | null | undefined;
|
|
294
|
+
}[] | undefined;
|
|
295
|
+
communicationLanguage?: string | null | undefined;
|
|
296
|
+
contactFirstName?: string | null | undefined;
|
|
297
|
+
contactLastName?: string | null | undefined;
|
|
298
|
+
contactPartyType?: "individual" | "company" | null | undefined;
|
|
299
|
+
contactTaxId?: string | null | undefined;
|
|
300
|
+
contactEmail?: string | null | undefined;
|
|
301
|
+
contactPhone?: string | null | undefined;
|
|
302
|
+
contactPreferredLanguage?: string | null | undefined;
|
|
303
|
+
contactCountry?: string | null | undefined;
|
|
304
|
+
contactRegion?: string | null | undefined;
|
|
305
|
+
contactCity?: string | null | undefined;
|
|
306
|
+
contactAddressLine1?: string | null | undefined;
|
|
307
|
+
contactAddressLine2?: string | null | undefined;
|
|
308
|
+
contactPostalCode?: string | null | undefined;
|
|
309
|
+
customerPaymentPolicy?: {
|
|
310
|
+
deposit: {
|
|
311
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
312
|
+
percent?: number | undefined;
|
|
313
|
+
amountCents?: number | undefined;
|
|
314
|
+
};
|
|
315
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
316
|
+
balanceDueDaysBeforeDeparture: number;
|
|
317
|
+
balanceDueMinDaysFromNow: number;
|
|
318
|
+
} | null | undefined;
|
|
319
|
+
priceOverride?: {
|
|
320
|
+
isManual: true;
|
|
321
|
+
originalAmountCents: number | null;
|
|
322
|
+
overriddenAmountCents: number;
|
|
323
|
+
currency: string;
|
|
324
|
+
reason: string;
|
|
325
|
+
overriddenBy: string;
|
|
326
|
+
overriddenAt: string;
|
|
327
|
+
} | null | undefined;
|
|
328
|
+
};
|
|
329
|
+
travelers?: unknown[] | undefined;
|
|
330
|
+
paymentSchedules?: unknown[] | undefined;
|
|
331
|
+
voucherRedemption?: unknown;
|
|
332
|
+
};
|
|
333
|
+
group: unknown;
|
|
334
|
+
primaryMember: unknown;
|
|
335
|
+
secondaryMember: unknown;
|
|
336
|
+
}, Error, DualCreateBookingInput, unknown>;
|
|
337
|
+
export {};
|
|
338
|
+
//# sourceMappingURL=use-booking-dual-create-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-booking-dual-create-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-dual-create-mutation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAE1E;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAA;AAEnF,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,yBAAyB,CAAA;IAClC,SAAS,EAAE,yBAAyB,CAAA;IACpC,KAAK,CAAC,EAAE,oBAAoB,CAAA;CAC7B;AAED,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgB1B,CAAA;AAIF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE5E;;;;;;GAMG;AACH,wBAAgB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAkB3C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { fetchWithValidation } from "../client.js";
|
|
5
|
+
import { useVoyantBookingsContext } from "../provider.js";
|
|
6
|
+
import { bookingsQueryKeys } from "../query-keys.js";
|
|
7
|
+
import { bookingRecordSchema } from "../schemas.js";
|
|
8
|
+
const dualCreateResultSchema = z.object({
|
|
9
|
+
primary: z.object({
|
|
10
|
+
booking: bookingRecordSchema,
|
|
11
|
+
travelers: z.array(z.unknown()).optional(),
|
|
12
|
+
paymentSchedules: z.array(z.unknown()).optional(),
|
|
13
|
+
voucherRedemption: z.unknown().nullable().optional(),
|
|
14
|
+
}),
|
|
15
|
+
secondary: z.object({
|
|
16
|
+
booking: bookingRecordSchema,
|
|
17
|
+
travelers: z.array(z.unknown()).optional(),
|
|
18
|
+
paymentSchedules: z.array(z.unknown()).optional(),
|
|
19
|
+
voucherRedemption: z.unknown().nullable().optional(),
|
|
20
|
+
}),
|
|
21
|
+
group: z.unknown(),
|
|
22
|
+
primaryMember: z.unknown(),
|
|
23
|
+
secondaryMember: z.unknown(),
|
|
24
|
+
});
|
|
25
|
+
const dualCreateResponseSchema = z.object({ data: dualCreateResultSchema });
|
|
26
|
+
/**
|
|
27
|
+
* Atomic dual-booking (partaj) create: calls `POST /v1/bookings/dual-create`
|
|
28
|
+
* which wraps two createBooking calls + one booking_group in a single
|
|
29
|
+
* transaction. Use this over calling useBookingCreateMutation twice
|
|
30
|
+
* from a submit handler — a failure on the second call there would leave
|
|
31
|
+
* the first booking orphaned.
|
|
32
|
+
*/
|
|
33
|
+
export function useBookingDualCreateMutation() {
|
|
34
|
+
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
35
|
+
const queryClient = useQueryClient();
|
|
36
|
+
return useMutation({
|
|
37
|
+
mutationFn: async (input) => {
|
|
38
|
+
const { data } = await fetchWithValidation("/v1/bookings/dual-create", dualCreateResponseSchema, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
39
|
+
return data;
|
|
40
|
+
},
|
|
41
|
+
onSuccess: () => {
|
|
42
|
+
void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.bookings() });
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface UseBookingGroupForBookingOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useBookingGroupForBooking(bookingId: string | null | undefined, options?: UseBookingGroupForBookingOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
kind: "other" | "shared_room";
|
|
8
|
+
label: string;
|
|
9
|
+
primaryBookingId: string | null;
|
|
10
|
+
productId: string | null;
|
|
11
|
+
optionUnitId: string | null;
|
|
12
|
+
metadata: Record<string, unknown> | null;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
membership: {
|
|
16
|
+
id: string;
|
|
17
|
+
groupId: string;
|
|
18
|
+
bookingId: string;
|
|
19
|
+
role: "shared" | "primary";
|
|
20
|
+
createdAt: string;
|
|
21
|
+
};
|
|
22
|
+
} | null;
|
|
23
|
+
}, Error>;
|
|
24
|
+
//# sourceMappingURL=use-booking-group-for-booking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-booking-group-for-booking.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-group-for-booking.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,gCAAgC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,gCAAqC;;;;;;;;;;;;;;;;;;;UAS/C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantBookingsContext } from "../provider.js";
|
|
4
|
+
import { getBookingGroupForBookingQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useBookingGroupForBooking(bookingId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getBookingGroupForBookingQueryOptions({ baseUrl, fetcher }, bookingId),
|
|
10
|
+
enabled: enabled && Boolean(bookingId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface AddBookingGroupMemberInput {
|
|
2
|
+
groupId: string;
|
|
3
|
+
bookingId: string;
|
|
4
|
+
role?: "primary" | "shared";
|
|
5
|
+
}
|
|
6
|
+
export interface RemoveBookingGroupMemberInput {
|
|
7
|
+
groupId: string;
|
|
8
|
+
bookingId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Add or remove a booking from a group. Accepts the group id per-call so the
|
|
12
|
+
* same hook instance can be reused across flows (e.g. create-then-add, where
|
|
13
|
+
* the target group id isn't known at hook construction time).
|
|
14
|
+
*/
|
|
15
|
+
export declare function useBookingGroupMemberMutation(): {
|
|
16
|
+
add: import("@tanstack/react-query").UseMutationResult<{
|
|
17
|
+
id: string;
|
|
18
|
+
groupId: string;
|
|
19
|
+
bookingId: string;
|
|
20
|
+
role: "shared" | "primary";
|
|
21
|
+
createdAt: string;
|
|
22
|
+
}, Error, AddBookingGroupMemberInput, unknown>;
|
|
23
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
24
|
+
success: boolean;
|
|
25
|
+
}, Error, RemoveBookingGroupMemberInput, unknown>;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=use-booking-group-member-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-booking-group-member-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-group-member-mutation.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAC5B;AAED,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B;;;;;;;;;;;EAyC5C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantBookingsContext } from "../provider.js";
|
|
5
|
+
import { bookingsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { bookingGroupMemberSingleResponse, successEnvelope } from "../schemas.js";
|
|
7
|
+
/**
|
|
8
|
+
* Add or remove a booking from a group. Accepts the group id per-call so the
|
|
9
|
+
* same hook instance can be reused across flows (e.g. create-then-add, where
|
|
10
|
+
* the target group id isn't known at hook construction time).
|
|
11
|
+
*/
|
|
12
|
+
export function useBookingGroupMemberMutation() {
|
|
13
|
+
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
14
|
+
const queryClient = useQueryClient();
|
|
15
|
+
const invalidate = (groupId, bookingId) => {
|
|
16
|
+
void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.group(groupId) });
|
|
17
|
+
void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.groupMembers(groupId) });
|
|
18
|
+
void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.groups() });
|
|
19
|
+
void queryClient.invalidateQueries({
|
|
20
|
+
queryKey: bookingsQueryKeys.groupForBooking(bookingId),
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const add = useMutation({
|
|
24
|
+
mutationFn: async (input) => {
|
|
25
|
+
const { data } = await fetchWithValidation(`/v1/bookings/groups/${input.groupId}/members`, bookingGroupMemberSingleResponse, { baseUrl, fetcher }, {
|
|
26
|
+
method: "POST",
|
|
27
|
+
body: JSON.stringify({ bookingId: input.bookingId, role: input.role }),
|
|
28
|
+
});
|
|
29
|
+
return data;
|
|
30
|
+
},
|
|
31
|
+
onSuccess: (_, variables) => invalidate(variables.groupId, variables.bookingId),
|
|
32
|
+
});
|
|
33
|
+
const remove = useMutation({
|
|
34
|
+
mutationFn: async (input) => fetchWithValidation(`/v1/bookings/groups/${input.groupId}/members/${input.bookingId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
35
|
+
onSuccess: (_, variables) => invalidate(variables.groupId, variables.bookingId),
|
|
36
|
+
});
|
|
37
|
+
return { add, remove };
|
|
38
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface CreateBookingGroupInput {
|
|
2
|
+
kind?: "shared_room" | "other";
|
|
3
|
+
label: string;
|
|
4
|
+
primaryBookingId?: string | null;
|
|
5
|
+
productId?: string | null;
|
|
6
|
+
optionUnitId?: string | null;
|
|
7
|
+
metadata?: Record<string, unknown> | null;
|
|
8
|
+
}
|
|
9
|
+
export type UpdateBookingGroupInput = Partial<CreateBookingGroupInput>;
|
|
10
|
+
export declare function useBookingGroupMutation(): {
|
|
11
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
12
|
+
id: string;
|
|
13
|
+
kind: "other" | "shared_room";
|
|
14
|
+
label: string;
|
|
15
|
+
primaryBookingId: string | null;
|
|
16
|
+
productId: string | null;
|
|
17
|
+
optionUnitId: string | null;
|
|
18
|
+
metadata: Record<string, unknown> | null;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
}, Error, CreateBookingGroupInput, unknown>;
|
|
22
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
23
|
+
id: string;
|
|
24
|
+
kind: "other" | "shared_room";
|
|
25
|
+
label: string;
|
|
26
|
+
primaryBookingId: string | null;
|
|
27
|
+
productId: string | null;
|
|
28
|
+
optionUnitId: string | null;
|
|
29
|
+
metadata: Record<string, unknown> | null;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
}, Error, {
|
|
33
|
+
id: string;
|
|
34
|
+
input: UpdateBookingGroupInput;
|
|
35
|
+
}, unknown>;
|
|
36
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
37
|
+
success: boolean;
|
|
38
|
+
}, Error, string, unknown>;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=use-booking-group-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-booking-group-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-group-mutation.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAA;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AAEtE,wBAAgB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;YAsBK,MAAM;eAAS,uBAAuB;;;;;EAwBjF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantBookingsContext } from "../provider.js";
|
|
5
|
+
import { bookingsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { bookingGroupSingleResponse, successEnvelope } from "../schemas.js";
|
|
7
|
+
export function useBookingGroupMutation() {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const invalidate = () => {
|
|
11
|
+
void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.groups() });
|
|
12
|
+
};
|
|
13
|
+
const create = useMutation({
|
|
14
|
+
mutationFn: async (input) => {
|
|
15
|
+
const { data } = await fetchWithValidation("/v1/bookings/groups", bookingGroupSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
16
|
+
return data;
|
|
17
|
+
},
|
|
18
|
+
onSuccess: invalidate,
|
|
19
|
+
});
|
|
20
|
+
const update = useMutation({
|
|
21
|
+
mutationFn: async ({ id, input }) => {
|
|
22
|
+
const { data } = await fetchWithValidation(`/v1/bookings/groups/${id}`, bookingGroupSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
23
|
+
return data;
|
|
24
|
+
},
|
|
25
|
+
onSuccess: invalidate,
|
|
26
|
+
});
|
|
27
|
+
const remove = useMutation({
|
|
28
|
+
mutationFn: async (id) => fetchWithValidation(`/v1/bookings/groups/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
29
|
+
onSuccess: invalidate,
|
|
30
|
+
});
|
|
31
|
+
return { create, update, remove };
|
|
32
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export interface UseBookingGroupOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useBookingGroup(id: string | null | undefined, options?: UseBookingGroupOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
kind: "other" | "shared_room";
|
|
8
|
+
label: string;
|
|
9
|
+
primaryBookingId: string | null;
|
|
10
|
+
productId: string | null;
|
|
11
|
+
optionUnitId: string | null;
|
|
12
|
+
metadata: Record<string, unknown> | null;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
members: {
|
|
16
|
+
id: string;
|
|
17
|
+
groupId: string;
|
|
18
|
+
bookingId: string;
|
|
19
|
+
role: "shared" | "primary";
|
|
20
|
+
createdAt: string;
|
|
21
|
+
booking: {
|
|
22
|
+
id: string;
|
|
23
|
+
bookingNumber: string;
|
|
24
|
+
status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
|
|
25
|
+
personId: string | null;
|
|
26
|
+
organizationId: string | null;
|
|
27
|
+
sellCurrency: string;
|
|
28
|
+
sellAmountCents: number | null;
|
|
29
|
+
costAmountCents: number | null;
|
|
30
|
+
marginPercent: number | null;
|
|
31
|
+
startDate: string | null;
|
|
32
|
+
endDate: string | null;
|
|
33
|
+
pax: number | null;
|
|
34
|
+
internalNotes: string | null;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
startsAt?: string | null | undefined;
|
|
38
|
+
endsAt?: string | null | undefined;
|
|
39
|
+
items?: {
|
|
40
|
+
id: string;
|
|
41
|
+
title: string;
|
|
42
|
+
itemType: string;
|
|
43
|
+
productId: string | null;
|
|
44
|
+
productName?: string | null | undefined;
|
|
45
|
+
startsAt?: string | null | undefined;
|
|
46
|
+
endsAt?: string | null | undefined;
|
|
47
|
+
}[] | undefined;
|
|
48
|
+
communicationLanguage?: string | null | undefined;
|
|
49
|
+
contactFirstName?: string | null | undefined;
|
|
50
|
+
contactLastName?: string | null | undefined;
|
|
51
|
+
contactPartyType?: "individual" | "company" | null | undefined;
|
|
52
|
+
contactTaxId?: string | null | undefined;
|
|
53
|
+
contactEmail?: string | null | undefined;
|
|
54
|
+
contactPhone?: string | null | undefined;
|
|
55
|
+
contactPreferredLanguage?: string | null | undefined;
|
|
56
|
+
contactCountry?: string | null | undefined;
|
|
57
|
+
contactRegion?: string | null | undefined;
|
|
58
|
+
contactCity?: string | null | undefined;
|
|
59
|
+
contactAddressLine1?: string | null | undefined;
|
|
60
|
+
contactAddressLine2?: string | null | undefined;
|
|
61
|
+
contactPostalCode?: string | null | undefined;
|
|
62
|
+
customerPaymentPolicy?: {
|
|
63
|
+
deposit: {
|
|
64
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
65
|
+
percent?: number | undefined;
|
|
66
|
+
amountCents?: number | undefined;
|
|
67
|
+
};
|
|
68
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
69
|
+
balanceDueDaysBeforeDeparture: number;
|
|
70
|
+
balanceDueMinDaysFromNow: number;
|
|
71
|
+
} | null | undefined;
|
|
72
|
+
priceOverride?: {
|
|
73
|
+
isManual: true;
|
|
74
|
+
originalAmountCents: number | null;
|
|
75
|
+
overriddenAmountCents: number;
|
|
76
|
+
currency: string;
|
|
77
|
+
reason: string;
|
|
78
|
+
overriddenBy: string;
|
|
79
|
+
overriddenAt: string;
|
|
80
|
+
} | null | undefined;
|
|
81
|
+
} | null;
|
|
82
|
+
}[];
|
|
83
|
+
};
|
|
84
|
+
}, Error>;
|
|
85
|
+
//# sourceMappingURL=use-booking-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-booking-group.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-group.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,eAAe,CAC7B,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UASrC"}
|