UNPKG

@appmetrica/react-native-analytics

Version:
91 lines 4 kB
import type { ECommerceEvent } from './ecommerce'; import type { AdRevenue, Revenue } from './revenue'; import type { UserProfile } from './userProfile'; import type { ExternalAttribution } from './externalAttribution'; import { type IReporter, type ReporterConfig } from './reporter'; import type { DeferredDeeplinkListener, DeferredDeeplinkParametersListener } from './deferredDeeplink'; 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>; appEnvironment?: Record<string, string | undefined>; maxReportsCount?: number; dispatchPeriodSeconds?: number; }; 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 type { IReporter, ReporterConfig } from './reporter'; export * from './deferredDeeplink'; export default class AppMetrica { private static reporters; 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?: Error | Object): void; static reportUnhandledException(error: Error): void; static reportErrorWithoutIdentifier(message: string | undefined, error: Error): 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; static putAppEnvironmentValue(key: string, value?: string): void; static clearAppEnvironment(): void; static getReporter(apiKey: string): IReporter; static activateReporter(config: ReporterConfig): void; static getDeviceId(): Promise<string | null>; static getUuid(): Promise<string | null>; static requestDeferredDeeplink(listener: DeferredDeeplinkListener): void; static requestDeferredDeeplinkParameters(listener: DeferredDeeplinkParametersListener): void; } //# sourceMappingURL=index.d.ts.map