@voyant-travel/inventory-react 0.1.0
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/dist/admin/index.d.ts +91 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +132 -0
- package/dist/admin/pages/product-detail-page.d.ts +18 -0
- package/dist/admin/pages/product-detail-page.d.ts.map +1 -0
- package/dist/admin/pages/product-detail-page.js +63 -0
- package/dist/admin/product-categories-host.d.ts +7 -0
- package/dist/admin/product-categories-host.d.ts.map +1 -0
- package/dist/admin/product-categories-host.js +11 -0
- package/dist/admin/product-detail-api.d.ts +22 -0
- package/dist/admin/product-detail-api.d.ts.map +1 -0
- package/dist/admin/product-detail-api.js +58 -0
- package/dist/admin/products-host.d.ts +11 -0
- package/dist/admin/products-host.d.ts.map +1 -0
- package/dist/admin/products-host.js +17 -0
- package/dist/admin/products-list-skeleton.d.ts +10 -0
- package/dist/admin/products-list-skeleton.d.ts.map +1 -0
- package/dist/admin/products-list-skeleton.js +23 -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/option-unit-dialog.d.ts +11 -0
- package/dist/components/option-unit-dialog.d.ts.map +1 -0
- package/dist/components/option-unit-dialog.js +17 -0
- package/dist/components/option-unit-form.d.ts +17 -0
- package/dist/components/option-unit-form.d.ts.map +1 -0
- package/dist/components/option-unit-form.js +123 -0
- package/dist/components/product-action-ledger-card.d.ts +17 -0
- package/dist/components/product-action-ledger-card.d.ts.map +1 -0
- package/dist/components/product-action-ledger-card.js +73 -0
- package/dist/components/product-catalog-card.d.ts +14 -0
- package/dist/components/product-catalog-card.d.ts.map +1 -0
- package/dist/components/product-catalog-card.js +44 -0
- package/dist/components/product-categories-page.d.ts +7 -0
- package/dist/components/product-categories-page.d.ts.map +1 -0
- package/dist/components/product-categories-page.js +9 -0
- package/dist/components/product-category-combobox.d.ts +10 -0
- package/dist/components/product-category-combobox.d.ts.map +1 -0
- package/dist/components/product-category-combobox.js +47 -0
- package/dist/components/product-category-dialog.d.ts +9 -0
- package/dist/components/product-category-dialog.d.ts.map +1 -0
- package/dist/components/product-category-dialog.js +17 -0
- package/dist/components/product-category-form.d.ts +15 -0
- package/dist/components/product-category-form.d.ts.map +1 -0
- package/dist/components/product-category-form.js +82 -0
- package/dist/components/product-category-list.d.ts +5 -0
- package/dist/components/product-category-list.d.ts.map +1 -0
- package/dist/components/product-category-list.js +48 -0
- package/dist/components/product-combobox.d.ts +13 -0
- package/dist/components/product-combobox.d.ts.map +1 -0
- package/dist/components/product-combobox.js +23 -0
- package/dist/components/product-contract-template-combobox.d.ts +9 -0
- package/dist/components/product-contract-template-combobox.d.ts.map +1 -0
- package/dist/components/product-contract-template-combobox.js +97 -0
- package/dist/components/product-day-dialog.d.ts +20 -0
- package/dist/components/product-day-dialog.d.ts.map +1 -0
- package/dist/components/product-day-dialog.js +20 -0
- package/dist/components/product-day-form.d.ts +19 -0
- package/dist/components/product-day-form.d.ts.map +1 -0
- package/dist/components/product-day-form.js +77 -0
- package/dist/components/product-day-media-tray.d.ts +11 -0
- package/dist/components/product-day-media-tray.d.ts.map +1 -0
- package/dist/components/product-day-media-tray.js +74 -0
- package/dist/components/product-day-service-dialog.d.ts +14 -0
- package/dist/components/product-day-service-dialog.d.ts.map +1 -0
- package/dist/components/product-day-service-dialog.js +19 -0
- package/dist/components/product-day-service-form.d.ts +44 -0
- package/dist/components/product-day-service-form.d.ts.map +1 -0
- package/dist/components/product-day-service-form.js +152 -0
- package/dist/components/product-detail/commerce-client.d.ts +314 -0
- package/dist/components/product-detail/commerce-client.d.ts.map +1 -0
- package/dist/components/product-detail/commerce-client.js +261 -0
- package/dist/components/product-detail/host.d.ts +54 -0
- package/dist/components/product-detail/host.d.ts.map +1 -0
- package/dist/components/product-detail/host.js +27 -0
- package/dist/components/product-detail/index.d.ts +6 -0
- package/dist/components/product-detail/index.d.ts.map +1 -0
- package/dist/components/product-detail/index.js +5 -0
- package/dist/components/product-detail/product-activity-section.d.ts +4 -0
- package/dist/components/product-detail/product-activity-section.d.ts.map +1 -0
- package/dist/components/product-detail/product-activity-section.js +37 -0
- package/dist/components/product-detail/product-day-sheet.d.ts +14 -0
- package/dist/components/product-detail/product-day-sheet.d.ts.map +1 -0
- package/dist/components/product-detail/product-day-sheet.js +75 -0
- package/dist/components/product-detail/product-day-translation.d.ts +41 -0
- package/dist/components/product-detail/product-day-translation.d.ts.map +1 -0
- package/dist/components/product-detail/product-day-translation.js +111 -0
- package/dist/components/product-detail/product-departure-dialog.d.ts +11 -0
- package/dist/components/product-detail/product-departure-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-departure-dialog.js +10 -0
- package/dist/components/product-detail/product-departure-form.d.ts +25 -0
- package/dist/components/product-detail/product-departure-form.d.ts.map +1 -0
- package/dist/components/product-detail/product-departure-form.js +241 -0
- package/dist/components/product-detail/product-departure-pricing-override-dialog.d.ts +8 -0
- package/dist/components/product-detail/product-departure-pricing-override-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-departure-pricing-override-dialog.js +126 -0
- package/dist/components/product-detail/product-detail-availability-sections.d.ts +19 -0
- package/dist/components/product-detail/product-detail-availability-sections.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-availability-sections.js +29 -0
- package/dist/components/product-detail/product-detail-channel-section.d.ts +8 -0
- package/dist/components/product-detail/product-detail-channel-section.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-channel-section.js +16 -0
- package/dist/components/product-detail/product-detail-day-row.d.ts +14 -0
- package/dist/components/product-detail/product-detail-day-row.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-day-row.js +43 -0
- package/dist/components/product-detail/product-detail-dialog.d.ts +10 -0
- package/dist/components/product-detail/product-detail-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-dialog.js +10 -0
- package/dist/components/product-detail/product-detail-form.d.ts +22 -0
- package/dist/components/product-detail/product-detail-form.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-form.js +205 -0
- package/dist/components/product-detail/product-detail-header.d.ts +12 -0
- package/dist/components/product-detail/product-detail-header.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-header.js +19 -0
- package/dist/components/product-detail/product-detail-itinerary-section.d.ts +4 -0
- package/dist/components/product-detail/product-detail-itinerary-section.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-itinerary-section.js +201 -0
- package/dist/components/product-detail/product-detail-media-sections.d.ts +15 -0
- package/dist/components/product-detail/product-detail-media-sections.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-media-sections.js +19 -0
- package/dist/components/product-detail/product-detail-organize-section.d.ts +6 -0
- package/dist/components/product-detail/product-detail-organize-section.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-organize-section.js +18 -0
- package/dist/components/product-detail/product-detail-page.d.ts +4 -0
- package/dist/components/product-detail/product-detail-page.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-page.js +95 -0
- package/dist/components/product-detail/product-detail-section-shell.d.ts +19 -0
- package/dist/components/product-detail/product-detail-section-shell.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-section-shell.js +23 -0
- package/dist/components/product-detail/product-detail-sections.d.ts +7 -0
- package/dist/components/product-detail/product-detail-sections.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-sections.js +6 -0
- package/dist/components/product-detail/product-detail-shared.d.ts +264 -0
- package/dist/components/product-detail/product-detail-shared.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-shared.js +157 -0
- package/dist/components/product-detail/product-detail-skeleton.d.ts +9 -0
- package/dist/components/product-detail/product-detail-skeleton.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-skeleton.js +53 -0
- package/dist/components/product-detail/product-detail-summary-section.d.ts +6 -0
- package/dist/components/product-detail/product-detail-summary-section.d.ts.map +1 -0
- package/dist/components/product-detail/product-detail-summary-section.js +66 -0
- package/dist/components/product-detail/product-extra-dialog.d.ts +21 -0
- package/dist/components/product-detail/product-extra-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-extra-dialog.js +131 -0
- package/dist/components/product-detail/product-itinerary-form.d.ts +16 -0
- package/dist/components/product-detail/product-itinerary-form.d.ts.map +1 -0
- package/dist/components/product-detail/product-itinerary-form.js +38 -0
- package/dist/components/product-detail/product-market-rules-section.d.ts +6 -0
- package/dist/components/product-detail/product-market-rules-section.d.ts.map +1 -0
- package/dist/components/product-detail/product-market-rules-section.js +81 -0
- package/dist/components/product-detail/product-media-gallery.d.ts +19 -0
- package/dist/components/product-detail/product-media-gallery.d.ts.map +1 -0
- package/dist/components/product-detail/product-media-gallery.js +114 -0
- package/dist/components/product-detail/product-option-price-rule-dialog.d.ts +12 -0
- package/dist/components/product-detail/product-option-price-rule-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-option-price-rule-dialog.js +10 -0
- package/dist/components/product-detail/product-option-price-rule-form.d.ts +29 -0
- package/dist/components/product-detail/product-option-price-rule-form.d.ts.map +1 -0
- package/dist/components/product-detail/product-option-price-rule-form.js +122 -0
- package/dist/components/product-detail/product-option-pricing-grid.d.ts +16 -0
- package/dist/components/product-detail/product-option-pricing-grid.d.ts.map +1 -0
- package/dist/components/product-detail/product-option-pricing-grid.js +236 -0
- package/dist/components/product-detail/product-options-extra-price-rules.d.ts +8 -0
- package/dist/components/product-detail/product-options-extra-price-rules.d.ts.map +1 -0
- package/dist/components/product-detail/product-options-extra-price-rules.js +123 -0
- package/dist/components/product-detail/product-options-pricing-helpers.d.ts +14 -0
- package/dist/components/product-detail/product-options-pricing-helpers.d.ts.map +1 -0
- package/dist/components/product-detail/product-options-pricing-helpers.js +49 -0
- package/dist/components/product-detail/product-options-pricing-panel.d.ts +17 -0
- package/dist/components/product-detail/product-options-pricing-panel.d.ts.map +1 -0
- package/dist/components/product-detail/product-options-pricing-panel.js +88 -0
- package/dist/components/product-detail/product-options-pricing.d.ts +5 -0
- package/dist/components/product-detail/product-options-pricing.d.ts.map +1 -0
- package/dist/components/product-detail/product-options-pricing.js +4 -0
- package/dist/components/product-detail/product-options-shared.d.ts +236 -0
- package/dist/components/product-detail/product-options-shared.d.ts.map +1 -0
- package/dist/components/product-detail/product-options-shared.js +57 -0
- package/dist/components/product-detail/product-options-traveler-category-dialog.d.ts +12 -0
- package/dist/components/product-detail/product-options-traveler-category-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-options-traveler-category-dialog.js +132 -0
- package/dist/components/product-detail/product-options-unit-price-matrix.d.ts +10 -0
- package/dist/components/product-detail/product-options-unit-price-matrix.d.ts.map +1 -0
- package/dist/components/product-detail/product-options-unit-price-matrix.js +103 -0
- package/dist/components/product-detail/product-payment-policy-section.d.ts +17 -0
- package/dist/components/product-detail/product-payment-policy-section.d.ts.map +1 -0
- package/dist/components/product-detail/product-payment-policy-section.js +58 -0
- package/dist/components/product-detail/product-schedule-dialog.d.ts +11 -0
- package/dist/components/product-detail/product-schedule-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-schedule-dialog.js +10 -0
- package/dist/components/product-detail/product-schedule-form.d.ts +17 -0
- package/dist/components/product-detail/product-schedule-form.d.ts.map +1 -0
- package/dist/components/product-detail/product-schedule-form.js +223 -0
- package/dist/components/product-detail/product-service-dialog.d.ts +12 -0
- package/dist/components/product-detail/product-service-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-service-dialog.js +10 -0
- package/dist/components/product-detail/product-service-form.d.ts +22 -0
- package/dist/components/product-detail/product-service-form.d.ts.map +1 -0
- package/dist/components/product-detail/product-service-form.js +154 -0
- package/dist/components/product-detail/product-translation-popover.d.ts +94 -0
- package/dist/components/product-detail/product-translation-popover.d.ts.map +1 -0
- package/dist/components/product-detail/product-translation-popover.js +238 -0
- package/dist/components/product-detail/product-unit-dialog.d.ts +14 -0
- package/dist/components/product-detail/product-unit-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-unit-dialog.js +10 -0
- package/dist/components/product-detail/product-unit-form.d.ts +34 -0
- package/dist/components/product-detail/product-unit-form.d.ts.map +1 -0
- package/dist/components/product-detail/product-unit-form.js +139 -0
- package/dist/components/product-detail/product-unit-price-rule-dialog.d.ts +17 -0
- package/dist/components/product-detail/product-unit-price-rule-dialog.d.ts.map +1 -0
- package/dist/components/product-detail/product-unit-price-rule-dialog.js +10 -0
- package/dist/components/product-detail/product-unit-price-rule-form.d.ts +29 -0
- package/dist/components/product-detail/product-unit-price-rule-form.d.ts.map +1 -0
- package/dist/components/product-detail/product-unit-price-rule-form.js +144 -0
- package/dist/components/product-detail/rrule-labels.d.ts +2 -0
- package/dist/components/product-detail/rrule-labels.d.ts.map +1 -0
- package/dist/components/product-detail/rrule-labels.js +65 -0
- package/dist/components/product-detail/timezone-options.d.ts +9 -0
- package/dist/components/product-detail/timezone-options.d.ts.map +1 -0
- package/dist/components/product-detail/timezone-options.js +28 -0
- package/dist/components/product-detail/use-product-detail-data.d.ts +41 -0
- package/dist/components/product-detail/use-product-detail-data.d.ts.map +1 -0
- package/dist/components/product-detail/use-product-detail-data.js +143 -0
- package/dist/components/product-detail/use-product-detail-dialogs.d.ts +24 -0
- package/dist/components/product-detail/use-product-detail-dialogs.d.ts.map +1 -0
- package/dist/components/product-detail/use-product-detail-dialogs.js +40 -0
- package/dist/components/product-detail/zod-resolver.d.ts +4 -0
- package/dist/components/product-detail/zod-resolver.d.ts.map +1 -0
- package/dist/components/product-detail/zod-resolver.js +39 -0
- package/dist/components/product-detail-page.d.ts +57 -0
- package/dist/components/product-detail-page.d.ts.map +1 -0
- package/dist/components/product-detail-page.js +118 -0
- package/dist/components/product-detail.d.ts +2 -0
- package/dist/components/product-detail.d.ts.map +1 -0
- package/dist/components/product-detail.js +1 -0
- package/dist/components/product-dialog.d.ts +9 -0
- package/dist/components/product-dialog.d.ts.map +1 -0
- package/dist/components/product-dialog.js +13 -0
- package/dist/components/product-facility-combobox.d.ts +9 -0
- package/dist/components/product-facility-combobox.d.ts.map +1 -0
- package/dist/components/product-facility-combobox.js +94 -0
- package/dist/components/product-form.d.ts +14 -0
- package/dist/components/product-form.d.ts.map +1 -0
- package/dist/components/product-form.js +191 -0
- package/dist/components/product-itinerary-day-row.d.ts +22 -0
- package/dist/components/product-itinerary-day-row.d.ts.map +1 -0
- package/dist/components/product-itinerary-day-row.js +17 -0
- package/dist/components/product-itinerary-dialog.d.ts +16 -0
- package/dist/components/product-itinerary-dialog.d.ts.map +1 -0
- package/dist/components/product-itinerary-dialog.js +85 -0
- package/dist/components/product-itinerary-section.d.ts +16 -0
- package/dist/components/product-itinerary-section.d.ts.map +1 -0
- package/dist/components/product-itinerary-section.js +105 -0
- package/dist/components/product-list.d.ts +7 -0
- package/dist/components/product-list.d.ts.map +1 -0
- package/dist/components/product-list.js +155 -0
- package/dist/components/product-media-dialog.d.ts +11 -0
- package/dist/components/product-media-dialog.d.ts.map +1 -0
- package/dist/components/product-media-dialog.js +17 -0
- package/dist/components/product-media-form.d.ts +17 -0
- package/dist/components/product-media-form.d.ts.map +1 -0
- package/dist/components/product-media-form.js +101 -0
- package/dist/components/product-media-lightbox.d.ts +7 -0
- package/dist/components/product-media-lightbox.d.ts.map +1 -0
- package/dist/components/product-media-lightbox.js +31 -0
- package/dist/components/product-media-section.d.ts +27 -0
- package/dist/components/product-media-section.d.ts.map +1 -0
- package/dist/components/product-media-section.js +130 -0
- package/dist/components/product-media-tile.d.ts +17 -0
- package/dist/components/product-media-tile.d.ts.map +1 -0
- package/dist/components/product-media-tile.js +16 -0
- package/dist/components/product-option-dialog.d.ts +11 -0
- package/dist/components/product-option-dialog.d.ts.map +1 -0
- package/dist/components/product-option-dialog.js +17 -0
- package/dist/components/product-option-form.d.ts +17 -0
- package/dist/components/product-option-form.d.ts.map +1 -0
- package/dist/components/product-option-form.js +91 -0
- package/dist/components/product-options-section.d.ts +13 -0
- package/dist/components/product-options-section.d.ts.map +1 -0
- package/dist/components/product-options-section.js +200 -0
- package/dist/components/product-quick-view-sheet.d.ts +23 -0
- package/dist/components/product-quick-view-sheet.d.ts.map +1 -0
- package/dist/components/product-quick-view-sheet.js +65 -0
- package/dist/components/product-tag-dialog.d.ts +9 -0
- package/dist/components/product-tag-dialog.d.ts.map +1 -0
- package/dist/components/product-tag-dialog.js +17 -0
- package/dist/components/product-tag-form.d.ts +15 -0
- package/dist/components/product-tag-form.d.ts.map +1 -0
- package/dist/components/product-tag-form.js +48 -0
- package/dist/components/product-tag-list.d.ts +5 -0
- package/dist/components/product-tag-list.d.ts.map +1 -0
- package/dist/components/product-tag-list.js +44 -0
- package/dist/components/product-tags-page.d.ts +7 -0
- package/dist/components/product-tags-page.d.ts.map +1 -0
- package/dist/components/product-tags-page.js +9 -0
- package/dist/components/product-tax-class-combobox.d.ts +9 -0
- package/dist/components/product-tax-class-combobox.d.ts.map +1 -0
- package/dist/components/product-tax-class-combobox.js +100 -0
- package/dist/components/product-translations-card.d.ts +7 -0
- package/dist/components/product-translations-card.d.ts.map +1 -0
- package/dist/components/product-translations-card.js +188 -0
- package/dist/components/product-type-combobox.d.ts +9 -0
- package/dist/components/product-type-combobox.d.ts.map +1 -0
- package/dist/components/product-type-combobox.js +48 -0
- package/dist/components/product-types-page.d.ts +6 -0
- package/dist/components/product-types-page.d.ts.map +1 -0
- package/dist/components/product-types-page.js +103 -0
- package/dist/components/product-version-dialog.d.ts +8 -0
- package/dist/components/product-version-dialog.d.ts.map +1 -0
- package/dist/components/product-version-dialog.js +39 -0
- package/dist/components/product-versions-section.d.ts +7 -0
- package/dist/components/product-versions-section.d.ts.map +1 -0
- package/dist/components/product-versions-section.js +19 -0
- package/dist/components/products-page.d.ts +8 -0
- package/dist/components/products-page.d.ts.map +1 -0
- package/dist/components/products-page.js +8 -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/hooks/index.d.ts +4 -0
- package/dist/extras/hooks/index.d.ts.map +1 -0
- package/dist/extras/hooks/index.js +3 -0
- package/dist/extras/hooks/use-product-extra-mutation.d.ts +70 -0
- package/dist/extras/hooks/use-product-extra-mutation.d.ts.map +1 -0
- package/dist/extras/hooks/use-product-extra-mutation.js +38 -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/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 +3 -0
- package/dist/extras/ui.d.ts.map +1 -0
- package/dist/extras/ui.js +2 -0
- package/dist/extras-compat.d.ts +3 -0
- package/dist/extras-compat.d.ts.map +1 -0
- package/dist/extras-compat.js +1 -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-duplicate-product-option-mutation.d.ts +19 -0
- package/dist/hooks/use-duplicate-product-option-mutation.d.ts.map +1 -0
- package/dist/hooks/use-duplicate-product-option-mutation.js +65 -0
- package/dist/hooks/use-option-unit-mutation.d.ts +60 -0
- package/dist/hooks/use-option-unit-mutation.d.ts.map +1 -0
- package/dist/hooks/use-option-unit-mutation.js +41 -0
- package/dist/hooks/use-option-unit.d.ts +21 -0
- package/dist/hooks/use-option-unit.d.ts.map +1 -0
- package/dist/hooks/use-option-unit.js +12 -0
- package/dist/hooks/use-option-units.d.ts +27 -0
- package/dist/hooks/use-option-units.d.ts.map +1 -0
- package/dist/hooks/use-option-units.js +12 -0
- package/dist/hooks/use-product-action-ledger.d.ts +48 -0
- package/dist/hooks/use-product-action-ledger.d.ts.map +1 -0
- package/dist/hooks/use-product-action-ledger.js +12 -0
- package/dist/hooks/use-product-categories.d.ts +32 -0
- package/dist/hooks/use-product-categories.d.ts.map +1 -0
- package/dist/hooks/use-product-categories.js +29 -0
- package/dist/hooks/use-product-category-mutation.d.ts +65 -0
- package/dist/hooks/use-product-category-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-category-mutation.js +39 -0
- package/dist/hooks/use-product-category.d.ts +26 -0
- package/dist/hooks/use-product-category.d.ts.map +1 -0
- package/dist/hooks/use-product-category.js +18 -0
- package/dist/hooks/use-product-day-mutation.d.ts +43 -0
- package/dist/hooks/use-product-day-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-day-mutation.js +54 -0
- package/dist/hooks/use-product-day-service-mutation.d.ts +66 -0
- package/dist/hooks/use-product-day-service-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-day-service-mutation.js +41 -0
- package/dist/hooks/use-product-day-services.d.ts +21 -0
- package/dist/hooks/use-product-day-services.d.ts.map +1 -0
- package/dist/hooks/use-product-day-services.js +12 -0
- package/dist/hooks/use-product-day-translation-mutation.d.ts +49 -0
- package/dist/hooks/use-product-day-translation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-day-translation-mutation.js +38 -0
- package/dist/hooks/use-product-day-translations.d.ts +19 -0
- package/dist/hooks/use-product-day-translations.d.ts.map +1 -0
- package/dist/hooks/use-product-day-translations.js +20 -0
- package/dist/hooks/use-product-days.d.ts +16 -0
- package/dist/hooks/use-product-days.d.ts.map +1 -0
- package/dist/hooks/use-product-days.js +12 -0
- package/dist/hooks/use-product-itineraries.d.ts +15 -0
- package/dist/hooks/use-product-itineraries.d.ts.map +1 -0
- package/dist/hooks/use-product-itineraries.js +12 -0
- package/dist/hooks/use-product-itinerary-days.d.ts +16 -0
- package/dist/hooks/use-product-itinerary-days.d.ts.map +1 -0
- package/dist/hooks/use-product-itinerary-days.js +12 -0
- package/dist/hooks/use-product-itinerary-mutation.d.ts +54 -0
- package/dist/hooks/use-product-itinerary-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-itinerary-mutation.js +63 -0
- package/dist/hooks/use-product-media-mutation.d.ts +101 -0
- package/dist/hooks/use-product-media-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-media-mutation.js +69 -0
- package/dist/hooks/use-product-media.d.ts +26 -0
- package/dist/hooks/use-product-media.d.ts.map +1 -0
- package/dist/hooks/use-product-media.js +12 -0
- package/dist/hooks/use-product-mutation.d.ts +121 -0
- package/dist/hooks/use-product-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-mutation.js +44 -0
- package/dist/hooks/use-product-option-mutation.d.ts +49 -0
- package/dist/hooks/use-product-option-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-option-mutation.js +39 -0
- package/dist/hooks/use-product-option.d.ts +18 -0
- package/dist/hooks/use-product-option.d.ts.map +1 -0
- package/dist/hooks/use-product-option.js +12 -0
- package/dist/hooks/use-product-options.d.ts +24 -0
- package/dist/hooks/use-product-options.d.ts.map +1 -0
- package/dist/hooks/use-product-options.js +12 -0
- package/dist/hooks/use-product-tag-mutation.d.ts +25 -0
- package/dist/hooks/use-product-tag-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-tag-mutation.js +39 -0
- package/dist/hooks/use-product-tag.d.ts +10 -0
- package/dist/hooks/use-product-tag.d.ts.map +1 -0
- package/dist/hooks/use-product-tag.js +18 -0
- package/dist/hooks/use-product-tags.d.ts +16 -0
- package/dist/hooks/use-product-tags.d.ts.map +1 -0
- package/dist/hooks/use-product-tags.js +25 -0
- package/dist/hooks/use-product-translation-mutation.d.ts +52 -0
- package/dist/hooks/use-product-translation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-translation-mutation.js +47 -0
- package/dist/hooks/use-product-translations.d.ts +28 -0
- package/dist/hooks/use-product-translations.d.ts.map +1 -0
- package/dist/hooks/use-product-translations.js +24 -0
- package/dist/hooks/use-product-type-mutation.d.ts +50 -0
- package/dist/hooks/use-product-type-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-type-mutation.js +47 -0
- package/dist/hooks/use-product-type.d.ts +15 -0
- package/dist/hooks/use-product-type.d.ts.map +1 -0
- package/dist/hooks/use-product-type.js +12 -0
- package/dist/hooks/use-product-types.d.ts +21 -0
- package/dist/hooks/use-product-types.d.ts.map +1 -0
- package/dist/hooks/use-product-types.js +9 -0
- package/dist/hooks/use-product-version-mutation.d.ts +16 -0
- package/dist/hooks/use-product-version-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-version-mutation.js +22 -0
- package/dist/hooks/use-product-versions.d.ts +15 -0
- package/dist/hooks/use-product-versions.d.ts.map +1 -0
- package/dist/hooks/use-product-versions.js +12 -0
- package/dist/hooks/use-product.d.ts +45 -0
- package/dist/hooks/use-product.d.ts.map +1 -0
- package/dist/hooks/use-product.js +23 -0
- package/dist/hooks/use-products.d.ts +51 -0
- package/dist/hooks/use-products.d.ts.map +1 -0
- package/dist/hooks/use-products.js +38 -0
- package/dist/i18n/en-catalog.d.ts +199 -0
- package/dist/i18n/en-catalog.d.ts.map +1 -0
- package/dist/i18n/en-catalog.js +198 -0
- package/dist/i18n/en-core.d.ts +323 -0
- package/dist/i18n/en-core.d.ts.map +1 -0
- package/dist/i18n/en-core.js +322 -0
- package/dist/i18n/en-operations.d.ts +287 -0
- package/dist/i18n/en-operations.d.ts.map +1 -0
- package/dist/i18n/en-operations.js +286 -0
- package/dist/i18n/en.d.ts +803 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +8 -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/message-shared.d.ts +6 -0
- package/dist/i18n/message-shared.d.ts.map +1 -0
- package/dist/i18n/message-shared.js +1 -0
- package/dist/i18n/messages-catalog.d.ts +199 -0
- package/dist/i18n/messages-catalog.d.ts.map +1 -0
- package/dist/i18n/messages-catalog.js +1 -0
- package/dist/i18n/messages-core.d.ts +304 -0
- package/dist/i18n/messages-core.d.ts.map +1 -0
- package/dist/i18n/messages-core.js +1 -0
- package/dist/i18n/messages-operations.d.ts +287 -0
- package/dist/i18n/messages-operations.d.ts.map +1 -0
- package/dist/i18n/messages-operations.js +1 -0
- package/dist/i18n/messages.d.ts +6 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +1628 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro-catalog.d.ts +199 -0
- package/dist/i18n/ro-catalog.d.ts.map +1 -0
- package/dist/i18n/ro-catalog.js +198 -0
- package/dist/i18n/ro-core.d.ts +323 -0
- package/dist/i18n/ro-core.d.ts.map +1 -0
- package/dist/i18n/ro-core.js +322 -0
- package/dist/i18n/ro-operations.d.ts +287 -0
- package/dist/i18n/ro-operations.d.ts.map +1 -0
- package/dist/i18n/ro-operations.js +286 -0
- package/dist/i18n/ro.d.ts +803 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +8 -0
- package/dist/i18n-en.d.ts +2 -0
- package/dist/i18n-en.d.ts.map +1 -0
- package/dist/i18n-en.js +1 -0
- package/dist/i18n-ro.d.ts +2 -0
- package/dist/i18n-ro.d.ts.map +1 -0
- package/dist/i18n-ro.js +1 -0
- package/dist/i18n.d.ts +2 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/operations.d.ts +53 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +13 -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 +114 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +34 -0
- package/dist/query-options-action-ledger.d.ts +194 -0
- package/dist/query-options-action-ledger.d.ts.map +1 -0
- package/dist/query-options-action-ledger.js +20 -0
- package/dist/query-options.d.ts +1313 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +281 -0
- package/dist/schemas.d.ts +1098 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +320 -0
- package/dist/ui.d.ts +44 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +42 -0
- package/package.json +159 -0
- package/src/styles.css +12 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type CreateProductTranslationInput, type UpdateProductTranslationInput } from "../schemas.js";
|
|
2
|
+
export declare function useProductTranslationMutation(): {
|
|
3
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
4
|
+
id: string;
|
|
5
|
+
productId: string;
|
|
6
|
+
languageTag: string;
|
|
7
|
+
slug: string | null;
|
|
8
|
+
name: string;
|
|
9
|
+
shortDescription: string | null;
|
|
10
|
+
description: string | null;
|
|
11
|
+
inclusionsHtml: string | null;
|
|
12
|
+
exclusionsHtml: string | null;
|
|
13
|
+
termsHtml: string | null;
|
|
14
|
+
seoTitle: string | null;
|
|
15
|
+
seoDescription: string | null;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}, Error, {
|
|
19
|
+
productId: string;
|
|
20
|
+
input: CreateProductTranslationInput;
|
|
21
|
+
}, unknown>;
|
|
22
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
23
|
+
productId: string;
|
|
24
|
+
translation: {
|
|
25
|
+
id: string;
|
|
26
|
+
productId: string;
|
|
27
|
+
languageTag: string;
|
|
28
|
+
slug: string | null;
|
|
29
|
+
name: string;
|
|
30
|
+
shortDescription: string | null;
|
|
31
|
+
description: string | null;
|
|
32
|
+
inclusionsHtml: string | null;
|
|
33
|
+
exclusionsHtml: string | null;
|
|
34
|
+
termsHtml: string | null;
|
|
35
|
+
seoTitle: string | null;
|
|
36
|
+
seoDescription: string | null;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
};
|
|
40
|
+
}, Error, {
|
|
41
|
+
productId: string;
|
|
42
|
+
translationId: string;
|
|
43
|
+
input: UpdateProductTranslationInput;
|
|
44
|
+
}, unknown>;
|
|
45
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
46
|
+
productId: string;
|
|
47
|
+
}, Error, {
|
|
48
|
+
productId: string;
|
|
49
|
+
translationId: string;
|
|
50
|
+
}, unknown>;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=use-product-translation-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-translation-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-translation-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,6BAA6B,EAGlC,KAAK,6BAA6B,EACnC,MAAM,eAAe,CAAA;AAEtB,wBAAgB,6BAA6B;;;;;;;;;;;;;;;;;mBAS5B,MAAM;eACV,6BAA6B;;;;;;;;;;;;;;;;;;;;;mBAwBzB,MAAM;uBACF,MAAM;eACd,6BAA6B;;;;;mBAuBzB,MAAM;uBACF,MAAM;;EAmB1B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { productTranslationSingleResponse, successEnvelope, } from "../schemas.js";
|
|
7
|
+
export function useProductTranslationMutation() {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const create = useMutation({
|
|
11
|
+
mutationFn: async ({ productId, input, }) => {
|
|
12
|
+
const { data } = await fetchWithValidation(`/v1/products/${productId}/translations`, productTranslationSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
13
|
+
return data;
|
|
14
|
+
},
|
|
15
|
+
onSuccess: async (data) => {
|
|
16
|
+
await queryClient.invalidateQueries({
|
|
17
|
+
queryKey: productsQueryKeys.productTranslationsRoot(data.productId),
|
|
18
|
+
});
|
|
19
|
+
await queryClient.invalidateQueries({ queryKey: productsQueryKeys.product(data.productId) });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const update = useMutation({
|
|
23
|
+
mutationFn: async ({ productId, translationId, input, }) => {
|
|
24
|
+
const { data } = await fetchWithValidation(`/v1/products/translations/${translationId}`, productTranslationSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
25
|
+
return { productId, translation: data };
|
|
26
|
+
},
|
|
27
|
+
onSuccess: async ({ productId }) => {
|
|
28
|
+
await queryClient.invalidateQueries({
|
|
29
|
+
queryKey: productsQueryKeys.productTranslationsRoot(productId),
|
|
30
|
+
});
|
|
31
|
+
await queryClient.invalidateQueries({ queryKey: productsQueryKeys.product(productId) });
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
const remove = useMutation({
|
|
35
|
+
mutationFn: async ({ productId, translationId, }) => {
|
|
36
|
+
await fetchWithValidation(`/v1/products/translations/${translationId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
|
|
37
|
+
return { productId };
|
|
38
|
+
},
|
|
39
|
+
onSuccess: async ({ productId }) => {
|
|
40
|
+
await queryClient.invalidateQueries({
|
|
41
|
+
queryKey: productsQueryKeys.productTranslationsRoot(productId),
|
|
42
|
+
});
|
|
43
|
+
await queryClient.invalidateQueries({ queryKey: productsQueryKeys.product(productId) });
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
return { create, update, remove };
|
|
47
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface UseProductTranslationsOptions {
|
|
2
|
+
languageTag?: string | undefined;
|
|
3
|
+
limit?: number | undefined;
|
|
4
|
+
offset?: number | undefined;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare function useProductTranslations(productId: string | null | undefined, options?: UseProductTranslationsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
8
|
+
data: {
|
|
9
|
+
id: string;
|
|
10
|
+
productId: string;
|
|
11
|
+
languageTag: string;
|
|
12
|
+
slug: string | null;
|
|
13
|
+
name: string;
|
|
14
|
+
shortDescription: string | null;
|
|
15
|
+
description: string | null;
|
|
16
|
+
inclusionsHtml: string | null;
|
|
17
|
+
exclusionsHtml: string | null;
|
|
18
|
+
termsHtml: string | null;
|
|
19
|
+
seoTitle: string | null;
|
|
20
|
+
seoDescription: string | null;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}[];
|
|
24
|
+
total: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
offset: number;
|
|
27
|
+
}, Error>;
|
|
28
|
+
//# sourceMappingURL=use-product-translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-translations.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-translations.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,6BAA6B;IAC5C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;;;UAuB5C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation, withQueryParams } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { productTranslationListResponse } from "../schemas.js";
|
|
7
|
+
export function useProductTranslations(productId, options = {}) {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const { enabled = true, ...filters } = options;
|
|
10
|
+
return useQuery({
|
|
11
|
+
queryKey: productsQueryKeys.productTranslations(productId ?? "", filters),
|
|
12
|
+
queryFn: () => {
|
|
13
|
+
if (!productId)
|
|
14
|
+
throw new Error("useProductTranslations requires a productId");
|
|
15
|
+
return fetchWithValidation(withQueryParams("/v1/products/translations", {
|
|
16
|
+
productId,
|
|
17
|
+
languageTag: filters.languageTag,
|
|
18
|
+
limit: filters.limit,
|
|
19
|
+
offset: filters.offset,
|
|
20
|
+
}), productTranslationListResponse, { baseUrl, fetcher });
|
|
21
|
+
},
|
|
22
|
+
enabled: enabled && Boolean(productId),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const productTypeInputSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
code: z.ZodString;
|
|
5
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type CreateProductTypeInput = z.input<typeof productTypeInputSchema>;
|
|
11
|
+
export type UpdateProductTypeInput = Partial<CreateProductTypeInput>;
|
|
12
|
+
export declare function useProductTypeMutation(): {
|
|
13
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
code: string;
|
|
17
|
+
description: string | null;
|
|
18
|
+
sortOrder: number;
|
|
19
|
+
active: boolean;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
23
|
+
}, Error, {
|
|
24
|
+
name: string;
|
|
25
|
+
code: string;
|
|
26
|
+
description?: string | null | undefined;
|
|
27
|
+
sortOrder?: number | undefined;
|
|
28
|
+
active?: boolean | undefined;
|
|
29
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
30
|
+
}, unknown>;
|
|
31
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
code: string;
|
|
35
|
+
description: string | null;
|
|
36
|
+
sortOrder: number;
|
|
37
|
+
active: boolean;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
41
|
+
}, Error, {
|
|
42
|
+
id: string;
|
|
43
|
+
input: UpdateProductTypeInput;
|
|
44
|
+
}, unknown>;
|
|
45
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
46
|
+
success: boolean;
|
|
47
|
+
}, Error, string, unknown>;
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=use-product-type-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-type-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-type-mutation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,QAAA,MAAM,sBAAsB;;;;;;;iBAO1B,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAEpE,wBAAgB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqBM,MAAM;eAAS,sBAAsB;;;;;EA8BhF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { fetchWithValidation } from "../client.js";
|
|
5
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
6
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
7
|
+
import { productTypeSingleResponse, successEnvelope } from "../schemas.js";
|
|
8
|
+
const productTypeInputSchema = z.object({
|
|
9
|
+
name: z.string().min(1).max(255),
|
|
10
|
+
code: z.string().min(1).max(100),
|
|
11
|
+
description: z.string().nullable().optional(),
|
|
12
|
+
sortOrder: z.number().int().optional(),
|
|
13
|
+
active: z.boolean().optional(),
|
|
14
|
+
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
15
|
+
});
|
|
16
|
+
export function useProductTypeMutation() {
|
|
17
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
18
|
+
const queryClient = useQueryClient();
|
|
19
|
+
const create = useMutation({
|
|
20
|
+
mutationFn: async (input) => {
|
|
21
|
+
const { data } = await fetchWithValidation("/v1/products/product-types", productTypeSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
22
|
+
return data;
|
|
23
|
+
},
|
|
24
|
+
onSuccess: (data) => {
|
|
25
|
+
void queryClient.invalidateQueries({ queryKey: productsQueryKeys.productTypes() });
|
|
26
|
+
queryClient.setQueryData(productsQueryKeys.productType(data.id), data);
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const update = useMutation({
|
|
30
|
+
mutationFn: async ({ id, input }) => {
|
|
31
|
+
const { data } = await fetchWithValidation(`/v1/products/product-types/${id}`, productTypeSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
32
|
+
return data;
|
|
33
|
+
},
|
|
34
|
+
onSuccess: (data) => {
|
|
35
|
+
void queryClient.invalidateQueries({ queryKey: productsQueryKeys.productTypes() });
|
|
36
|
+
queryClient.setQueryData(productsQueryKeys.productType(data.id), data);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const remove = useMutation({
|
|
40
|
+
mutationFn: async (id) => fetchWithValidation(`/v1/products/product-types/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
41
|
+
onSuccess: (_data, id) => {
|
|
42
|
+
void queryClient.invalidateQueries({ queryKey: productsQueryKeys.productTypes() });
|
|
43
|
+
queryClient.removeQueries({ queryKey: productsQueryKeys.productType(id) });
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
return { create, update, remove };
|
|
47
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UseProductTypeOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useProductType(id: string | null | undefined, options?: UseProductTypeOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
code: string;
|
|
8
|
+
description: string | null;
|
|
9
|
+
sortOrder: number;
|
|
10
|
+
active: boolean;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
14
|
+
}, Error>;
|
|
15
|
+
//# sourceMappingURL=use-product-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-type.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-type.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,GAAE,qBAA0B;;;;;;;;;;UAQhG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
4
|
+
import { getProductTypeQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useProductType(id, options = {}) {
|
|
6
|
+
const client = useVoyantProductsContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getProductTypeQueryOptions(client, id),
|
|
10
|
+
enabled: enabled && Boolean(id),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ProductTypesListFilters } from "../query-keys.js";
|
|
2
|
+
export interface UseProductTypesOptions extends ProductTypesListFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useProductTypes(options?: UseProductTypesOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
data: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
code: string;
|
|
10
|
+
description: string | null;
|
|
11
|
+
sortOrder: number;
|
|
12
|
+
active: boolean;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
16
|
+
}[];
|
|
17
|
+
total: number;
|
|
18
|
+
limit: number;
|
|
19
|
+
offset: number;
|
|
20
|
+
}, Error>;
|
|
21
|
+
//# sourceMappingURL=use-product-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-types.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAG/D,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;UAKnE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
4
|
+
import { getProductTypesQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useProductTypes(options = {}) {
|
|
6
|
+
const client = useVoyantProductsContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({ ...getProductTypesQueryOptions(client, options), enabled });
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function useProductVersionMutation(): {
|
|
2
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
3
|
+
id: string;
|
|
4
|
+
productId: string;
|
|
5
|
+
versionNumber: number;
|
|
6
|
+
snapshot: unknown;
|
|
7
|
+
authorId: string;
|
|
8
|
+
notes: string | null;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}, Error, {
|
|
11
|
+
notes?: string | null | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
productId: string;
|
|
14
|
+
}, unknown>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-product-version-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-version-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-version-mutation.ts"],"names":[],"mappings":"AASA,wBAAgB,yBAAyB;;;;;;;;;;;;mBAQO,MAAM;;EAiBrD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { productVersionResponse } from "../schemas.js";
|
|
7
|
+
export function useProductVersionMutation() {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const create = useMutation({
|
|
11
|
+
mutationFn: async ({ productId, ...input }) => {
|
|
12
|
+
const { data } = await fetchWithValidation(`/v1/products/${productId}/versions`, productVersionResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
13
|
+
return data;
|
|
14
|
+
},
|
|
15
|
+
onSuccess: async (data) => {
|
|
16
|
+
await queryClient.invalidateQueries({
|
|
17
|
+
queryKey: productsQueryKeys.productVersions(data.productId),
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
return { create };
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UseProductVersionsOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useProductVersions(productId: string | null | undefined, options?: UseProductVersionsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
productId: string;
|
|
8
|
+
versionNumber: number;
|
|
9
|
+
snapshot: unknown;
|
|
10
|
+
authorId: string;
|
|
11
|
+
notes: string | null;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
}[];
|
|
14
|
+
}, Error>;
|
|
15
|
+
//# sourceMappingURL=use-product-versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-versions.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-versions.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,yBAA8B;;;;;;;;;;UASxC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
4
|
+
import { getProductVersionsQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useProductVersions(productId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getProductVersionsQueryOptions({ baseUrl, fetcher }, productId, options),
|
|
10
|
+
enabled: enabled && Boolean(productId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface UseProductOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useProduct(id: string | undefined, options?: UseProductOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
status: "draft" | "active" | "archived";
|
|
8
|
+
description: string | null;
|
|
9
|
+
inclusionsHtml: string | null;
|
|
10
|
+
exclusionsHtml: string | null;
|
|
11
|
+
termsHtml: string | null;
|
|
12
|
+
termsShowOnContract: boolean;
|
|
13
|
+
bookingMode: "other" | "date" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
|
|
14
|
+
capacityMode: "free_sale" | "limited" | "on_request";
|
|
15
|
+
timezone: string | null;
|
|
16
|
+
visibility: "public" | "private" | "hidden";
|
|
17
|
+
activated: boolean;
|
|
18
|
+
reservationTimeoutMinutes: number | null;
|
|
19
|
+
sellCurrency: string;
|
|
20
|
+
sellAmountCents: number | null;
|
|
21
|
+
costAmountCents: number | null;
|
|
22
|
+
marginPercent: number | null;
|
|
23
|
+
facilityId: string | null;
|
|
24
|
+
startDate: string | null;
|
|
25
|
+
endDate: string | null;
|
|
26
|
+
pax: number | null;
|
|
27
|
+
productTypeId: string | null;
|
|
28
|
+
taxClassId: string | null;
|
|
29
|
+
tags: string[];
|
|
30
|
+
createdAt: string;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
defaultLanguageTag?: string | null | undefined;
|
|
33
|
+
contractTemplateId?: string | null | undefined;
|
|
34
|
+
customerPaymentPolicy?: {
|
|
35
|
+
deposit: {
|
|
36
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
37
|
+
percent?: number | undefined;
|
|
38
|
+
amountCents?: number | undefined;
|
|
39
|
+
};
|
|
40
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
41
|
+
balanceDueDaysBeforeDeparture: number;
|
|
42
|
+
balanceDueMinDaysFromNow: number;
|
|
43
|
+
} | null | undefined;
|
|
44
|
+
}, Error>;
|
|
45
|
+
//# sourceMappingURL=use-product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,GAAE,iBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgBjF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { productSingleResponse } from "../schemas.js";
|
|
7
|
+
export function useProduct(id, options = {}) {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return useQuery({
|
|
11
|
+
queryKey: productsQueryKeys.product(id ?? ""),
|
|
12
|
+
queryFn: async () => {
|
|
13
|
+
if (!id)
|
|
14
|
+
throw new Error("useProduct requires an id");
|
|
15
|
+
const { data } = await fetchWithValidation(`/v1/products/${id}`, productSingleResponse, {
|
|
16
|
+
baseUrl,
|
|
17
|
+
fetcher,
|
|
18
|
+
});
|
|
19
|
+
return data;
|
|
20
|
+
},
|
|
21
|
+
enabled: enabled && Boolean(id),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ProductsListFilters } from "../query-keys.js";
|
|
2
|
+
export interface UseProductsOptions extends ProductsListFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useProducts(options?: UseProductsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
data: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
status: "draft" | "active" | "archived";
|
|
10
|
+
description: string | null;
|
|
11
|
+
inclusionsHtml: string | null;
|
|
12
|
+
exclusionsHtml: string | null;
|
|
13
|
+
termsHtml: string | null;
|
|
14
|
+
termsShowOnContract: boolean;
|
|
15
|
+
bookingMode: "other" | "date" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
|
|
16
|
+
capacityMode: "free_sale" | "limited" | "on_request";
|
|
17
|
+
timezone: string | null;
|
|
18
|
+
visibility: "public" | "private" | "hidden";
|
|
19
|
+
activated: boolean;
|
|
20
|
+
reservationTimeoutMinutes: number | null;
|
|
21
|
+
sellCurrency: string;
|
|
22
|
+
sellAmountCents: number | null;
|
|
23
|
+
costAmountCents: number | null;
|
|
24
|
+
marginPercent: number | null;
|
|
25
|
+
facilityId: string | null;
|
|
26
|
+
startDate: string | null;
|
|
27
|
+
endDate: string | null;
|
|
28
|
+
pax: number | null;
|
|
29
|
+
productTypeId: string | null;
|
|
30
|
+
taxClassId: string | null;
|
|
31
|
+
tags: string[];
|
|
32
|
+
createdAt: string;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
defaultLanguageTag?: string | null | undefined;
|
|
35
|
+
contractTemplateId?: string | null | undefined;
|
|
36
|
+
customerPaymentPolicy?: {
|
|
37
|
+
deposit: {
|
|
38
|
+
kind: "none" | "percent" | "fixed_cents";
|
|
39
|
+
percent?: number | undefined;
|
|
40
|
+
amountCents?: number | undefined;
|
|
41
|
+
};
|
|
42
|
+
minDaysBeforeDepartureForDeposit: number;
|
|
43
|
+
balanceDueDaysBeforeDeparture: number;
|
|
44
|
+
balanceDueMinDaysFromNow: number;
|
|
45
|
+
} | null | undefined;
|
|
46
|
+
}[];
|
|
47
|
+
total: number;
|
|
48
|
+
limit: number;
|
|
49
|
+
offset: number;
|
|
50
|
+
}, Error>;
|
|
51
|
+
//# sourceMappingURL=use-products.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-products.d.ts","sourceRoot":"","sources":["../../src/hooks/use-products.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,mBAAmB,EAAqB,MAAM,kBAAkB,CAAA;AAG9E,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAwB3D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { productListResponse } from "../schemas.js";
|
|
7
|
+
export function useProducts(options = {}) {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const { enabled = true, ...filters } = options;
|
|
10
|
+
return useQuery({
|
|
11
|
+
queryKey: productsQueryKeys.productsList(filters),
|
|
12
|
+
queryFn: () => {
|
|
13
|
+
const params = new URLSearchParams();
|
|
14
|
+
if (filters.status)
|
|
15
|
+
params.set("status", filters.status);
|
|
16
|
+
if (filters.bookingMode)
|
|
17
|
+
params.set("bookingMode", filters.bookingMode);
|
|
18
|
+
if (filters.visibility)
|
|
19
|
+
params.set("visibility", filters.visibility);
|
|
20
|
+
if (filters.activated !== undefined)
|
|
21
|
+
params.set("activated", String(filters.activated));
|
|
22
|
+
if (filters.facilityId)
|
|
23
|
+
params.set("facilityId", filters.facilityId);
|
|
24
|
+
if (filters.search)
|
|
25
|
+
params.set("search", filters.search);
|
|
26
|
+
if (filters.limit !== undefined)
|
|
27
|
+
params.set("limit", String(filters.limit));
|
|
28
|
+
if (filters.offset !== undefined)
|
|
29
|
+
params.set("offset", String(filters.offset));
|
|
30
|
+
const qs = params.toString();
|
|
31
|
+
return fetchWithValidation(`/v1/products${qs ? `?${qs}` : ""}`, productListResponse, {
|
|
32
|
+
baseUrl,
|
|
33
|
+
fetcher,
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
enabled,
|
|
37
|
+
});
|
|
38
|
+
}
|