UNPKG

bam-ticketing-sdk

Version:

SDK for B.A.M Ticketing API

92 lines (80 loc) 1.7 kB
import { Category, EventStatus } from 'src/event' import { EventAttribute } from '../common/attributes' import { Venue } from 'src/venue' export enum ExternalSortOptions { Popularity = 'popularity', Price = 'price', Title = 'title', Distance = 'distance', Score = 'score,' } export interface CommonEventQuery { query?: string include_occurrences?: boolean with?: EventAttribute organizer_id?: string } export interface ListEventsQuery extends CommonEventQuery { start_at?: [Date, Date], sort_by?: string, direction?: string, future_events?: boolean name?: string } export interface ExternalEventsQuery { sort?: ExternalSortOptions, query?: string, lat?: number, lng?: number, max_distance?: number, page?: number, page_size?: number, near_ip?: string, near_me?: boolean } export interface ExternalOrganizer { city?: string, country?: string, displayName: string, name: string, street1?: string, zip?: string } export interface ExternalEvent { currency?: string, description?: string, externalCheckoutUrl?: string, externalUrl?: string, id: string, mainImageUri?: string, name?: string, organizer?: ExternalOrganizer, price?: number status?: EventStatus, type?: string, venue?: Venue } export interface ExternalPaging { page?: number, pageSize?: number, total?: number } export interface ExternalEventsInfo { name: string, paging?: ExternalPaging, events?: ExternalEvent[] } export interface ProviderSpecificId { id: string provider: string } export interface ExtendedCategory extends Category { tenantName?: string } export type Links = { [key: string]: string } export interface Categories { data: ExtendedCategory[] links: Links }