UNPKG

@appmetrica/react-native-analytics

Version:
73 lines 2.94 kB
import type { ECommerceEvent } from './ecommerce'; import type { AdRevenue, Revenue } from './revenue'; import type { UserProfile } from './userProfile'; import type { ExternalAttribution } from './externalAttribution'; export type AppMetricaConfig = { apiKey: string; appVersion?: string; crashReporting?: boolean; firstActivationAsUpdate?: boolean; location?: Location; locationTracking?: boolean; logs?: boolean; sessionTimeout?: number; statisticsSending?: boolean; preloadInfo?: PreloadInfo; maxReportsInDatabaseCount?: number; nativeCrashReporting?: boolean; activationAsSessionStart?: boolean; sessionsAutoTracking?: boolean; appOpenTrackingEnabled?: boolean; userProfileID?: string; errorEnvironment?: Record<string, string | undefined>; }; export type PreloadInfo = { trackingId: string; additionalInfo?: Record<string, string>; }; export type Location = { latitude: number; longitude: number; altitude?: number; accuracy?: number; course?: number; speed?: number; timestamp?: number; }; export type StartupParamsReason = 'UNKNOWN' | 'NETWORK' | 'INVALID_RESPONSE'; export type StartupParams = { deviceIdHash?: string; deviceId?: string; uuid?: string; }; export type StartupParamsCallback = (params?: StartupParams, reason?: StartupParamsReason) => void; export declare const DEVICE_ID_HASH_KEY = "appmetrica_device_id_hash"; export declare const DEVICE_ID_KEY = "appmetrica_device_id"; export declare const UUID_KEY = "appmetrica_uuid"; export * from './ecommerce'; export * from './revenue'; export * from './userProfile'; export * from './externalAttribution'; export default class AppMetrica { static activate(config: AppMetricaConfig): void; static getLibraryApiLevel(): Promise<number>; static getLibraryVersion(): Promise<string>; static pauseSession(): void; static reportAppOpen(deeplink?: string): void; static reportError(identifier: string, message: string, _reason?: Object): void; static reportEvent(eventName: string, attributes?: Record<string, any>): void; static requestStartupParams(listener: StartupParamsCallback, identifiers: Array<string>): void; static resumeSession(): void; static sendEventsBuffer(): void; static setLocation(location?: Location): void; static setLocationTracking(enabled: boolean): void; static setDataSendingEnabled(enabled: boolean): void; static setUserProfileID(userProfileID?: string): void; static reportECommerce(event: ECommerceEvent): void; static reportRevenue(revenue: Revenue): void; static reportAdRevenue(adRevenue: AdRevenue): void; static reportUserProfile(userProfile: UserProfile): void; static putErrorEnvironmentValue(key: string, value?: string): void; static reportExternalAttribution(attribution: ExternalAttribution): void; } //# sourceMappingURL=index.d.ts.map