import { Cordova, Plugin } from './plugin'; declare var mixpanel: any; /** * @name Mixpanel * @description * Cordova Plugin that wraps Mixpanel SDK for Android and iOS * * @usage * ``` * import {Mixpanel} from 'ionic-native'; * * Mixpanel.init(token) * .then(onSuccess) * .catch(onError); * * ``` */ @Plugin({ pluginName: 'Mixpanel', plugin: 'cordova-plugin-mixpanel', pluginRef: 'mixpanel', repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin' }) export class Mixpanel { /** * * @param aliasId {string} * @param originalId {string} * @returns {Promise} */ @Cordova() static alias(aliasId: string, originalId: string): Promise { return; } /** * * @returns {Promise} */ @Cordova() static distinctId(): Promise { return; } /** * */ @Cordova() static flush(): Promise { return; } /** * * @param distinctId {string} * @returns {Promise} */ @Cordova() static identify(distinctId): Promise { return; } /** * * @param token {string} * @returns {Promise} */ @Cordova() static init(token: string): Promise { return; } /** * * @param superProperties * @returns {Promise} */ @Cordova() static registerSuperProperties(superProperties: any): Promise { return; } /** * * @returns {Promise} */ @Cordova() static reset(): Promise { return; } /** * * @param eventName * @param eventProperties */ @Cordova() static track(eventName: string, eventProperties?: any): Promise { return; } /** * * @returns {Promise} */ @Cordova() static showSurvey(): Promise { return; } /** * * @returns {MixpanelPeople} */ static get people(): typeof MixpanelPeople { return MixpanelPeople; }; } /** * @private */ export class MixpanelPeople { /** * @private */ static plugin: string = 'cordova-plugin-mixpanel'; /** * @private */ static pluginRef: string = 'mixpanel.people'; /** * * @param distinctId {string} * @return {Promise} */ @Cordova() static identify(distinctId: string): Promise { return; } /** * * @param peopleProperties {string} * @return {Promise} */ @Cordova() static increment(peopleProperties: any): Promise { return; } /** * * @param pushId * @return {Promise} */ @Cordova() static setPushId(pushId: string): Promise { return; } /** * * @param peopleProperties * @return {Promise} */ @Cordova() static set(peopleProperties: any): Promise { return; } /** * * @param peopleProperties * @return {Promise} */ @Cordova() static setOnce(peopleProperties: any): Promise { return; } }