@voyantjs/bookings 0.96.0 → 0.97.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/dist/schema/travel-details.d.ts +2 -7
- package/dist/schema/travel-details.d.ts.map +1 -1
- package/dist/schema/travel-details.js +4 -7
- package/dist/validation-public.d.ts +1 -1063
- package/dist/validation-public.d.ts.map +1 -1
- package/dist/validation-public.js +1 -319
- package/dist/validation-shared.d.ts +1 -117
- package/dist/validation-shared.d.ts.map +1 -1
- package/dist/validation-shared.js +1 -95
- package/dist/validation.d.ts +1 -1287
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +1 -632
- package/package.json +8 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-public.d.ts","sourceRoot":"","sources":["../src/validation-public.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"validation-public.d.ts","sourceRoot":"","sources":["../src/validation-public.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA"}
|
|
@@ -1,319 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { bookingAllocationStatusSchema, bookingAllocationTypeSchema, bookingDocumentTypeSchema, bookingFulfillmentDeliveryChannelSchema, bookingFulfillmentStatusSchema, bookingFulfillmentTypeSchema, bookingItemParticipantRoleSchema, bookingItemStatusSchema, bookingItemTypeSchema, bookingStatusSchema, bookingTravelerCategorySchema, } from "./validation-shared.js";
|
|
3
|
-
const isoDateSchema = z.string().date();
|
|
4
|
-
const isoDateTimeSchema = z.string().datetime();
|
|
5
|
-
const publicBookingTravelerTypeSchema = z.enum(["traveler", "occupant"]);
|
|
6
|
-
const publicBookingVisibleTravelerTypeSchema = z.enum(["traveler", "occupant", "other"]);
|
|
7
|
-
export const publicBookingSessionTravelerInputSchema = z.object({
|
|
8
|
-
id: z.string().optional(),
|
|
9
|
-
participantType: publicBookingTravelerTypeSchema.default("traveler"),
|
|
10
|
-
travelerCategory: bookingTravelerCategorySchema.nullable().optional(),
|
|
11
|
-
firstName: z.string().min(1).max(255),
|
|
12
|
-
lastName: z.string().min(1).max(255),
|
|
13
|
-
email: z.string().email().nullable().optional(),
|
|
14
|
-
phone: z.string().max(50).nullable().optional(),
|
|
15
|
-
preferredLanguage: z.string().max(35).nullable().optional(),
|
|
16
|
-
specialRequests: z.string().nullable().optional(),
|
|
17
|
-
isPrimary: z.boolean().default(false),
|
|
18
|
-
notes: z.string().nullable().optional(),
|
|
19
|
-
});
|
|
20
|
-
export const publicCreateBookingSessionItemSchema = z.object({
|
|
21
|
-
title: z.string().min(1).max(255),
|
|
22
|
-
description: z.string().nullable().optional(),
|
|
23
|
-
itemType: bookingItemTypeSchema.default("unit"),
|
|
24
|
-
quantity: z.number().int().positive().default(1),
|
|
25
|
-
sellCurrency: z.string().min(3).max(3).nullable().optional(),
|
|
26
|
-
unitSellAmountCents: z.number().int().min(0).nullable().optional(),
|
|
27
|
-
totalSellAmountCents: z.number().int().min(0).nullable().optional(),
|
|
28
|
-
costCurrency: z.string().min(3).max(3).nullable().optional(),
|
|
29
|
-
unitCostAmountCents: z.number().int().min(0).nullable().optional(),
|
|
30
|
-
totalCostAmountCents: z.number().int().min(0).nullable().optional(),
|
|
31
|
-
notes: z.string().nullable().optional(),
|
|
32
|
-
productId: z.string().nullable().optional(),
|
|
33
|
-
optionId: z.string().nullable().optional(),
|
|
34
|
-
optionUnitId: z.string().nullable().optional(),
|
|
35
|
-
pricingCategoryId: z.string().nullable().optional(),
|
|
36
|
-
sourceSnapshotId: z.string().nullable().optional(),
|
|
37
|
-
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
38
|
-
availabilitySlotId: z.string().min(1),
|
|
39
|
-
allocationType: bookingAllocationTypeSchema.default("unit"),
|
|
40
|
-
});
|
|
41
|
-
export const publicCreateBookingSessionSchema = z.object({
|
|
42
|
-
externalBookingRef: z.string().nullable().optional(),
|
|
43
|
-
communicationLanguage: z.string().max(35).nullable().optional(),
|
|
44
|
-
sellCurrency: z.string().min(3).max(3),
|
|
45
|
-
baseCurrency: z.string().min(3).max(3).nullable().optional(),
|
|
46
|
-
sellAmountCents: z.number().int().min(0).nullable().optional(),
|
|
47
|
-
baseSellAmountCents: z.number().int().min(0).nullable().optional(),
|
|
48
|
-
costAmountCents: z.number().int().min(0).nullable().optional(),
|
|
49
|
-
baseCostAmountCents: z.number().int().min(0).nullable().optional(),
|
|
50
|
-
marginPercent: z.number().int().nullable().optional(),
|
|
51
|
-
startDate: isoDateSchema.nullable().optional(),
|
|
52
|
-
endDate: isoDateSchema.nullable().optional(),
|
|
53
|
-
pax: z.number().int().positive().nullable().optional(),
|
|
54
|
-
holdMinutes: z
|
|
55
|
-
.number()
|
|
56
|
-
.int()
|
|
57
|
-
.positive()
|
|
58
|
-
.max(24 * 60)
|
|
59
|
-
.optional(),
|
|
60
|
-
holdExpiresAt: isoDateTimeSchema.nullable().optional(),
|
|
61
|
-
items: z.array(publicCreateBookingSessionItemSchema).min(1),
|
|
62
|
-
travelers: z.array(publicBookingSessionTravelerInputSchema).optional(),
|
|
63
|
-
});
|
|
64
|
-
export const publicUpdateBookingSessionSchema = z.object({
|
|
65
|
-
externalBookingRef: z.string().nullable().optional(),
|
|
66
|
-
communicationLanguage: z.string().max(35).nullable().optional(),
|
|
67
|
-
pax: z.number().int().positive().nullable().optional(),
|
|
68
|
-
holdMinutes: z
|
|
69
|
-
.number()
|
|
70
|
-
.int()
|
|
71
|
-
.positive()
|
|
72
|
-
.max(24 * 60)
|
|
73
|
-
.optional(),
|
|
74
|
-
holdExpiresAt: isoDateTimeSchema.nullable().optional(),
|
|
75
|
-
travelers: z.array(publicBookingSessionTravelerInputSchema).optional(),
|
|
76
|
-
removedTravelerIds: z.array(z.string()).default([]),
|
|
77
|
-
});
|
|
78
|
-
export const publicBookingSessionMutationSchema = z.object({
|
|
79
|
-
note: z.string().nullable().optional(),
|
|
80
|
-
});
|
|
81
|
-
export const publicBookingSessionStateSchema = z.object({
|
|
82
|
-
sessionId: z.string(),
|
|
83
|
-
stateKey: z.literal("wizard"),
|
|
84
|
-
currentStep: z.string().nullable(),
|
|
85
|
-
completedSteps: z.array(z.string()),
|
|
86
|
-
payload: z.record(z.string(), z.unknown()),
|
|
87
|
-
version: z.number().int().positive(),
|
|
88
|
-
createdAt: z.string(),
|
|
89
|
-
updatedAt: z.string(),
|
|
90
|
-
});
|
|
91
|
-
export const publicUpsertBookingSessionStateSchema = z.object({
|
|
92
|
-
currentStep: z.string().max(255).nullable().optional(),
|
|
93
|
-
completedSteps: z.array(z.string().min(1).max(255)).optional(),
|
|
94
|
-
payload: z.record(z.string(), z.unknown()).default({}),
|
|
95
|
-
replacePayload: z.boolean().default(false),
|
|
96
|
-
});
|
|
97
|
-
export const publicBookingSessionRepriceSelectionSchema = z.object({
|
|
98
|
-
itemId: z.string(),
|
|
99
|
-
optionId: z.string().nullable().optional(),
|
|
100
|
-
optionUnitId: z.string().nullable().optional(),
|
|
101
|
-
pricingCategoryId: z.string().nullable().optional(),
|
|
102
|
-
quantity: z.number().int().positive().optional(),
|
|
103
|
-
});
|
|
104
|
-
export const publicRepriceBookingSessionSchema = z.object({
|
|
105
|
-
catalogId: z.string().optional(),
|
|
106
|
-
applyToSession: z.boolean().default(false),
|
|
107
|
-
selections: z.array(publicBookingSessionRepriceSelectionSchema).min(1),
|
|
108
|
-
});
|
|
109
|
-
const publicBookingOverviewLocatorShape = {
|
|
110
|
-
bookingId: z.string().min(1).max(50).optional(),
|
|
111
|
-
bookingNumber: z.string().min(1).max(50).optional(),
|
|
112
|
-
bookingCode: z.string().min(1).max(50).optional(),
|
|
113
|
-
};
|
|
114
|
-
export const publicBookingOverviewLookupQuerySchema = z
|
|
115
|
-
.object({
|
|
116
|
-
...publicBookingOverviewLocatorShape,
|
|
117
|
-
email: z.string().email(),
|
|
118
|
-
})
|
|
119
|
-
.refine((value) => Boolean(value.bookingId || value.bookingNumber || value.bookingCode), {
|
|
120
|
-
message: "Provide a bookingId, bookingNumber, or bookingCode",
|
|
121
|
-
});
|
|
122
|
-
export const publicBookingOverviewAccessQuerySchema = z
|
|
123
|
-
.object({
|
|
124
|
-
...publicBookingOverviewLocatorShape,
|
|
125
|
-
email: z.string().email().optional(),
|
|
126
|
-
})
|
|
127
|
-
.refine((value) => Boolean(value.bookingId || value.bookingNumber || value.bookingCode), {
|
|
128
|
-
message: "Provide a bookingId, bookingNumber, or bookingCode",
|
|
129
|
-
});
|
|
130
|
-
export const publicGuestBookingLookupSchema = z.object({
|
|
131
|
-
bookingCode: z.string().min(1).max(50),
|
|
132
|
-
email: z.string().email(),
|
|
133
|
-
});
|
|
134
|
-
export const internalBookingOverviewLookupQuerySchema = z
|
|
135
|
-
.object({
|
|
136
|
-
bookingId: z.string().min(1).max(50).optional(),
|
|
137
|
-
bookingNumber: z.string().min(1).max(50).optional(),
|
|
138
|
-
bookingCode: z.string().min(1).max(50).optional(),
|
|
139
|
-
email: z.string().email().optional(),
|
|
140
|
-
})
|
|
141
|
-
.refine((value) => Boolean(value.bookingId || value.bookingNumber || value.bookingCode), {
|
|
142
|
-
message: "Provide a bookingId, bookingNumber, or bookingCode",
|
|
143
|
-
});
|
|
144
|
-
export const publicBookingSessionTravelerSchema = z.object({
|
|
145
|
-
id: z.string(),
|
|
146
|
-
participantType: publicBookingVisibleTravelerTypeSchema,
|
|
147
|
-
travelerCategory: bookingTravelerCategorySchema.nullable(),
|
|
148
|
-
firstName: z.string(),
|
|
149
|
-
lastName: z.string(),
|
|
150
|
-
email: z.string().nullable(),
|
|
151
|
-
phone: z.string().nullable(),
|
|
152
|
-
preferredLanguage: z.string().nullable(),
|
|
153
|
-
specialRequests: z.string().nullable(),
|
|
154
|
-
isPrimary: z.boolean(),
|
|
155
|
-
notes: z.string().nullable(),
|
|
156
|
-
});
|
|
157
|
-
export const publicBookingSessionItemTravelerSchema = z.object({
|
|
158
|
-
id: z.string(),
|
|
159
|
-
travelerId: z.string(),
|
|
160
|
-
role: bookingItemParticipantRoleSchema,
|
|
161
|
-
isPrimary: z.boolean(),
|
|
162
|
-
});
|
|
163
|
-
export const publicBookingSessionItemSchema = z.object({
|
|
164
|
-
id: z.string(),
|
|
165
|
-
title: z.string(),
|
|
166
|
-
description: z.string().nullable(),
|
|
167
|
-
itemType: bookingItemTypeSchema,
|
|
168
|
-
status: bookingItemStatusSchema,
|
|
169
|
-
serviceDate: z.string().nullable(),
|
|
170
|
-
startsAt: z.string().nullable(),
|
|
171
|
-
endsAt: z.string().nullable(),
|
|
172
|
-
quantity: z.number().int(),
|
|
173
|
-
sellCurrency: z.string(),
|
|
174
|
-
unitSellAmountCents: z.number().int().nullable(),
|
|
175
|
-
totalSellAmountCents: z.number().int().nullable(),
|
|
176
|
-
costCurrency: z.string().nullable(),
|
|
177
|
-
unitCostAmountCents: z.number().int().nullable(),
|
|
178
|
-
totalCostAmountCents: z.number().int().nullable(),
|
|
179
|
-
notes: z.string().nullable(),
|
|
180
|
-
productId: z.string().nullable(),
|
|
181
|
-
optionId: z.string().nullable(),
|
|
182
|
-
optionUnitId: z.string().nullable(),
|
|
183
|
-
pricingCategoryId: z.string().nullable(),
|
|
184
|
-
travelerLinks: z.array(publicBookingSessionItemTravelerSchema),
|
|
185
|
-
});
|
|
186
|
-
export const publicBookingSessionAllocationSchema = z.object({
|
|
187
|
-
id: z.string(),
|
|
188
|
-
bookingItemId: z.string().nullable(),
|
|
189
|
-
productId: z.string().nullable(),
|
|
190
|
-
optionId: z.string().nullable(),
|
|
191
|
-
optionUnitId: z.string().nullable(),
|
|
192
|
-
pricingCategoryId: z.string().nullable(),
|
|
193
|
-
availabilitySlotId: z.string().nullable(),
|
|
194
|
-
quantity: z.number().int(),
|
|
195
|
-
allocationType: bookingAllocationTypeSchema,
|
|
196
|
-
status: bookingAllocationStatusSchema,
|
|
197
|
-
holdExpiresAt: z.string().nullable(),
|
|
198
|
-
confirmedAt: z.string().nullable(),
|
|
199
|
-
releasedAt: z.string().nullable(),
|
|
200
|
-
});
|
|
201
|
-
export const publicBookingSessionChecklistSchema = z.object({
|
|
202
|
-
hasTravelers: z.boolean(),
|
|
203
|
-
hasPrimaryTraveler: z.boolean(),
|
|
204
|
-
hasItems: z.boolean(),
|
|
205
|
-
hasAllocations: z.boolean(),
|
|
206
|
-
readyForConfirmation: z.boolean(),
|
|
207
|
-
});
|
|
208
|
-
export const publicCheckoutCapabilitySchema = z.object({
|
|
209
|
-
token: z.string().min(1),
|
|
210
|
-
expiresAt: z.string(),
|
|
211
|
-
actions: z.array(z.enum([
|
|
212
|
-
"session:read",
|
|
213
|
-
"session:update",
|
|
214
|
-
"session:reprice",
|
|
215
|
-
"session:finalize",
|
|
216
|
-
"payment:read",
|
|
217
|
-
"payment:start",
|
|
218
|
-
])),
|
|
219
|
-
});
|
|
220
|
-
export const publicGuestBookingAccessSchema = z.object({
|
|
221
|
-
token: z.string().min(1),
|
|
222
|
-
expiresAt: z.string(),
|
|
223
|
-
actions: z.array(z.enum(["overview:read", "payment:read", "payment:start"])),
|
|
224
|
-
});
|
|
225
|
-
export const publicBookingSessionSchema = z.object({
|
|
226
|
-
sessionId: z.string(),
|
|
227
|
-
bookingNumber: z.string(),
|
|
228
|
-
status: bookingStatusSchema,
|
|
229
|
-
externalBookingRef: z.string().nullable(),
|
|
230
|
-
communicationLanguage: z.string().nullable(),
|
|
231
|
-
sellCurrency: z.string(),
|
|
232
|
-
sellAmountCents: z.number().int().nullable(),
|
|
233
|
-
startDate: z.string().nullable(),
|
|
234
|
-
endDate: z.string().nullable(),
|
|
235
|
-
pax: z.number().int().nullable(),
|
|
236
|
-
holdExpiresAt: z.string().nullable(),
|
|
237
|
-
confirmedAt: z.string().nullable(),
|
|
238
|
-
expiredAt: z.string().nullable(),
|
|
239
|
-
cancelledAt: z.string().nullable(),
|
|
240
|
-
completedAt: z.string().nullable(),
|
|
241
|
-
travelers: z.array(publicBookingSessionTravelerSchema),
|
|
242
|
-
items: z.array(publicBookingSessionItemSchema),
|
|
243
|
-
allocations: z.array(publicBookingSessionAllocationSchema),
|
|
244
|
-
checklist: publicBookingSessionChecklistSchema,
|
|
245
|
-
state: publicBookingSessionStateSchema.nullable(),
|
|
246
|
-
checkoutCapability: publicCheckoutCapabilitySchema.optional(),
|
|
247
|
-
});
|
|
248
|
-
export const publicBookingSessionRepriceItemSchema = z.object({
|
|
249
|
-
itemId: z.string(),
|
|
250
|
-
title: z.string(),
|
|
251
|
-
productId: z.string().nullable(),
|
|
252
|
-
optionId: z.string().nullable(),
|
|
253
|
-
optionUnitId: z.string().nullable(),
|
|
254
|
-
optionUnitName: z.string().nullable(),
|
|
255
|
-
optionUnitType: z.string().nullable(),
|
|
256
|
-
pricingCategoryId: z.string().nullable(),
|
|
257
|
-
quantity: z.number().int(),
|
|
258
|
-
pricingMode: z.string(),
|
|
259
|
-
unitSellAmountCents: z.number().int().nullable(),
|
|
260
|
-
totalSellAmountCents: z.number().int().nullable(),
|
|
261
|
-
warnings: z.array(z.string()),
|
|
262
|
-
});
|
|
263
|
-
export const publicBookingSessionRepriceSummarySchema = z.object({
|
|
264
|
-
sessionId: z.string(),
|
|
265
|
-
catalogId: z.string().nullable(),
|
|
266
|
-
currencyCode: z.string(),
|
|
267
|
-
totalSellAmountCents: z.number().int(),
|
|
268
|
-
items: z.array(publicBookingSessionRepriceItemSchema),
|
|
269
|
-
warnings: z.array(z.string()),
|
|
270
|
-
appliedToSession: z.boolean(),
|
|
271
|
-
});
|
|
272
|
-
export const publicBookingSessionRepriceResultSchema = z.object({
|
|
273
|
-
pricing: publicBookingSessionRepriceSummarySchema,
|
|
274
|
-
session: publicBookingSessionSchema.nullable(),
|
|
275
|
-
});
|
|
276
|
-
export const publicBookingOverviewTravelerSchema = z.object({
|
|
277
|
-
id: z.string(),
|
|
278
|
-
participantType: publicBookingVisibleTravelerTypeSchema,
|
|
279
|
-
firstName: z.string(),
|
|
280
|
-
lastName: z.string(),
|
|
281
|
-
isPrimary: z.boolean(),
|
|
282
|
-
});
|
|
283
|
-
export const publicBookingOverviewDocumentSchema = z.object({
|
|
284
|
-
id: z.string(),
|
|
285
|
-
travelerId: z.string().nullable(),
|
|
286
|
-
type: bookingDocumentTypeSchema,
|
|
287
|
-
fileName: z.string(),
|
|
288
|
-
fileUrl: z.string(),
|
|
289
|
-
});
|
|
290
|
-
export const publicBookingOverviewFulfillmentSchema = z.object({
|
|
291
|
-
id: z.string(),
|
|
292
|
-
bookingItemId: z.string().nullable(),
|
|
293
|
-
travelerId: z.string().nullable(),
|
|
294
|
-
fulfillmentType: bookingFulfillmentTypeSchema,
|
|
295
|
-
deliveryChannel: bookingFulfillmentDeliveryChannelSchema,
|
|
296
|
-
status: bookingFulfillmentStatusSchema,
|
|
297
|
-
artifactUrl: z.string().nullable(),
|
|
298
|
-
});
|
|
299
|
-
export const publicBookingOverviewSchema = z.object({
|
|
300
|
-
bookingId: z.string(),
|
|
301
|
-
bookingNumber: z.string(),
|
|
302
|
-
status: bookingStatusSchema,
|
|
303
|
-
sellCurrency: z.string(),
|
|
304
|
-
sellAmountCents: z.number().int().nullable(),
|
|
305
|
-
startDate: z.string().nullable(),
|
|
306
|
-
endDate: z.string().nullable(),
|
|
307
|
-
pax: z.number().int().nullable(),
|
|
308
|
-
confirmedAt: z.string().nullable(),
|
|
309
|
-
cancelledAt: z.string().nullable(),
|
|
310
|
-
completedAt: z.string().nullable(),
|
|
311
|
-
travelers: z.array(publicBookingOverviewTravelerSchema),
|
|
312
|
-
items: z.array(publicBookingSessionItemSchema),
|
|
313
|
-
documents: z.array(publicBookingOverviewDocumentSchema),
|
|
314
|
-
fulfillments: z.array(publicBookingOverviewFulfillmentSchema),
|
|
315
|
-
});
|
|
316
|
-
export const publicGuestBookingLookupResponseSchema = z.object({
|
|
317
|
-
overview: publicBookingOverviewSchema,
|
|
318
|
-
guestBookingAccess: publicGuestBookingAccessSchema,
|
|
319
|
-
});
|
|
1
|
+
export * from "@voyantjs/bookings-contracts";
|
|
@@ -1,118 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const bookingStatusSchema: z.ZodEnum<{
|
|
3
|
-
expired: "expired";
|
|
4
|
-
cancelled: "cancelled";
|
|
5
|
-
completed: "completed";
|
|
6
|
-
draft: "draft";
|
|
7
|
-
on_hold: "on_hold";
|
|
8
|
-
awaiting_payment: "awaiting_payment";
|
|
9
|
-
confirmed: "confirmed";
|
|
10
|
-
in_progress: "in_progress";
|
|
11
|
-
}>;
|
|
12
|
-
export declare const supplierConfirmationStatusSchema: z.ZodEnum<{
|
|
13
|
-
cancelled: "cancelled";
|
|
14
|
-
pending: "pending";
|
|
15
|
-
confirmed: "confirmed";
|
|
16
|
-
rejected: "rejected";
|
|
17
|
-
}>;
|
|
18
|
-
export declare const bookingSourceTypeSchema: z.ZodEnum<{
|
|
19
|
-
internal: "internal";
|
|
20
|
-
direct: "direct";
|
|
21
|
-
manual: "manual";
|
|
22
|
-
affiliate: "affiliate";
|
|
23
|
-
ota: "ota";
|
|
24
|
-
reseller: "reseller";
|
|
25
|
-
api_partner: "api_partner";
|
|
26
|
-
}>;
|
|
27
|
-
export declare const bookingParticipantTypeSchema: z.ZodEnum<{
|
|
28
|
-
other: "other";
|
|
29
|
-
traveler: "traveler";
|
|
30
|
-
occupant: "occupant";
|
|
31
|
-
}>;
|
|
32
|
-
export declare const bookingTravelerCategorySchema: z.ZodEnum<{
|
|
33
|
-
child: "child";
|
|
34
|
-
other: "other";
|
|
35
|
-
adult: "adult";
|
|
36
|
-
infant: "infant";
|
|
37
|
-
senior: "senior";
|
|
38
|
-
}>;
|
|
39
|
-
export declare const bookingItemTypeSchema: z.ZodEnum<{
|
|
40
|
-
service: "service";
|
|
41
|
-
other: "other";
|
|
42
|
-
unit: "unit";
|
|
43
|
-
extra: "extra";
|
|
44
|
-
fee: "fee";
|
|
45
|
-
tax: "tax";
|
|
46
|
-
discount: "discount";
|
|
47
|
-
adjustment: "adjustment";
|
|
48
|
-
accommodation: "accommodation";
|
|
49
|
-
transport: "transport";
|
|
50
|
-
}>;
|
|
51
|
-
export declare const bookingItemStatusSchema: z.ZodEnum<{
|
|
52
|
-
expired: "expired";
|
|
53
|
-
cancelled: "cancelled";
|
|
54
|
-
draft: "draft";
|
|
55
|
-
on_hold: "on_hold";
|
|
56
|
-
confirmed: "confirmed";
|
|
57
|
-
fulfilled: "fulfilled";
|
|
58
|
-
}>;
|
|
59
|
-
export declare const bookingItemParticipantRoleSchema: z.ZodEnum<{
|
|
60
|
-
other: "other";
|
|
61
|
-
traveler: "traveler";
|
|
62
|
-
occupant: "occupant";
|
|
63
|
-
beneficiary: "beneficiary";
|
|
64
|
-
}>;
|
|
65
|
-
export declare const bookingStaffAssignmentRoleSchema: z.ZodEnum<{
|
|
66
|
-
other: "other";
|
|
67
|
-
service_assignee: "service_assignee";
|
|
68
|
-
}>;
|
|
69
|
-
export declare const bookingAllocationTypeSchema: z.ZodEnum<{
|
|
70
|
-
resource: "resource";
|
|
71
|
-
unit: "unit";
|
|
72
|
-
pickup: "pickup";
|
|
73
|
-
}>;
|
|
74
|
-
export declare const bookingAllocationStatusSchema: z.ZodEnum<{
|
|
75
|
-
expired: "expired";
|
|
76
|
-
cancelled: "cancelled";
|
|
77
|
-
confirmed: "confirmed";
|
|
78
|
-
fulfilled: "fulfilled";
|
|
79
|
-
held: "held";
|
|
80
|
-
released: "released";
|
|
81
|
-
}>;
|
|
82
|
-
export declare const bookingFulfillmentTypeSchema: z.ZodEnum<{
|
|
83
|
-
other: "other";
|
|
84
|
-
voucher: "voucher";
|
|
85
|
-
ticket: "ticket";
|
|
86
|
-
pdf: "pdf";
|
|
87
|
-
qr_code: "qr_code";
|
|
88
|
-
barcode: "barcode";
|
|
89
|
-
mobile: "mobile";
|
|
90
|
-
}>;
|
|
91
|
-
export declare const bookingFulfillmentDeliveryChannelSchema: z.ZodEnum<{
|
|
92
|
-
api: "api";
|
|
93
|
-
email: "email";
|
|
94
|
-
other: "other";
|
|
95
|
-
download: "download";
|
|
96
|
-
wallet: "wallet";
|
|
97
|
-
}>;
|
|
98
|
-
export declare const bookingFulfillmentStatusSchema: z.ZodEnum<{
|
|
99
|
-
failed: "failed";
|
|
100
|
-
pending: "pending";
|
|
101
|
-
revoked: "revoked";
|
|
102
|
-
issued: "issued";
|
|
103
|
-
reissued: "reissued";
|
|
104
|
-
}>;
|
|
105
|
-
export declare const bookingRedemptionMethodSchema: z.ZodEnum<{
|
|
106
|
-
api: "api";
|
|
107
|
-
other: "other";
|
|
108
|
-
manual: "manual";
|
|
109
|
-
scan: "scan";
|
|
110
|
-
}>;
|
|
111
|
-
export declare const bookingDocumentTypeSchema: z.ZodEnum<{
|
|
112
|
-
visa: "visa";
|
|
113
|
-
other: "other";
|
|
114
|
-
insurance: "insurance";
|
|
115
|
-
health: "health";
|
|
116
|
-
passport_copy: "passport_copy";
|
|
117
|
-
}>;
|
|
1
|
+
export * from "@voyantjs/bookings-contracts";
|
|
118
2
|
//# sourceMappingURL=validation-shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-shared.d.ts","sourceRoot":"","sources":["../src/validation-shared.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"validation-shared.d.ts","sourceRoot":"","sources":["../src/validation-shared.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA"}
|
|
@@ -1,95 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const bookingStatusSchema = z.enum([
|
|
3
|
-
"draft",
|
|
4
|
-
"on_hold",
|
|
5
|
-
"awaiting_payment",
|
|
6
|
-
"confirmed",
|
|
7
|
-
"in_progress",
|
|
8
|
-
"completed",
|
|
9
|
-
"expired",
|
|
10
|
-
"cancelled",
|
|
11
|
-
]);
|
|
12
|
-
export const supplierConfirmationStatusSchema = z.enum([
|
|
13
|
-
"pending",
|
|
14
|
-
"confirmed",
|
|
15
|
-
"rejected",
|
|
16
|
-
"cancelled",
|
|
17
|
-
]);
|
|
18
|
-
export const bookingSourceTypeSchema = z.enum([
|
|
19
|
-
"direct",
|
|
20
|
-
"manual",
|
|
21
|
-
"affiliate",
|
|
22
|
-
"ota",
|
|
23
|
-
"reseller",
|
|
24
|
-
"api_partner",
|
|
25
|
-
"internal",
|
|
26
|
-
]);
|
|
27
|
-
export const bookingParticipantTypeSchema = z.enum(["traveler", "occupant", "other"]);
|
|
28
|
-
export const bookingTravelerCategorySchema = z.enum(["adult", "child", "infant", "senior", "other"]);
|
|
29
|
-
export const bookingItemTypeSchema = z.enum([
|
|
30
|
-
"unit",
|
|
31
|
-
"extra",
|
|
32
|
-
"service",
|
|
33
|
-
"fee",
|
|
34
|
-
"tax",
|
|
35
|
-
"discount",
|
|
36
|
-
"adjustment",
|
|
37
|
-
"accommodation",
|
|
38
|
-
"transport",
|
|
39
|
-
"other",
|
|
40
|
-
]);
|
|
41
|
-
export const bookingItemStatusSchema = z.enum([
|
|
42
|
-
"draft",
|
|
43
|
-
"on_hold",
|
|
44
|
-
"confirmed",
|
|
45
|
-
"cancelled",
|
|
46
|
-
"expired",
|
|
47
|
-
"fulfilled",
|
|
48
|
-
]);
|
|
49
|
-
export const bookingItemParticipantRoleSchema = z.enum([
|
|
50
|
-
"traveler",
|
|
51
|
-
"occupant",
|
|
52
|
-
"beneficiary",
|
|
53
|
-
"other",
|
|
54
|
-
]);
|
|
55
|
-
export const bookingStaffAssignmentRoleSchema = z.enum(["service_assignee", "other"]);
|
|
56
|
-
export const bookingAllocationTypeSchema = z.enum(["unit", "pickup", "resource"]);
|
|
57
|
-
export const bookingAllocationStatusSchema = z.enum([
|
|
58
|
-
"held",
|
|
59
|
-
"confirmed",
|
|
60
|
-
"released",
|
|
61
|
-
"expired",
|
|
62
|
-
"cancelled",
|
|
63
|
-
"fulfilled",
|
|
64
|
-
]);
|
|
65
|
-
export const bookingFulfillmentTypeSchema = z.enum([
|
|
66
|
-
"voucher",
|
|
67
|
-
"ticket",
|
|
68
|
-
"pdf",
|
|
69
|
-
"qr_code",
|
|
70
|
-
"barcode",
|
|
71
|
-
"mobile",
|
|
72
|
-
"other",
|
|
73
|
-
]);
|
|
74
|
-
export const bookingFulfillmentDeliveryChannelSchema = z.enum([
|
|
75
|
-
"download",
|
|
76
|
-
"email",
|
|
77
|
-
"api",
|
|
78
|
-
"wallet",
|
|
79
|
-
"other",
|
|
80
|
-
]);
|
|
81
|
-
export const bookingFulfillmentStatusSchema = z.enum([
|
|
82
|
-
"pending",
|
|
83
|
-
"issued",
|
|
84
|
-
"reissued",
|
|
85
|
-
"revoked",
|
|
86
|
-
"failed",
|
|
87
|
-
]);
|
|
88
|
-
export const bookingRedemptionMethodSchema = z.enum(["manual", "scan", "api", "other"]);
|
|
89
|
-
export const bookingDocumentTypeSchema = z.enum([
|
|
90
|
-
"visa",
|
|
91
|
-
"insurance",
|
|
92
|
-
"health",
|
|
93
|
-
"passport_copy",
|
|
94
|
-
"other",
|
|
95
|
-
]);
|
|
1
|
+
export * from "@voyantjs/bookings-contracts";
|