@seatsio/seatsio-types 3.4.0 → 3.6.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/dist/index.d.ts +40 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,23 @@ export interface WithEvents {
|
|
|
34
34
|
export interface WithEvent {
|
|
35
35
|
event: string;
|
|
36
36
|
}
|
|
37
|
+
export interface PlacesPromptParameters {
|
|
38
|
+
selectedPlaces: number;
|
|
39
|
+
minPlaces: number;
|
|
40
|
+
maxPlaces: number;
|
|
41
|
+
objectToSelect: SelectableObject;
|
|
42
|
+
}
|
|
43
|
+
export interface TicketTypePromptParameters {
|
|
44
|
+
ticketTypes: TicketType[];
|
|
45
|
+
objectToSelect: SelectableObject;
|
|
46
|
+
}
|
|
47
|
+
export interface PlacesWithTicketTypesPromptParameters {
|
|
48
|
+
ticketTypes: TicketType[];
|
|
49
|
+
selectedPlacesByTicketType: Dict<number>;
|
|
50
|
+
minPlaces: number;
|
|
51
|
+
maxPlaces: number;
|
|
52
|
+
objectsToSelect: SelectableObject[];
|
|
53
|
+
}
|
|
37
54
|
type Session = 'continue' | 'manual' | 'none' | 'start';
|
|
38
55
|
export interface ChartRendererConfigOptions extends DeprecatedConfigProperties, CommonConfigOptions, ChartRendererCallbacks {
|
|
39
56
|
/**
|
|
@@ -279,6 +296,18 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
|
|
|
279
296
|
* You cannot supply an empty array: the channels array needs to be either undefined, or an array of at least one element.
|
|
280
297
|
*/
|
|
281
298
|
channels?: string[];
|
|
299
|
+
/**
|
|
300
|
+
* Called when the chart needs to prompt how many places to select. {@link https://docs.seats.io/docs/renderer/prompts-api/onPlacesPrompt See documentation}
|
|
301
|
+
*/
|
|
302
|
+
onPlacesPrompt?: (parameters: PlacesPromptParameters, confirmSelection: (places: number) => void) => void;
|
|
303
|
+
/**
|
|
304
|
+
* Called when the chart needs to prompt which ticket type to select. {@link https://docs.seats.io/docs/renderer/prompts-api/onTicketTypePrompt See documentation}
|
|
305
|
+
*/
|
|
306
|
+
onTicketTypePrompt?: (parameters: TicketTypePromptParameters, confirmSelection: (ticketType: string) => void) => void;
|
|
307
|
+
/**
|
|
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
|
+
*/
|
|
310
|
+
onPlacesWithTicketTypesPrompt?: (parameters: PlacesWithTicketTypesPromptParameters, confirmSelection: (placesPerTicketType: Dict<number> | string[]) => void) => void;
|
|
282
311
|
}
|
|
283
312
|
export type ExtractedEventManagerProps = Pick<ChartRendererConfigOptions, 'colors' | 'colorScheme' | 'extraConfig' | 'fitTo' | 'objectColor' | 'showFullScreenButton' | 'style' | 'stylePreset' | 'tooltipInfo' | 'themePreset' | 'themeColors'>;
|
|
284
313
|
export interface BaseEventManagerConfigOptions extends CommonConfigOptions, ExtractedEventManagerProps, EventManagerCallbacks {
|
|
@@ -693,11 +722,22 @@ export type SimplePricing = {
|
|
|
693
722
|
category: CategoryKey;
|
|
694
723
|
originalPrice?: number;
|
|
695
724
|
price: number;
|
|
725
|
+
channels?: ChannelPricing[];
|
|
696
726
|
};
|
|
697
727
|
export type MultiLevelPricing = {
|
|
698
728
|
category: number | string;
|
|
699
729
|
ticketTypes: TicketType[];
|
|
700
730
|
};
|
|
731
|
+
export type ChannelPricing = (SimpleChannelPricing | MultiLevelChannelPricing);
|
|
732
|
+
export type SimpleChannelPricing = {
|
|
733
|
+
channel: string;
|
|
734
|
+
originalPrice?: number;
|
|
735
|
+
price: number;
|
|
736
|
+
};
|
|
737
|
+
export type MultiLevelChannelPricing = {
|
|
738
|
+
channel: string;
|
|
739
|
+
ticketTypes: TicketType[];
|
|
740
|
+
};
|
|
701
741
|
export type TicketType = {
|
|
702
742
|
ticketType: string;
|
|
703
743
|
originalPrice?: number;
|