@voyantjs/customer-portal-react 0.3.0 → 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/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/use-customer-portal-booking-billing-contact.d.ts +17 -0
- package/dist/hooks/use-customer-portal-booking-billing-contact.d.ts.map +1 -0
- package/dist/hooks/use-customer-portal-booking-billing-contact.js +12 -0
- package/dist/hooks/use-customer-portal-booking-documents.d.ts +4 -1
- package/dist/hooks/use-customer-portal-booking-documents.d.ts.map +1 -1
- package/dist/hooks/use-customer-portal-booking.d.ts +46 -1
- package/dist/hooks/use-customer-portal-booking.d.ts.map +1 -1
- package/dist/hooks/use-customer-portal-bookings.d.ts +2 -0
- package/dist/hooks/use-customer-portal-bookings.d.ts.map +1 -1
- package/dist/hooks/use-customer-portal-companions.d.ts +25 -0
- package/dist/hooks/use-customer-portal-companions.d.ts.map +1 -1
- package/dist/hooks/use-customer-portal-mutation.d.ts +237 -0
- package/dist/hooks/use-customer-portal-mutation.d.ts.map +1 -1
- package/dist/hooks/use-customer-portal-mutation.js +8 -1
- package/dist/hooks/use-customer-portal-phone-contact-exists.d.ts +11 -0
- package/dist/hooks/use-customer-portal-phone-contact-exists.d.ts.map +1 -0
- package/dist/hooks/use-customer-portal-phone-contact-exists.js +12 -0
- package/dist/hooks/use-customer-portal-profile.d.ts +32 -0
- package/dist/hooks/use-customer-portal-profile.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/operations.d.ts +297 -3
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +13 -1
- package/dist/query-keys.d.ts +6 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +3 -0
- package/dist/query-options.d.ts +526 -10
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +14 -2
- package/dist/schemas.d.ts +362 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +5 -2
- package/package.json +5 -5
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { type UseCustomerPortalBookingOptions, useCustomerPortalBooking, } from "./use-customer-portal-booking.js";
|
|
2
|
+
export { type UseCustomerPortalBookingBillingContactOptions, useCustomerPortalBookingBillingContact, } from "./use-customer-portal-booking-billing-contact.js";
|
|
2
3
|
export { type UseCustomerPortalBookingDocumentsOptions, useCustomerPortalBookingDocuments, } from "./use-customer-portal-booking-documents.js";
|
|
3
4
|
export { type UseCustomerPortalBookingsOptions, useCustomerPortalBookings, } from "./use-customer-portal-bookings.js";
|
|
4
5
|
export { type UseCustomerPortalCompanionsOptions, useCustomerPortalCompanions, } from "./use-customer-portal-companions.js";
|
|
5
6
|
export { type UseCustomerPortalContactExistsOptions, useCustomerPortalContactExists, } from "./use-customer-portal-contact-exists.js";
|
|
6
7
|
export { type DeleteCustomerPortalCompanionMutationInput, type UpdateCustomerPortalCompanionMutationInput, useCustomerPortalMutation, } from "./use-customer-portal-mutation.js";
|
|
8
|
+
export { type UseCustomerPortalPhoneContactExistsOptions, useCustomerPortalPhoneContactExists, } from "./use-customer-portal-phone-contact-exists.js";
|
|
7
9
|
export { type UseCustomerPortalProfileOptions, useCustomerPortalProfile, } from "./use-customer-portal-profile.js";
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,+BAA+B,EACpC,wBAAwB,GACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,wCAAwC,EAC7C,iCAAiC,GAClC,MAAM,4CAA4C,CAAA;AACnD,OAAO,EACL,KAAK,gCAAgC,EACrC,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,kCAAkC,EACvC,2BAA2B,GAC5B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,KAAK,qCAAqC,EAC1C,8BAA8B,GAC/B,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,KAAK,0CAA0C,EAC/C,KAAK,0CAA0C,EAC/C,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,+BAA+B,EACpC,wBAAwB,GACzB,MAAM,kCAAkC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,+BAA+B,EACpC,wBAAwB,GACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,6CAA6C,EAClD,sCAAsC,GACvC,MAAM,kDAAkD,CAAA;AACzD,OAAO,EACL,KAAK,wCAAwC,EAC7C,iCAAiC,GAClC,MAAM,4CAA4C,CAAA;AACnD,OAAO,EACL,KAAK,gCAAgC,EACrC,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,kCAAkC,EACvC,2BAA2B,GAC5B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,KAAK,qCAAqC,EAC1C,8BAA8B,GAC/B,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,KAAK,0CAA0C,EAC/C,KAAK,0CAA0C,EAC/C,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,KAAK,0CAA0C,EAC/C,mCAAmC,GACpC,MAAM,+CAA+C,CAAA;AACtD,OAAO,EACL,KAAK,+BAA+B,EACpC,wBAAwB,GACzB,MAAM,kCAAkC,CAAA"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { useCustomerPortalBooking, } from "./use-customer-portal-booking.js";
|
|
2
|
+
export { useCustomerPortalBookingBillingContact, } from "./use-customer-portal-booking-billing-contact.js";
|
|
2
3
|
export { useCustomerPortalBookingDocuments, } from "./use-customer-portal-booking-documents.js";
|
|
3
4
|
export { useCustomerPortalBookings, } from "./use-customer-portal-bookings.js";
|
|
4
5
|
export { useCustomerPortalCompanions, } from "./use-customer-portal-companions.js";
|
|
5
6
|
export { useCustomerPortalContactExists, } from "./use-customer-portal-contact-exists.js";
|
|
6
7
|
export { useCustomerPortalMutation, } from "./use-customer-portal-mutation.js";
|
|
8
|
+
export { useCustomerPortalPhoneContactExists, } from "./use-customer-portal-phone-contact-exists.js";
|
|
7
9
|
export { useCustomerPortalProfile, } from "./use-customer-portal-profile.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface UseCustomerPortalBookingBillingContactOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useCustomerPortalBookingBillingContact(bookingId: string | null | undefined, options?: UseCustomerPortalBookingBillingContactOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
email: string | null;
|
|
7
|
+
phone: string | null;
|
|
8
|
+
firstName: string | null;
|
|
9
|
+
lastName: string | null;
|
|
10
|
+
country: string | null;
|
|
11
|
+
state: string | null;
|
|
12
|
+
city: string | null;
|
|
13
|
+
address1: string | null;
|
|
14
|
+
postal: string | null;
|
|
15
|
+
};
|
|
16
|
+
}, Error>;
|
|
17
|
+
//# sourceMappingURL=use-customer-portal-booking-billing-contact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-customer-portal-booking-billing-contact.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-booking-billing-contact.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,6CAA6C;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,sCAAsC,CACpD,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,6CAAkD;;;;;;;;;;;;UAS5D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantCustomerPortalContext } from "../provider.js";
|
|
4
|
+
import { getCustomerPortalBookingBillingContactQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useCustomerPortalBookingBillingContact(bookingId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantCustomerPortalContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getCustomerPortalBookingBillingContactQueryOptions({ baseUrl, fetcher }, bookingId ?? ""),
|
|
10
|
+
enabled: enabled && Boolean(bookingId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -4,10 +4,13 @@ export interface UseCustomerPortalBookingDocumentsOptions {
|
|
|
4
4
|
export declare function useCustomerPortalBookingDocuments(bookingId: string | null | undefined, options?: UseCustomerPortalBookingDocumentsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
5
|
data: {
|
|
6
6
|
id: string;
|
|
7
|
+
source: "legal" | "finance" | "booking_document";
|
|
7
8
|
participantId: string | null;
|
|
8
|
-
type: "visa" | "insurance" | "health" | "passport_copy" | "other";
|
|
9
|
+
type: "visa" | "insurance" | "health" | "passport_copy" | "other" | "invoice" | "proforma" | "credit_note" | "contract";
|
|
9
10
|
fileName: string;
|
|
10
11
|
fileUrl: string;
|
|
12
|
+
mimeType: string | null;
|
|
13
|
+
reference: string | null;
|
|
11
14
|
}[];
|
|
12
15
|
}, Error>;
|
|
13
16
|
//# sourceMappingURL=use-customer-portal-booking-documents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-customer-portal-booking-documents.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-booking-documents.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,wCAAwC;IACvD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,wCAA6C
|
|
1
|
+
{"version":3,"file":"use-customer-portal-booking-documents.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-booking-documents.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,wCAAwC;IACvD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,wCAA6C;;;;;;;;;;;UASvD"}
|
|
@@ -42,13 +42,58 @@ export declare function useCustomerPortalBooking(bookingId: string | null | unde
|
|
|
42
42
|
isPrimary: boolean;
|
|
43
43
|
}[];
|
|
44
44
|
}[];
|
|
45
|
+
billingContact: {
|
|
46
|
+
email: string | null;
|
|
47
|
+
phone: string | null;
|
|
48
|
+
firstName: string | null;
|
|
49
|
+
lastName: string | null;
|
|
50
|
+
country: string | null;
|
|
51
|
+
state: string | null;
|
|
52
|
+
city: string | null;
|
|
53
|
+
address1: string | null;
|
|
54
|
+
postal: string | null;
|
|
55
|
+
} | null;
|
|
45
56
|
documents: {
|
|
46
57
|
id: string;
|
|
58
|
+
source: "legal" | "finance" | "booking_document";
|
|
47
59
|
participantId: string | null;
|
|
48
|
-
type: "visa" | "insurance" | "health" | "passport_copy" | "other";
|
|
60
|
+
type: "visa" | "insurance" | "health" | "passport_copy" | "other" | "invoice" | "proforma" | "credit_note" | "contract";
|
|
49
61
|
fileName: string;
|
|
50
62
|
fileUrl: string;
|
|
63
|
+
mimeType: string | null;
|
|
64
|
+
reference: string | null;
|
|
51
65
|
}[];
|
|
66
|
+
financials: {
|
|
67
|
+
documents: {
|
|
68
|
+
invoiceId: string;
|
|
69
|
+
invoiceNumber: string;
|
|
70
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
71
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
72
|
+
currency: string;
|
|
73
|
+
totalCents: number;
|
|
74
|
+
paidCents: number;
|
|
75
|
+
balanceDueCents: number;
|
|
76
|
+
issueDate: string;
|
|
77
|
+
dueDate: string;
|
|
78
|
+
documentStatus: "pending" | "failed" | "ready" | "stale" | "missing";
|
|
79
|
+
format: "pdf" | "json" | "html" | "xml" | null;
|
|
80
|
+
generatedAt: string | null;
|
|
81
|
+
downloadUrl: string | null;
|
|
82
|
+
}[];
|
|
83
|
+
payments: {
|
|
84
|
+
id: string;
|
|
85
|
+
invoiceId: string;
|
|
86
|
+
invoiceNumber: string;
|
|
87
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
88
|
+
status: "completed" | "pending" | "failed" | "refunded";
|
|
89
|
+
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
|
|
90
|
+
amountCents: number;
|
|
91
|
+
currency: string;
|
|
92
|
+
paymentDate: string;
|
|
93
|
+
referenceNumber: string | null;
|
|
94
|
+
notes: string | null;
|
|
95
|
+
}[];
|
|
96
|
+
};
|
|
52
97
|
fulfillments: {
|
|
53
98
|
id: string;
|
|
54
99
|
bookingItemId: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-customer-portal-booking.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-booking.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,+BAA+B;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,+BAAoC
|
|
1
|
+
{"version":3,"file":"use-customer-portal-booking.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-booking.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,+BAA+B;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,+BAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAS9C"}
|
|
@@ -8,6 +8,8 @@ export declare function useCustomerPortalBookings(options?: UseCustomerPortalBoo
|
|
|
8
8
|
status: "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled";
|
|
9
9
|
sellCurrency: string;
|
|
10
10
|
sellAmountCents: number | null;
|
|
11
|
+
productTitle: string | null;
|
|
12
|
+
paymentStatus: "partially_paid" | "paid" | "overdue" | "unpaid";
|
|
11
13
|
startDate: string | null;
|
|
12
14
|
endDate: string | null;
|
|
13
15
|
pax: number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-customer-portal-bookings.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-bookings.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,gCAAgC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,gCAAqC
|
|
1
|
+
{"version":3,"file":"use-customer-portal-bookings.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-bookings.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,gCAAgC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,gCAAqC;;;;;;;;;;;;;;;;;UAQvF"}
|
|
@@ -11,6 +11,31 @@ export declare function useCustomerPortalCompanions(options?: UseCustomerPortalC
|
|
|
11
11
|
phone: string | null;
|
|
12
12
|
isPrimary: boolean;
|
|
13
13
|
notes: string | null;
|
|
14
|
+
typeKey: string | null;
|
|
15
|
+
person: {
|
|
16
|
+
firstName: string | null;
|
|
17
|
+
middleName: string | null;
|
|
18
|
+
lastName: string | null;
|
|
19
|
+
dateOfBirth: string | null;
|
|
20
|
+
addresses: {
|
|
21
|
+
type: string | null;
|
|
22
|
+
country: string | null;
|
|
23
|
+
state: string | null;
|
|
24
|
+
city: string | null;
|
|
25
|
+
postalCode: string | null;
|
|
26
|
+
addressLine1: string | null;
|
|
27
|
+
addressLine2: string | null;
|
|
28
|
+
isDefault: boolean;
|
|
29
|
+
}[];
|
|
30
|
+
documents: {
|
|
31
|
+
type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
|
|
32
|
+
number: string | null;
|
|
33
|
+
issuingAuthority: string | null;
|
|
34
|
+
country: string | null;
|
|
35
|
+
issueDate: string | null;
|
|
36
|
+
expiryDate: string | null;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
14
39
|
metadata: Record<string, unknown> | null;
|
|
15
40
|
}[];
|
|
16
41
|
}, Error>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-customer-portal-companions.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-companions.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,kCAAkC;IACjD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,kCAAuC
|
|
1
|
+
{"version":3,"file":"use-customer-portal-companions.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-companions.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,kCAAkC;IACjD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,kCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQ3F"}
|
|
@@ -15,13 +15,33 @@ export declare function useCustomerPortalMutation(): {
|
|
|
15
15
|
email: string;
|
|
16
16
|
emailVerified: boolean;
|
|
17
17
|
firstName: string | null;
|
|
18
|
+
middleName: string | null;
|
|
18
19
|
lastName: string | null;
|
|
19
20
|
avatarUrl: string | null;
|
|
20
21
|
locale: string;
|
|
21
22
|
timezone: string | null;
|
|
22
23
|
seatingPreference: "aisle" | "window" | "middle" | "no_preference" | null;
|
|
24
|
+
dateOfBirth: string | null;
|
|
25
|
+
address: {
|
|
26
|
+
country: string | null;
|
|
27
|
+
state: string | null;
|
|
28
|
+
city: string | null;
|
|
29
|
+
postalCode: string | null;
|
|
30
|
+
addressLine1: string | null;
|
|
31
|
+
addressLine2: string | null;
|
|
32
|
+
} | null;
|
|
33
|
+
documents: {
|
|
34
|
+
type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
|
|
35
|
+
number: string;
|
|
36
|
+
issuingAuthority: string | null;
|
|
37
|
+
issuingCountry: string;
|
|
38
|
+
nationality: string | null;
|
|
39
|
+
expiryDate: string;
|
|
40
|
+
issueDate: string | null;
|
|
41
|
+
}[];
|
|
23
42
|
marketingConsent: boolean;
|
|
24
43
|
marketingConsentAt: string | null;
|
|
44
|
+
marketingConsentSource: string | null;
|
|
25
45
|
notificationDefaults: Record<string, unknown> | null;
|
|
26
46
|
uiPrefs: Record<string, unknown> | null;
|
|
27
47
|
customerRecord: {
|
|
@@ -36,6 +56,18 @@ export declare function useCustomerPortalMutation(): {
|
|
|
36
56
|
address: string | null;
|
|
37
57
|
city: string | null;
|
|
38
58
|
country: string | null;
|
|
59
|
+
billingAddress: {
|
|
60
|
+
id: string;
|
|
61
|
+
label: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
|
|
62
|
+
fullText: string | null;
|
|
63
|
+
line1: string | null;
|
|
64
|
+
line2: string | null;
|
|
65
|
+
city: string | null;
|
|
66
|
+
region: string | null;
|
|
67
|
+
postalCode: string | null;
|
|
68
|
+
country: string | null;
|
|
69
|
+
isPrimary: boolean;
|
|
70
|
+
} | null;
|
|
39
71
|
relation: string | null;
|
|
40
72
|
status: string;
|
|
41
73
|
} | null;
|
|
@@ -52,6 +84,18 @@ export declare function useCustomerPortalMutation(): {
|
|
|
52
84
|
address: string | null;
|
|
53
85
|
city: string | null;
|
|
54
86
|
country: string | null;
|
|
87
|
+
billingAddress: {
|
|
88
|
+
id: string;
|
|
89
|
+
label: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
|
|
90
|
+
fullText: string | null;
|
|
91
|
+
line1: string | null;
|
|
92
|
+
line2: string | null;
|
|
93
|
+
city: string | null;
|
|
94
|
+
region: string | null;
|
|
95
|
+
postalCode: string | null;
|
|
96
|
+
country: string | null;
|
|
97
|
+
isPrimary: boolean;
|
|
98
|
+
} | null;
|
|
55
99
|
relation: string | null;
|
|
56
100
|
status: string;
|
|
57
101
|
linkable: boolean;
|
|
@@ -64,6 +108,7 @@ export declare function useCustomerPortalMutation(): {
|
|
|
64
108
|
firstName?: string | null | undefined;
|
|
65
109
|
lastName?: string | null | undefined;
|
|
66
110
|
marketingConsent?: boolean | undefined;
|
|
111
|
+
marketingConsentSource?: string | null | undefined;
|
|
67
112
|
customerRecord?: {
|
|
68
113
|
preferredLanguage?: string | null | undefined;
|
|
69
114
|
preferredCurrency?: string | null | undefined;
|
|
@@ -72,6 +117,17 @@ export declare function useCustomerPortalMutation(): {
|
|
|
72
117
|
address?: string | null | undefined;
|
|
73
118
|
city?: string | null | undefined;
|
|
74
119
|
country?: string | null | undefined;
|
|
120
|
+
billingAddress?: {
|
|
121
|
+
label?: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal" | undefined;
|
|
122
|
+
fullText?: string | null | undefined;
|
|
123
|
+
line1?: string | null | undefined;
|
|
124
|
+
line2?: string | null | undefined;
|
|
125
|
+
city?: string | null | undefined;
|
|
126
|
+
region?: string | null | undefined;
|
|
127
|
+
postalCode?: string | null | undefined;
|
|
128
|
+
country?: string | null | undefined;
|
|
129
|
+
isPrimary?: boolean | undefined;
|
|
130
|
+
} | undefined;
|
|
75
131
|
} | undefined;
|
|
76
132
|
}, unknown>;
|
|
77
133
|
updateProfile: import("@tanstack/react-query").UseMutationResult<{
|
|
@@ -80,13 +136,33 @@ export declare function useCustomerPortalMutation(): {
|
|
|
80
136
|
email: string;
|
|
81
137
|
emailVerified: boolean;
|
|
82
138
|
firstName: string | null;
|
|
139
|
+
middleName: string | null;
|
|
83
140
|
lastName: string | null;
|
|
84
141
|
avatarUrl: string | null;
|
|
85
142
|
locale: string;
|
|
86
143
|
timezone: string | null;
|
|
87
144
|
seatingPreference: "aisle" | "window" | "middle" | "no_preference" | null;
|
|
145
|
+
dateOfBirth: string | null;
|
|
146
|
+
address: {
|
|
147
|
+
country: string | null;
|
|
148
|
+
state: string | null;
|
|
149
|
+
city: string | null;
|
|
150
|
+
postalCode: string | null;
|
|
151
|
+
addressLine1: string | null;
|
|
152
|
+
addressLine2: string | null;
|
|
153
|
+
} | null;
|
|
154
|
+
documents: {
|
|
155
|
+
type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
|
|
156
|
+
number: string;
|
|
157
|
+
issuingAuthority: string | null;
|
|
158
|
+
issuingCountry: string;
|
|
159
|
+
nationality: string | null;
|
|
160
|
+
expiryDate: string;
|
|
161
|
+
issueDate: string | null;
|
|
162
|
+
}[];
|
|
88
163
|
marketingConsent: boolean;
|
|
89
164
|
marketingConsentAt: string | null;
|
|
165
|
+
marketingConsentSource: string | null;
|
|
90
166
|
notificationDefaults: Record<string, unknown> | null;
|
|
91
167
|
uiPrefs: Record<string, unknown> | null;
|
|
92
168
|
customerRecord: {
|
|
@@ -101,18 +177,50 @@ export declare function useCustomerPortalMutation(): {
|
|
|
101
177
|
address: string | null;
|
|
102
178
|
city: string | null;
|
|
103
179
|
country: string | null;
|
|
180
|
+
billingAddress: {
|
|
181
|
+
id: string;
|
|
182
|
+
label: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
|
|
183
|
+
fullText: string | null;
|
|
184
|
+
line1: string | null;
|
|
185
|
+
line2: string | null;
|
|
186
|
+
city: string | null;
|
|
187
|
+
region: string | null;
|
|
188
|
+
postalCode: string | null;
|
|
189
|
+
country: string | null;
|
|
190
|
+
isPrimary: boolean;
|
|
191
|
+
} | null;
|
|
104
192
|
relation: string | null;
|
|
105
193
|
status: string;
|
|
106
194
|
} | null;
|
|
107
195
|
};
|
|
108
196
|
}, Error, {
|
|
109
197
|
firstName?: string | null | undefined;
|
|
198
|
+
middleName?: string | null | undefined;
|
|
110
199
|
lastName?: string | null | undefined;
|
|
111
200
|
avatarUrl?: string | null | undefined;
|
|
112
201
|
locale?: string | undefined;
|
|
113
202
|
timezone?: string | null | undefined;
|
|
114
203
|
seatingPreference?: "aisle" | "window" | "middle" | "no_preference" | null | undefined;
|
|
204
|
+
dateOfBirth?: string | null | undefined;
|
|
205
|
+
address?: {
|
|
206
|
+
country?: string | null | undefined;
|
|
207
|
+
state?: string | null | undefined;
|
|
208
|
+
city?: string | null | undefined;
|
|
209
|
+
postalCode?: string | null | undefined;
|
|
210
|
+
addressLine1?: string | null | undefined;
|
|
211
|
+
addressLine2?: string | null | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
documents?: {
|
|
214
|
+
type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
|
|
215
|
+
number: string;
|
|
216
|
+
issuingCountry: string;
|
|
217
|
+
expiryDate: string;
|
|
218
|
+
issuingAuthority?: string | null | undefined;
|
|
219
|
+
nationality?: string | null | undefined;
|
|
220
|
+
issueDate?: string | null | undefined;
|
|
221
|
+
}[] | undefined;
|
|
115
222
|
marketingConsent?: boolean | undefined;
|
|
223
|
+
marketingConsentSource?: string | null | undefined;
|
|
116
224
|
notificationDefaults?: Record<string, unknown> | null | undefined;
|
|
117
225
|
uiPrefs?: Record<string, unknown> | null | undefined;
|
|
118
226
|
customerRecord?: {
|
|
@@ -123,6 +231,17 @@ export declare function useCustomerPortalMutation(): {
|
|
|
123
231
|
address?: string | null | undefined;
|
|
124
232
|
city?: string | null | undefined;
|
|
125
233
|
country?: string | null | undefined;
|
|
234
|
+
billingAddress?: {
|
|
235
|
+
label?: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal" | undefined;
|
|
236
|
+
fullText?: string | null | undefined;
|
|
237
|
+
line1?: string | null | undefined;
|
|
238
|
+
line2?: string | null | undefined;
|
|
239
|
+
city?: string | null | undefined;
|
|
240
|
+
region?: string | null | undefined;
|
|
241
|
+
postalCode?: string | null | undefined;
|
|
242
|
+
country?: string | null | undefined;
|
|
243
|
+
isPrimary?: boolean | undefined;
|
|
244
|
+
} | undefined;
|
|
126
245
|
} | undefined;
|
|
127
246
|
}, unknown>;
|
|
128
247
|
createCompanion: import("@tanstack/react-query").UseMutationResult<{
|
|
@@ -135,6 +254,31 @@ export declare function useCustomerPortalMutation(): {
|
|
|
135
254
|
phone: string | null;
|
|
136
255
|
isPrimary: boolean;
|
|
137
256
|
notes: string | null;
|
|
257
|
+
typeKey: string | null;
|
|
258
|
+
person: {
|
|
259
|
+
firstName: string | null;
|
|
260
|
+
middleName: string | null;
|
|
261
|
+
lastName: string | null;
|
|
262
|
+
dateOfBirth: string | null;
|
|
263
|
+
addresses: {
|
|
264
|
+
type: string | null;
|
|
265
|
+
country: string | null;
|
|
266
|
+
state: string | null;
|
|
267
|
+
city: string | null;
|
|
268
|
+
postalCode: string | null;
|
|
269
|
+
addressLine1: string | null;
|
|
270
|
+
addressLine2: string | null;
|
|
271
|
+
isDefault: boolean;
|
|
272
|
+
}[];
|
|
273
|
+
documents: {
|
|
274
|
+
type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
|
|
275
|
+
number: string | null;
|
|
276
|
+
issuingAuthority: string | null;
|
|
277
|
+
country: string | null;
|
|
278
|
+
issueDate: string | null;
|
|
279
|
+
expiryDate: string | null;
|
|
280
|
+
}[];
|
|
281
|
+
};
|
|
138
282
|
metadata: Record<string, unknown> | null;
|
|
139
283
|
};
|
|
140
284
|
}, Error, {
|
|
@@ -145,8 +289,76 @@ export declare function useCustomerPortalMutation(): {
|
|
|
145
289
|
phone?: string | null | undefined;
|
|
146
290
|
isPrimary?: boolean | undefined;
|
|
147
291
|
notes?: string | null | undefined;
|
|
292
|
+
typeKey?: string | null | undefined;
|
|
293
|
+
person?: {
|
|
294
|
+
firstName?: string | null | undefined;
|
|
295
|
+
middleName?: string | null | undefined;
|
|
296
|
+
lastName?: string | null | undefined;
|
|
297
|
+
dateOfBirth?: string | null | undefined;
|
|
298
|
+
addresses?: {
|
|
299
|
+
type?: string | null | undefined;
|
|
300
|
+
country?: string | null | undefined;
|
|
301
|
+
state?: string | null | undefined;
|
|
302
|
+
city?: string | null | undefined;
|
|
303
|
+
postalCode?: string | null | undefined;
|
|
304
|
+
addressLine1?: string | null | undefined;
|
|
305
|
+
addressLine2?: string | null | undefined;
|
|
306
|
+
isDefault?: boolean | undefined;
|
|
307
|
+
}[] | undefined;
|
|
308
|
+
documents?: {
|
|
309
|
+
type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
|
|
310
|
+
number?: string | null | undefined;
|
|
311
|
+
issuingAuthority?: string | null | undefined;
|
|
312
|
+
country?: string | null | undefined;
|
|
313
|
+
issueDate?: string | null | undefined;
|
|
314
|
+
expiryDate?: string | null | undefined;
|
|
315
|
+
}[] | undefined;
|
|
316
|
+
} | undefined;
|
|
148
317
|
metadata?: Record<string, unknown> | null | undefined;
|
|
149
318
|
}, unknown>;
|
|
319
|
+
importBookingParticipants: import("@tanstack/react-query").UseMutationResult<{
|
|
320
|
+
data: {
|
|
321
|
+
created: {
|
|
322
|
+
id: string;
|
|
323
|
+
role: string;
|
|
324
|
+
name: string;
|
|
325
|
+
title: string | null;
|
|
326
|
+
email: string | null;
|
|
327
|
+
phone: string | null;
|
|
328
|
+
isPrimary: boolean;
|
|
329
|
+
notes: string | null;
|
|
330
|
+
typeKey: string | null;
|
|
331
|
+
person: {
|
|
332
|
+
firstName: string | null;
|
|
333
|
+
middleName: string | null;
|
|
334
|
+
lastName: string | null;
|
|
335
|
+
dateOfBirth: string | null;
|
|
336
|
+
addresses: {
|
|
337
|
+
type: string | null;
|
|
338
|
+
country: string | null;
|
|
339
|
+
state: string | null;
|
|
340
|
+
city: string | null;
|
|
341
|
+
postalCode: string | null;
|
|
342
|
+
addressLine1: string | null;
|
|
343
|
+
addressLine2: string | null;
|
|
344
|
+
isDefault: boolean;
|
|
345
|
+
}[];
|
|
346
|
+
documents: {
|
|
347
|
+
type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
|
|
348
|
+
number: string | null;
|
|
349
|
+
issuingAuthority: string | null;
|
|
350
|
+
country: string | null;
|
|
351
|
+
issueDate: string | null;
|
|
352
|
+
expiryDate: string | null;
|
|
353
|
+
}[];
|
|
354
|
+
};
|
|
355
|
+
metadata: Record<string, unknown> | null;
|
|
356
|
+
}[];
|
|
357
|
+
skippedCount: number;
|
|
358
|
+
};
|
|
359
|
+
}, Error, {
|
|
360
|
+
bookingIds?: string[] | undefined;
|
|
361
|
+
}, unknown>;
|
|
150
362
|
updateCompanion: import("@tanstack/react-query").UseMutationResult<{
|
|
151
363
|
data: {
|
|
152
364
|
id: string;
|
|
@@ -157,6 +369,31 @@ export declare function useCustomerPortalMutation(): {
|
|
|
157
369
|
phone: string | null;
|
|
158
370
|
isPrimary: boolean;
|
|
159
371
|
notes: string | null;
|
|
372
|
+
typeKey: string | null;
|
|
373
|
+
person: {
|
|
374
|
+
firstName: string | null;
|
|
375
|
+
middleName: string | null;
|
|
376
|
+
lastName: string | null;
|
|
377
|
+
dateOfBirth: string | null;
|
|
378
|
+
addresses: {
|
|
379
|
+
type: string | null;
|
|
380
|
+
country: string | null;
|
|
381
|
+
state: string | null;
|
|
382
|
+
city: string | null;
|
|
383
|
+
postalCode: string | null;
|
|
384
|
+
addressLine1: string | null;
|
|
385
|
+
addressLine2: string | null;
|
|
386
|
+
isDefault: boolean;
|
|
387
|
+
}[];
|
|
388
|
+
documents: {
|
|
389
|
+
type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
|
|
390
|
+
number: string | null;
|
|
391
|
+
issuingAuthority: string | null;
|
|
392
|
+
country: string | null;
|
|
393
|
+
issueDate: string | null;
|
|
394
|
+
expiryDate: string | null;
|
|
395
|
+
}[];
|
|
396
|
+
};
|
|
160
397
|
metadata: Record<string, unknown> | null;
|
|
161
398
|
};
|
|
162
399
|
}, Error, UpdateCustomerPortalCompanionMutationInput, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-customer-portal-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-customer-portal-mutation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-customer-portal-mutation.d.ts","sourceRoot":"","sources":["../../src/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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqExC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
-
import { bootstrapCustomerPortal, createCustomerPortalCompanion, deleteCustomerPortalCompanion, updateCustomerPortalCompanion, updateCustomerPortalProfile, } from "../operations.js";
|
|
3
|
+
import { bootstrapCustomerPortal, createCustomerPortalCompanion, deleteCustomerPortalCompanion, importCustomerPortalBookingParticipants, updateCustomerPortalCompanion, updateCustomerPortalProfile, } from "../operations.js";
|
|
4
4
|
import { useVoyantCustomerPortalContext } from "../provider.js";
|
|
5
5
|
import { customerPortalQueryKeys } from "../query-keys.js";
|
|
6
6
|
export function useCustomerPortalMutation() {
|
|
@@ -32,6 +32,12 @@ export function useCustomerPortalMutation() {
|
|
|
32
32
|
await queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.companions() });
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
|
+
const importBookingParticipants = useMutation({
|
|
36
|
+
mutationFn: async (input = {}) => importCustomerPortalBookingParticipants(client, input),
|
|
37
|
+
onSuccess: async () => {
|
|
38
|
+
await queryClient.invalidateQueries({ queryKey: customerPortalQueryKeys.companions() });
|
|
39
|
+
},
|
|
40
|
+
});
|
|
35
41
|
const updateCompanion = useMutation({
|
|
36
42
|
mutationFn: async ({ companionId, input }) => updateCustomerPortalCompanion(client, companionId, input),
|
|
37
43
|
onSuccess: async () => {
|
|
@@ -48,6 +54,7 @@ export function useCustomerPortalMutation() {
|
|
|
48
54
|
bootstrap,
|
|
49
55
|
updateProfile,
|
|
50
56
|
createCompanion,
|
|
57
|
+
importBookingParticipants,
|
|
51
58
|
updateCompanion,
|
|
52
59
|
removeCompanion,
|
|
53
60
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
customerRecordExists: boolean;
|
|
8
|
+
linkedCustomerRecordExists: boolean;
|
|
9
|
+
};
|
|
10
|
+
}, Error>;
|
|
11
|
+
//# 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/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
|
+
}
|