@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.
Files changed (38) hide show
  1. package/dist/hooks/index.d.ts +2 -0
  2. package/dist/hooks/index.d.ts.map +1 -1
  3. package/dist/hooks/index.js +2 -0
  4. package/dist/hooks/use-customer-portal-booking-billing-contact.d.ts +17 -0
  5. package/dist/hooks/use-customer-portal-booking-billing-contact.d.ts.map +1 -0
  6. package/dist/hooks/use-customer-portal-booking-billing-contact.js +12 -0
  7. package/dist/hooks/use-customer-portal-booking-documents.d.ts +4 -1
  8. package/dist/hooks/use-customer-portal-booking-documents.d.ts.map +1 -1
  9. package/dist/hooks/use-customer-portal-booking.d.ts +46 -1
  10. package/dist/hooks/use-customer-portal-booking.d.ts.map +1 -1
  11. package/dist/hooks/use-customer-portal-bookings.d.ts +2 -0
  12. package/dist/hooks/use-customer-portal-bookings.d.ts.map +1 -1
  13. package/dist/hooks/use-customer-portal-companions.d.ts +25 -0
  14. package/dist/hooks/use-customer-portal-companions.d.ts.map +1 -1
  15. package/dist/hooks/use-customer-portal-mutation.d.ts +237 -0
  16. package/dist/hooks/use-customer-portal-mutation.d.ts.map +1 -1
  17. package/dist/hooks/use-customer-portal-mutation.js +8 -1
  18. package/dist/hooks/use-customer-portal-phone-contact-exists.d.ts +11 -0
  19. package/dist/hooks/use-customer-portal-phone-contact-exists.d.ts.map +1 -0
  20. package/dist/hooks/use-customer-portal-phone-contact-exists.js +12 -0
  21. package/dist/hooks/use-customer-portal-profile.d.ts +32 -0
  22. package/dist/hooks/use-customer-portal-profile.d.ts.map +1 -1
  23. package/dist/index.d.ts +3 -3
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +2 -2
  26. package/dist/operations.d.ts +297 -3
  27. package/dist/operations.d.ts.map +1 -1
  28. package/dist/operations.js +13 -1
  29. package/dist/query-keys.d.ts +6 -0
  30. package/dist/query-keys.d.ts.map +1 -1
  31. package/dist/query-keys.js +3 -0
  32. package/dist/query-options.d.ts +526 -10
  33. package/dist/query-options.d.ts.map +1 -1
  34. package/dist/query-options.js +14 -2
  35. package/dist/schemas.d.ts +362 -2
  36. package/dist/schemas.d.ts.map +1 -1
  37. package/dist/schemas.js +5 -2
  38. package/package.json +5 -5
@@ -7,13 +7,33 @@ export declare function useCustomerPortalProfile(options?: UseCustomerPortalProf
7
7
  email: string;
8
8
  emailVerified: boolean;
9
9
  firstName: string | null;
10
+ middleName: string | null;
10
11
  lastName: string | null;
11
12
  avatarUrl: string | null;
12
13
  locale: string;
13
14
  timezone: string | null;
14
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
+ documents: {
26
+ type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
27
+ number: string;
28
+ issuingAuthority: string | null;
29
+ issuingCountry: string;
30
+ nationality: string | null;
31
+ expiryDate: string;
32
+ issueDate: string | null;
33
+ }[];
15
34
  marketingConsent: boolean;
16
35
  marketingConsentAt: string | null;
36
+ marketingConsentSource: string | null;
17
37
  notificationDefaults: Record<string, unknown> | null;
18
38
  uiPrefs: Record<string, unknown> | null;
19
39
  customerRecord: {
@@ -28,6 +48,18 @@ export declare function useCustomerPortalProfile(options?: UseCustomerPortalProf
28
48
  address: string | null;
29
49
  city: string | null;
30
50
  country: string | null;
51
+ billingAddress: {
52
+ id: string;
53
+ label: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
54
+ fullText: string | null;
55
+ line1: string | null;
56
+ line2: string | null;
57
+ city: string | null;
58
+ region: string | null;
59
+ postalCode: string | null;
60
+ country: string | null;
61
+ isPrimary: boolean;
62
+ } | null;
31
63
  relation: string | null;
32
64
  status: string;
33
65
  } | null;
@@ -1 +1 @@
1
- {"version":3,"file":"use-customer-portal-profile.d.ts","sourceRoot":"","sources":["../../src/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"}
1
+ {"version":3,"file":"use-customer-portal-profile.d.ts","sourceRoot":"","sources":["../../src/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"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, withQueryParams, } from "./client.js";
2
2
  export * from "./hooks/index.js";
3
- export { bootstrapCustomerPortal, createCustomerPortalCompanion, deleteCustomerPortalCompanion, getCustomerPortalBooking, getCustomerPortalContactExists, getCustomerPortalProfile, listCustomerPortalBookingDocuments, listCustomerPortalBookings, listCustomerPortalCompanions, updateCustomerPortalCompanion, updateCustomerPortalProfile, } from "./operations.js";
3
+ export { bootstrapCustomerPortal, createCustomerPortalCompanion, deleteCustomerPortalCompanion, getCustomerPortalBooking, getCustomerPortalBookingBillingContact, getCustomerPortalContactExists, getCustomerPortalPhoneContactExists, getCustomerPortalProfile, importCustomerPortalBookingParticipants, listCustomerPortalBookingDocuments, listCustomerPortalBookings, listCustomerPortalCompanions, updateCustomerPortalCompanion, updateCustomerPortalProfile, } from "./operations.js";
4
4
  export { useVoyantCustomerPortalContext, type VoyantCustomerPortalContextValue, VoyantCustomerPortalProvider, type VoyantCustomerPortalProviderProps, } from "./provider.js";
5
- export type { CustomerPortalContactExistsFilters } from "./query-keys.js";
5
+ export type { CustomerPortalContactExistsFilters, CustomerPortalPhoneContactExistsFilters, } from "./query-keys.js";
6
6
  export { customerPortalQueryKeys } from "./query-keys.js";
7
- export { getCustomerPortalBookingDocumentsQueryOptions, getCustomerPortalBookingQueryOptions, getCustomerPortalBookingsQueryOptions, getCustomerPortalCompanionsQueryOptions, getCustomerPortalContactExistsQueryOptions, getCustomerPortalProfileQueryOptions, } from "./query-options.js";
7
+ export { getCustomerPortalBookingBillingContactQueryOptions, getCustomerPortalBookingDocumentsQueryOptions, getCustomerPortalBookingQueryOptions, getCustomerPortalBookingsQueryOptions, getCustomerPortalCompanionsQueryOptions, getCustomerPortalContactExistsQueryOptions, getCustomerPortalPhoneContactExistsQueryOptions, getCustomerPortalProfileQueryOptions, } from "./query-options.js";
8
8
  export * from "./schemas.js";
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,8BAA8B,EAC9B,wBAAwB,EACxB,kCAAkC,EAClC,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,8BAA8B,EAC9B,KAAK,gCAAgC,EACrC,4BAA4B,EAC5B,KAAK,iCAAiC,GACvC,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,kCAAkC,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EACL,6CAA6C,EAC7C,oCAAoC,EACpC,qCAAqC,EACrC,uCAAuC,EACvC,0CAA0C,EAC1C,oCAAoC,GACrC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,sCAAsC,EACtC,8BAA8B,EAC9B,mCAAmC,EACnC,wBAAwB,EACxB,uCAAuC,EACvC,kCAAkC,EAClC,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,GAC5B,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,oCAAoC,GACrC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { defaultFetcher, fetchWithValidation, VoyantApiError, withQueryParams, } from "./client.js";
2
2
  export * from "./hooks/index.js";
3
- export { bootstrapCustomerPortal, createCustomerPortalCompanion, deleteCustomerPortalCompanion, getCustomerPortalBooking, getCustomerPortalContactExists, getCustomerPortalProfile, listCustomerPortalBookingDocuments, listCustomerPortalBookings, listCustomerPortalCompanions, updateCustomerPortalCompanion, updateCustomerPortalProfile, } from "./operations.js";
3
+ export { bootstrapCustomerPortal, createCustomerPortalCompanion, deleteCustomerPortalCompanion, getCustomerPortalBooking, getCustomerPortalBookingBillingContact, getCustomerPortalContactExists, getCustomerPortalPhoneContactExists, getCustomerPortalProfile, importCustomerPortalBookingParticipants, listCustomerPortalBookingDocuments, listCustomerPortalBookings, listCustomerPortalCompanions, updateCustomerPortalCompanion, updateCustomerPortalProfile, } from "./operations.js";
4
4
  export { useVoyantCustomerPortalContext, VoyantCustomerPortalProvider, } from "./provider.js";
5
5
  export { customerPortalQueryKeys } from "./query-keys.js";
6
- export { getCustomerPortalBookingDocumentsQueryOptions, getCustomerPortalBookingQueryOptions, getCustomerPortalBookingsQueryOptions, getCustomerPortalCompanionsQueryOptions, getCustomerPortalContactExistsQueryOptions, getCustomerPortalProfileQueryOptions, } from "./query-options.js";
6
+ export { getCustomerPortalBookingBillingContactQueryOptions, getCustomerPortalBookingDocumentsQueryOptions, getCustomerPortalBookingQueryOptions, getCustomerPortalBookingsQueryOptions, getCustomerPortalCompanionsQueryOptions, getCustomerPortalContactExistsQueryOptions, getCustomerPortalPhoneContactExistsQueryOptions, getCustomerPortalProfileQueryOptions, } from "./query-options.js";
7
7
  export * from "./schemas.js";
@@ -1,5 +1,5 @@
1
1
  import { type FetchWithValidationOptions } from "./client.js";
2
- import { type BootstrapCustomerPortalInput, type CreateCustomerPortalCompanionInput, type UpdateCustomerPortalCompanionInput, type UpdateCustomerPortalProfileInput } from "./schemas.js";
2
+ import { type BootstrapCustomerPortalInput, type CreateCustomerPortalCompanionInput, type ImportCustomerPortalBookingParticipantsInput, type UpdateCustomerPortalCompanionInput, type UpdateCustomerPortalProfileInput } from "./schemas.js";
3
3
  export declare function getCustomerPortalContactExists(client: FetchWithValidationOptions, email: string): Promise<{
4
4
  data: {
5
5
  email: string;
@@ -8,19 +8,46 @@ export declare function getCustomerPortalContactExists(client: FetchWithValidati
8
8
  linkedCustomerRecordExists: boolean;
9
9
  };
10
10
  }>;
11
+ export declare function getCustomerPortalPhoneContactExists(client: FetchWithValidationOptions, phone: string): Promise<{
12
+ data: {
13
+ phone: string;
14
+ customerRecordExists: boolean;
15
+ linkedCustomerRecordExists: boolean;
16
+ };
17
+ }>;
11
18
  export declare function getCustomerPortalProfile(client: FetchWithValidationOptions): Promise<{
12
19
  data: {
13
20
  userId: string;
14
21
  email: string;
15
22
  emailVerified: boolean;
16
23
  firstName: string | null;
24
+ middleName: string | null;
17
25
  lastName: string | null;
18
26
  avatarUrl: string | null;
19
27
  locale: string;
20
28
  timezone: string | null;
21
29
  seatingPreference: "aisle" | "window" | "middle" | "no_preference" | null;
30
+ dateOfBirth: string | null;
31
+ address: {
32
+ country: string | null;
33
+ state: string | null;
34
+ city: string | null;
35
+ postalCode: string | null;
36
+ addressLine1: string | null;
37
+ addressLine2: string | null;
38
+ } | null;
39
+ documents: {
40
+ type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
41
+ number: string;
42
+ issuingAuthority: string | null;
43
+ issuingCountry: string;
44
+ nationality: string | null;
45
+ expiryDate: string;
46
+ issueDate: string | null;
47
+ }[];
22
48
  marketingConsent: boolean;
23
49
  marketingConsentAt: string | null;
50
+ marketingConsentSource: string | null;
24
51
  notificationDefaults: Record<string, unknown> | null;
25
52
  uiPrefs: Record<string, unknown> | null;
26
53
  customerRecord: {
@@ -35,6 +62,18 @@ export declare function getCustomerPortalProfile(client: FetchWithValidationOpti
35
62
  address: string | null;
36
63
  city: string | null;
37
64
  country: string | null;
65
+ billingAddress: {
66
+ id: string;
67
+ label: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
68
+ fullText: string | null;
69
+ line1: string | null;
70
+ line2: string | null;
71
+ city: string | null;
72
+ region: string | null;
73
+ postalCode: string | null;
74
+ country: string | null;
75
+ isPrimary: boolean;
76
+ } | null;
38
77
  relation: string | null;
39
78
  status: string;
40
79
  } | null;
@@ -46,13 +85,33 @@ export declare function updateCustomerPortalProfile(client: FetchWithValidationO
46
85
  email: string;
47
86
  emailVerified: boolean;
48
87
  firstName: string | null;
88
+ middleName: string | null;
49
89
  lastName: string | null;
50
90
  avatarUrl: string | null;
51
91
  locale: string;
52
92
  timezone: string | null;
53
93
  seatingPreference: "aisle" | "window" | "middle" | "no_preference" | null;
94
+ dateOfBirth: string | null;
95
+ address: {
96
+ country: string | null;
97
+ state: string | null;
98
+ city: string | null;
99
+ postalCode: string | null;
100
+ addressLine1: string | null;
101
+ addressLine2: string | null;
102
+ } | null;
103
+ documents: {
104
+ type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
105
+ number: string;
106
+ issuingAuthority: string | null;
107
+ issuingCountry: string;
108
+ nationality: string | null;
109
+ expiryDate: string;
110
+ issueDate: string | null;
111
+ }[];
54
112
  marketingConsent: boolean;
55
113
  marketingConsentAt: string | null;
114
+ marketingConsentSource: string | null;
56
115
  notificationDefaults: Record<string, unknown> | null;
57
116
  uiPrefs: Record<string, unknown> | null;
58
117
  customerRecord: {
@@ -67,6 +126,18 @@ export declare function updateCustomerPortalProfile(client: FetchWithValidationO
67
126
  address: string | null;
68
127
  city: string | null;
69
128
  country: string | null;
129
+ billingAddress: {
130
+ id: string;
131
+ label: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
132
+ fullText: string | null;
133
+ line1: string | null;
134
+ line2: string | null;
135
+ city: string | null;
136
+ region: string | null;
137
+ postalCode: string | null;
138
+ country: string | null;
139
+ isPrimary: boolean;
140
+ } | null;
70
141
  relation: string | null;
71
142
  status: string;
72
143
  } | null;
@@ -80,13 +151,33 @@ export declare function bootstrapCustomerPortal(client: FetchWithValidationOptio
80
151
  email: string;
81
152
  emailVerified: boolean;
82
153
  firstName: string | null;
154
+ middleName: string | null;
83
155
  lastName: string | null;
84
156
  avatarUrl: string | null;
85
157
  locale: string;
86
158
  timezone: string | null;
87
159
  seatingPreference: "aisle" | "window" | "middle" | "no_preference" | null;
160
+ dateOfBirth: string | null;
161
+ address: {
162
+ country: string | null;
163
+ state: string | null;
164
+ city: string | null;
165
+ postalCode: string | null;
166
+ addressLine1: string | null;
167
+ addressLine2: string | null;
168
+ } | null;
169
+ documents: {
170
+ type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
171
+ number: string;
172
+ issuingAuthority: string | null;
173
+ issuingCountry: string;
174
+ nationality: string | null;
175
+ expiryDate: string;
176
+ issueDate: string | null;
177
+ }[];
88
178
  marketingConsent: boolean;
89
179
  marketingConsentAt: string | null;
180
+ marketingConsentSource: string | null;
90
181
  notificationDefaults: Record<string, unknown> | null;
91
182
  uiPrefs: Record<string, unknown> | null;
92
183
  customerRecord: {
@@ -101,6 +192,18 @@ export declare function bootstrapCustomerPortal(client: FetchWithValidationOptio
101
192
  address: string | null;
102
193
  city: string | null;
103
194
  country: string | null;
195
+ billingAddress: {
196
+ id: string;
197
+ label: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
198
+ fullText: string | null;
199
+ line1: string | null;
200
+ line2: string | null;
201
+ city: string | null;
202
+ region: string | null;
203
+ postalCode: string | null;
204
+ country: string | null;
205
+ isPrimary: boolean;
206
+ } | null;
104
207
  relation: string | null;
105
208
  status: string;
106
209
  } | null;
@@ -117,6 +220,18 @@ export declare function bootstrapCustomerPortal(client: FetchWithValidationOptio
117
220
  address: string | null;
118
221
  city: string | null;
119
222
  country: string | null;
223
+ billingAddress: {
224
+ id: string;
225
+ label: "other" | "service" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
226
+ fullText: string | null;
227
+ line1: string | null;
228
+ line2: string | null;
229
+ city: string | null;
230
+ region: string | null;
231
+ postalCode: string | null;
232
+ country: string | null;
233
+ isPrimary: boolean;
234
+ } | null;
120
235
  relation: string | null;
121
236
  status: string;
122
237
  linkable: boolean;
@@ -134,6 +249,31 @@ export declare function listCustomerPortalCompanions(client: FetchWithValidation
134
249
  phone: string | null;
135
250
  isPrimary: boolean;
136
251
  notes: string | null;
252
+ typeKey: string | null;
253
+ person: {
254
+ firstName: string | null;
255
+ middleName: string | null;
256
+ lastName: string | null;
257
+ dateOfBirth: string | null;
258
+ addresses: {
259
+ type: string | null;
260
+ country: string | null;
261
+ state: string | null;
262
+ city: string | null;
263
+ postalCode: string | null;
264
+ addressLine1: string | null;
265
+ addressLine2: string | null;
266
+ isDefault: boolean;
267
+ }[];
268
+ documents: {
269
+ type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
270
+ number: string | null;
271
+ issuingAuthority: string | null;
272
+ country: string | null;
273
+ issueDate: string | null;
274
+ expiryDate: string | null;
275
+ }[];
276
+ };
137
277
  metadata: Record<string, unknown> | null;
138
278
  }[];
139
279
  }>;
@@ -147,9 +287,75 @@ export declare function createCustomerPortalCompanion(client: FetchWithValidatio
147
287
  phone: string | null;
148
288
  isPrimary: boolean;
149
289
  notes: string | null;
290
+ typeKey: string | null;
291
+ person: {
292
+ firstName: string | null;
293
+ middleName: string | null;
294
+ lastName: string | null;
295
+ dateOfBirth: string | null;
296
+ addresses: {
297
+ type: string | null;
298
+ country: string | null;
299
+ state: string | null;
300
+ city: string | null;
301
+ postalCode: string | null;
302
+ addressLine1: string | null;
303
+ addressLine2: string | null;
304
+ isDefault: boolean;
305
+ }[];
306
+ documents: {
307
+ type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
308
+ number: string | null;
309
+ issuingAuthority: string | null;
310
+ country: string | null;
311
+ issueDate: string | null;
312
+ expiryDate: string | null;
313
+ }[];
314
+ };
150
315
  metadata: Record<string, unknown> | null;
151
316
  };
152
317
  }>;
318
+ export declare function importCustomerPortalBookingParticipants(client: FetchWithValidationOptions, input?: ImportCustomerPortalBookingParticipantsInput): Promise<{
319
+ data: {
320
+ created: {
321
+ id: string;
322
+ role: string;
323
+ name: string;
324
+ title: string | null;
325
+ email: string | null;
326
+ phone: string | null;
327
+ isPrimary: boolean;
328
+ notes: string | null;
329
+ typeKey: string | null;
330
+ person: {
331
+ firstName: string | null;
332
+ middleName: string | null;
333
+ lastName: string | null;
334
+ dateOfBirth: string | null;
335
+ addresses: {
336
+ type: string | null;
337
+ country: string | null;
338
+ state: string | null;
339
+ city: string | null;
340
+ postalCode: string | null;
341
+ addressLine1: string | null;
342
+ addressLine2: string | null;
343
+ isDefault: boolean;
344
+ }[];
345
+ documents: {
346
+ type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
347
+ number: string | null;
348
+ issuingAuthority: string | null;
349
+ country: string | null;
350
+ issueDate: string | null;
351
+ expiryDate: string | null;
352
+ }[];
353
+ };
354
+ metadata: Record<string, unknown> | null;
355
+ }[];
356
+ skippedCount: number;
357
+ };
358
+ }>;
153
359
  export declare function updateCustomerPortalCompanion(client: FetchWithValidationOptions, companionId: string, input: UpdateCustomerPortalCompanionInput): Promise<{
154
360
  data: {
155
361
  id: string;
@@ -160,6 +366,31 @@ export declare function updateCustomerPortalCompanion(client: FetchWithValidatio
160
366
  phone: string | null;
161
367
  isPrimary: boolean;
162
368
  notes: string | null;
369
+ typeKey: string | null;
370
+ person: {
371
+ firstName: string | null;
372
+ middleName: string | null;
373
+ lastName: string | null;
374
+ dateOfBirth: string | null;
375
+ addresses: {
376
+ type: string | null;
377
+ country: string | null;
378
+ state: string | null;
379
+ city: string | null;
380
+ postalCode: string | null;
381
+ addressLine1: string | null;
382
+ addressLine2: string | null;
383
+ isDefault: boolean;
384
+ }[];
385
+ documents: {
386
+ type: "visa" | "other" | "passport" | "drivers_license" | "id_card";
387
+ number: string | null;
388
+ issuingAuthority: string | null;
389
+ country: string | null;
390
+ issueDate: string | null;
391
+ expiryDate: string | null;
392
+ }[];
393
+ };
163
394
  metadata: Record<string, unknown> | null;
164
395
  };
165
396
  }>;
@@ -173,6 +404,8 @@ export declare function listCustomerPortalBookings(client: FetchWithValidationOp
173
404
  status: "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled";
174
405
  sellCurrency: string;
175
406
  sellAmountCents: number | null;
407
+ productTitle: string | null;
408
+ paymentStatus: "partially_paid" | "paid" | "overdue" | "unpaid";
176
409
  startDate: string | null;
177
410
  endDate: string | null;
178
411
  pax: number | null;
@@ -223,13 +456,58 @@ export declare function getCustomerPortalBooking(client: FetchWithValidationOpti
223
456
  isPrimary: boolean;
224
457
  }[];
225
458
  }[];
459
+ billingContact: {
460
+ email: string | null;
461
+ phone: string | null;
462
+ firstName: string | null;
463
+ lastName: string | null;
464
+ country: string | null;
465
+ state: string | null;
466
+ city: string | null;
467
+ address1: string | null;
468
+ postal: string | null;
469
+ } | null;
226
470
  documents: {
227
471
  id: string;
472
+ source: "legal" | "finance" | "booking_document";
228
473
  participantId: string | null;
229
- type: "visa" | "insurance" | "health" | "passport_copy" | "other";
474
+ type: "visa" | "insurance" | "health" | "passport_copy" | "other" | "invoice" | "proforma" | "credit_note" | "contract";
230
475
  fileName: string;
231
476
  fileUrl: string;
477
+ mimeType: string | null;
478
+ reference: string | null;
232
479
  }[];
480
+ financials: {
481
+ documents: {
482
+ invoiceId: string;
483
+ invoiceNumber: string;
484
+ invoiceType: "invoice" | "proforma" | "credit_note";
485
+ invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
486
+ currency: string;
487
+ totalCents: number;
488
+ paidCents: number;
489
+ balanceDueCents: number;
490
+ issueDate: string;
491
+ dueDate: string;
492
+ documentStatus: "pending" | "failed" | "ready" | "stale" | "missing";
493
+ format: "pdf" | "json" | "html" | "xml" | null;
494
+ generatedAt: string | null;
495
+ downloadUrl: string | null;
496
+ }[];
497
+ payments: {
498
+ id: string;
499
+ invoiceId: string;
500
+ invoiceNumber: string;
501
+ invoiceType: "invoice" | "proforma" | "credit_note";
502
+ status: "completed" | "pending" | "failed" | "refunded";
503
+ paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
504
+ amountCents: number;
505
+ currency: string;
506
+ paymentDate: string;
507
+ referenceNumber: string | null;
508
+ notes: string | null;
509
+ }[];
510
+ };
233
511
  fulfillments: {
234
512
  id: string;
235
513
  bookingItemId: string | null;
@@ -241,13 +519,29 @@ export declare function getCustomerPortalBooking(client: FetchWithValidationOpti
241
519
  }[];
242
520
  };
243
521
  }>;
522
+ export declare function getCustomerPortalBookingBillingContact(client: FetchWithValidationOptions, bookingId: string): Promise<{
523
+ data: {
524
+ email: string | null;
525
+ phone: string | null;
526
+ firstName: string | null;
527
+ lastName: string | null;
528
+ country: string | null;
529
+ state: string | null;
530
+ city: string | null;
531
+ address1: string | null;
532
+ postal: string | null;
533
+ };
534
+ }>;
244
535
  export declare function listCustomerPortalBookingDocuments(client: FetchWithValidationOptions, bookingId: string): Promise<{
245
536
  data: {
246
537
  id: string;
538
+ source: "legal" | "finance" | "booking_document";
247
539
  participantId: string | null;
248
- type: "visa" | "insurance" | "health" | "passport_copy" | "other";
540
+ type: "visa" | "insurance" | "health" | "passport_copy" | "other" | "invoice" | "proforma" | "credit_note" | "contract";
249
541
  fileName: string;
250
542
  fileUrl: string;
543
+ mimeType: string | null;
544
+ reference: string | null;
251
545
  }[];
252
546
  }>;
253
547
  //# sourceMappingURL=operations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,0BAA0B,EAAwC,MAAM,aAAa,CAAA;AACnG,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EAUvC,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,EACtC,MAAM,cAAc,CAAA;AAErB,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM;;;;;;;GAM/F;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM1E;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,0BAA0B,EAClC,KAAK,EAAE,gCAAgC;;;;;;;;;;;;;;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,0BAA0B,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM7F;AAED,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM;;;;;;;;;;;;GAOlB;AAED,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM;;;;;;;;;;;GAOlB"}
@@ -1,9 +1,12 @@
1
1
  "use client";
2
2
  import { fetchWithValidation, withQueryParams } from "./client.js";
3
- import { customerPortalBookingDocumentsResponseSchema, customerPortalBookingResponseSchema, customerPortalBookingsResponseSchema, customerPortalBootstrapResponseSchema, customerPortalCompanionResponseSchema, customerPortalCompanionsResponseSchema, customerPortalContactExistsResponseSchema, customerPortalProfileResponseSchema, successEnvelope, } from "./schemas.js";
3
+ import { customerPortalBookingBillingContactResponseSchema, customerPortalBookingDocumentsResponseSchema, customerPortalBookingResponseSchema, customerPortalBookingsResponseSchema, customerPortalBootstrapResponseSchema, customerPortalCompanionImportResponseSchema, customerPortalCompanionResponseSchema, customerPortalCompanionsResponseSchema, customerPortalContactExistsResponseSchema, customerPortalPhoneContactExistsResponseSchema, customerPortalProfileResponseSchema, successEnvelope, } from "./schemas.js";
4
4
  export function getCustomerPortalContactExists(client, email) {
5
5
  return fetchWithValidation(withQueryParams("/v1/customer-portal/contact-exists", { email }), customerPortalContactExistsResponseSchema, client);
6
6
  }
7
+ export function getCustomerPortalPhoneContactExists(client, phone) {
8
+ return fetchWithValidation(withQueryParams("/v1/customer-portal/contact-exists/phone", { phone }), customerPortalPhoneContactExistsResponseSchema, client);
9
+ }
7
10
  export function getCustomerPortalProfile(client) {
8
11
  return fetchWithValidation("/v1/public/customer-portal/me", customerPortalProfileResponseSchema, client);
9
12
  }
@@ -28,6 +31,12 @@ export function createCustomerPortalCompanion(client, input) {
28
31
  body: JSON.stringify(input),
29
32
  });
30
33
  }
34
+ export function importCustomerPortalBookingParticipants(client, input = {}) {
35
+ return fetchWithValidation("/v1/public/customer-portal/companions/import-booking-participants", customerPortalCompanionImportResponseSchema, client, {
36
+ method: "POST",
37
+ body: JSON.stringify(input),
38
+ });
39
+ }
31
40
  export function updateCustomerPortalCompanion(client, companionId, input) {
32
41
  return fetchWithValidation(`/v1/public/customer-portal/companions/${companionId}`, customerPortalCompanionResponseSchema, client, {
33
42
  method: "PATCH",
@@ -45,6 +54,9 @@ export function listCustomerPortalBookings(client) {
45
54
  export function getCustomerPortalBooking(client, bookingId) {
46
55
  return fetchWithValidation(`/v1/public/customer-portal/bookings/${bookingId}`, customerPortalBookingResponseSchema, client);
47
56
  }
57
+ export function getCustomerPortalBookingBillingContact(client, bookingId) {
58
+ return fetchWithValidation(`/v1/public/customer-portal/bookings/${bookingId}/billing-contact`, customerPortalBookingBillingContactResponseSchema, client);
59
+ }
48
60
  export function listCustomerPortalBookingDocuments(client, bookingId) {
49
61
  return fetchWithValidation(`/v1/public/customer-portal/bookings/${bookingId}/documents`, customerPortalBookingDocumentsResponseSchema, client);
50
62
  }
@@ -1,14 +1,20 @@
1
1
  export interface CustomerPortalContactExistsFilters {
2
2
  email: string;
3
3
  }
4
+ export interface CustomerPortalPhoneContactExistsFilters {
5
+ phone: string;
6
+ }
4
7
  export declare const customerPortalQueryKeys: {
5
8
  all: readonly ["customer-portal"];
6
9
  profile: () => readonly ["customer-portal", "profile"];
7
10
  companions: () => readonly ["customer-portal", "companions"];
8
11
  bookings: () => readonly ["customer-portal", "bookings"];
9
12
  booking: (bookingId: string) => readonly ["customer-portal", "bookings", string];
13
+ bookingBillingContact: (bookingId: string) => readonly ["customer-portal", "bookings", string, "billing-contact"];
10
14
  bookingDocuments: (bookingId: string) => readonly ["customer-portal", "bookings", string, "documents"];
11
15
  contactExists: () => readonly ["customer-portal", "contact-exists"];
12
16
  contactExistsLookup: (filters: CustomerPortalContactExistsFilters) => readonly ["customer-portal", "contact-exists", CustomerPortalContactExistsFilters];
17
+ phoneContactExists: () => readonly ["customer-portal", "phone-contact-exists"];
18
+ phoneContactExistsLookup: (filters: CustomerPortalPhoneContactExistsFilters) => readonly ["customer-portal", "phone-contact-exists", CustomerPortalPhoneContactExistsFilters];
13
19
  };
14
20
  //# sourceMappingURL=query-keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kCAAkC;IACjD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,uBAAuB;;;;;yBAKb,MAAM;kCACG,MAAM;;mCAGL,kCAAkC;CAElE,CAAA"}
1
+ {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kCAAkC;IACjD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,uCAAuC;IACtD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,uBAAuB;;;;;yBAKb,MAAM;uCACQ,MAAM;kCAEX,MAAM;;mCAGL,kCAAkC;;wCAG7B,uCAAuC;CAE5E,CAAA"}
@@ -4,7 +4,10 @@ export const customerPortalQueryKeys = {
4
4
  companions: () => [...customerPortalQueryKeys.all, "companions"],
5
5
  bookings: () => [...customerPortalQueryKeys.all, "bookings"],
6
6
  booking: (bookingId) => [...customerPortalQueryKeys.bookings(), bookingId],
7
+ bookingBillingContact: (bookingId) => [...customerPortalQueryKeys.booking(bookingId), "billing-contact"],
7
8
  bookingDocuments: (bookingId) => [...customerPortalQueryKeys.booking(bookingId), "documents"],
8
9
  contactExists: () => [...customerPortalQueryKeys.all, "contact-exists"],
9
10
  contactExistsLookup: (filters) => [...customerPortalQueryKeys.contactExists(), filters],
11
+ phoneContactExists: () => [...customerPortalQueryKeys.all, "phone-contact-exists"],
12
+ phoneContactExistsLookup: (filters) => [...customerPortalQueryKeys.phoneContactExists(), filters],
10
13
  };