@voyantjs/storefront-react 0.47.0 → 0.50.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.
@@ -1,3 +1,4 @@
1
+ export { type UseAdminStorefrontSettingsOptions, useAdminStorefrontSettings, useAdminStorefrontSettingsMutation, } from "./use-admin-storefront-settings.js";
1
2
  export { type UseStorefrontDepartureOptions, useStorefrontDeparture, } from "./use-storefront-departure.js";
2
3
  export { type UseStorefrontDepartureItineraryOptions, useStorefrontDepartureItinerary, } from "./use-storefront-departure-itinerary.js";
3
4
  export { useStorefrontDeparturePricePreviewMutation } from "./use-storefront-departure-price-preview-mutation.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,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"}
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"}
@@ -1,3 +1,4 @@
1
+ export { useAdminStorefrontSettings, useAdminStorefrontSettingsMutation, } from "./use-admin-storefront-settings.js";
1
2
  export { useStorefrontDeparture, } from "./use-storefront-departure.js";
2
3
  export { useStorefrontDepartureItinerary, } from "./use-storefront-departure-itinerary.js";
3
4
  export { useStorefrontDeparturePricePreviewMutation } from "./use-storefront-departure-price-preview-mutation.js";
@@ -0,0 +1,248 @@
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: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
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: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
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: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
66
+ methods: {
67
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
68
+ label: string;
69
+ description: string | null;
70
+ enabled: boolean;
71
+ }[];
72
+ defaultSchedule: {
73
+ depositPercent: number | null;
74
+ balanceDueDaysBeforeDeparture: number | null;
75
+ } | null;
76
+ bankTransfer: {
77
+ accountHolder: string | null;
78
+ bankName: string | null;
79
+ iban: string | null;
80
+ bic: string | null;
81
+ paymentReference: string | null;
82
+ instructions: string | null;
83
+ } | null;
84
+ };
85
+ };
86
+ }, Error>;
87
+ export declare function useAdminStorefrontSettingsMutation(): import("@tanstack/react-query").UseMutationResult<{
88
+ branding: {
89
+ logoUrl: string | null;
90
+ faviconUrl: string | null;
91
+ brandMarkUrl: string | null;
92
+ primaryColor: string | null;
93
+ accentColor: string | null;
94
+ supportedLanguages: string[];
95
+ };
96
+ support: {
97
+ email: string | null;
98
+ phone: string | null;
99
+ links: {
100
+ label: string;
101
+ url: string;
102
+ }[];
103
+ };
104
+ legal: {
105
+ termsUrl: string | null;
106
+ privacyUrl: string | null;
107
+ cancellationUrl: string | null;
108
+ defaultContractTemplateId: string | null;
109
+ };
110
+ localization: {
111
+ defaultLocale: string | null;
112
+ currencyDisplay: "symbol" | "name" | "code";
113
+ };
114
+ forms: {
115
+ billing: {
116
+ fields: {
117
+ key: string;
118
+ label: string;
119
+ type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
120
+ required: boolean;
121
+ placeholder: string | null;
122
+ description: string | null;
123
+ autocomplete: string | null;
124
+ options: {
125
+ value: string;
126
+ label: string;
127
+ }[];
128
+ }[];
129
+ };
130
+ travelers: {
131
+ fields: {
132
+ key: string;
133
+ label: string;
134
+ type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
135
+ required: boolean;
136
+ placeholder: string | null;
137
+ description: string | null;
138
+ autocomplete: string | null;
139
+ options: {
140
+ value: string;
141
+ label: string;
142
+ }[];
143
+ }[];
144
+ };
145
+ };
146
+ payment: {
147
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
148
+ methods: {
149
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
150
+ label: string;
151
+ description: string | null;
152
+ enabled: boolean;
153
+ }[];
154
+ defaultSchedule: {
155
+ depositPercent: number | null;
156
+ balanceDueDaysBeforeDeparture: number | null;
157
+ } | null;
158
+ bankTransfer: {
159
+ accountHolder: string | null;
160
+ bankName: string | null;
161
+ iban: string | null;
162
+ bic: string | null;
163
+ paymentReference: string | null;
164
+ instructions: string | null;
165
+ } | null;
166
+ };
167
+ }, Error, {
168
+ branding?: {
169
+ logoUrl?: string | null | undefined;
170
+ faviconUrl?: string | null | undefined;
171
+ brandMarkUrl?: string | null | undefined;
172
+ primaryColor?: string | null | undefined;
173
+ accentColor?: string | null | undefined;
174
+ supportedLanguages?: string[] | undefined;
175
+ } | undefined;
176
+ support?: {
177
+ email?: string | null | undefined;
178
+ phone?: string | null | undefined;
179
+ links?: {
180
+ label: string;
181
+ url: string;
182
+ }[] | undefined;
183
+ } | undefined;
184
+ legal?: {
185
+ termsUrl?: string | null | undefined;
186
+ privacyUrl?: string | null | undefined;
187
+ cancellationUrl?: string | null | undefined;
188
+ defaultContractTemplateId?: string | null | undefined;
189
+ } | undefined;
190
+ localization?: {
191
+ defaultLocale?: string | null | undefined;
192
+ currencyDisplay?: "symbol" | "name" | "code" | undefined;
193
+ } | undefined;
194
+ forms?: {
195
+ billing?: {
196
+ fields?: {
197
+ key: string;
198
+ label: string;
199
+ type?: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox" | undefined;
200
+ required?: boolean | undefined;
201
+ placeholder?: string | null | undefined;
202
+ description?: string | null | undefined;
203
+ autocomplete?: string | null | undefined;
204
+ options?: {
205
+ value: string;
206
+ label: string;
207
+ }[] | undefined;
208
+ }[] | undefined;
209
+ } | undefined;
210
+ travelers?: {
211
+ fields?: {
212
+ key: string;
213
+ label: string;
214
+ type?: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox" | undefined;
215
+ required?: boolean | undefined;
216
+ placeholder?: string | null | undefined;
217
+ description?: string | null | undefined;
218
+ autocomplete?: string | null | undefined;
219
+ options?: {
220
+ value: string;
221
+ label: string;
222
+ }[] | undefined;
223
+ }[] | undefined;
224
+ } | undefined;
225
+ } | undefined;
226
+ payment?: {
227
+ defaultMethod?: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null | undefined;
228
+ methods?: {
229
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
230
+ label?: string | undefined;
231
+ description?: string | null | undefined;
232
+ enabled?: boolean | undefined;
233
+ }[] | undefined;
234
+ defaultSchedule?: {
235
+ depositPercent?: number | null | undefined;
236
+ balanceDueDaysBeforeDeparture?: number | null | undefined;
237
+ } | null | undefined;
238
+ bankTransfer?: {
239
+ accountHolder?: string | null | undefined;
240
+ bankName?: string | null | undefined;
241
+ iban?: string | null | undefined;
242
+ bic?: string | null | undefined;
243
+ paymentReference?: string | null | undefined;
244
+ instructions?: string | null | undefined;
245
+ } | null | undefined;
246
+ } | undefined;
247
+ }, unknown>;
248
+ //# 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
+ }
@@ -14,6 +14,209 @@ export declare function useStorefrontDeparturePricePreviewMutation(departureId:
14
14
  quantity: number;
15
15
  unitPrice: number;
16
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" | "open" | "closed" | "sold_out" | "on_request";
27
+ availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "on_request" | "unavailable" | "available";
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: "per_booking" | "free" | "included" | "on_request" | "per_person" | "quantity_based";
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" | "no_discount" | null;
123
+ selected: boolean;
124
+ discountAppliedCents: number;
125
+ discountedPriceCents: number;
126
+ }[];
127
+ requested: {
128
+ kind: "slug" | "code";
129
+ value: string;
130
+ result: {
131
+ status: "applied" | "not_applicable" | "conflict" | "invalid";
132
+ reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "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
+ };
17
220
  };
18
221
  }, Error, {
19
222
  pax?: {
@@ -31,5 +234,11 @@ export declare function useStorefrontDeparturePricePreviewMutation(departureId:
31
234
  extraId: string;
32
235
  quantity?: unknown;
33
236
  }[] | undefined;
237
+ offers?: {
238
+ slug: string;
239
+ }[] | undefined;
240
+ offerCode?: string | null | undefined;
241
+ locale?: string | undefined;
242
+ market?: string | undefined;
34
243
  }, unknown>;
35
244
  //# sourceMappingURL=use-storefront-departure-price-preview-mutation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-storefront-departure-price-preview-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-departure-price-preview-mutation.ts"],"names":[],"mappings":"AAQA,wBAAgB,0CAA0C,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAYhG"}
1
+ {"version":3,"file":"use-storefront-departure-price-preview-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-departure-price-preview-mutation.ts"],"names":[],"mappings":"AAQA,wBAAgB,0CAA0C,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAYhG"}
@@ -1,7 +1,7 @@
1
1
  export declare function useStorefrontOfferApplyMutation(slug: string | null | undefined): import("@tanstack/react-query").UseMutationResult<{
2
2
  data: {
3
- status: "not_applicable" | "applied" | "invalid" | "conflict";
4
- reason: "scope" | "currency" | "min_pax" | "conflict" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "no_discount" | "booking_mismatch" | "session_mismatch" | null;
3
+ status: "applied" | "not_applicable" | "conflict" | "invalid";
4
+ reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
5
5
  offer: {
6
6
  id: string;
7
7
  name: string;
@@ -1,7 +1,7 @@
1
1
  export declare function useStorefrontOfferRedeemMutation(): import("@tanstack/react-query").UseMutationResult<{
2
2
  data: {
3
- status: "not_applicable" | "applied" | "invalid" | "conflict";
4
- reason: "scope" | "currency" | "min_pax" | "conflict" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "no_discount" | "booking_mismatch" | "session_mismatch" | null;
3
+ status: "applied" | "not_applicable" | "conflict" | "invalid";
4
+ reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
5
5
  offer: {
6
6
  id: string;
7
7
  name: string;
@@ -14,7 +14,7 @@ export declare function useStorefrontProductExtensions(productId: string | null
14
14
  thumb: string | null;
15
15
  pricePerPerson: number | null;
16
16
  currencyCode: string;
17
- pricingMode: "included" | "per_person" | "per_booking" | "quantity_based" | "on_request" | "free";
17
+ pricingMode: "per_booking" | "free" | "included" | "on_request" | "per_person" | "quantity_based";
18
18
  defaultQuantity: number | null;
19
19
  minQuantity: number | null;
20
20
  maxQuantity: number | null;
@@ -30,7 +30,7 @@ export declare function useStorefrontProductExtensions(productId: string | null
30
30
  thumb: string | null;
31
31
  pricePerPerson: number | null;
32
32
  currencyCode: string;
33
- pricingMode: "included" | "per_person" | "per_booking" | "quantity_based" | "on_request" | "free";
33
+ pricingMode: "per_booking" | "free" | "included" | "on_request" | "per_person" | "quantity_based";
34
34
  defaultQuantity: number | null;
35
35
  minQuantity: number | null;
36
36
  maxQuantity: number | null;
@@ -5,17 +5,30 @@ export declare function useStorefrontSettings(options?: UseStorefrontSettingsOpt
5
5
  data: {
6
6
  branding: {
7
7
  logoUrl: string | null;
8
+ faviconUrl: string | null;
9
+ brandMarkUrl: string | null;
10
+ primaryColor: string | null;
11
+ accentColor: string | null;
8
12
  supportedLanguages: string[];
9
13
  };
10
14
  support: {
11
15
  email: string | null;
12
16
  phone: string | null;
17
+ links: {
18
+ label: string;
19
+ url: string;
20
+ }[];
13
21
  };
14
22
  legal: {
15
23
  termsUrl: string | null;
16
24
  privacyUrl: string | null;
25
+ cancellationUrl: string | null;
17
26
  defaultContractTemplateId: string | null;
18
27
  };
28
+ localization: {
29
+ defaultLocale: string | null;
30
+ currencyDisplay: "symbol" | "name" | "code";
31
+ };
19
32
  forms: {
20
33
  billing: {
21
34
  fields: {
@@ -49,13 +62,25 @@ export declare function useStorefrontSettings(options?: UseStorefrontSettingsOpt
49
62
  };
50
63
  };
51
64
  payment: {
52
- defaultMethod: "voucher" | "card" | "bank_transfer" | "cash" | "invoice" | null;
65
+ defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
53
66
  methods: {
54
- code: "voucher" | "card" | "bank_transfer" | "cash" | "invoice";
67
+ code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
55
68
  label: string;
56
69
  description: string | null;
57
70
  enabled: boolean;
58
71
  }[];
72
+ defaultSchedule: {
73
+ depositPercent: number | null;
74
+ balanceDueDaysBeforeDeparture: number | null;
75
+ } | null;
76
+ bankTransfer: {
77
+ accountHolder: string | null;
78
+ bankName: string | null;
79
+ iban: string | null;
80
+ bic: string | null;
81
+ paymentReference: string | null;
82
+ instructions: string | null;
83
+ } | null;
59
84
  };
60
85
  };
61
86
  }, Error>;
@@ -1 +1 @@
1
- {"version":3,"file":"use-storefront-settings.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-settings.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,4BAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQ/E"}
1
+ {"version":3,"file":"use-storefront-settings.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-settings.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,4BAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQ/E"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, withQueryParams, } from "./client.js";
2
2
  export * from "./hooks/index.js";
3
- export { applyStorefrontOffer, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontSettings, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewStorefrontDeparturePrice, redeemStorefrontOffer, } from "./operations.js";
3
+ export { applyStorefrontOffer, getAdminStorefrontSettings, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontSettings, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewStorefrontDeparturePrice, redeemStorefrontOffer, updateAdminStorefrontSettings, } from "./operations.js";
4
4
  export { useVoyantStorefrontContext, type VoyantStorefrontContextValue, VoyantStorefrontProvider, type VoyantStorefrontProviderProps, } from "./provider.js";
5
5
  export { storefrontQueryKeys } from "./query-keys.js";
6
- export { getStorefrontDepartureItineraryQueryOptions, getStorefrontDepartureQueryOptions, getStorefrontOfferQueryOptions, getStorefrontProductDeparturesQueryOptions, getStorefrontProductExtensionsQueryOptions, getStorefrontProductOffersQueryOptions, getStorefrontSettingsQueryOptions, } from "./query-options.js";
6
+ export { getAdminStorefrontSettingsQueryOptions, getStorefrontDepartureItineraryQueryOptions, getStorefrontDepartureQueryOptions, getStorefrontOfferQueryOptions, getStorefrontProductDeparturesQueryOptions, getStorefrontProductExtensionsQueryOptions, getStorefrontProductOffersQueryOptions, getStorefrontSettingsQueryOptions, } from "./query-options.js";
7
7
  export * from "./schemas.js";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,qBAAqB,EACrB,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,+BAA+B,EAC/B,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,0BAA0B,EAC1B,KAAK,4BAA4B,EACjC,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EACL,2CAA2C,EAC3C,kCAAkC,EAClC,8BAA8B,EAC9B,0CAA0C,EAC1C,0CAA0C,EAC1C,sCAAsC,EACtC,iCAAiC,GAClC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,qBAAqB,EACrB,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,+BAA+B,EAC/B,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,0BAA0B,EAC1B,KAAK,4BAA4B,EACjC,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EACL,sCAAsC,EACtC,2CAA2C,EAC3C,kCAAkC,EAClC,8BAA8B,EAC9B,0CAA0C,EAC1C,0CAA0C,EAC1C,sCAAsC,EACtC,iCAAiC,GAClC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}