@voyantjs/storefront-react 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +78 -0
- package/dist/hooks/index.d.ts +9 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +8 -0
- package/dist/hooks/use-storefront-departure-itinerary.d.ts +22 -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 +35 -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.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 +62 -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/operations.d.ts +278 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +28 -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 +31 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +14 -0
- package/dist/query-options.d.ts +1096 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +46 -0
- package/dist/schemas.d.ts +244 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +11 -0
- package/package.json +79 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { type FetchWithValidationOptions } from "./client.js";
|
|
2
|
+
import { type StorefrontDepartureListQuery, type StorefrontDeparturePricePreviewInput, type StorefrontProductExtensionsQuery, type StorefrontPromotionalOfferListQuery } from "./schemas.js";
|
|
3
|
+
export declare function getStorefrontSettings(client: FetchWithValidationOptions): Promise<{
|
|
4
|
+
data: {
|
|
5
|
+
branding: {
|
|
6
|
+
logoUrl: string | null;
|
|
7
|
+
supportedLanguages: string[];
|
|
8
|
+
};
|
|
9
|
+
support: {
|
|
10
|
+
email: string | null;
|
|
11
|
+
phone: string | null;
|
|
12
|
+
};
|
|
13
|
+
legal: {
|
|
14
|
+
termsUrl: string | null;
|
|
15
|
+
privacyUrl: string | null;
|
|
16
|
+
defaultContractTemplateId: string | null;
|
|
17
|
+
};
|
|
18
|
+
forms: {
|
|
19
|
+
billing: {
|
|
20
|
+
fields: {
|
|
21
|
+
key: string;
|
|
22
|
+
label: string;
|
|
23
|
+
type: "date" | "select" | "email" | "country" | "text" | "tel" | "textarea" | "checkbox";
|
|
24
|
+
required: boolean;
|
|
25
|
+
placeholder: string | null;
|
|
26
|
+
description: string | null;
|
|
27
|
+
autocomplete: string | null;
|
|
28
|
+
options: {
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
}[];
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
passengers: {
|
|
35
|
+
fields: {
|
|
36
|
+
key: string;
|
|
37
|
+
label: string;
|
|
38
|
+
type: "date" | "select" | "email" | "country" | "text" | "tel" | "textarea" | "checkbox";
|
|
39
|
+
required: boolean;
|
|
40
|
+
placeholder: string | null;
|
|
41
|
+
description: string | null;
|
|
42
|
+
autocomplete: string | null;
|
|
43
|
+
options: {
|
|
44
|
+
value: string;
|
|
45
|
+
label: string;
|
|
46
|
+
}[];
|
|
47
|
+
}[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
payment: {
|
|
51
|
+
defaultMethod: "voucher" | "card" | "bank_transfer" | "cash" | "invoice" | null;
|
|
52
|
+
methods: {
|
|
53
|
+
code: "voucher" | "card" | "bank_transfer" | "cash" | "invoice";
|
|
54
|
+
label: string;
|
|
55
|
+
description: string | null;
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
}[];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}>;
|
|
61
|
+
export declare function getStorefrontDeparture(client: FetchWithValidationOptions, departureId: string): Promise<{
|
|
62
|
+
data: {
|
|
63
|
+
id: string;
|
|
64
|
+
productId: string;
|
|
65
|
+
itineraryId: string;
|
|
66
|
+
optionId: string | null;
|
|
67
|
+
dateLocal: string | null;
|
|
68
|
+
startAt: string | null;
|
|
69
|
+
endAt: string | null;
|
|
70
|
+
timezone: string;
|
|
71
|
+
startTime: {
|
|
72
|
+
id: string;
|
|
73
|
+
label: string | null;
|
|
74
|
+
startTimeLocal: string;
|
|
75
|
+
durationMinutes: number | null;
|
|
76
|
+
} | null;
|
|
77
|
+
meetingPoint: string | null;
|
|
78
|
+
capacity: number | null;
|
|
79
|
+
remaining: number | null;
|
|
80
|
+
departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
|
|
81
|
+
nights: number | null;
|
|
82
|
+
days: number | null;
|
|
83
|
+
ratePlans: {
|
|
84
|
+
id: string;
|
|
85
|
+
active: boolean;
|
|
86
|
+
name: string;
|
|
87
|
+
pricingModel: string;
|
|
88
|
+
basePrices: {
|
|
89
|
+
amount: number;
|
|
90
|
+
currencyCode: string;
|
|
91
|
+
}[];
|
|
92
|
+
roomPrices: {
|
|
93
|
+
amount: number;
|
|
94
|
+
currencyCode: string;
|
|
95
|
+
roomType: {
|
|
96
|
+
id: string;
|
|
97
|
+
name: string;
|
|
98
|
+
occupancy: {
|
|
99
|
+
adultsMin: number;
|
|
100
|
+
adultsMax: number;
|
|
101
|
+
childrenMax: number;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
}[];
|
|
105
|
+
}[];
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
export declare function listStorefrontProductDepartures(client: FetchWithValidationOptions, productId: string, query?: StorefrontDepartureListQuery): Promise<{
|
|
109
|
+
data: {
|
|
110
|
+
id: string;
|
|
111
|
+
productId: string;
|
|
112
|
+
itineraryId: string;
|
|
113
|
+
optionId: string | null;
|
|
114
|
+
dateLocal: string | null;
|
|
115
|
+
startAt: string | null;
|
|
116
|
+
endAt: string | null;
|
|
117
|
+
timezone: string;
|
|
118
|
+
startTime: {
|
|
119
|
+
id: string;
|
|
120
|
+
label: string | null;
|
|
121
|
+
startTimeLocal: string;
|
|
122
|
+
durationMinutes: number | null;
|
|
123
|
+
} | null;
|
|
124
|
+
meetingPoint: string | null;
|
|
125
|
+
capacity: number | null;
|
|
126
|
+
remaining: number | null;
|
|
127
|
+
departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
|
|
128
|
+
nights: number | null;
|
|
129
|
+
days: number | null;
|
|
130
|
+
ratePlans: {
|
|
131
|
+
id: string;
|
|
132
|
+
active: boolean;
|
|
133
|
+
name: string;
|
|
134
|
+
pricingModel: string;
|
|
135
|
+
basePrices: {
|
|
136
|
+
amount: number;
|
|
137
|
+
currencyCode: string;
|
|
138
|
+
}[];
|
|
139
|
+
roomPrices: {
|
|
140
|
+
amount: number;
|
|
141
|
+
currencyCode: string;
|
|
142
|
+
roomType: {
|
|
143
|
+
id: string;
|
|
144
|
+
name: string;
|
|
145
|
+
occupancy: {
|
|
146
|
+
adultsMin: number;
|
|
147
|
+
adultsMax: number;
|
|
148
|
+
childrenMax: number;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
}[];
|
|
152
|
+
}[];
|
|
153
|
+
}[];
|
|
154
|
+
total: number;
|
|
155
|
+
limit: number;
|
|
156
|
+
offset: number;
|
|
157
|
+
}>;
|
|
158
|
+
export declare function previewStorefrontDeparturePrice(client: FetchWithValidationOptions, departureId: string, input: StorefrontDeparturePricePreviewInput): Promise<{
|
|
159
|
+
data: {
|
|
160
|
+
departureId: string;
|
|
161
|
+
productId: string;
|
|
162
|
+
optionId: string | null;
|
|
163
|
+
currencyCode: string;
|
|
164
|
+
basePrice: number;
|
|
165
|
+
taxAmount: number;
|
|
166
|
+
total: number;
|
|
167
|
+
notes: string | null;
|
|
168
|
+
lineItems: {
|
|
169
|
+
name: string;
|
|
170
|
+
total: number;
|
|
171
|
+
quantity: number;
|
|
172
|
+
unitPrice: number;
|
|
173
|
+
}[];
|
|
174
|
+
};
|
|
175
|
+
}>;
|
|
176
|
+
export declare function listStorefrontProductExtensions(client: FetchWithValidationOptions, productId: string, query?: StorefrontProductExtensionsQuery): Promise<{
|
|
177
|
+
extensions: {
|
|
178
|
+
id: string;
|
|
179
|
+
name: string;
|
|
180
|
+
label: string;
|
|
181
|
+
required: boolean;
|
|
182
|
+
selectable: boolean;
|
|
183
|
+
hasOptions: boolean;
|
|
184
|
+
refProductId: string | null;
|
|
185
|
+
thumb: string | null;
|
|
186
|
+
pricePerPerson: number | null;
|
|
187
|
+
currencyCode: string;
|
|
188
|
+
pricingMode: "included" | "per_person" | "per_booking" | "quantity_based" | "on_request" | "free";
|
|
189
|
+
defaultQuantity: number | null;
|
|
190
|
+
minQuantity: number | null;
|
|
191
|
+
maxQuantity: number | null;
|
|
192
|
+
}[];
|
|
193
|
+
items: {
|
|
194
|
+
id: string;
|
|
195
|
+
name: string;
|
|
196
|
+
label: string;
|
|
197
|
+
required: boolean;
|
|
198
|
+
selectable: boolean;
|
|
199
|
+
hasOptions: boolean;
|
|
200
|
+
refProductId: string | null;
|
|
201
|
+
thumb: string | null;
|
|
202
|
+
pricePerPerson: number | null;
|
|
203
|
+
currencyCode: string;
|
|
204
|
+
pricingMode: "included" | "per_person" | "per_booking" | "quantity_based" | "on_request" | "free";
|
|
205
|
+
defaultQuantity: number | null;
|
|
206
|
+
minQuantity: number | null;
|
|
207
|
+
maxQuantity: number | null;
|
|
208
|
+
}[];
|
|
209
|
+
details: Record<string, {
|
|
210
|
+
description: string | null;
|
|
211
|
+
media: {
|
|
212
|
+
url: string;
|
|
213
|
+
alt: string | null;
|
|
214
|
+
}[];
|
|
215
|
+
}>;
|
|
216
|
+
currencyCode: string;
|
|
217
|
+
}>;
|
|
218
|
+
export declare function getStorefrontDepartureItinerary(client: FetchWithValidationOptions, productId: string, departureId: string): Promise<{
|
|
219
|
+
data: {
|
|
220
|
+
id: string;
|
|
221
|
+
days: {
|
|
222
|
+
id: string;
|
|
223
|
+
title: string;
|
|
224
|
+
description: string | null;
|
|
225
|
+
thumbnail: {
|
|
226
|
+
url: string;
|
|
227
|
+
} | null;
|
|
228
|
+
segments: {
|
|
229
|
+
id: string;
|
|
230
|
+
title: string;
|
|
231
|
+
description: string | null;
|
|
232
|
+
}[];
|
|
233
|
+
}[];
|
|
234
|
+
};
|
|
235
|
+
}>;
|
|
236
|
+
export declare function listStorefrontProductOffers(client: FetchWithValidationOptions, productId: string, query?: StorefrontPromotionalOfferListQuery): Promise<{
|
|
237
|
+
data: {
|
|
238
|
+
id: string;
|
|
239
|
+
name: string;
|
|
240
|
+
slug: string | null;
|
|
241
|
+
description: string | null;
|
|
242
|
+
discountType: "percentage" | "fixed_amount";
|
|
243
|
+
discountValue: string;
|
|
244
|
+
currency: string | null;
|
|
245
|
+
applicableProductIds: string[];
|
|
246
|
+
applicableDepartureIds: string[];
|
|
247
|
+
validFrom: string | null;
|
|
248
|
+
validTo: string | null;
|
|
249
|
+
minPassengers: number | null;
|
|
250
|
+
imageMobileUrl: string | null;
|
|
251
|
+
imageDesktopUrl: string | null;
|
|
252
|
+
stackable: boolean;
|
|
253
|
+
createdAt: string;
|
|
254
|
+
updatedAt: string;
|
|
255
|
+
}[];
|
|
256
|
+
}>;
|
|
257
|
+
export declare function getStorefrontOfferBySlug(client: FetchWithValidationOptions, slug: string, query?: Pick<StorefrontPromotionalOfferListQuery, "locale">): Promise<{
|
|
258
|
+
data: {
|
|
259
|
+
id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
slug: string | null;
|
|
262
|
+
description: string | null;
|
|
263
|
+
discountType: "percentage" | "fixed_amount";
|
|
264
|
+
discountValue: string;
|
|
265
|
+
currency: string | null;
|
|
266
|
+
applicableProductIds: string[];
|
|
267
|
+
applicableDepartureIds: string[];
|
|
268
|
+
validFrom: string | null;
|
|
269
|
+
validTo: string | null;
|
|
270
|
+
minPassengers: number | null;
|
|
271
|
+
imageMobileUrl: string | null;
|
|
272
|
+
imageDesktopUrl: string | null;
|
|
273
|
+
stackable: boolean;
|
|
274
|
+
createdAt: string;
|
|
275
|
+
updatedAt: string;
|
|
276
|
+
};
|
|
277
|
+
}>;
|
|
278
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,0BAA0B,EAAwC,MAAM,aAAa,CAAA;AACnG,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,oCAAoC,EACzC,KAAK,gCAAgC,EACrC,KAAK,mCAAmC,EAUzC,MAAM,cAAc,CAAA;AAErB,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAMvE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM7F;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOrC;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,oCAAoC;;;;;;;;;;;;;;;;;GAU5C;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOzC;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;GAOpB;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,mCAAmC;;;;;;;;;;;;;;;;;;;;GAO5C;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,0BAA0B,EAClC,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,IAAI,CAAC,mCAAmC,EAAE,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;GAO5D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { fetchWithValidation, withQueryParams } from "./client.js";
|
|
3
|
+
import { storefrontDepartureItineraryResponseSchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewResponseSchema, storefrontDepartureResponseSchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListResponseSchema, storefrontPromotionalOfferResponseSchema, storefrontSettingsResponseSchema, } from "./schemas.js";
|
|
4
|
+
export function getStorefrontSettings(client) {
|
|
5
|
+
return fetchWithValidation("/v1/public/storefront/settings", storefrontSettingsResponseSchema, client);
|
|
6
|
+
}
|
|
7
|
+
export function getStorefrontDeparture(client, departureId) {
|
|
8
|
+
return fetchWithValidation(`/v1/public/storefront/departures/${departureId}`, storefrontDepartureResponseSchema, client);
|
|
9
|
+
}
|
|
10
|
+
export function listStorefrontProductDepartures(client, productId, query) {
|
|
11
|
+
return fetchWithValidation(withQueryParams(`/v1/public/storefront/products/${productId}/departures`, query), storefrontDepartureListResponseSchema, client);
|
|
12
|
+
}
|
|
13
|
+
export function previewStorefrontDeparturePrice(client, departureId, input) {
|
|
14
|
+
const parsed = storefrontDeparturePricePreviewInputSchema.parse(input);
|
|
15
|
+
return fetchWithValidation(`/v1/public/storefront/departures/${departureId}/price`, storefrontDeparturePricePreviewResponseSchema, client, { method: "POST", body: JSON.stringify(parsed) });
|
|
16
|
+
}
|
|
17
|
+
export function listStorefrontProductExtensions(client, productId, query) {
|
|
18
|
+
return fetchWithValidation(withQueryParams(`/v1/public/storefront/products/${productId}/extensions`, query), storefrontProductExtensionsResponseSchema, client);
|
|
19
|
+
}
|
|
20
|
+
export function getStorefrontDepartureItinerary(client, productId, departureId) {
|
|
21
|
+
return fetchWithValidation(`/v1/public/storefront/products/${productId}/departures/${departureId}/itinerary`, storefrontDepartureItineraryResponseSchema, client);
|
|
22
|
+
}
|
|
23
|
+
export function listStorefrontProductOffers(client, productId, query) {
|
|
24
|
+
return fetchWithValidation(withQueryParams(`/v1/public/storefront/products/${productId}/offers`, query), storefrontPromotionalOfferListResponseSchema, client);
|
|
25
|
+
}
|
|
26
|
+
export function getStorefrontOfferBySlug(client, slug, query) {
|
|
27
|
+
return fetchWithValidation(withQueryParams(`/v1/public/storefront/offers/${slug}`, query), storefrontPromotionalOfferResponseSchema, client);
|
|
28
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useVoyantReactContext as useVoyantStorefrontContext, type VoyantReactContextValue as VoyantStorefrontContextValue, VoyantReactProvider as VoyantStorefrontProvider, type VoyantReactProviderProps as VoyantStorefrontProviderProps, } from "@voyantjs/react";
|
|
2
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,IAAI,0BAA0B,EACnD,KAAK,uBAAuB,IAAI,4BAA4B,EAC5D,mBAAmB,IAAI,wBAAwB,EAC/C,KAAK,wBAAwB,IAAI,6BAA6B,GAC/D,MAAM,iBAAiB,CAAA"}
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useVoyantReactContext as useVoyantStorefrontContext, VoyantReactProvider as VoyantStorefrontProvider, } from "@voyantjs/react";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { StorefrontDepartureListQuery, StorefrontProductExtensionsQuery, StorefrontPromotionalOfferListQuery } from "./schemas.js";
|
|
2
|
+
export type StorefrontDepartureFilters = StorefrontDepartureListQuery;
|
|
3
|
+
export type StorefrontOfferFilters = StorefrontPromotionalOfferListQuery;
|
|
4
|
+
export type StorefrontExtensionsFilters = StorefrontProductExtensionsQuery;
|
|
5
|
+
export declare const storefrontQueryKeys: {
|
|
6
|
+
readonly all: readonly ["voyant", "storefront"];
|
|
7
|
+
readonly settings: () => readonly ["voyant", "storefront", "settings"];
|
|
8
|
+
readonly departures: () => readonly ["voyant", "storefront", "departures"];
|
|
9
|
+
readonly departure: (departureId: string) => readonly ["voyant", "storefront", "departures", "detail", string];
|
|
10
|
+
readonly productDepartures: (productId: string, filters: StorefrontDepartureFilters) => readonly ["voyant", "storefront", "departures", "product-list", string, {
|
|
11
|
+
optionId?: string | undefined;
|
|
12
|
+
status?: "open" | "closed" | "sold_out" | "cancelled" | undefined;
|
|
13
|
+
dateFrom?: string | undefined;
|
|
14
|
+
dateTo?: string | undefined;
|
|
15
|
+
limit?: unknown;
|
|
16
|
+
offset?: unknown;
|
|
17
|
+
}];
|
|
18
|
+
readonly departureItinerary: (productId: string, departureId: string) => readonly ["voyant", "storefront", "departures", "detail", string, "itinerary", string];
|
|
19
|
+
readonly departurePricePreview: (departureId: string) => readonly ["voyant", "storefront", "departures", "detail", string, "price-preview"];
|
|
20
|
+
readonly extensions: () => readonly ["voyant", "storefront", "extensions"];
|
|
21
|
+
readonly productExtensions: (productId: string, filters: StorefrontExtensionsFilters) => readonly ["voyant", "storefront", "extensions", string, {
|
|
22
|
+
optionId?: string | undefined;
|
|
23
|
+
}];
|
|
24
|
+
readonly offers: () => readonly ["voyant", "storefront", "offers"];
|
|
25
|
+
readonly productOffers: (productId: string, filters: StorefrontOfferFilters) => readonly ["voyant", "storefront", "offers", "product-list", string, {
|
|
26
|
+
departureId?: string | undefined;
|
|
27
|
+
locale?: string | undefined;
|
|
28
|
+
}];
|
|
29
|
+
readonly offer: (slug: string, locale?: string) => readonly ["voyant", "storefront", "offers", "detail", string, string | null];
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=query-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,gCAAgC,EAChC,mCAAmC,EACpC,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,0BAA0B,GAAG,4BAA4B,CAAA;AAErE,MAAM,MAAM,sBAAsB,GAAG,mCAAmC,CAAA;AAExE,MAAM,MAAM,2BAA2B,GAAG,gCAAgC,CAAA;AAE1E,eAAO,MAAM,mBAAmB;;;;sCAKL,MAAM;4CAEA,MAAM,WAAW,0BAA0B;;;;;;;;6CAE1C,MAAM,eAAe,MAAM;kDAEtB,MAAM;;4CAIZ,MAAM,WAAW,2BAA2B;;;;wCAIhD,MAAM,WAAW,sBAAsB;;;;2BAEpD,MAAM,WAAW,MAAM;CAE7B,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const storefrontQueryKeys = {
|
|
2
|
+
all: ["voyant", "storefront"],
|
|
3
|
+
settings: () => [...storefrontQueryKeys.all, "settings"],
|
|
4
|
+
departures: () => [...storefrontQueryKeys.all, "departures"],
|
|
5
|
+
departure: (departureId) => [...storefrontQueryKeys.departures(), "detail", departureId],
|
|
6
|
+
productDepartures: (productId, filters) => [...storefrontQueryKeys.departures(), "product-list", productId, filters],
|
|
7
|
+
departureItinerary: (productId, departureId) => [...storefrontQueryKeys.departure(departureId), "itinerary", productId],
|
|
8
|
+
departurePricePreview: (departureId) => [...storefrontQueryKeys.departure(departureId), "price-preview"],
|
|
9
|
+
extensions: () => [...storefrontQueryKeys.all, "extensions"],
|
|
10
|
+
productExtensions: (productId, filters) => [...storefrontQueryKeys.extensions(), productId, filters],
|
|
11
|
+
offers: () => [...storefrontQueryKeys.all, "offers"],
|
|
12
|
+
productOffers: (productId, filters) => [...storefrontQueryKeys.offers(), "product-list", productId, filters],
|
|
13
|
+
offer: (slug, locale) => [...storefrontQueryKeys.offers(), "detail", slug, locale ?? null],
|
|
14
|
+
};
|