refactor(): run formater

This commit is contained in:
Daniel Sogl 2021-08-20 20:59:47 +02:00
parent 8425ebcab3
commit 3fe0127946
3 changed files with 64 additions and 35 deletions

View File

@ -166,7 +166,9 @@ export class AdjustConfig {
this.eventTrackingFailedCallback = eventTrackingFailedCallback; this.eventTrackingFailedCallback = eventTrackingFailedCallback;
} }
setSessionTrackingSucceededCallbackListener(sessionTrackingSucceededCallback: (session: AdjustSessionSuccess) => void) { setSessionTrackingSucceededCallbackListener(
sessionTrackingSucceededCallback: (session: AdjustSessionSuccess) => void
) {
this.sessionTrackingSucceededCallback = sessionTrackingSucceededCallback; this.sessionTrackingSucceededCallback = sessionTrackingSucceededCallback;
} }
@ -282,14 +284,7 @@ export class AdjustPlayStoreSubscription {
private callbackParameters: string[] = []; private callbackParameters: string[] = [];
private partnerParameters: string[] = []; private partnerParameters: string[] = [];
constructor( constructor(price: string, currency: string, sku: string, orderId: string, signature: string, purchaseToken: string) {
price: string,
currency: string,
sku: string,
orderId: string,
signature: string,
purchaseToken: string
) {
this.price = price; this.price = price;
this.currency = currency; this.currency = currency;
this.sku = sku; this.sku = sku;
@ -425,7 +420,7 @@ export interface AdjustEventFailure {
export enum AdjustEnvironment { export enum AdjustEnvironment {
Sandbox = 'sandbox', Sandbox = 'sandbox',
Production = 'production' Production = 'production',
} }
export enum AdjustLogLevel { export enum AdjustLogLevel {
@ -435,7 +430,7 @@ export enum AdjustLogLevel {
Warn = 'WARN', Warn = 'WARN',
Error = 'ERROR', Error = 'ERROR',
Assert = 'ASSERT', Assert = 'ASSERT',
Suppress = 'SUPPRESS' Suppress = 'SUPPRESS',
} }
export enum AdjustUrlStrategy { export enum AdjustUrlStrategy {
@ -443,7 +438,7 @@ export enum AdjustUrlStrategy {
China = 'china', China = 'china',
DataResidencyEU = 'data-residency-eu', DataResidencyEU = 'data-residency-eu',
DataResidencyTR = 'data-residency-tr', DataResidencyTR = 'data-residency-tr',
DataResidencyUS = 'data-residency-us' DataResidencyUS = 'data-residency-us',
} }
export enum AdjustAdRevenueSource { export enum AdjustAdRevenueSource {
@ -498,11 +493,10 @@ export enum AdjustAdRevenueSource {
plugin: 'com.adjust.sdk', plugin: 'com.adjust.sdk',
pluginRef: 'Adjust', pluginRef: 'Adjust',
repo: 'https://github.com/adjust/cordova_sdk', repo: 'https://github.com/adjust/cordova_sdk',
platforms: ['Android', 'iOS'] platforms: ['Android', 'iOS'],
}) })
@Injectable() @Injectable()
export class Adjust extends IonicNativePlugin { export class Adjust extends IonicNativePlugin {
/** /**
* This method initializes Adjust SDK * This method initializes Adjust SDK
* @param {AdjustConig} config Adjust config object used as starting options * @param {AdjustConig} config Adjust config object used as starting options
@ -543,13 +537,13 @@ export class Adjust extends IonicNativePlugin {
* @param {AdjustAdRevenueSource} source Ad revenue source * @param {AdjustAdRevenueSource} source Ad revenue source
* @param {string} payload Ad revenue JSON string payload * @param {string} payload Ad revenue JSON string payload
*/ */
trackAdRevenue(source: AdjustAdRevenueSource, payload: string): void trackAdRevenue(source: AdjustAdRevenueSource, payload: string): void;
/** /**
* This method tracks ad revenue data * This method tracks ad revenue data
* @param {AdjustAdRevenue} adRevenue Adjust ad revenue object * @param {AdjustAdRevenue} adRevenue Adjust ad revenue object
*/ */
trackAdRevenue(adRevenue: AdjustAdRevenue): void trackAdRevenue(adRevenue: AdjustAdRevenue): void;
// And typescript hides this, so the client will be able call only methods above // And typescript hides this, so the client will be able call only methods above
@Cordova({ sync: true }) @Cordova({ sync: true })
@ -596,7 +590,9 @@ export class Adjust extends IonicNativePlugin {
* @returns {Promise<boolean>} * @returns {Promise<boolean>}
*/ */
@Cordova() @Cordova()
isEnabled(): Promise<boolean> { return; } isEnabled(): Promise<boolean> {
return;
}
/** /**
* In accordance with article 17 of the EU's General Data Protection Regulation (GDPR), you can notify Adjust when a user has exercised their right to be forgotten. * In accordance with article 17 of the EU's General Data Protection Regulation (GDPR), you can notify Adjust when a user has exercised their right to be forgotten.
@ -617,21 +613,27 @@ export class Adjust extends IonicNativePlugin {
* @return {Promise<string>} Returns a promise with google AdId value * @return {Promise<string>} Returns a promise with google AdId value
*/ */
@Cordova() @Cordova()
getGoogleAdId(): Promise<string> { return; } getGoogleAdId(): Promise<string> {
return;
}
/** /**
* If you need to obtain the Amazon Advertising ID, you can make a call to this function. * If you need to obtain the Amazon Advertising ID, you can make a call to this function.
* @return {Promise<string>} Returns a promise with anazib adv. ID * @return {Promise<string>} Returns a promise with anazib adv. ID
*/ */
@Cordova() @Cordova()
getAmazonAdId(): Promise<string> { return; } getAmazonAdId(): Promise<string> {
return;
}
/** /**
* To obtain the IDFA, call this function * To obtain the IDFA, call this function
* @return {Promise<string>} Returns a promise with IDFA string value * @return {Promise<string>} Returns a promise with IDFA string value
*/ */
@Cordova() @Cordova()
getIdfa(): Promise<string> { return; } getIdfa(): Promise<string> {
return;
}
/** /**
* For every device with your app installed on it, the Adjust backend generates a unique Adjust device identifier (adid). * For every device with your app installed on it, the Adjust backend generates a unique Adjust device identifier (adid).
@ -639,21 +641,27 @@ export class Adjust extends IonicNativePlugin {
* @return {Promise<string>} Returns a promise with adid value * @return {Promise<string>} Returns a promise with adid value
*/ */
@Cordova() @Cordova()
getAdid(): Promise<string> { return; } getAdid(): Promise<string> {
return;
}
/** /**
* If you want to access information about a user's current attribution whenever you need it, you can make a call to this function * If you want to access information about a user's current attribution whenever you need it, you can make a call to this function
* @return {Promise<AdjustAttribution>} Returns a promise with AdjustAttribution object * @return {Promise<AdjustAttribution>} Returns a promise with AdjustAttribution object
*/ */
@Cordova() @Cordova()
getAttribution(): Promise<AdjustAttribution> { return; } getAttribution(): Promise<AdjustAttribution> {
return;
}
/** /**
* Get the information about version of the SDK used * Get the information about version of the SDK used
* @return {Promise<string>} Returns a promise with sdk version information * @return {Promise<string>} Returns a promise with sdk version information
*/ */
@Cordova() @Cordova()
getSdkVersion(): Promise<string> { return; } getSdkVersion(): Promise<string> {
return;
}
/** /**
* Method used to add session callback parameters * Method used to add session callback parameters
@ -709,7 +717,9 @@ export class Adjust extends IonicNativePlugin {
* @return {Promise<number>} Returns a promise with user's consent value * @return {Promise<number>} Returns a promise with user's consent value
*/ */
@Cordova() @Cordova()
requestTrackingAuthorizationWithCompletionHandler(): Promise<number> { return; } requestTrackingAuthorizationWithCompletionHandler(): Promise<number> {
return;
}
/** /**
* You can update SKAdNetwork conversion value with calling this method * You can update SKAdNetwork conversion value with calling this method
@ -723,5 +733,7 @@ export class Adjust extends IonicNativePlugin {
* @return {Promise<number>} Returns a promise with app tracking authorization status * @return {Promise<number>} Returns a promise with app tracking authorization status
*/ */
@Cordova() @Cordova()
getAppTrackingAuthorizationStatus(): Promise<number> { return; } getAppTrackingAuthorizationStatus(): Promise<number> {
return;
}
} }

View File

@ -1,17 +1,35 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty, IonicNativePlugin } from '@ionic-native/core'; import {
Plugin,
Cordova,
CordovaProperty,
CordovaInstance,
InstanceProperty,
IonicNativePlugin,
} from '@ionic-native/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
enum UpdateType { enum UpdateType {
FLEXIBLE, IMMEDIATE FLEXIBLE,
IMMEDIATE,
} }
enum InstallStatus { enum InstallStatus {
CANCELED, DOWNLOADED, DOWNLOADING, FAILED, INSTALLED, INSTALLING, PENDING, UNKNOWN CANCELED,
DOWNLOADED,
DOWNLOADING,
FAILED,
INSTALLED,
INSTALLING,
PENDING,
UNKNOWN,
} }
enum UpdateAvailability { enum UpdateAvailability {
DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS, UNKNOWN, UPDATE_AVAILABLE, UPDATE_NOT_AVAILABLE DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS,
UNKNOWN,
UPDATE_AVAILABLE,
UPDATE_NOT_AVAILABLE,
} }
class AppUpdateInfo { class AppUpdateInfo {
@ -36,11 +54,10 @@ class AppUpdateInfo {
plugin: 'cordova-in-app-update', // npm package name, example: cordova-plugin-camera plugin: 'cordova-in-app-update', // npm package name, example: cordova-plugin-camera
pluginRef: 'window.plugins.InAppUpdate', // the variable reference to call the plugin, example: navigator.geolocation pluginRef: 'window.plugins.InAppUpdate', // the variable reference to call the plugin, example: navigator.geolocation
repo: 'https://github.com/itsLucario/cordova-app-update-plugin', // the github repository URL for the plugin repo: 'https://github.com/itsLucario/cordova-app-update-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']
}) })
@Injectable() @Injectable()
export class InAppUpdate extends IonicNativePlugin { export class InAppUpdate extends IonicNativePlugin {
/** /**
* If you want the user to be prompted about new version information before initiating the update, you can use `check` to retrive the new app version information. * If you want the user to be prompted about new version information before initiating the update, you can use `check` to retrive the new app version information.
* @return {Promise<AppUpdateInfo>} Returns a promise that resolves with new app version update details * @return {Promise<AppUpdateInfo>} Returns a promise that resolves with new app version update details
@ -55,7 +72,7 @@ export class InAppUpdate extends IonicNativePlugin {
* @return {Observable<AppUpdateInfo>} Returns a Observable can be subscribed to get update install state * @return {Observable<AppUpdateInfo>} Returns a Observable can be subscribed to get update install state
*/ */
@Cordova({ observable: true }) @Cordova({ observable: true })
update(config: { updateType: "FLEXIBLE" | "IMMEDIATE" }): Observable<AppUpdateInfo> { update(config: { updateType: 'FLEXIBLE' | 'IMMEDIATE' }): Observable<AppUpdateInfo> {
return; return;
} }