@voyant-travel/storefront 0.120.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/LICENSE +201 -0
- package/README.md +231 -0
- package/dist/booking-intents.d.ts +42 -0
- package/dist/booking-intents.d.ts.map +1 -0
- package/dist/booking-intents.js +83 -0
- package/dist/customer-portal/index.d.ts +16 -0
- package/dist/customer-portal/index.d.ts.map +1 -0
- package/dist/customer-portal/index.js +23 -0
- package/dist/customer-portal/route-runtime.d.ts +16 -0
- package/dist/customer-portal/route-runtime.d.ts.map +1 -0
- package/dist/customer-portal/route-runtime.js +27 -0
- package/dist/customer-portal/routes-public.d.ts +1936 -0
- package/dist/customer-portal/routes-public.d.ts.map +1 -0
- package/dist/customer-portal/routes-public.js +165 -0
- package/dist/customer-portal/routes.d.ts +43 -0
- package/dist/customer-portal/routes.d.ts.map +1 -0
- package/dist/customer-portal/routes.js +17 -0
- package/dist/customer-portal/service-public-impl.d.ts +138 -0
- package/dist/customer-portal/service-public-impl.d.ts.map +1 -0
- package/dist/customer-portal/service-public-impl.js +1808 -0
- package/dist/customer-portal/service-public.d.ts +2 -0
- package/dist/customer-portal/service-public.d.ts.map +1 -0
- package/dist/customer-portal/service-public.js +1 -0
- package/dist/customer-portal/validation-public/bookings.d.ts +551 -0
- package/dist/customer-portal/validation-public/bookings.d.ts.map +1 -0
- package/dist/customer-portal/validation-public/bookings.js +132 -0
- package/dist/customer-portal/validation-public/common.d.ts +162 -0
- package/dist/customer-portal/validation-public/common.d.ts.map +1 -0
- package/dist/customer-portal/validation-public/common.js +139 -0
- package/dist/customer-portal/validation-public/profile.d.ts +749 -0
- package/dist/customer-portal/validation-public/profile.d.ts.map +1 -0
- package/dist/customer-portal/validation-public/profile.js +308 -0
- package/dist/customer-portal/validation-public.d.ts +3 -0
- package/dist/customer-portal/validation-public.d.ts.map +1 -0
- package/dist/customer-portal/validation-public.js +2 -0
- package/dist/guest-booking-guard.d.ts +24 -0
- package/dist/guest-booking-guard.d.ts.map +1 -0
- package/dist/guest-booking-guard.js +55 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/product-extra-ref.d.ts +238 -0
- package/dist/product-extra-ref.d.ts.map +1 -0
- package/dist/product-extra-ref.js +22 -0
- package/dist/routes-admin.d.ts +220 -0
- package/dist/routes-admin.d.ts.map +1 -0
- package/dist/routes-admin.js +28 -0
- package/dist/routes-public.d.ts +1475 -0
- package/dist/routes-public.d.ts.map +1 -0
- package/dist/routes-public.js +362 -0
- package/dist/service-booking-session-bootstrap.d.ts +227 -0
- package/dist/service-booking-session-bootstrap.d.ts.map +1 -0
- package/dist/service-booking-session-bootstrap.js +287 -0
- package/dist/service-boundary-resource-sql.d.ts +18 -0
- package/dist/service-boundary-resource-sql.d.ts.map +1 -0
- package/dist/service-boundary-resource-sql.js +73 -0
- package/dist/service-boundary-sql.d.ts +103 -0
- package/dist/service-boundary-sql.d.ts.map +1 -0
- package/dist/service-boundary-sql.js +307 -0
- package/dist/service-departures-core.d.ts +41 -0
- package/dist/service-departures-core.d.ts.map +1 -0
- package/dist/service-departures-core.js +92 -0
- package/dist/service-departures-extensions.d.ts +46 -0
- package/dist/service-departures-extensions.d.ts.map +1 -0
- package/dist/service-departures-extensions.js +81 -0
- package/dist/service-departures-offers.d.ts +220 -0
- package/dist/service-departures-offers.d.ts.map +1 -0
- package/dist/service-departures-offers.js +177 -0
- package/dist/service-departures-price-preview.d.ts +306 -0
- package/dist/service-departures-price-preview.d.ts.map +1 -0
- package/dist/service-departures-price-preview.js +383 -0
- package/dist/service-departures-pricing-context.d.ts +115 -0
- package/dist/service-departures-pricing-context.d.ts.map +1 -0
- package/dist/service-departures-pricing-context.js +237 -0
- package/dist/service-departures-pricing.d.ts +5 -0
- package/dist/service-departures-pricing.d.ts.map +1 -0
- package/dist/service-departures-pricing.js +4 -0
- package/dist/service-departures.d.ts +192 -0
- package/dist/service-departures.d.ts.map +1 -0
- package/dist/service-departures.js +213 -0
- package/dist/service-intake.d.ts +130 -0
- package/dist/service-intake.d.ts.map +1 -0
- package/dist/service-intake.js +274 -0
- package/dist/service-transport-eligibility.d.ts +10 -0
- package/dist/service-transport-eligibility.d.ts.map +1 -0
- package/dist/service-transport-eligibility.js +198 -0
- package/dist/service.d.ts +1062 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +332 -0
- package/dist/transport-eligibility.d.ts +4 -0
- package/dist/transport-eligibility.d.ts.map +1 -0
- package/dist/transport-eligibility.js +2 -0
- package/dist/validation/departures.d.ts +1669 -0
- package/dist/validation/departures.d.ts.map +1 -0
- package/dist/validation/departures.js +397 -0
- package/dist/validation/intake.d.ts +147 -0
- package/dist/validation/intake.d.ts.map +1 -0
- package/dist/validation/intake.js +69 -0
- package/dist/validation/offers.d.ts +340 -0
- package/dist/validation/offers.d.ts.map +1 -0
- package/dist/validation/offers.js +117 -0
- package/dist/validation-settings.d.ts +609 -0
- package/dist/validation-settings.d.ts.map +1 -0
- package/dist/validation-settings.js +235 -0
- package/dist/validation-transport-eligibility.d.ts +314 -0
- package/dist/validation-transport-eligibility.d.ts.map +1 -0
- package/dist/validation-transport-eligibility.js +97 -0
- package/dist/validation.d.ts +6 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +4 -0
- package/dist/verification/index.d.ts +12 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +18 -0
- package/dist/verification/routes-public.d.ts +121 -0
- package/dist/verification/routes-public.d.ts.map +1 -0
- package/dist/verification/routes-public.js +125 -0
- package/dist/verification/schema.d.ts +273 -0
- package/dist/verification/schema.d.ts.map +1 -0
- package/dist/verification/schema.js +50 -0
- package/dist/verification/service.d.ts +114 -0
- package/dist/verification/service.d.ts.map +1 -0
- package/dist/verification/service.js +283 -0
- package/dist/verification/validation.d.ts +98 -0
- package/dist/verification/validation.d.ts.map +1 -0
- package/dist/verification/validation.js +54 -0
- package/package.json +148 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const languageTagSchema = z
|
|
3
|
+
.string()
|
|
4
|
+
.trim()
|
|
5
|
+
.regex(/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/);
|
|
6
|
+
const httpUrlSchema = z.url().refine((value) => {
|
|
7
|
+
try {
|
|
8
|
+
const protocol = new URL(value).protocol;
|
|
9
|
+
return protocol === "http:" || protocol === "https:";
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}, { message: "URL must use http or https" });
|
|
15
|
+
const urlOrNullSchema = httpUrlSchema.nullable();
|
|
16
|
+
const colorTokenSchema = z
|
|
17
|
+
.string()
|
|
18
|
+
.trim()
|
|
19
|
+
.regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
|
|
20
|
+
const textOrNullSchema = z.string().trim().min(1).nullable();
|
|
21
|
+
export const storefrontPaymentMethodCodeSchema = z.enum([
|
|
22
|
+
"card",
|
|
23
|
+
"bank_transfer",
|
|
24
|
+
"cash",
|
|
25
|
+
"voucher",
|
|
26
|
+
"invoice",
|
|
27
|
+
]);
|
|
28
|
+
export const storefrontFormFieldTypeSchema = z.enum([
|
|
29
|
+
"text",
|
|
30
|
+
"email",
|
|
31
|
+
"tel",
|
|
32
|
+
"textarea",
|
|
33
|
+
"select",
|
|
34
|
+
"checkbox",
|
|
35
|
+
"date",
|
|
36
|
+
"country",
|
|
37
|
+
]);
|
|
38
|
+
export const storefrontFormFieldOptionSchema = z.object({
|
|
39
|
+
value: z.string().trim().min(1),
|
|
40
|
+
label: z.string().trim().min(1),
|
|
41
|
+
});
|
|
42
|
+
export const storefrontFormFieldInputSchema = z.object({
|
|
43
|
+
key: z.string().trim().min(1),
|
|
44
|
+
label: z.string().trim().min(1),
|
|
45
|
+
type: storefrontFormFieldTypeSchema.default("text"),
|
|
46
|
+
required: z.boolean().default(false),
|
|
47
|
+
placeholder: z.string().trim().min(1).optional().nullable(),
|
|
48
|
+
description: z.string().trim().min(1).optional().nullable(),
|
|
49
|
+
autocomplete: z.string().trim().min(1).optional().nullable(),
|
|
50
|
+
options: z.array(storefrontFormFieldOptionSchema).default([]),
|
|
51
|
+
});
|
|
52
|
+
export const storefrontFormFieldSchema = z.object({
|
|
53
|
+
key: z.string().trim().min(1),
|
|
54
|
+
label: z.string().trim().min(1),
|
|
55
|
+
type: storefrontFormFieldTypeSchema,
|
|
56
|
+
required: z.boolean(),
|
|
57
|
+
placeholder: z.string().trim().min(1).nullable(),
|
|
58
|
+
description: z.string().trim().min(1).nullable(),
|
|
59
|
+
autocomplete: z.string().trim().min(1).nullable(),
|
|
60
|
+
options: z.array(storefrontFormFieldOptionSchema),
|
|
61
|
+
});
|
|
62
|
+
export const storefrontPaymentMethodInputSchema = z.object({
|
|
63
|
+
code: storefrontPaymentMethodCodeSchema,
|
|
64
|
+
label: z.string().trim().min(1).optional(),
|
|
65
|
+
description: z.string().trim().min(1).optional().nullable(),
|
|
66
|
+
enabled: z.boolean().default(true),
|
|
67
|
+
});
|
|
68
|
+
export const storefrontPaymentMethodSchema = z.object({
|
|
69
|
+
code: storefrontPaymentMethodCodeSchema,
|
|
70
|
+
label: z.string().trim().min(1),
|
|
71
|
+
description: z.string().trim().min(1).nullable(),
|
|
72
|
+
enabled: z.boolean(),
|
|
73
|
+
});
|
|
74
|
+
export const storefrontPaymentStructureSchema = z.enum(["full", "split"]);
|
|
75
|
+
export const storefrontPaymentDueConditionSchema = z.enum(["after_booking", "before_departure"]);
|
|
76
|
+
export const storefrontPaymentScheduleEntryInputSchema = z.object({
|
|
77
|
+
percent: z.number().min(0).max(100),
|
|
78
|
+
dueInDays: z.number().int().min(0),
|
|
79
|
+
dueCondition: storefrontPaymentDueConditionSchema,
|
|
80
|
+
});
|
|
81
|
+
export const storefrontPaymentScheduleEntrySchema = storefrontPaymentScheduleEntryInputSchema;
|
|
82
|
+
export const storefrontSupportLinkInputSchema = z.object({
|
|
83
|
+
label: z.string().trim().min(1),
|
|
84
|
+
url: httpUrlSchema,
|
|
85
|
+
});
|
|
86
|
+
export const storefrontSupportLinkSchema = storefrontSupportLinkInputSchema;
|
|
87
|
+
export const storefrontBankTransferAccountInputSchema = z.object({
|
|
88
|
+
provider: z.string().trim().min(1).optional().nullable(),
|
|
89
|
+
currency: z.string().trim().min(1).optional().nullable(),
|
|
90
|
+
iban: z.string().trim().min(1),
|
|
91
|
+
beneficiary: z.string().trim().min(1),
|
|
92
|
+
bank: z.string().trim().min(1),
|
|
93
|
+
});
|
|
94
|
+
export const storefrontBankTransferAccountSchema = z.object({
|
|
95
|
+
provider: textOrNullSchema,
|
|
96
|
+
currency: textOrNullSchema,
|
|
97
|
+
iban: z.string().trim().min(1),
|
|
98
|
+
beneficiary: z.string().trim().min(1),
|
|
99
|
+
bank: z.string().trim().min(1),
|
|
100
|
+
});
|
|
101
|
+
export const storefrontBankTransferInputSchema = z.object({
|
|
102
|
+
dueDays: z.number().int().min(0).optional().nullable(),
|
|
103
|
+
account: storefrontBankTransferAccountInputSchema.optional().nullable(),
|
|
104
|
+
accountHolder: z.string().trim().min(1).optional().nullable(),
|
|
105
|
+
bankName: z.string().trim().min(1).optional().nullable(),
|
|
106
|
+
iban: z.string().trim().min(1).optional().nullable(),
|
|
107
|
+
bic: z.string().trim().min(1).optional().nullable(),
|
|
108
|
+
paymentReference: z.string().trim().min(1).optional().nullable(),
|
|
109
|
+
instructions: z.string().trim().min(1).optional().nullable(),
|
|
110
|
+
});
|
|
111
|
+
export const storefrontBankTransferSchema = z.object({
|
|
112
|
+
dueDays: z.number().int().min(0).nullable(),
|
|
113
|
+
account: storefrontBankTransferAccountSchema.nullable(),
|
|
114
|
+
accountHolder: textOrNullSchema,
|
|
115
|
+
bankName: textOrNullSchema,
|
|
116
|
+
iban: textOrNullSchema,
|
|
117
|
+
bic: textOrNullSchema,
|
|
118
|
+
paymentReference: textOrNullSchema,
|
|
119
|
+
instructions: textOrNullSchema,
|
|
120
|
+
});
|
|
121
|
+
export const storefrontPaymentScheduleInputSchema = z.object({
|
|
122
|
+
depositPercent: z.number().min(0).max(100).optional().nullable(),
|
|
123
|
+
balanceDueDaysBeforeDeparture: z.number().int().min(0).optional().nullable(),
|
|
124
|
+
});
|
|
125
|
+
export const storefrontPaymentScheduleSchema = z.object({
|
|
126
|
+
depositPercent: z.number().min(0).max(100).nullable(),
|
|
127
|
+
balanceDueDaysBeforeDeparture: z.number().int().min(0).nullable(),
|
|
128
|
+
});
|
|
129
|
+
export const storefrontCurrencyDisplaySchema = z.enum(["code", "symbol", "name"]);
|
|
130
|
+
export const storefrontSettingsInputSchema = z.object({
|
|
131
|
+
branding: z
|
|
132
|
+
.object({
|
|
133
|
+
logoUrl: httpUrlSchema.optional().nullable(),
|
|
134
|
+
faviconUrl: httpUrlSchema.optional().nullable(),
|
|
135
|
+
brandMarkUrl: httpUrlSchema.optional().nullable(),
|
|
136
|
+
primaryColor: colorTokenSchema.optional().nullable(),
|
|
137
|
+
accentColor: colorTokenSchema.optional().nullable(),
|
|
138
|
+
supportedLanguages: z.array(languageTagSchema).optional(),
|
|
139
|
+
})
|
|
140
|
+
.optional(),
|
|
141
|
+
support: z
|
|
142
|
+
.object({
|
|
143
|
+
email: z.email().optional().nullable(),
|
|
144
|
+
phone: z.string().trim().min(1).optional().nullable(),
|
|
145
|
+
links: z.array(storefrontSupportLinkInputSchema).optional(),
|
|
146
|
+
})
|
|
147
|
+
.optional(),
|
|
148
|
+
legal: z
|
|
149
|
+
.object({
|
|
150
|
+
termsUrl: httpUrlSchema.optional().nullable(),
|
|
151
|
+
privacyUrl: httpUrlSchema.optional().nullable(),
|
|
152
|
+
cancellationUrl: httpUrlSchema.optional().nullable(),
|
|
153
|
+
defaultContractTemplateId: z.string().trim().min(1).optional().nullable(),
|
|
154
|
+
})
|
|
155
|
+
.optional(),
|
|
156
|
+
localization: z
|
|
157
|
+
.object({
|
|
158
|
+
defaultLocale: languageTagSchema.optional().nullable(),
|
|
159
|
+
currencyDisplay: storefrontCurrencyDisplaySchema.optional(),
|
|
160
|
+
})
|
|
161
|
+
.optional(),
|
|
162
|
+
forms: z
|
|
163
|
+
.object({
|
|
164
|
+
billing: z
|
|
165
|
+
.object({
|
|
166
|
+
fields: z.array(storefrontFormFieldInputSchema).default([]),
|
|
167
|
+
})
|
|
168
|
+
.optional(),
|
|
169
|
+
travelers: z
|
|
170
|
+
.object({
|
|
171
|
+
fields: z.array(storefrontFormFieldInputSchema).default([]),
|
|
172
|
+
})
|
|
173
|
+
.optional(),
|
|
174
|
+
})
|
|
175
|
+
.optional(),
|
|
176
|
+
payment: z
|
|
177
|
+
.object({
|
|
178
|
+
defaultMethod: storefrontPaymentMethodCodeSchema.optional().nullable(),
|
|
179
|
+
methods: z.array(storefrontPaymentMethodInputSchema).optional(),
|
|
180
|
+
structure: storefrontPaymentStructureSchema.optional(),
|
|
181
|
+
schedule: z.array(storefrontPaymentScheduleEntryInputSchema).optional(),
|
|
182
|
+
defaultSchedule: storefrontPaymentScheduleInputSchema.optional().nullable(),
|
|
183
|
+
bankTransfer: storefrontBankTransferInputSchema.optional().nullable(),
|
|
184
|
+
})
|
|
185
|
+
.optional(),
|
|
186
|
+
});
|
|
187
|
+
export const storefrontSettingsSchema = z.object({
|
|
188
|
+
branding: z.object({
|
|
189
|
+
logoUrl: urlOrNullSchema,
|
|
190
|
+
faviconUrl: urlOrNullSchema,
|
|
191
|
+
brandMarkUrl: urlOrNullSchema,
|
|
192
|
+
primaryColor: colorTokenSchema.nullable(),
|
|
193
|
+
accentColor: colorTokenSchema.nullable(),
|
|
194
|
+
supportedLanguages: z.array(languageTagSchema),
|
|
195
|
+
}),
|
|
196
|
+
support: z.object({
|
|
197
|
+
email: z.email().nullable(),
|
|
198
|
+
phone: z.string().trim().min(1).nullable(),
|
|
199
|
+
links: z.array(storefrontSupportLinkSchema),
|
|
200
|
+
}),
|
|
201
|
+
legal: z.object({
|
|
202
|
+
termsUrl: urlOrNullSchema,
|
|
203
|
+
privacyUrl: urlOrNullSchema,
|
|
204
|
+
cancellationUrl: urlOrNullSchema,
|
|
205
|
+
defaultContractTemplateId: z.string().trim().min(1).nullable(),
|
|
206
|
+
}),
|
|
207
|
+
localization: z.object({
|
|
208
|
+
defaultLocale: languageTagSchema.nullable(),
|
|
209
|
+
currencyDisplay: storefrontCurrencyDisplaySchema,
|
|
210
|
+
}),
|
|
211
|
+
forms: z.object({
|
|
212
|
+
billing: z.object({
|
|
213
|
+
fields: z.array(storefrontFormFieldSchema),
|
|
214
|
+
}),
|
|
215
|
+
travelers: z.object({
|
|
216
|
+
fields: z.array(storefrontFormFieldSchema),
|
|
217
|
+
}),
|
|
218
|
+
}),
|
|
219
|
+
payment: z.object({
|
|
220
|
+
defaultMethod: storefrontPaymentMethodCodeSchema.nullable(),
|
|
221
|
+
methods: z.array(storefrontPaymentMethodSchema),
|
|
222
|
+
structure: storefrontPaymentStructureSchema,
|
|
223
|
+
schedule: z.array(storefrontPaymentScheduleEntrySchema),
|
|
224
|
+
defaultSchedule: storefrontPaymentScheduleSchema.nullable(),
|
|
225
|
+
bankTransfer: storefrontBankTransferSchema.nullable(),
|
|
226
|
+
}),
|
|
227
|
+
});
|
|
228
|
+
export const storefrontSettingsPatchSchema = z.object({
|
|
229
|
+
branding: storefrontSettingsInputSchema.shape.branding,
|
|
230
|
+
support: storefrontSettingsInputSchema.shape.support,
|
|
231
|
+
legal: storefrontSettingsInputSchema.shape.legal,
|
|
232
|
+
localization: storefrontSettingsInputSchema.shape.localization,
|
|
233
|
+
forms: storefrontSettingsInputSchema.shape.forms,
|
|
234
|
+
payment: storefrontSettingsInputSchema.shape.payment,
|
|
235
|
+
});
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const storefrontTravelDocumentTypeSchema: z.ZodEnum<{
|
|
3
|
+
passport: "passport";
|
|
4
|
+
visa: "visa";
|
|
5
|
+
other: "other";
|
|
6
|
+
id_card: "id_card";
|
|
7
|
+
residence_permit: "residence_permit";
|
|
8
|
+
minor_consent: "minor_consent";
|
|
9
|
+
}>;
|
|
10
|
+
export declare const storefrontRequiredDocumentTypeSchema: z.ZodEnum<{
|
|
11
|
+
passport: "passport";
|
|
12
|
+
none: "none";
|
|
13
|
+
id_card: "id_card";
|
|
14
|
+
passport_or_id_card: "passport_or_id_card";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const storefrontTransportEligibilitySeveritySchema: z.ZodEnum<{
|
|
17
|
+
warning: "warning";
|
|
18
|
+
blocking: "blocking";
|
|
19
|
+
}>;
|
|
20
|
+
export declare const storefrontTransportEligibilityRuleSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
label: z.ZodString;
|
|
23
|
+
productId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
24
|
+
departureId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
25
|
+
destinationCountries: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
26
|
+
nationalityCountries: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
27
|
+
requiredDocumentType: z.ZodDefault<z.ZodEnum<{
|
|
28
|
+
passport: "passport";
|
|
29
|
+
none: "none";
|
|
30
|
+
id_card: "id_card";
|
|
31
|
+
passport_or_id_card: "passport_or_id_card";
|
|
32
|
+
}>>;
|
|
33
|
+
minValidityDaysAfterReturn: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
minAge: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
35
|
+
maxAge: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
36
|
+
visaRequired: z.ZodDefault<z.ZodBoolean>;
|
|
37
|
+
minorConsentRequired: z.ZodDefault<z.ZodBoolean>;
|
|
38
|
+
severity: z.ZodDefault<z.ZodEnum<{
|
|
39
|
+
warning: "warning";
|
|
40
|
+
blocking: "blocking";
|
|
41
|
+
}>>;
|
|
42
|
+
message: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export declare const storefrontTransportEligibilityDocumentInputSchema: z.ZodObject<{
|
|
45
|
+
type: z.ZodEnum<{
|
|
46
|
+
passport: "passport";
|
|
47
|
+
visa: "visa";
|
|
48
|
+
other: "other";
|
|
49
|
+
id_card: "id_card";
|
|
50
|
+
residence_permit: "residence_permit";
|
|
51
|
+
minor_consent: "minor_consent";
|
|
52
|
+
}>;
|
|
53
|
+
issuingCountry: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
54
|
+
expiresOn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export declare const storefrontTransportEligibilityTravelerInputSchema: z.ZodObject<{
|
|
57
|
+
travelerRef: z.ZodString;
|
|
58
|
+
nationalityCountry: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
59
|
+
dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
60
|
+
documents: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
61
|
+
type: z.ZodEnum<{
|
|
62
|
+
passport: "passport";
|
|
63
|
+
visa: "visa";
|
|
64
|
+
other: "other";
|
|
65
|
+
id_card: "id_card";
|
|
66
|
+
residence_permit: "residence_permit";
|
|
67
|
+
minor_consent: "minor_consent";
|
|
68
|
+
}>;
|
|
69
|
+
issuingCountry: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
70
|
+
expiresOn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
hasVisa: z.ZodDefault<z.ZodBoolean>;
|
|
73
|
+
travelingWithGuardian: z.ZodDefault<z.ZodBoolean>;
|
|
74
|
+
hasMinorConsent: z.ZodDefault<z.ZodBoolean>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export declare const storefrontTransportEligibilityInputSchema: z.ZodObject<{
|
|
77
|
+
travelStartsOn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
78
|
+
travelEndsOn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
79
|
+
travelers: z.ZodArray<z.ZodObject<{
|
|
80
|
+
travelerRef: z.ZodString;
|
|
81
|
+
nationalityCountry: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
82
|
+
dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
83
|
+
documents: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
84
|
+
type: z.ZodEnum<{
|
|
85
|
+
passport: "passport";
|
|
86
|
+
visa: "visa";
|
|
87
|
+
other: "other";
|
|
88
|
+
id_card: "id_card";
|
|
89
|
+
residence_permit: "residence_permit";
|
|
90
|
+
minor_consent: "minor_consent";
|
|
91
|
+
}>;
|
|
92
|
+
issuingCountry: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
93
|
+
expiresOn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
hasVisa: z.ZodDefault<z.ZodBoolean>;
|
|
96
|
+
travelingWithGuardian: z.ZodDefault<z.ZodBoolean>;
|
|
97
|
+
hasMinorConsent: z.ZodDefault<z.ZodBoolean>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export declare const storefrontTransportEligibilityIssueCodeSchema: z.ZodEnum<{
|
|
101
|
+
date_of_birth_required: "date_of_birth_required";
|
|
102
|
+
document_required: "document_required";
|
|
103
|
+
document_expiry_required: "document_expiry_required";
|
|
104
|
+
document_validity: "document_validity";
|
|
105
|
+
nationality_required: "nationality_required";
|
|
106
|
+
visa_required: "visa_required";
|
|
107
|
+
minor_consent_required: "minor_consent_required";
|
|
108
|
+
travel_dates_required: "travel_dates_required";
|
|
109
|
+
}>;
|
|
110
|
+
export declare const storefrontTransportEligibilityIssueSchema: z.ZodObject<{
|
|
111
|
+
code: z.ZodEnum<{
|
|
112
|
+
date_of_birth_required: "date_of_birth_required";
|
|
113
|
+
document_required: "document_required";
|
|
114
|
+
document_expiry_required: "document_expiry_required";
|
|
115
|
+
document_validity: "document_validity";
|
|
116
|
+
nationality_required: "nationality_required";
|
|
117
|
+
visa_required: "visa_required";
|
|
118
|
+
minor_consent_required: "minor_consent_required";
|
|
119
|
+
travel_dates_required: "travel_dates_required";
|
|
120
|
+
}>;
|
|
121
|
+
severity: z.ZodEnum<{
|
|
122
|
+
warning: "warning";
|
|
123
|
+
blocking: "blocking";
|
|
124
|
+
}>;
|
|
125
|
+
message: z.ZodString;
|
|
126
|
+
travelerRef: z.ZodString;
|
|
127
|
+
ruleId: z.ZodString;
|
|
128
|
+
destinationCountries: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
129
|
+
requiredDocumentType: z.ZodEnum<{
|
|
130
|
+
passport: "passport";
|
|
131
|
+
none: "none";
|
|
132
|
+
id_card: "id_card";
|
|
133
|
+
passport_or_id_card: "passport_or_id_card";
|
|
134
|
+
}>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
export declare const storefrontTransportEligibilityTravelerResultSchema: z.ZodObject<{
|
|
137
|
+
travelerRef: z.ZodString;
|
|
138
|
+
eligible: z.ZodBoolean;
|
|
139
|
+
matchedRuleIds: z.ZodArray<z.ZodString>;
|
|
140
|
+
blockingIssues: z.ZodArray<z.ZodObject<{
|
|
141
|
+
code: z.ZodEnum<{
|
|
142
|
+
date_of_birth_required: "date_of_birth_required";
|
|
143
|
+
document_required: "document_required";
|
|
144
|
+
document_expiry_required: "document_expiry_required";
|
|
145
|
+
document_validity: "document_validity";
|
|
146
|
+
nationality_required: "nationality_required";
|
|
147
|
+
visa_required: "visa_required";
|
|
148
|
+
minor_consent_required: "minor_consent_required";
|
|
149
|
+
travel_dates_required: "travel_dates_required";
|
|
150
|
+
}>;
|
|
151
|
+
severity: z.ZodEnum<{
|
|
152
|
+
warning: "warning";
|
|
153
|
+
blocking: "blocking";
|
|
154
|
+
}>;
|
|
155
|
+
message: z.ZodString;
|
|
156
|
+
travelerRef: z.ZodString;
|
|
157
|
+
ruleId: z.ZodString;
|
|
158
|
+
destinationCountries: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
159
|
+
requiredDocumentType: z.ZodEnum<{
|
|
160
|
+
passport: "passport";
|
|
161
|
+
none: "none";
|
|
162
|
+
id_card: "id_card";
|
|
163
|
+
passport_or_id_card: "passport_or_id_card";
|
|
164
|
+
}>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
167
|
+
code: z.ZodEnum<{
|
|
168
|
+
date_of_birth_required: "date_of_birth_required";
|
|
169
|
+
document_required: "document_required";
|
|
170
|
+
document_expiry_required: "document_expiry_required";
|
|
171
|
+
document_validity: "document_validity";
|
|
172
|
+
nationality_required: "nationality_required";
|
|
173
|
+
visa_required: "visa_required";
|
|
174
|
+
minor_consent_required: "minor_consent_required";
|
|
175
|
+
travel_dates_required: "travel_dates_required";
|
|
176
|
+
}>;
|
|
177
|
+
severity: z.ZodEnum<{
|
|
178
|
+
warning: "warning";
|
|
179
|
+
blocking: "blocking";
|
|
180
|
+
}>;
|
|
181
|
+
message: z.ZodString;
|
|
182
|
+
travelerRef: z.ZodString;
|
|
183
|
+
ruleId: z.ZodString;
|
|
184
|
+
destinationCountries: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
185
|
+
requiredDocumentType: z.ZodEnum<{
|
|
186
|
+
passport: "passport";
|
|
187
|
+
none: "none";
|
|
188
|
+
id_card: "id_card";
|
|
189
|
+
passport_or_id_card: "passport_or_id_card";
|
|
190
|
+
}>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
export declare const storefrontTransportEligibilityResultSchema: z.ZodObject<{
|
|
194
|
+
departureId: z.ZodString;
|
|
195
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
196
|
+
travelStartsOn: z.ZodNullable<z.ZodString>;
|
|
197
|
+
travelEndsOn: z.ZodNullable<z.ZodString>;
|
|
198
|
+
eligible: z.ZodBoolean;
|
|
199
|
+
blockingIssues: z.ZodArray<z.ZodObject<{
|
|
200
|
+
code: z.ZodEnum<{
|
|
201
|
+
date_of_birth_required: "date_of_birth_required";
|
|
202
|
+
document_required: "document_required";
|
|
203
|
+
document_expiry_required: "document_expiry_required";
|
|
204
|
+
document_validity: "document_validity";
|
|
205
|
+
nationality_required: "nationality_required";
|
|
206
|
+
visa_required: "visa_required";
|
|
207
|
+
minor_consent_required: "minor_consent_required";
|
|
208
|
+
travel_dates_required: "travel_dates_required";
|
|
209
|
+
}>;
|
|
210
|
+
severity: z.ZodEnum<{
|
|
211
|
+
warning: "warning";
|
|
212
|
+
blocking: "blocking";
|
|
213
|
+
}>;
|
|
214
|
+
message: z.ZodString;
|
|
215
|
+
travelerRef: z.ZodString;
|
|
216
|
+
ruleId: z.ZodString;
|
|
217
|
+
destinationCountries: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
218
|
+
requiredDocumentType: z.ZodEnum<{
|
|
219
|
+
passport: "passport";
|
|
220
|
+
none: "none";
|
|
221
|
+
id_card: "id_card";
|
|
222
|
+
passport_or_id_card: "passport_or_id_card";
|
|
223
|
+
}>;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
226
|
+
code: z.ZodEnum<{
|
|
227
|
+
date_of_birth_required: "date_of_birth_required";
|
|
228
|
+
document_required: "document_required";
|
|
229
|
+
document_expiry_required: "document_expiry_required";
|
|
230
|
+
document_validity: "document_validity";
|
|
231
|
+
nationality_required: "nationality_required";
|
|
232
|
+
visa_required: "visa_required";
|
|
233
|
+
minor_consent_required: "minor_consent_required";
|
|
234
|
+
travel_dates_required: "travel_dates_required";
|
|
235
|
+
}>;
|
|
236
|
+
severity: z.ZodEnum<{
|
|
237
|
+
warning: "warning";
|
|
238
|
+
blocking: "blocking";
|
|
239
|
+
}>;
|
|
240
|
+
message: z.ZodString;
|
|
241
|
+
travelerRef: z.ZodString;
|
|
242
|
+
ruleId: z.ZodString;
|
|
243
|
+
destinationCountries: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
244
|
+
requiredDocumentType: z.ZodEnum<{
|
|
245
|
+
passport: "passport";
|
|
246
|
+
none: "none";
|
|
247
|
+
id_card: "id_card";
|
|
248
|
+
passport_or_id_card: "passport_or_id_card";
|
|
249
|
+
}>;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
travelers: z.ZodArray<z.ZodObject<{
|
|
252
|
+
travelerRef: z.ZodString;
|
|
253
|
+
eligible: z.ZodBoolean;
|
|
254
|
+
matchedRuleIds: z.ZodArray<z.ZodString>;
|
|
255
|
+
blockingIssues: z.ZodArray<z.ZodObject<{
|
|
256
|
+
code: z.ZodEnum<{
|
|
257
|
+
date_of_birth_required: "date_of_birth_required";
|
|
258
|
+
document_required: "document_required";
|
|
259
|
+
document_expiry_required: "document_expiry_required";
|
|
260
|
+
document_validity: "document_validity";
|
|
261
|
+
nationality_required: "nationality_required";
|
|
262
|
+
visa_required: "visa_required";
|
|
263
|
+
minor_consent_required: "minor_consent_required";
|
|
264
|
+
travel_dates_required: "travel_dates_required";
|
|
265
|
+
}>;
|
|
266
|
+
severity: z.ZodEnum<{
|
|
267
|
+
warning: "warning";
|
|
268
|
+
blocking: "blocking";
|
|
269
|
+
}>;
|
|
270
|
+
message: z.ZodString;
|
|
271
|
+
travelerRef: z.ZodString;
|
|
272
|
+
ruleId: z.ZodString;
|
|
273
|
+
destinationCountries: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
274
|
+
requiredDocumentType: z.ZodEnum<{
|
|
275
|
+
passport: "passport";
|
|
276
|
+
none: "none";
|
|
277
|
+
id_card: "id_card";
|
|
278
|
+
passport_or_id_card: "passport_or_id_card";
|
|
279
|
+
}>;
|
|
280
|
+
}, z.core.$strip>>;
|
|
281
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
282
|
+
code: z.ZodEnum<{
|
|
283
|
+
date_of_birth_required: "date_of_birth_required";
|
|
284
|
+
document_required: "document_required";
|
|
285
|
+
document_expiry_required: "document_expiry_required";
|
|
286
|
+
document_validity: "document_validity";
|
|
287
|
+
nationality_required: "nationality_required";
|
|
288
|
+
visa_required: "visa_required";
|
|
289
|
+
minor_consent_required: "minor_consent_required";
|
|
290
|
+
travel_dates_required: "travel_dates_required";
|
|
291
|
+
}>;
|
|
292
|
+
severity: z.ZodEnum<{
|
|
293
|
+
warning: "warning";
|
|
294
|
+
blocking: "blocking";
|
|
295
|
+
}>;
|
|
296
|
+
message: z.ZodString;
|
|
297
|
+
travelerRef: z.ZodString;
|
|
298
|
+
ruleId: z.ZodString;
|
|
299
|
+
destinationCountries: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
300
|
+
requiredDocumentType: z.ZodEnum<{
|
|
301
|
+
passport: "passport";
|
|
302
|
+
none: "none";
|
|
303
|
+
id_card: "id_card";
|
|
304
|
+
passport_or_id_card: "passport_or_id_card";
|
|
305
|
+
}>;
|
|
306
|
+
}, z.core.$strip>>;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
}, z.core.$strip>;
|
|
309
|
+
export type StorefrontTransportEligibilityInput = z.infer<typeof storefrontTransportEligibilityInputSchema>;
|
|
310
|
+
export type StorefrontTransportEligibilityRule = z.infer<typeof storefrontTransportEligibilityRuleSchema>;
|
|
311
|
+
export type StorefrontTransportEligibilityRuleInput = z.input<typeof storefrontTransportEligibilityRuleSchema>;
|
|
312
|
+
export type StorefrontTransportEligibilityIssue = z.infer<typeof storefrontTransportEligibilityIssueSchema>;
|
|
313
|
+
export type StorefrontTransportEligibilityResult = z.infer<typeof storefrontTransportEligibilityResultSchema>;
|
|
314
|
+
//# sourceMappingURL=validation-transport-eligibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-transport-eligibility.d.ts","sourceRoot":"","sources":["../src/validation-transport-eligibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,kCAAkC;;;;;;;EAO7C,CAAA;AAEF,eAAO,MAAM,oCAAoC;;;;;EAK/C,CAAA;AAEF,eAAO,MAAM,4CAA4C;;;EAAkC,CAAA;AAE3F,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;iBAoBjD,CAAA;AAEJ,eAAO,MAAM,iDAAiD;;;;;;;;;;;iBAI5D,CAAA;AAEF,eAAO,MAAM,iDAAiD;;;;;;;;;;;;;;;;;;;iBAQ5D,CAAA;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;iBAIpD,CAAA;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;EASxD,CAAA;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;iBAQpD,CAAA;AAEF,eAAO,MAAM,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM7D,CAAA;AAEF,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASrD,CAAA;AAEF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAA;AACD,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,wCAAwC,CAChD,CAAA;AACD,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,wCAAwC,CAChD,CAAA;AACD,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAA;AACD,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,0CAA0C,CAClD,CAAA"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const countryCodeSchema = z
|
|
3
|
+
.string()
|
|
4
|
+
.trim()
|
|
5
|
+
.length(2)
|
|
6
|
+
.transform((value) => value.toUpperCase());
|
|
7
|
+
export const storefrontTravelDocumentTypeSchema = z.enum([
|
|
8
|
+
"passport",
|
|
9
|
+
"id_card",
|
|
10
|
+
"residence_permit",
|
|
11
|
+
"visa",
|
|
12
|
+
"minor_consent",
|
|
13
|
+
"other",
|
|
14
|
+
]);
|
|
15
|
+
export const storefrontRequiredDocumentTypeSchema = z.enum([
|
|
16
|
+
"none",
|
|
17
|
+
"passport",
|
|
18
|
+
"id_card",
|
|
19
|
+
"passport_or_id_card",
|
|
20
|
+
]);
|
|
21
|
+
export const storefrontTransportEligibilitySeveritySchema = z.enum(["blocking", "warning"]);
|
|
22
|
+
export const storefrontTransportEligibilityRuleSchema = z
|
|
23
|
+
.object({
|
|
24
|
+
id: z.string().trim().min(1),
|
|
25
|
+
label: z.string().trim().min(1),
|
|
26
|
+
productId: z.string().trim().min(1).optional().nullable(),
|
|
27
|
+
departureId: z.string().trim().min(1).optional().nullable(),
|
|
28
|
+
destinationCountries: z.array(countryCodeSchema).min(1),
|
|
29
|
+
nationalityCountries: z.array(countryCodeSchema).default([]),
|
|
30
|
+
requiredDocumentType: storefrontRequiredDocumentTypeSchema.default("passport"),
|
|
31
|
+
minValidityDaysAfterReturn: z.number().int().min(0).default(0),
|
|
32
|
+
minAge: z.number().int().min(0).optional().nullable(),
|
|
33
|
+
maxAge: z.number().int().min(0).optional().nullable(),
|
|
34
|
+
visaRequired: z.boolean().default(false),
|
|
35
|
+
minorConsentRequired: z.boolean().default(false),
|
|
36
|
+
severity: storefrontTransportEligibilitySeveritySchema.default("blocking"),
|
|
37
|
+
message: z.string().trim().min(1).optional().nullable(),
|
|
38
|
+
})
|
|
39
|
+
.refine((rule) => rule.minAge == null || rule.maxAge == null || rule.minAge <= rule.maxAge, {
|
|
40
|
+
message: "minAge must be less than or equal to maxAge",
|
|
41
|
+
path: ["maxAge"],
|
|
42
|
+
});
|
|
43
|
+
export const storefrontTransportEligibilityDocumentInputSchema = z.object({
|
|
44
|
+
type: storefrontTravelDocumentTypeSchema,
|
|
45
|
+
issuingCountry: countryCodeSchema.optional().nullable(),
|
|
46
|
+
expiresOn: z.string().date().optional().nullable(),
|
|
47
|
+
});
|
|
48
|
+
export const storefrontTransportEligibilityTravelerInputSchema = z.object({
|
|
49
|
+
travelerRef: z.string().trim().min(1),
|
|
50
|
+
nationalityCountry: countryCodeSchema.optional().nullable(),
|
|
51
|
+
dateOfBirth: z.string().date().optional().nullable(),
|
|
52
|
+
documents: z.array(storefrontTransportEligibilityDocumentInputSchema).default([]),
|
|
53
|
+
hasVisa: z.boolean().default(false),
|
|
54
|
+
travelingWithGuardian: z.boolean().default(false),
|
|
55
|
+
hasMinorConsent: z.boolean().default(false),
|
|
56
|
+
});
|
|
57
|
+
export const storefrontTransportEligibilityInputSchema = z.object({
|
|
58
|
+
travelStartsOn: z.string().date().optional().nullable(),
|
|
59
|
+
travelEndsOn: z.string().date().optional().nullable(),
|
|
60
|
+
travelers: z.array(storefrontTransportEligibilityTravelerInputSchema).min(1),
|
|
61
|
+
});
|
|
62
|
+
export const storefrontTransportEligibilityIssueCodeSchema = z.enum([
|
|
63
|
+
"date_of_birth_required",
|
|
64
|
+
"document_required",
|
|
65
|
+
"document_expiry_required",
|
|
66
|
+
"document_validity",
|
|
67
|
+
"nationality_required",
|
|
68
|
+
"visa_required",
|
|
69
|
+
"minor_consent_required",
|
|
70
|
+
"travel_dates_required",
|
|
71
|
+
]);
|
|
72
|
+
export const storefrontTransportEligibilityIssueSchema = z.object({
|
|
73
|
+
code: storefrontTransportEligibilityIssueCodeSchema,
|
|
74
|
+
severity: storefrontTransportEligibilitySeveritySchema,
|
|
75
|
+
message: z.string(),
|
|
76
|
+
travelerRef: z.string(),
|
|
77
|
+
ruleId: z.string(),
|
|
78
|
+
destinationCountries: z.array(countryCodeSchema),
|
|
79
|
+
requiredDocumentType: storefrontRequiredDocumentTypeSchema,
|
|
80
|
+
});
|
|
81
|
+
export const storefrontTransportEligibilityTravelerResultSchema = z.object({
|
|
82
|
+
travelerRef: z.string(),
|
|
83
|
+
eligible: z.boolean(),
|
|
84
|
+
matchedRuleIds: z.array(z.string()),
|
|
85
|
+
blockingIssues: z.array(storefrontTransportEligibilityIssueSchema),
|
|
86
|
+
warnings: z.array(storefrontTransportEligibilityIssueSchema),
|
|
87
|
+
});
|
|
88
|
+
export const storefrontTransportEligibilityResultSchema = z.object({
|
|
89
|
+
departureId: z.string(),
|
|
90
|
+
productId: z.string().nullable(),
|
|
91
|
+
travelStartsOn: z.string().nullable(),
|
|
92
|
+
travelEndsOn: z.string().nullable(),
|
|
93
|
+
eligible: z.boolean(),
|
|
94
|
+
blockingIssues: z.array(storefrontTransportEligibilityIssueSchema),
|
|
95
|
+
warnings: z.array(storefrontTransportEligibilityIssueSchema),
|
|
96
|
+
travelers: z.array(storefrontTransportEligibilityTravelerResultSchema),
|
|
97
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./validation/departures.js";
|
|
2
|
+
export * from "./validation/intake.js";
|
|
3
|
+
export * from "./validation/offers.js";
|
|
4
|
+
export type { StorefrontBankTransfer, StorefrontBankTransferAccount, StorefrontBankTransferAccountInput, StorefrontBankTransferInput, StorefrontCurrencyDisplay, StorefrontFormField, StorefrontFormFieldInput, StorefrontPaymentDueCondition, StorefrontPaymentMethod, StorefrontPaymentMethodCode, StorefrontPaymentMethodInput, StorefrontPaymentSchedule, StorefrontPaymentScheduleEntry, StorefrontPaymentScheduleEntryInput, StorefrontPaymentScheduleInput, StorefrontPaymentStructure, StorefrontSettings, StorefrontSettingsInput, StorefrontSettingsPatchInput, StorefrontSupportLink, StorefrontSupportLinkInput, } from "./validation-settings.js";
|
|
5
|
+
export { storefrontBankTransferAccountInputSchema, storefrontBankTransferAccountSchema, storefrontBankTransferInputSchema, storefrontBankTransferSchema, storefrontCurrencyDisplaySchema, storefrontFormFieldInputSchema, storefrontFormFieldOptionSchema, storefrontFormFieldSchema, storefrontFormFieldTypeSchema, storefrontPaymentDueConditionSchema, storefrontPaymentMethodCodeSchema, storefrontPaymentMethodInputSchema, storefrontPaymentMethodSchema, storefrontPaymentScheduleEntryInputSchema, storefrontPaymentScheduleEntrySchema, storefrontPaymentScheduleInputSchema, storefrontPaymentScheduleSchema, storefrontPaymentStructureSchema, storefrontSettingsInputSchema, storefrontSettingsPatchSchema, storefrontSettingsSchema, storefrontSupportLinkInputSchema, storefrontSupportLinkSchema, } from "./validation-settings.js";
|
|
6
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,YAAY,EACV,sBAAsB,EACtB,6BAA6B,EAC7B,kCAAkC,EAClC,2BAA2B,EAC3B,yBAAyB,EACzB,mBAAmB,EACnB,wBAAwB,EACxB,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,EAC9B,mCAAmC,EACnC,8BAA8B,EAC9B,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACvB,4BAA4B,EAC5B,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,wCAAwC,EACxC,mCAAmC,EACnC,iCAAiC,EACjC,4BAA4B,EAC5B,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAC/B,yBAAyB,EACzB,6BAA6B,EAC7B,mCAAmC,EACnC,iCAAiC,EACjC,kCAAkC,EAClC,6BAA6B,EAC7B,yCAAyC,EACzC,oCAAoC,EACpC,oCAAoC,EACpC,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from "./validation/departures.js";
|
|
2
|
+
export * from "./validation/intake.js";
|
|
3
|
+
export * from "./validation/offers.js";
|
|
4
|
+
export { storefrontBankTransferAccountInputSchema, storefrontBankTransferAccountSchema, storefrontBankTransferInputSchema, storefrontBankTransferSchema, storefrontCurrencyDisplaySchema, storefrontFormFieldInputSchema, storefrontFormFieldOptionSchema, storefrontFormFieldSchema, storefrontFormFieldTypeSchema, storefrontPaymentDueConditionSchema, storefrontPaymentMethodCodeSchema, storefrontPaymentMethodInputSchema, storefrontPaymentMethodSchema, storefrontPaymentScheduleEntryInputSchema, storefrontPaymentScheduleEntrySchema, storefrontPaymentScheduleInputSchema, storefrontPaymentScheduleSchema, storefrontPaymentStructureSchema, storefrontSettingsInputSchema, storefrontSettingsPatchSchema, storefrontSettingsSchema, storefrontSupportLinkInputSchema, storefrontSupportLinkSchema, } from "./validation-settings.js";
|