fix(): fix tealium jsdoc

This commit is contained in:
Daniel 2018-05-04 10:28:43 +02:00
parent 3fbd475ed2
commit f34b6e6664
3 changed files with 75 additions and 59 deletions

View File

@ -7,7 +7,7 @@ import { Injectable } from '@angular/core';
* @description * @description
* This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything. * This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything.
* Makes the IDFA and Google Ad Identifier available in the Tealium data layer. * Makes the IDFA and Google Ad Identifier available in the Tealium data layer.
* *
* @usage * @usage
* ``` * ```
* import { TealiumAdIdentifier } from '@ionic-native/tealium-adidentifier'; * import { TealiumAdIdentifier } from '@ionic-native/tealium-adidentifier';
@ -30,12 +30,10 @@ import { Injectable } from '@angular/core';
pluginRef: 'window.tealiumAdIdentifier', // the variable reference to call the plugin, example: navigator.geolocation pluginRef: 'window.tealiumAdIdentifier', // the variable reference to call the plugin, example: navigator.geolocation
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS'] platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
install: '', // OPTIONAL install command, in case the plugin requires variables install: '' // OPTIONAL install command, in case the plugin requires variables
}) })
@Injectable() @Injectable()
export class TealiumAdIdentifier extends IonicNativePlugin { export class TealiumAdIdentifier extends IonicNativePlugin {
/** /**
* This function stores the ad identifier information as persistent data * This function stores the ad identifier information as persistent data
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time * @param instanceName {string} Your arbitrary Tealium instance name provided at init time
@ -55,5 +53,4 @@ export class TealiumAdIdentifier extends IonicNativePlugin {
setVolatile(instanceName: string): Promise<any> { setVolatile(instanceName: string): Promise<any> {
return; return;
} }
} }

View File

@ -1,5 +1,5 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/** /**
* @paid * @paid
@ -7,7 +7,7 @@ import { Injectable } from '@angular/core';
* @description * @description
* This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything. * This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything.
* Implements a Broadcast Receiver for the INSTALL_REFERRER intent. * Implements a Broadcast Receiver for the INSTALL_REFERRER intent.
* *
* @usage * @usage
* ``` * ```
* import { TealiumInstallReferrer } from '@ionic-native/tealium-installreferrer'; * import { TealiumInstallReferrer } from '@ionic-native/tealium-installreferrer';
@ -15,7 +15,7 @@ import { Injectable } from '@angular/core';
* *
* constructor(private installReferrer: TealiumInstallReferrer) { } * constructor(private installReferrer: TealiumInstallReferrer) { }
* *
* *
* this.installReferrer.setPersistent("main"); * this.installReferrer.setPersistent("main");
* this.installReferrer.setVolatile("main"); * this.installReferrer.setVolatile("main");
* *
@ -30,12 +30,10 @@ import { Injectable } from '@angular/core';
pluginRef: 'window.tealiumInstallReferrer', // the variable reference to call the plugin, example: navigator.geolocation pluginRef: 'window.tealiumInstallReferrer', // the variable reference to call the plugin, example: navigator.geolocation
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
platforms: ['Android'], // Array of platforms supported, example: ['Android', 'iOS'] platforms: ['Android'], // Array of platforms supported, example: ['Android', 'iOS']
install: '', // OPTIONAL install command, in case the plugin requires variables install: '' // OPTIONAL install command, in case the plugin requires variables
}) })
@Injectable() @Injectable()
export class TealiumInstallReferrer extends IonicNativePlugin { export class TealiumInstallReferrer extends IonicNativePlugin {
/** /**
* This function stores the install referrer information as persistent data * This function stores the install referrer information as persistent data
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time * @param instanceName {string} Your arbitrary Tealium instance name provided at init time
@ -55,5 +53,4 @@ export class TealiumInstallReferrer extends IonicNativePlugin {
setVolatile(instanceName: string): Promise<any> { setVolatile(instanceName: string): Promise<any> {
return; return;
} }
} }

View File

@ -1,39 +1,39 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface TealConfig { export interface TealConfig {
/** /**
* Your Tealium account name * Your Tealium account name
*/ */
account: string; account: string;
/** /**
* Your Tealium profile name * Your Tealium profile name
*/ */
profile: string; profile: string;
/** /**
* Your Tealium environment name (dev, qa, prod) * Your Tealium environment name (dev, qa, prod)
*/ */
environment: string; environment: string;
/** /**
* Arbitrary instance name string. Must be consistent for all calls to Tealium API. * Arbitrary instance name string. Must be consistent for all calls to Tealium API.
*/ */
instance: string; instance: string;
/** /**
* Enables ("true") or disables ("false") lifecycle reporting. Default true if omitted. * Enables ("true") or disables ("false") lifecycle reporting. Default true if omitted.
*/ */
isLifecycleEnabled?: string; isLifecycleEnabled?: string;
/** /**
* Not usually required. Sets a custom URL override for dispatches to UDH. * Not usually required. Sets a custom URL override for dispatches to UDH.
*/ */
collectDispatchURL?: string; collectDispatchURL?: string;
/** /**
* Your Tealium UDH profile. Only active if you do not have collectDispatchURL set. * Your Tealium UDH profile. Only active if you do not have collectDispatchURL set.
*/ */
collectDispatchProfile?: string; collectDispatchProfile?: string;
/** /**
* Enables ("true") or disables ("false") Crash Reporter module for Android. Default false if omitted. * Enables ("true") or disables ("false") Crash Reporter module for Android. Default false if omitted.
*/ */
isCrashReporterEnabled?: string; isCrashReporterEnabled?: string;
} }
/** /**
@ -76,14 +76,12 @@ export interface TealConfig {
pluginRef: 'window.tealium', // the variable reference to call the plugin, example: navigator.geolocation pluginRef: 'window.tealium', // the variable reference to call the plugin, example: navigator.geolocation
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS'] platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
install: '', // OPTIONAL install command, in case the plugin requires variables install: '' // OPTIONAL install command, in case the plugin requires variables
}) })
@Injectable() @Injectable()
export class Tealium extends IonicNativePlugin { export class Tealium extends IonicNativePlugin {
/** /**
* This function initializes the Tealium Cordova plugin. * This function initializes the Tealium Cordova plugin.
* This should usually be done inside the "deviceReady" handler. * This should usually be done inside the "deviceReady" handler.
* @param config {TealConfig} * @param config {TealConfig}
* @return {Promise<any>} Returns a promise that resolves when something happens * @return {Promise<any>} Returns a promise that resolves when something happens
@ -123,7 +121,11 @@ export class Tealium extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when something happens * @return {Promise<any>} Returns a promise that resolves when something happens
*/ */
@Cordova() @Cordova()
track(eventType: string, dataObject: any, instanceName: string): Promise<any> { track(
eventType: string,
dataObject: any,
instanceName: string
): Promise<any> {
return; return;
} }
@ -135,7 +137,11 @@ export class Tealium extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when something happens * @return {Promise<any>} Returns a promise that resolves when something happens
*/ */
@Cordova() @Cordova()
addPersistent(keyName: string, value: string | string[] | any, instanceName: string): Promise<any> { addPersistent(
keyName: string,
value: string | string[] | any,
instanceName: string
): Promise<any> {
return; return;
} }
@ -147,7 +153,11 @@ export class Tealium extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when something happens * @return {Promise<any>} Returns a promise that resolves when something happens
*/ */
@Cordova() @Cordova()
addVolatile(keyName: string, value: string | string[], instanceName: string): Promise<any> { addVolatile(
keyName: string,
value: string | string[],
instanceName: string
): Promise<any> {
return; return;
} }
@ -181,10 +191,15 @@ export class Tealium extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when something happens * @return {Promise<any>} Returns a promise that resolves when something happens
*/ */
@Cordova() @Cordova()
getPersistent(keyName: string, instanceName: string, callback: any): Promise<any> { getPersistent(
keyName: string,
instanceName: string,
callback: any
): Promise<any> {
return; return;
} }
/**
/**
* This function retrieves a value from the Tealium Volatile data store * This function retrieves a value from the Tealium Volatile data store
* @param keyName {string} The key name that this data will retrieved from the Tealium data store * @param keyName {string} The key name that this data will retrieved from the Tealium data store
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time * @param instanceName {string} Your arbitrary Tealium instance name provided at init time
@ -192,19 +207,27 @@ export class Tealium extends IonicNativePlugin {
* @return {Promise<any>} Returns a promise that resolves when something happens * @return {Promise<any>} Returns a promise that resolves when something happens
*/ */
@Cordova() @Cordova()
getVolatile(keyName: string, instanceName: string, callback: any): Promise<any> { getVolatile(
keyName: string,
instanceName: string,
callback: any
): Promise<any> {
return; return;
} }
/** /**
* This function adds a remote command for later execution * This function adds a remote command for later execution
* @param commandName {string} The command name for this Remote Command * @param commandName {string} The command name for this Remote Command
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time * @param instanceName {string} Your arbitrary Tealium instance name provided at init time
* @param callback {any} A callback function that will be called when the data has been retrieved * @param callback {any} A callback function that will be called when the data has been retrieved
* @return {Promise<any>} Returns a promise that resolves when something happens * @return {Promise<any>} Returns a promise that resolves when something happens
*/ */
@Cordova() @Cordova()
addRemoteCommand(commandName: string, instanceName: string, callback: any): Promise<any> { addRemoteCommand(
commandName: string,
instanceName: string,
callback: any
): Promise<any> {
return; return;
} }
@ -216,5 +239,4 @@ export class Tealium extends IonicNativePlugin {
getVisitorId(): Promise<any> { getVisitorId(): Promise<any> {
return; return;
} }
} }