@voyantjs/storefront 0.49.0 → 0.50.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/README.md +36 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/routes-admin.d.ts +192 -0
- package/dist/routes-admin.d.ts.map +1 -0
- package/dist/routes-admin.js +28 -0
- package/dist/routes-public.d.ts +550 -15
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +68 -3
- 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 +297 -0
- package/dist/service-departures.d.ts +301 -2
- package/dist/service-departures.d.ts.map +1 -1
- package/dist/service-departures.js +406 -42
- package/dist/service.d.ts +600 -9
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +113 -2
- package/dist/validation-settings.d.ts +489 -0
- package/dist/validation-settings.d.ts.map +1 -0
- package/dist/validation-settings.js +205 -0
- package/dist/validation.d.ts +1260 -380
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +173 -126
- package/package.json +17 -10
package/dist/routes-public.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type VoyantBindings, type VoyantVariables } from "@voyantjs/hono";
|
|
2
2
|
import { type StorefrontServiceOptions } from "./service.js";
|
|
3
3
|
type Env = {
|
|
4
|
+
Bindings: VoyantBindings;
|
|
4
5
|
Variables: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
6
|
+
userId?: string;
|
|
7
|
+
} & VoyantVariables;
|
|
8
8
|
};
|
|
9
9
|
export declare function createStorefrontPublicRoutes(options?: StorefrontServiceOptions): import("hono/hono-base").HonoBase<Env, {
|
|
10
10
|
"/settings": {
|
|
@@ -14,17 +14,30 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
14
14
|
data: {
|
|
15
15
|
branding: {
|
|
16
16
|
logoUrl: string | null;
|
|
17
|
+
faviconUrl: string | null;
|
|
18
|
+
brandMarkUrl: string | null;
|
|
19
|
+
primaryColor: string | null;
|
|
20
|
+
accentColor: string | null;
|
|
17
21
|
supportedLanguages: string[];
|
|
18
22
|
};
|
|
19
23
|
support: {
|
|
20
24
|
email: string | null;
|
|
21
25
|
phone: string | null;
|
|
26
|
+
links: {
|
|
27
|
+
label: string;
|
|
28
|
+
url: string;
|
|
29
|
+
}[];
|
|
22
30
|
};
|
|
23
31
|
legal: {
|
|
24
32
|
termsUrl: string | null;
|
|
25
33
|
privacyUrl: string | null;
|
|
34
|
+
cancellationUrl: string | null;
|
|
26
35
|
defaultContractTemplateId: string | null;
|
|
27
36
|
};
|
|
37
|
+
localization: {
|
|
38
|
+
defaultLocale: string | null;
|
|
39
|
+
currencyDisplay: "symbol" | "name" | "code";
|
|
40
|
+
};
|
|
28
41
|
forms: {
|
|
29
42
|
billing: {
|
|
30
43
|
fields: {
|
|
@@ -58,13 +71,25 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
58
71
|
};
|
|
59
72
|
};
|
|
60
73
|
payment: {
|
|
61
|
-
defaultMethod: "voucher" | "bank_transfer" | "
|
|
74
|
+
defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
|
|
62
75
|
methods: {
|
|
63
|
-
code: "voucher" | "bank_transfer" | "
|
|
76
|
+
code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
|
|
64
77
|
label: string;
|
|
65
78
|
description: string | null;
|
|
66
79
|
enabled: boolean;
|
|
67
80
|
}[];
|
|
81
|
+
defaultSchedule: {
|
|
82
|
+
depositPercent: number | null;
|
|
83
|
+
balanceDueDaysBeforeDeparture: number | null;
|
|
84
|
+
} | null;
|
|
85
|
+
bankTransfer: {
|
|
86
|
+
accountHolder: string | null;
|
|
87
|
+
bankName: string | null;
|
|
88
|
+
iban: string | null;
|
|
89
|
+
bic: string | null;
|
|
90
|
+
paymentReference: string | null;
|
|
91
|
+
instructions: string | null;
|
|
92
|
+
} | null;
|
|
68
93
|
};
|
|
69
94
|
};
|
|
70
95
|
};
|
|
@@ -88,7 +113,7 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
88
113
|
id: string;
|
|
89
114
|
personId: string;
|
|
90
115
|
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
91
|
-
source: "admin" | "form" | "phone" | "
|
|
116
|
+
source: "admin" | "form" | "phone" | "booking" | "website" | "abandoned_cart";
|
|
92
117
|
status: "expired" | "converted" | "lost" | "new" | "contacted" | "qualified";
|
|
93
118
|
duplicate: boolean;
|
|
94
119
|
};
|
|
@@ -113,10 +138,10 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
113
138
|
id: string;
|
|
114
139
|
personId: string;
|
|
115
140
|
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
116
|
-
source: "admin" | "form" | "phone" | "
|
|
141
|
+
source: "admin" | "form" | "phone" | "booking" | "website" | "abandoned_cart";
|
|
117
142
|
status: "expired" | "converted" | "lost" | "new" | "contacted" | "qualified";
|
|
118
143
|
duplicate: boolean;
|
|
119
|
-
doubleOptIn: "
|
|
144
|
+
doubleOptIn: "requested" | "not_configured";
|
|
120
145
|
};
|
|
121
146
|
};
|
|
122
147
|
outputFormat: "json";
|
|
@@ -279,6 +304,272 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
279
304
|
quantity: number;
|
|
280
305
|
unitPrice: number;
|
|
281
306
|
}[];
|
|
307
|
+
allocation: {
|
|
308
|
+
slot: {
|
|
309
|
+
id: string;
|
|
310
|
+
productId: string;
|
|
311
|
+
optionId: string | null;
|
|
312
|
+
dateLocal: string | null;
|
|
313
|
+
startAt: string | null;
|
|
314
|
+
endAt: string | null;
|
|
315
|
+
timezone: string;
|
|
316
|
+
status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
|
|
317
|
+
availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "on_request" | "unavailable" | "available";
|
|
318
|
+
capacity: number | null;
|
|
319
|
+
remaining: number | null;
|
|
320
|
+
pastCutoff: boolean;
|
|
321
|
+
tooEarly: boolean;
|
|
322
|
+
};
|
|
323
|
+
pax: {
|
|
324
|
+
adults: number;
|
|
325
|
+
children: number;
|
|
326
|
+
infants: number;
|
|
327
|
+
total: number;
|
|
328
|
+
};
|
|
329
|
+
requestedUnits: {
|
|
330
|
+
unitId: string | null;
|
|
331
|
+
requestRef: string | null;
|
|
332
|
+
name: string;
|
|
333
|
+
unitType: string | null;
|
|
334
|
+
quantity: number;
|
|
335
|
+
pricingMode: string | null;
|
|
336
|
+
unitPrice: number;
|
|
337
|
+
total: number;
|
|
338
|
+
currencyCode: string;
|
|
339
|
+
tierId: string | null;
|
|
340
|
+
}[];
|
|
341
|
+
rooms: {
|
|
342
|
+
unitId: string;
|
|
343
|
+
name: string;
|
|
344
|
+
occupancy: number;
|
|
345
|
+
quantity: number;
|
|
346
|
+
pax: number;
|
|
347
|
+
pricingMode: string | null;
|
|
348
|
+
unitPrice: number;
|
|
349
|
+
total: number;
|
|
350
|
+
currencyCode: string;
|
|
351
|
+
tierId: string | null;
|
|
352
|
+
}[];
|
|
353
|
+
};
|
|
354
|
+
units: {
|
|
355
|
+
unitId: string | null;
|
|
356
|
+
requestRef: string | null;
|
|
357
|
+
name: string;
|
|
358
|
+
unitType: string | null;
|
|
359
|
+
quantity: number;
|
|
360
|
+
pricingMode: string | null;
|
|
361
|
+
unitPrice: number;
|
|
362
|
+
total: number;
|
|
363
|
+
currencyCode: string;
|
|
364
|
+
tierId: string | null;
|
|
365
|
+
}[];
|
|
366
|
+
rooms: {
|
|
367
|
+
unitId: string;
|
|
368
|
+
name: string;
|
|
369
|
+
occupancy: number;
|
|
370
|
+
quantity: number;
|
|
371
|
+
pax: number;
|
|
372
|
+
pricingMode: string | null;
|
|
373
|
+
unitPrice: number;
|
|
374
|
+
total: number;
|
|
375
|
+
currencyCode: string;
|
|
376
|
+
tierId: string | null;
|
|
377
|
+
}[];
|
|
378
|
+
extras: {
|
|
379
|
+
extraId: string;
|
|
380
|
+
name: string;
|
|
381
|
+
required: boolean;
|
|
382
|
+
selectable: boolean;
|
|
383
|
+
selected: boolean;
|
|
384
|
+
pricingMode: string;
|
|
385
|
+
quantity: number;
|
|
386
|
+
unitPrice: number;
|
|
387
|
+
total: number;
|
|
388
|
+
currencyCode: string;
|
|
389
|
+
}[];
|
|
390
|
+
offers: {
|
|
391
|
+
available: {
|
|
392
|
+
offer: {
|
|
393
|
+
id: string;
|
|
394
|
+
name: string;
|
|
395
|
+
slug: string | null;
|
|
396
|
+
description: string | null;
|
|
397
|
+
discountType: "percentage" | "fixed_amount";
|
|
398
|
+
discountValue: string;
|
|
399
|
+
currency: string | null;
|
|
400
|
+
applicableProductIds: string[];
|
|
401
|
+
applicableDepartureIds: string[];
|
|
402
|
+
validFrom: string | null;
|
|
403
|
+
validTo: string | null;
|
|
404
|
+
minTravelers: number | null;
|
|
405
|
+
imageMobileUrl: string | null;
|
|
406
|
+
imageDesktopUrl: string | null;
|
|
407
|
+
stackable: boolean;
|
|
408
|
+
createdAt: string;
|
|
409
|
+
updatedAt: string;
|
|
410
|
+
};
|
|
411
|
+
status: string;
|
|
412
|
+
reason: string | null;
|
|
413
|
+
selected: boolean;
|
|
414
|
+
discountAppliedCents: number;
|
|
415
|
+
discountedPriceCents: number;
|
|
416
|
+
}[];
|
|
417
|
+
requested: ({
|
|
418
|
+
kind: "slug";
|
|
419
|
+
value: string;
|
|
420
|
+
result: {
|
|
421
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
422
|
+
reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
|
|
423
|
+
offer: {
|
|
424
|
+
id: string;
|
|
425
|
+
name: string;
|
|
426
|
+
slug: string | null;
|
|
427
|
+
description: string | null;
|
|
428
|
+
discountType: "percentage" | "fixed_amount";
|
|
429
|
+
discountValue: string;
|
|
430
|
+
currency: string | null;
|
|
431
|
+
applicableProductIds: string[];
|
|
432
|
+
applicableDepartureIds: string[];
|
|
433
|
+
validFrom: string | null;
|
|
434
|
+
validTo: string | null;
|
|
435
|
+
minTravelers: number | null;
|
|
436
|
+
imageMobileUrl: string | null;
|
|
437
|
+
imageDesktopUrl: string | null;
|
|
438
|
+
stackable: boolean;
|
|
439
|
+
createdAt: string;
|
|
440
|
+
updatedAt: string;
|
|
441
|
+
} | null;
|
|
442
|
+
target: {
|
|
443
|
+
bookingId: string | null;
|
|
444
|
+
sessionId: string | null;
|
|
445
|
+
productId: string;
|
|
446
|
+
departureId: string | null;
|
|
447
|
+
};
|
|
448
|
+
pricing: {
|
|
449
|
+
basePriceCents: number;
|
|
450
|
+
currency: string;
|
|
451
|
+
discountAppliedCents: number;
|
|
452
|
+
discountedPriceCents: number;
|
|
453
|
+
};
|
|
454
|
+
appliedOffers: {
|
|
455
|
+
offerId: string;
|
|
456
|
+
offerName: string;
|
|
457
|
+
discountAppliedCents: number;
|
|
458
|
+
discountedPriceCents: number;
|
|
459
|
+
currency: string;
|
|
460
|
+
discountKind: "percentage" | "fixed_amount";
|
|
461
|
+
discountPercent: number | null;
|
|
462
|
+
discountAmountCents: number | null;
|
|
463
|
+
appliedCode: string | null;
|
|
464
|
+
stackable: boolean;
|
|
465
|
+
}[];
|
|
466
|
+
conflict: {
|
|
467
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
468
|
+
autoAppliedOfferIds: string[];
|
|
469
|
+
manualOfferId: string | null;
|
|
470
|
+
selectedOfferIds: string[];
|
|
471
|
+
message: string;
|
|
472
|
+
} | null;
|
|
473
|
+
} | null;
|
|
474
|
+
} | {
|
|
475
|
+
kind: "code";
|
|
476
|
+
value: string;
|
|
477
|
+
result: {
|
|
478
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
479
|
+
reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
|
|
480
|
+
offer: {
|
|
481
|
+
id: string;
|
|
482
|
+
name: string;
|
|
483
|
+
slug: string | null;
|
|
484
|
+
description: string | null;
|
|
485
|
+
discountType: "percentage" | "fixed_amount";
|
|
486
|
+
discountValue: string;
|
|
487
|
+
currency: string | null;
|
|
488
|
+
applicableProductIds: string[];
|
|
489
|
+
applicableDepartureIds: string[];
|
|
490
|
+
validFrom: string | null;
|
|
491
|
+
validTo: string | null;
|
|
492
|
+
minTravelers: number | null;
|
|
493
|
+
imageMobileUrl: string | null;
|
|
494
|
+
imageDesktopUrl: string | null;
|
|
495
|
+
stackable: boolean;
|
|
496
|
+
createdAt: string;
|
|
497
|
+
updatedAt: string;
|
|
498
|
+
} | null;
|
|
499
|
+
target: {
|
|
500
|
+
bookingId: string | null;
|
|
501
|
+
sessionId: string | null;
|
|
502
|
+
productId: string;
|
|
503
|
+
departureId: string | null;
|
|
504
|
+
};
|
|
505
|
+
pricing: {
|
|
506
|
+
basePriceCents: number;
|
|
507
|
+
currency: string;
|
|
508
|
+
discountAppliedCents: number;
|
|
509
|
+
discountedPriceCents: number;
|
|
510
|
+
};
|
|
511
|
+
appliedOffers: {
|
|
512
|
+
offerId: string;
|
|
513
|
+
offerName: string;
|
|
514
|
+
discountAppliedCents: number;
|
|
515
|
+
discountedPriceCents: number;
|
|
516
|
+
currency: string;
|
|
517
|
+
discountKind: "percentage" | "fixed_amount";
|
|
518
|
+
discountPercent: number | null;
|
|
519
|
+
discountAmountCents: number | null;
|
|
520
|
+
appliedCode: string | null;
|
|
521
|
+
stackable: boolean;
|
|
522
|
+
}[];
|
|
523
|
+
conflict: {
|
|
524
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
525
|
+
autoAppliedOfferIds: string[];
|
|
526
|
+
manualOfferId: string | null;
|
|
527
|
+
selectedOfferIds: string[];
|
|
528
|
+
message: string;
|
|
529
|
+
} | null;
|
|
530
|
+
} | null;
|
|
531
|
+
})[];
|
|
532
|
+
applied: {
|
|
533
|
+
offerId: string;
|
|
534
|
+
offerName: string;
|
|
535
|
+
discountAppliedCents: number;
|
|
536
|
+
discountedPriceCents: number;
|
|
537
|
+
currency: string;
|
|
538
|
+
discountKind: "percentage" | "fixed_amount";
|
|
539
|
+
discountPercent: number | null;
|
|
540
|
+
discountAmountCents: number | null;
|
|
541
|
+
appliedCode: string | null;
|
|
542
|
+
stackable: boolean;
|
|
543
|
+
}[];
|
|
544
|
+
conflict: {
|
|
545
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
546
|
+
autoAppliedOfferIds: string[];
|
|
547
|
+
manualOfferId: string | null;
|
|
548
|
+
selectedOfferIds: string[];
|
|
549
|
+
message: string;
|
|
550
|
+
} | {
|
|
551
|
+
policy: string;
|
|
552
|
+
autoAppliedOfferIds: string[];
|
|
553
|
+
manualOfferId: null;
|
|
554
|
+
selectedOfferIds: string[];
|
|
555
|
+
message: string;
|
|
556
|
+
} | null;
|
|
557
|
+
discountTotal: number;
|
|
558
|
+
discountTotalCents: number;
|
|
559
|
+
totalAfterDiscount: number;
|
|
560
|
+
currencyCode: string;
|
|
561
|
+
};
|
|
562
|
+
totals: {
|
|
563
|
+
currencyCode: string;
|
|
564
|
+
base: number;
|
|
565
|
+
extras: number;
|
|
566
|
+
subtotal: number;
|
|
567
|
+
discount: number;
|
|
568
|
+
tax: number;
|
|
569
|
+
total: number;
|
|
570
|
+
perPerson: number;
|
|
571
|
+
perBooking: number;
|
|
572
|
+
};
|
|
282
573
|
};
|
|
283
574
|
};
|
|
284
575
|
outputFormat: "json";
|
|
@@ -296,6 +587,250 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
296
587
|
status: 404;
|
|
297
588
|
};
|
|
298
589
|
};
|
|
590
|
+
} & {
|
|
591
|
+
"/bookings/sessions/bootstrap": {
|
|
592
|
+
$post: {
|
|
593
|
+
input: {};
|
|
594
|
+
output: {
|
|
595
|
+
error: string;
|
|
596
|
+
};
|
|
597
|
+
outputFormat: "json";
|
|
598
|
+
status: 404;
|
|
599
|
+
} | {
|
|
600
|
+
input: {};
|
|
601
|
+
output: {
|
|
602
|
+
data?: {
|
|
603
|
+
repricing: {
|
|
604
|
+
originalQuote: {
|
|
605
|
+
currencyCode: string;
|
|
606
|
+
totalSellAmountCents: number;
|
|
607
|
+
quotedAt?: string | null | undefined;
|
|
608
|
+
expiresAt?: string | null | undefined;
|
|
609
|
+
};
|
|
610
|
+
current: {
|
|
611
|
+
sessionId: string;
|
|
612
|
+
catalogId: string | null;
|
|
613
|
+
currencyCode: string;
|
|
614
|
+
totalSellAmountCents: number;
|
|
615
|
+
items: {
|
|
616
|
+
inputIndex: number;
|
|
617
|
+
itemId: string;
|
|
618
|
+
title: string;
|
|
619
|
+
productId: string | null;
|
|
620
|
+
optionId: string | null;
|
|
621
|
+
optionUnitId: string | null;
|
|
622
|
+
optionUnitName: string | null;
|
|
623
|
+
optionUnitType: string | null;
|
|
624
|
+
pricingCategoryId: string | null;
|
|
625
|
+
quantity: number;
|
|
626
|
+
pricingMode: string;
|
|
627
|
+
unitSellAmountCents: number | null;
|
|
628
|
+
totalSellAmountCents: number | null;
|
|
629
|
+
warnings: string[];
|
|
630
|
+
}[];
|
|
631
|
+
warnings: never[];
|
|
632
|
+
appliedToSession: boolean;
|
|
633
|
+
};
|
|
634
|
+
deltaAmountCents: number;
|
|
635
|
+
staleQuote: boolean;
|
|
636
|
+
};
|
|
637
|
+
} | undefined;
|
|
638
|
+
error: string;
|
|
639
|
+
};
|
|
640
|
+
outputFormat: "json";
|
|
641
|
+
status: 400 | 409;
|
|
642
|
+
} | {
|
|
643
|
+
input: {};
|
|
644
|
+
output: {
|
|
645
|
+
error: string;
|
|
646
|
+
};
|
|
647
|
+
outputFormat: "json";
|
|
648
|
+
status: 409;
|
|
649
|
+
} | {
|
|
650
|
+
input: {};
|
|
651
|
+
output: {
|
|
652
|
+
data: {
|
|
653
|
+
session: {
|
|
654
|
+
sessionId: string;
|
|
655
|
+
bookingNumber: string;
|
|
656
|
+
status: "completed" | "cancelled" | "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "expired";
|
|
657
|
+
externalBookingRef: string | null;
|
|
658
|
+
communicationLanguage: string | null;
|
|
659
|
+
sellCurrency: string;
|
|
660
|
+
sellAmountCents: number | null;
|
|
661
|
+
startDate: string | null;
|
|
662
|
+
endDate: string | null;
|
|
663
|
+
pax: number | null;
|
|
664
|
+
holdExpiresAt: string | null;
|
|
665
|
+
confirmedAt: string | null;
|
|
666
|
+
expiredAt: string | null;
|
|
667
|
+
cancelledAt: string | null;
|
|
668
|
+
completedAt: string | null;
|
|
669
|
+
travelers: {
|
|
670
|
+
id: string;
|
|
671
|
+
participantType: "other" | "traveler" | "occupant";
|
|
672
|
+
travelerCategory: "child" | "other" | "adult" | "infant" | "senior" | null;
|
|
673
|
+
firstName: string;
|
|
674
|
+
lastName: string;
|
|
675
|
+
email: string | null;
|
|
676
|
+
phone: string | null;
|
|
677
|
+
preferredLanguage: string | null;
|
|
678
|
+
specialRequests: string | null;
|
|
679
|
+
isPrimary: boolean;
|
|
680
|
+
notes: string | null;
|
|
681
|
+
}[];
|
|
682
|
+
items: {
|
|
683
|
+
id: string;
|
|
684
|
+
title: string;
|
|
685
|
+
description: string | null;
|
|
686
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
687
|
+
status: "cancelled" | "draft" | "on_hold" | "confirmed" | "expired" | "fulfilled";
|
|
688
|
+
serviceDate: string | null;
|
|
689
|
+
startsAt: string | null;
|
|
690
|
+
endsAt: string | null;
|
|
691
|
+
quantity: number;
|
|
692
|
+
sellCurrency: string;
|
|
693
|
+
unitSellAmountCents: number | null;
|
|
694
|
+
totalSellAmountCents: number | null;
|
|
695
|
+
costCurrency: string | null;
|
|
696
|
+
unitCostAmountCents: number | null;
|
|
697
|
+
totalCostAmountCents: number | null;
|
|
698
|
+
notes: string | null;
|
|
699
|
+
productId: string | null;
|
|
700
|
+
optionId: string | null;
|
|
701
|
+
optionUnitId: string | null;
|
|
702
|
+
pricingCategoryId: string | null;
|
|
703
|
+
travelerLinks: {
|
|
704
|
+
id: string;
|
|
705
|
+
travelerId: string;
|
|
706
|
+
role: string;
|
|
707
|
+
isPrimary: boolean;
|
|
708
|
+
}[];
|
|
709
|
+
}[];
|
|
710
|
+
allocations: {
|
|
711
|
+
id: string;
|
|
712
|
+
bookingItemId: string;
|
|
713
|
+
productId: string | null;
|
|
714
|
+
optionId: string | null;
|
|
715
|
+
optionUnitId: string | null;
|
|
716
|
+
pricingCategoryId: string | null;
|
|
717
|
+
availabilitySlotId: string | null;
|
|
718
|
+
quantity: number;
|
|
719
|
+
allocationType: "resource" | "pickup" | "unit";
|
|
720
|
+
status: "cancelled" | "confirmed" | "expired" | "fulfilled" | "held" | "released";
|
|
721
|
+
holdExpiresAt: string | null;
|
|
722
|
+
confirmedAt: string | null;
|
|
723
|
+
releasedAt: string | null;
|
|
724
|
+
}[];
|
|
725
|
+
checklist: {
|
|
726
|
+
hasTravelers: boolean;
|
|
727
|
+
hasPrimaryTraveler: boolean;
|
|
728
|
+
hasItems: boolean;
|
|
729
|
+
hasAllocations: boolean;
|
|
730
|
+
readyForConfirmation: boolean;
|
|
731
|
+
};
|
|
732
|
+
state: {
|
|
733
|
+
sessionId: string;
|
|
734
|
+
stateKey: "wizard";
|
|
735
|
+
currentStep: string | null;
|
|
736
|
+
completedSteps: string[];
|
|
737
|
+
payload: {
|
|
738
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
739
|
+
};
|
|
740
|
+
version: number;
|
|
741
|
+
createdAt: string;
|
|
742
|
+
updatedAt: string;
|
|
743
|
+
} | null;
|
|
744
|
+
checkoutCapability: {
|
|
745
|
+
token: string;
|
|
746
|
+
expiresAt: string;
|
|
747
|
+
actions: ("session:read" | "session:update" | "session:reprice" | "session:finalize" | "payment:read" | "payment:start")[];
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
paymentPlan: {
|
|
751
|
+
source: "storefront_default";
|
|
752
|
+
depositKind: import("@voyantjs/finance").DepositKind;
|
|
753
|
+
depositPercent: number | null;
|
|
754
|
+
depositAmountCents: number | null;
|
|
755
|
+
requiresFullPayment: boolean;
|
|
756
|
+
};
|
|
757
|
+
paymentSchedule: {
|
|
758
|
+
id: string;
|
|
759
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
760
|
+
status: "pending" | "cancelled" | "expired" | "paid" | "due" | "waived";
|
|
761
|
+
dueDate: string;
|
|
762
|
+
currency: string;
|
|
763
|
+
amountCents: number;
|
|
764
|
+
notes: string | null;
|
|
765
|
+
}[];
|
|
766
|
+
repricing: {
|
|
767
|
+
originalQuote: {
|
|
768
|
+
currencyCode: string;
|
|
769
|
+
totalSellAmountCents: number;
|
|
770
|
+
quotedAt?: string | null | undefined;
|
|
771
|
+
expiresAt?: string | null | undefined;
|
|
772
|
+
};
|
|
773
|
+
current: {
|
|
774
|
+
sessionId: string;
|
|
775
|
+
items: {
|
|
776
|
+
itemId: string;
|
|
777
|
+
title: string;
|
|
778
|
+
productId: string | null;
|
|
779
|
+
optionId: string | null;
|
|
780
|
+
optionUnitId: string | null;
|
|
781
|
+
optionUnitName: string | null;
|
|
782
|
+
optionUnitType: string | null;
|
|
783
|
+
pricingCategoryId: string | null;
|
|
784
|
+
quantity: number;
|
|
785
|
+
pricingMode: string;
|
|
786
|
+
unitSellAmountCents: number | null;
|
|
787
|
+
totalSellAmountCents: number | null;
|
|
788
|
+
warnings: string[];
|
|
789
|
+
}[];
|
|
790
|
+
catalogId: string | null;
|
|
791
|
+
currencyCode: string;
|
|
792
|
+
totalSellAmountCents: number;
|
|
793
|
+
warnings: never[];
|
|
794
|
+
appliedToSession: boolean;
|
|
795
|
+
};
|
|
796
|
+
deltaAmountCents: number;
|
|
797
|
+
staleQuote: boolean;
|
|
798
|
+
};
|
|
799
|
+
availability: {
|
|
800
|
+
departureId: string;
|
|
801
|
+
slotId: string;
|
|
802
|
+
productId: string;
|
|
803
|
+
optionId: string | null;
|
|
804
|
+
dateLocal: string;
|
|
805
|
+
startsAt: string | null;
|
|
806
|
+
endsAt: string | null;
|
|
807
|
+
timezone: string;
|
|
808
|
+
status: "cancelled" | "open" | "closed" | "sold_out";
|
|
809
|
+
capacity: number | null;
|
|
810
|
+
remaining: number | null;
|
|
811
|
+
};
|
|
812
|
+
allocation: {
|
|
813
|
+
id: string;
|
|
814
|
+
bookingItemId: string;
|
|
815
|
+
productId: string | null;
|
|
816
|
+
optionId: string | null;
|
|
817
|
+
optionUnitId: string | null;
|
|
818
|
+
pricingCategoryId: string | null;
|
|
819
|
+
availabilitySlotId: string | null;
|
|
820
|
+
quantity: number;
|
|
821
|
+
allocationType: "resource" | "pickup" | "unit";
|
|
822
|
+
status: "cancelled" | "confirmed" | "expired" | "fulfilled" | "held" | "released";
|
|
823
|
+
holdExpiresAt: string | null;
|
|
824
|
+
confirmedAt: string | null;
|
|
825
|
+
releasedAt: string | null;
|
|
826
|
+
}[];
|
|
827
|
+
currency: string;
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
outputFormat: "json";
|
|
831
|
+
status: 201;
|
|
832
|
+
};
|
|
833
|
+
};
|
|
299
834
|
} & {
|
|
300
835
|
"/departures/:departureId/eligibility": {
|
|
301
836
|
$post: {
|
|
@@ -491,7 +1026,7 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
491
1026
|
output: {
|
|
492
1027
|
data: {
|
|
493
1028
|
productId: string;
|
|
494
|
-
availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "
|
|
1029
|
+
availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "on_request" | "unavailable" | "available";
|
|
495
1030
|
counts: {
|
|
496
1031
|
total: number;
|
|
497
1032
|
open: number;
|
|
@@ -512,7 +1047,7 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
512
1047
|
endAt: string | null;
|
|
513
1048
|
timezone: string;
|
|
514
1049
|
status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
|
|
515
|
-
availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "
|
|
1050
|
+
availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "on_request" | "unavailable" | "available";
|
|
516
1051
|
capacity: number | null;
|
|
517
1052
|
remaining: number | null;
|
|
518
1053
|
pastCutoff: boolean;
|
|
@@ -660,8 +1195,8 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
660
1195
|
};
|
|
661
1196
|
output: {
|
|
662
1197
|
data: {
|
|
663
|
-
status: "
|
|
664
|
-
reason: "scope" | "currency" | "
|
|
1198
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
1199
|
+
reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
|
|
665
1200
|
offer: {
|
|
666
1201
|
id: string;
|
|
667
1202
|
name: string;
|
|
@@ -735,8 +1270,8 @@ export declare function createStorefrontPublicRoutes(options?: StorefrontService
|
|
|
735
1270
|
input: {};
|
|
736
1271
|
output: {
|
|
737
1272
|
data: {
|
|
738
|
-
status: "
|
|
739
|
-
reason: "scope" | "currency" | "
|
|
1273
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
1274
|
+
reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
|
|
740
1275
|
offer: {
|
|
741
1276
|
id: string;
|
|
742
1277
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAA;AAIvB,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAA;AAiBrB,KAAK,GAAG,GAAG;IACT,QAAQ,EAAE,cAAc,CAAA;IACxB,SAAS,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,GAAG,eAAe,CAAA;CACpB,CAAA;AA+CD,wBAAgB,4BAA4B,CAAC,OAAO,CAAC,EAAE,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAuP9E;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
|