Skip to content

Commit

Permalink
feat(mixpanel): Update/add functions (#2697)
Browse files Browse the repository at this point in the history
* Update mixpanel typings for Ionic native.

* Update index.ts
  • Loading branch information
SpellChucker authored and danielsogl committed Sep 15, 2018
1 parent 267149b commit ac467c5
Showing 1 changed file with 104 additions and 23 deletions.
127 changes: 104 additions & 23 deletions src/@ionic-native/plugins/mixpanel/index.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -33,90 +33,112 @@ 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;
}

/**
*
* @param token {string}
* @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;
}

/**
*
* @param superProperties {any}
* @returns {Promise<any>}
*/
@Cordova()
registerSuperProperties(superProperties: any): Promise<any> { return; }
registerSuperProperties(superProperties: any): Promise<any> {
return;
}

/**
*
* @param superProperties {any}
* @returns {Promise<any>}
*/
@Cordova()
registerSuperPropertiesOnce(superProperties: any): Promise<any> { return; }
registerSuperPropertiesOnce(superProperties: any): Promise<any> {
return;
}

/**
*
* @param superPropertyName {string}
* @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;
}

/**
*
* @param eventName {string}
* @returns {Promise<any>}
*/
@Cordova()
timeEvent(eventName: string): Promise<any> { return; }
timeEvent(eventName: string): Promise<any> {
return;
}

/**
*
Expand All @@ -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
Expand All @@ -141,45 +164,103 @@ 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;
}

/**
*
* @param distinctId {string}
* @return {Promise<any>}
*/
@Cordova()
identify(distinctId: string): Promise<any> { return; }
identify(distinctId: string): Promise<any> {
return;
}

/**
*
* @param peopleProperties {string}
* @return {Promise<any>}
*/
@Cordova()
increment(peopleProperties: any): Promise<any> { return; }
increment(peopleProperties: any): Promise<any> {
return;
}

/**
*
* @param pushId
* @return {Promise<any>}
*/
@Cordova()
setPushId(pushId: string): Promise<any> { return; }
setPushId(pushId: string): Promise<any> {
return;
}

/**
*
* @param peopleProperties
* @return {Promise<any>}
*/
@Cordova()
set(peopleProperties: any): Promise<any> { return; }
set(peopleProperties: any): Promise<any> {
return;
}

/**
*
* @param peopleProperties
* @param peopleProperties {any}
* @return {Promise<any>}
*/
@Cordova()
setOnce(peopleProperties: any): Promise<any> { return; }
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;
}
}

0 comments on commit ac467c5

Please sign in to comment.