@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":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation } from "@tanstack/react-query";
|
|
3
|
+
import { previewStorefrontDeparturePrice } from "../operations.js";
|
|
4
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
5
|
+
export function useStorefrontDeparturePricePreviewMutation(departureId) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
return useMutation({
|
|
8
|
+
mutationFn: async (input) => {
|
|
9
|
+
if (!departureId) {
|
|
10
|
+
throw new Error("useStorefrontDeparturePricePreviewMutation requires a departureId");
|
|
11
|
+
}
|
|
12
|
+
return previewStorefrontDeparturePrice({ baseUrl, fetcher }, departureId, input);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface UseStorefrontDepartureOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useStorefrontDeparture(departureId: string | null | undefined, options?: UseStorefrontDepartureOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
productId: string;
|
|
8
|
+
itineraryId: string;
|
|
9
|
+
optionId: string | null;
|
|
10
|
+
dateLocal: string | null;
|
|
11
|
+
startAt: string | null;
|
|
12
|
+
endAt: string | null;
|
|
13
|
+
timezone: string;
|
|
14
|
+
startTime: {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string | null;
|
|
17
|
+
startTimeLocal: string;
|
|
18
|
+
durationMinutes: number | null;
|
|
19
|
+
} | null;
|
|
20
|
+
meetingPoint: string | null;
|
|
21
|
+
capacity: number | null;
|
|
22
|
+
remaining: number | null;
|
|
23
|
+
departureStatus: "cancelled" | "on_request" | "open" | "closed" | "sold_out";
|
|
24
|
+
nights: number | null;
|
|
25
|
+
days: number | null;
|
|
26
|
+
ratePlans: {
|
|
27
|
+
id: string;
|
|
28
|
+
active: boolean;
|
|
29
|
+
name: string;
|
|
30
|
+
pricingModel: string;
|
|
31
|
+
basePrices: {
|
|
32
|
+
amount: number;
|
|
33
|
+
currencyCode: string;
|
|
34
|
+
}[];
|
|
35
|
+
roomPrices: {
|
|
36
|
+
amount: number;
|
|
37
|
+
currencyCode: string;
|
|
38
|
+
roomType: {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
occupancy: {
|
|
42
|
+
adultsMin: number;
|
|
43
|
+
adultsMax: number;
|
|
44
|
+
childrenMax: number;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}[];
|
|
48
|
+
}[];
|
|
49
|
+
};
|
|
50
|
+
}, Error>;
|
|
51
|
+
//# sourceMappingURL=use-storefront-departure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-departure.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-departure.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,6BAA6B;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAS5C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
4
|
+
import { getStorefrontDepartureQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useStorefrontDeparture(departureId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getStorefrontDepartureQueryOptions({ baseUrl, fetcher }, departureId ?? ""),
|
|
10
|
+
enabled: enabled && Boolean(departureId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare function useStorefrontOfferApplyMutation(slug: string | null | undefined): import("@tanstack/react-query").UseMutationResult<{
|
|
2
|
+
data: {
|
|
3
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
4
|
+
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;
|
|
5
|
+
offer: {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
slug: string | null;
|
|
9
|
+
description: string | null;
|
|
10
|
+
discountType: "percentage" | "fixed_amount";
|
|
11
|
+
discountValue: string;
|
|
12
|
+
currency: string | null;
|
|
13
|
+
applicableProductIds: string[];
|
|
14
|
+
applicableDepartureIds: string[];
|
|
15
|
+
validFrom: string | null;
|
|
16
|
+
validTo: string | null;
|
|
17
|
+
minTravelers: number | null;
|
|
18
|
+
imageMobileUrl: string | null;
|
|
19
|
+
imageDesktopUrl: string | null;
|
|
20
|
+
stackable: boolean;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
} | null;
|
|
24
|
+
target: {
|
|
25
|
+
bookingId: string | null;
|
|
26
|
+
sessionId: string | null;
|
|
27
|
+
productId: string;
|
|
28
|
+
departureId: string | null;
|
|
29
|
+
};
|
|
30
|
+
pricing: {
|
|
31
|
+
basePriceCents: number;
|
|
32
|
+
currency: string;
|
|
33
|
+
discountAppliedCents: number;
|
|
34
|
+
discountedPriceCents: number;
|
|
35
|
+
};
|
|
36
|
+
appliedOffers: {
|
|
37
|
+
offerId: string;
|
|
38
|
+
offerName: string;
|
|
39
|
+
discountAppliedCents: number;
|
|
40
|
+
discountedPriceCents: number;
|
|
41
|
+
currency: string;
|
|
42
|
+
discountKind: "percentage" | "fixed_amount";
|
|
43
|
+
discountPercent: number | null;
|
|
44
|
+
discountAmountCents: number | null;
|
|
45
|
+
appliedCode: string | null;
|
|
46
|
+
stackable: boolean;
|
|
47
|
+
}[];
|
|
48
|
+
conflict: {
|
|
49
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
50
|
+
autoAppliedOfferIds: string[];
|
|
51
|
+
manualOfferId: string | null;
|
|
52
|
+
selectedOfferIds: string[];
|
|
53
|
+
message: string;
|
|
54
|
+
} | null;
|
|
55
|
+
};
|
|
56
|
+
}, Error, {
|
|
57
|
+
productId: string;
|
|
58
|
+
pax: unknown;
|
|
59
|
+
basePriceCents: unknown;
|
|
60
|
+
currency: string;
|
|
61
|
+
departureId?: string | null | undefined;
|
|
62
|
+
bookingId?: string | null | undefined;
|
|
63
|
+
sessionId?: string | null | undefined;
|
|
64
|
+
locale?: string | undefined;
|
|
65
|
+
audience?: "partner" | "supplier" | "staff" | "customer" | undefined;
|
|
66
|
+
market?: string | undefined;
|
|
67
|
+
}, unknown>;
|
|
68
|
+
//# sourceMappingURL=use-storefront-offer-apply-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-offer-apply-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-offer-apply-mutation.ts"],"names":[],"mappings":"AAQA,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAY9E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation } from "@tanstack/react-query";
|
|
3
|
+
import { applyStorefrontOffer } from "../operations.js";
|
|
4
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
5
|
+
export function useStorefrontOfferApplyMutation(slug) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
return useMutation({
|
|
8
|
+
mutationFn: async (input) => {
|
|
9
|
+
if (!slug) {
|
|
10
|
+
throw new Error("useStorefrontOfferApplyMutation requires a slug");
|
|
11
|
+
}
|
|
12
|
+
return applyStorefrontOffer({ baseUrl, fetcher }, slug, input);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare function useStorefrontOfferRedeemMutation(): import("@tanstack/react-query").UseMutationResult<{
|
|
2
|
+
data: {
|
|
3
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
4
|
+
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;
|
|
5
|
+
offer: {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
slug: string | null;
|
|
9
|
+
description: string | null;
|
|
10
|
+
discountType: "percentage" | "fixed_amount";
|
|
11
|
+
discountValue: string;
|
|
12
|
+
currency: string | null;
|
|
13
|
+
applicableProductIds: string[];
|
|
14
|
+
applicableDepartureIds: string[];
|
|
15
|
+
validFrom: string | null;
|
|
16
|
+
validTo: string | null;
|
|
17
|
+
minTravelers: number | null;
|
|
18
|
+
imageMobileUrl: string | null;
|
|
19
|
+
imageDesktopUrl: string | null;
|
|
20
|
+
stackable: boolean;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
} | null;
|
|
24
|
+
target: {
|
|
25
|
+
bookingId: string | null;
|
|
26
|
+
sessionId: string | null;
|
|
27
|
+
productId: string;
|
|
28
|
+
departureId: string | null;
|
|
29
|
+
};
|
|
30
|
+
pricing: {
|
|
31
|
+
basePriceCents: number;
|
|
32
|
+
currency: string;
|
|
33
|
+
discountAppliedCents: number;
|
|
34
|
+
discountedPriceCents: number;
|
|
35
|
+
};
|
|
36
|
+
appliedOffers: {
|
|
37
|
+
offerId: string;
|
|
38
|
+
offerName: string;
|
|
39
|
+
discountAppliedCents: number;
|
|
40
|
+
discountedPriceCents: number;
|
|
41
|
+
currency: string;
|
|
42
|
+
discountKind: "percentage" | "fixed_amount";
|
|
43
|
+
discountPercent: number | null;
|
|
44
|
+
discountAmountCents: number | null;
|
|
45
|
+
appliedCode: string | null;
|
|
46
|
+
stackable: boolean;
|
|
47
|
+
}[];
|
|
48
|
+
conflict: {
|
|
49
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
50
|
+
autoAppliedOfferIds: string[];
|
|
51
|
+
manualOfferId: string | null;
|
|
52
|
+
selectedOfferIds: string[];
|
|
53
|
+
message: string;
|
|
54
|
+
} | null;
|
|
55
|
+
};
|
|
56
|
+
}, Error, {
|
|
57
|
+
productId: string;
|
|
58
|
+
pax: unknown;
|
|
59
|
+
basePriceCents: unknown;
|
|
60
|
+
currency: string;
|
|
61
|
+
code: string;
|
|
62
|
+
departureId?: string | null | undefined;
|
|
63
|
+
bookingId?: string | null | undefined;
|
|
64
|
+
sessionId?: string | null | undefined;
|
|
65
|
+
locale?: string | undefined;
|
|
66
|
+
audience?: "partner" | "supplier" | "staff" | "customer" | undefined;
|
|
67
|
+
market?: string | undefined;
|
|
68
|
+
}, unknown>;
|
|
69
|
+
//# sourceMappingURL=use-storefront-offer-redeem-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-offer-redeem-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-offer-redeem-mutation.ts"],"names":[],"mappings":"AAQA,wBAAgB,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAQ/C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation } from "@tanstack/react-query";
|
|
3
|
+
import { redeemStorefrontOffer } from "../operations.js";
|
|
4
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
5
|
+
export function useStorefrontOfferRedeemMutation() {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
return useMutation({
|
|
8
|
+
mutationFn: async (input) => {
|
|
9
|
+
return redeemStorefrontOffer({ baseUrl, fetcher }, input);
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface UseStorefrontOfferOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
locale?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function useStorefrontOffer(slug: string | null | undefined, options?: UseStorefrontOfferOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
data: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string | null;
|
|
10
|
+
description: string | null;
|
|
11
|
+
discountType: "percentage" | "fixed_amount";
|
|
12
|
+
discountValue: string;
|
|
13
|
+
currency: string | null;
|
|
14
|
+
applicableProductIds: string[];
|
|
15
|
+
applicableDepartureIds: string[];
|
|
16
|
+
validFrom: string | null;
|
|
17
|
+
validTo: string | null;
|
|
18
|
+
minTravelers: number | null;
|
|
19
|
+
imageMobileUrl: string | null;
|
|
20
|
+
imageDesktopUrl: string | null;
|
|
21
|
+
stackable: boolean;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
};
|
|
25
|
+
}, Error>;
|
|
26
|
+
//# sourceMappingURL=use-storefront-offer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-offer.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-offer.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,OAAO,GAAE,yBAA8B;;;;;;;;;;;;;;;;;;;;UASxC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
4
|
+
import { getStorefrontOfferQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useStorefrontOffer(slug, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
const { enabled = true, locale } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getStorefrontOfferQueryOptions({ baseUrl, fetcher }, slug ?? "", locale),
|
|
10
|
+
enabled: enabled && Boolean(slug),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type StorefrontDepartureFilters } from "../query-options.js";
|
|
2
|
+
export interface UseStorefrontProductDeparturesOptions extends StorefrontDepartureFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useStorefrontProductDepartures(productId: string | null | undefined, options?: UseStorefrontProductDeparturesOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
data: {
|
|
7
|
+
id: string;
|
|
8
|
+
productId: string;
|
|
9
|
+
itineraryId: string;
|
|
10
|
+
optionId: string | null;
|
|
11
|
+
dateLocal: string | null;
|
|
12
|
+
startAt: string | null;
|
|
13
|
+
endAt: string | null;
|
|
14
|
+
timezone: string;
|
|
15
|
+
startTime: {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string | null;
|
|
18
|
+
startTimeLocal: string;
|
|
19
|
+
durationMinutes: number | null;
|
|
20
|
+
} | null;
|
|
21
|
+
meetingPoint: string | null;
|
|
22
|
+
capacity: number | null;
|
|
23
|
+
remaining: number | null;
|
|
24
|
+
departureStatus: "cancelled" | "on_request" | "open" | "closed" | "sold_out";
|
|
25
|
+
nights: number | null;
|
|
26
|
+
days: number | null;
|
|
27
|
+
ratePlans: {
|
|
28
|
+
id: string;
|
|
29
|
+
active: boolean;
|
|
30
|
+
name: string;
|
|
31
|
+
pricingModel: string;
|
|
32
|
+
basePrices: {
|
|
33
|
+
amount: number;
|
|
34
|
+
currencyCode: string;
|
|
35
|
+
}[];
|
|
36
|
+
roomPrices: {
|
|
37
|
+
amount: number;
|
|
38
|
+
currencyCode: string;
|
|
39
|
+
roomType: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
occupancy: {
|
|
43
|
+
adultsMin: number;
|
|
44
|
+
adultsMax: number;
|
|
45
|
+
childrenMax: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
}[];
|
|
49
|
+
}[];
|
|
50
|
+
}[];
|
|
51
|
+
total: number;
|
|
52
|
+
limit: number;
|
|
53
|
+
offset: number;
|
|
54
|
+
}, Error>;
|
|
55
|
+
//# sourceMappingURL=use-storefront-product-departures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-product-departures.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-product-departures.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAA;AAE5B,MAAM,WAAW,qCAAsC,SAAQ,0BAA0B;IACvF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,qCAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UASpD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
4
|
+
import { getStorefrontProductDeparturesQueryOptions, } from "../query-options.js";
|
|
5
|
+
export function useStorefrontProductDepartures(productId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
const { enabled = true, ...filters } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getStorefrontProductDeparturesQueryOptions({ baseUrl, fetcher }, productId ?? "", filters),
|
|
10
|
+
enabled: enabled && Boolean(productId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type StorefrontExtensionsFilters } from "../query-options.js";
|
|
2
|
+
export interface UseStorefrontProductExtensionsOptions extends StorefrontExtensionsFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useStorefrontProductExtensions(productId: string | null | undefined, options?: UseStorefrontProductExtensionsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
extensions: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
label: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
selectable: boolean;
|
|
12
|
+
hasOptions: boolean;
|
|
13
|
+
refProductId: string | null;
|
|
14
|
+
thumb: string | null;
|
|
15
|
+
pricePerPerson: number | null;
|
|
16
|
+
currencyCode: string;
|
|
17
|
+
pricingMode: "included" | "per_person" | "per_booking" | "quantity_based" | "on_request" | "free";
|
|
18
|
+
defaultQuantity: number | null;
|
|
19
|
+
minQuantity: number | null;
|
|
20
|
+
maxQuantity: number | null;
|
|
21
|
+
}[];
|
|
22
|
+
items: {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
label: string;
|
|
26
|
+
required: boolean;
|
|
27
|
+
selectable: boolean;
|
|
28
|
+
hasOptions: boolean;
|
|
29
|
+
refProductId: string | null;
|
|
30
|
+
thumb: string | null;
|
|
31
|
+
pricePerPerson: number | null;
|
|
32
|
+
currencyCode: string;
|
|
33
|
+
pricingMode: "included" | "per_person" | "per_booking" | "quantity_based" | "on_request" | "free";
|
|
34
|
+
defaultQuantity: number | null;
|
|
35
|
+
minQuantity: number | null;
|
|
36
|
+
maxQuantity: number | null;
|
|
37
|
+
}[];
|
|
38
|
+
details: Record<string, {
|
|
39
|
+
description: string | null;
|
|
40
|
+
media: {
|
|
41
|
+
url: string;
|
|
42
|
+
alt: string | null;
|
|
43
|
+
}[];
|
|
44
|
+
}>;
|
|
45
|
+
currencyCode: string;
|
|
46
|
+
}, Error>;
|
|
47
|
+
//# sourceMappingURL=use-storefront-product-extensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-product-extensions.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-product-extensions.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,qBAAqB,CAAA;AAE5B,MAAM,WAAW,qCAAsC,SAAQ,2BAA2B;IACxF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,qCAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UASpD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
4
|
+
import { getStorefrontProductExtensionsQueryOptions, } from "../query-options.js";
|
|
5
|
+
export function useStorefrontProductExtensions(productId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
const { enabled = true, ...filters } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getStorefrontProductExtensionsQueryOptions({ baseUrl, fetcher }, productId ?? "", filters),
|
|
10
|
+
enabled: enabled && Boolean(productId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type StorefrontOfferFilters } from "../query-options.js";
|
|
2
|
+
export interface UseStorefrontProductOffersOptions extends StorefrontOfferFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useStorefrontProductOffers(productId: string | null | undefined, options?: UseStorefrontProductOffersOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
data: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string | null;
|
|
10
|
+
description: string | null;
|
|
11
|
+
discountType: "percentage" | "fixed_amount";
|
|
12
|
+
discountValue: string;
|
|
13
|
+
currency: string | null;
|
|
14
|
+
applicableProductIds: string[];
|
|
15
|
+
applicableDepartureIds: string[];
|
|
16
|
+
validFrom: string | null;
|
|
17
|
+
validTo: string | null;
|
|
18
|
+
minTravelers: number | null;
|
|
19
|
+
imageMobileUrl: string | null;
|
|
20
|
+
imageDesktopUrl: string | null;
|
|
21
|
+
stackable: boolean;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
}[];
|
|
25
|
+
}, Error>;
|
|
26
|
+
//# sourceMappingURL=use-storefront-product-offers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-product-offers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-product-offers.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAA;AAE5B,MAAM,WAAW,iCAAkC,SAAQ,sBAAsB;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,iCAAsC;;;;;;;;;;;;;;;;;;;;UAShD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
4
|
+
import { getStorefrontProductOffersQueryOptions, } from "../query-options.js";
|
|
5
|
+
export function useStorefrontProductOffers(productId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
const { enabled = true, ...filters } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getStorefrontProductOffersQueryOptions({ baseUrl, fetcher }, productId ?? "", filters),
|
|
10
|
+
enabled: enabled && Boolean(productId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export interface UseStorefrontSettingsOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useStorefrontSettings(options?: UseStorefrontSettingsOptions): 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
|
+
//# sourceMappingURL=use-storefront-settings.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantStorefrontContext } from "../provider.js";
|
|
4
|
+
import { getStorefrontSettingsQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useStorefrontSettings(options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantStorefrontContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getStorefrontSettingsQueryOptions({ baseUrl, fetcher }),
|
|
10
|
+
enabled,
|
|
11
|
+
});
|
|
12
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, withQueryParams, } from "./client.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { applyStorefrontOffer, getAdminStorefrontSettings, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontSettings, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewStorefrontDeparturePrice, redeemStorefrontOffer, updateAdminStorefrontSettings, } from "./operations.js";
|
|
4
|
+
export { useVoyantStorefrontContext, type VoyantStorefrontContextValue, VoyantStorefrontProvider, type VoyantStorefrontProviderProps, } from "./provider.js";
|
|
5
|
+
export { storefrontQueryKeys } from "./query-keys.js";
|
|
6
|
+
export { getAdminStorefrontSettingsQueryOptions, getStorefrontDepartureItineraryQueryOptions, getStorefrontDepartureQueryOptions, getStorefrontOfferQueryOptions, getStorefrontProductDeparturesQueryOptions, getStorefrontProductExtensionsQueryOptions, getStorefrontProductOffersQueryOptions, getStorefrontSettingsQueryOptions, } from "./query-options.js";
|
|
7
|
+
export * from "./schemas.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,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"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defaultFetcher, fetchWithValidation, VoyantApiError, withQueryParams, } from "./client.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { applyStorefrontOffer, getAdminStorefrontSettings, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontSettings, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewStorefrontDeparturePrice, redeemStorefrontOffer, updateAdminStorefrontSettings, } from "./operations.js";
|
|
4
|
+
export { useVoyantStorefrontContext, VoyantStorefrontProvider, } from "./provider.js";
|
|
5
|
+
export { storefrontQueryKeys } from "./query-keys.js";
|
|
6
|
+
export { getAdminStorefrontSettingsQueryOptions, getStorefrontDepartureItineraryQueryOptions, getStorefrontDepartureQueryOptions, getStorefrontOfferQueryOptions, getStorefrontProductDeparturesQueryOptions, getStorefrontProductExtensionsQueryOptions, getStorefrontProductOffersQueryOptions, getStorefrontSettingsQueryOptions, } from "./query-options.js";
|
|
7
|
+
export * from "./schemas.js";
|