@seatsio/seatsio-types 3.5.0 → 4.0.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +19 -12
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -100,11 +100,11 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
100
100
  /**
101
101
  * Render the chart with the specified objects selected (if they are still free). {@link https://docs.seats.io/docs/renderer/config-selectedobjects See documentation}
102
102
  */
103
- selectedObjects?: (string | SelectedObject | SelectedGA)[];
103
+ selectedObjects?: (string | SelectedAmount)[];
104
104
  /**
105
105
  * Render the chart with the specified objects selectable. {@link https://docs.seats.io/docs/renderer/selectableobjects See documentation}
106
106
  */
107
- selectableObjects?: string[];
107
+ selectableObjects?: (string | SelectableAmount)[];
108
108
  /**
109
109
  * Selection validators run every time a seat is selected or deselected. They check whether there are no orphan seats, and/or whether all selected seats are consecutive (meaning: next to each other and in the same category). {@link https://docs.seats.io/docs/renderer/config-selectionvalidators See documentation}
110
110
  */
@@ -383,7 +383,7 @@ export interface EventManagerSelectModeConfigOptions extends BaseEventManagerCon
383
383
  maxSelectedObjects?: SelectionLimiter;
384
384
  numberOfPlacesToSelect?: number;
385
385
  isObjectSelectable?: (object: SelectableObject) => boolean;
386
- selectedObjects?: (string | SelectedObject | SelectedGA)[];
386
+ selectedObjects?: (string | SelectedAmount)[];
387
387
  selectionBy?: 'places' | 'objects';
388
388
  ticketTypes?: TicketTypeJsonWithoutPrice[];
389
389
  tooltipContents?: (object: object) => string;
@@ -722,11 +722,22 @@ export type SimplePricing = {
722
722
  category: CategoryKey;
723
723
  originalPrice?: number;
724
724
  price: number;
725
+ channels?: ChannelPricing[];
725
726
  };
726
727
  export type MultiLevelPricing = {
727
728
  category: number | string;
728
729
  ticketTypes: TicketType[];
729
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
+ };
730
741
  export type TicketType = {
731
742
  ticketType: string;
732
743
  originalPrice?: number;
@@ -749,11 +760,7 @@ interface SelectionValidatorMinimumSelectedPlaces {
749
760
  type: 'minimumSelectedPlaces';
750
761
  minimum: number;
751
762
  }
752
- export interface SelectedObject {
753
- label: string;
754
- ticketType: string;
755
- }
756
- export interface SelectedGA {
763
+ export interface SelectableAmount {
757
764
  label: string;
758
765
  amount: number;
759
766
  }
@@ -909,7 +916,7 @@ export interface SeatingChart {
909
916
  changeConfig: (config: ConfigChange) => Promise<void>;
910
917
  clearSelection: () => Promise<void>;
911
918
  deselectCategories: (categoryIds: string[]) => Promise<void>;
912
- deselectObjects: (objects: (string | Selection)[]) => Promise<void>;
919
+ deselectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>;
913
920
  destroy: () => void;
914
921
  findObject: (label: string) => Promise<SelectableObject>;
915
922
  getReportBySelectability: () => Promise<Object>;
@@ -921,7 +928,7 @@ export interface SeatingChart {
921
928
  resetView: () => Promise<void>;
922
929
  selectCategories: (categoryIds: string[]) => Promise<void>;
923
930
  selectedObjects: string[];
924
- selectObjects: (objects: (string | Selection)[]) => Promise<void>;
931
+ selectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>;
925
932
  pulse: (objects: string[]) => Promise<void>;
926
933
  unpulse: (objects: string[]) => Promise<void>;
927
934
  startNewSession: () => Promise<void>;
@@ -942,8 +949,8 @@ export interface Channel {
942
949
  color: string;
943
950
  index: number;
944
951
  }
945
- export type Selection = {
946
- id: string;
952
+ export type SelectedAmount = {
953
+ label: string;
947
954
  ticketType?: string;
948
955
  amount?: number;
949
956
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seatsio/seatsio-types",
3
3
  "description": "Type definitions for Seats.io",
4
- "version": "3.5.0",
4
+ "version": "4.0.0",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [