UNPKG

@ua/react-native-airship

Version:
84 lines 3.15 kB
import { AirshipActions } from './AirshipActions'; import { AirshipAnalytics } from './AirshipAnalytics'; import { AirshipChannel } from './AirshipChannel'; import { AirshipContact } from './AirshipContact'; import { AirshipInApp } from './AirshipInApp'; import { AirshipLocale } from './AirshipLocale'; import { AirshipMessageCenter } from './AirshipMessageCenter'; import { AirshipPreferenceCenter } from './AirshipPreferenceCenter'; import { AirshipPrivacyManager } from './AirshipPrivacyManager'; import { AirshipPush } from './AirshipPush'; import { AirshipFeatureFlagManager } from './AirshipFeatureFlagManager'; import { AirshipConfig, EventTypeMap, EventType } from './types'; import { Subscription } from './UAEventEmitter'; import { AirshipLiveActivityManager } from './AirshipLiveActivityManager'; import { AirshipLiveUpdateManager } from './AirshipLiveUpdateManager'; /** * Airship */ export declare class AirshipRoot { private readonly module; readonly actions: AirshipActions; readonly analytics: AirshipAnalytics; readonly channel: AirshipChannel; readonly contact: AirshipContact; readonly inApp: AirshipInApp; readonly locale: AirshipLocale; readonly messageCenter: AirshipMessageCenter; readonly preferenceCenter: AirshipPreferenceCenter; readonly privacyManager: AirshipPrivacyManager; readonly push: AirshipPush; readonly featureFlagManager: AirshipFeatureFlagManager; /** * iOS only accessors */ readonly iOS: AirshipRootIOS; /** * iOS only accessors */ readonly android: AirshipRootAndroid; private readonly eventEmitter; constructor(module: any); /** * Calls takeOff. If Airship is already configured for * the app session, the new config will be applied on the next * app init. * @param config The config. * @returns A promise with the result. `true` if airship is ready. */ takeOff(config: AirshipConfig): Promise<boolean>; /** * Checks if Airship is ready. * @returns A promise with the result. */ isFlying(): Promise<boolean>; /** * Adds a listener. * @param eventType The listener type. * @param listener The listener. * @returns A subscription. */ addListener<T extends EventType>(eventType: T, listener: (event: EventTypeMap[T]) => any): Subscription; /** * Removes a listener. * * @param eventType The event type. * @param listener The event listener. Should be a reference to the function passed into addListener. */ removeListener<T extends EventType>(eventType: EventType, listener: (event: EventTypeMap[T]) => any): void; /** * Removes all listeners for a given type. * * @param eventType The event type. */ removeAllListeners(eventType: EventType): void; } export declare class AirshipRootIOS { readonly liveActivityManager: AirshipLiveActivityManager; constructor(module: any); } export declare class AirshipRootAndroid { readonly liveUpdateManager: AirshipLiveUpdateManager; constructor(module: any); } //# sourceMappingURL=AirshipRoot.d.ts.map