@voyantjs/customer-portal 0.3.1 → 0.4.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 +349 -3
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +42 -3
- package/dist/service-public.d.ts +28 -2
- package/dist/service-public.d.ts.map +1 -1
- package/dist/service-public.js +957 -75
- package/dist/validation-public.d.ts +699 -0
- package/dist/validation-public.d.ts.map +1 -1
- package/dist/validation-public.js +266 -1
- package/package.json +10 -7
package/dist/service-public.d.ts
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
|
+
import { type KmsProvider } from "@voyantjs/utils";
|
|
1
2
|
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
|
-
import type { BootstrapCustomerPortalInput, BootstrapCustomerPortalResult, CreateCustomerPortalCompanionInput, CustomerPortalBookingDetail, CustomerPortalBookingSummary, CustomerPortalCompanion, CustomerPortalContactExistsResult, CustomerPortalPhoneContactExistsResult, CustomerPortalProfile, UpdateCustomerPortalCompanionInput, UpdateCustomerPortalProfileInput } from "./validation-public.js";
|
|
3
|
+
import type { BootstrapCustomerPortalInput, BootstrapCustomerPortalResult, CreateCustomerPortalCompanionInput, CustomerPortalBookingDetail, CustomerPortalBookingSummary, CustomerPortalCompanion, CustomerPortalContactExistsResult, CustomerPortalPhoneContactExistsResult, CustomerPortalProfile, ImportCustomerPortalBookingParticipantsInput, ImportCustomerPortalBookingParticipantsResult, UpdateCustomerPortalCompanionInput, UpdateCustomerPortalProfileInput } from "./validation-public.js";
|
|
4
|
+
interface CustomerPortalServiceOptions {
|
|
5
|
+
kms?: KmsProvider | null;
|
|
6
|
+
}
|
|
3
7
|
export declare const publicCustomerPortalService: {
|
|
4
8
|
contactExists(db: PostgresJsDatabase, email: string): Promise<CustomerPortalContactExistsResult>;
|
|
5
9
|
phoneContactExists(db: PostgresJsDatabase, phone: string): Promise<CustomerPortalPhoneContactExistsResult>;
|
|
6
10
|
getProfile(db: PostgresJsDatabase, userId: string): Promise<CustomerPortalProfile | null>;
|
|
11
|
+
getProfileWithOptions(db: PostgresJsDatabase, userId: string, options?: CustomerPortalServiceOptions): Promise<CustomerPortalProfile | null>;
|
|
7
12
|
updateProfile(db: PostgresJsDatabase, userId: string, input: UpdateCustomerPortalProfileInput): Promise<{
|
|
8
13
|
profile: CustomerPortalProfile;
|
|
9
14
|
} | {
|
|
10
15
|
error: "not_found" | "customer_record_required";
|
|
11
16
|
}>;
|
|
17
|
+
updateProfileWithOptions(db: PostgresJsDatabase, userId: string, input: UpdateCustomerPortalProfileInput, options?: CustomerPortalServiceOptions): Promise<{
|
|
18
|
+
profile: CustomerPortalProfile;
|
|
19
|
+
} | {
|
|
20
|
+
error: "not_found" | "customer_record_required";
|
|
21
|
+
}>;
|
|
12
22
|
bootstrap(db: PostgresJsDatabase, userId: string, input: BootstrapCustomerPortalInput): Promise<BootstrapCustomerPortalResult | {
|
|
13
23
|
error: "not_found" | "customer_record_not_found" | "customer_record_claimed";
|
|
14
24
|
}>;
|
|
15
25
|
listCompanions(db: PostgresJsDatabase, userId: string): Promise<CustomerPortalCompanion[]>;
|
|
26
|
+
importBookingParticipantsAsCompanions(db: PostgresJsDatabase, userId: string, input: ImportCustomerPortalBookingParticipantsInput): Promise<ImportCustomerPortalBookingParticipantsResult | null>;
|
|
16
27
|
createCompanion(db: PostgresJsDatabase, userId: string, input: CreateCustomerPortalCompanionInput): Promise<CustomerPortalCompanion | null>;
|
|
17
28
|
updateCompanion(db: PostgresJsDatabase, userId: string, companionId: string, input: UpdateCustomerPortalCompanionInput): Promise<CustomerPortalCompanion | null | "forbidden">;
|
|
18
29
|
deleteCompanion(db: PostgresJsDatabase, userId: string, companionId: string): Promise<"deleted" | "not_found" | "forbidden">;
|
|
@@ -20,10 +31,25 @@ export declare const publicCustomerPortalService: {
|
|
|
20
31
|
getBooking(db: PostgresJsDatabase, userId: string, bookingId: string): Promise<CustomerPortalBookingDetail | null>;
|
|
21
32
|
listBookingDocuments(db: PostgresJsDatabase, userId: string, bookingId: string): Promise<{
|
|
22
33
|
id: string;
|
|
34
|
+
source: "legal" | "finance" | "booking_document";
|
|
23
35
|
participantId: string | null;
|
|
24
|
-
type: "visa" | "insurance" | "health" | "passport_copy" | "other";
|
|
36
|
+
type: "visa" | "insurance" | "health" | "passport_copy" | "other" | "invoice" | "proforma" | "credit_note" | "contract";
|
|
25
37
|
fileName: string;
|
|
26
38
|
fileUrl: string;
|
|
39
|
+
mimeType: string | null;
|
|
40
|
+
reference: string | null;
|
|
27
41
|
}[] | null>;
|
|
42
|
+
getBookingBillingContact(db: PostgresJsDatabase, userId: string, bookingId: string): Promise<{
|
|
43
|
+
email: string | null;
|
|
44
|
+
phone: string | null;
|
|
45
|
+
firstName: string | null;
|
|
46
|
+
lastName: string | null;
|
|
47
|
+
country: string | null;
|
|
48
|
+
state: string | null;
|
|
49
|
+
city: string | null;
|
|
50
|
+
address1: string | null;
|
|
51
|
+
postal: string | null;
|
|
52
|
+
} | null>;
|
|
28
53
|
};
|
|
54
|
+
export {};
|
|
29
55
|
//# sourceMappingURL=service-public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-public.d.ts","sourceRoot":"","sources":["../src/service-public.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-public.d.ts","sourceRoot":"","sources":["../src/service-public.ts"],"names":[],"mappings":"AAoBA,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,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