@seatsio/seatsio-types 6.16.0 → 6.17.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 +31 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -84,6 +84,14 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
84
84
  * Seats supports two types of pricing: simple pricing and multi-level pricing. {@link https://docs.seats.io/docs/renderer/config-pricing See documentation}
85
85
  */
86
86
  pricing?: Pricing;
87
+ /**
88
+ * Groups objects into listings that can be configured with a type and selected together.
89
+ */
90
+ listings?: ConfigListing[];
91
+ /**
92
+ * Defines the available listing types, each with an optional icon and label.
93
+ */
94
+ listingTypes?: ListingTypes;
87
95
  /**
88
96
  * Formats the price into a custom defined string when showing it to and en user. {@link https://docs.seats.io/docs/renderer/config-priceformatter See documentation}
89
97
  */
@@ -887,6 +895,16 @@ export type MultiLevelPricingForObjects = {
887
895
  objects: string[];
888
896
  ticketTypes: TicketType[];
889
897
  };
898
+ export type SimplePricingForListing = {
899
+ listing: string;
900
+ originalPrice?: number;
901
+ price: number;
902
+ fee?: number;
903
+ };
904
+ export type MultiLevelPricingForListing = {
905
+ listing: string;
906
+ ticketTypes: TicketType[];
907
+ };
890
908
  export type ChannelPricing = (SimpleChannelPricing | MultiLevelChannelPricing);
891
909
  export type SimpleChannelPricing = {
892
910
  channel: string;
@@ -911,6 +929,7 @@ export type TicketType = {
911
929
  };
912
930
  export type PricingForCategory = (SimplePricing | MultiLevelPricing);
913
931
  export type PricingForObjects = (SimplePricingForObjects | MultiLevelPricingForObjects);
932
+ export type PricingForListing = (SimplePricingForListing | MultiLevelPricingForListing);
914
933
  type LegacySimplePricing = Omit<SimplePricing, 'fee'>;
915
934
  type LegacyMultiLevelPricing = Omit<MultiLevelPricing, 'ticketTypes'> & {
916
935
  ticketTypes: Omit<TicketType, 'fee'>[];
@@ -925,7 +944,7 @@ export type LegacyPricing = (LegacyPricingForCategory | LegacyPricingForObjects)
925
944
  export type Pricing = {
926
945
  allFeesIncluded?: boolean;
927
946
  priceFormatter?: (price: number) => string;
928
- prices: (PricingForCategory | PricingForObjects)[];
947
+ prices: (PricingForCategory | PricingForObjects | PricingForListing)[];
929
948
  showSectionPricingOverlay?: boolean;
930
949
  } | LegacyPricing;
931
950
  export type SelectionValidator = SelectionValidatorNoOrphanSeats | SelectionValidatorConsecutiveSeats | SelectionValidatorMinimumSelectedPlaces | SelectionValidatorCompanionSeats;
@@ -1190,6 +1209,17 @@ export type ListingBySection = {
1190
1209
  minPrice: number;
1191
1210
  quantity: number;
1192
1211
  };
1212
+ export interface ConfigListing {
1213
+ id: string;
1214
+ objects?: string[];
1215
+ listingType?: string;
1216
+ selectAsGroup?: boolean;
1217
+ }
1218
+ export interface ListingType {
1219
+ icon?: string;
1220
+ label?: string;
1221
+ }
1222
+ export type ListingTypes = Dict<ListingType>;
1193
1223
  export declare function isBooth(object: SelectableObject): object is Booth;
1194
1224
  export declare function isSeat(object: SelectableObject): object is Seat;
1195
1225
  export declare function isGeneralAdmission(object: SelectableObject): object is GeneralAdmissionArea;
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": "6.16.0",
4
+ "version": "6.17.0",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",