@withjoy/sdk-js
Version:
Joy Javascript SDK
96 lines (94 loc) • 4.04 kB
TypeScript
import { ListenerShell, IListenerShell } from "./ListenerShell";
import { EventsManager } from "./eventsManager";
/**
* Represents a single event.
* @constructor
*/
export declare class Event {
private eventsManager;
private eventId;
private activeAuthKey;
private currentSource;
private dataSources;
private telemetry;
private firebase;
private publicInfo;
private eventInfo;
private debug;
constructor(eventsManager: EventsManager, eventId: string);
getEventsManager(): EventsManager;
getTelemetry(): any;
getEventId(): string;
getPromiseLib(): any;
allocateDataSource(id: any): any;
deallocateDataSource(ds: any): void;
private detachDataSource;
private loadPublicInfo_noRefresh;
private loadEventInfo_noRefresh;
private loadEventInfo;
private loadPublicInfo;
private reloadEventInfo;
private reloadPublicInfo;
getCachedPublicInfo(): any;
getCachedEventInfo(): any;
getFirebase(): any;
getExpectedDatabaseSource(): any;
private ensureListenerConnections;
createValue(path: Array<string>, value: string, callback: any): any;
writeValue(path: Array<string>, value: string, callback: any): any;
private updateValue_nonDatabase;
updateValue(path: any, value: any, callback: any): any;
stopListener(l: IListenerShell): void;
stopAllListeners(dataSource: any): void;
startValueListener(path: Array<string>, listener: any, dataSource: any): ListenerShell;
startOnceValueListener(path: Array<string>, listener: any, dataSource: any): void;
startSetListener(path: Array<string>, listener: any, dataSource: any): void;
/**
* Called by EventFirebaseConnection when connection changes. If null we should switch to publicInfo
* else we should prefer the firebase instance provided.
* @public
*/
onEventConnectionConnect(firebase: any): void;
/**
* Called by events manager to inform us that the active auth for this event changed
* This can mean the user logged out, or a permit is available, etc.
*
* Basically we want to try and fetch the eventInfo again, since now that the activeAuth has changed
* we might get a different result
* Can take an optional parameter called forceReload in case the userAuth is not changing but their
* access to the event has updated
* @public
*/
onActiveAuthChanged(forceReload?: boolean): void;
private updateAndDiffActiveAuthKey;
getBestActiveAuth(): any;
/**
* Connect to the data base and load the full event - not just based on the json
* from public info. Connect should be called only on one event. Trying to call connect on other event
* objects will result in a call to disconnect on all others.
*/
connect(): any;
/**
* Disconnect any long running connections for this event. Fall back to using public info json if it exists
* @returns {*}
*/
disconnect(): any;
joinWithEventSecret(eventSecret: any): any;
joinWithEventPassword(eventPassword: any): any;
getEventJoinSecret(): Promise<any>;
/**
* Get and saves the event secret locally and then logs out the current user
* This is generally triggered when a user is disabled from rsvp-ing for someone else
* because they are loggedin. In that case they will call this method to get and save the eventSecret
* locally and the logout. This way the next person can see the event and login
*/
saveEventSecretAndLogout(): Promise<any>;
requestEventSecret(guestInfo: any): Promise<any>;
requestAccessEmail(guest: any): Promise<any>;
setCurrentPersonId(personId: any): any;
getCurrentPersonId(): any;
getEventAssetStores(): Promise<any>;
getQuestionBankUtils(): any;
getBestServiceApi(): import("./EventServiceApi").EventsServiceApi;
getServiceApiEventUserProfiles(fieldsArray: any): Promise<any>;
}