@voyantjs/customer-portal 0.26.0 → 0.26.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/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/routes-public.d.ts +352 -74
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +40 -1
- package/dist/service-public.d.ts +80 -0
- package/dist/service-public.d.ts.map +1 -1
- package/dist/service-public.js +218 -34
- package/dist/validation-public.d.ts +73 -45
- package/dist/validation-public.d.ts.map +1 -1
- package/dist/validation-public.js +48 -20
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export { customerPortalRoutes } from "./routes.js";
|
|
|
6
6
|
export type { PublicCustomerPortalRoutes } from "./routes-public.js";
|
|
7
7
|
export { createPublicCustomerPortalRoutes, publicCustomerPortalRoutes } from "./routes-public.js";
|
|
8
8
|
export { publicCustomerPortalService } from "./service-public.js";
|
|
9
|
-
export type { BootstrapCustomerPortalInput, BootstrapCustomerPortalResult, CreateCustomerPortalCompanionInput, CustomerPortalAddress, CustomerPortalBookingBillingContact, CustomerPortalBookingDetail, CustomerPortalBookingDocument, CustomerPortalBookingFinancialDocument, CustomerPortalBookingFinancials, CustomerPortalBookingPayment, CustomerPortalBookingSummary, CustomerPortalBootstrapCandidate, CustomerPortalCompanion, CustomerPortalContactExistsQuery, CustomerPortalContactExistsResult, CustomerPortalPhoneContactExistsQuery, CustomerPortalPhoneContactExistsResult, CustomerPortalProfile, ImportCustomerPortalBookingParticipantsInput, ImportCustomerPortalBookingParticipantsResult, ImportCustomerPortalBookingTravelersInput, ImportCustomerPortalBookingTravelersResult, UpdateCustomerPortalAddressInput, UpdateCustomerPortalCompanionInput, UpdateCustomerPortalProfileInput, } from "./validation-public.js";
|
|
10
|
-
export { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, customerPortalAddressSchema, customerPortalBookingBillingContactSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingFinancialDocumentSchema, customerPortalBookingFinancialsSchema, customerPortalBookingPaymentSchema, customerPortalBookingSummarySchema, customerPortalBootstrapCandidateSchema, customerPortalCompanionSchema, customerPortalContactExistsQuerySchema, customerPortalContactExistsResultSchema, customerPortalPhoneContactExistsQuerySchema, customerPortalPhoneContactExistsResultSchema, customerPortalProfileSchema, importCustomerPortalBookingParticipantsResultSchema, importCustomerPortalBookingParticipantsSchema, importCustomerPortalBookingTravelersResultSchema, importCustomerPortalBookingTravelersSchema, updateCustomerPortalAddressSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileSchema, } from "./validation-public.js";
|
|
9
|
+
export type { BootstrapCustomerPortalInput, BootstrapCustomerPortalResult, CreateCustomerPortalCompanionInput, CreateCustomerPortalProfileDocumentInput, CustomerPortalAddress, CustomerPortalBookingBillingContact, CustomerPortalBookingDetail, CustomerPortalBookingDocument, CustomerPortalBookingFinancialDocument, CustomerPortalBookingFinancials, CustomerPortalBookingPayment, CustomerPortalBookingSummary, CustomerPortalBootstrapCandidate, CustomerPortalCompanion, CustomerPortalContactExistsQuery, CustomerPortalContactExistsResult, CustomerPortalPhoneContactExistsQuery, CustomerPortalPhoneContactExistsResult, CustomerPortalProfile, CustomerPortalProfileDocument, ImportCustomerPortalBookingParticipantsInput, ImportCustomerPortalBookingParticipantsResult, ImportCustomerPortalBookingTravelersInput, ImportCustomerPortalBookingTravelersResult, UpdateCustomerPortalAddressInput, UpdateCustomerPortalCompanionInput, UpdateCustomerPortalProfileDocumentInput, UpdateCustomerPortalProfileInput, } from "./validation-public.js";
|
|
10
|
+
export { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, createCustomerPortalProfileDocumentSchema, customerPortalAddressSchema, customerPortalBookingBillingContactSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingFinancialDocumentSchema, customerPortalBookingFinancialsSchema, customerPortalBookingPaymentSchema, customerPortalBookingSummarySchema, customerPortalBootstrapCandidateSchema, customerPortalCompanionSchema, customerPortalContactExistsQuerySchema, customerPortalContactExistsResultSchema, customerPortalPhoneContactExistsQuerySchema, customerPortalPhoneContactExistsResultSchema, customerPortalProfileDocumentSchema, customerPortalProfileSchema, importCustomerPortalBookingParticipantsResultSchema, importCustomerPortalBookingParticipantsSchema, importCustomerPortalBookingTravelersResultSchema, importCustomerPortalBookingTravelersSchema, updateCustomerPortalAddressSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileDocumentSchema, updateCustomerPortalProfileSchema, } from "./validation-public.js";
|
|
11
11
|
export declare const customerPortalModule: Module;
|
|
12
12
|
export declare function createCustomerPortalHonoModule(options?: PublicCustomerPortalRouteOptions): HonoModule;
|
|
13
13
|
export declare const customerPortalHonoModule: HonoModule;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAMvD,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,oBAAoB,CAAA;AAE3B,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AACpE,OAAO,EAAE,gCAAgC,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AACjE,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,mCAAmC,EACnC,2BAA2B,EA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wBAAwB,CAAA;AAE/B,eAAO,MAAM,oBAAoB,EAAE,MAElC,CAAA;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,GAAE,gCAAqC,GAC7C,UAAU,CAeZ;AAED,eAAO,MAAM,wBAAwB,EAAE,UAA6C,CAAA;AAEpF,YAAY,EACV,0BAA0B,EAC1B,gCAAgC,EAChC,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,+BAA+B,EAC/B,qCAAqC,EACrC,2CAA2C,GAC5C,MAAM,oBAAoB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createPublicCustomerPortalRoutes, } from "./routes-public.js";
|
|
|
3
3
|
export { customerPortalRoutes } from "./routes.js";
|
|
4
4
|
export { createPublicCustomerPortalRoutes, publicCustomerPortalRoutes } from "./routes-public.js";
|
|
5
5
|
export { publicCustomerPortalService } from "./service-public.js";
|
|
6
|
-
export { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, customerPortalAddressSchema, customerPortalBookingBillingContactSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingFinancialDocumentSchema, customerPortalBookingFinancialsSchema, customerPortalBookingPaymentSchema, customerPortalBookingSummarySchema, customerPortalBootstrapCandidateSchema, customerPortalCompanionSchema, customerPortalContactExistsQuerySchema, customerPortalContactExistsResultSchema, customerPortalPhoneContactExistsQuerySchema, customerPortalPhoneContactExistsResultSchema, customerPortalProfileSchema, importCustomerPortalBookingParticipantsResultSchema, importCustomerPortalBookingParticipantsSchema, importCustomerPortalBookingTravelersResultSchema, importCustomerPortalBookingTravelersSchema, updateCustomerPortalAddressSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileSchema, } from "./validation-public.js";
|
|
6
|
+
export { bootstrapCustomerPortalResultSchema, bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, createCustomerPortalProfileDocumentSchema, customerPortalAddressSchema, customerPortalBookingBillingContactSchema, customerPortalBookingDetailSchema, customerPortalBookingDocumentSchema, customerPortalBookingFinancialDocumentSchema, customerPortalBookingFinancialsSchema, customerPortalBookingPaymentSchema, customerPortalBookingSummarySchema, customerPortalBootstrapCandidateSchema, customerPortalCompanionSchema, customerPortalContactExistsQuerySchema, customerPortalContactExistsResultSchema, customerPortalPhoneContactExistsQuerySchema, customerPortalPhoneContactExistsResultSchema, customerPortalProfileDocumentSchema, customerPortalProfileSchema, importCustomerPortalBookingParticipantsResultSchema, importCustomerPortalBookingParticipantsSchema, importCustomerPortalBookingTravelersResultSchema, importCustomerPortalBookingTravelersSchema, updateCustomerPortalAddressSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileDocumentSchema, updateCustomerPortalProfileSchema, } from "./validation-public.js";
|
|
7
7
|
export const customerPortalModule = {
|
|
8
8
|
name: "customer-portal",
|
|
9
9
|
};
|
package/dist/routes-public.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ type Env = {
|
|
|
11
11
|
export interface PublicCustomerPortalRouteOptions {
|
|
12
12
|
resolveDocumentDownloadUrl?: (bindings: unknown, storageKey: string) => Promise<string | null> | string | null;
|
|
13
13
|
}
|
|
14
|
-
export declare function createPublicCustomerPortalRoutes(options?: PublicCustomerPortalRouteOptions): import("hono/hono-base").HonoBase<Env, ((((((((((({
|
|
14
|
+
export declare function createPublicCustomerPortalRoutes(options?: PublicCustomerPortalRouteOptions): import("hono/hono-base").HonoBase<Env, (((((((((((((((({
|
|
15
15
|
"/me": {
|
|
16
16
|
$get: {
|
|
17
17
|
input: {};
|
|
@@ -36,15 +36,10 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
36
36
|
addressLine1: string | null;
|
|
37
37
|
addressLine2: string | null;
|
|
38
38
|
} | null;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
issuingCountry: string;
|
|
44
|
-
nationality: string | null;
|
|
45
|
-
expiryDate: string;
|
|
46
|
-
issueDate: string | null;
|
|
47
|
-
}[];
|
|
39
|
+
accessibility: string | null;
|
|
40
|
+
dietary: string | null;
|
|
41
|
+
loyalty: string | null;
|
|
42
|
+
insurance: string | null;
|
|
48
43
|
marketingConsent: boolean;
|
|
49
44
|
marketingConsentAt: string | null;
|
|
50
45
|
marketingConsentSource: string | null;
|
|
@@ -147,15 +142,10 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
147
142
|
addressLine1: string | null;
|
|
148
143
|
addressLine2: string | null;
|
|
149
144
|
} | null;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
issuingCountry: string;
|
|
155
|
-
nationality: string | null;
|
|
156
|
-
expiryDate: string;
|
|
157
|
-
issueDate: string | null;
|
|
158
|
-
}[];
|
|
145
|
+
accessibility: string | null;
|
|
146
|
+
dietary: string | null;
|
|
147
|
+
loyalty: string | null;
|
|
148
|
+
insurance: string | null;
|
|
159
149
|
marketingConsent: boolean;
|
|
160
150
|
marketingConsentAt: string | null;
|
|
161
151
|
marketingConsentSource: string | null;
|
|
@@ -241,15 +231,10 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
241
231
|
addressLine1: string | null;
|
|
242
232
|
addressLine2: string | null;
|
|
243
233
|
} | null;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
issuingCountry: string;
|
|
249
|
-
nationality: string | null;
|
|
250
|
-
expiryDate: string;
|
|
251
|
-
issueDate: string | null;
|
|
252
|
-
}[];
|
|
234
|
+
accessibility: string | null;
|
|
235
|
+
dietary: string | null;
|
|
236
|
+
loyalty: string | null;
|
|
237
|
+
insurance: string | null;
|
|
253
238
|
marketingConsent: boolean;
|
|
254
239
|
marketingConsentAt: string | null;
|
|
255
240
|
marketingConsentSource: string | null;
|
|
@@ -289,6 +274,165 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
289
274
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
290
275
|
};
|
|
291
276
|
};
|
|
277
|
+
}) & {
|
|
278
|
+
"/me/documents": {
|
|
279
|
+
$get: {
|
|
280
|
+
input: {};
|
|
281
|
+
output: {
|
|
282
|
+
data: {
|
|
283
|
+
id: string;
|
|
284
|
+
type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
|
|
285
|
+
number: string | null;
|
|
286
|
+
issuingAuthority: string | null;
|
|
287
|
+
issuingCountry: string | null;
|
|
288
|
+
issueDate: string | null;
|
|
289
|
+
expiryDate: string | null;
|
|
290
|
+
attachmentId: string | null;
|
|
291
|
+
isPrimary: boolean;
|
|
292
|
+
notes: string | null;
|
|
293
|
+
createdAt: string;
|
|
294
|
+
updatedAt: string;
|
|
295
|
+
}[];
|
|
296
|
+
};
|
|
297
|
+
outputFormat: "json";
|
|
298
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
}) & {
|
|
302
|
+
"/me/documents": {
|
|
303
|
+
$post: {
|
|
304
|
+
input: {};
|
|
305
|
+
output: {
|
|
306
|
+
error: string;
|
|
307
|
+
};
|
|
308
|
+
outputFormat: "json";
|
|
309
|
+
status: 404;
|
|
310
|
+
} | {
|
|
311
|
+
input: {};
|
|
312
|
+
output: {
|
|
313
|
+
data: {
|
|
314
|
+
id: string;
|
|
315
|
+
type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
|
|
316
|
+
number: string | null;
|
|
317
|
+
issuingAuthority: string | null;
|
|
318
|
+
issuingCountry: string | null;
|
|
319
|
+
issueDate: string | null;
|
|
320
|
+
expiryDate: string | null;
|
|
321
|
+
attachmentId: string | null;
|
|
322
|
+
isPrimary: boolean;
|
|
323
|
+
notes: string | null;
|
|
324
|
+
createdAt: string;
|
|
325
|
+
updatedAt: string;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
outputFormat: "json";
|
|
329
|
+
status: 201;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
}) & {
|
|
333
|
+
"/me/documents/:id": {
|
|
334
|
+
$patch: {
|
|
335
|
+
input: {
|
|
336
|
+
param: {
|
|
337
|
+
id: string;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
output: {
|
|
341
|
+
error: string;
|
|
342
|
+
};
|
|
343
|
+
outputFormat: "json";
|
|
344
|
+
status: 404;
|
|
345
|
+
} | {
|
|
346
|
+
input: {
|
|
347
|
+
param: {
|
|
348
|
+
id: string;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
output: {
|
|
352
|
+
data: {
|
|
353
|
+
id: string;
|
|
354
|
+
type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
|
|
355
|
+
number: string | null;
|
|
356
|
+
issuingAuthority: string | null;
|
|
357
|
+
issuingCountry: string | null;
|
|
358
|
+
issueDate: string | null;
|
|
359
|
+
expiryDate: string | null;
|
|
360
|
+
attachmentId: string | null;
|
|
361
|
+
isPrimary: boolean;
|
|
362
|
+
notes: string | null;
|
|
363
|
+
createdAt: string;
|
|
364
|
+
updatedAt: string;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
outputFormat: "json";
|
|
368
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
}) & {
|
|
372
|
+
"/me/documents/:id": {
|
|
373
|
+
$delete: {
|
|
374
|
+
input: {
|
|
375
|
+
param: {
|
|
376
|
+
id: string;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
output: {
|
|
380
|
+
error: string;
|
|
381
|
+
};
|
|
382
|
+
outputFormat: "json";
|
|
383
|
+
status: 404;
|
|
384
|
+
} | {
|
|
385
|
+
input: {
|
|
386
|
+
param: {
|
|
387
|
+
id: string;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
output: {
|
|
391
|
+
success: true;
|
|
392
|
+
};
|
|
393
|
+
outputFormat: "json";
|
|
394
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
}) & {
|
|
398
|
+
"/me/documents/:id/set-primary": {
|
|
399
|
+
$post: {
|
|
400
|
+
input: {
|
|
401
|
+
param: {
|
|
402
|
+
id: string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
output: {
|
|
406
|
+
error: string;
|
|
407
|
+
};
|
|
408
|
+
outputFormat: "json";
|
|
409
|
+
status: 404;
|
|
410
|
+
} | {
|
|
411
|
+
input: {
|
|
412
|
+
param: {
|
|
413
|
+
id: string;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
output: {
|
|
417
|
+
data: {
|
|
418
|
+
id: string;
|
|
419
|
+
type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
|
|
420
|
+
number: string | null;
|
|
421
|
+
issuingAuthority: string | null;
|
|
422
|
+
issuingCountry: string | null;
|
|
423
|
+
issueDate: string | null;
|
|
424
|
+
expiryDate: string | null;
|
|
425
|
+
attachmentId: string | null;
|
|
426
|
+
isPrimary: boolean;
|
|
427
|
+
notes: string | null;
|
|
428
|
+
createdAt: string;
|
|
429
|
+
updatedAt: string;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
outputFormat: "json";
|
|
433
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
434
|
+
};
|
|
435
|
+
};
|
|
292
436
|
}) & {
|
|
293
437
|
"/bootstrap": {
|
|
294
438
|
$post: {
|
|
@@ -330,15 +474,10 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
330
474
|
addressLine1: string | null;
|
|
331
475
|
addressLine2: string | null;
|
|
332
476
|
} | null;
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
issuingCountry: string;
|
|
338
|
-
nationality: string | null;
|
|
339
|
-
expiryDate: string;
|
|
340
|
-
issueDate: string | null;
|
|
341
|
-
}[];
|
|
477
|
+
accessibility: string | null;
|
|
478
|
+
dietary: string | null;
|
|
479
|
+
loyalty: string | null;
|
|
480
|
+
insurance: string | null;
|
|
342
481
|
marketingConsent: boolean;
|
|
343
482
|
marketingConsentAt: string | null;
|
|
344
483
|
marketingConsentSource: string | null;
|
|
@@ -824,7 +963,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
824
963
|
};
|
|
825
964
|
};
|
|
826
965
|
}, "/", "/bookings/:bookingId/billing-contact">;
|
|
827
|
-
export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBase<Env, ((((((((((({
|
|
966
|
+
export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBase<Env, (((((((((((((((({
|
|
828
967
|
"/me": {
|
|
829
968
|
$get: {
|
|
830
969
|
input: {};
|
|
@@ -849,15 +988,10 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
849
988
|
addressLine1: string | null;
|
|
850
989
|
addressLine2: string | null;
|
|
851
990
|
} | null;
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
issuingCountry: string;
|
|
857
|
-
nationality: string | null;
|
|
858
|
-
expiryDate: string;
|
|
859
|
-
issueDate: string | null;
|
|
860
|
-
}[];
|
|
991
|
+
accessibility: string | null;
|
|
992
|
+
dietary: string | null;
|
|
993
|
+
loyalty: string | null;
|
|
994
|
+
insurance: string | null;
|
|
861
995
|
marketingConsent: boolean;
|
|
862
996
|
marketingConsentAt: string | null;
|
|
863
997
|
marketingConsentSource: string | null;
|
|
@@ -960,15 +1094,10 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
960
1094
|
addressLine1: string | null;
|
|
961
1095
|
addressLine2: string | null;
|
|
962
1096
|
} | null;
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
issuingCountry: string;
|
|
968
|
-
nationality: string | null;
|
|
969
|
-
expiryDate: string;
|
|
970
|
-
issueDate: string | null;
|
|
971
|
-
}[];
|
|
1097
|
+
accessibility: string | null;
|
|
1098
|
+
dietary: string | null;
|
|
1099
|
+
loyalty: string | null;
|
|
1100
|
+
insurance: string | null;
|
|
972
1101
|
marketingConsent: boolean;
|
|
973
1102
|
marketingConsentAt: string | null;
|
|
974
1103
|
marketingConsentSource: string | null;
|
|
@@ -1054,15 +1183,10 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1054
1183
|
addressLine1: string | null;
|
|
1055
1184
|
addressLine2: string | null;
|
|
1056
1185
|
} | null;
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
issuingCountry: string;
|
|
1062
|
-
nationality: string | null;
|
|
1063
|
-
expiryDate: string;
|
|
1064
|
-
issueDate: string | null;
|
|
1065
|
-
}[];
|
|
1186
|
+
accessibility: string | null;
|
|
1187
|
+
dietary: string | null;
|
|
1188
|
+
loyalty: string | null;
|
|
1189
|
+
insurance: string | null;
|
|
1066
1190
|
marketingConsent: boolean;
|
|
1067
1191
|
marketingConsentAt: string | null;
|
|
1068
1192
|
marketingConsentSource: string | null;
|
|
@@ -1102,6 +1226,165 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1102
1226
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1103
1227
|
};
|
|
1104
1228
|
};
|
|
1229
|
+
}) & {
|
|
1230
|
+
"/me/documents": {
|
|
1231
|
+
$get: {
|
|
1232
|
+
input: {};
|
|
1233
|
+
output: {
|
|
1234
|
+
data: {
|
|
1235
|
+
id: string;
|
|
1236
|
+
type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
|
|
1237
|
+
number: string | null;
|
|
1238
|
+
issuingAuthority: string | null;
|
|
1239
|
+
issuingCountry: string | null;
|
|
1240
|
+
issueDate: string | null;
|
|
1241
|
+
expiryDate: string | null;
|
|
1242
|
+
attachmentId: string | null;
|
|
1243
|
+
isPrimary: boolean;
|
|
1244
|
+
notes: string | null;
|
|
1245
|
+
createdAt: string;
|
|
1246
|
+
updatedAt: string;
|
|
1247
|
+
}[];
|
|
1248
|
+
};
|
|
1249
|
+
outputFormat: "json";
|
|
1250
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1251
|
+
};
|
|
1252
|
+
};
|
|
1253
|
+
}) & {
|
|
1254
|
+
"/me/documents": {
|
|
1255
|
+
$post: {
|
|
1256
|
+
input: {};
|
|
1257
|
+
output: {
|
|
1258
|
+
error: string;
|
|
1259
|
+
};
|
|
1260
|
+
outputFormat: "json";
|
|
1261
|
+
status: 404;
|
|
1262
|
+
} | {
|
|
1263
|
+
input: {};
|
|
1264
|
+
output: {
|
|
1265
|
+
data: {
|
|
1266
|
+
id: string;
|
|
1267
|
+
type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
|
|
1268
|
+
number: string | null;
|
|
1269
|
+
issuingAuthority: string | null;
|
|
1270
|
+
issuingCountry: string | null;
|
|
1271
|
+
issueDate: string | null;
|
|
1272
|
+
expiryDate: string | null;
|
|
1273
|
+
attachmentId: string | null;
|
|
1274
|
+
isPrimary: boolean;
|
|
1275
|
+
notes: string | null;
|
|
1276
|
+
createdAt: string;
|
|
1277
|
+
updatedAt: string;
|
|
1278
|
+
};
|
|
1279
|
+
};
|
|
1280
|
+
outputFormat: "json";
|
|
1281
|
+
status: 201;
|
|
1282
|
+
};
|
|
1283
|
+
};
|
|
1284
|
+
}) & {
|
|
1285
|
+
"/me/documents/:id": {
|
|
1286
|
+
$patch: {
|
|
1287
|
+
input: {
|
|
1288
|
+
param: {
|
|
1289
|
+
id: string;
|
|
1290
|
+
};
|
|
1291
|
+
};
|
|
1292
|
+
output: {
|
|
1293
|
+
error: string;
|
|
1294
|
+
};
|
|
1295
|
+
outputFormat: "json";
|
|
1296
|
+
status: 404;
|
|
1297
|
+
} | {
|
|
1298
|
+
input: {
|
|
1299
|
+
param: {
|
|
1300
|
+
id: string;
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
output: {
|
|
1304
|
+
data: {
|
|
1305
|
+
id: string;
|
|
1306
|
+
type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
|
|
1307
|
+
number: string | null;
|
|
1308
|
+
issuingAuthority: string | null;
|
|
1309
|
+
issuingCountry: string | null;
|
|
1310
|
+
issueDate: string | null;
|
|
1311
|
+
expiryDate: string | null;
|
|
1312
|
+
attachmentId: string | null;
|
|
1313
|
+
isPrimary: boolean;
|
|
1314
|
+
notes: string | null;
|
|
1315
|
+
createdAt: string;
|
|
1316
|
+
updatedAt: string;
|
|
1317
|
+
};
|
|
1318
|
+
};
|
|
1319
|
+
outputFormat: "json";
|
|
1320
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1321
|
+
};
|
|
1322
|
+
};
|
|
1323
|
+
}) & {
|
|
1324
|
+
"/me/documents/:id": {
|
|
1325
|
+
$delete: {
|
|
1326
|
+
input: {
|
|
1327
|
+
param: {
|
|
1328
|
+
id: string;
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
output: {
|
|
1332
|
+
error: string;
|
|
1333
|
+
};
|
|
1334
|
+
outputFormat: "json";
|
|
1335
|
+
status: 404;
|
|
1336
|
+
} | {
|
|
1337
|
+
input: {
|
|
1338
|
+
param: {
|
|
1339
|
+
id: string;
|
|
1340
|
+
};
|
|
1341
|
+
};
|
|
1342
|
+
output: {
|
|
1343
|
+
success: true;
|
|
1344
|
+
};
|
|
1345
|
+
outputFormat: "json";
|
|
1346
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1347
|
+
};
|
|
1348
|
+
};
|
|
1349
|
+
}) & {
|
|
1350
|
+
"/me/documents/:id/set-primary": {
|
|
1351
|
+
$post: {
|
|
1352
|
+
input: {
|
|
1353
|
+
param: {
|
|
1354
|
+
id: string;
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
output: {
|
|
1358
|
+
error: string;
|
|
1359
|
+
};
|
|
1360
|
+
outputFormat: "json";
|
|
1361
|
+
status: 404;
|
|
1362
|
+
} | {
|
|
1363
|
+
input: {
|
|
1364
|
+
param: {
|
|
1365
|
+
id: string;
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
output: {
|
|
1369
|
+
data: {
|
|
1370
|
+
id: string;
|
|
1371
|
+
type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
|
|
1372
|
+
number: string | null;
|
|
1373
|
+
issuingAuthority: string | null;
|
|
1374
|
+
issuingCountry: string | null;
|
|
1375
|
+
issueDate: string | null;
|
|
1376
|
+
expiryDate: string | null;
|
|
1377
|
+
attachmentId: string | null;
|
|
1378
|
+
isPrimary: boolean;
|
|
1379
|
+
notes: string | null;
|
|
1380
|
+
createdAt: string;
|
|
1381
|
+
updatedAt: string;
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
outputFormat: "json";
|
|
1385
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1386
|
+
};
|
|
1387
|
+
};
|
|
1105
1388
|
}) & {
|
|
1106
1389
|
"/bootstrap": {
|
|
1107
1390
|
$post: {
|
|
@@ -1143,15 +1426,10 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1143
1426
|
addressLine1: string | null;
|
|
1144
1427
|
addressLine2: string | null;
|
|
1145
1428
|
} | null;
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
issuingCountry: string;
|
|
1151
|
-
nationality: string | null;
|
|
1152
|
-
expiryDate: string;
|
|
1153
|
-
issueDate: string | null;
|
|
1154
|
-
}[];
|
|
1429
|
+
accessibility: string | null;
|
|
1430
|
+
dietary: string | null;
|
|
1431
|
+
loyalty: string | null;
|
|
1432
|
+
insurance: string | null;
|
|
1155
1433
|
marketingConsent: boolean;
|
|
1156
1434
|
marketingConsentAt: string | null;
|
|
1157
1435
|
marketingConsentSource: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAoBjE,KAAK,GAAG,GAAG;IACT,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,SAAS,EAAE;QACT,SAAS,CAAC,EAAE,eAAe,CAAA;QAC3B,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAoBD,MAAM,WAAW,gCAAgC;IAC/C,0BAA0B,CAAC,EAAE,CAC3B,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;CAC5C;AAED,wBAAgB,gCAAgC,CAAC,OAAO,GAAE,gCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAAqC,CAAA;AAE5E,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA"}
|
package/dist/routes-public.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Hono } from "hono";
|
|
|
3
3
|
import { buildPublicCustomerPortalRouteRuntime, CUSTOMER_PORTAL_ROUTE_RUNTIME_CONTAINER_KEY, } from "./route-runtime.js";
|
|
4
4
|
import { customerPortalRoutes } from "./routes.js";
|
|
5
5
|
import { publicCustomerPortalService } from "./service-public.js";
|
|
6
|
-
import { bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, importCustomerPortalBookingTravelersSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileSchema, } from "./validation-public.js";
|
|
6
|
+
import { bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, createCustomerPortalProfileDocumentSchema, importCustomerPortalBookingTravelersSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileDocumentSchema, updateCustomerPortalProfileSchema, } from "./validation-public.js";
|
|
7
7
|
function notFound(c, error) {
|
|
8
8
|
return c.json({ error }, 404);
|
|
9
9
|
}
|
|
@@ -38,6 +38,45 @@ export function createPublicCustomerPortalRoutes(options = {}) {
|
|
|
38
38
|
return c.json({ error: "Customer record is not linked to this account" }, 409);
|
|
39
39
|
}
|
|
40
40
|
return c.json({ data: result.profile });
|
|
41
|
+
})
|
|
42
|
+
.get("/me/documents", async (c) => {
|
|
43
|
+
const userId = requireUserId(c);
|
|
44
|
+
const data = await publicCustomerPortalService.listMyDocuments(c.get("db"), userId, {
|
|
45
|
+
kms: resolveOptionalKms(c),
|
|
46
|
+
});
|
|
47
|
+
return c.json({ data });
|
|
48
|
+
})
|
|
49
|
+
.post("/me/documents", async (c) => {
|
|
50
|
+
const userId = requireUserId(c);
|
|
51
|
+
const input = await parseJsonBody(c, createCustomerPortalProfileDocumentSchema);
|
|
52
|
+
const row = await publicCustomerPortalService.createMyDocument(c.get("db"), userId, input, {
|
|
53
|
+
kms: resolveOptionalKms(c),
|
|
54
|
+
});
|
|
55
|
+
if (!row)
|
|
56
|
+
return notFound(c, "Customer profile not found");
|
|
57
|
+
return c.json({ data: row }, 201);
|
|
58
|
+
})
|
|
59
|
+
.patch("/me/documents/:id", async (c) => {
|
|
60
|
+
const userId = requireUserId(c);
|
|
61
|
+
const input = await parseJsonBody(c, updateCustomerPortalProfileDocumentSchema);
|
|
62
|
+
const row = await publicCustomerPortalService.updateMyDocument(c.get("db"), userId, c.req.param("id"), input, { kms: resolveOptionalKms(c) });
|
|
63
|
+
if (!row)
|
|
64
|
+
return notFound(c, "Document not found");
|
|
65
|
+
return c.json({ data: row });
|
|
66
|
+
})
|
|
67
|
+
.delete("/me/documents/:id", async (c) => {
|
|
68
|
+
const userId = requireUserId(c);
|
|
69
|
+
const result = await publicCustomerPortalService.deleteMyDocument(c.get("db"), userId, c.req.param("id"));
|
|
70
|
+
if (!result)
|
|
71
|
+
return notFound(c, "Document not found");
|
|
72
|
+
return c.json({ success: true });
|
|
73
|
+
})
|
|
74
|
+
.post("/me/documents/:id/set-primary", async (c) => {
|
|
75
|
+
const userId = requireUserId(c);
|
|
76
|
+
const row = await publicCustomerPortalService.setPrimaryMyDocument(c.get("db"), userId, c.req.param("id"), { kms: resolveOptionalKms(c) });
|
|
77
|
+
if (!row)
|
|
78
|
+
return notFound(c, "Document not found");
|
|
79
|
+
return c.json({ data: row });
|
|
41
80
|
})
|
|
42
81
|
.post("/bootstrap", async (c) => {
|
|
43
82
|
const userId = requireUserId(c);
|