@voyant-travel/distribution-react 0.109.8
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 +82 -0
- package/dist/admin/index.d.ts +30 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +65 -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-link-detail-page.d.ts +10 -0
- package/dist/components/booking-link-detail-page.d.ts.map +1 -0
- package/dist/components/booking-link-detail-page.js +51 -0
- package/dist/components/channel-detail-page.d.ts +12 -0
- package/dist/components/channel-detail-page.d.ts.map +1 -0
- package/dist/components/channel-detail-page.js +41 -0
- package/dist/components/channel-sync-controls.d.ts +15 -0
- package/dist/components/channel-sync-controls.d.ts.map +1 -0
- package/dist/components/channel-sync-controls.js +29 -0
- package/dist/components/channel-sync-deliveries-drawer.d.ts +12 -0
- package/dist/components/channel-sync-deliveries-drawer.d.ts.map +1 -0
- package/dist/components/channel-sync-deliveries-drawer.js +18 -0
- package/dist/components/channel-sync-page-utils.d.ts +99 -0
- package/dist/components/channel-sync-page-utils.d.ts.map +1 -0
- package/dist/components/channel-sync-page-utils.js +85 -0
- package/dist/components/channel-sync-page.d.ts +4 -0
- package/dist/components/channel-sync-page.d.ts.map +1 -0
- package/dist/components/channel-sync-page.js +141 -0
- package/dist/components/channels-page.d.ts +6 -0
- package/dist/components/channels-page.d.ts.map +1 -0
- package/dist/components/channels-page.js +132 -0
- package/dist/components/commission-rule-detail-page.d.ts +10 -0
- package/dist/components/commission-rule-detail-page.d.ts.map +1 -0
- package/dist/components/commission-rule-detail-page.js +57 -0
- package/dist/components/contract-detail-page.d.ts +10 -0
- package/dist/components/contract-detail-page.d.ts.map +1 -0
- package/dist/components/contract-detail-page.js +64 -0
- package/dist/components/distribution-overview.d.ts +19 -0
- package/dist/components/distribution-overview.d.ts.map +1 -0
- package/dist/components/distribution-overview.js +13 -0
- package/dist/components/distribution-page.d.ts +26 -0
- package/dist/components/distribution-page.d.ts.map +1 -0
- package/dist/components/distribution-page.js +190 -0
- package/dist/components/distribution-section-header.d.ts +7 -0
- package/dist/components/distribution-section-header.d.ts.map +1 -0
- package/dist/components/distribution-section-header.js +6 -0
- package/dist/components/distribution-shared.d.ts +32 -0
- package/dist/components/distribution-shared.d.ts.map +1 -0
- package/dist/components/distribution-shared.js +246 -0
- package/dist/components/distribution-tabs-primary.d.ts +57 -0
- package/dist/components/distribution-tabs-primary.d.ts.map +1 -0
- package/dist/components/distribution-tabs-primary.js +89 -0
- package/dist/components/distribution-tabs-secondary.d.ts +58 -0
- package/dist/components/distribution-tabs-secondary.d.ts.map +1 -0
- package/dist/components/distribution-tabs-secondary.js +89 -0
- package/dist/components/mapping-detail-page.d.ts +10 -0
- package/dist/components/mapping-detail-page.d.ts.map +1 -0
- package/dist/components/mapping-detail-page.js +51 -0
- package/dist/components/webhook-event-detail-page.d.ts +9 -0
- package/dist/components/webhook-event-detail-page.d.ts.map +1 -0
- package/dist/components/webhook-event-detail-page.js +46 -0
- package/dist/constants.d.ts +103 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +48 -0
- package/dist/external-refs/client.d.ts +14 -0
- package/dist/external-refs/client.d.ts.map +1 -0
- package/dist/external-refs/client.js +58 -0
- package/dist/external-refs/components/entity-ref-picker.d.ts +21 -0
- package/dist/external-refs/components/entity-ref-picker.d.ts.map +1 -0
- package/dist/external-refs/components/entity-ref-picker.js +38 -0
- package/dist/external-refs/components/external-ref-dialog.d.ts +11 -0
- package/dist/external-refs/components/external-ref-dialog.d.ts.map +1 -0
- package/dist/external-refs/components/external-ref-dialog.js +120 -0
- package/dist/external-refs/components/external-refs-page.d.ts +16 -0
- package/dist/external-refs/components/external-refs-page.d.ts.map +1 -0
- package/dist/external-refs/components/external-refs-page.js +109 -0
- package/dist/external-refs/hooks/index.d.ts +3 -0
- package/dist/external-refs/hooks/index.d.ts.map +1 -0
- package/dist/external-refs/hooks/index.js +2 -0
- package/dist/external-refs/hooks/use-external-ref-mutation.d.ts +57 -0
- package/dist/external-refs/hooks/use-external-ref-mutation.d.ts.map +1 -0
- package/dist/external-refs/hooks/use-external-ref-mutation.js +40 -0
- package/dist/external-refs/hooks/use-external-refs.d.ts +26 -0
- package/dist/external-refs/hooks/use-external-refs.d.ts.map +1 -0
- package/dist/external-refs/hooks/use-external-refs.js +12 -0
- package/dist/external-refs/i18n/en.d.ts +3 -0
- package/dist/external-refs/i18n/en.d.ts.map +1 -0
- package/dist/external-refs/i18n/en.js +92 -0
- package/dist/external-refs/i18n/index.d.ts +5 -0
- package/dist/external-refs/i18n/index.d.ts.map +1 -0
- package/dist/external-refs/i18n/index.js +3 -0
- package/dist/external-refs/i18n/messages.d.ts +85 -0
- package/dist/external-refs/i18n/messages.d.ts.map +1 -0
- package/dist/external-refs/i18n/messages.js +1 -0
- package/dist/external-refs/i18n/provider.d.ts +26 -0
- package/dist/external-refs/i18n/provider.d.ts.map +1 -0
- package/dist/external-refs/i18n/provider.js +44 -0
- package/dist/external-refs/i18n/ro.d.ts +3 -0
- package/dist/external-refs/i18n/ro.d.ts.map +1 -0
- package/dist/external-refs/i18n/ro.js +92 -0
- package/dist/external-refs/index.d.ts +7 -0
- package/dist/external-refs/index.d.ts.map +1 -0
- package/dist/external-refs/index.js +6 -0
- package/dist/external-refs/provider.d.ts +2 -0
- package/dist/external-refs/provider.d.ts.map +1 -0
- package/dist/external-refs/provider.js +1 -0
- package/dist/external-refs/query-keys.d.ts +18 -0
- package/dist/external-refs/query-keys.d.ts.map +1 -0
- package/dist/external-refs/query-keys.js +6 -0
- package/dist/external-refs/query-options.d.ts +159 -0
- package/dist/external-refs/query-options.d.ts.map +1 -0
- package/dist/external-refs/query-options.js +31 -0
- package/dist/external-refs/schemas.d.ts +82 -0
- package/dist/external-refs/schemas.d.ts.map +1 -0
- package/dist/external-refs/schemas.js +20 -0
- package/dist/external-refs/ui.d.ts +5 -0
- package/dist/external-refs/ui.d.ts.map +1 -0
- package/dist/external-refs/ui.js +4 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +12 -0
- package/dist/hooks/use-booking-links.d.ts +20 -0
- package/dist/hooks/use-booking-links.d.ts.map +1 -0
- package/dist/hooks/use-booking-links.js +9 -0
- package/dist/hooks/use-bookings.d.ts +14 -0
- package/dist/hooks/use-bookings.d.ts.map +1 -0
- package/dist/hooks/use-bookings.js +9 -0
- package/dist/hooks/use-channel-mutation.d.ts +69 -0
- package/dist/hooks/use-channel-mutation.d.ts.map +1 -0
- package/dist/hooks/use-channel-mutation.js +49 -0
- package/dist/hooks/use-channel.d.ts +16 -0
- package/dist/hooks/use-channel.d.ts.map +1 -0
- package/dist/hooks/use-channel.js +13 -0
- package/dist/hooks/use-channels.d.ts +20 -0
- package/dist/hooks/use-channels.d.ts.map +1 -0
- package/dist/hooks/use-channels.js +9 -0
- package/dist/hooks/use-commission-rules.d.ts +23 -0
- package/dist/hooks/use-commission-rules.d.ts.map +1 -0
- package/dist/hooks/use-commission-rules.js +9 -0
- package/dist/hooks/use-contracts.d.ts +22 -0
- package/dist/hooks/use-contracts.d.ts.map +1 -0
- package/dist/hooks/use-contracts.js +9 -0
- package/dist/hooks/use-mappings.d.ts +19 -0
- package/dist/hooks/use-mappings.d.ts.map +1 -0
- package/dist/hooks/use-mappings.js +9 -0
- package/dist/hooks/use-products.d.ts +14 -0
- package/dist/hooks/use-products.d.ts.map +1 -0
- package/dist/hooks/use-products.js +9 -0
- package/dist/hooks/use-suppliers.d.ts +14 -0
- package/dist/hooks/use-suppliers.d.ts.map +1 -0
- package/dist/hooks/use-suppliers.js +9 -0
- package/dist/hooks/use-webhook-events.d.ts +21 -0
- package/dist/hooks/use-webhook-events.d.ts.map +1 -0
- package/dist/hooks/use-webhook-events.js +9 -0
- package/dist/i18n/en.d.ts +592 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +561 -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.d.ts +409 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +1207 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro.d.ts +592 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +561 -0
- package/dist/i18n/utils.d.ts +4 -0
- package/dist/i18n/utils.d.ts.map +1 -0
- package/dist/i18n/utils.js +8 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -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 +61 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +30 -0
- package/dist/query-options.d.ts +999 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +219 -0
- package/dist/schemas.d.ts +615 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +144 -0
- package/dist/suppliers/admin/index.d.ts +69 -0
- package/dist/suppliers/admin/index.d.ts.map +1 -0
- package/dist/suppliers/admin/index.js +111 -0
- package/dist/suppliers/admin/pages/supplier-detail-page.d.ts +9 -0
- package/dist/suppliers/admin/pages/supplier-detail-page.d.ts.map +1 -0
- package/dist/suppliers/admin/pages/supplier-detail-page.js +11 -0
- package/dist/suppliers/admin/slots.d.ts +19 -0
- package/dist/suppliers/admin/slots.d.ts.map +1 -0
- package/dist/suppliers/admin/slots.js +18 -0
- package/dist/suppliers/admin/supplier-detail-host.d.ts +30 -0
- package/dist/suppliers/admin/supplier-detail-host.d.ts.map +1 -0
- package/dist/suppliers/admin/supplier-detail-host.js +34 -0
- package/dist/suppliers/admin/supplier-detail-skeleton.d.ts +9 -0
- package/dist/suppliers/admin/supplier-detail-skeleton.d.ts.map +1 -0
- package/dist/suppliers/admin/supplier-detail-skeleton.js +20 -0
- package/dist/suppliers/admin/suppliers-host.d.ts +11 -0
- package/dist/suppliers/admin/suppliers-host.d.ts.map +1 -0
- package/dist/suppliers/admin/suppliers-host.js +17 -0
- package/dist/suppliers/admin/suppliers-list-skeleton.d.ts +9 -0
- package/dist/suppliers/admin/suppliers-list-skeleton.d.ts.map +1 -0
- package/dist/suppliers/admin/suppliers-list-skeleton.js +24 -0
- package/dist/suppliers/client.d.ts +14 -0
- package/dist/suppliers/client.d.ts.map +1 -0
- package/dist/suppliers/client.js +59 -0
- package/dist/suppliers/components/message-format.d.ts +2 -0
- package/dist/suppliers/components/message-format.d.ts.map +1 -0
- package/dist/suppliers/components/message-format.js +3 -0
- package/dist/suppliers/components/rate-dialog.d.ts +11 -0
- package/dist/suppliers/components/rate-dialog.d.ts.map +1 -0
- package/dist/suppliers/components/rate-dialog.js +93 -0
- package/dist/suppliers/components/service-dialog.d.ts +10 -0
- package/dist/suppliers/components/service-dialog.d.ts.map +1 -0
- package/dist/suppliers/components/service-dialog.js +69 -0
- package/dist/suppliers/components/supplier-combobox.d.ts +13 -0
- package/dist/suppliers/components/supplier-combobox.d.ts.map +1 -0
- package/dist/suppliers/components/supplier-combobox.js +23 -0
- package/dist/suppliers/components/supplier-detail-page.d.ts +17 -0
- package/dist/suppliers/components/supplier-detail-page.d.ts.map +1 -0
- package/dist/suppliers/components/supplier-detail-page.js +105 -0
- package/dist/suppliers/components/supplier-dialog.d.ts +9 -0
- package/dist/suppliers/components/supplier-dialog.d.ts.map +1 -0
- package/dist/suppliers/components/supplier-dialog.js +118 -0
- package/dist/suppliers/components/supplier-service-row.d.ts +22 -0
- package/dist/suppliers/components/supplier-service-row.d.ts.map +1 -0
- package/dist/suppliers/components/supplier-service-row.js +18 -0
- package/dist/suppliers/components/suppliers-page.d.ts +10 -0
- package/dist/suppliers/components/suppliers-page.d.ts.map +1 -0
- package/dist/suppliers/components/suppliers-page.js +94 -0
- package/dist/suppliers/constants.d.ts +69 -0
- package/dist/suppliers/constants.d.ts.map +1 -0
- package/dist/suppliers/constants.js +34 -0
- package/dist/suppliers/hooks/index.d.ts +10 -0
- package/dist/suppliers/hooks/index.d.ts.map +1 -0
- package/dist/suppliers/hooks/index.js +10 -0
- package/dist/suppliers/hooks/use-supplier-mutation.d.ts +95 -0
- package/dist/suppliers/hooks/use-supplier-mutation.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-mutation.js +41 -0
- package/dist/suppliers/hooks/use-supplier-note-mutation.d.ts +13 -0
- package/dist/suppliers/hooks/use-supplier-note-mutation.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-note-mutation.js +20 -0
- package/dist/suppliers/hooks/use-supplier-notes.d.ts +13 -0
- package/dist/suppliers/hooks/use-supplier-notes.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-notes.js +12 -0
- package/dist/suppliers/hooks/use-supplier-rate-mutation.d.ts +56 -0
- package/dist/suppliers/hooks/use-supplier-rate-mutation.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-rate-mutation.js +41 -0
- package/dist/suppliers/hooks/use-supplier-service-mutation.d.ts +45 -0
- package/dist/suppliers/hooks/use-supplier-service-mutation.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-service-mutation.js +44 -0
- package/dist/suppliers/hooks/use-supplier-service-rates.d.ts +20 -0
- package/dist/suppliers/hooks/use-supplier-service-rates.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-service-rates.js +12 -0
- package/dist/suppliers/hooks/use-supplier-services.d.ts +19 -0
- package/dist/suppliers/hooks/use-supplier-services.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-services.js +12 -0
- package/dist/suppliers/hooks/use-supplier.d.ts +38 -0
- package/dist/suppliers/hooks/use-supplier.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier.js +9 -0
- package/dist/suppliers/hooks/use-suppliers.d.ts +42 -0
- package/dist/suppliers/hooks/use-suppliers.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-suppliers.js +9 -0
- package/dist/suppliers/i18n/en.d.ts +204 -0
- package/dist/suppliers/i18n/en.d.ts.map +1 -0
- package/dist/suppliers/i18n/en.js +203 -0
- package/dist/suppliers/i18n/index.d.ts +5 -0
- package/dist/suppliers/i18n/index.d.ts.map +1 -0
- package/dist/suppliers/i18n/index.js +3 -0
- package/dist/suppliers/i18n/messages.d.ts +187 -0
- package/dist/suppliers/i18n/messages.d.ts.map +1 -0
- package/dist/suppliers/i18n/messages.js +1 -0
- package/dist/suppliers/i18n/provider.d.ts +430 -0
- package/dist/suppliers/i18n/provider.d.ts.map +1 -0
- package/dist/suppliers/i18n/provider.js +44 -0
- package/dist/suppliers/i18n/ro.d.ts +204 -0
- package/dist/suppliers/i18n/ro.d.ts.map +1 -0
- package/dist/suppliers/i18n/ro.js +203 -0
- package/dist/suppliers/index.d.ts +9 -0
- package/dist/suppliers/index.d.ts.map +1 -0
- package/dist/suppliers/index.js +8 -0
- package/dist/suppliers/provider.d.ts +2 -0
- package/dist/suppliers/provider.d.ts.map +1 -0
- package/dist/suppliers/provider.js +1 -0
- package/dist/suppliers/query-keys.d.ts +29 -0
- package/dist/suppliers/query-keys.d.ts.map +1 -0
- package/dist/suppliers/query-keys.js +12 -0
- package/dist/suppliers/query-options.d.ts +467 -0
- package/dist/suppliers/query-options.d.ts.map +1 -0
- package/dist/suppliers/query-options.js +63 -0
- package/dist/suppliers/schemas.d.ts +363 -0
- package/dist/suppliers/schemas.d.ts.map +1 -0
- package/dist/suppliers/schemas.js +109 -0
- package/dist/suppliers/ui.d.ts +9 -0
- package/dist/suppliers/ui.d.ts.map +1 -0
- package/dist/suppliers/ui.js +8 -0
- package/dist/suppliers/utils.d.ts +4 -0
- package/dist/suppliers/utils.d.ts.map +1 -0
- package/dist/suppliers/utils.js +10 -0
- package/dist/ui.d.ts +16 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +14 -0
- package/dist/utils.d.ts +10 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +44 -0
- package/package.json +263 -0
- package/src/external-refs/styles.css +11 -0
- package/src/styles.css +11 -0
- package/src/suppliers/styles.css +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AA4B5E,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYlC;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9B;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,0BAA0B,EAClC,OAAO,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;;;;;;;;;;;;;;;;;;;;;;;;;EAa9B"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { queryOptions } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "./client.js";
|
|
4
|
+
import { distributionQueryKeys } from "./query-keys.js";
|
|
5
|
+
import { bookingListResponse, bookingSingleResponse, channelBookingLinkListResponse, channelBookingLinkSingleResponse, channelCommissionRuleListResponse, channelCommissionRuleSingleResponse, channelContractListResponse, channelContractSingleResponse, channelListResponse, channelProductMappingListResponse, channelProductMappingSingleResponse, channelSingleResponse, channelWebhookEventListResponse, channelWebhookEventSingleResponse, productListResponse, productSingleResponse, supplierListResponse, supplierSingleResponse, } from "./schemas.js";
|
|
6
|
+
function appendPagination(params, filters) {
|
|
7
|
+
if (filters.limit !== undefined)
|
|
8
|
+
params.set("limit", String(filters.limit));
|
|
9
|
+
if (filters.offset !== undefined)
|
|
10
|
+
params.set("offset", String(filters.offset));
|
|
11
|
+
}
|
|
12
|
+
export function getSuppliersQueryOptions(client, options = {}) {
|
|
13
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
14
|
+
return queryOptions({
|
|
15
|
+
queryKey: distributionQueryKeys.suppliersList(filters),
|
|
16
|
+
queryFn: () => {
|
|
17
|
+
const params = new URLSearchParams();
|
|
18
|
+
appendPagination(params, filters);
|
|
19
|
+
const qs = params.toString();
|
|
20
|
+
return fetchWithValidation(`/v1/suppliers${qs ? `?${qs}` : ""}`, supplierListResponse, client);
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export function getSupplierQueryOptions(client, id) {
|
|
25
|
+
return queryOptions({
|
|
26
|
+
queryKey: distributionQueryKeys.supplier(id ?? ""),
|
|
27
|
+
queryFn: async () => {
|
|
28
|
+
if (!id)
|
|
29
|
+
throw new Error("getSupplierQueryOptions requires an id");
|
|
30
|
+
return fetchWithValidation(`/v1/suppliers/${id}`, supplierSingleResponse, client);
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
export function getProductsQueryOptions(client, options = {}) {
|
|
35
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
36
|
+
return queryOptions({
|
|
37
|
+
queryKey: distributionQueryKeys.productsList(filters),
|
|
38
|
+
queryFn: () => {
|
|
39
|
+
const params = new URLSearchParams();
|
|
40
|
+
appendPagination(params, filters);
|
|
41
|
+
const qs = params.toString();
|
|
42
|
+
return fetchWithValidation(`/v1/products${qs ? `?${qs}` : ""}`, productListResponse, client);
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export function getProductQueryOptions(client, id) {
|
|
47
|
+
return queryOptions({
|
|
48
|
+
queryKey: distributionQueryKeys.product(id ?? ""),
|
|
49
|
+
queryFn: async () => {
|
|
50
|
+
if (!id)
|
|
51
|
+
throw new Error("getProductQueryOptions requires an id");
|
|
52
|
+
return fetchWithValidation(`/v1/products/${id}`, productSingleResponse, client);
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export function getBookingsQueryOptions(client, options = {}) {
|
|
57
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
58
|
+
return queryOptions({
|
|
59
|
+
queryKey: distributionQueryKeys.bookingsList(filters),
|
|
60
|
+
queryFn: () => {
|
|
61
|
+
const params = new URLSearchParams();
|
|
62
|
+
appendPagination(params, filters);
|
|
63
|
+
const qs = params.toString();
|
|
64
|
+
return fetchWithValidation(`/v1/bookings${qs ? `?${qs}` : ""}`, bookingListResponse, client);
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export function getBookingQueryOptions(client, id) {
|
|
69
|
+
return queryOptions({
|
|
70
|
+
queryKey: distributionQueryKeys.booking(id ?? ""),
|
|
71
|
+
queryFn: async () => {
|
|
72
|
+
if (!id)
|
|
73
|
+
throw new Error("getBookingQueryOptions requires an id");
|
|
74
|
+
return fetchWithValidation(`/v1/bookings/${id}`, bookingSingleResponse, client);
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export function getChannelsQueryOptions(client, options = {}) {
|
|
79
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
80
|
+
return queryOptions({
|
|
81
|
+
queryKey: distributionQueryKeys.channelsList(filters),
|
|
82
|
+
queryFn: () => {
|
|
83
|
+
const params = new URLSearchParams();
|
|
84
|
+
appendPagination(params, filters);
|
|
85
|
+
const qs = params.toString();
|
|
86
|
+
return fetchWithValidation(`/v1/distribution/channels${qs ? `?${qs}` : ""}`, channelListResponse, client);
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export function getChannelQueryOptions(client, id) {
|
|
91
|
+
return queryOptions({
|
|
92
|
+
queryKey: distributionQueryKeys.channel(id ?? ""),
|
|
93
|
+
queryFn: async () => {
|
|
94
|
+
if (!id)
|
|
95
|
+
throw new Error("getChannelQueryOptions requires an id");
|
|
96
|
+
return fetchWithValidation(`/v1/distribution/channels/${id}`, channelSingleResponse, client);
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
export function getContractsQueryOptions(client, options = {}) {
|
|
101
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
102
|
+
return queryOptions({
|
|
103
|
+
queryKey: distributionQueryKeys.contractsList(filters),
|
|
104
|
+
queryFn: () => {
|
|
105
|
+
const params = new URLSearchParams();
|
|
106
|
+
if ("channelId" in filters && filters.channelId)
|
|
107
|
+
params.set("channelId", filters.channelId);
|
|
108
|
+
appendPagination(params, filters);
|
|
109
|
+
const qs = params.toString();
|
|
110
|
+
return fetchWithValidation(`/v1/distribution/contracts${qs ? `?${qs}` : ""}`, channelContractListResponse, client);
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
export function getContractQueryOptions(client, id) {
|
|
115
|
+
return queryOptions({
|
|
116
|
+
queryKey: distributionQueryKeys.contract(id ?? ""),
|
|
117
|
+
queryFn: async () => {
|
|
118
|
+
if (!id)
|
|
119
|
+
throw new Error("getContractQueryOptions requires an id");
|
|
120
|
+
return fetchWithValidation(`/v1/distribution/contracts/${id}`, channelContractSingleResponse, client);
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
export function getCommissionRulesQueryOptions(client, options = {}) {
|
|
125
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
126
|
+
return queryOptions({
|
|
127
|
+
queryKey: distributionQueryKeys.commissionRulesList(filters),
|
|
128
|
+
queryFn: () => {
|
|
129
|
+
const params = new URLSearchParams();
|
|
130
|
+
if (filters.contractId)
|
|
131
|
+
params.set("contractId", filters.contractId);
|
|
132
|
+
appendPagination(params, filters);
|
|
133
|
+
const qs = params.toString();
|
|
134
|
+
return fetchWithValidation(`/v1/distribution/commission-rules${qs ? `?${qs}` : ""}`, channelCommissionRuleListResponse, client);
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
export function getCommissionRuleQueryOptions(client, id) {
|
|
139
|
+
return queryOptions({
|
|
140
|
+
queryKey: distributionQueryKeys.commissionRule(id ?? ""),
|
|
141
|
+
queryFn: async () => {
|
|
142
|
+
if (!id)
|
|
143
|
+
throw new Error("getCommissionRuleQueryOptions requires an id");
|
|
144
|
+
return fetchWithValidation(`/v1/distribution/commission-rules/${id}`, channelCommissionRuleSingleResponse, client);
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
export function getMappingsQueryOptions(client, options = {}) {
|
|
149
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
150
|
+
return queryOptions({
|
|
151
|
+
queryKey: distributionQueryKeys.mappingsList(filters),
|
|
152
|
+
queryFn: () => {
|
|
153
|
+
const params = new URLSearchParams();
|
|
154
|
+
if (filters.channelId)
|
|
155
|
+
params.set("channelId", filters.channelId);
|
|
156
|
+
appendPagination(params, filters);
|
|
157
|
+
const qs = params.toString();
|
|
158
|
+
return fetchWithValidation(`/v1/distribution/product-mappings${qs ? `?${qs}` : ""}`, channelProductMappingListResponse, client);
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
export function getMappingQueryOptions(client, id) {
|
|
163
|
+
return queryOptions({
|
|
164
|
+
queryKey: distributionQueryKeys.mapping(id ?? ""),
|
|
165
|
+
queryFn: async () => {
|
|
166
|
+
if (!id)
|
|
167
|
+
throw new Error("getMappingQueryOptions requires an id");
|
|
168
|
+
return fetchWithValidation(`/v1/distribution/product-mappings/${id}`, channelProductMappingSingleResponse, client);
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
export function getBookingLinksQueryOptions(client, options = {}) {
|
|
173
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
174
|
+
return queryOptions({
|
|
175
|
+
queryKey: distributionQueryKeys.bookingLinksList(filters),
|
|
176
|
+
queryFn: () => {
|
|
177
|
+
const params = new URLSearchParams();
|
|
178
|
+
if (filters.channelId)
|
|
179
|
+
params.set("channelId", filters.channelId);
|
|
180
|
+
appendPagination(params, filters);
|
|
181
|
+
const qs = params.toString();
|
|
182
|
+
return fetchWithValidation(`/v1/distribution/booking-links${qs ? `?${qs}` : ""}`, channelBookingLinkListResponse, client);
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
export function getBookingLinkQueryOptions(client, id) {
|
|
187
|
+
return queryOptions({
|
|
188
|
+
queryKey: distributionQueryKeys.bookingLink(id ?? ""),
|
|
189
|
+
queryFn: async () => {
|
|
190
|
+
if (!id)
|
|
191
|
+
throw new Error("getBookingLinkQueryOptions requires an id");
|
|
192
|
+
return fetchWithValidation(`/v1/distribution/booking-links/${id}`, channelBookingLinkSingleResponse, client);
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
export function getWebhookEventsQueryOptions(client, options = {}) {
|
|
197
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
198
|
+
return queryOptions({
|
|
199
|
+
queryKey: distributionQueryKeys.webhookEventsList(filters),
|
|
200
|
+
queryFn: () => {
|
|
201
|
+
const params = new URLSearchParams();
|
|
202
|
+
if (filters.channelId)
|
|
203
|
+
params.set("channelId", filters.channelId);
|
|
204
|
+
appendPagination(params, filters);
|
|
205
|
+
const qs = params.toString();
|
|
206
|
+
return fetchWithValidation(`/v1/distribution/webhook-events${qs ? `?${qs}` : ""}`, channelWebhookEventListResponse, client);
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
export function getWebhookEventQueryOptions(client, id) {
|
|
211
|
+
return queryOptions({
|
|
212
|
+
queryKey: distributionQueryKeys.webhookEvent(id ?? ""),
|
|
213
|
+
queryFn: async () => {
|
|
214
|
+
if (!id)
|
|
215
|
+
throw new Error("getWebhookEventQueryOptions requires an id");
|
|
216
|
+
return fetchWithValidation(`/v1/distribution/webhook-events/${id}`, channelWebhookEventSingleResponse, client);
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
}
|