@seatsio/seatsio-types 4.0.0 → 4.1.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 +22 -10
  2. 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 IDs or labels.
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 IDs or labels.
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 IDs or labels.
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;
@@ -559,7 +559,7 @@ export type Floor = {
559
559
  export type Category = {
560
560
  accessible: boolean;
561
561
  color: string;
562
- key: number;
562
+ key: CategoryKey;
563
563
  label: string;
564
564
  pricing: {
565
565
  price: number;
@@ -594,7 +594,7 @@ export type CategoryLimiter = {
594
594
  quantity: number;
595
595
  };
596
596
  export type CategoryAndTicketLimiter = {
597
- category: string;
597
+ category: CategoryKey;
598
598
  ticketTypes: TicketTypeLimiter[];
599
599
  };
600
600
  export interface ChartRendererObjectTooltip {
@@ -724,8 +724,18 @@ export type SimplePricing = {
724
724
  price: number;
725
725
  channels?: ChannelPricing[];
726
726
  };
727
+ export type SimplePricingForObjects = {
728
+ objects: string[];
729
+ originalPrice?: number;
730
+ price: number;
731
+ channels?: ChannelPricing[];
732
+ };
727
733
  export type MultiLevelPricing = {
728
- category: number | string;
734
+ category: CategoryKey;
735
+ ticketTypes: TicketType[];
736
+ };
737
+ export type MultiLevelPricingForObjects = {
738
+ objects: string[];
729
739
  ticketTypes: TicketType[];
730
740
  };
731
741
  export type ChannelPricing = (SimpleChannelPricing | MultiLevelChannelPricing);
@@ -745,7 +755,9 @@ export type TicketType = {
745
755
  label?: string;
746
756
  description?: string;
747
757
  };
748
- export type Pricing = (SimplePricing | MultiLevelPricing)[];
758
+ export type PricingForCategory = (SimplePricing | MultiLevelPricing);
759
+ export type PricingForObjects = (SimplePricingForObjects | MultiLevelPricingForObjects);
760
+ export type Pricing = (PricingForCategory | PricingForObjects)[];
749
761
  export type SelectionValidator = SelectionValidatorNoOrphanSeats | SelectionValidatorConsecutiveSeats | SelectionValidatorMinimumSelectedPlaces;
750
762
  interface SelectionValidatorNoOrphanSeats {
751
763
  type: 'noOrphanSeats';
@@ -865,6 +877,7 @@ export interface AbstractBookableObject extends AbstractSelectableObject {
865
877
  readonly forSale: boolean;
866
878
  readonly dataPerEvent: Dict<object>;
867
879
  readonly seasonStatusOverriddenQuantity: number;
880
+ readonly entrance: string | null;
868
881
  inSelectableChannel?: boolean;
869
882
  hashedChannelKey?: string;
870
883
  isInChannel?: (channelKey: string) => boolean;
@@ -907,7 +920,6 @@ export interface GeneralAdmissionArea extends AbstractBookableObject {
907
920
  readonly selectionPerTicketType: Dict<number>;
908
921
  readonly holds: Dict<Dict<number>>;
909
922
  readonly dataPerEvent: Dict<object>;
910
- readonly entrance: string | null;
911
923
  readonly bookAsAWhole: boolean;
912
924
  }
913
925
  export type BookableObject = Seat | GeneralAdmissionArea | Booth | Table;
@@ -915,7 +927,7 @@ export type SelectableObject = BookableObject | InteractiveSection;
915
927
  export interface SeatingChart {
916
928
  changeConfig: (config: ConfigChange) => Promise<void>;
917
929
  clearSelection: () => Promise<void>;
918
- deselectCategories: (categoryIds: string[]) => Promise<void>;
930
+ deselectCategories: (categories: CategoryKey[]) => Promise<void>;
919
931
  deselectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>;
920
932
  destroy: () => void;
921
933
  findObject: (label: string) => Promise<SelectableObject>;
@@ -926,7 +938,7 @@ export interface SeatingChart {
926
938
  render: () => SeatingChart;
927
939
  rerender: () => void;
928
940
  resetView: () => Promise<void>;
929
- selectCategories: (categoryIds: string[]) => Promise<void>;
941
+ selectCategories: (categories: CategoryKey[]) => Promise<void>;
930
942
  selectedObjects: string[];
931
943
  selectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>;
932
944
  pulse: (objects: string[]) => Promise<void>;
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": "4.0.0",
4
+ "version": "4.1.0",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [