@voyantjs/bookings-react 0.3.0 → 0.4.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 +11 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.d.ts +145 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.js +35 -0
- package/dist/hooks/use-public-booking-session-state.d.ts +16 -0
- package/dist/hooks/use-public-booking-session-state.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session-state.js +12 -0
- package/dist/hooks/use-public-booking-session.d.ts +98 -0
- package/dist/hooks/use-public-booking-session.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session.js +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/query-keys.d.ts +3 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +3 -0
- package/dist/query-options.d.ts +432 -0
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +13 -1
- package/dist/schemas.d.ts +339 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +4 -0
- package/package.json +5 -5
package/dist/query-options.d.ts
CHANGED
|
@@ -393,4 +393,436 @@ export declare function getBookingNotesQueryOptions(client: FetchWithValidationO
|
|
|
393
393
|
[dataTagErrorSymbol]: Error;
|
|
394
394
|
};
|
|
395
395
|
};
|
|
396
|
+
export declare function getPublicBookingSessionQueryOptions(client: FetchWithValidationOptions, sessionId: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
397
|
+
data: {
|
|
398
|
+
sessionId: string;
|
|
399
|
+
bookingNumber: string;
|
|
400
|
+
status: "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled";
|
|
401
|
+
externalBookingRef: string | null;
|
|
402
|
+
communicationLanguage: string | null;
|
|
403
|
+
sellCurrency: string;
|
|
404
|
+
sellAmountCents: number | null;
|
|
405
|
+
startDate: string | null;
|
|
406
|
+
endDate: string | null;
|
|
407
|
+
pax: number | null;
|
|
408
|
+
holdExpiresAt: string | null;
|
|
409
|
+
confirmedAt: string | null;
|
|
410
|
+
expiredAt: string | null;
|
|
411
|
+
cancelledAt: string | null;
|
|
412
|
+
completedAt: string | null;
|
|
413
|
+
participants: {
|
|
414
|
+
id: string;
|
|
415
|
+
participantType: "traveler" | "booker" | "contact" | "occupant" | "staff" | "other";
|
|
416
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
417
|
+
firstName: string;
|
|
418
|
+
lastName: string;
|
|
419
|
+
email: string | null;
|
|
420
|
+
phone: string | null;
|
|
421
|
+
preferredLanguage: string | null;
|
|
422
|
+
accessibilityNeeds: string | null;
|
|
423
|
+
specialRequests: string | null;
|
|
424
|
+
isPrimary: boolean;
|
|
425
|
+
notes: string | null;
|
|
426
|
+
}[];
|
|
427
|
+
items: {
|
|
428
|
+
id: string;
|
|
429
|
+
title: string;
|
|
430
|
+
description: string | null;
|
|
431
|
+
itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
432
|
+
status: "draft" | "on_hold" | "confirmed" | "expired" | "cancelled" | "fulfilled";
|
|
433
|
+
serviceDate: string | null;
|
|
434
|
+
startsAt: string | null;
|
|
435
|
+
endsAt: string | null;
|
|
436
|
+
quantity: number;
|
|
437
|
+
sellCurrency: string;
|
|
438
|
+
unitSellAmountCents: number | null;
|
|
439
|
+
totalSellAmountCents: number | null;
|
|
440
|
+
costCurrency: string | null;
|
|
441
|
+
unitCostAmountCents: number | null;
|
|
442
|
+
totalCostAmountCents: number | null;
|
|
443
|
+
notes: string | null;
|
|
444
|
+
productId: string | null;
|
|
445
|
+
optionId: string | null;
|
|
446
|
+
optionUnitId: string | null;
|
|
447
|
+
pricingCategoryId: string | null;
|
|
448
|
+
participantLinks: {
|
|
449
|
+
id: string;
|
|
450
|
+
participantId: string;
|
|
451
|
+
role: "traveler" | "occupant" | "other" | "primary_contact" | "service_assignee" | "beneficiary";
|
|
452
|
+
isPrimary: boolean;
|
|
453
|
+
}[];
|
|
454
|
+
}[];
|
|
455
|
+
allocations: {
|
|
456
|
+
id: string;
|
|
457
|
+
bookingItemId: string | null;
|
|
458
|
+
productId: string | null;
|
|
459
|
+
optionId: string | null;
|
|
460
|
+
optionUnitId: string | null;
|
|
461
|
+
pricingCategoryId: string | null;
|
|
462
|
+
availabilitySlotId: string | null;
|
|
463
|
+
quantity: number;
|
|
464
|
+
allocationType: "unit" | "pickup" | "resource";
|
|
465
|
+
status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
|
|
466
|
+
holdExpiresAt: string | null;
|
|
467
|
+
confirmedAt: string | null;
|
|
468
|
+
releasedAt: string | null;
|
|
469
|
+
}[];
|
|
470
|
+
checklist: {
|
|
471
|
+
hasParticipants: boolean;
|
|
472
|
+
hasTraveler: boolean;
|
|
473
|
+
hasPrimaryParticipant: boolean;
|
|
474
|
+
hasItems: boolean;
|
|
475
|
+
hasAllocations: boolean;
|
|
476
|
+
readyForConfirmation: boolean;
|
|
477
|
+
};
|
|
478
|
+
state: {
|
|
479
|
+
sessionId: string;
|
|
480
|
+
stateKey: "wizard";
|
|
481
|
+
currentStep: string | null;
|
|
482
|
+
completedSteps: string[];
|
|
483
|
+
payload: Record<string, unknown>;
|
|
484
|
+
version: number;
|
|
485
|
+
createdAt: string;
|
|
486
|
+
updatedAt: string;
|
|
487
|
+
} | null;
|
|
488
|
+
};
|
|
489
|
+
}, Error, {
|
|
490
|
+
data: {
|
|
491
|
+
sessionId: string;
|
|
492
|
+
bookingNumber: string;
|
|
493
|
+
status: "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled";
|
|
494
|
+
externalBookingRef: string | null;
|
|
495
|
+
communicationLanguage: string | null;
|
|
496
|
+
sellCurrency: string;
|
|
497
|
+
sellAmountCents: number | null;
|
|
498
|
+
startDate: string | null;
|
|
499
|
+
endDate: string | null;
|
|
500
|
+
pax: number | null;
|
|
501
|
+
holdExpiresAt: string | null;
|
|
502
|
+
confirmedAt: string | null;
|
|
503
|
+
expiredAt: string | null;
|
|
504
|
+
cancelledAt: string | null;
|
|
505
|
+
completedAt: string | null;
|
|
506
|
+
participants: {
|
|
507
|
+
id: string;
|
|
508
|
+
participantType: "traveler" | "booker" | "contact" | "occupant" | "staff" | "other";
|
|
509
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
510
|
+
firstName: string;
|
|
511
|
+
lastName: string;
|
|
512
|
+
email: string | null;
|
|
513
|
+
phone: string | null;
|
|
514
|
+
preferredLanguage: string | null;
|
|
515
|
+
accessibilityNeeds: string | null;
|
|
516
|
+
specialRequests: string | null;
|
|
517
|
+
isPrimary: boolean;
|
|
518
|
+
notes: string | null;
|
|
519
|
+
}[];
|
|
520
|
+
items: {
|
|
521
|
+
id: string;
|
|
522
|
+
title: string;
|
|
523
|
+
description: string | null;
|
|
524
|
+
itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
525
|
+
status: "draft" | "on_hold" | "confirmed" | "expired" | "cancelled" | "fulfilled";
|
|
526
|
+
serviceDate: string | null;
|
|
527
|
+
startsAt: string | null;
|
|
528
|
+
endsAt: string | null;
|
|
529
|
+
quantity: number;
|
|
530
|
+
sellCurrency: string;
|
|
531
|
+
unitSellAmountCents: number | null;
|
|
532
|
+
totalSellAmountCents: number | null;
|
|
533
|
+
costCurrency: string | null;
|
|
534
|
+
unitCostAmountCents: number | null;
|
|
535
|
+
totalCostAmountCents: number | null;
|
|
536
|
+
notes: string | null;
|
|
537
|
+
productId: string | null;
|
|
538
|
+
optionId: string | null;
|
|
539
|
+
optionUnitId: string | null;
|
|
540
|
+
pricingCategoryId: string | null;
|
|
541
|
+
participantLinks: {
|
|
542
|
+
id: string;
|
|
543
|
+
participantId: string;
|
|
544
|
+
role: "traveler" | "occupant" | "other" | "primary_contact" | "service_assignee" | "beneficiary";
|
|
545
|
+
isPrimary: boolean;
|
|
546
|
+
}[];
|
|
547
|
+
}[];
|
|
548
|
+
allocations: {
|
|
549
|
+
id: string;
|
|
550
|
+
bookingItemId: string | null;
|
|
551
|
+
productId: string | null;
|
|
552
|
+
optionId: string | null;
|
|
553
|
+
optionUnitId: string | null;
|
|
554
|
+
pricingCategoryId: string | null;
|
|
555
|
+
availabilitySlotId: string | null;
|
|
556
|
+
quantity: number;
|
|
557
|
+
allocationType: "unit" | "pickup" | "resource";
|
|
558
|
+
status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
|
|
559
|
+
holdExpiresAt: string | null;
|
|
560
|
+
confirmedAt: string | null;
|
|
561
|
+
releasedAt: string | null;
|
|
562
|
+
}[];
|
|
563
|
+
checklist: {
|
|
564
|
+
hasParticipants: boolean;
|
|
565
|
+
hasTraveler: boolean;
|
|
566
|
+
hasPrimaryParticipant: boolean;
|
|
567
|
+
hasItems: boolean;
|
|
568
|
+
hasAllocations: boolean;
|
|
569
|
+
readyForConfirmation: boolean;
|
|
570
|
+
};
|
|
571
|
+
state: {
|
|
572
|
+
sessionId: string;
|
|
573
|
+
stateKey: "wizard";
|
|
574
|
+
currentStep: string | null;
|
|
575
|
+
completedSteps: string[];
|
|
576
|
+
payload: Record<string, unknown>;
|
|
577
|
+
version: number;
|
|
578
|
+
createdAt: string;
|
|
579
|
+
updatedAt: string;
|
|
580
|
+
} | null;
|
|
581
|
+
};
|
|
582
|
+
}, readonly ["voyant", "bookings", "public-sessions", "detail", string]>, "queryFn"> & {
|
|
583
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
584
|
+
data: {
|
|
585
|
+
sessionId: string;
|
|
586
|
+
bookingNumber: string;
|
|
587
|
+
status: "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled";
|
|
588
|
+
externalBookingRef: string | null;
|
|
589
|
+
communicationLanguage: string | null;
|
|
590
|
+
sellCurrency: string;
|
|
591
|
+
sellAmountCents: number | null;
|
|
592
|
+
startDate: string | null;
|
|
593
|
+
endDate: string | null;
|
|
594
|
+
pax: number | null;
|
|
595
|
+
holdExpiresAt: string | null;
|
|
596
|
+
confirmedAt: string | null;
|
|
597
|
+
expiredAt: string | null;
|
|
598
|
+
cancelledAt: string | null;
|
|
599
|
+
completedAt: string | null;
|
|
600
|
+
participants: {
|
|
601
|
+
id: string;
|
|
602
|
+
participantType: "traveler" | "booker" | "contact" | "occupant" | "staff" | "other";
|
|
603
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
604
|
+
firstName: string;
|
|
605
|
+
lastName: string;
|
|
606
|
+
email: string | null;
|
|
607
|
+
phone: string | null;
|
|
608
|
+
preferredLanguage: string | null;
|
|
609
|
+
accessibilityNeeds: string | null;
|
|
610
|
+
specialRequests: string | null;
|
|
611
|
+
isPrimary: boolean;
|
|
612
|
+
notes: string | null;
|
|
613
|
+
}[];
|
|
614
|
+
items: {
|
|
615
|
+
id: string;
|
|
616
|
+
title: string;
|
|
617
|
+
description: string | null;
|
|
618
|
+
itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
619
|
+
status: "draft" | "on_hold" | "confirmed" | "expired" | "cancelled" | "fulfilled";
|
|
620
|
+
serviceDate: string | null;
|
|
621
|
+
startsAt: string | null;
|
|
622
|
+
endsAt: string | null;
|
|
623
|
+
quantity: number;
|
|
624
|
+
sellCurrency: string;
|
|
625
|
+
unitSellAmountCents: number | null;
|
|
626
|
+
totalSellAmountCents: number | null;
|
|
627
|
+
costCurrency: string | null;
|
|
628
|
+
unitCostAmountCents: number | null;
|
|
629
|
+
totalCostAmountCents: number | null;
|
|
630
|
+
notes: string | null;
|
|
631
|
+
productId: string | null;
|
|
632
|
+
optionId: string | null;
|
|
633
|
+
optionUnitId: string | null;
|
|
634
|
+
pricingCategoryId: string | null;
|
|
635
|
+
participantLinks: {
|
|
636
|
+
id: string;
|
|
637
|
+
participantId: string;
|
|
638
|
+
role: "traveler" | "occupant" | "other" | "primary_contact" | "service_assignee" | "beneficiary";
|
|
639
|
+
isPrimary: boolean;
|
|
640
|
+
}[];
|
|
641
|
+
}[];
|
|
642
|
+
allocations: {
|
|
643
|
+
id: string;
|
|
644
|
+
bookingItemId: string | null;
|
|
645
|
+
productId: string | null;
|
|
646
|
+
optionId: string | null;
|
|
647
|
+
optionUnitId: string | null;
|
|
648
|
+
pricingCategoryId: string | null;
|
|
649
|
+
availabilitySlotId: string | null;
|
|
650
|
+
quantity: number;
|
|
651
|
+
allocationType: "unit" | "pickup" | "resource";
|
|
652
|
+
status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
|
|
653
|
+
holdExpiresAt: string | null;
|
|
654
|
+
confirmedAt: string | null;
|
|
655
|
+
releasedAt: string | null;
|
|
656
|
+
}[];
|
|
657
|
+
checklist: {
|
|
658
|
+
hasParticipants: boolean;
|
|
659
|
+
hasTraveler: boolean;
|
|
660
|
+
hasPrimaryParticipant: boolean;
|
|
661
|
+
hasItems: boolean;
|
|
662
|
+
hasAllocations: boolean;
|
|
663
|
+
readyForConfirmation: boolean;
|
|
664
|
+
};
|
|
665
|
+
state: {
|
|
666
|
+
sessionId: string;
|
|
667
|
+
stateKey: "wizard";
|
|
668
|
+
currentStep: string | null;
|
|
669
|
+
completedSteps: string[];
|
|
670
|
+
payload: Record<string, unknown>;
|
|
671
|
+
version: number;
|
|
672
|
+
createdAt: string;
|
|
673
|
+
updatedAt: string;
|
|
674
|
+
} | null;
|
|
675
|
+
};
|
|
676
|
+
}, readonly ["voyant", "bookings", "public-sessions", "detail", string], never> | undefined;
|
|
677
|
+
} & {
|
|
678
|
+
queryKey: readonly ["voyant", "bookings", "public-sessions", "detail", string] & {
|
|
679
|
+
[dataTagSymbol]: {
|
|
680
|
+
data: {
|
|
681
|
+
sessionId: string;
|
|
682
|
+
bookingNumber: string;
|
|
683
|
+
status: "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled";
|
|
684
|
+
externalBookingRef: string | null;
|
|
685
|
+
communicationLanguage: string | null;
|
|
686
|
+
sellCurrency: string;
|
|
687
|
+
sellAmountCents: number | null;
|
|
688
|
+
startDate: string | null;
|
|
689
|
+
endDate: string | null;
|
|
690
|
+
pax: number | null;
|
|
691
|
+
holdExpiresAt: string | null;
|
|
692
|
+
confirmedAt: string | null;
|
|
693
|
+
expiredAt: string | null;
|
|
694
|
+
cancelledAt: string | null;
|
|
695
|
+
completedAt: string | null;
|
|
696
|
+
participants: {
|
|
697
|
+
id: string;
|
|
698
|
+
participantType: "traveler" | "booker" | "contact" | "occupant" | "staff" | "other";
|
|
699
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
700
|
+
firstName: string;
|
|
701
|
+
lastName: string;
|
|
702
|
+
email: string | null;
|
|
703
|
+
phone: string | null;
|
|
704
|
+
preferredLanguage: string | null;
|
|
705
|
+
accessibilityNeeds: string | null;
|
|
706
|
+
specialRequests: string | null;
|
|
707
|
+
isPrimary: boolean;
|
|
708
|
+
notes: string | null;
|
|
709
|
+
}[];
|
|
710
|
+
items: {
|
|
711
|
+
id: string;
|
|
712
|
+
title: string;
|
|
713
|
+
description: string | null;
|
|
714
|
+
itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
715
|
+
status: "draft" | "on_hold" | "confirmed" | "expired" | "cancelled" | "fulfilled";
|
|
716
|
+
serviceDate: string | null;
|
|
717
|
+
startsAt: string | null;
|
|
718
|
+
endsAt: string | null;
|
|
719
|
+
quantity: number;
|
|
720
|
+
sellCurrency: string;
|
|
721
|
+
unitSellAmountCents: number | null;
|
|
722
|
+
totalSellAmountCents: number | null;
|
|
723
|
+
costCurrency: string | null;
|
|
724
|
+
unitCostAmountCents: number | null;
|
|
725
|
+
totalCostAmountCents: number | null;
|
|
726
|
+
notes: string | null;
|
|
727
|
+
productId: string | null;
|
|
728
|
+
optionId: string | null;
|
|
729
|
+
optionUnitId: string | null;
|
|
730
|
+
pricingCategoryId: string | null;
|
|
731
|
+
participantLinks: {
|
|
732
|
+
id: string;
|
|
733
|
+
participantId: string;
|
|
734
|
+
role: "traveler" | "occupant" | "other" | "primary_contact" | "service_assignee" | "beneficiary";
|
|
735
|
+
isPrimary: boolean;
|
|
736
|
+
}[];
|
|
737
|
+
}[];
|
|
738
|
+
allocations: {
|
|
739
|
+
id: string;
|
|
740
|
+
bookingItemId: string | null;
|
|
741
|
+
productId: string | null;
|
|
742
|
+
optionId: string | null;
|
|
743
|
+
optionUnitId: string | null;
|
|
744
|
+
pricingCategoryId: string | null;
|
|
745
|
+
availabilitySlotId: string | null;
|
|
746
|
+
quantity: number;
|
|
747
|
+
allocationType: "unit" | "pickup" | "resource";
|
|
748
|
+
status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
|
|
749
|
+
holdExpiresAt: string | null;
|
|
750
|
+
confirmedAt: string | null;
|
|
751
|
+
releasedAt: string | null;
|
|
752
|
+
}[];
|
|
753
|
+
checklist: {
|
|
754
|
+
hasParticipants: boolean;
|
|
755
|
+
hasTraveler: boolean;
|
|
756
|
+
hasPrimaryParticipant: boolean;
|
|
757
|
+
hasItems: boolean;
|
|
758
|
+
hasAllocations: boolean;
|
|
759
|
+
readyForConfirmation: boolean;
|
|
760
|
+
};
|
|
761
|
+
state: {
|
|
762
|
+
sessionId: string;
|
|
763
|
+
stateKey: "wizard";
|
|
764
|
+
currentStep: string | null;
|
|
765
|
+
completedSteps: string[];
|
|
766
|
+
payload: Record<string, unknown>;
|
|
767
|
+
version: number;
|
|
768
|
+
createdAt: string;
|
|
769
|
+
updatedAt: string;
|
|
770
|
+
} | null;
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
[dataTagErrorSymbol]: Error;
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
export declare function getPublicBookingSessionStateQueryOptions(client: FetchWithValidationOptions, sessionId: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
777
|
+
data: {
|
|
778
|
+
sessionId: string;
|
|
779
|
+
stateKey: "wizard";
|
|
780
|
+
currentStep: string | null;
|
|
781
|
+
completedSteps: string[];
|
|
782
|
+
payload: Record<string, unknown>;
|
|
783
|
+
version: number;
|
|
784
|
+
createdAt: string;
|
|
785
|
+
updatedAt: string;
|
|
786
|
+
};
|
|
787
|
+
}, Error, {
|
|
788
|
+
data: {
|
|
789
|
+
sessionId: string;
|
|
790
|
+
stateKey: "wizard";
|
|
791
|
+
currentStep: string | null;
|
|
792
|
+
completedSteps: string[];
|
|
793
|
+
payload: Record<string, unknown>;
|
|
794
|
+
version: number;
|
|
795
|
+
createdAt: string;
|
|
796
|
+
updatedAt: string;
|
|
797
|
+
};
|
|
798
|
+
}, readonly ["voyant", "bookings", "public-sessions", "detail", string, "state"]>, "queryFn"> & {
|
|
799
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
800
|
+
data: {
|
|
801
|
+
sessionId: string;
|
|
802
|
+
stateKey: "wizard";
|
|
803
|
+
currentStep: string | null;
|
|
804
|
+
completedSteps: string[];
|
|
805
|
+
payload: Record<string, unknown>;
|
|
806
|
+
version: number;
|
|
807
|
+
createdAt: string;
|
|
808
|
+
updatedAt: string;
|
|
809
|
+
};
|
|
810
|
+
}, readonly ["voyant", "bookings", "public-sessions", "detail", string, "state"], never> | undefined;
|
|
811
|
+
} & {
|
|
812
|
+
queryKey: readonly ["voyant", "bookings", "public-sessions", "detail", string, "state"] & {
|
|
813
|
+
[dataTagSymbol]: {
|
|
814
|
+
data: {
|
|
815
|
+
sessionId: string;
|
|
816
|
+
stateKey: "wizard";
|
|
817
|
+
currentStep: string | null;
|
|
818
|
+
completedSteps: string[];
|
|
819
|
+
payload: Record<string, unknown>;
|
|
820
|
+
version: number;
|
|
821
|
+
createdAt: string;
|
|
822
|
+
updatedAt: string;
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
[dataTagErrorSymbol]: Error;
|
|
826
|
+
};
|
|
827
|
+
};
|
|
396
828
|
//# sourceMappingURL=query-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;AAalF,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,kBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBjC;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,iBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQhC;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,oBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAanC;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,0BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAazC;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,yBAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASxC;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASrC;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWrC;AAED,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWrC"}
|
package/dist/query-options.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { queryOptions } from "@tanstack/react-query";
|
|
3
3
|
import { fetchWithValidation } from "./client.js";
|
|
4
4
|
import { bookingsQueryKeys } from "./query-keys.js";
|
|
5
|
-
import { bookingActivityResponse, bookingListResponse, bookingNotesResponse, bookingPassengersResponse, bookingSingleResponse, bookingSupplierStatusesResponse, } from "./schemas.js";
|
|
5
|
+
import { bookingActivityResponse, bookingListResponse, bookingNotesResponse, bookingPassengersResponse, bookingSingleResponse, bookingSupplierStatusesResponse, publicBookingSessionResponse, publicBookingSessionStateResponse, } from "./schemas.js";
|
|
6
6
|
export function getBookingsQueryOptions(client, options = {}) {
|
|
7
7
|
const { enabled: _enabled = true, ...filters } = options;
|
|
8
8
|
return queryOptions({
|
|
@@ -57,3 +57,15 @@ export function getBookingNotesQueryOptions(client, bookingId, options = {}) {
|
|
|
57
57
|
queryFn: () => fetchWithValidation(`/v1/bookings/${bookingId}/notes`, bookingNotesResponse, client),
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
+
export function getPublicBookingSessionQueryOptions(client, sessionId) {
|
|
61
|
+
return queryOptions({
|
|
62
|
+
queryKey: bookingsQueryKeys.publicSession(sessionId ?? ""),
|
|
63
|
+
queryFn: () => fetchWithValidation(`/v1/public/bookings/sessions/${sessionId}`, publicBookingSessionResponse, client),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
export function getPublicBookingSessionStateQueryOptions(client, sessionId) {
|
|
67
|
+
return queryOptions({
|
|
68
|
+
queryKey: bookingsQueryKeys.publicSessionState(sessionId ?? ""),
|
|
69
|
+
queryFn: () => fetchWithValidation(`/v1/public/bookings/sessions/${sessionId}/state`, publicBookingSessionStateResponse, client),
|
|
70
|
+
});
|
|
71
|
+
}
|