forked from ARDcode/react-native-appmetrica-yandex
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
34 lines (25 loc) · 1.04 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
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);
public static activateWithConfig(params: ActivationConfig);
public static reportEvent(message: string);
public static reportEvent(message: string, params: Object);
public static reportError(name: string, exception?: string | Object);
public static setUserProfileAttributes(params: userProfileConfig);
public static setUserProfileID(userProfileId: string);
}
}