forked from capacitor-community/firebase-analytics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefinitions.ts
More file actions
32 lines (30 loc) · 738 Bytes
/
definitions.ts
File metadata and controls
32 lines (30 loc) · 738 Bytes
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
declare module '@capacitor/core' {
interface PluginRegistry {
AnalyticsPlugin: AnalyticsProtocol;
}
}
export interface ScreenParams {
name: string;
class?: string;
}
export interface UserIDParams {
value: string;
}
export interface UserPropParams {
key: string;
value: string;
}
export interface LogEventParams {
name: string;
params?: object;
}
export interface AnalyticsProtocol {
enable(): Promise<void>;
disable(): Promise<void>;
reset(): Promise<void>;
instance(): Promise<{ id: string }>;
setScreen(options: ScreenParams): Promise<void>;
setUserID(options: UserIDParams): Promise<void>;
setUserProp(options: UserPropParams): Promise<void>;
logEvent(options: LogEventParams): Promise<void>;
}