@voyantjs/bookings 0.1.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.
- package/LICENSE +109 -0
- package/README.md +42 -0
- package/dist/availability-ref.d.ts +418 -0
- package/dist/availability-ref.d.ts.map +1 -0
- package/dist/availability-ref.js +28 -0
- package/dist/extensions/suppliers.d.ts +3 -0
- package/dist/extensions/suppliers.d.ts.map +1 -0
- package/dist/extensions/suppliers.js +103 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/pii.d.ts +29 -0
- package/dist/pii.d.ts.map +1 -0
- package/dist/pii.js +131 -0
- package/dist/products-ref.d.ts +1043 -0
- package/dist/products-ref.d.ts.map +1 -0
- package/dist/products-ref.js +76 -0
- package/dist/routes.d.ts +2171 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +659 -0
- package/dist/schema/travel-details.d.ts +179 -0
- package/dist/schema/travel-details.d.ts.map +1 -0
- package/dist/schema/travel-details.js +46 -0
- package/dist/schema.d.ts +3180 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +509 -0
- package/dist/service.d.ts +5000 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +2016 -0
- package/dist/tasks/expire-stale-holds.d.ts +12 -0
- package/dist/tasks/expire-stale-holds.d.ts.map +1 -0
- package/dist/tasks/expire-stale-holds.js +7 -0
- package/dist/tasks/index.d.ts +2 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/index.js +1 -0
- package/dist/transactions-ref.d.ts +2223 -0
- package/dist/transactions-ref.d.ts.map +1 -0
- package/dist/transactions-ref.js +147 -0
- package/dist/validation.d.ts +643 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +355 -0
- package/package.json +68 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const bookingParticipantIdentitySchema: z.ZodObject<{
|
|
3
|
+
nationality: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4
|
+
passportNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5
|
+
passportExpiry: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
6
|
+
dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const bookingParticipantDietarySchema: z.ZodObject<{
|
|
9
|
+
dietaryRequirements: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const decryptedBookingParticipantTravelDetailSchema: z.ZodObject<{
|
|
12
|
+
participantId: z.ZodString;
|
|
13
|
+
nationality: z.ZodNullable<z.ZodString>;
|
|
14
|
+
passportNumber: z.ZodNullable<z.ZodString>;
|
|
15
|
+
passportExpiry: z.ZodNullable<z.ZodString>;
|
|
16
|
+
dateOfBirth: z.ZodNullable<z.ZodString>;
|
|
17
|
+
dietaryRequirements: z.ZodNullable<z.ZodString>;
|
|
18
|
+
isLeadTraveler: z.ZodBoolean;
|
|
19
|
+
createdAt: z.ZodDate;
|
|
20
|
+
updatedAt: z.ZodDate;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const bookingParticipantTravelDetails: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
23
|
+
name: "booking_participant_travel_details";
|
|
24
|
+
schema: undefined;
|
|
25
|
+
columns: {
|
|
26
|
+
participantId: import("drizzle-orm/pg-core").PgColumn<{
|
|
27
|
+
name: "participant_id";
|
|
28
|
+
tableName: "booking_participant_travel_details";
|
|
29
|
+
dataType: "string";
|
|
30
|
+
columnType: "PgText";
|
|
31
|
+
data: string;
|
|
32
|
+
driverParam: string;
|
|
33
|
+
notNull: true;
|
|
34
|
+
hasDefault: false;
|
|
35
|
+
isPrimaryKey: true;
|
|
36
|
+
isAutoincrement: false;
|
|
37
|
+
hasRuntimeDefault: false;
|
|
38
|
+
enumValues: [string, ...string[]];
|
|
39
|
+
baseColumn: never;
|
|
40
|
+
identity: undefined;
|
|
41
|
+
generated: undefined;
|
|
42
|
+
}, {}, {}>;
|
|
43
|
+
identityEncrypted: import("drizzle-orm/pg-core").PgColumn<{
|
|
44
|
+
name: "identity_encrypted";
|
|
45
|
+
tableName: "booking_participant_travel_details";
|
|
46
|
+
dataType: "json";
|
|
47
|
+
columnType: "PgJsonb";
|
|
48
|
+
data: {
|
|
49
|
+
enc: string;
|
|
50
|
+
} | null;
|
|
51
|
+
driverParam: unknown;
|
|
52
|
+
notNull: false;
|
|
53
|
+
hasDefault: false;
|
|
54
|
+
isPrimaryKey: false;
|
|
55
|
+
isAutoincrement: false;
|
|
56
|
+
hasRuntimeDefault: false;
|
|
57
|
+
enumValues: undefined;
|
|
58
|
+
baseColumn: never;
|
|
59
|
+
identity: undefined;
|
|
60
|
+
generated: undefined;
|
|
61
|
+
}, {}, {
|
|
62
|
+
$type: {
|
|
63
|
+
enc: string;
|
|
64
|
+
} | null;
|
|
65
|
+
}>;
|
|
66
|
+
dietaryEncrypted: import("drizzle-orm/pg-core").PgColumn<{
|
|
67
|
+
name: "dietary_encrypted";
|
|
68
|
+
tableName: "booking_participant_travel_details";
|
|
69
|
+
dataType: "json";
|
|
70
|
+
columnType: "PgJsonb";
|
|
71
|
+
data: {
|
|
72
|
+
enc: string;
|
|
73
|
+
} | null;
|
|
74
|
+
driverParam: unknown;
|
|
75
|
+
notNull: false;
|
|
76
|
+
hasDefault: false;
|
|
77
|
+
isPrimaryKey: false;
|
|
78
|
+
isAutoincrement: false;
|
|
79
|
+
hasRuntimeDefault: false;
|
|
80
|
+
enumValues: undefined;
|
|
81
|
+
baseColumn: never;
|
|
82
|
+
identity: undefined;
|
|
83
|
+
generated: undefined;
|
|
84
|
+
}, {}, {
|
|
85
|
+
$type: {
|
|
86
|
+
enc: string;
|
|
87
|
+
} | null;
|
|
88
|
+
}>;
|
|
89
|
+
isLeadTraveler: import("drizzle-orm/pg-core").PgColumn<{
|
|
90
|
+
name: "is_lead_traveler";
|
|
91
|
+
tableName: "booking_participant_travel_details";
|
|
92
|
+
dataType: "boolean";
|
|
93
|
+
columnType: "PgBoolean";
|
|
94
|
+
data: boolean;
|
|
95
|
+
driverParam: boolean;
|
|
96
|
+
notNull: true;
|
|
97
|
+
hasDefault: true;
|
|
98
|
+
isPrimaryKey: false;
|
|
99
|
+
isAutoincrement: false;
|
|
100
|
+
hasRuntimeDefault: false;
|
|
101
|
+
enumValues: undefined;
|
|
102
|
+
baseColumn: never;
|
|
103
|
+
identity: undefined;
|
|
104
|
+
generated: undefined;
|
|
105
|
+
}, {}, {}>;
|
|
106
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
107
|
+
name: "created_at";
|
|
108
|
+
tableName: "booking_participant_travel_details";
|
|
109
|
+
dataType: "date";
|
|
110
|
+
columnType: "PgTimestamp";
|
|
111
|
+
data: Date;
|
|
112
|
+
driverParam: string;
|
|
113
|
+
notNull: true;
|
|
114
|
+
hasDefault: true;
|
|
115
|
+
isPrimaryKey: false;
|
|
116
|
+
isAutoincrement: false;
|
|
117
|
+
hasRuntimeDefault: false;
|
|
118
|
+
enumValues: undefined;
|
|
119
|
+
baseColumn: never;
|
|
120
|
+
identity: undefined;
|
|
121
|
+
generated: undefined;
|
|
122
|
+
}, {}, {}>;
|
|
123
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
124
|
+
name: "updated_at";
|
|
125
|
+
tableName: "booking_participant_travel_details";
|
|
126
|
+
dataType: "date";
|
|
127
|
+
columnType: "PgTimestamp";
|
|
128
|
+
data: Date;
|
|
129
|
+
driverParam: string;
|
|
130
|
+
notNull: true;
|
|
131
|
+
hasDefault: true;
|
|
132
|
+
isPrimaryKey: false;
|
|
133
|
+
isAutoincrement: false;
|
|
134
|
+
hasRuntimeDefault: false;
|
|
135
|
+
enumValues: undefined;
|
|
136
|
+
baseColumn: never;
|
|
137
|
+
identity: undefined;
|
|
138
|
+
generated: undefined;
|
|
139
|
+
}, {}, {}>;
|
|
140
|
+
};
|
|
141
|
+
dialect: "pg";
|
|
142
|
+
}>;
|
|
143
|
+
export declare const bookingParticipantTravelDetailInsertSchema: z.ZodObject<{
|
|
144
|
+
participantId: z.ZodString;
|
|
145
|
+
identityEncrypted: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
146
|
+
enc: z.ZodString;
|
|
147
|
+
}, z.core.$strip>>>>;
|
|
148
|
+
dietaryEncrypted: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
149
|
+
enc: z.ZodString;
|
|
150
|
+
}, z.core.$strip>>>>;
|
|
151
|
+
isLeadTraveler: z.ZodDefault<z.ZodBoolean>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export declare const bookingParticipantTravelDetailUpdateSchema: z.ZodObject<{
|
|
154
|
+
isLeadTraveler: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
155
|
+
identityEncrypted: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
156
|
+
enc: z.ZodString;
|
|
157
|
+
}, z.core.$strip>>>>>;
|
|
158
|
+
dietaryEncrypted: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
159
|
+
enc: z.ZodString;
|
|
160
|
+
}, z.core.$strip>>>>>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
export declare const bookingParticipantTravelDetailSelectSchema: z.ZodObject<{
|
|
163
|
+
participantId: z.ZodString;
|
|
164
|
+
identityEncrypted: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
165
|
+
enc: z.ZodString;
|
|
166
|
+
}, z.core.$strip>>>>;
|
|
167
|
+
dietaryEncrypted: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
168
|
+
enc: z.ZodString;
|
|
169
|
+
}, z.core.$strip>>>>;
|
|
170
|
+
isLeadTraveler: z.ZodDefault<z.ZodBoolean>;
|
|
171
|
+
createdAt: z.ZodDate;
|
|
172
|
+
updatedAt: z.ZodDate;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
export type BookingParticipantIdentity = z.infer<typeof bookingParticipantIdentitySchema>;
|
|
175
|
+
export type BookingParticipantDietary = z.infer<typeof bookingParticipantDietarySchema>;
|
|
176
|
+
export type BookingParticipantTravelDetail = typeof bookingParticipantTravelDetails.$inferSelect;
|
|
177
|
+
export type NewBookingParticipantTravelDetail = typeof bookingParticipantTravelDetails.$inferInsert;
|
|
178
|
+
export type DecryptedBookingParticipantTravelDetail = z.infer<typeof decryptedBookingParticipantTravelDetailSchema>;
|
|
179
|
+
//# sourceMappingURL=travel-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"travel-details.d.ts","sourceRoot":"","sources":["../../src/schema/travel-details.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,gCAAgC;;;;;iBAK3C,CAAA;AAEF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;iBAUxD,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa3C,CAAA;AASD,eAAO,MAAM,0CAA0C;;;;;;;;;iBAA2C,CAAA;AAClG,eAAO,MAAM,0CAA0C;;;;;;;;iBAC2B,CAAA;AAClF,eAAO,MAAM,0CAA0C;;;;;;;;;;;iBAInD,CAAA;AAEJ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AACzF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AACvF,MAAM,MAAM,8BAA8B,GACxC,OAAO,+BAA+B,CAAC,YAAY,CAAA;AACrD,MAAM,MAAM,iCAAiC,GAC3C,OAAO,+BAA+B,CAAC,YAAY,CAAA;AACrD,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,6CAA6C,CACrD,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { kmsEnvelopeSchema } from "@voyantjs/db/schema/iam/kms";
|
|
2
|
+
import { boolean, index, jsonb, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { bookingParticipants } from "../schema.js";
|
|
5
|
+
export const bookingParticipantIdentitySchema = z.object({
|
|
6
|
+
nationality: z.string().optional().nullable(),
|
|
7
|
+
passportNumber: z.string().optional().nullable(),
|
|
8
|
+
passportExpiry: z.string().optional().nullable(),
|
|
9
|
+
dateOfBirth: z.string().optional().nullable(),
|
|
10
|
+
});
|
|
11
|
+
export const bookingParticipantDietarySchema = z.object({
|
|
12
|
+
dietaryRequirements: z.string().optional().nullable(),
|
|
13
|
+
});
|
|
14
|
+
export const decryptedBookingParticipantTravelDetailSchema = z.object({
|
|
15
|
+
participantId: z.string(),
|
|
16
|
+
nationality: z.string().nullable(),
|
|
17
|
+
passportNumber: z.string().nullable(),
|
|
18
|
+
passportExpiry: z.string().nullable(),
|
|
19
|
+
dateOfBirth: z.string().nullable(),
|
|
20
|
+
dietaryRequirements: z.string().nullable(),
|
|
21
|
+
isLeadTraveler: z.boolean(),
|
|
22
|
+
createdAt: z.date(),
|
|
23
|
+
updatedAt: z.date(),
|
|
24
|
+
});
|
|
25
|
+
export const bookingParticipantTravelDetails = pgTable("booking_participant_travel_details", {
|
|
26
|
+
participantId: text("participant_id")
|
|
27
|
+
.primaryKey()
|
|
28
|
+
.references(() => bookingParticipants.id, { onDelete: "cascade" }),
|
|
29
|
+
identityEncrypted: jsonb("identity_encrypted").$type(),
|
|
30
|
+
dietaryEncrypted: jsonb("dietary_encrypted").$type(),
|
|
31
|
+
isLeadTraveler: boolean("is_lead_traveler").notNull().default(false),
|
|
32
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
33
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
34
|
+
}, (t) => [index("idx_bptd_lead_traveler").on(t.isLeadTraveler)]);
|
|
35
|
+
const bookingParticipantTravelDetailCoreSchema = z.object({
|
|
36
|
+
participantId: z.string().min(1),
|
|
37
|
+
identityEncrypted: kmsEnvelopeSchema.optional().nullable(),
|
|
38
|
+
dietaryEncrypted: kmsEnvelopeSchema.optional().nullable(),
|
|
39
|
+
isLeadTraveler: z.boolean().default(false),
|
|
40
|
+
});
|
|
41
|
+
export const bookingParticipantTravelDetailInsertSchema = bookingParticipantTravelDetailCoreSchema;
|
|
42
|
+
export const bookingParticipantTravelDetailUpdateSchema = bookingParticipantTravelDetailCoreSchema.partial().omit({ participantId: true });
|
|
43
|
+
export const bookingParticipantTravelDetailSelectSchema = bookingParticipantTravelDetailCoreSchema.extend({
|
|
44
|
+
createdAt: z.date(),
|
|
45
|
+
updatedAt: z.date(),
|
|
46
|
+
});
|