UNPKG

@hubs101/js-api-skd-client

Version:
167 lines (166 loc) 4.38 kB
import { Attendee } from "../attendee/types"; import { Exhibition } from "../event/types"; import { SessionFull } from "../sessions/types"; export type Pagination = { total: number; count: number; per_page: number; current_page: number; total_pages: number; links: { previous?: string; next?: string; }; }; export type ResponsePaginationType<T> = { data: T[]; meta: { pagination: Pagination; }; }; export type PublicEventsProviderState = { isInitialized: boolean; isLoading: boolean; isError: boolean; errorMessage: string; allEvents: ResponsePaginationType<PublicEventItem>; eventMenu: any[]; selectedPublicEvent: PublicEventItem; exhibitions: ResponsePaginationType<Exhibition>; speakers: ResponsePaginationType<Attendee>; agenda: any; }; export type PublicEventItem = { about: string; account: string; address: { city: string; state: string; street: string; country: string; postalCode: string; }; advertisement: { menuUrl: string; wallUrl: string; lobbyUrl: string; centerUrl: string; menuEnabled: boolean; centerEnabled: boolean; centerImageBig: string; centerImageMedium: string; centerImageSmall: string; centerUrlEnabled: boolean; centerUrlType: string; lobbyEnabled: boolean; lobbyImageBig: string; lobbyImageMedium: string; lobbyImageSmall: string; lobbyUrlEnabled: boolean; lobbyUrlType: string; menuImageBig: string; menuImageMedium: string; menuImageSmall: string; menuUrlEnabled: boolean; menuUrlType: string; wallEnabled: boolean; wallImageBig: string; wallImageMedium: string; wallImageSmall: string; wallUrlEnabled: boolean; wallUrlType: string; }; contact: { xing: string; email: string; phone: string; mobile: string; twitter: string; facebook: string; instagram: string; linkedin: string; website1: string; website2: string; }; description: string; design: { themeColor: string; headerColor: string; expoLobbyImage: string; backgroundColor: string; headerFontColor: string; agendaLobbyImage: string; backgroundDesktopImage: string; backgroundMobileImage: string; backgroundTabletImage: string; speakerLobbyImage: string; startScreenMobileImage: string; }; end_date: string; id: string; images: { logo: string; picture: string; thumbnail: string; logoTransparent: string; }; language: string; menu: any[]; name: string; open_date: string; slug: string; start_date: string; tags: string[]; timezone: string; translation: string; type: string; updated_at: string; location: any; video: { reference: string; type: string; }; }; export type PublicEventsContextType = { init: () => Promise<void>; fetchAllEvents: (nbPage?: number, params?: string) => Promise<any>; fetchExhibitions: (eventId: string, nbPage?: number, params?: string) => Promise<any>; fetchAgenda: (eventId: string, nbPage?: number, params?: string) => Promise<any>; fetchColocatedAgenda: (eventId: string) => Promise<SessionFull>; selectPublicEvent: (selectedPublicEvent: PublicEventItem) => void; } & PublicEventsProviderState; export type ResponseServerType<T> = { status?: string | number; data: T; }; export type GenericResponseServerType<T> = { status: string | number; result: { data: T; }; }; export type PublicAdResponse = { id: string; event: string; registration_time: string; job: { title: string; responsibility: string; level: string; }; company: { name: string; size: string; industry: string; typeOfBusiness: string; logo: string; thumbnail: string; about: string; linkedin: string; twitter: string; xing: string; facebook: string; website1: string; instagram: string; }; };