@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-customer-portal-mutation.d.ts","sourceRoot":"","sources":["../../../src/customer-portal/hooks/use-customer-portal-mutation.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAIV,kCAAkC,EAEnC,MAAM,eAAe,CAAA;AAEtB,MAAM,WAAW,0CAA0C;IACzD,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,kCAAkC,CAAA;CAC1C;AAED,MAAM,WAAW,0CAA0C;IACzD,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsExC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { bootstrapCustomerPortal, createCustomerPortalCompanion, deleteCustomerPortalCompanion, importCustomerPortalBookingTravelers, updateCustomerPortalCompanion, updateCustomerPortalProfile, } from "../operations.js";
|
|
4
|
+
import { useVoyantCustomerPortalContext } from "../provider.js";
|
|
5
|
+
import { customerPortalQueryKeys } from "../query-keys.js";
|
|
6
|
+
export function useCustomerPortalMutation() {
|
|
7
|
+
const { baseUrl, fetcher } = useVoyantCustomerPortalContext();
|
|
8
|
+
const queryClient = useQueryClient();
|
|
9
|
+
const client = { baseUrl, fetcher };
|
|
10
|
+
const refreshPortalState = async () => {
|
|
11
|
+
await Promise.all([
|
|
12
|
+
queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.profile() }),
|
|
13
|
+
queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.companions() }),
|
|
14
|
+
queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.bookings() }),
|
|
15
|
+
]);
|
|
16
|
+
};
|
|
17
|
+
const bootstrap = useMutation({
|
|
18
|
+
mutationFn: async (input) => bootstrapCustomerPortal(client, input),
|
|
19
|
+
onSuccess: async () => {
|
|
20
|
+
await refreshPortalState();
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
const updateProfile = useMutation({
|
|
24
|
+
mutationFn: async (input) => updateCustomerPortalProfile(client, input),
|
|
25
|
+
onSuccess: async () => {
|
|
26
|
+
await refreshPortalState();
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const createCompanion = useMutation({
|
|
30
|
+
mutationFn: async (input) => createCustomerPortalCompanion(client, input),
|
|
31
|
+
onSuccess: async () => {
|
|
32
|
+
await queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.companions() });
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
const importBookingTravelers = useMutation({
|
|
36
|
+
mutationFn: async (input = {}) => importCustomerPortalBookingTravelers(client, input),
|
|
37
|
+
onSuccess: async () => {
|
|
38
|
+
await queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.companions() });
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
const updateCompanion = useMutation({
|
|
42
|
+
mutationFn: async ({ companionId, input }) => updateCustomerPortalCompanion(client, companionId, input),
|
|
43
|
+
onSuccess: async () => {
|
|
44
|
+
await queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.companions() });
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
const removeCompanion = useMutation({
|
|
48
|
+
mutationFn: async ({ companionId }) => deleteCustomerPortalCompanion(client, companionId),
|
|
49
|
+
onSuccess: async () => {
|
|
50
|
+
await queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.companions() });
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
bootstrap,
|
|
55
|
+
updateProfile,
|
|
56
|
+
createCompanion,
|
|
57
|
+
importBookingTravelers,
|
|
58
|
+
importBookingParticipants: importBookingTravelers,
|
|
59
|
+
updateCompanion,
|
|
60
|
+
removeCompanion,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface UseCustomerPortalPhoneContactExistsOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useCustomerPortalPhoneContactExists(phone: string | null | undefined, options?: UseCustomerPortalPhoneContactExistsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
phone: string;
|
|
7
|
+
authAccountExists: boolean;
|
|
8
|
+
authAccountVerified: boolean;
|
|
9
|
+
customerRecordExists: boolean;
|
|
10
|
+
linkedCustomerRecordExists: boolean;
|
|
11
|
+
};
|
|
12
|
+
}, Error>;
|
|
13
|
+
//# sourceMappingURL=use-customer-portal-phone-contact-exists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-customer-portal-phone-contact-exists.d.ts","sourceRoot":"","sources":["../../../src/customer-portal/hooks/use-customer-portal-phone-contact-exists.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,0CAA0C;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,GAAE,0CAA+C;;;;;;;;UAYzD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantCustomerPortalContext } from "../provider.js";
|
|
4
|
+
import { getCustomerPortalPhoneContactExistsQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useCustomerPortalPhoneContactExists(phone, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantCustomerPortalContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getCustomerPortalPhoneContactExistsQueryOptions({ phone: phone ?? "" }, { baseUrl, fetcher }),
|
|
10
|
+
enabled: enabled && Boolean(phone),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { UpdateCustomerPortalProfileDocumentInput } from "../schemas.js";
|
|
2
|
+
export interface UpdateCustomerPortalProfileDocumentMutationInput {
|
|
3
|
+
documentId: string;
|
|
4
|
+
input: UpdateCustomerPortalProfileDocumentInput;
|
|
5
|
+
}
|
|
6
|
+
export declare function useCustomerPortalProfileDocumentMutation(): {
|
|
7
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
8
|
+
data: {
|
|
9
|
+
id: string;
|
|
10
|
+
type: "other" | "passport" | "id_card" | "visa" | "drivers_license";
|
|
11
|
+
number: string | null;
|
|
12
|
+
issuingAuthority: string | null;
|
|
13
|
+
issuingCountry: string | null;
|
|
14
|
+
issueDate: string | null;
|
|
15
|
+
expiryDate: string | null;
|
|
16
|
+
attachmentId: string | null;
|
|
17
|
+
isPrimary: boolean;
|
|
18
|
+
notes: string | null;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
};
|
|
22
|
+
}, Error, {
|
|
23
|
+
type: "other" | "passport" | "id_card" | "visa" | "drivers_license";
|
|
24
|
+
number?: string | null | undefined;
|
|
25
|
+
issuingAuthority?: string | null | undefined;
|
|
26
|
+
issuingCountry?: string | null | undefined;
|
|
27
|
+
issueDate?: string | null | undefined;
|
|
28
|
+
expiryDate?: string | null | undefined;
|
|
29
|
+
attachmentId?: string | null | undefined;
|
|
30
|
+
isPrimary?: boolean | undefined;
|
|
31
|
+
notes?: string | null | undefined;
|
|
32
|
+
}, unknown>;
|
|
33
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
34
|
+
data: {
|
|
35
|
+
id: string;
|
|
36
|
+
type: "other" | "passport" | "id_card" | "visa" | "drivers_license";
|
|
37
|
+
number: string | null;
|
|
38
|
+
issuingAuthority: string | null;
|
|
39
|
+
issuingCountry: string | null;
|
|
40
|
+
issueDate: string | null;
|
|
41
|
+
expiryDate: string | null;
|
|
42
|
+
attachmentId: string | null;
|
|
43
|
+
isPrimary: boolean;
|
|
44
|
+
notes: string | null;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
};
|
|
48
|
+
}, Error, UpdateCustomerPortalProfileDocumentMutationInput, unknown>;
|
|
49
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
50
|
+
success: boolean;
|
|
51
|
+
}, Error, string, unknown>;
|
|
52
|
+
setPrimary: import("@tanstack/react-query").UseMutationResult<{
|
|
53
|
+
data: {
|
|
54
|
+
id: string;
|
|
55
|
+
type: "other" | "passport" | "id_card" | "visa" | "drivers_license";
|
|
56
|
+
number: string | null;
|
|
57
|
+
issuingAuthority: string | null;
|
|
58
|
+
issuingCountry: string | null;
|
|
59
|
+
issueDate: string | null;
|
|
60
|
+
expiryDate: string | null;
|
|
61
|
+
attachmentId: string | null;
|
|
62
|
+
isPrimary: boolean;
|
|
63
|
+
notes: string | null;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
};
|
|
67
|
+
}, Error, string, unknown>;
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=use-customer-portal-profile-document-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-customer-portal-profile-document-mutation.d.ts","sourceRoot":"","sources":["../../../src/customer-portal/hooks/use-customer-portal-profile-document-mutation.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAEV,wCAAwC,EACzC,MAAM,eAAe,CAAA;AAEtB,MAAM,WAAW,gDAAgD;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,wCAAwC,CAAA;CAChD;AAED,wBAAgB,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCvD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { createCustomerPortalProfileDocument, deleteCustomerPortalProfileDocument, setPrimaryCustomerPortalProfileDocument, updateCustomerPortalProfileDocument, } from "../operations.js";
|
|
4
|
+
import { useVoyantCustomerPortalContext } from "../provider.js";
|
|
5
|
+
import { customerPortalQueryKeys } from "../query-keys.js";
|
|
6
|
+
export function useCustomerPortalProfileDocumentMutation() {
|
|
7
|
+
const { baseUrl, fetcher } = useVoyantCustomerPortalContext();
|
|
8
|
+
const queryClient = useQueryClient();
|
|
9
|
+
const client = { baseUrl, fetcher };
|
|
10
|
+
const invalidate = () => queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.profileDocuments() });
|
|
11
|
+
const create = useMutation({
|
|
12
|
+
mutationFn: async (input) => createCustomerPortalProfileDocument(client, input),
|
|
13
|
+
onSuccess: invalidate,
|
|
14
|
+
});
|
|
15
|
+
const update = useMutation({
|
|
16
|
+
mutationFn: async ({ documentId, input }) => updateCustomerPortalProfileDocument(client, documentId, input),
|
|
17
|
+
onSuccess: invalidate,
|
|
18
|
+
});
|
|
19
|
+
const remove = useMutation({
|
|
20
|
+
mutationFn: async (documentId) => deleteCustomerPortalProfileDocument(client, documentId),
|
|
21
|
+
onSuccess: invalidate,
|
|
22
|
+
});
|
|
23
|
+
const setPrimary = useMutation({
|
|
24
|
+
mutationFn: async (documentId) => setPrimaryCustomerPortalProfileDocument(client, documentId),
|
|
25
|
+
onSuccess: invalidate,
|
|
26
|
+
});
|
|
27
|
+
return { create, update, remove, setPrimary };
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface UseCustomerPortalProfileDocumentsOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useCustomerPortalProfileDocuments(options?: UseCustomerPortalProfileDocumentsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
type: "other" | "passport" | "id_card" | "visa" | "drivers_license";
|
|
8
|
+
number: string | null;
|
|
9
|
+
issuingAuthority: string | null;
|
|
10
|
+
issuingCountry: string | null;
|
|
11
|
+
issueDate: string | null;
|
|
12
|
+
expiryDate: string | null;
|
|
13
|
+
attachmentId: string | null;
|
|
14
|
+
isPrimary: boolean;
|
|
15
|
+
notes: string | null;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}[];
|
|
19
|
+
}, Error>;
|
|
20
|
+
//# sourceMappingURL=use-customer-portal-profile-documents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-customer-portal-profile-documents.d.ts","sourceRoot":"","sources":["../../../src/customer-portal/hooks/use-customer-portal-profile-documents.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,wCAAwC;IACvD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,GAAE,wCAA6C;;;;;;;;;;;;;;;UASvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantCustomerPortalContext } from "../provider.js";
|
|
4
|
+
import { getCustomerPortalProfileDocumentsQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useCustomerPortalProfileDocuments(options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantCustomerPortalContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getCustomerPortalProfileDocumentsQueryOptions({ baseUrl, fetcher }),
|
|
10
|
+
enabled,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface UseCustomerPortalProfileOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useCustomerPortalProfile(options?: UseCustomerPortalProfileOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
userId: string;
|
|
7
|
+
email: string | null;
|
|
8
|
+
emailVerified: boolean;
|
|
9
|
+
firstName: string | null;
|
|
10
|
+
middleName: string | null;
|
|
11
|
+
lastName: string | null;
|
|
12
|
+
avatarUrl: string | null;
|
|
13
|
+
locale: string;
|
|
14
|
+
timezone: string | null;
|
|
15
|
+
seatingPreference: "aisle" | "window" | "middle" | "no_preference" | null;
|
|
16
|
+
dateOfBirth: string | null;
|
|
17
|
+
address: {
|
|
18
|
+
country: string | null;
|
|
19
|
+
state: string | null;
|
|
20
|
+
city: string | null;
|
|
21
|
+
postalCode: string | null;
|
|
22
|
+
addressLine1: string | null;
|
|
23
|
+
addressLine2: string | null;
|
|
24
|
+
} | null;
|
|
25
|
+
accessibility: string | null;
|
|
26
|
+
dietary: string | null;
|
|
27
|
+
loyalty: string | null;
|
|
28
|
+
insurance: string | null;
|
|
29
|
+
marketingConsent: boolean;
|
|
30
|
+
marketingConsentAt: string | null;
|
|
31
|
+
marketingConsentSource: string | null;
|
|
32
|
+
notificationDefaults: Record<string, unknown> | null;
|
|
33
|
+
uiPrefs: Record<string, unknown> | null;
|
|
34
|
+
customerRecord: {
|
|
35
|
+
id: string;
|
|
36
|
+
firstName: string;
|
|
37
|
+
lastName: string;
|
|
38
|
+
preferredLanguage: string | null;
|
|
39
|
+
preferredCurrency: string | null;
|
|
40
|
+
dateOfBirth: string | null;
|
|
41
|
+
email: string | null;
|
|
42
|
+
phone: string | null;
|
|
43
|
+
billingAddress: {
|
|
44
|
+
id: string;
|
|
45
|
+
label: "legal" | "billing" | "primary" | "shipping" | "mailing" | "meeting" | "service" | "other";
|
|
46
|
+
fullText: string | null;
|
|
47
|
+
line1: string | null;
|
|
48
|
+
line2: string | null;
|
|
49
|
+
city: string | null;
|
|
50
|
+
region: string | null;
|
|
51
|
+
postalCode: string | null;
|
|
52
|
+
country: string | null;
|
|
53
|
+
isPrimary: boolean;
|
|
54
|
+
} | null;
|
|
55
|
+
relation: string | null;
|
|
56
|
+
status: string;
|
|
57
|
+
} | null;
|
|
58
|
+
phoneNumber?: string | null | undefined;
|
|
59
|
+
};
|
|
60
|
+
}, Error>;
|
|
61
|
+
//# sourceMappingURL=use-customer-portal-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-customer-portal-profile.d.ts","sourceRoot":"","sources":["../../../src/customer-portal/hooks/use-customer-portal-profile.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,+BAA+B;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,+BAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQrF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantCustomerPortalContext } from "../provider.js";
|
|
4
|
+
import { getCustomerPortalProfileQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useCustomerPortalProfile(options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantCustomerPortalContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getCustomerPortalProfileQueryOptions({ baseUrl, fetcher }),
|
|
10
|
+
enabled,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, withQueryParams, } from "./client.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { bootstrapCustomerPortal, createCustomerPortalCompanion, createCustomerPortalProfileDocument, deleteCustomerPortalCompanion, deleteCustomerPortalProfileDocument, getCustomerPortalBooking, getCustomerPortalBookingBillingContact, getCustomerPortalContactExists, getCustomerPortalPhoneContactExists, getCustomerPortalProfile, importCustomerPortalBookingParticipants, importCustomerPortalBookingTravelers, listCustomerPortalBookingDocuments, listCustomerPortalBookings, listCustomerPortalCompanions, listCustomerPortalProfileDocuments, setPrimaryCustomerPortalProfileDocument, updateCustomerPortalCompanion, updateCustomerPortalProfile, updateCustomerPortalProfileDocument, } from "./operations.js";
|
|
4
|
+
export { useVoyantCustomerPortalContext, type VoyantCustomerPortalContextValue, VoyantCustomerPortalProvider, type VoyantCustomerPortalProviderProps, } from "./provider.js";
|
|
5
|
+
export type { CustomerPortalContactExistsFilters, CustomerPortalPhoneContactExistsFilters, } from "./query-keys.js";
|
|
6
|
+
export { customerPortalQueryKeys } from "./query-keys.js";
|
|
7
|
+
export { getCustomerPortalBookingBillingContactQueryOptions, getCustomerPortalBookingDocumentsQueryOptions, getCustomerPortalBookingQueryOptions, getCustomerPortalBookingsQueryOptions, getCustomerPortalCompanionsQueryOptions, getCustomerPortalContactExistsQueryOptions, getCustomerPortalPhoneContactExistsQueryOptions, getCustomerPortalProfileDocumentsQueryOptions, getCustomerPortalProfileQueryOptions, } from "./query-options.js";
|
|
8
|
+
export * from "./schemas.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/customer-portal/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,uBAAuB,EACvB,6BAA6B,EAC7B,mCAAmC,EACnC,6BAA6B,EAC7B,mCAAmC,EACnC,wBAAwB,EACxB,sCAAsC,EACtC,8BAA8B,EAC9B,mCAAmC,EACnC,wBAAwB,EACxB,uCAAuC,EACvC,oCAAoC,EACpC,kCAAkC,EAClC,0BAA0B,EAC1B,4BAA4B,EAC5B,kCAAkC,EAClC,uCAAuC,EACvC,6BAA6B,EAC7B,2BAA2B,EAC3B,mCAAmC,GACpC,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,8BAA8B,EAC9B,KAAK,gCAAgC,EACrC,4BAA4B,EAC5B,KAAK,iCAAiC,GACvC,MAAM,eAAe,CAAA;AACtB,YAAY,EACV,kCAAkC,EAClC,uCAAuC,GACxC,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EACL,kDAAkD,EAClD,6CAA6C,EAC7C,oCAAoC,EACpC,qCAAqC,EACrC,uCAAuC,EACvC,0CAA0C,EAC1C,+CAA+C,EAC/C,6CAA6C,EAC7C,oCAAoC,GACrC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defaultFetcher, fetchWithValidation, VoyantApiError, withQueryParams, } from "./client.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { bootstrapCustomerPortal, createCustomerPortalCompanion, createCustomerPortalProfileDocument, deleteCustomerPortalCompanion, deleteCustomerPortalProfileDocument, getCustomerPortalBooking, getCustomerPortalBookingBillingContact, getCustomerPortalContactExists, getCustomerPortalPhoneContactExists, getCustomerPortalProfile, importCustomerPortalBookingParticipants, importCustomerPortalBookingTravelers, listCustomerPortalBookingDocuments, listCustomerPortalBookings, listCustomerPortalCompanions, listCustomerPortalProfileDocuments, setPrimaryCustomerPortalProfileDocument, updateCustomerPortalCompanion, updateCustomerPortalProfile, updateCustomerPortalProfileDocument, } from "./operations.js";
|
|
4
|
+
export { useVoyantCustomerPortalContext, VoyantCustomerPortalProvider, } from "./provider.js";
|
|
5
|
+
export { customerPortalQueryKeys } from "./query-keys.js";
|
|
6
|
+
export { getCustomerPortalBookingBillingContactQueryOptions, getCustomerPortalBookingDocumentsQueryOptions, getCustomerPortalBookingQueryOptions, getCustomerPortalBookingsQueryOptions, getCustomerPortalCompanionsQueryOptions, getCustomerPortalContactExistsQueryOptions, getCustomerPortalPhoneContactExistsQueryOptions, getCustomerPortalProfileDocumentsQueryOptions, getCustomerPortalProfileQueryOptions, } from "./query-options.js";
|
|
7
|
+
export * from "./schemas.js";
|