UNPKG

2.6 kBTypeScriptView Raw
1/**
2 * @name Mixpanel
3 * @description
4 * Cordova Plugin that wraps Mixpanel SDK for Android and iOS
5 *
6 * @usage
7 * ```
8 * import {Mixpanel} from 'ionic-native';
9 *
10 * Mixpanel.init(token)
11 * .then(onSuccess)
12 * .catch(onError);
13 *
14 * ```
15 * @classes
16 * MixpanelPeople
17 */
18export declare class Mixpanel {
19 /**
20 *
21 * @param aliasId {string}
22 * @param originalId {string}
23 * @returns {Promise<any>}
24 */
25 static alias(aliasId: string, originalId: string): Promise<any>;
26 /**
27 *
28 * @returns {Promise<any>}
29 */
30 static distinctId(): Promise<any>;
31 /**
32 * @returns {Promise<any>}
33 */
34 static flush(): Promise<any>;
35 /**
36 *
37 * @param distinctId {string}
38 * @returns {Promise<any>}
39 */
40 static identify(distinctId: string): Promise<any>;
41 /**
42 *
43 * @param token {string}
44 * @returns {Promise<any>}
45 */
46 static init(token: string): Promise<any>;
47 /**
48 *
49 * @param superProperties {any}
50 * @returns {Promise<any>}
51 */
52 static registerSuperProperties(superProperties: any): Promise<any>;
53 /**
54 *
55 * @returns {Promise<any>}
56 */
57 static reset(): Promise<any>;
58 /**
59 *
60 * @param eventName {string}
61 * @param eventProperties {any} optional
62 * @returns {Promise<any>}
63 */
64 static track(eventName: string, eventProperties?: any): Promise<any>;
65 /**
66 *
67 * @returns {Promise<any>}
68 */
69 static showSurvey(): Promise<any>;
70 /**
71 *
72 * @returns {MixpanelPeople}
73 */
74 static readonly people: typeof MixpanelPeople;
75}
76/**
77 * @private
78 */
79export declare class MixpanelPeople {
80 /**
81 * @private
82 */
83 static plugin: string;
84 /**
85 * @private
86 */
87 static pluginRef: string;
88 /**
89 *
90 * @param distinctId {string}
91 * @return {Promise<any>}
92 */
93 static identify(distinctId: string): Promise<any>;
94 /**
95 *
96 * @param peopleProperties {string}
97 * @return {Promise<any>}
98 */
99 static increment(peopleProperties: any): Promise<any>;
100 /**
101 *
102 * @param pushId
103 * @return {Promise<any>}
104 */
105 static setPushId(pushId: string): Promise<any>;
106 /**
107 *
108 * @param peopleProperties
109 * @return {Promise<any>}
110 */
111 static set(peopleProperties: any): Promise<any>;
112 /**
113 *
114 * @param peopleProperties
115 * @return {Promise<any>}
116 */
117 static setOnce(peopleProperties: any): Promise<any>;
118}