From f34b6e6664fb2bdca70f28e0c3c1dea2c62934f8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 4 May 2018 10:28:43 +0200 Subject: [PATCH] fix(): fix tealium jsdoc --- .../plugins/tealium-adidentifier/index.ts | 7 +- .../plugins/tealium-installreferrer/index.ts | 11 +- src/@ionic-native/plugins/tealium/index.ts | 116 +++++++++++------- 3 files changed, 75 insertions(+), 59 deletions(-) diff --git a/src/@ionic-native/plugins/tealium-adidentifier/index.ts b/src/@ionic-native/plugins/tealium-adidentifier/index.ts index ead5311e..1ce923aa 100644 --- a/src/@ionic-native/plugins/tealium-adidentifier/index.ts +++ b/src/@ionic-native/plugins/tealium-adidentifier/index.ts @@ -7,7 +7,7 @@ import { Injectable } from '@angular/core'; * @description * 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. - * + * * @usage * ``` * 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 repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin 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() export class TealiumAdIdentifier extends IonicNativePlugin { - /** * This function stores the ad identifier information as persistent data * @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 { return; } - } diff --git a/src/@ionic-native/plugins/tealium-installreferrer/index.ts b/src/@ionic-native/plugins/tealium-installreferrer/index.ts index edd828a0..9d9b71fb 100644 --- a/src/@ionic-native/plugins/tealium-installreferrer/index.ts +++ b/src/@ionic-native/plugins/tealium-installreferrer/index.ts @@ -1,5 +1,5 @@ -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; import { Injectable } from '@angular/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; /** * @paid @@ -7,7 +7,7 @@ import { Injectable } from '@angular/core'; * @description * 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. - * + * * @usage * ``` * import { TealiumInstallReferrer } from '@ionic-native/tealium-installreferrer'; @@ -15,7 +15,7 @@ import { Injectable } from '@angular/core'; * * constructor(private installReferrer: TealiumInstallReferrer) { } * - * + * * this.installReferrer.setPersistent("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 repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin 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() export class TealiumInstallReferrer extends IonicNativePlugin { - /** * This function stores the install referrer information as persistent data * @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 { return; } - } diff --git a/src/@ionic-native/plugins/tealium/index.ts b/src/@ionic-native/plugins/tealium/index.ts index c0daa250..27cba82c 100644 --- a/src/@ionic-native/plugins/tealium/index.ts +++ b/src/@ionic-native/plugins/tealium/index.ts @@ -1,39 +1,39 @@ -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; import { Injectable } from '@angular/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; export interface TealConfig { - /** - * Your Tealium account name - */ - account: string; - /** - * Your Tealium profile name - */ - profile: string; - /** - * Your Tealium environment name (dev, qa, prod) - */ - environment: string; - /** - * Arbitrary instance name string. Must be consistent for all calls to Tealium API. - */ - instance: string; - /** - * Enables ("true") or disables ("false") lifecycle reporting. Default true if omitted. - */ - isLifecycleEnabled?: string; - /** - * Not usually required. Sets a custom URL override for dispatches to UDH. - */ - collectDispatchURL?: string; - /** - * Your Tealium UDH profile. Only active if you do not have collectDispatchURL set. - */ - collectDispatchProfile?: string; - /** - * Enables ("true") or disables ("false") Crash Reporter module for Android. Default false if omitted. - */ - isCrashReporterEnabled?: string; + /** + * Your Tealium account name + */ + account: string; + /** + * Your Tealium profile name + */ + profile: string; + /** + * Your Tealium environment name (dev, qa, prod) + */ + environment: string; + /** + * Arbitrary instance name string. Must be consistent for all calls to Tealium API. + */ + instance: string; + /** + * Enables ("true") or disables ("false") lifecycle reporting. Default true if omitted. + */ + isLifecycleEnabled?: string; + /** + * Not usually required. Sets a custom URL override for dispatches to UDH. + */ + collectDispatchURL?: string; + /** + * Your Tealium UDH profile. Only active if you do not have collectDispatchURL set. + */ + collectDispatchProfile?: string; + /** + * Enables ("true") or disables ("false") Crash Reporter module for Android. Default false if omitted. + */ + isCrashReporterEnabled?: string; } /** @@ -76,14 +76,12 @@ export interface TealConfig { 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 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() 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. * @param config {TealConfig} * @return {Promise} Returns a promise that resolves when something happens @@ -123,7 +121,11 @@ export class Tealium extends IonicNativePlugin { * @return {Promise} Returns a promise that resolves when something happens */ @Cordova() - track(eventType: string, dataObject: any, instanceName: string): Promise { + track( + eventType: string, + dataObject: any, + instanceName: string + ): Promise { return; } @@ -135,7 +137,11 @@ export class Tealium extends IonicNativePlugin { * @return {Promise} Returns a promise that resolves when something happens */ @Cordova() - addPersistent(keyName: string, value: string | string[] | any, instanceName: string): Promise { + addPersistent( + keyName: string, + value: string | string[] | any, + instanceName: string + ): Promise { return; } @@ -147,7 +153,11 @@ export class Tealium extends IonicNativePlugin { * @return {Promise} Returns a promise that resolves when something happens */ @Cordova() - addVolatile(keyName: string, value: string | string[], instanceName: string): Promise { + addVolatile( + keyName: string, + value: string | string[], + instanceName: string + ): Promise { return; } @@ -181,10 +191,15 @@ export class Tealium extends IonicNativePlugin { * @return {Promise} Returns a promise that resolves when something happens */ @Cordova() - getPersistent(keyName: string, instanceName: string, callback: any): Promise { + getPersistent( + keyName: string, + instanceName: string, + callback: any + ): Promise { return; } -/** + + /** * 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 instanceName {string} Your arbitrary Tealium instance name provided at init time @@ -192,19 +207,27 @@ export class Tealium extends IonicNativePlugin { * @return {Promise} Returns a promise that resolves when something happens */ @Cordova() - getVolatile(keyName: string, instanceName: string, callback: any): Promise { + getVolatile( + keyName: string, + instanceName: string, + callback: any + ): Promise { 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 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 * @return {Promise} Returns a promise that resolves when something happens */ @Cordova() - addRemoteCommand(commandName: string, instanceName: string, callback: any): Promise { + addRemoteCommand( + commandName: string, + instanceName: string, + callback: any + ): Promise { return; } @@ -216,5 +239,4 @@ export class Tealium extends IonicNativePlugin { getVisitorId(): Promise { return; } - }