From e26783b8c648d084910f95cdbadade785ae4ad38 Mon Sep 17 00:00:00 2001 From: Ibby Date: Tue, 6 Dec 2016 08:02:00 -0500 Subject: [PATCH] style(): spacing and cleanup --- src/plugins/3dtouch.ts | 12 +++++- src/plugins/actionsheet.ts | 10 ++++- src/plugins/admob.ts | 12 +----- src/plugins/android-fingerprint-auth.ts | 1 + src/plugins/appversion.ts | 1 + src/plugins/background-geolocation.ts | 1 + src/plugins/backgroundmode.ts | 2 + src/plugins/barcodescanner.ts | 1 + src/plugins/base64togallery.ts | 1 + src/plugins/batterystatus.ts | 2 + src/plugins/ble.ts | 2 + src/plugins/calendar.ts | 11 ++++- src/plugins/call-number.ts | 2 + src/plugins/camera-preview.ts | 10 ++++- src/plugins/camera.ts | 1 + src/plugins/card-io.ts | 28 ++++++++++++- src/plugins/clipboard.ts | 1 - src/plugins/code-push.ts | 4 -- src/plugins/contacts.ts | 15 +++++++ src/plugins/crop.ts | 3 ++ src/plugins/datepicker.ts | 18 ++++++++- src/plugins/dbmeter.ts | 1 - src/plugins/deeplinks.ts | 3 +- src/plugins/deviceaccounts.ts | 1 - src/plugins/devicemotion.ts | 1 - src/plugins/deviceorientation.ts | 1 - src/plugins/dialogs.ts | 1 + src/plugins/emailcomposer.ts | 33 +++++++++------ src/plugins/estimote-beacons.ts | 23 +++++++---- src/plugins/facebook.ts | 34 ++++++++++------ src/plugins/file-chooser.ts | 3 ++ src/plugins/file-opener.ts | 3 ++ src/plugins/filepath.ts | 2 + src/plugins/filetransfer.ts | 4 +- src/plugins/flashlight.ts | 1 - src/plugins/geofence.ts | 5 ++- src/plugins/geolocation.ts | 10 ++++- src/plugins/google-plus.ts | 53 ++++++++++++------------- src/plugins/googleanalytics.ts | 3 +- 39 files changed, 228 insertions(+), 92 deletions(-) diff --git a/src/plugins/3dtouch.ts b/src/plugins/3dtouch.ts index 52526839c..8d599562a 100644 --- a/src/plugins/3dtouch.ts +++ b/src/plugins/3dtouch.ts @@ -1,7 +1,6 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; - declare var window: any; /** @@ -137,16 +136,27 @@ export class ThreeDeeTouch { } export interface ThreeDeeTouchQuickAction { + type?: string; + title: string; + subtitle?: string; + iconType?: string; + iconTemplate?: string; + } export interface ThreeDeeTouchForceTouch { + force: number; + timestamp: number; + x: number; + y: number; + } diff --git a/src/plugins/actionsheet.ts b/src/plugins/actionsheet.ts index 86dd6e992..e8ce5b72a 100644 --- a/src/plugins/actionsheet.ts +++ b/src/plugins/actionsheet.ts @@ -1,6 +1,5 @@ import { Cordova, Plugin } from './plugin'; - /** * @name Action Sheet * @description @@ -54,36 +53,45 @@ export class ActionSheet { } export interface ActionSheetOptions { + /** * The labels for the buttons. Uses the index x */ buttonLabels: string[]; + /** * The title for the actionsheet */ title?: string; + /** * Theme to be used on Android */ androidTheme?: number; + /** * Enable a cancel on Android */ androidEnableCancelButton?: boolean; + /** * Enable a cancel on Windows Phone */ winphoneEnableCancelButton?: boolean; + /** * Add a cancel button with text */ addCancelButtonWithLabel?: string; + /** * Add a destructive button with text */ addDestructiveButtonWithLabel?: string; + /** * On an iPad, set the X,Y position */ position?: number[]; + } diff --git a/src/plugins/admob.ts b/src/plugins/admob.ts index 9527db075..d806519b7 100644 --- a/src/plugins/admob.ts +++ b/src/plugins/admob.ts @@ -7,12 +7,12 @@ import { Observable } from 'rxjs/Observable'; * @usage * ```typescript * import { AdMob } from 'ionic-native'; - * + * * ionViewDidLoad() { * AdMob.onBannerDismiss() * .subscribe(() => { console.log('User returned from interstitial'); }); * } - * + * * public onClick() { * AdMob.prepareInterstitial('YOUR_ADID') * .then(() => { AdMob.showInterstitial(); }); @@ -30,8 +30,6 @@ import { Observable } from 'rxjs/Observable'; }) export class AdMob { - // Static Methods - /** * * @param adIdOrOptions @@ -129,8 +127,6 @@ export class AdMob { @Cordova() static getAdSettings(): Promise { return; } - // Events - @Cordova({ eventObservable: true, event: 'onBannerFailedToReceive' @@ -161,14 +157,12 @@ export class AdMob { }) static onBannerDismiss(): Observable { return; } - @Cordova({ eventObservable: true, event: 'onInterstitialFailedToReceive' }) static onInterstitialFailedToReceive(): Observable { return; } - @Cordova({ eventObservable: true, event: 'onInterstitialReceive' @@ -182,14 +176,12 @@ export class AdMob { }) static onInterstitialPresent(): Observable { return; } - @Cordova({ eventObservable: true, event: 'onInterstitialLeaveApp' }) static onInterstitialLeaveApp(): Observable { return; } - @Cordova({ eventObservable: true, event: 'onInterstitialDismiss' diff --git a/src/plugins/android-fingerprint-auth.ts b/src/plugins/android-fingerprint-auth.ts index f06634da1..b8baf5469 100644 --- a/src/plugins/android-fingerprint-auth.ts +++ b/src/plugins/android-fingerprint-auth.ts @@ -36,6 +36,7 @@ import { Cordova, Plugin } from './plugin'; repo: 'https://github.com/mjwheatley/cordova-plugin-android-fingerprint-auth' }) export class AndroidFingerprintAuth { + /** * Opens a native dialog fragment to use the device hardware fingerprint scanner to authenticate against fingerprints registered for the device. * @param params {any} diff --git a/src/plugins/appversion.ts b/src/plugins/appversion.ts index e299b35fa..130715719 100644 --- a/src/plugins/appversion.ts +++ b/src/plugins/appversion.ts @@ -26,6 +26,7 @@ import { Cordova, Plugin } from './plugin'; platforms: ['Android', 'iOS'] }) export class AppVersion { + /** * Returns the name of the app * @returns {Promise} diff --git a/src/plugins/background-geolocation.ts b/src/plugins/background-geolocation.ts index f9d91c420..b90898a9e 100644 --- a/src/plugins/background-geolocation.ts +++ b/src/plugins/background-geolocation.ts @@ -498,4 +498,5 @@ export class BackgroundGeolocation { */ @Cordova() static getLogEntries(limit: number): Promise { return; } + } diff --git a/src/plugins/backgroundmode.ts b/src/plugins/backgroundmode.ts index a76e7fd57..a5526a41b 100644 --- a/src/plugins/backgroundmode.ts +++ b/src/plugins/backgroundmode.ts @@ -35,6 +35,7 @@ import { Observable } from 'rxjs/Observable'; platforms: ['Android', 'iOS', 'Windows Phone 8'] }) export class BackgroundMode { + /** * Enable the background mode. * Once called, prevents the app from being paused while in background. @@ -112,6 +113,7 @@ export class BackgroundMode { * Configurations items that can be updated. */ export interface Configure { + /** *Title of the background task */ diff --git a/src/plugins/barcodescanner.ts b/src/plugins/barcodescanner.ts index a88e0dea4..5a798fb7f 100644 --- a/src/plugins/barcodescanner.ts +++ b/src/plugins/barcodescanner.ts @@ -37,6 +37,7 @@ export class BarcodeScanner { PHONE_TYPE: 'PHONE_TYPE', SMS_TYPE: 'SMS_TYPE' }; + /** * Open the barcode scanner. * @param options {Object} Optional options to pass to the scanner diff --git a/src/plugins/base64togallery.ts b/src/plugins/base64togallery.ts index 324848ac1..4038e8402 100644 --- a/src/plugins/base64togallery.ts +++ b/src/plugins/base64togallery.ts @@ -1,4 +1,5 @@ import { Cordova, Plugin } from './plugin'; + /** * @name Base64 To Gallery * @description This plugin allows you to save base64 data as a png image into the device diff --git a/src/plugins/batterystatus.ts b/src/plugins/batterystatus.ts index eda912031..6c0a55c7b 100644 --- a/src/plugins/batterystatus.ts +++ b/src/plugins/batterystatus.ts @@ -64,6 +64,7 @@ export class BatteryStatus { } export interface StatusObject { + /** * The battery charge percentage */ @@ -73,4 +74,5 @@ export interface StatusObject { * A boolean that indicates whether the device is plugged in */ isPlugged: boolean; + } diff --git a/src/plugins/ble.ts b/src/plugins/ble.ts index 011a22619..6f668a870 100644 --- a/src/plugins/ble.ts +++ b/src/plugins/ble.ts @@ -167,6 +167,7 @@ import { Observable } from 'rxjs/Observable'; platforms: ['iOS', 'Android'] }) export class BLE { + /** * Scan and discover BLE peripherals for the specified amount of time. * @@ -421,4 +422,5 @@ export class BLE { */ @Cordova() static enable(): Promise { return; } + } diff --git a/src/plugins/calendar.ts b/src/plugins/calendar.ts index e6461b0eb..6de3c2313 100644 --- a/src/plugins/calendar.ts +++ b/src/plugins/calendar.ts @@ -1,19 +1,28 @@ import { Cordova, Plugin } from './plugin'; - /** * @private */ export interface CalendarOptions { + id?: string; + firstReminderMinutes?: number; + secondReminderMinutes?: number; + recurrence?: string; // options are: 'daily', 'weekly', 'monthly', 'yearly' + recurrenceInterval?: number; // only used when recurrence is set + recurrenceEndDate?: Date; + calendarName?: string; + calendarId?: number; + url?: string; + } /** diff --git a/src/plugins/call-number.ts b/src/plugins/call-number.ts index e69c297ad..b64e5a18b 100644 --- a/src/plugins/call-number.ts +++ b/src/plugins/call-number.ts @@ -23,6 +23,7 @@ import { Plugin, Cordova } from './plugin'; platforms: ['iOS', 'Android'] }) export class CallNumber { + /** * Calls a phone number * @param numberToCall {string} The phone number to call as a string @@ -35,4 +36,5 @@ export class CallNumber { static callNumber(numberToCall: string, bypassAppChooser: boolean): Promise { return; } + } diff --git a/src/plugins/camera-preview.ts b/src/plugins/camera-preview.ts index bd38e15f5..d8015a554 100644 --- a/src/plugins/camera-preview.ts +++ b/src/plugins/camera-preview.ts @@ -1,17 +1,24 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; - export interface CameraPreviewRect { + x: number; + y: number; + width: number; + height: number; + } export interface CameraPreviewSize { + maxWidth: number; + maxHeight: number; + } /** @@ -157,4 +164,5 @@ export class CameraPreview { sync: true }) static setColorEffect(effect: string): void { } + } diff --git a/src/plugins/camera.ts b/src/plugins/camera.ts index ee9f654e7..24526cdea 100644 --- a/src/plugins/camera.ts +++ b/src/plugins/camera.ts @@ -117,6 +117,7 @@ export interface CameraPopoverOptions { platforms: ['Android', 'BlackBerry', 'Browser', 'Firefox', 'FireOS', 'iOS', 'Windows', 'Windows Phone 8', 'Ubuntu'] }) export class Camera { + /** * @private * @enum {number} diff --git a/src/plugins/card-io.ts b/src/plugins/card-io.ts index a5023cf32..6347b657c 100644 --- a/src/plugins/card-io.ts +++ b/src/plugins/card-io.ts @@ -1,6 +1,5 @@ import { Cordova, Plugin } from './plugin'; - /** * @name CardIO * @description @@ -32,6 +31,7 @@ import { Cordova, Plugin } from './plugin'; platforms: ['iOS', 'Android'] }) export class CardIO { + /** * Check whether card scanning is currently available. (May vary by * device, OS version, network connectivity, etc.) @@ -59,31 +59,57 @@ export class CardIO { } export interface CardIOOptions { + requireExpiry?: boolean; + requireCVV?: boolean; + requirePostalCode?: boolean; + supressManual?: boolean; + restrictPostalCodeToNumericOnly?: boolean; + keepApplicationTheme?: boolean; + requireCardholderName?: boolean; + scanInstructions?: string; + noCamera?: boolean; + scanExpiry?: boolean; + languageOrLocale?: string; + guideColor?: string; + supressConfirmation?: boolean; + hideCardIOLogo?: boolean; + useCardIOLogo?: boolean; + supressScan?: boolean; + } export interface CardIOResponse { + cardType: string; + redactedCardNumber: string; + cardNumber: string; + expiryMonth: number; + expiryYear: number; + cvv: string; + postalCode: string; + cardholderName: string; + } diff --git a/src/plugins/clipboard.ts b/src/plugins/clipboard.ts index f4d855d96..f18c50fc8 100644 --- a/src/plugins/clipboard.ts +++ b/src/plugins/clipboard.ts @@ -1,6 +1,5 @@ import { Cordova, Plugin } from './plugin'; - /** * @name Clipboard * @description diff --git a/src/plugins/code-push.ts b/src/plugins/code-push.ts index 23cf9af34..7f4cafdd0 100644 --- a/src/plugins/code-push.ts +++ b/src/plugins/code-push.ts @@ -1,10 +1,6 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; -// below are taken from -// https://raw.githubusercontent.com/Microsoft/cordova-plugin-code-push/master/typings/codePush.d.ts -// and adjusted to remove warnings and access control - namespace Http { export const enum Verb { GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH diff --git a/src/plugins/contacts.ts b/src/plugins/contacts.ts index 42f7fa917..afd88a3c7 100644 --- a/src/plugins/contacts.ts +++ b/src/plugins/contacts.ts @@ -9,32 +9,46 @@ export type ContactFieldType = 'addresses' | 'birthday' | 'categories' | 'countr * @private */ export interface IContactProperties { + /** A globally unique identifier. */ id?: string; + /** The name of this Contact, suitable for display to end users. */ displayName?: string; + /** An object containing all components of a persons name. */ name?: IContactName; + /** A casual name by which to address the contact. */ nickname?: string; + /** An array of all the contact's phone numbers. */ phoneNumbers?: IContactField[]; + /** An array of all the contact's email addresses. */ emails?: IContactField[]; + /** An array of all the contact's addresses. */ addresses?: IContactAddress[]; + /** An array of all the contact's IM addresses. */ ims?: IContactField[]; + /** An array of all the contact's organizations. */ organizations?: IContactOrganization[]; + /** The birthday of the contact. */ birthday?: Date; + /** A note about the contact. */ note?: string; + /** An array of the contact's photos. */ photos?: IContactField[]; + /** An array of all the user-defined categories associated with the contact. */ categories?: IContactField[]; + /** An array of web pages associated with the contact. */ urls?: IContactField[]; } @@ -274,6 +288,7 @@ export class ContactFindOptions implements IContactFindOptions { repo: 'https://github.com/apache/cordova-plugin-contacts' }) export class Contacts { + /** * Create a single contact. * @returns {Contact} Returns a Contact object diff --git a/src/plugins/crop.ts b/src/plugins/crop.ts index 939f82334..0a73f811a 100644 --- a/src/plugins/crop.ts +++ b/src/plugins/crop.ts @@ -1,4 +1,5 @@ import { Cordova, Plugin } from './plugin'; + /** * @name Crop * @description Crops images @@ -22,6 +23,7 @@ import { Cordova, Plugin } from './plugin'; repo: 'https://github.com/jeduan/cordova-plugin-crop' }) export class Crop { + /** * Crops an image * @param pathToImage @@ -32,4 +34,5 @@ export class Crop { callbackOrder: 'reverse' }) static crop(pathToImage: string, options?: {quality: number}): Promise { return; } + } diff --git a/src/plugins/datepicker.ts b/src/plugins/datepicker.ts index ede2450cc..5fbd2baa5 100644 --- a/src/plugins/datepicker.ts +++ b/src/plugins/datepicker.ts @@ -1,6 +1,5 @@ import {Cordova, Plugin} from './plugin'; - export interface DatePickerOptions { /** * The mode of the date picker @@ -35,71 +34,88 @@ export interface DatePickerOptions { * Label of BUTTON_POSITIVE (done button) on Android */ okText?: string; + /** * Label of BUTTON_NEGATIVE (cancel button). If empty, uses android.R.string.cancel. */ cancelText?: string; + /** * Label of today button. If empty, doesn't show the option to select current date. */ todayText?: string; + /** * Label of now button. If empty, doesn't show the option to select current time. */ nowText?: string; + /** * Shows time dialog in 24 hours format. */ is24Hour?: boolean; + /** * Choose the Android theme for the picker. You can use the DatePicker.ANDROID_THEMES property. * Values: 1: THEME_TRADITIONAL | 2: THEME_HOLO_DARK | 3: THEME_HOLO_LIGHT | 4: THEME_DEVICE_DEFAULT_DARK | 5: THEME_DEVICE_DEFAULT_LIGHT */ androidTheme?: number; + /** * Shows or hide dates earlier then selected date. */ allowOldDates?: boolean; + /** * Shows or hide dates after selected date. */ allowFutureDates?: boolean; + /** * Label of done button. */ doneButtonLabel?: string; + /** * Hex color of done button. */ doneButtonColor?: string; + /** * Label of cancel button. */ cancelButtonLabel?: string; + /** * Hex color of cancel button. */ cancelButtonColor?: string; + /** * X position of date picker. The position is absolute to the root view of the application. */ x?: number; + /** * Y position of date picker. The position is absolute to the root view of the application. */ y?: number; + /** * Interval between options in the minute section of the date picker. */ minuteInterval?: number; + /** * Force the UIPopoverArrowDirection enum. The value any will revert to default UIPopoverArrowDirectionAny and let the app choose the proper direction itself. */ popoverArrowDirection?: string; + /** * Force locale for datePicker. */ locale?: string; + } /** diff --git a/src/plugins/dbmeter.ts b/src/plugins/dbmeter.ts index b96a5057c..93d96dc17 100644 --- a/src/plugins/dbmeter.ts +++ b/src/plugins/dbmeter.ts @@ -1,7 +1,6 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; - /** * @name DB Meter * @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone. diff --git a/src/plugins/deeplinks.ts b/src/plugins/deeplinks.ts index ecd44ce53..b83a1659b 100644 --- a/src/plugins/deeplinks.ts +++ b/src/plugins/deeplinks.ts @@ -1,8 +1,8 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; - export interface DeeplinkMatch { + /** * The route info for the matched route */ @@ -19,6 +19,7 @@ export interface DeeplinkMatch { * the route was matched (for example, Facebook sometimes adds extra data) */ $link: any; + } /** diff --git a/src/plugins/deviceaccounts.ts b/src/plugins/deviceaccounts.ts index 8ea888098..e660f6546 100644 --- a/src/plugins/deviceaccounts.ts +++ b/src/plugins/deviceaccounts.ts @@ -1,6 +1,5 @@ import { Cordova, Plugin } from './plugin'; - @Plugin({ pluginName: 'DeviceAccounts', plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git', diff --git a/src/plugins/devicemotion.ts b/src/plugins/devicemotion.ts index 486aa28dd..5fa1b651d 100644 --- a/src/plugins/devicemotion.ts +++ b/src/plugins/devicemotion.ts @@ -1,7 +1,6 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; - export interface AccelerationData { /** diff --git a/src/plugins/deviceorientation.ts b/src/plugins/deviceorientation.ts index 8bae29652..b04132b54 100644 --- a/src/plugins/deviceorientation.ts +++ b/src/plugins/deviceorientation.ts @@ -1,7 +1,6 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; - export interface CompassHeading { /** diff --git a/src/plugins/dialogs.ts b/src/plugins/dialogs.ts index 3f92678e5..3d67507d2 100644 --- a/src/plugins/dialogs.ts +++ b/src/plugins/dialogs.ts @@ -12,6 +12,7 @@ export interface PromptCallback { * The text entered in the prompt dialog box. (String) */ input1: string; + } diff --git a/src/plugins/emailcomposer.ts b/src/plugins/emailcomposer.ts index 512fafdf2..90b1df67e 100644 --- a/src/plugins/emailcomposer.ts +++ b/src/plugins/emailcomposer.ts @@ -1,8 +1,28 @@ import { Cordova, Plugin } from './plugin'; - declare var cordova: any; +export interface Email { + + app?: string; + + to?: string | Array; + + cc?: string | Array; + + bcc?: string | Array; + + attachments?: Array; + + subject?: string; + + body?: string; + + isHtml?: boolean; + +} + + /** * @name Email Composer * @description @@ -103,14 +123,3 @@ export class EmailComposer { static open(email: Email, scope?: any): Promise { return; } } - -export interface Email { - app?: string; - to?: string | Array; - cc?: string | Array; - bcc?: string | Array; - attachments?: Array; - subject?: string; - body?: string; - isHtml?: boolean; -} diff --git a/src/plugins/estimote-beacons.ts b/src/plugins/estimote-beacons.ts index 731b1d0d4..92966fffa 100644 --- a/src/plugins/estimote-beacons.ts +++ b/src/plugins/estimote-beacons.ts @@ -1,6 +1,20 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; +export interface EstimoteBeaconRegion { + + state?: string; + + major: number; + + minor: number; + + identifier?: string; + + uuid: string; + +} + /** * @name EstimoteBeacons * @@ -40,6 +54,7 @@ export class EstimoteBeacons { /** Beacon colour */ static BeaconColorBlueberryPie = 3; + /** * Beacon colour. */ @@ -394,7 +409,6 @@ export class EstimoteBeacons { }) static startSecureMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable { return; } - /** * Stop monitoring secure beacons. Available on iOS. * This function has the same parameters/behaviour as @@ -481,10 +495,3 @@ export class EstimoteBeacons { } -export interface EstimoteBeaconRegion { - state?: string; - major: number; - minor: number; - identifier?: string; - uuid: string; -} diff --git a/src/plugins/facebook.ts b/src/plugins/facebook.ts index 2bf1699d9..1678d6832 100644 --- a/src/plugins/facebook.ts +++ b/src/plugins/facebook.ts @@ -1,5 +1,27 @@ import { Cordova, Plugin } from './plugin'; +export interface FacebookLoginResponse { + + status: string; + + authResponse: { + + session_key: boolean; + + accessToken: string; + + expiresIn: number; + + sig: string; + + secret: string; + + userID: string; + + }; + +} + /** * @name Facebook * @description @@ -249,15 +271,3 @@ export class Facebook { }): Promise { return; } } - -export interface FacebookLoginResponse { - status: string; - authResponse: { - session_key: boolean; - accessToken: string; - expiresIn: number; - sig: string; - secret: string; - userID: string; - }; -} diff --git a/src/plugins/file-chooser.ts b/src/plugins/file-chooser.ts index c4dbefede..7c9dcde4f 100644 --- a/src/plugins/file-chooser.ts +++ b/src/plugins/file-chooser.ts @@ -1,4 +1,5 @@ import { Plugin, Cordova } from './plugin'; + /** * @name FileChooser * @description @@ -23,10 +24,12 @@ import { Plugin, Cordova } from './plugin'; platforms: ['Android'] }) export class FileChooser { + /** * Open a file * @returns {Promise} */ @Cordova() static open(): Promise { return; } + } diff --git a/src/plugins/file-opener.ts b/src/plugins/file-opener.ts index 9682ad203..8bdd782ca 100644 --- a/src/plugins/file-opener.ts +++ b/src/plugins/file-opener.ts @@ -1,4 +1,5 @@ import { Plugin, Cordova } from './plugin'; + /** * @name FileOpener * @description @@ -19,6 +20,7 @@ import { Plugin, Cordova } from './plugin'; repo: 'https://github.com/pwlin/cordova-plugin-file-opener2' }) export class FileOpener { + /** * Open an file * @param filePath {string} File Path @@ -55,4 +57,5 @@ export class FileOpener { errorName: 'error' }) static appIsInstalled(packageId: string): Promise {return; } + } diff --git a/src/plugins/filepath.ts b/src/plugins/filepath.ts index 09e1a8558..b4a611499 100644 --- a/src/plugins/filepath.ts +++ b/src/plugins/filepath.ts @@ -26,6 +26,7 @@ declare var window: any; platforms: ['Android'] }) export class FilePath { + /** * Resolve native path for given content URL/path. * @param {String} path Content URL/path. @@ -33,4 +34,5 @@ export class FilePath { */ @Cordova() static resolveNativePath(path: string): Promise {return; } + } diff --git a/src/plugins/filetransfer.ts b/src/plugins/filetransfer.ts index 208b6c8a6..d9ab5e413 100644 --- a/src/plugins/filetransfer.ts +++ b/src/plugins/filetransfer.ts @@ -1,6 +1,5 @@ import { CordovaInstance, Plugin } from './plugin'; - declare var FileTransfer; export interface FileUploadOptions { @@ -46,6 +45,7 @@ export interface FileUploadOptions { * Content-Type is present, multipart form data will NOT be used. */ headers?: { [s: string]: any; }; + } export interface FileUploadResult { @@ -69,6 +69,7 @@ export interface FileUploadResult { * The HTTP response headers by the server. */ headers: { [s: string]: any; }; + } export interface FileTransferError { @@ -103,6 +104,7 @@ export interface FileTransferError { * Either e.getMessage or e.toString. */ exception: string; + } /** diff --git a/src/plugins/flashlight.ts b/src/plugins/flashlight.ts index a2fad261e..0fb2aa4a5 100644 --- a/src/plugins/flashlight.ts +++ b/src/plugins/flashlight.ts @@ -1,6 +1,5 @@ import { Cordova, Plugin } from './plugin'; - /** * @name Flashlight * @description This plugin allows you to switch the flashlight / torch of the device on and off. diff --git a/src/plugins/geofence.ts b/src/plugins/geofence.ts index d7609fdda..f8cf5054a 100644 --- a/src/plugins/geofence.ts +++ b/src/plugins/geofence.ts @@ -1,5 +1,8 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; + +declare var window: any; + /** * @name Geofence * @description Monitors circular geofences around latitude/longitude coordinates, and sends a notification to the user when the boundary of a geofence is crossed. Notifications can be sent when the user enters and/or exits a geofence. @@ -71,8 +74,6 @@ import { Observable } from 'rxjs/Observable'; * Try running `ionic platform rm ` then run `ionic platform add ` to recreate the * platform directories. */ -declare var window: any; - @Plugin({ pluginName: 'Geofence', plugin: 'cordova-plugin-geofence', diff --git a/src/plugins/geolocation.ts b/src/plugins/geolocation.ts index 3bd9bab58..87063025e 100644 --- a/src/plugins/geolocation.ts +++ b/src/plugins/geolocation.ts @@ -1,10 +1,10 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; - declare var navigator: any; export interface Coordinates { + /** * a double representing the position's latitude in decimal degrees. */ @@ -48,6 +48,7 @@ export interface Coordinates { * This value can be null. */ speed: number; + } export interface Geoposition { @@ -63,6 +64,7 @@ export interface Geoposition { } export interface PositionError { + /** * A code that indicates the error that occurred */ @@ -72,9 +74,11 @@ export interface PositionError { * A message that can describe the error that occurred */ message: string; + } export interface GeolocationOptions { + /** * Is a positive long value indicating the maximum age in milliseconds of a * possible cached position that is acceptable to return. If set to 0, it @@ -102,8 +106,8 @@ export interface GeolocationOptions { * @type {boolean} */ enableHighAccuracy?: boolean; -} +} /** * @name Geolocation @@ -145,6 +149,7 @@ export interface GeolocationOptions { repo: 'https://github.com/apache/cordova-plugin-geolocation' }) export class Geolocation { + /** * Get the device's current position. * @@ -182,4 +187,5 @@ export class Geolocation { } ); } + } diff --git a/src/plugins/google-plus.ts b/src/plugins/google-plus.ts index 1a4d75db9..002d0a79d 100644 --- a/src/plugins/google-plus.ts +++ b/src/plugins/google-plus.ts @@ -1,6 +1,5 @@ import { Cordova, Plugin } from './plugin'; - /** * @name Google Plus * @description @@ -21,34 +20,34 @@ import { Cordova, Plugin } from './plugin'; }) export class GooglePlus { - /** - * The login function walks the user through the Google Auth process. - * @param options - * @returns {Promise} - */ - @Cordova() - static login(options?: any): Promise { return; } + /** + * The login function walks the user through the Google Auth process. + * @param options + * @returns {Promise} + */ + @Cordova() + static login(options?: any): Promise { return; } - /** - * You can call trySilentLogin to check if they're already signed in to the app and sign them in silently if they are. - * @param options - * @returns {Promise} - */ - @Cordova() - static trySilentLogin(options?: any): Promise { return; } + /** + * You can call trySilentLogin to check if they're already signed in to the app and sign them in silently if they are. + * @param options + * @returns {Promise} + */ + @Cordova() + static trySilentLogin(options?: any): Promise { return; } - /** - * This will clear the OAuth2 token. - * @returns {Promise} - */ - @Cordova() - static logout(): Promise { return; } + /** + * This will clear the OAuth2 token. + * @returns {Promise} + */ + @Cordova() + static logout(): Promise { return; } - /** - * This will clear the OAuth2 token, forget which account was used to login, and disconnect that account from the app. This will require the user to allow the app access again next time they sign in. Be aware that this effect is not always instantaneous. It can take time to completely disconnect. - * @returns {Promise} - */ - @Cordova() - static disconnect(): Promise { return; } + /** + * This will clear the OAuth2 token, forget which account was used to login, and disconnect that account from the app. This will require the user to allow the app access again next time they sign in. Be aware that this effect is not always instantaneous. It can take time to completely disconnect. + * @returns {Promise} + */ + @Cordova() + static disconnect(): Promise { return; } } diff --git a/src/plugins/googleanalytics.ts b/src/plugins/googleanalytics.ts index 8461b4bbb..10eb523ff 100644 --- a/src/plugins/googleanalytics.ts +++ b/src/plugins/googleanalytics.ts @@ -1,6 +1,5 @@ import { Cordova, Plugin } from './plugin'; - declare var window; /** @@ -20,6 +19,7 @@ declare var window; platforms: ['Android', 'iOS', 'Browser'] }) export class GoogleAnalytics { + /** * In your 'deviceready' handler, set up your Analytics tracker. * https://developers.google.com/analytics/devguides/collection/analyticsjs/ @@ -187,4 +187,5 @@ export class GoogleAnalytics { */ @Cordova() static enableUncaughtExceptionReporting(shouldEnable: boolean): Promise { return; } + }