@voyantjs/availability-react 0.33.0 → 0.35.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.
@@ -597,6 +597,318 @@ export declare function getSlotUnitAvailabilityQueryOptions(client: FetchWithVal
597
597
  [dataTagErrorSymbol]: Error;
598
598
  };
599
599
  };
600
+ export declare function getSlotAllocationQueryOptions(client: FetchWithValidationOptions, slotId: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
601
+ data: {
602
+ slot: {
603
+ id: string;
604
+ productId: string | null;
605
+ startsAt: string | null;
606
+ endsAt: string | null;
607
+ };
608
+ bookings: {
609
+ id: string;
610
+ bookingNumber: string;
611
+ status: string;
612
+ contactFirstName: string | null;
613
+ contactLastName: string | null;
614
+ contactEmail: string | null;
615
+ contactPhone: string | null;
616
+ sellCurrency: string | null;
617
+ pax: number | null;
618
+ travelers: {
619
+ id: string;
620
+ bookingId: string;
621
+ bookingNumber: string;
622
+ bookingStatus: string;
623
+ firstName: string;
624
+ lastName: string;
625
+ fullName: string;
626
+ email: string | null;
627
+ phone: string | null;
628
+ isLeadTraveler: boolean;
629
+ isPrimary: boolean;
630
+ sharingGroupId: string | null;
631
+ roomTypeId: string | null;
632
+ bedPreference: string | null;
633
+ allocations: Record<string, string>;
634
+ travelerCategory: string | null;
635
+ participantType: string;
636
+ hasAccessibilityNeeds: boolean;
637
+ hasDietaryRequirements: boolean;
638
+ }[];
639
+ }[];
640
+ resources: {
641
+ id: string;
642
+ slotId: string;
643
+ kind: string;
644
+ refType: string | null;
645
+ refId: string | null;
646
+ label: string | null;
647
+ capacity: number;
648
+ flags: Record<string, unknown>;
649
+ parentId: string | null;
650
+ sortOrder: number;
651
+ createdAt: string | Date;
652
+ updatedAt: string | Date;
653
+ }[];
654
+ sharingGroupLabels: Record<string, string>;
655
+ summary: {
656
+ bookingCount: number;
657
+ travelerCount: number;
658
+ leadTravelerCount: number;
659
+ bookingsByStatus: Record<string, number>;
660
+ };
661
+ };
662
+ }, Error, {
663
+ data: {
664
+ slot: {
665
+ id: string;
666
+ productId: string | null;
667
+ startsAt: string | null;
668
+ endsAt: string | null;
669
+ };
670
+ bookings: {
671
+ id: string;
672
+ bookingNumber: string;
673
+ status: string;
674
+ contactFirstName: string | null;
675
+ contactLastName: string | null;
676
+ contactEmail: string | null;
677
+ contactPhone: string | null;
678
+ sellCurrency: string | null;
679
+ pax: number | null;
680
+ travelers: {
681
+ id: string;
682
+ bookingId: string;
683
+ bookingNumber: string;
684
+ bookingStatus: string;
685
+ firstName: string;
686
+ lastName: string;
687
+ fullName: string;
688
+ email: string | null;
689
+ phone: string | null;
690
+ isLeadTraveler: boolean;
691
+ isPrimary: boolean;
692
+ sharingGroupId: string | null;
693
+ roomTypeId: string | null;
694
+ bedPreference: string | null;
695
+ allocations: Record<string, string>;
696
+ travelerCategory: string | null;
697
+ participantType: string;
698
+ hasAccessibilityNeeds: boolean;
699
+ hasDietaryRequirements: boolean;
700
+ }[];
701
+ }[];
702
+ resources: {
703
+ id: string;
704
+ slotId: string;
705
+ kind: string;
706
+ refType: string | null;
707
+ refId: string | null;
708
+ label: string | null;
709
+ capacity: number;
710
+ flags: Record<string, unknown>;
711
+ parentId: string | null;
712
+ sortOrder: number;
713
+ createdAt: string | Date;
714
+ updatedAt: string | Date;
715
+ }[];
716
+ sharingGroupLabels: Record<string, string>;
717
+ summary: {
718
+ bookingCount: number;
719
+ travelerCount: number;
720
+ leadTravelerCount: number;
721
+ bookingsByStatus: Record<string, number>;
722
+ };
723
+ };
724
+ }, readonly ["voyant", "availability", "slots", "allocation", string]>, "queryFn"> & {
725
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
726
+ data: {
727
+ slot: {
728
+ id: string;
729
+ productId: string | null;
730
+ startsAt: string | null;
731
+ endsAt: string | null;
732
+ };
733
+ bookings: {
734
+ id: string;
735
+ bookingNumber: string;
736
+ status: string;
737
+ contactFirstName: string | null;
738
+ contactLastName: string | null;
739
+ contactEmail: string | null;
740
+ contactPhone: string | null;
741
+ sellCurrency: string | null;
742
+ pax: number | null;
743
+ travelers: {
744
+ id: string;
745
+ bookingId: string;
746
+ bookingNumber: string;
747
+ bookingStatus: string;
748
+ firstName: string;
749
+ lastName: string;
750
+ fullName: string;
751
+ email: string | null;
752
+ phone: string | null;
753
+ isLeadTraveler: boolean;
754
+ isPrimary: boolean;
755
+ sharingGroupId: string | null;
756
+ roomTypeId: string | null;
757
+ bedPreference: string | null;
758
+ allocations: Record<string, string>;
759
+ travelerCategory: string | null;
760
+ participantType: string;
761
+ hasAccessibilityNeeds: boolean;
762
+ hasDietaryRequirements: boolean;
763
+ }[];
764
+ }[];
765
+ resources: {
766
+ id: string;
767
+ slotId: string;
768
+ kind: string;
769
+ refType: string | null;
770
+ refId: string | null;
771
+ label: string | null;
772
+ capacity: number;
773
+ flags: Record<string, unknown>;
774
+ parentId: string | null;
775
+ sortOrder: number;
776
+ createdAt: string | Date;
777
+ updatedAt: string | Date;
778
+ }[];
779
+ sharingGroupLabels: Record<string, string>;
780
+ summary: {
781
+ bookingCount: number;
782
+ travelerCount: number;
783
+ leadTravelerCount: number;
784
+ bookingsByStatus: Record<string, number>;
785
+ };
786
+ };
787
+ }, readonly ["voyant", "availability", "slots", "allocation", string], never> | undefined;
788
+ } & {
789
+ queryKey: readonly ["voyant", "availability", "slots", "allocation", string] & {
790
+ [dataTagSymbol]: {
791
+ data: {
792
+ slot: {
793
+ id: string;
794
+ productId: string | null;
795
+ startsAt: string | null;
796
+ endsAt: string | null;
797
+ };
798
+ bookings: {
799
+ id: string;
800
+ bookingNumber: string;
801
+ status: string;
802
+ contactFirstName: string | null;
803
+ contactLastName: string | null;
804
+ contactEmail: string | null;
805
+ contactPhone: string | null;
806
+ sellCurrency: string | null;
807
+ pax: number | null;
808
+ travelers: {
809
+ id: string;
810
+ bookingId: string;
811
+ bookingNumber: string;
812
+ bookingStatus: string;
813
+ firstName: string;
814
+ lastName: string;
815
+ fullName: string;
816
+ email: string | null;
817
+ phone: string | null;
818
+ isLeadTraveler: boolean;
819
+ isPrimary: boolean;
820
+ sharingGroupId: string | null;
821
+ roomTypeId: string | null;
822
+ bedPreference: string | null;
823
+ allocations: Record<string, string>;
824
+ travelerCategory: string | null;
825
+ participantType: string;
826
+ hasAccessibilityNeeds: boolean;
827
+ hasDietaryRequirements: boolean;
828
+ }[];
829
+ }[];
830
+ resources: {
831
+ id: string;
832
+ slotId: string;
833
+ kind: string;
834
+ refType: string | null;
835
+ refId: string | null;
836
+ label: string | null;
837
+ capacity: number;
838
+ flags: Record<string, unknown>;
839
+ parentId: string | null;
840
+ sortOrder: number;
841
+ createdAt: string | Date;
842
+ updatedAt: string | Date;
843
+ }[];
844
+ sharingGroupLabels: Record<string, string>;
845
+ summary: {
846
+ bookingCount: number;
847
+ travelerCount: number;
848
+ leadTravelerCount: number;
849
+ bookingsByStatus: Record<string, number>;
850
+ };
851
+ };
852
+ };
853
+ [dataTagErrorSymbol]: Error;
854
+ };
855
+ };
856
+ export declare function getSlotAllocationAuditLogQueryOptions(client: FetchWithValidationOptions, slotId: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
857
+ data: {
858
+ id: string;
859
+ slotId: string;
860
+ action: string;
861
+ actorId: string | null;
862
+ travelerId: string | null;
863
+ resourceId: string | null;
864
+ before: Record<string, unknown> | null;
865
+ after: Record<string, unknown> | null;
866
+ createdAt: string;
867
+ }[];
868
+ }, Error, {
869
+ data: {
870
+ id: string;
871
+ slotId: string;
872
+ action: string;
873
+ actorId: string | null;
874
+ travelerId: string | null;
875
+ resourceId: string | null;
876
+ before: Record<string, unknown> | null;
877
+ after: Record<string, unknown> | null;
878
+ createdAt: string;
879
+ }[];
880
+ }, readonly ["voyant", "availability", "slots", "allocation", string, "audit-log"]>, "queryFn"> & {
881
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
882
+ data: {
883
+ id: string;
884
+ slotId: string;
885
+ action: string;
886
+ actorId: string | null;
887
+ travelerId: string | null;
888
+ resourceId: string | null;
889
+ before: Record<string, unknown> | null;
890
+ after: Record<string, unknown> | null;
891
+ createdAt: string;
892
+ }[];
893
+ }, readonly ["voyant", "availability", "slots", "allocation", string, "audit-log"], never> | undefined;
894
+ } & {
895
+ queryKey: readonly ["voyant", "availability", "slots", "allocation", string, "audit-log"] & {
896
+ [dataTagSymbol]: {
897
+ data: {
898
+ id: string;
899
+ slotId: string;
900
+ action: string;
901
+ actorId: string | null;
902
+ travelerId: string | null;
903
+ resourceId: string | null;
904
+ before: Record<string, unknown> | null;
905
+ after: Record<string, unknown> | null;
906
+ createdAt: string;
907
+ }[];
908
+ };
909
+ [dataTagErrorSymbol]: Error;
910
+ };
911
+ };
600
912
  export declare function getProductQueryOptions(client: FetchWithValidationOptions, id: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
601
913
  data: {
602
914
  id: string;
@@ -625,6 +937,106 @@ export declare function getProductQueryOptions(client: FetchWithValidationOption
625
937
  [dataTagErrorSymbol]: Error;
626
938
  };
627
939
  };
940
+ export declare function getProductResourceTemplatesQueryOptions(client: FetchWithValidationOptions, productId: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
941
+ data: {
942
+ id: string;
943
+ name: string;
944
+ code: string | null;
945
+ description: string | null;
946
+ status: string;
947
+ isDefault: boolean;
948
+ sortOrder: number;
949
+ templates: {
950
+ id: string;
951
+ productOptionId: string;
952
+ kind: string;
953
+ refType: string | null;
954
+ refId: string | null;
955
+ capacity: number;
956
+ namePattern: string;
957
+ layout: string | null;
958
+ flags: Record<string, unknown>;
959
+ createdAt: string;
960
+ updatedAt: string;
961
+ }[];
962
+ }[];
963
+ }, Error, {
964
+ data: {
965
+ id: string;
966
+ name: string;
967
+ code: string | null;
968
+ description: string | null;
969
+ status: string;
970
+ isDefault: boolean;
971
+ sortOrder: number;
972
+ templates: {
973
+ id: string;
974
+ productOptionId: string;
975
+ kind: string;
976
+ refType: string | null;
977
+ refId: string | null;
978
+ capacity: number;
979
+ namePattern: string;
980
+ layout: string | null;
981
+ flags: Record<string, unknown>;
982
+ createdAt: string;
983
+ updatedAt: string;
984
+ }[];
985
+ }[];
986
+ }, readonly ["voyant", "availability", "products", "resource-templates", string]>, "queryFn"> & {
987
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
988
+ data: {
989
+ id: string;
990
+ name: string;
991
+ code: string | null;
992
+ description: string | null;
993
+ status: string;
994
+ isDefault: boolean;
995
+ sortOrder: number;
996
+ templates: {
997
+ id: string;
998
+ productOptionId: string;
999
+ kind: string;
1000
+ refType: string | null;
1001
+ refId: string | null;
1002
+ capacity: number;
1003
+ namePattern: string;
1004
+ layout: string | null;
1005
+ flags: Record<string, unknown>;
1006
+ createdAt: string;
1007
+ updatedAt: string;
1008
+ }[];
1009
+ }[];
1010
+ }, readonly ["voyant", "availability", "products", "resource-templates", string], never> | undefined;
1011
+ } & {
1012
+ queryKey: readonly ["voyant", "availability", "products", "resource-templates", string] & {
1013
+ [dataTagSymbol]: {
1014
+ data: {
1015
+ id: string;
1016
+ name: string;
1017
+ code: string | null;
1018
+ description: string | null;
1019
+ status: string;
1020
+ isDefault: boolean;
1021
+ sortOrder: number;
1022
+ templates: {
1023
+ id: string;
1024
+ productOptionId: string;
1025
+ kind: string;
1026
+ refType: string | null;
1027
+ refId: string | null;
1028
+ capacity: number;
1029
+ namePattern: string;
1030
+ layout: string | null;
1031
+ flags: Record<string, unknown>;
1032
+ createdAt: string;
1033
+ updatedAt: string;
1034
+ }[];
1035
+ }[];
1036
+ };
1037
+ [dataTagErrorSymbol]: Error;
1038
+ };
1039
+ };
628
1040
  export declare function getSlotPickupsQueryOptions(client: FetchWithValidationOptions, slotId: string | null | undefined, options?: Pick<UseSlotsOptions, "limit" | "offset">): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
629
1041
  data: {
630
1042
  id: string;
@@ -743,7 +1155,7 @@ export declare function getSlotAssignmentsQueryOptions(client: FetchWithValidati
743
1155
  poolId: string | null;
744
1156
  resourceId: string | null;
745
1157
  bookingId: string | null;
746
- status: "completed" | "cancelled" | "reserved" | "assigned" | "released";
1158
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
747
1159
  assignedBy: string | null;
748
1160
  releasedAt: string | null;
749
1161
  notes: string | null;
@@ -757,7 +1169,7 @@ export declare function getSlotAssignmentsQueryOptions(client: FetchWithValidati
757
1169
  poolId: string | null;
758
1170
  resourceId: string | null;
759
1171
  bookingId: string | null;
760
- status: "completed" | "cancelled" | "reserved" | "assigned" | "released";
1172
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
761
1173
  assignedBy: string | null;
762
1174
  releasedAt: string | null;
763
1175
  notes: string | null;
@@ -772,7 +1184,7 @@ export declare function getSlotAssignmentsQueryOptions(client: FetchWithValidati
772
1184
  poolId: string | null;
773
1185
  resourceId: string | null;
774
1186
  bookingId: string | null;
775
- status: "completed" | "cancelled" | "reserved" | "assigned" | "released";
1187
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
776
1188
  assignedBy: string | null;
777
1189
  releasedAt: string | null;
778
1190
  notes: string | null;
@@ -789,7 +1201,7 @@ export declare function getSlotAssignmentsQueryOptions(client: FetchWithValidati
789
1201
  poolId: string | null;
790
1202
  resourceId: string | null;
791
1203
  bookingId: string | null;
792
- status: "completed" | "cancelled" | "reserved" | "assigned" | "released";
1204
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
793
1205
  assignedBy: string | null;
794
1206
  releasedAt: string | null;
795
1207
  notes: string | null;
@@ -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,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,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;;;;;EAkB5D;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,0BAA0B,EAClC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,OAAO,GAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,QAAQ,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBxD;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,QAAQ,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3D;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,QAAQ,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3D"}
@@ -2,7 +2,7 @@
2
2
  import { queryOptions } from "@tanstack/react-query";
3
3
  import { fetchWithValidation } from "./client.js";
4
4
  import { availabilityQueryKeys } from "./query-keys.js";
5
- import { availabilityCloseoutListResponse, availabilityPickupPointListResponse, availabilityRuleListResponse, availabilitySlotAssignmentListResponse, availabilitySlotListResponse, availabilitySlotPickupListResponse, availabilitySlotSingleResponse, availabilityStartTimeListResponse, bookingSummaryListResponse, productListResponse, productSingleResponse, resourceSummaryListResponse, slotUnitAvailabilityListResponse, } from "./schemas.js";
5
+ import { allocationAuditLogResponse, availabilityCloseoutListResponse, availabilityPickupPointListResponse, availabilityRuleListResponse, availabilitySlotAssignmentListResponse, availabilitySlotListResponse, availabilitySlotPickupListResponse, availabilitySlotSingleResponse, availabilityStartTimeListResponse, bookingSummaryListResponse, productListResponse, productOptionResourceTemplatesListResponse, productSingleResponse, resourceSummaryListResponse, slotAllocationManifestResponse, slotUnitAvailabilityListResponse, } from "./schemas.js";
6
6
  function appendPagination(params, filters) {
7
7
  if (filters.limit !== undefined)
8
8
  params.set("limit", String(filters.limit));
@@ -123,6 +123,26 @@ export function getSlotUnitAvailabilityQueryOptions(client, slotId) {
123
123
  },
124
124
  });
125
125
  }
126
+ export function getSlotAllocationQueryOptions(client, slotId) {
127
+ return queryOptions({
128
+ queryKey: availabilityQueryKeys.slotAllocation(slotId ?? ""),
129
+ queryFn: async () => {
130
+ if (!slotId)
131
+ throw new Error("getSlotAllocationQueryOptions requires a slotId");
132
+ return fetchWithValidation(`/v1/admin/availability/slots/${slotId}/allocation`, slotAllocationManifestResponse, client);
133
+ },
134
+ });
135
+ }
136
+ export function getSlotAllocationAuditLogQueryOptions(client, slotId) {
137
+ return queryOptions({
138
+ queryKey: availabilityQueryKeys.slotAllocationAuditLog(slotId ?? ""),
139
+ queryFn: async () => {
140
+ if (!slotId)
141
+ throw new Error("getSlotAllocationAuditLogQueryOptions requires a slotId");
142
+ return fetchWithValidation(`/v1/admin/availability/slots/${slotId}/allocation/audit-log`, allocationAuditLogResponse, client);
143
+ },
144
+ });
145
+ }
126
146
  export function getProductQueryOptions(client, id) {
127
147
  return queryOptions({
128
148
  queryKey: availabilityQueryKeys.product(id ?? ""),
@@ -133,6 +153,16 @@ export function getProductQueryOptions(client, id) {
133
153
  },
134
154
  });
135
155
  }
156
+ export function getProductResourceTemplatesQueryOptions(client, productId) {
157
+ return queryOptions({
158
+ queryKey: availabilityQueryKeys.productResourceTemplates(productId ?? ""),
159
+ queryFn: async () => {
160
+ if (!productId)
161
+ throw new Error("getProductResourceTemplatesQueryOptions requires a productId");
162
+ return fetchWithValidation(`/v1/admin/availability/products/${productId}/allocation/resource-templates`, productOptionResourceTemplatesListResponse, client);
163
+ },
164
+ });
165
+ }
136
166
  export function getSlotPickupsQueryOptions(client, slotId, options = {}) {
137
167
  const filters = { slotId: slotId ?? undefined, ...options };
138
168
  return queryOptions({