@voyantjs/customer-portal 0.104.19 → 0.104.20
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/routes-public.d.ts +2 -2
- package/dist/service-public-impl.d.ts +138 -0
- package/dist/service-public-impl.d.ts.map +1 -0
- package/dist/service-public-impl.js +1808 -0
- package/dist/service-public.d.ts +1 -137
- package/dist/service-public.d.ts.map +1 -1
- package/dist/service-public.js +1 -1804
- package/dist/validation-public/bookings.d.ts +551 -0
- package/dist/validation-public/bookings.d.ts.map +1 -0
- package/dist/validation-public/bookings.js +132 -0
- package/dist/validation-public/common.d.ts +162 -0
- package/dist/validation-public/common.d.ts.map +1 -0
- package/dist/validation-public/common.js +139 -0
- package/dist/validation-public/profile.d.ts +749 -0
- package/dist/validation-public/profile.d.ts.map +1 -0
- package/dist/validation-public/profile.js +308 -0
- package/dist/validation-public.d.ts +2 -1297
- package/dist/validation-public.d.ts.map +1 -1
- package/dist/validation-public.js +2 -570
- package/package.json +1 -1
package/dist/routes-public.d.ts
CHANGED
|
@@ -887,7 +887,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
887
887
|
id: string;
|
|
888
888
|
bookingItemId: string | null;
|
|
889
889
|
travelerId: string | null;
|
|
890
|
-
fulfillmentType: "other" | "
|
|
890
|
+
fulfillmentType: "other" | "pdf" | "voucher" | "ticket" | "qr_code" | "barcode" | "mobile";
|
|
891
891
|
deliveryChannel: "api" | "email" | "other" | "download" | "wallet";
|
|
892
892
|
status: "failed" | "pending" | "revoked" | "issued" | "reissued";
|
|
893
893
|
artifactUrl: string | null;
|
|
@@ -1847,7 +1847,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1847
1847
|
id: string;
|
|
1848
1848
|
bookingItemId: string | null;
|
|
1849
1849
|
travelerId: string | null;
|
|
1850
|
-
fulfillmentType: "other" | "
|
|
1850
|
+
fulfillmentType: "other" | "pdf" | "voucher" | "ticket" | "qr_code" | "barcode" | "mobile";
|
|
1851
1851
|
deliveryChannel: "api" | "email" | "other" | "download" | "wallet";
|
|
1852
1852
|
status: "failed" | "pending" | "revoked" | "issued" | "reissued";
|
|
1853
1853
|
artifactUrl: string | null;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { type KmsProvider } from "@voyantjs/utils";
|
|
2
|
+
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
3
|
+
import type { BootstrapCustomerPortalInput, BootstrapCustomerPortalResult, CreateCustomerPortalCompanionInput, CustomerPortalBookingDetail, CustomerPortalBookingSummary, CustomerPortalCompanion, CustomerPortalContactExistsResult, CustomerPortalPhoneContactExistsResult, CustomerPortalProfile, ImportCustomerPortalBookingTravelersInput, ImportCustomerPortalBookingTravelersResult, UpdateCustomerPortalCompanionInput, UpdateCustomerPortalProfileInput } from "./validation-public.js";
|
|
4
|
+
interface CustomerPortalServiceOptions {
|
|
5
|
+
kms?: KmsProvider | null;
|
|
6
|
+
resolveDocumentDownloadUrl?: (storageKey: string) => Promise<string | null> | string | null;
|
|
7
|
+
}
|
|
8
|
+
type WireDocumentType = "passport" | "id_card" | "visa" | "drivers_license" | "other";
|
|
9
|
+
export declare const publicCustomerPortalService: {
|
|
10
|
+
contactExists(db: PostgresJsDatabase, email: string): Promise<CustomerPortalContactExistsResult>;
|
|
11
|
+
phoneContactExists(db: PostgresJsDatabase, phone: string): Promise<CustomerPortalPhoneContactExistsResult>;
|
|
12
|
+
getProfile(db: PostgresJsDatabase, userId: string): Promise<CustomerPortalProfile | null>;
|
|
13
|
+
getProfileWithOptions(db: PostgresJsDatabase, userId: string, options?: CustomerPortalServiceOptions): Promise<CustomerPortalProfile | null>;
|
|
14
|
+
updateProfile(db: PostgresJsDatabase, userId: string, input: UpdateCustomerPortalProfileInput): Promise<{
|
|
15
|
+
profile: CustomerPortalProfile;
|
|
16
|
+
} | {
|
|
17
|
+
error: "not_found" | "customer_record_required";
|
|
18
|
+
}>;
|
|
19
|
+
updateProfileWithOptions(db: PostgresJsDatabase, userId: string, input: UpdateCustomerPortalProfileInput, options?: CustomerPortalServiceOptions): Promise<{
|
|
20
|
+
profile: CustomerPortalProfile;
|
|
21
|
+
} | {
|
|
22
|
+
error: "not_found" | "customer_record_required";
|
|
23
|
+
}>;
|
|
24
|
+
bootstrap(db: PostgresJsDatabase, userId: string, input: BootstrapCustomerPortalInput): Promise<BootstrapCustomerPortalResult | {
|
|
25
|
+
error: "not_found" | "customer_record_not_found" | "customer_record_claimed";
|
|
26
|
+
}>;
|
|
27
|
+
listCompanions(db: PostgresJsDatabase, userId: string): Promise<CustomerPortalCompanion[]>;
|
|
28
|
+
importBookingTravelersAsCompanions(db: PostgresJsDatabase, userId: string, input: ImportCustomerPortalBookingTravelersInput): Promise<ImportCustomerPortalBookingTravelersResult | null>;
|
|
29
|
+
importBookingParticipantsAsCompanions(db: PostgresJsDatabase, userId: string, input: ImportCustomerPortalBookingTravelersInput): Promise<ImportCustomerPortalBookingTravelersResult | null>;
|
|
30
|
+
createCompanion(db: PostgresJsDatabase, userId: string, input: CreateCustomerPortalCompanionInput): Promise<CustomerPortalCompanion | null>;
|
|
31
|
+
updateCompanion(db: PostgresJsDatabase, userId: string, companionId: string, input: UpdateCustomerPortalCompanionInput): Promise<CustomerPortalCompanion | null | "forbidden">;
|
|
32
|
+
deleteCompanion(db: PostgresJsDatabase, userId: string, companionId: string): Promise<"deleted" | "not_found" | "forbidden">;
|
|
33
|
+
listBookings(db: PostgresJsDatabase, userId: string): Promise<CustomerPortalBookingSummary[] | null>;
|
|
34
|
+
getBooking(db: PostgresJsDatabase, userId: string, bookingId: string, options?: CustomerPortalServiceOptions): Promise<CustomerPortalBookingDetail | null>;
|
|
35
|
+
listBookingDocuments(db: PostgresJsDatabase, userId: string, bookingId: string, options?: CustomerPortalServiceOptions): Promise<{
|
|
36
|
+
id: string;
|
|
37
|
+
source: "finance" | "legal" | "booking_document";
|
|
38
|
+
travelerId: string | null;
|
|
39
|
+
type: "visa" | "other" | "insurance" | "health" | "passport_copy" | "invoice" | "proforma" | "credit_note" | "contract";
|
|
40
|
+
fileName: string;
|
|
41
|
+
fileUrl: string;
|
|
42
|
+
mimeType: string | null;
|
|
43
|
+
reference: string | null;
|
|
44
|
+
}[] | null>;
|
|
45
|
+
getBookingBillingContact(db: PostgresJsDatabase, userId: string, bookingId: string): Promise<{
|
|
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
|
+
address2: string | null;
|
|
55
|
+
postal: string | null;
|
|
56
|
+
} | null>;
|
|
57
|
+
listMyDocuments(db: PostgresJsDatabase, userId: string, options?: CustomerPortalServiceOptions): Promise<{
|
|
58
|
+
id: string;
|
|
59
|
+
type: WireDocumentType;
|
|
60
|
+
number: string | null;
|
|
61
|
+
issuingAuthority: string | null;
|
|
62
|
+
issuingCountry: string | null;
|
|
63
|
+
issueDate: string | null;
|
|
64
|
+
expiryDate: string | null;
|
|
65
|
+
attachmentId: string | null;
|
|
66
|
+
isPrimary: boolean;
|
|
67
|
+
notes: string | null;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
updatedAt: string;
|
|
70
|
+
}[]>;
|
|
71
|
+
createMyDocument(db: PostgresJsDatabase, userId: string, input: {
|
|
72
|
+
type: WireDocumentType;
|
|
73
|
+
number?: string | null;
|
|
74
|
+
issuingAuthority?: string | null;
|
|
75
|
+
issuingCountry?: string | null;
|
|
76
|
+
issueDate?: string | null;
|
|
77
|
+
expiryDate?: string | null;
|
|
78
|
+
attachmentId?: string | null;
|
|
79
|
+
isPrimary?: boolean;
|
|
80
|
+
notes?: string | null;
|
|
81
|
+
}, options?: CustomerPortalServiceOptions): Promise<{
|
|
82
|
+
id: string;
|
|
83
|
+
type: WireDocumentType;
|
|
84
|
+
number: string | null;
|
|
85
|
+
issuingAuthority: string | null;
|
|
86
|
+
issuingCountry: string | null;
|
|
87
|
+
issueDate: string | null;
|
|
88
|
+
expiryDate: string | null;
|
|
89
|
+
attachmentId: string | null;
|
|
90
|
+
isPrimary: boolean;
|
|
91
|
+
notes: string | null;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
} | null>;
|
|
95
|
+
updateMyDocument(db: PostgresJsDatabase, userId: string, documentId: string, input: {
|
|
96
|
+
type?: WireDocumentType;
|
|
97
|
+
number?: string | null;
|
|
98
|
+
issuingAuthority?: string | null;
|
|
99
|
+
issuingCountry?: string | null;
|
|
100
|
+
issueDate?: string | null;
|
|
101
|
+
expiryDate?: string | null;
|
|
102
|
+
attachmentId?: string | null;
|
|
103
|
+
isPrimary?: boolean;
|
|
104
|
+
notes?: string | null;
|
|
105
|
+
}, options?: CustomerPortalServiceOptions): Promise<{
|
|
106
|
+
id: string;
|
|
107
|
+
type: WireDocumentType;
|
|
108
|
+
number: string | null;
|
|
109
|
+
issuingAuthority: string | null;
|
|
110
|
+
issuingCountry: string | null;
|
|
111
|
+
issueDate: string | null;
|
|
112
|
+
expiryDate: string | null;
|
|
113
|
+
attachmentId: string | null;
|
|
114
|
+
isPrimary: boolean;
|
|
115
|
+
notes: string | null;
|
|
116
|
+
createdAt: string;
|
|
117
|
+
updatedAt: string;
|
|
118
|
+
} | null>;
|
|
119
|
+
deleteMyDocument(db: PostgresJsDatabase, userId: string, documentId: string): Promise<{
|
|
120
|
+
id: string;
|
|
121
|
+
} | null>;
|
|
122
|
+
setPrimaryMyDocument(db: PostgresJsDatabase, userId: string, documentId: string, options?: CustomerPortalServiceOptions): Promise<{
|
|
123
|
+
id: string;
|
|
124
|
+
type: WireDocumentType;
|
|
125
|
+
number: string | null;
|
|
126
|
+
issuingAuthority: string | null;
|
|
127
|
+
issuingCountry: string | null;
|
|
128
|
+
issueDate: string | null;
|
|
129
|
+
expiryDate: string | null;
|
|
130
|
+
attachmentId: string | null;
|
|
131
|
+
isPrimary: boolean;
|
|
132
|
+
notes: string | null;
|
|
133
|
+
createdAt: string;
|
|
134
|
+
updatedAt: string;
|
|
135
|
+
} | null>;
|
|
136
|
+
};
|
|
137
|
+
export {};
|
|
138
|
+
//# sourceMappingURL=service-public-impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-public-impl.d.ts","sourceRoot":"","sources":["../src/service-public-impl.ts"],"names":[],"mappings":"AAyBA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,KAAK,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,kCAAkC,EAGlC,2BAA2B,EAK3B,4BAA4B,EAE5B,uBAAuB,EACvB,iCAAiC,EACjC,sCAAsC,EACtC,qBAAqB,EACrB,yCAAyC,EACzC,0CAA0C,EAE1C,kCAAkC,EAClC,gCAAgC,EACjC,MAAM,wBAAwB,CAAA;AAQ/B,UAAU,4BAA4B;IACpC,GAAG,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACxB,0BAA0B,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;CAC5F;AAsGD,KAAK,gBAAgB,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,iBAAiB,GAAG,OAAO,CAAA;AA4xCrF,eAAO,MAAM,2BAA2B;sBAEhC,kBAAkB,SACf,MAAM,GACZ,OAAO,CAAC,iCAAiC,CAAC;2BAwBvC,kBAAkB,SACf,MAAM,GACZ,OAAO,CAAC,sCAAsC,CAAC;mBAyB7B,kBAAkB,UAAU,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;8BAKzF,kBAAkB,UACd,MAAM,YACJ,4BAA4B,GACrC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