@seatsio/seatsio-types 4.0.0 → 4.1.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/dist/index.d.ts +26 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -171,15 +171,15 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
|
|
|
171
171
|
*/
|
|
172
172
|
categoryFilter?: CategoryFilter;
|
|
173
173
|
/**
|
|
174
|
-
* Makes the specified categories available from selection, while making all others unavailable from selection. The array can be a list of category
|
|
174
|
+
* Makes the specified categories available from selection, while making all others unavailable from selection. The array can be a list of category keys or labels.
|
|
175
175
|
*/
|
|
176
176
|
availableCategories?: CategoryKey[];
|
|
177
177
|
/**
|
|
178
|
-
* Makes the specified categories unavailable from selection. The array can be a list of category
|
|
178
|
+
* Makes the specified categories unavailable from selection. The array can be a list of category keys or labels.
|
|
179
179
|
*/
|
|
180
180
|
unavailableCategories?: CategoryKey[];
|
|
181
181
|
/**
|
|
182
|
-
* Leaves the specified categories normally visible, while making all others dimmed out. The array can be a list of category
|
|
182
|
+
* Leaves the specified categories normally visible, while making all others dimmed out. The array can be a list of category keys or labels.
|
|
183
183
|
*/
|
|
184
184
|
filteredCategories?: CategoryKey[];
|
|
185
185
|
objectColor?: (object: SelectableObject, defaultColor: string, extraConfig: ExtraConfig) => string;
|
|
@@ -308,6 +308,10 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
|
|
|
308
308
|
* Called when the chart needs to prompt how many places to select for each ticket type. {@link https://docs.seats.io/docs/renderer/prompts-api/onPlacesWithTicketTypesPrompt See documentation}
|
|
309
309
|
*/
|
|
310
310
|
onPlacesWithTicketTypesPrompt?: (parameters: PlacesWithTicketTypesPromptParameters, confirmSelection: (placesPerTicketType: Dict<number> | string[]) => void) => void;
|
|
311
|
+
/**
|
|
312
|
+
* For charts with sections, enabling this setting will hide sections where all bookable objects are set as not for sale. By extension, this will also hide entire floors if every object on it is set as not for sale. {@link https://docs.seats.io/docs/renderer/config-hidesectionsnotforsale/ See documentation}
|
|
313
|
+
*/
|
|
314
|
+
hideSectionsNotForSale?: boolean;
|
|
311
315
|
}
|
|
312
316
|
export type ExtractedEventManagerProps = Pick<ChartRendererConfigOptions, 'colors' | 'colorScheme' | 'extraConfig' | 'fitTo' | 'objectColor' | 'showFullScreenButton' | 'style' | 'stylePreset' | 'tooltipInfo' | 'themePreset' | 'themeColors'>;
|
|
313
317
|
export interface BaseEventManagerConfigOptions extends CommonConfigOptions, ExtractedEventManagerProps, EventManagerCallbacks {
|
|
@@ -559,7 +563,7 @@ export type Floor = {
|
|
|
559
563
|
export type Category = {
|
|
560
564
|
accessible: boolean;
|
|
561
565
|
color: string;
|
|
562
|
-
key:
|
|
566
|
+
key: CategoryKey;
|
|
563
567
|
label: string;
|
|
564
568
|
pricing: {
|
|
565
569
|
price: number;
|
|
@@ -594,7 +598,7 @@ export type CategoryLimiter = {
|
|
|
594
598
|
quantity: number;
|
|
595
599
|
};
|
|
596
600
|
export type CategoryAndTicketLimiter = {
|
|
597
|
-
category:
|
|
601
|
+
category: CategoryKey;
|
|
598
602
|
ticketTypes: TicketTypeLimiter[];
|
|
599
603
|
};
|
|
600
604
|
export interface ChartRendererObjectTooltip {
|
|
@@ -724,8 +728,18 @@ export type SimplePricing = {
|
|
|
724
728
|
price: number;
|
|
725
729
|
channels?: ChannelPricing[];
|
|
726
730
|
};
|
|
731
|
+
export type SimplePricingForObjects = {
|
|
732
|
+
objects: string[];
|
|
733
|
+
originalPrice?: number;
|
|
734
|
+
price: number;
|
|
735
|
+
channels?: ChannelPricing[];
|
|
736
|
+
};
|
|
727
737
|
export type MultiLevelPricing = {
|
|
728
|
-
category:
|
|
738
|
+
category: CategoryKey;
|
|
739
|
+
ticketTypes: TicketType[];
|
|
740
|
+
};
|
|
741
|
+
export type MultiLevelPricingForObjects = {
|
|
742
|
+
objects: string[];
|
|
729
743
|
ticketTypes: TicketType[];
|
|
730
744
|
};
|
|
731
745
|
export type ChannelPricing = (SimpleChannelPricing | MultiLevelChannelPricing);
|
|
@@ -745,7 +759,9 @@ export type TicketType = {
|
|
|
745
759
|
label?: string;
|
|
746
760
|
description?: string;
|
|
747
761
|
};
|
|
748
|
-
export type
|
|
762
|
+
export type PricingForCategory = (SimplePricing | MultiLevelPricing);
|
|
763
|
+
export type PricingForObjects = (SimplePricingForObjects | MultiLevelPricingForObjects);
|
|
764
|
+
export type Pricing = (PricingForCategory | PricingForObjects)[];
|
|
749
765
|
export type SelectionValidator = SelectionValidatorNoOrphanSeats | SelectionValidatorConsecutiveSeats | SelectionValidatorMinimumSelectedPlaces;
|
|
750
766
|
interface SelectionValidatorNoOrphanSeats {
|
|
751
767
|
type: 'noOrphanSeats';
|
|
@@ -865,6 +881,7 @@ export interface AbstractBookableObject extends AbstractSelectableObject {
|
|
|
865
881
|
readonly forSale: boolean;
|
|
866
882
|
readonly dataPerEvent: Dict<object>;
|
|
867
883
|
readonly seasonStatusOverriddenQuantity: number;
|
|
884
|
+
readonly entrance: string | null;
|
|
868
885
|
inSelectableChannel?: boolean;
|
|
869
886
|
hashedChannelKey?: string;
|
|
870
887
|
isInChannel?: (channelKey: string) => boolean;
|
|
@@ -907,7 +924,6 @@ export interface GeneralAdmissionArea extends AbstractBookableObject {
|
|
|
907
924
|
readonly selectionPerTicketType: Dict<number>;
|
|
908
925
|
readonly holds: Dict<Dict<number>>;
|
|
909
926
|
readonly dataPerEvent: Dict<object>;
|
|
910
|
-
readonly entrance: string | null;
|
|
911
927
|
readonly bookAsAWhole: boolean;
|
|
912
928
|
}
|
|
913
929
|
export type BookableObject = Seat | GeneralAdmissionArea | Booth | Table;
|
|
@@ -915,7 +931,7 @@ export type SelectableObject = BookableObject | InteractiveSection;
|
|
|
915
931
|
export interface SeatingChart {
|
|
916
932
|
changeConfig: (config: ConfigChange) => Promise<void>;
|
|
917
933
|
clearSelection: () => Promise<void>;
|
|
918
|
-
deselectCategories: (
|
|
934
|
+
deselectCategories: (categories: CategoryKey[]) => Promise<void>;
|
|
919
935
|
deselectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>;
|
|
920
936
|
destroy: () => void;
|
|
921
937
|
findObject: (label: string) => Promise<SelectableObject>;
|
|
@@ -926,7 +942,7 @@ export interface SeatingChart {
|
|
|
926
942
|
render: () => SeatingChart;
|
|
927
943
|
rerender: () => void;
|
|
928
944
|
resetView: () => Promise<void>;
|
|
929
|
-
selectCategories: (
|
|
945
|
+
selectCategories: (categories: CategoryKey[]) => Promise<void>;
|
|
930
946
|
selectedObjects: string[];
|
|
931
947
|
selectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>;
|
|
932
948
|
pulse: (objects: string[]) => Promise<void>;
|