@voyantjs/customer-portal-react 0.2.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 (46) hide show
  1. package/dist/client.d.ts +16 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/client.js +78 -0
  4. package/dist/hooks/index.d.ts +8 -0
  5. package/dist/hooks/index.d.ts.map +1 -0
  6. package/dist/hooks/index.js +7 -0
  7. package/dist/hooks/use-customer-portal-booking-documents.d.ts +13 -0
  8. package/dist/hooks/use-customer-portal-booking-documents.d.ts.map +1 -0
  9. package/dist/hooks/use-customer-portal-booking-documents.js +12 -0
  10. package/dist/hooks/use-customer-portal-booking.d.ts +63 -0
  11. package/dist/hooks/use-customer-portal-booking.d.ts.map +1 -0
  12. package/dist/hooks/use-customer-portal-booking.js +12 -0
  13. package/dist/hooks/use-customer-portal-bookings.d.ts +20 -0
  14. package/dist/hooks/use-customer-portal-bookings.d.ts.map +1 -0
  15. package/dist/hooks/use-customer-portal-bookings.js +12 -0
  16. package/dist/hooks/use-customer-portal-companions.d.ts +17 -0
  17. package/dist/hooks/use-customer-portal-companions.d.ts.map +1 -0
  18. package/dist/hooks/use-customer-portal-companions.js +12 -0
  19. package/dist/hooks/use-customer-portal-contact-exists.d.ts +12 -0
  20. package/dist/hooks/use-customer-portal-contact-exists.d.ts.map +1 -0
  21. package/dist/hooks/use-customer-portal-contact-exists.js +12 -0
  22. package/dist/hooks/use-customer-portal-mutation.d.ts +167 -0
  23. package/dist/hooks/use-customer-portal-mutation.d.ts.map +1 -0
  24. package/dist/hooks/use-customer-portal-mutation.js +54 -0
  25. package/dist/hooks/use-customer-portal-profile.d.ts +36 -0
  26. package/dist/hooks/use-customer-portal-profile.d.ts.map +1 -0
  27. package/dist/hooks/use-customer-portal-profile.js +12 -0
  28. package/dist/index.d.ts +9 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +7 -0
  31. package/dist/operations.d.ts +253 -0
  32. package/dist/operations.d.ts.map +1 -0
  33. package/dist/operations.js +50 -0
  34. package/dist/provider.d.ts +2 -0
  35. package/dist/provider.d.ts.map +1 -0
  36. package/dist/provider.js +1 -0
  37. package/dist/query-keys.d.ts +14 -0
  38. package/dist/query-keys.d.ts.map +1 -0
  39. package/dist/query-keys.js +10 -0
  40. package/dist/query-options.d.ts +576 -0
  41. package/dist/query-options.d.ts.map +1 -0
  42. package/dist/query-options.js +40 -0
  43. package/dist/schemas.d.ts +321 -0
  44. package/dist/schemas.d.ts.map +1 -0
  45. package/dist/schemas.js +14 -0
  46. package/package.json +84 -0
@@ -0,0 +1,321 @@
1
+ import { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingSummarySchema, customerPortalCompanionSchema, customerPortalContactExistsResultSchema, customerPortalProfileSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileSchema } from "@voyantjs/customer-portal";
2
+ import { z } from "zod";
3
+ export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
4
+ data: T;
5
+ }, z.core.$strip>;
6
+ export declare const arrayEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
7
+ data: z.ZodArray<T>;
8
+ }, z.core.$strip>;
9
+ export declare const successEnvelope: z.ZodObject<{
10
+ success: z.ZodBoolean;
11
+ }, z.core.$strip>;
12
+ export { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingSummarySchema, customerPortalCompanionSchema, customerPortalContactExistsResultSchema, customerPortalProfileSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileSchema, };
13
+ export declare const customerPortalProfileResponseSchema: z.ZodObject<{
14
+ data: z.ZodObject<{
15
+ userId: z.ZodString;
16
+ email: z.ZodString;
17
+ emailVerified: z.ZodBoolean;
18
+ firstName: z.ZodNullable<z.ZodString>;
19
+ lastName: z.ZodNullable<z.ZodString>;
20
+ avatarUrl: z.ZodNullable<z.ZodString>;
21
+ locale: z.ZodString;
22
+ timezone: z.ZodNullable<z.ZodString>;
23
+ seatingPreference: z.ZodNullable<z.ZodEnum<{
24
+ aisle: "aisle";
25
+ window: "window";
26
+ middle: "middle";
27
+ no_preference: "no_preference";
28
+ }>>;
29
+ marketingConsent: z.ZodBoolean;
30
+ marketingConsentAt: z.ZodNullable<z.ZodString>;
31
+ notificationDefaults: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
32
+ uiPrefs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
33
+ customerRecord: z.ZodNullable<z.ZodObject<{
34
+ id: z.ZodString;
35
+ firstName: z.ZodString;
36
+ lastName: z.ZodString;
37
+ preferredLanguage: z.ZodNullable<z.ZodString>;
38
+ preferredCurrency: z.ZodNullable<z.ZodString>;
39
+ birthday: z.ZodNullable<z.ZodString>;
40
+ email: z.ZodNullable<z.ZodString>;
41
+ phone: z.ZodNullable<z.ZodString>;
42
+ address: z.ZodNullable<z.ZodString>;
43
+ city: z.ZodNullable<z.ZodString>;
44
+ country: z.ZodNullable<z.ZodString>;
45
+ relation: z.ZodNullable<z.ZodString>;
46
+ status: z.ZodString;
47
+ }, z.core.$strip>>;
48
+ }, z.core.$strip>;
49
+ }, z.core.$strip>;
50
+ export declare const customerPortalBootstrapResponseSchema: z.ZodObject<{
51
+ data: z.ZodObject<{
52
+ status: z.ZodEnum<{
53
+ already_linked: "already_linked";
54
+ linked_existing_customer: "linked_existing_customer";
55
+ created_customer: "created_customer";
56
+ customer_selection_required: "customer_selection_required";
57
+ }>;
58
+ profile: z.ZodNullable<z.ZodObject<{
59
+ userId: z.ZodString;
60
+ email: z.ZodString;
61
+ emailVerified: z.ZodBoolean;
62
+ firstName: z.ZodNullable<z.ZodString>;
63
+ lastName: z.ZodNullable<z.ZodString>;
64
+ avatarUrl: z.ZodNullable<z.ZodString>;
65
+ locale: z.ZodString;
66
+ timezone: z.ZodNullable<z.ZodString>;
67
+ seatingPreference: z.ZodNullable<z.ZodEnum<{
68
+ aisle: "aisle";
69
+ window: "window";
70
+ middle: "middle";
71
+ no_preference: "no_preference";
72
+ }>>;
73
+ marketingConsent: z.ZodBoolean;
74
+ marketingConsentAt: z.ZodNullable<z.ZodString>;
75
+ notificationDefaults: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
76
+ uiPrefs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
77
+ customerRecord: z.ZodNullable<z.ZodObject<{
78
+ id: z.ZodString;
79
+ firstName: z.ZodString;
80
+ lastName: z.ZodString;
81
+ preferredLanguage: z.ZodNullable<z.ZodString>;
82
+ preferredCurrency: z.ZodNullable<z.ZodString>;
83
+ birthday: z.ZodNullable<z.ZodString>;
84
+ email: z.ZodNullable<z.ZodString>;
85
+ phone: z.ZodNullable<z.ZodString>;
86
+ address: z.ZodNullable<z.ZodString>;
87
+ city: z.ZodNullable<z.ZodString>;
88
+ country: z.ZodNullable<z.ZodString>;
89
+ relation: z.ZodNullable<z.ZodString>;
90
+ status: z.ZodString;
91
+ }, z.core.$strip>>;
92
+ }, z.core.$strip>>;
93
+ candidates: z.ZodDefault<z.ZodArray<z.ZodObject<{
94
+ id: z.ZodString;
95
+ firstName: z.ZodString;
96
+ lastName: z.ZodString;
97
+ preferredLanguage: z.ZodNullable<z.ZodString>;
98
+ preferredCurrency: z.ZodNullable<z.ZodString>;
99
+ birthday: z.ZodNullable<z.ZodString>;
100
+ email: z.ZodNullable<z.ZodString>;
101
+ phone: z.ZodNullable<z.ZodString>;
102
+ address: z.ZodNullable<z.ZodString>;
103
+ city: z.ZodNullable<z.ZodString>;
104
+ country: z.ZodNullable<z.ZodString>;
105
+ relation: z.ZodNullable<z.ZodString>;
106
+ status: z.ZodString;
107
+ linkable: z.ZodBoolean;
108
+ claimedByAnotherUser: z.ZodBoolean;
109
+ }, z.core.$strip>>>;
110
+ }, z.core.$strip>;
111
+ }, z.core.$strip>;
112
+ export declare const customerPortalCompanionsResponseSchema: z.ZodObject<{
113
+ data: z.ZodArray<z.ZodObject<{
114
+ id: z.ZodString;
115
+ role: z.ZodString;
116
+ name: z.ZodString;
117
+ title: z.ZodNullable<z.ZodString>;
118
+ email: z.ZodNullable<z.ZodString>;
119
+ phone: z.ZodNullable<z.ZodString>;
120
+ isPrimary: z.ZodBoolean;
121
+ notes: z.ZodNullable<z.ZodString>;
122
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
123
+ }, z.core.$strip>>;
124
+ }, z.core.$strip>;
125
+ export declare const customerPortalCompanionResponseSchema: z.ZodObject<{
126
+ data: z.ZodObject<{
127
+ id: z.ZodString;
128
+ role: z.ZodString;
129
+ name: z.ZodString;
130
+ title: z.ZodNullable<z.ZodString>;
131
+ email: z.ZodNullable<z.ZodString>;
132
+ phone: z.ZodNullable<z.ZodString>;
133
+ isPrimary: z.ZodBoolean;
134
+ notes: z.ZodNullable<z.ZodString>;
135
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
136
+ }, z.core.$strip>;
137
+ }, z.core.$strip>;
138
+ export declare const customerPortalBookingsResponseSchema: z.ZodObject<{
139
+ data: z.ZodArray<z.ZodObject<{
140
+ bookingId: z.ZodString;
141
+ bookingNumber: z.ZodString;
142
+ status: z.ZodEnum<{
143
+ draft: "draft";
144
+ on_hold: "on_hold";
145
+ confirmed: "confirmed";
146
+ in_progress: "in_progress";
147
+ completed: "completed";
148
+ expired: "expired";
149
+ cancelled: "cancelled";
150
+ }>;
151
+ sellCurrency: z.ZodString;
152
+ sellAmountCents: z.ZodNullable<z.ZodNumber>;
153
+ startDate: z.ZodNullable<z.ZodString>;
154
+ endDate: z.ZodNullable<z.ZodString>;
155
+ pax: z.ZodNullable<z.ZodNumber>;
156
+ confirmedAt: z.ZodNullable<z.ZodString>;
157
+ completedAt: z.ZodNullable<z.ZodString>;
158
+ participantCount: z.ZodNumber;
159
+ primaryTravelerName: z.ZodNullable<z.ZodString>;
160
+ }, z.core.$strip>>;
161
+ }, z.core.$strip>;
162
+ export declare const customerPortalBookingResponseSchema: z.ZodObject<{
163
+ data: z.ZodObject<{
164
+ bookingId: z.ZodString;
165
+ bookingNumber: z.ZodString;
166
+ status: z.ZodEnum<{
167
+ draft: "draft";
168
+ on_hold: "on_hold";
169
+ confirmed: "confirmed";
170
+ in_progress: "in_progress";
171
+ completed: "completed";
172
+ expired: "expired";
173
+ cancelled: "cancelled";
174
+ }>;
175
+ sellCurrency: z.ZodString;
176
+ sellAmountCents: z.ZodNullable<z.ZodNumber>;
177
+ startDate: z.ZodNullable<z.ZodString>;
178
+ endDate: z.ZodNullable<z.ZodString>;
179
+ pax: z.ZodNullable<z.ZodNumber>;
180
+ confirmedAt: z.ZodNullable<z.ZodString>;
181
+ cancelledAt: z.ZodNullable<z.ZodString>;
182
+ completedAt: z.ZodNullable<z.ZodString>;
183
+ participants: z.ZodArray<z.ZodObject<{
184
+ id: z.ZodString;
185
+ participantType: z.ZodEnum<{
186
+ staff: "staff";
187
+ other: "other";
188
+ traveler: "traveler";
189
+ booker: "booker";
190
+ contact: "contact";
191
+ occupant: "occupant";
192
+ }>;
193
+ firstName: z.ZodString;
194
+ lastName: z.ZodString;
195
+ isPrimary: z.ZodBoolean;
196
+ }, z.core.$strip>>;
197
+ items: z.ZodArray<z.ZodObject<{
198
+ id: z.ZodString;
199
+ title: z.ZodString;
200
+ description: z.ZodNullable<z.ZodString>;
201
+ itemType: z.ZodEnum<{
202
+ other: "other";
203
+ unit: "unit";
204
+ extra: "extra";
205
+ service: "service";
206
+ fee: "fee";
207
+ tax: "tax";
208
+ discount: "discount";
209
+ adjustment: "adjustment";
210
+ accommodation: "accommodation";
211
+ transport: "transport";
212
+ }>;
213
+ status: z.ZodEnum<{
214
+ draft: "draft";
215
+ on_hold: "on_hold";
216
+ confirmed: "confirmed";
217
+ expired: "expired";
218
+ cancelled: "cancelled";
219
+ fulfilled: "fulfilled";
220
+ }>;
221
+ serviceDate: z.ZodNullable<z.ZodString>;
222
+ startsAt: z.ZodNullable<z.ZodString>;
223
+ endsAt: z.ZodNullable<z.ZodString>;
224
+ quantity: z.ZodNumber;
225
+ sellCurrency: z.ZodString;
226
+ unitSellAmountCents: z.ZodNullable<z.ZodNumber>;
227
+ totalSellAmountCents: z.ZodNullable<z.ZodNumber>;
228
+ notes: z.ZodNullable<z.ZodString>;
229
+ participantLinks: z.ZodArray<z.ZodObject<{
230
+ id: z.ZodString;
231
+ participantId: z.ZodString;
232
+ role: z.ZodEnum<{
233
+ other: "other";
234
+ traveler: "traveler";
235
+ occupant: "occupant";
236
+ primary_contact: "primary_contact";
237
+ service_assignee: "service_assignee";
238
+ beneficiary: "beneficiary";
239
+ }>;
240
+ isPrimary: z.ZodBoolean;
241
+ }, z.core.$strip>>;
242
+ }, z.core.$strip>>;
243
+ documents: z.ZodArray<z.ZodObject<{
244
+ id: z.ZodString;
245
+ participantId: z.ZodNullable<z.ZodString>;
246
+ type: z.ZodEnum<{
247
+ visa: "visa";
248
+ insurance: "insurance";
249
+ health: "health";
250
+ passport_copy: "passport_copy";
251
+ other: "other";
252
+ }>;
253
+ fileName: z.ZodString;
254
+ fileUrl: z.ZodString;
255
+ }, z.core.$strip>>;
256
+ fulfillments: z.ZodArray<z.ZodObject<{
257
+ id: z.ZodString;
258
+ bookingItemId: z.ZodNullable<z.ZodString>;
259
+ participantId: z.ZodNullable<z.ZodString>;
260
+ fulfillmentType: z.ZodEnum<{
261
+ other: "other";
262
+ voucher: "voucher";
263
+ ticket: "ticket";
264
+ pdf: "pdf";
265
+ qr_code: "qr_code";
266
+ barcode: "barcode";
267
+ mobile: "mobile";
268
+ }>;
269
+ deliveryChannel: z.ZodEnum<{
270
+ other: "other";
271
+ download: "download";
272
+ email: "email";
273
+ api: "api";
274
+ wallet: "wallet";
275
+ }>;
276
+ status: z.ZodEnum<{
277
+ pending: "pending";
278
+ issued: "issued";
279
+ reissued: "reissued";
280
+ revoked: "revoked";
281
+ failed: "failed";
282
+ }>;
283
+ artifactUrl: z.ZodNullable<z.ZodString>;
284
+ }, z.core.$strip>>;
285
+ }, z.core.$strip>;
286
+ }, z.core.$strip>;
287
+ export declare const customerPortalBookingDocumentsResponseSchema: z.ZodObject<{
288
+ data: z.ZodArray<z.ZodObject<{
289
+ id: z.ZodString;
290
+ participantId: z.ZodNullable<z.ZodString>;
291
+ type: z.ZodEnum<{
292
+ visa: "visa";
293
+ insurance: "insurance";
294
+ health: "health";
295
+ passport_copy: "passport_copy";
296
+ other: "other";
297
+ }>;
298
+ fileName: z.ZodString;
299
+ fileUrl: z.ZodString;
300
+ }, z.core.$strip>>;
301
+ }, z.core.$strip>;
302
+ export declare const customerPortalContactExistsResponseSchema: z.ZodObject<{
303
+ data: z.ZodObject<{
304
+ email: z.ZodString;
305
+ authAccountExists: z.ZodBoolean;
306
+ customerRecordExists: z.ZodBoolean;
307
+ linkedCustomerRecordExists: z.ZodBoolean;
308
+ }, z.core.$strip>;
309
+ }, z.core.$strip>;
310
+ export type CustomerPortalProfileRecord = z.infer<typeof customerPortalProfileSchema>;
311
+ export type BootstrapCustomerPortalInput = z.input<typeof bootstrapCustomerPortalSchema>;
312
+ export type BootstrapCustomerPortalResult = z.infer<typeof bootstrapCustomerPortalResultSchema>;
313
+ export type UpdateCustomerPortalProfileInput = z.input<typeof updateCustomerPortalProfileSchema>;
314
+ export type CustomerPortalCompanionRecord = z.infer<typeof customerPortalCompanionSchema>;
315
+ export type CreateCustomerPortalCompanionInput = z.input<typeof createCustomerPortalCompanionSchema>;
316
+ export type UpdateCustomerPortalCompanionInput = z.input<typeof updateCustomerPortalCompanionSchema>;
317
+ export type CustomerPortalBookingSummaryRecord = z.infer<typeof customerPortalBookingSummarySchema>;
318
+ export type CustomerPortalBookingRecord = z.infer<typeof customerPortalBookingDetailSchema>;
319
+ export type CustomerPortalBookingDocumentRecord = z.infer<typeof customerPortalBookingDocumentSchema>;
320
+ export type CustomerPortalContactExistsRecord = z.infer<typeof customerPortalContactExistsResultSchema>;
321
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,mCAAmC,EACnC,iCAAiC,EACjC,mCAAmC,EACnC,kCAAkC,EAClC,6BAA6B,EAC7B,uCAAuC,EACvC,2BAA2B,EAC3B,mCAAmC,EACnC,iCAAiC,EAClC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAC3F,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAAsC,CAAA;AACnG,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,mCAAmC,EACnC,iCAAiC,EACjC,mCAAmC,EACnC,kCAAkC,EAClC,6BAA6B,EAC7B,uCAAuC,EACvC,2BAA2B,EAC3B,mCAAmC,EACnC,iCAAiC,GAClC,CAAA;AAED,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8C,CAAA;AAC9F,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEjD,CAAA;AACD,eAAO,MAAM,sCAAsC;;;;;;;;;;;;iBAA+C,CAAA;AAClG,eAAO,MAAM,qCAAqC;;;;;;;;;;;;iBAAgD,CAAA;AAClG,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;iBAEhD,CAAA;AACD,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAoD,CAAA;AACpG,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;iBAExD,CAAA;AACD,eAAO,MAAM,yCAAyC;;;;;;;iBAErD,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AACrF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACxF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAC/F,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAChG,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACzF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AACpG,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AACpG,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AACnG,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAC3F,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AACD,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingSummarySchema, customerPortalCompanionSchema, customerPortalContactExistsResultSchema, customerPortalProfileSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileSchema, } from "@voyantjs/customer-portal";
2
+ import { z } from "zod";
3
+ export const singleEnvelope = (item) => z.object({ data: item });
4
+ export const arrayEnvelope = (item) => z.object({ data: z.array(item) });
5
+ export const successEnvelope = z.object({ success: z.boolean() });
6
+ export { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingSummarySchema, customerPortalCompanionSchema, customerPortalContactExistsResultSchema, customerPortalProfileSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileSchema, };
7
+ export const customerPortalProfileResponseSchema = singleEnvelope(customerPortalProfileSchema);
8
+ export const customerPortalBootstrapResponseSchema = singleEnvelope(bootstrapCustomerPortalResultSchema);
9
+ export const customerPortalCompanionsResponseSchema = arrayEnvelope(customerPortalCompanionSchema);
10
+ export const customerPortalCompanionResponseSchema = singleEnvelope(customerPortalCompanionSchema);
11
+ export const customerPortalBookingsResponseSchema = arrayEnvelope(customerPortalBookingSummarySchema);
12
+ export const customerPortalBookingResponseSchema = singleEnvelope(customerPortalBookingDetailSchema);
13
+ export const customerPortalBookingDocumentsResponseSchema = arrayEnvelope(customerPortalBookingDocumentSchema);
14
+ export const customerPortalContactExistsResponseSchema = singleEnvelope(customerPortalContactExistsResultSchema);
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "@voyantjs/customer-portal-react",
3
+ "version": "0.2.0",
4
+ "license": "FSL-1.1-Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/voyantjs/voyant.git",
8
+ "directory": "packages/customer-portal-react"
9
+ },
10
+ "type": "module",
11
+ "exports": {
12
+ ".": "./src/index.ts",
13
+ "./provider": "./src/provider.tsx",
14
+ "./hooks": "./src/hooks/index.ts",
15
+ "./client": "./src/client.ts",
16
+ "./query-keys": "./src/query-keys.ts",
17
+ "./operations": "./src/operations.ts"
18
+ },
19
+ "scripts": {
20
+ "build": "tsc -p tsconfig.json",
21
+ "clean": "rm -rf dist",
22
+ "prepack": "pnpm run build",
23
+ "typecheck": "tsc --noEmit",
24
+ "lint": "biome check src/",
25
+ "test": "vitest run --passWithNoTests"
26
+ },
27
+ "peerDependencies": {
28
+ "@voyantjs/customer-portal": "workspace:*",
29
+ "@tanstack/react-query": "^5.0.0",
30
+ "react": "^19.0.0",
31
+ "react-dom": "^19.0.0",
32
+ "zod": "^4.0.0"
33
+ },
34
+ "devDependencies": {
35
+ "@tanstack/react-query": "^5.96.2",
36
+ "@types/react": "^19.2.14",
37
+ "@types/react-dom": "^19.2.3",
38
+ "@voyantjs/customer-portal": "workspace:*",
39
+ "@voyantjs/react": "workspace:*",
40
+ "@voyantjs/voyant-typescript-config": "workspace:*",
41
+ "react": "^19.2.4",
42
+ "react-dom": "^19.2.4",
43
+ "typescript": "^6.0.2",
44
+ "vitest": "^4.1.2",
45
+ "zod": "^4.3.6"
46
+ },
47
+ "dependencies": {
48
+ "@voyantjs/react": "workspace:*"
49
+ },
50
+ "files": [
51
+ "dist"
52
+ ],
53
+ "publishConfig": {
54
+ "access": "public",
55
+ "exports": {
56
+ ".": {
57
+ "types": "./dist/index.d.ts",
58
+ "import": "./dist/index.js"
59
+ },
60
+ "./provider": {
61
+ "types": "./dist/provider.d.ts",
62
+ "import": "./dist/provider.js"
63
+ },
64
+ "./hooks": {
65
+ "types": "./dist/hooks/index.d.ts",
66
+ "import": "./dist/hooks/index.js"
67
+ },
68
+ "./client": {
69
+ "types": "./dist/client.d.ts",
70
+ "import": "./dist/client.js"
71
+ },
72
+ "./query-keys": {
73
+ "types": "./dist/query-keys.d.ts",
74
+ "import": "./dist/query-keys.js"
75
+ },
76
+ "./operations": {
77
+ "types": "./dist/operations.d.ts",
78
+ "import": "./dist/operations.js"
79
+ }
80
+ },
81
+ "main": "./dist/index.js",
82
+ "types": "./dist/index.d.ts"
83
+ }
84
+ }