-
Notifications
You must be signed in to change notification settings - Fork 23
/
index.d.ts
37 lines (27 loc) · 1.14 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
declare module 'react-native-appmetrica-yandex' {
import React from 'react';
type ActivationConfig = {
apiKey: string,
sessionTimeout?: number,
firstActivationAsUpdate?: boolean,
};
type UserProfileConfig = {
name?: string,
gender?: 'female' | 'male' | string | void,
age?: number,
birthDate?: Date | [number] | [number, number] | [number, number, number] | void,
notificationsEnabled?: boolean,
} & {
[key: string]: string | number | boolean,
}
export class YandexMetrica extends React.Component {
public static activateWithApiKey(apiKey: string): void;
public static activateWithConfig(params: ActivationConfig): void;
public static reportEvent(message: string): void;
public static reportEvent(message: string, params: object): void;
public static reportError(name: string, exception?: string | object): void;
public static setUserProfileAttributes(params: UserProfileConfig): void;
public static setUserProfileID(userProfileId: string): void;
public static sendEventsBuffer(): void;
}
}