@voyant-travel/storefront-react 0.120.1
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 +17 -0
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +78 -0
- package/dist/components/storefront-settings-page.d.ts +5 -0
- package/dist/components/storefront-settings-page.d.ts.map +1 -0
- package/dist/components/storefront-settings-page.js +39 -0
- package/dist/customer-portal/client.d.ts +16 -0
- package/dist/customer-portal/client.d.ts.map +1 -0
- package/dist/customer-portal/client.js +78 -0
- package/dist/customer-portal/hooks/index.d.ts +12 -0
- package/dist/customer-portal/hooks/index.d.ts.map +1 -0
- package/dist/customer-portal/hooks/index.js +11 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking-billing-contact.d.ts +18 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking-billing-contact.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking-billing-contact.js +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking-documents.d.ts +16 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking-documents.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking-documents.js +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking.d.ts +109 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-booking.js +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-bookings.d.ts +22 -0
- package/dist/customer-portal/hooks/use-customer-portal-bookings.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-bookings.js +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-companions.d.ts +42 -0
- package/dist/customer-portal/hooks/use-customer-portal-companions.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-companions.js +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-contact-exists.d.ts +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-contact-exists.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-contact-exists.js +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-mutation.d.ts +419 -0
- package/dist/customer-portal/hooks/use-customer-portal-mutation.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-mutation.js +62 -0
- package/dist/customer-portal/hooks/use-customer-portal-phone-contact-exists.d.ts +13 -0
- package/dist/customer-portal/hooks/use-customer-portal-phone-contact-exists.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-phone-contact-exists.js +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile-document-mutation.d.ts +69 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile-document-mutation.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile-document-mutation.js +28 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile-documents.d.ts +20 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile-documents.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile-documents.js +12 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile.d.ts +61 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile.d.ts.map +1 -0
- package/dist/customer-portal/hooks/use-customer-portal-profile.js +12 -0
- package/dist/customer-portal/index.d.ts +9 -0
- package/dist/customer-portal/index.d.ts.map +1 -0
- package/dist/customer-portal/index.js +7 -0
- package/dist/customer-portal/operations.d.ts +595 -0
- package/dist/customer-portal/operations.d.ts.map +1 -0
- package/dist/customer-portal/operations.js +84 -0
- package/dist/customer-portal/provider.d.ts +2 -0
- package/dist/customer-portal/provider.d.ts.map +1 -0
- package/dist/customer-portal/provider.js +1 -0
- package/dist/customer-portal/query-keys.d.ts +21 -0
- package/dist/customer-portal/query-keys.d.ts.map +1 -0
- package/dist/customer-portal/query-keys.js +14 -0
- package/dist/customer-portal/query-options.d.ts +1148 -0
- package/dist/customer-portal/query-options.d.ts.map +1 -0
- package/dist/customer-portal/query-options.js +58 -0
- package/dist/customer-portal/schemas.d.ts +751 -0
- package/dist/customer-portal/schemas.d.ts.map +1 -0
- package/dist/customer-portal/schemas.js +21 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +11 -0
- package/dist/hooks/use-admin-storefront-settings.d.ts +290 -0
- package/dist/hooks/use-admin-storefront-settings.d.ts.map +1 -0
- package/dist/hooks/use-admin-storefront-settings.js +29 -0
- package/dist/hooks/use-storefront-departure-itinerary.d.ts +23 -0
- package/dist/hooks/use-storefront-departure-itinerary.d.ts.map +1 -0
- package/dist/hooks/use-storefront-departure-itinerary.js +12 -0
- package/dist/hooks/use-storefront-departure-price-preview-mutation.d.ts +244 -0
- package/dist/hooks/use-storefront-departure-price-preview-mutation.d.ts.map +1 -0
- package/dist/hooks/use-storefront-departure-price-preview-mutation.js +15 -0
- package/dist/hooks/use-storefront-departure.d.ts +51 -0
- package/dist/hooks/use-storefront-departure.d.ts.map +1 -0
- package/dist/hooks/use-storefront-departure.js +12 -0
- package/dist/hooks/use-storefront-offer-apply-mutation.d.ts +68 -0
- package/dist/hooks/use-storefront-offer-apply-mutation.d.ts.map +1 -0
- package/dist/hooks/use-storefront-offer-apply-mutation.js +15 -0
- package/dist/hooks/use-storefront-offer-redeem-mutation.d.ts +69 -0
- package/dist/hooks/use-storefront-offer-redeem-mutation.d.ts.map +1 -0
- package/dist/hooks/use-storefront-offer-redeem-mutation.js +12 -0
- package/dist/hooks/use-storefront-offer.d.ts +26 -0
- package/dist/hooks/use-storefront-offer.d.ts.map +1 -0
- package/dist/hooks/use-storefront-offer.js +12 -0
- package/dist/hooks/use-storefront-product-departures.d.ts +55 -0
- package/dist/hooks/use-storefront-product-departures.d.ts.map +1 -0
- package/dist/hooks/use-storefront-product-departures.js +12 -0
- package/dist/hooks/use-storefront-product-extensions.d.ts +47 -0
- package/dist/hooks/use-storefront-product-extensions.d.ts.map +1 -0
- package/dist/hooks/use-storefront-product-extensions.js +12 -0
- package/dist/hooks/use-storefront-product-offers.d.ts +26 -0
- package/dist/hooks/use-storefront-product-offers.d.ts.map +1 -0
- package/dist/hooks/use-storefront-product-offers.js +12 -0
- package/dist/hooks/use-storefront-settings.d.ts +101 -0
- package/dist/hooks/use-storefront-settings.d.ts.map +1 -0
- package/dist/hooks/use-storefront-settings.js +12 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/internal/storefront-settings-form.d.ts +50 -0
- package/dist/internal/storefront-settings-form.d.ts.map +1 -0
- package/dist/internal/storefront-settings-form.js +246 -0
- package/dist/internal/storefront-settings-payment-section.d.ts +12 -0
- package/dist/internal/storefront-settings-payment-section.d.ts.map +1 -0
- package/dist/internal/storefront-settings-payment-section.js +14 -0
- package/dist/internal/storefront-settings-sections.d.ts +23 -0
- package/dist/internal/storefront-settings-sections.d.ts.map +1 -0
- package/dist/internal/storefront-settings-sections.js +32 -0
- package/dist/operations.d.ts +827 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +46 -0
- package/dist/operations.test.d.ts +2 -0
- package/dist/operations.test.d.ts.map +1 -0
- package/dist/operations.test.js +77 -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 +32 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +15 -0
- package/dist/query-options.d.ts +1648 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +52 -0
- package/dist/schemas.d.ts +576 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +11 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +1 -0
- package/package.json +133 -0
- package/src/styles.css +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src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AAG,CAAC,CAAC,KAAK,CAC5D,OAAO,yCAAyC,CACjD,CAAA;AACD,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAA;AACD,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,4CAA4C,CACpD,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, createCustomerPortalProfileDocumentSchema, customerPortalBookingBillingContactSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingSummarySchema, customerPortalCompanionSchema, customerPortalContactExistsResultSchema, customerPortalPhoneContactExistsResultSchema, customerPortalProfileDocumentSchema, customerPortalProfileSchema, importCustomerPortalBookingTravelersResultSchema, importCustomerPortalBookingTravelersSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileDocumentSchema, updateCustomerPortalProfileSchema, } from "@voyant-travel/storefront/customer-portal";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const singleEnvelope = (item) => z.object({ data: item });
|
|
4
|
+
export const arrayEnvelope = (item) => z.object({ data: z.array(item) });
|
|
5
|
+
export const successEnvelope = z.object({ success: z.boolean() });
|
|
6
|
+
export const importCustomerPortalBookingParticipantsSchema = importCustomerPortalBookingTravelersSchema;
|
|
7
|
+
export const importCustomerPortalBookingParticipantsResultSchema = importCustomerPortalBookingTravelersResultSchema;
|
|
8
|
+
export { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, createCustomerPortalProfileDocumentSchema, customerPortalBookingBillingContactSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingSummarySchema, customerPortalCompanionSchema, customerPortalContactExistsResultSchema, customerPortalPhoneContactExistsResultSchema, customerPortalProfileDocumentSchema, customerPortalProfileSchema, importCustomerPortalBookingTravelersResultSchema, importCustomerPortalBookingTravelersSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileDocumentSchema, updateCustomerPortalProfileSchema, };
|
|
9
|
+
export const customerPortalProfileResponseSchema = singleEnvelope(customerPortalProfileSchema);
|
|
10
|
+
export const customerPortalBootstrapResponseSchema = singleEnvelope(bootstrapCustomerPortalResultSchema);
|
|
11
|
+
export const customerPortalCompanionsResponseSchema = arrayEnvelope(customerPortalCompanionSchema);
|
|
12
|
+
export const customerPortalCompanionResponseSchema = singleEnvelope(customerPortalCompanionSchema);
|
|
13
|
+
export const customerPortalCompanionImportResponseSchema = singleEnvelope(importCustomerPortalBookingTravelersResultSchema);
|
|
14
|
+
export const customerPortalBookingsResponseSchema = arrayEnvelope(customerPortalBookingSummarySchema);
|
|
15
|
+
export const customerPortalBookingResponseSchema = singleEnvelope(customerPortalBookingDetailSchema);
|
|
16
|
+
export const customerPortalBookingBillingContactResponseSchema = singleEnvelope(customerPortalBookingBillingContactSchema);
|
|
17
|
+
export const customerPortalBookingDocumentsResponseSchema = arrayEnvelope(customerPortalBookingDocumentSchema);
|
|
18
|
+
export const customerPortalProfileDocumentsResponseSchema = arrayEnvelope(customerPortalProfileDocumentSchema);
|
|
19
|
+
export const customerPortalProfileDocumentResponseSchema = singleEnvelope(customerPortalProfileDocumentSchema);
|
|
20
|
+
export const customerPortalContactExistsResponseSchema = singleEnvelope(customerPortalContactExistsResultSchema);
|
|
21
|
+
export const customerPortalPhoneContactExistsResponseSchema = singleEnvelope(customerPortalPhoneContactExistsResultSchema);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { type UseAdminStorefrontSettingsOptions, useAdminStorefrontSettings, useAdminStorefrontSettingsMutation, } from "./use-admin-storefront-settings.js";
|
|
2
|
+
export { type UseStorefrontDepartureOptions, useStorefrontDeparture, } from "./use-storefront-departure.js";
|
|
3
|
+
export { type UseStorefrontDepartureItineraryOptions, useStorefrontDepartureItinerary, } from "./use-storefront-departure-itinerary.js";
|
|
4
|
+
export { useStorefrontDeparturePricePreviewMutation } from "./use-storefront-departure-price-preview-mutation.js";
|
|
5
|
+
export { type UseStorefrontOfferOptions, useStorefrontOffer } from "./use-storefront-offer.js";
|
|
6
|
+
export { useStorefrontOfferApplyMutation } from "./use-storefront-offer-apply-mutation.js";
|
|
7
|
+
export { useStorefrontOfferRedeemMutation } from "./use-storefront-offer-redeem-mutation.js";
|
|
8
|
+
export { type UseStorefrontProductDeparturesOptions, useStorefrontProductDepartures, } from "./use-storefront-product-departures.js";
|
|
9
|
+
export { type UseStorefrontProductExtensionsOptions, useStorefrontProductExtensions, } from "./use-storefront-product-extensions.js";
|
|
10
|
+
export { type UseStorefrontProductOffersOptions, useStorefrontProductOffers, } from "./use-storefront-product-offers.js";
|
|
11
|
+
export { type UseStorefrontSettingsOptions, useStorefrontSettings, } from "./use-storefront-settings.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iCAAiC,EACtC,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,KAAK,6BAA6B,EAClC,sBAAsB,GACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,KAAK,sCAAsC,EAC3C,+BAA+B,GAChC,MAAM,yCAAyC,CAAA;AAChD,OAAO,EAAE,0CAA0C,EAAE,MAAM,sDAAsD,CAAA;AACjH,OAAO,EAAE,KAAK,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9F,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAA;AAC5F,OAAO,EACL,KAAK,qCAAqC,EAC1C,8BAA8B,GAC/B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EACL,KAAK,qCAAqC,EAC1C,8BAA8B,GAC/B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EACL,KAAK,iCAAiC,EACtC,0BAA0B,GAC3B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,KAAK,4BAA4B,EACjC,qBAAqB,GACtB,MAAM,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { useAdminStorefrontSettings, useAdminStorefrontSettingsMutation, } from "./use-admin-storefront-settings.js";
|
|
2
|
+
export { useStorefrontDeparture, } from "./use-storefront-departure.js";
|
|
3
|
+
export { useStorefrontDepartureItinerary, } from "./use-storefront-departure-itinerary.js";
|
|
4
|
+
export { useStorefrontDeparturePricePreviewMutation } from "./use-storefront-departure-price-preview-mutation.js";
|
|
5
|
+
export { useStorefrontOffer } from "./use-storefront-offer.js";
|
|
6
|
+
export { useStorefrontOfferApplyMutation } from "./use-storefront-offer-apply-mutation.js";
|
|
7
|
+
export { useStorefrontOfferRedeemMutation } from "./use-storefront-offer-redeem-mutation.js";
|
|
8
|
+
export { useStorefrontProductDepartures, } from "./use-storefront-product-departures.js";
|
|
9
|
+
export { useStorefrontProductExtensions, } from "./use-storefront-product-extensions.js";
|
|
10
|
+
export { useStorefrontProductOffers, } from "./use-storefront-product-offers.js";
|
|
11
|
+
export { useStorefrontSettings, } from "./use-storefront-settings.js";
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
export interface UseAdminStorefrontSettingsOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useAdminStorefrontSettings(options?: UseAdminStorefrontSettingsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
branding: {
|
|
7
|
+
logoUrl: string | null;
|
|
8
|
+
faviconUrl: string | null;
|
|
9
|
+
brandMarkUrl: string | null;
|
|
10
|
+
primaryColor: string | null;
|
|
11
|
+
accentColor: string | null;
|
|
12
|
+
supportedLanguages: string[];
|
|
13
|
+
};
|
|
14
|
+
support: {
|
|
15
|
+
email: string | null;
|
|
16
|
+
phone: string | null;
|
|
17
|
+
links: {
|
|
18
|
+
label: string;
|
|
19
|
+
url: string;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
legal: {
|
|
23
|
+
termsUrl: string | null;
|
|
24
|
+
privacyUrl: string | null;
|
|
25
|
+
cancellationUrl: string | null;
|
|
26
|
+
defaultContractTemplateId: string | null;
|
|
27
|
+
};
|
|
28
|
+
localization: {
|
|
29
|
+
defaultLocale: string | null;
|
|
30
|
+
currencyDisplay: "symbol" | "name" | "code";
|
|
31
|
+
};
|
|
32
|
+
forms: {
|
|
33
|
+
billing: {
|
|
34
|
+
fields: {
|
|
35
|
+
key: string;
|
|
36
|
+
label: string;
|
|
37
|
+
type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
|
|
38
|
+
required: boolean;
|
|
39
|
+
placeholder: string | null;
|
|
40
|
+
description: string | null;
|
|
41
|
+
autocomplete: string | null;
|
|
42
|
+
options: {
|
|
43
|
+
value: string;
|
|
44
|
+
label: string;
|
|
45
|
+
}[];
|
|
46
|
+
}[];
|
|
47
|
+
};
|
|
48
|
+
travelers: {
|
|
49
|
+
fields: {
|
|
50
|
+
key: string;
|
|
51
|
+
label: string;
|
|
52
|
+
type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
|
|
53
|
+
required: boolean;
|
|
54
|
+
placeholder: string | null;
|
|
55
|
+
description: string | null;
|
|
56
|
+
autocomplete: string | null;
|
|
57
|
+
options: {
|
|
58
|
+
value: string;
|
|
59
|
+
label: string;
|
|
60
|
+
}[];
|
|
61
|
+
}[];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
payment: {
|
|
65
|
+
defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
|
|
66
|
+
methods: {
|
|
67
|
+
code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
|
|
68
|
+
label: string;
|
|
69
|
+
description: string | null;
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
}[];
|
|
72
|
+
structure: "split" | "full";
|
|
73
|
+
schedule: {
|
|
74
|
+
percent: number;
|
|
75
|
+
dueInDays: number;
|
|
76
|
+
dueCondition: "after_booking" | "before_departure";
|
|
77
|
+
}[];
|
|
78
|
+
defaultSchedule: {
|
|
79
|
+
depositPercent: number | null;
|
|
80
|
+
balanceDueDaysBeforeDeparture: number | null;
|
|
81
|
+
} | null;
|
|
82
|
+
bankTransfer: {
|
|
83
|
+
dueDays: number | null;
|
|
84
|
+
account: {
|
|
85
|
+
provider: string | null;
|
|
86
|
+
currency: string | null;
|
|
87
|
+
iban: string;
|
|
88
|
+
beneficiary: string;
|
|
89
|
+
bank: string;
|
|
90
|
+
} | null;
|
|
91
|
+
accountHolder: string | null;
|
|
92
|
+
bankName: string | null;
|
|
93
|
+
iban: string | null;
|
|
94
|
+
bic: string | null;
|
|
95
|
+
paymentReference: string | null;
|
|
96
|
+
instructions: string | null;
|
|
97
|
+
} | null;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}, Error>;
|
|
101
|
+
export declare function useAdminStorefrontSettingsMutation(): import("@tanstack/react-query").UseMutationResult<{
|
|
102
|
+
branding: {
|
|
103
|
+
logoUrl: string | null;
|
|
104
|
+
faviconUrl: string | null;
|
|
105
|
+
brandMarkUrl: string | null;
|
|
106
|
+
primaryColor: string | null;
|
|
107
|
+
accentColor: string | null;
|
|
108
|
+
supportedLanguages: string[];
|
|
109
|
+
};
|
|
110
|
+
support: {
|
|
111
|
+
email: string | null;
|
|
112
|
+
phone: string | null;
|
|
113
|
+
links: {
|
|
114
|
+
label: string;
|
|
115
|
+
url: string;
|
|
116
|
+
}[];
|
|
117
|
+
};
|
|
118
|
+
legal: {
|
|
119
|
+
termsUrl: string | null;
|
|
120
|
+
privacyUrl: string | null;
|
|
121
|
+
cancellationUrl: string | null;
|
|
122
|
+
defaultContractTemplateId: string | null;
|
|
123
|
+
};
|
|
124
|
+
localization: {
|
|
125
|
+
defaultLocale: string | null;
|
|
126
|
+
currencyDisplay: "symbol" | "name" | "code";
|
|
127
|
+
};
|
|
128
|
+
forms: {
|
|
129
|
+
billing: {
|
|
130
|
+
fields: {
|
|
131
|
+
key: string;
|
|
132
|
+
label: string;
|
|
133
|
+
type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
|
|
134
|
+
required: boolean;
|
|
135
|
+
placeholder: string | null;
|
|
136
|
+
description: string | null;
|
|
137
|
+
autocomplete: string | null;
|
|
138
|
+
options: {
|
|
139
|
+
value: string;
|
|
140
|
+
label: string;
|
|
141
|
+
}[];
|
|
142
|
+
}[];
|
|
143
|
+
};
|
|
144
|
+
travelers: {
|
|
145
|
+
fields: {
|
|
146
|
+
key: string;
|
|
147
|
+
label: string;
|
|
148
|
+
type: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country";
|
|
149
|
+
required: boolean;
|
|
150
|
+
placeholder: string | null;
|
|
151
|
+
description: string | null;
|
|
152
|
+
autocomplete: string | null;
|
|
153
|
+
options: {
|
|
154
|
+
value: string;
|
|
155
|
+
label: string;
|
|
156
|
+
}[];
|
|
157
|
+
}[];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
payment: {
|
|
161
|
+
defaultMethod: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null;
|
|
162
|
+
methods: {
|
|
163
|
+
code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
|
|
164
|
+
label: string;
|
|
165
|
+
description: string | null;
|
|
166
|
+
enabled: boolean;
|
|
167
|
+
}[];
|
|
168
|
+
structure: "split" | "full";
|
|
169
|
+
schedule: {
|
|
170
|
+
percent: number;
|
|
171
|
+
dueInDays: number;
|
|
172
|
+
dueCondition: "after_booking" | "before_departure";
|
|
173
|
+
}[];
|
|
174
|
+
defaultSchedule: {
|
|
175
|
+
depositPercent: number | null;
|
|
176
|
+
balanceDueDaysBeforeDeparture: number | null;
|
|
177
|
+
} | null;
|
|
178
|
+
bankTransfer: {
|
|
179
|
+
dueDays: number | null;
|
|
180
|
+
account: {
|
|
181
|
+
provider: string | null;
|
|
182
|
+
currency: string | null;
|
|
183
|
+
iban: string;
|
|
184
|
+
beneficiary: string;
|
|
185
|
+
bank: string;
|
|
186
|
+
} | null;
|
|
187
|
+
accountHolder: string | null;
|
|
188
|
+
bankName: string | null;
|
|
189
|
+
iban: string | null;
|
|
190
|
+
bic: string | null;
|
|
191
|
+
paymentReference: string | null;
|
|
192
|
+
instructions: string | null;
|
|
193
|
+
} | null;
|
|
194
|
+
};
|
|
195
|
+
}, Error, {
|
|
196
|
+
branding?: {
|
|
197
|
+
logoUrl?: string | null | undefined;
|
|
198
|
+
faviconUrl?: string | null | undefined;
|
|
199
|
+
brandMarkUrl?: string | null | undefined;
|
|
200
|
+
primaryColor?: string | null | undefined;
|
|
201
|
+
accentColor?: string | null | undefined;
|
|
202
|
+
supportedLanguages?: string[] | undefined;
|
|
203
|
+
} | undefined;
|
|
204
|
+
support?: {
|
|
205
|
+
email?: string | null | undefined;
|
|
206
|
+
phone?: string | null | undefined;
|
|
207
|
+
links?: {
|
|
208
|
+
label: string;
|
|
209
|
+
url: string;
|
|
210
|
+
}[] | undefined;
|
|
211
|
+
} | undefined;
|
|
212
|
+
legal?: {
|
|
213
|
+
termsUrl?: string | null | undefined;
|
|
214
|
+
privacyUrl?: string | null | undefined;
|
|
215
|
+
cancellationUrl?: string | null | undefined;
|
|
216
|
+
defaultContractTemplateId?: string | null | undefined;
|
|
217
|
+
} | undefined;
|
|
218
|
+
localization?: {
|
|
219
|
+
defaultLocale?: string | null | undefined;
|
|
220
|
+
currencyDisplay?: "symbol" | "name" | "code" | undefined;
|
|
221
|
+
} | undefined;
|
|
222
|
+
forms?: {
|
|
223
|
+
billing?: {
|
|
224
|
+
fields?: {
|
|
225
|
+
key: string;
|
|
226
|
+
label: string;
|
|
227
|
+
type?: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country" | undefined;
|
|
228
|
+
required?: boolean | undefined;
|
|
229
|
+
placeholder?: string | null | undefined;
|
|
230
|
+
description?: string | null | undefined;
|
|
231
|
+
autocomplete?: string | null | undefined;
|
|
232
|
+
options?: {
|
|
233
|
+
value: string;
|
|
234
|
+
label: string;
|
|
235
|
+
}[] | undefined;
|
|
236
|
+
}[] | undefined;
|
|
237
|
+
} | undefined;
|
|
238
|
+
travelers?: {
|
|
239
|
+
fields?: {
|
|
240
|
+
key: string;
|
|
241
|
+
label: string;
|
|
242
|
+
type?: "select" | "textarea" | "text" | "date" | "email" | "tel" | "checkbox" | "country" | undefined;
|
|
243
|
+
required?: boolean | undefined;
|
|
244
|
+
placeholder?: string | null | undefined;
|
|
245
|
+
description?: string | null | undefined;
|
|
246
|
+
autocomplete?: string | null | undefined;
|
|
247
|
+
options?: {
|
|
248
|
+
value: string;
|
|
249
|
+
label: string;
|
|
250
|
+
}[] | undefined;
|
|
251
|
+
}[] | undefined;
|
|
252
|
+
} | undefined;
|
|
253
|
+
} | undefined;
|
|
254
|
+
payment?: {
|
|
255
|
+
defaultMethod?: "card" | "bank_transfer" | "cash" | "voucher" | "invoice" | null | undefined;
|
|
256
|
+
methods?: {
|
|
257
|
+
code: "card" | "bank_transfer" | "cash" | "voucher" | "invoice";
|
|
258
|
+
label?: string | undefined;
|
|
259
|
+
description?: string | null | undefined;
|
|
260
|
+
enabled?: boolean | undefined;
|
|
261
|
+
}[] | undefined;
|
|
262
|
+
structure?: "split" | "full" | undefined;
|
|
263
|
+
schedule?: {
|
|
264
|
+
percent: number;
|
|
265
|
+
dueInDays: number;
|
|
266
|
+
dueCondition: "after_booking" | "before_departure";
|
|
267
|
+
}[] | undefined;
|
|
268
|
+
defaultSchedule?: {
|
|
269
|
+
depositPercent?: number | null | undefined;
|
|
270
|
+
balanceDueDaysBeforeDeparture?: number | null | undefined;
|
|
271
|
+
} | null | undefined;
|
|
272
|
+
bankTransfer?: {
|
|
273
|
+
dueDays?: number | null | undefined;
|
|
274
|
+
account?: {
|
|
275
|
+
iban: string;
|
|
276
|
+
beneficiary: string;
|
|
277
|
+
bank: string;
|
|
278
|
+
provider?: string | null | undefined;
|
|
279
|
+
currency?: string | null | undefined;
|
|
280
|
+
} | null | undefined;
|
|
281
|
+
accountHolder?: string | null | undefined;
|
|
282
|
+
bankName?: string | null | undefined;
|
|
283
|
+
iban?: string | null | undefined;
|
|
284
|
+
bic?: string | null | undefined;
|
|
285
|
+
paymentReference?: string | null | undefined;
|
|
286
|
+
instructions?: string | null | undefined;
|
|
287
|
+
} | null | undefined;
|
|
288
|
+
} | undefined;
|
|
289
|
+
}, unknown>;
|
|
290
|
+
//# sourceMappingURL=use-admin-storefront-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-admin-storefront-settings.d.ts","sourceRoot":"","sources":["../../src/hooks/use-admin-storefront-settings.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,iCAAiC;IAChD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,iCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQzF;AAED,wBAAgB,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAejD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { updateAdminStorefrontSettings } from "../operations.js";
|
|
4
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
5
|
+
import { storefrontQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { getAdminStorefrontSettingsQueryOptions } from "../query-options.js";
|
|
7
|
+
export function useAdminStorefrontSettings(options = {}) {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return useQuery({
|
|
11
|
+
...getAdminStorefrontSettingsQueryOptions({ baseUrl, fetcher }),
|
|
12
|
+
enabled,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export function useAdminStorefrontSettingsMutation() {
|
|
16
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
17
|
+
const queryClient = useQueryClient();
|
|
18
|
+
return useMutation({
|
|
19
|
+
mutationFn: async (input) => {
|
|
20
|
+
const { data } = await updateAdminStorefrontSettings({ baseUrl, fetcher }, input);
|
|
21
|
+
return data;
|
|
22
|
+
},
|
|
23
|
+
onSuccess: (data) => {
|
|
24
|
+
queryClient.setQueryData(storefrontQueryKeys.adminSettings(), { data });
|
|
25
|
+
void queryClient.invalidateQueries({ queryKey: storefrontQueryKeys.adminSettings() });
|
|
26
|
+
void queryClient.invalidateQueries({ queryKey: storefrontQueryKeys.settings() });
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface UseStorefrontDepartureItineraryOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useStorefrontDepartureItinerary(productId: string | null | undefined, departureId: string | null | undefined, options?: UseStorefrontDepartureItineraryOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
itineraryId: string;
|
|
8
|
+
days: {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string | null;
|
|
12
|
+
thumbnail: {
|
|
13
|
+
url: string;
|
|
14
|
+
} | null;
|
|
15
|
+
segments: {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description: string | null;
|
|
19
|
+
}[];
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
}, Error>;
|
|
23
|
+
//# sourceMappingURL=use-storefront-departure-itinerary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-departure-itinerary.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-departure-itinerary.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,sCAAsC;IACrD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,GAAE,sCAA2C;;;;;;;;;;;;;;;;;;UAarD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
4
|
+
import { getStorefrontDepartureItineraryQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useStorefrontDepartureItinerary(productId, departureId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getStorefrontDepartureItineraryQueryOptions({ baseUrl, fetcher }, productId ?? "", departureId ?? ""),
|
|
10
|
+
enabled: enabled && Boolean(productId) && Boolean(departureId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
export declare function useStorefrontDeparturePricePreviewMutation(departureId: string | null | undefined): import("@tanstack/react-query").UseMutationResult<{
|
|
2
|
+
data: {
|
|
3
|
+
departureId: string;
|
|
4
|
+
productId: string;
|
|
5
|
+
optionId: string | null;
|
|
6
|
+
currencyCode: string;
|
|
7
|
+
basePrice: number;
|
|
8
|
+
taxAmount: number;
|
|
9
|
+
total: number;
|
|
10
|
+
notes: string | null;
|
|
11
|
+
lineItems: {
|
|
12
|
+
name: string;
|
|
13
|
+
total: number;
|
|
14
|
+
quantity: number;
|
|
15
|
+
unitPrice: number;
|
|
16
|
+
}[];
|
|
17
|
+
allocation: {
|
|
18
|
+
slot: {
|
|
19
|
+
id: string;
|
|
20
|
+
productId: string;
|
|
21
|
+
optionId: string | null;
|
|
22
|
+
dateLocal: string | null;
|
|
23
|
+
startAt: string | null;
|
|
24
|
+
endAt: string | null;
|
|
25
|
+
timezone: string;
|
|
26
|
+
status: "cancelled" | "on_request" | "open" | "closed" | "sold_out";
|
|
27
|
+
availabilityState: "cancelled" | "available" | "unavailable" | "on_request" | "closed" | "sold_out" | "past_cutoff" | "too_early";
|
|
28
|
+
capacity: number | null;
|
|
29
|
+
remaining: number | null;
|
|
30
|
+
pastCutoff: boolean;
|
|
31
|
+
tooEarly: boolean;
|
|
32
|
+
};
|
|
33
|
+
pax: {
|
|
34
|
+
adults: number;
|
|
35
|
+
children: number;
|
|
36
|
+
infants: number;
|
|
37
|
+
total: number;
|
|
38
|
+
};
|
|
39
|
+
requestedUnits: {
|
|
40
|
+
unitId: string | null;
|
|
41
|
+
requestRef: string | null;
|
|
42
|
+
name: string;
|
|
43
|
+
unitType: string | null;
|
|
44
|
+
quantity: number;
|
|
45
|
+
pricingMode: string | null;
|
|
46
|
+
unitPrice: number;
|
|
47
|
+
total: number;
|
|
48
|
+
currencyCode: string;
|
|
49
|
+
tierId: string | null;
|
|
50
|
+
}[];
|
|
51
|
+
rooms: {
|
|
52
|
+
unitId: string;
|
|
53
|
+
name: string;
|
|
54
|
+
occupancy: number;
|
|
55
|
+
quantity: number;
|
|
56
|
+
pax: number;
|
|
57
|
+
pricingMode: string | null;
|
|
58
|
+
unitPrice: number;
|
|
59
|
+
total: number;
|
|
60
|
+
currencyCode: string;
|
|
61
|
+
tierId: string | null;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
units: {
|
|
65
|
+
unitId: string | null;
|
|
66
|
+
requestRef: string | null;
|
|
67
|
+
name: string;
|
|
68
|
+
unitType: string | null;
|
|
69
|
+
quantity: number;
|
|
70
|
+
pricingMode: string | null;
|
|
71
|
+
unitPrice: number;
|
|
72
|
+
total: number;
|
|
73
|
+
currencyCode: string;
|
|
74
|
+
tierId: string | null;
|
|
75
|
+
}[];
|
|
76
|
+
rooms: {
|
|
77
|
+
unitId: string;
|
|
78
|
+
name: string;
|
|
79
|
+
occupancy: number;
|
|
80
|
+
quantity: number;
|
|
81
|
+
pax: number;
|
|
82
|
+
pricingMode: string | null;
|
|
83
|
+
unitPrice: number;
|
|
84
|
+
total: number;
|
|
85
|
+
currencyCode: string;
|
|
86
|
+
tierId: string | null;
|
|
87
|
+
}[];
|
|
88
|
+
extras: {
|
|
89
|
+
extraId: string;
|
|
90
|
+
name: string;
|
|
91
|
+
required: boolean;
|
|
92
|
+
selectable: boolean;
|
|
93
|
+
selected: boolean;
|
|
94
|
+
pricingMode: "included" | "per_person" | "per_booking" | "quantity_based" | "on_request" | "free";
|
|
95
|
+
quantity: number;
|
|
96
|
+
unitPrice: number;
|
|
97
|
+
total: number;
|
|
98
|
+
currencyCode: string;
|
|
99
|
+
}[];
|
|
100
|
+
offers: {
|
|
101
|
+
available: {
|
|
102
|
+
offer: {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
slug: string | null;
|
|
106
|
+
description: string | null;
|
|
107
|
+
discountType: "percentage" | "fixed_amount";
|
|
108
|
+
discountValue: string;
|
|
109
|
+
currency: string | null;
|
|
110
|
+
applicableProductIds: string[];
|
|
111
|
+
applicableDepartureIds: string[];
|
|
112
|
+
validFrom: string | null;
|
|
113
|
+
validTo: string | null;
|
|
114
|
+
minTravelers: number | null;
|
|
115
|
+
imageMobileUrl: string | null;
|
|
116
|
+
imageDesktopUrl: string | null;
|
|
117
|
+
stackable: boolean;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
updatedAt: string;
|
|
120
|
+
};
|
|
121
|
+
status: "applied" | "not_applicable" | "conflict";
|
|
122
|
+
reason: "currency" | "conflict" | "min_pax" | "eligibility" | "no_discount" | null;
|
|
123
|
+
selected: boolean;
|
|
124
|
+
discountAppliedCents: number;
|
|
125
|
+
discountedPriceCents: number;
|
|
126
|
+
}[];
|
|
127
|
+
requested: {
|
|
128
|
+
kind: "code" | "slug";
|
|
129
|
+
value: string;
|
|
130
|
+
result: {
|
|
131
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
132
|
+
reason: "currency" | "scope" | "conflict" | "min_pax" | "eligibility" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "booking_mismatch" | "session_mismatch" | null;
|
|
133
|
+
offer: {
|
|
134
|
+
id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
slug: string | null;
|
|
137
|
+
description: string | null;
|
|
138
|
+
discountType: "percentage" | "fixed_amount";
|
|
139
|
+
discountValue: string;
|
|
140
|
+
currency: string | null;
|
|
141
|
+
applicableProductIds: string[];
|
|
142
|
+
applicableDepartureIds: string[];
|
|
143
|
+
validFrom: string | null;
|
|
144
|
+
validTo: string | null;
|
|
145
|
+
minTravelers: number | null;
|
|
146
|
+
imageMobileUrl: string | null;
|
|
147
|
+
imageDesktopUrl: string | null;
|
|
148
|
+
stackable: boolean;
|
|
149
|
+
createdAt: string;
|
|
150
|
+
updatedAt: string;
|
|
151
|
+
} | null;
|
|
152
|
+
target: {
|
|
153
|
+
bookingId: string | null;
|
|
154
|
+
sessionId: string | null;
|
|
155
|
+
productId: string;
|
|
156
|
+
departureId: string | null;
|
|
157
|
+
};
|
|
158
|
+
pricing: {
|
|
159
|
+
basePriceCents: number;
|
|
160
|
+
currency: string;
|
|
161
|
+
discountAppliedCents: number;
|
|
162
|
+
discountedPriceCents: number;
|
|
163
|
+
};
|
|
164
|
+
appliedOffers: {
|
|
165
|
+
offerId: string;
|
|
166
|
+
offerName: string;
|
|
167
|
+
discountAppliedCents: number;
|
|
168
|
+
discountedPriceCents: number;
|
|
169
|
+
currency: string;
|
|
170
|
+
discountKind: "percentage" | "fixed_amount";
|
|
171
|
+
discountPercent: number | null;
|
|
172
|
+
discountAmountCents: number | null;
|
|
173
|
+
appliedCode: string | null;
|
|
174
|
+
stackable: boolean;
|
|
175
|
+
}[];
|
|
176
|
+
conflict: {
|
|
177
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
178
|
+
autoAppliedOfferIds: string[];
|
|
179
|
+
manualOfferId: string | null;
|
|
180
|
+
selectedOfferIds: string[];
|
|
181
|
+
message: string;
|
|
182
|
+
} | null;
|
|
183
|
+
} | null;
|
|
184
|
+
}[];
|
|
185
|
+
applied: {
|
|
186
|
+
offerId: string;
|
|
187
|
+
offerName: string;
|
|
188
|
+
discountAppliedCents: number;
|
|
189
|
+
discountedPriceCents: number;
|
|
190
|
+
currency: string;
|
|
191
|
+
discountKind: "percentage" | "fixed_amount";
|
|
192
|
+
discountPercent: number | null;
|
|
193
|
+
discountAmountCents: number | null;
|
|
194
|
+
appliedCode: string | null;
|
|
195
|
+
stackable: boolean;
|
|
196
|
+
}[];
|
|
197
|
+
conflict: {
|
|
198
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
199
|
+
autoAppliedOfferIds: string[];
|
|
200
|
+
manualOfferId: string | null;
|
|
201
|
+
selectedOfferIds: string[];
|
|
202
|
+
message: string;
|
|
203
|
+
} | null;
|
|
204
|
+
discountTotal: number;
|
|
205
|
+
discountTotalCents: number;
|
|
206
|
+
totalAfterDiscount: number;
|
|
207
|
+
currencyCode: string;
|
|
208
|
+
};
|
|
209
|
+
totals: {
|
|
210
|
+
currencyCode: string;
|
|
211
|
+
base: number;
|
|
212
|
+
extras: number;
|
|
213
|
+
subtotal: number;
|
|
214
|
+
discount: number;
|
|
215
|
+
tax: number;
|
|
216
|
+
total: number;
|
|
217
|
+
perPerson: number;
|
|
218
|
+
perBooking: number;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
}, Error, {
|
|
222
|
+
pax?: {
|
|
223
|
+
adults?: unknown;
|
|
224
|
+
children?: unknown;
|
|
225
|
+
infants?: unknown;
|
|
226
|
+
} | undefined;
|
|
227
|
+
currencyCode?: string | null | undefined;
|
|
228
|
+
rooms?: {
|
|
229
|
+
unitId: string;
|
|
230
|
+
occupancy?: unknown;
|
|
231
|
+
quantity?: unknown;
|
|
232
|
+
}[] | undefined;
|
|
233
|
+
extras?: {
|
|
234
|
+
extraId: string;
|
|
235
|
+
quantity?: unknown;
|
|
236
|
+
}[] | undefined;
|
|
237
|
+
offers?: {
|
|
238
|
+
slug: string;
|
|
239
|
+
}[] | undefined;
|
|
240
|
+
offerCode?: string | null | undefined;
|
|
241
|
+
locale?: string | undefined;
|
|
242
|
+
market?: string | undefined;
|
|
243
|
+
}, unknown>;
|
|
244
|
+
//# sourceMappingURL=use-storefront-departure-price-preview-mutation.d.ts.map
|