feat(mixpanel): Update/add functions (#2697)

* Update mixpanel typings for Ionic native.

* Update index.ts
This commit is contained in:
Todd Vrba 2018-09-15 03:37:52 -05:00 committed by Daniel Sogl
parent 267149b16f
commit ac467c50ac

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
declare var mixpanel: any;
@ -33,36 +33,44 @@ declare var mixpanel: any;
})
@Injectable()
export class Mixpanel extends IonicNativePlugin {
/**
*
* If originalId is omitted, aliasId will be used as originalId.
* @param aliasId {string}
* @param originalId {string}
* @returns {Promise<any>}
*/
@Cordova()
alias(aliasId: string, originalId: string): Promise<any> { return; }
alias(aliasId: string, originalId?: string): Promise<any> {
return;
}
/**
*
* @returns {Promise<any>}
*/
@Cordova()
distinctId(): Promise<any> { return; }
distinctId(): Promise<any> {
return;
}
/**
* @returns {Promise<any>}
*/
@Cordova()
flush(): Promise<any> { return; }
flush(): Promise<any> {
return;
}
/**
*
* The usePeople parameter is used for the iOS Mixpanel SDK.
* @param distinctId {string}
* @param usePeople {boolean}
* @returns {Promise<any>}
*/
@Cordova()
identify(distinctId: string): Promise<any> { return; }
identify(distinctId: string, usePeople?: boolean): Promise<any> {
return;
}
/**
*
@ -70,14 +78,18 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
init(token: string): Promise<any> { return; }
init(token: string): Promise<any> {
return;
}
/**
*
* @returns {Promise<any>}
*/
@Cordova()
getSuperProperties(): Promise<any> { return; }
getSuperProperties(): Promise<any> {
return;
}
/**
*
@ -85,7 +97,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
registerSuperProperties(superProperties: any): Promise<any> { return; }
registerSuperProperties(superProperties: any): Promise<any> {
return;
}
/**
*
@ -93,7 +107,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
registerSuperPropertiesOnce(superProperties: any): Promise<any> { return; }
registerSuperPropertiesOnce(superProperties: any): Promise<any> {
return;
}
/**
*
@ -101,14 +117,18 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
unregisterSuperProperty(superPropertyName: string): Promise<any> { return; }
unregisterSuperProperty(superPropertyName: string): Promise<any> {
return;
}
/**
*
* @returns {Promise<any>}
*/
@Cordova()
reset(): Promise<any> { return; }
reset(): Promise<any> {
return;
}
/**
*
@ -116,7 +136,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
timeEvent(eventName: string): Promise<any> { return; }
timeEvent(eventName: string): Promise<any> {
return;
}
/**
*
@ -128,8 +150,9 @@ export class Mixpanel extends IonicNativePlugin {
successIndex: 2,
errorIndex: 3
})
track(eventName: string, eventProperties?: any): Promise<any> { return; }
track(eventName: string, eventProperties?: any): Promise<any> {
return;
}
}
/**
* @hidden
@ -141,6 +164,24 @@ export class Mixpanel extends IonicNativePlugin {
})
@Injectable()
export class MixpanelPeople extends IonicNativePlugin {
/**
*
* @param appendObject {any}
* @return {Promise<any>}
*/
@Cordova()
append(appendObject: any): Promise<any> {
return;
}
/**
*
* @return {Promise<any>}
*/
@Cordova()
deleteUser(): Promise<any> {
return;
}
/**
*
@ -148,7 +189,9 @@ export class MixpanelPeople extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
identify(distinctId: string): Promise<any> { return; }
identify(distinctId: string): Promise<any> {
return;
}
/**
*
@ -156,7 +199,9 @@ export class MixpanelPeople extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
increment(peopleProperties: any): Promise<any> { return; }
increment(peopleProperties: any): Promise<any> {
return;
}
/**
*
@ -164,22 +209,58 @@ export class MixpanelPeople extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
setPushId(pushId: string): Promise<any> { return; }
/**
*
* @param peopleProperties
* @return {Promise<any>}
*/
@Cordova()
set(peopleProperties: any): Promise<any> { return; }
/**
*
* @param peopleProperties
* @return {Promise<any>}
*/
@Cordova()
setOnce(peopleProperties: any): Promise<any> { return; }
setPushId(pushId: string): Promise<any> {
return;
}
/**
*
* @param peopleProperties
* @return {Promise<any>}
*/
@Cordova()
set(peopleProperties: any): Promise<any> {
return;
}
/**
*
* @param peopleProperties {any}
* @return {Promise<any>}
*/
@Cordova()
setOnce(peopleProperties: any): Promise<any> {
return;
}
/**
*
* @param amount {number}
* @param chargeProperties
* @return {Promise<any>}
*/
@Cordova()
trackCharge(amount: number, chargeProperties: any): Promise<any> {
return;
}
/**
*
* @param propertiesArray
* @return {Promise<any>}
*/
@Cordova()
unset(propertiesArray: Array<string>): Promise<any> {
return;
}
/**
*
* @param unionObject {any}
* @return {Promise<any>}
*/
@Cordova()
union(unionObject: any): Promise<any> {
return;
}
}