diff --git a/notNeededPackages.json b/notNeededPackages.json index 233c3b3673..258eb4b018 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -234,6 +234,114 @@ "sourceRepoURL": "https://github.com/jayphelps/core-decorators.js", "asOfVersion": "0.20.0" }, + { + "libraryName": "cordova-plugin-battery-status", + "typingsPackageName": "cordova-plugin-battery-status", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-battery-status", + "asOfVersion": "1.2.3" + }, + { + "libraryName": "cordova-plugin-camera", + "typingsPackageName": "cordova-plugin-camera", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-camera", + "asOfVersion": "2.4.0" + }, + { + "libraryName": "cordova-plugin-contacts", + "typingsPackageName": "cordova-plugin-contacts", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-contacts", + "asOfVersion": "2.3.0" + }, + { + "libraryName": "cordova-plugin-device", + "typingsPackageName": "cordova-plugin-device", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-device", + "asOfVersion": "1.1.5" + }, + { + "libraryName": "cordova-plugin-device-motion", + "typingsPackageName": "cordova-plugin-device-motion", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-device-motion", + "asOfVersion": "1.2.4" + }, + { + "libraryName": "Apache Cordova Device Orientation plugin", + "typingsPackageName": "cordova-plugin-device-orientation", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-device-orientation", + "asOfVersion": "1.0.6" + }, + { + "libraryName": "cordova-plugin-dialogs", + "typingsPackageName": "cordova-plugin-dialogs", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-dialogs", + "asOfVersion": "1.3.2" + }, + { + "libraryName": "Apache Cordova File System plugin", + "typingsPackageName": "cordova-plugin-file", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-file", + "asOfVersion": "4.3.2" + }, + { + "libraryName": "cordova-plugin-file-transfer", + "typingsPackageName": "cordova-plugin-file-transfer", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-file-transfer", + "asOfVersion": "1.6.2" + }, + { + "libraryName": "cordova-plugin-globalization", + "typingsPackageName": "cordova-plugin-globalization", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-globalization", + "asOfVersion": "1.0.6" + }, + { + "libraryName": "cordova-plugin-inappbrowser", + "typingsPackageName": "cordova-plugin-inappbrowser", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-inappbrowser", + "asOfVersion": "1.7.0" + }, + { + "libraryName": "cordova-plugin-media", + "typingsPackageName": "cordova-plugin-media", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-media", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "cordova-plugin-media-capture", + "typingsPackageName": "cordova-plugin-media-capture", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-media-capture", + "asOfVersion": "1.4.2" + }, + { + "libraryName": "cordova-plugin-network-information", + "typingsPackageName": "cordova-plugin-network-information", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-network-information", + "asOfVersion": "1.3.2" + }, + { + "libraryName": "cordova-plugin-splashscreen", + "typingsPackageName": "cordova-plugin-splashscreen", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-splashscreen", + "asOfVersion": "4.0.2" + }, + { + "libraryName": "Apache Cordova StatusBar plugin", + "typingsPackageName": "cordova-plugin-statusbar", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-statusbar", + "asOfVersion": "2.2.2" + }, + { + "libraryName": "Apache Cordova Vibration plugin", + "typingsPackageName": "cordova-plugin-vibration", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-vibration", + "asOfVersion": "2.1.4" + }, + { + "libraryName": "cordova.plugins.diagnostic", + "typingsPackageName": "cordova.plugins.diagnostic", + "sourceRepoURL": "https://github.com/dpa99c/cordova-diagnostic-plugin", + "asOfVersion": "3.7.0" + }, { "libraryName": "cypress", "typingsPackageName": "cypress", diff --git a/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts b/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts deleted file mode 100644 index dbad990b8d..0000000000 --- a/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts +++ /dev/null @@ -1,29 +0,0 @@ -function eventCallBack(ev: BatteryStatusEvent) { - console.log('Battery level is ' + ev.level); -} -window.addEventListener('batterystatus', (ev: BatteryStatusEvent) => { console.log('Battery level is ' + ev.level); }); -window.addEventListener('batterystatus', (ev) => { console.log('Battery level is ' + ev.level); }); -window.addEventListener('batterycritical', (ev) => { console.log('Battery is critical: ' + ev.level); }); -window.addEventListener('batterylow', (ev) => { console.log('Battery is low: ' + ev.level); }); - -window.addEventListener('baterystatus', eventCallBack); -window.addEventListener('batterycritical', eventCallBack); -window.addEventListener('batterylow', eventCallBack); - -window.removeEventListener('batterystatus', eventCallBack); -window.removeEventListener('batterycritical', eventCallBack); -window.removeEventListener('batterylow', eventCallBack); - -window.addEventListener('batterycritical', () => { alert('Battery is critical low!'); }); -window.addEventListener('batterylow', () => { alert('Battery is low!'); }); - -function batteryCriticalCallback() { - alert('Battery is critical low!'); -} - -function batteryLowCallback() { - alert('Battery is critical low!'); -} - -window.addEventListener('batterycritical', batteryCriticalCallback); -window.addEventListener('batterylow', batteryLowCallback); \ No newline at end of file diff --git a/types/cordova-plugin-battery-status/index.d.ts b/types/cordova-plugin-battery-status/index.d.ts deleted file mode 100644 index 0cdf729d30..0000000000 --- a/types/cordova-plugin-battery-status/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Type definitions for Apache Cordova BatteryStatus plugin -// Project: https://github.com/apache/cordova-plugin-battery-status -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies Inc -// Licensed under the MIT license. -// TypeScript Version: 2.3 - -interface WindowEventMap { - /** - * batterystatus: event fires when the percentage of battery charge changes by at least 1 percent, or if the device is plugged in or unplugged. - */ - "batterystatus" : BatteryStatusEvent; - /** - * batterycritical: event fires when the percentage of battery charge has reached the critical battery threshold. The value is device-specific. - */ - "batterycritical": BatteryStatusEvent; - /** - * batterylow: event fires when the percentage of battery charge has reached the low battery threshold, device-specific value. - */ - "batterylow": BatteryStatusEvent; -} - -interface Window { - onbatterystatus: (type: BatteryStatusEvent) => void; - onbatterycritical: (type: BatteryStatusEvent) => void; - onbatterylow: (type: BatteryStatusEvent) => void; -} - -/** Object, that passed into battery event listener */ -interface BatteryStatusEvent extends Event { - /* The percentage of battery charge (0-100). */ - level: number; - /* A boolean that indicates whether the device is plugged in. */ - isPlugged: boolean; -} \ No newline at end of file diff --git a/types/cordova-plugin-battery-status/tsconfig.json b/types/cordova-plugin-battery-status/tsconfig.json deleted file mode 100644 index 0149bb419c..0000000000 --- a/types/cordova-plugin-battery-status/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": false, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cordova-plugin-battery-status-tests.ts" - ] -} \ No newline at end of file diff --git a/types/cordova-plugin-battery-status/tslint.json b/types/cordova-plugin-battery-status/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/cordova-plugin-battery-status/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/cordova-plugin-camera/cordova-plugin-camera-tests.ts b/types/cordova-plugin-camera/cordova-plugin-camera-tests.ts deleted file mode 100644 index 2f1b661775..0000000000 --- a/types/cordova-plugin-camera/cordova-plugin-camera-tests.ts +++ /dev/null @@ -1,11 +0,0 @@ -navigator.camera.getPicture( - (data: string) => { alert('Got photo!'); }, - (message: string)=> { alert('Failed!: ' + message); }, - { - allowEdit: true, - cameraDirection: Camera.Direction.BACK, - destinationType: Camera.DestinationType.FILE_URI, - encodingType: Camera.EncodingType.JPEG, - sourceType: Camera.PictureSourceType.PHOTOLIBRARY, - quality: 80 - }); diff --git a/types/cordova-plugin-camera/index.d.ts b/types/cordova-plugin-camera/index.d.ts deleted file mode 100644 index 48c8f8ae5c..0000000000 --- a/types/cordova-plugin-camera/index.d.ts +++ /dev/null @@ -1,174 +0,0 @@ -// Type definitions for Apache Cordova Camera plugin -// Project: https://github.com/apache/cordova-plugin-camera -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies Inc -// Licensed under the MIT license. - -interface Navigator { - /** - * This plugin provides an API for taking pictures and for choosing images from the system's image library. - */ - camera: Camera; -} - -/** - * This plugin provides an API for taking pictures and for choosing images from the system's image library. - */ -interface Camera { - /** - * Removes intermediate photos taken by the camera from temporary storage. - * @param onSuccess Success callback, that called when cleanup succeeds. - * @param onError Error callback, that get an error message. - */ - cleanup( - onSuccess: () => void, - onError: (message: string) => void): void; - /** - * Takes a photo using the camera, or retrieves a photo from the device's image gallery. - * @param cameraSuccess Success callback, that get the image - * as a base64-encoded String, or as the URI for the image file. - * @param cameraError Error callback, that get an error message. - * @param cameraOptions Optional parameters to customize the camera settings. - */ - getPicture( - cameraSuccess: (data: string) => void, - cameraError: (message: string) => void, - cameraOptions?: CameraOptions): void; - // Next will work only on iOS - //getPicture( - // cameraSuccess: (data: string) => void, - // cameraError: (message: string) => void, - // cameraOptions?: CameraOptions): CameraPopoverHandle; -} - -interface CameraOptions { - /** Picture quality in range 0-100. Default is 50 */ - quality?: number; - /** - * Choose the format of the return value. - * Defined in navigator.camera.DestinationType. Default is FILE_URI. - * DATA_URL : 0, Return image as base64-encoded string - * FILE_URI : 1, Return image file URI - * NATIVE_URI : 2 Return image native URI - * (e.g., assets-library:// on iOS or content:// on Android) - */ - destinationType?: number; - /** - * Set the source of the picture. - * Defined in navigator.camera.PictureSourceType. Default is CAMERA. - * PHOTOLIBRARY : 0, - * CAMERA : 1, - * SAVEDPHOTOALBUM : 2 - */ - sourceType?: number; - /** Allow simple editing of image before selection. */ - allowEdit?: boolean; - /** - * Choose the returned image file's encoding. - * Defined in navigator.camera.EncodingType. Default is JPEG - * JPEG : 0 Return JPEG encoded image - * PNG : 1 Return PNG encoded image - */ - encodingType?: number; - /** - * Width in pixels to scale image. Must be used with targetHeight. - * Aspect ratio remains constant. - */ - targetWidth?: number; - /** - * Height in pixels to scale image. Must be used with targetWidth. - * Aspect ratio remains constant. - */ - targetHeight?: number; - /** - * Set the type of media to select from. Only works when PictureSourceType - * is PHOTOLIBRARY or SAVEDPHOTOALBUM. Defined in nagivator.camera.MediaType - * PICTURE: 0 allow selection of still pictures only. DEFAULT. - * Will return format specified via DestinationType - * VIDEO: 1 allow selection of video only, WILL ALWAYS RETURN FILE_URI - * ALLMEDIA : 2 allow selection from all media types - */ - mediaType?: number; - /** Rotate the image to correct for the orientation of the device during capture. */ - correctOrientation?: boolean; - /** Save the image to the photo album on the device after capture. */ - saveToPhotoAlbum?: boolean; - /** - * Choose the camera to use (front- or back-facing). - * Defined in navigator.camera.Direction. Default is BACK. - * FRONT: 0 - * BACK: 1 - */ - cameraDirection?: number; - /** iOS-only options that specify popover location in iPad. Defined in CameraPopoverOptions. */ - popoverOptions?: CameraPopoverOptions; -} - -/** - * A handle to the popover dialog created by navigator.camera.getPicture. Used on iOS only. - */ -interface CameraPopoverHandle { - /** - * Set the position of the popover. - * @param popoverOptions the CameraPopoverOptions that specify the new position. - */ - setPosition(popoverOptions: CameraPopoverOptions): void; -} - -/** - * iOS-only parameters that specify the anchor element location and arrow direction - * of the popover when selecting images from an iPad's library or album. - */ -interface CameraPopoverOptions { - x: number; - y: number; - width: number; - height: number; - /** - * Direction the arrow on the popover should point. Defined in Camera.PopoverArrowDirection - * Matches iOS UIPopoverArrowDirection constants. - * ARROW_UP : 1, - * ARROW_DOWN : 2, - * ARROW_LEFT : 4, - * ARROW_RIGHT : 8, - * ARROW_ANY : 15 - */ - arrowDir : number; -} - -declare var Camera: { - // Camera constants, defined in Camera plugin - DestinationType: { - DATA_URL: number; - FILE_URI: number; - NATIVE_URI: number - } - Direction: { - BACK: number; - FRONT: number; - } - EncodingType: { - JPEG: number; - PNG: number; - } - MediaType: { - PICTURE: number; - VIDEO: number; - ALLMEDIA: number; - } - PictureSourceType: { - PHOTOLIBRARY: number; - CAMERA: number; - SAVEDPHOTOALBUM: number; - } - // Used only on iOS - PopoverArrowDirection: { - ARROW_UP: number; - ARROW_DOWN: number; - ARROW_LEFT: number; - ARROW_RIGHT: number; - ARROW_ANY: number; - } -}; \ No newline at end of file diff --git a/types/cordova-plugin-camera/tsconfig.json b/types/cordova-plugin-camera/tsconfig.json deleted file mode 100644 index 267426a6fa..0000000000 --- a/types/cordova-plugin-camera/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cordova-plugin-camera-tests.ts" - ] -} \ No newline at end of file diff --git a/types/cordova-plugin-camera/tslint.json b/types/cordova-plugin-camera/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/cordova-plugin-camera/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts b/types/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts deleted file mode 100644 index 26243ab43a..0000000000 --- a/types/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts +++ /dev/null @@ -1,16 +0,0 @@ -var contact: Contact = navigator.contacts.create({ - nickname: 'John Smith', - displayName: 'John Smith', - phoneNumbers: [{ pref: true, type: "work", value: "+185642556856" }] -}); - -navigator.contacts.find(["phoneNumbers"], - (contacts: Contact[])=> { alert('Find ' + contacts.length + ' contacts'); }, - (error: ContactError) => { alert('Error: ' + error.message); }, - new ContactFindOptions("+1", true) -); - -navigator.contacts.pickContact( - (contact: Contact)=> { console.log(contact); }, - (err: ContactError)=> { console.log(err.message); } -); diff --git a/types/cordova-plugin-contacts/index.d.ts b/types/cordova-plugin-contacts/index.d.ts deleted file mode 100644 index f0979ba6c2..0000000000 --- a/types/cordova-plugin-contacts/index.d.ts +++ /dev/null @@ -1,337 +0,0 @@ -// Type definitions for Apache Cordova Contacts plugin -// Project: https://github.com/apache/cordova-plugin-contacts -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies, Inc. -// Licensed under the MIT license. - -interface Navigator { - /** Provides access to the device contacts database. */ - contacts: Contacts; -} - -interface Contacts { - /** - * The navigator.contacts.create method is synchronous, and returns a new Contact object. - * This method does not retain the Contact object in the device contacts database, - * for which you need to invoke the Contact.save method. - * @param properties Object with contact fields - */ - create(properties?: ContactProperties): Contact; - /** - * The navigator.contacts.find method executes asynchronously, querying the device contacts database - * and returning an array of Contact objects. The resulting objects are passed to the onSuccess - * callback function specified by the onSuccess parameter. - * @param fields The fields parameter specifies the fields to be used as a search qualifier, - * and only those results are passed to the onSuccess callback function. A zero-length fields parameter - * is invalid and results in ContactError.INVALID_ARGUMENT_ERROR. A contactFields value of "*" returns all contact fields. - * @param onSuccess Success callback function invoked with the array of Contact objects returned from the database - * @param onError Error callback function, invoked when an error occurs. - * @param options Search options to filter navigator.contacts. - */ - find(fields: string[], - onSuccess: (contacts: Contact[]) => void, - onError?: (error: ContactError) => void, - options?: ContactFindOptions): void; - /** - * The navigator.contacts.pickContact method launches the Contact Picker to select a single contact. - * The resulting object is passed to the contactSuccess callback function specified by the contactSuccess parameter. - * @param onSuccess Success callback function invoked with the array of Contact objects returned from the database - * @param onError Error callback function, invoked when an error occurs. - */ - pickContact(onSuccess: (contact: Contact) => void, - onError: (error: ContactError) => void): void - - /** - * This allows us to use an enumeration when setting the desired fields for the ContactFindOptions. - * The values will correspond to the type of string literals in ContactFieldType. - */ - fieldType: { - addresses: "addresses", - birthday: "birthday", - categories: "categories", - country: "country", - department: "department", - displayName: "displayName", - emails: "emails", - familyName: "familyName", - formatted: "formatted", - givenName: "givenName", - honorificPrefix: "honorificPrefix", - honorificSuffix: "honorificSuffix", - id: "id", - ims: "ims", - locality: "locality", - middleName: "middleName", - name: "name", - nickname: "nickname", - note: "note", - organizations: "organizations", - phoneNumbers: "phoneNumbers", - photos: "photos", - postalCode: "postalCode", - region: "region", - streetAddress: "streetAddress", - title: "title", - urls: "urls" - } -} - -interface ContactProperties { - /** 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?: ContactName; - /** A casual name by which to address the contact. */ - nickname?: string; - /** An array of all the contact's phone numbers. */ - phoneNumbers?: ContactField[]; - /** An array of all the contact's email addresses. */ - emails?: ContactField[]; - /** An array of all the contact's addresses. */ - addresses?: ContactAddress[]; - /** An array of all the contact's IM addresses. */ - ims?: ContactField[]; - /** An array of all the contact's organizations. */ - organizations?: ContactOrganization[]; - /** The birthday of the contact. */ - birthday?: Date; - /** A note about the contact. */ - note?: string; - /** An array of the contact's photos. */ - photos?: ContactField[]; - /** An array of all the user-defined categories associated with the contact. */ - categories?: ContactField[]; - /** An array of web pages associated with the contact. */ - urls?: ContactField[]; -} - -/** - * The Contact object represents a user's contact. Contacts can be created, stored, or removed - * from the device contacts database. Contacts can also be retrieved (individually or in bulk) - * from the database by invoking the navigator.contacts.find method. - */ -interface Contact extends ContactProperties { - /** - * Returns a new Contact object that is a deep copy of the calling object, with the id property set to null - */ - clone(): Contact; - /** - * Removes the contact from the device contacts database, otherwise executes an error callback with a ContactError object. - * @param onSuccess Success callback function invoked on success operation. - * @param onError Error callback function, invoked when an error occurs. - */ - remove( - onSuccess: () => void, - onError: (error: Error) => void): void; - /** - * Saves a new contact to the device contacts database, or updates an existing contact if a contact with the same id already exists. - * @param onSuccess Success callback function invoked on success operation with che Contact object. - * @param onError Error callback function, invoked when an error occurs. - */ - save( - onSuccess: (contact: Contact) => void, - onError: (error: Error) => void): void; -} - -declare var Contact: { - /** Constructor of Contact object */ - new (id?: string, - displayName?: string, - name?: ContactName, - nickname?: string, - phoneNumbers?: ContactField[], - emails?: ContactField[], - addresses?: ContactAddress[], - ims?: ContactField[], - organizations?: ContactOrganization[], - birthday?: Date, - note?: string, - photos?: ContactField[], - categories?: ContactField, - urls?: ContactField[]): Contact -}; - -/** The ContactError object is returned to the user through the contactError callback function when an error occurs. */ -interface ContactError { - /** Error code */ - code: number; - /** Error message */ - message: string; -} - -declare var ContactError: { - new (code: number): ContactError; - UNKNOWN_ERROR: number; - INVALID_ARGUMENT_ERROR: number; - TIMEOUT_ERROR: number; - PENDING_OPERATION_ERROR: number; - IO_ERROR: number; - NOT_SUPPORTED_ERROR: number; - PERMISSION_DENIED_ERROR: number -}; - -/** Contains different kinds of information about a Contact object's name. */ -interface ContactName { - /** The complete name of the contact. */ - formatted?: string; - /** The contact's family name. */ - familyName?: string; - /** The contact's given name. */ - givenName?: string; - /** The contact's middle name. */ - middleName?: string; - /** The contact's prefix (example Mr. or Dr.) */ - honorificPrefix?: string; - /** The contact's suffix (example Esq.). */ - honorificSuffix?: string; -} - -declare var ContactName: { - /** Constructor for ContactName object */ - new (formatted?: string, - familyName?: string, - givenName?: string, - middleName?: string, - honorificPrefix?: string, - honorificSuffix?: string): ContactName -}; - -/** - * The ContactField object is a reusable component that represents contact fields generically. - * Each ContactField object contains a value, type, and pref property. A Contact object stores - * several properties in ContactField[] arrays, such as phone numbers and email addresses. - * - * In most instances, there are no pre-determined values for a ContactField object's type attribute. - * For example, a phone number can specify type values of home, work, mobile, iPhone, - * or any other value that is supported by a particular device platform's contact database. - * However, for the Contact photos field, the type field indicates the format of the returned image: - * url when the value attribute contains a URL to the photo image, or base64 when the value - * contains a base64-encoded image string. - */ -interface ContactField { - /** A string that indicates what type of field this is, home for example. */ - type: string; - /** The value of the field, such as a phone number or email address. */ - value: string; - /** Set to true if this ContactField contains the user's preferred value. */ - pref: boolean; -} - -declare var ContactField: { - /** Constructor for ContactField object */ - new (type?: string, - value?: string, - pref?: boolean): ContactField -}; - -/** - * The ContactAddress object stores the properties of a single address of a contact. - * A Contact object may include more than one address in a ContactAddress[] array. - */ -interface ContactAddress { - /** Set to true if this ContactAddress contains the user's preferred value. */ - pref?: boolean; - /** A string indicating what type of field this is, home for example. */ - type?: string; - /** The full address formatted for display. */ - formatted?: string; - /** The full street address. */ - streetAddress?: string; - /** The city or locality. */ - locality?: string; - /** The state or region. */ - region?: string; - /** The zip code or postal code. */ - postalCode?: string; - /** The country name. */ - country?: string; -} - -declare var ContactAddress: { - /** Constructor of ContactAddress object */ - new (pref?: boolean, - type?: string, - formatted?: string, - streetAddress?: string, - locality?: string, - region?: string, - postalCode?: string, - country?: string): ContactAddress -}; - -/** - * The ContactOrganization object stores a contact's organization properties. A Contact object stores - * one or more ContactOrganization objects in an array. - */ -interface ContactOrganization { - /** Set to true if this ContactOrganization contains the user's preferred value. */ - pref?: boolean; - /** A string that indicates what type of field this is, home for example. */ - type?: string; - /** The name of the organization. */ - name?: string; - /** The department the contract works for. */ - department?: string; - /** The contact's title at the organization. */ - title?: string; -} - -declare var ContactOrganization: { - /** Constructor for ContactOrganization object */ - new (pref?: boolean, - type?: string, - name?: string, - department?: string, - title?: string): ContactOrganization -}; - -/** Search options to filter navigator.contacts. */ -interface ContactFindOptions { - /** The search string used to find navigator.contacts. */ - filter?: string; - /** Determines if the find operation returns multiple navigator.contacts. */ - multiple?: boolean; - /* Contact fields to be returned back. If specified, the resulting Contact object only features values for these fields. */ - desiredFields?: ContactFieldType[]; -} - -/** these are the string values that are valid for the desired fields in ContactFindOptions */ -declare type ContactFieldType = - "addresses" - | "birthday" - | "categories" - | "country" - | "department" - | "displayName" - | "emails" - | "familyName" - | "formatted" - | "givenName" - | "honorificPrefix" - | "honorificSuffix" - | "id" - | "ims" - | "locality" - | "middleName" - | "name" - | "nickname" - | "note" - | "organizations" - | "phoneNumbers" - | "photos" - | "postalCode" - | "region" - | "streetAddress" - | "title" - | "urls"; - -declare var ContactFindOptions: { - /** Constructor for ContactFindOptions object */ - new (filter?: string, - multiple?: boolean, - desiredFields?: ContactFieldType[]): ContactFindOptions -}; diff --git a/types/cordova-plugin-contacts/tsconfig.json b/types/cordova-plugin-contacts/tsconfig.json deleted file mode 100644 index 6217f6ac02..0000000000 --- a/types/cordova-plugin-contacts/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": false, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cordova-plugin-contacts-tests.ts" - ] -} \ No newline at end of file diff --git a/types/cordova-plugin-contacts/tslint.json b/types/cordova-plugin-contacts/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/cordova-plugin-contacts/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts b/types/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts deleted file mode 100644 index 1b335beaf7..0000000000 --- a/types/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts +++ /dev/null @@ -1,10 +0,0 @@ -navigator.accelerometer.getCurrentAcceleration( - (acc: Acceleration) => { console.log('X: ' + acc.x + 'Y: ' + acc.y + 'Z: ' + acc.z); }, - () => { alert('Error!'); }); - -var acchandle: WatchHandle = navigator.accelerometer.watchAcceleration( - (acc: Acceleration)=> { console.log('X: ' + acc.x + 'Y: ' + acc.y + 'Z: ' + acc.z); }, - () => { alert('Error!'); }, - { frequency: 10 }); - -navigator.accelerometer.clearWatch(acchandle); diff --git a/types/cordova-plugin-device-motion/index.d.ts b/types/cordova-plugin-device-motion/index.d.ts deleted file mode 100644 index ae38803fd2..0000000000 --- a/types/cordova-plugin-device-motion/index.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -// Type definitions for Apache Cordova Device Motion plugin -// Project: https://github.com/apache/cordova-plugin-device-motion -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies Inc -// Licensed under the MIT license. - -interface Navigator { - /** - * This plugin provides access to the device's accelerometer. The accelerometer is a motion sensor - * that detects the change (delta) in movement relative to the current device orientation, - * in three dimensions along the x, y, and z axis. - */ - accelerometer: Accelerometer; -} - -/** - * This plugin provides access to the device's accelerometer. The accelerometer is a motion sensor - * that detects the change (delta) in movement relative to the current device orientation, - * in three dimensions along the x, y, and z axis. - */ -interface Accelerometer { - /** - * Stop watching the Acceleration referenced by the watchID parameter. - * @param watchID The ID returned by navigator.accelerometer.watchAcceleration. - */ - clearWatch(watchID: WatchHandle): void; - /** - * Get the current acceleration along the x, y, and z axes. - * These acceleration values are returned to the accelerometerSuccess callback function. - * @param accelerometerSuccess Success callback that gets the Acceleration object. - * @param accelerometerError Success callback - */ - getCurrentAcceleration( - accelerometerSuccess: (acceleration: Acceleration) => void, - accelerometerError: () => void): void; - /** - * Retrieves the device's current Acceleration at a regular interval, executing the - * accelerometerSuccess callback function each time. Specify the interval in milliseconds - * via the acceleratorOptions object's frequency parameter. - * The returned watch ID references the accelerometer's watch interval, and can be used - * with navigator.accelerometer.clearWatch to stop watching the accelerometer. - * @param accelerometerSuccess Callback, that called at every time interval and passes an Acceleration object. - * @param accelerometerError Error callback. - * @param accelerometerOptions Object with options for watchAcceleration - */ - watchAcceleration( - accelerometerSuccess: (acceleration: Acceleration) => void, - accelerometerError: () => void, - accelerometerOptions?: AccelerometerOptions): WatchHandle; -} - -/** - * Contains Accelerometer data captured at a specific point in time. Acceleration values include - * the effect of gravity (9.81 m/s^2), so that when a device lies flat and facing up, x, y, and z - * values returned should be 0, 0, and 9.81. - */ -interface Acceleration { - /** Amount of acceleration on the x-axis. (in m/s^2) */ - x: number; - /** Amount of acceleration on the y-axis. (in m/s^2) */ - y: number; - /** Amount of acceleration on the z-axis. (in m/s^2) */ - z: number; - /** Creation timestamp in milliseconds. */ - timestamp: number; -} - -/** Object with options for watchAcceleration */ -interface AccelerometerOptions { - /** How often to retrieve the Acceleration in milliseconds. (Default: 10000) */ - frequency?: number; -} - -/** Abstract type for watch IDs used by Accelerometer. Values of these type are actually `number` at runtime.*/ -interface WatchHandle { } \ No newline at end of file diff --git a/types/cordova-plugin-device-motion/tsconfig.json b/types/cordova-plugin-device-motion/tsconfig.json deleted file mode 100644 index ac897b5d8b..0000000000 --- a/types/cordova-plugin-device-motion/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": false, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cordova-plugin-device-motion-tests.ts" - ] -} \ No newline at end of file diff --git a/types/cordova-plugin-device-motion/tslint.json b/types/cordova-plugin-device-motion/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/cordova-plugin-device-motion/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts b/types/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts deleted file mode 100644 index ab025d5fbf..0000000000 --- a/types/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts +++ /dev/null @@ -1,11 +0,0 @@ -navigator.compass.getCurrentHeading( - (heading: CompassHeading)=> { console.log('Got heading to ' + heading.magneticHeading); }, - (error: CompassError)=> { alert('Error! ' + error.code); }, - { frequency: 10 }); - -var accelhandle = navigator.compass.watchHeading( - (heading: CompassHeading) => { console.log('Got heading to ' + heading.magneticHeading); }, - (error: CompassError) => { alert('Error! ' + error.code); }, - { frequency: 10 }); - -navigator.compass.clearWatch(accelhandle); diff --git a/types/cordova-plugin-device-orientation/index.d.ts b/types/cordova-plugin-device-orientation/index.d.ts deleted file mode 100644 index dcd9654efa..0000000000 --- a/types/cordova-plugin-device-orientation/index.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -// Type definitions for Apache Cordova Device Orientation plugin -// Project: https://github.com/apache/cordova-plugin-device-orientation -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies Inc -// Licensed under the MIT license. - -interface Navigator { - /** - * This plugin provides access to the device's compass. The compass is a sensor that detects - * the direction or heading that the device is pointed, typically from the top of the device. - * It measures the heading in degrees from 0 to 359.99, where 0 is north. - */ - compass: Compass; -} - -/** - * This plugin provides access to the device's compass. The compass is a sensor that detects - * the direction or heading that the device is pointed, typically from the top of the device. - * It measures the heading in degrees from 0 to 359.99, where 0 is north. - */ -interface Compass { - /** - * Get the current compass heading. The compass heading is returned via a CompassHeading - * object using the onSuccess callback function. - * @param onSuccess Success callback that passes CompassHeading object. - * @param onError Error callback that passes CompassError object. - */ - getCurrentHeading( - onSuccess: (heading: CompassHeading) => void, - onError: (error: CompassError) => void, - options?: CompassOptions): void; - /** - * Gets the device's current heading at a regular interval. Each time the heading is retrieved, - * the headingSuccess callback function is executed. The returned watch ID references the compass - * watch interval. The watch ID can be used with navigator.compass.clearWatch to stop watching - * the navigator.compass. - * @param onSuccess Success callback that passes CompassHeading object. - * @param onError Error callback that passes CompassError object. - * @param options CompassOptions object - */ - watchHeading( - onSuccess: (heading: CompassHeading) => void, - onError: (error: CompassError) => void, - options?: CompassOptions): number; - /** - * Stop watching the compass referenced by the watch ID parameter. - * @param id The ID returned by navigator.compass.watchHeading. - */ - clearWatch(id: number): void; -} - -/** A CompassHeading object is returned to the compassSuccess callback function. */ -interface CompassHeading { - /** The heading in degrees from 0-359.99 at a single moment in time. */ - magneticHeading: number; - /** The heading relative to the geographic North Pole in degrees 0-359.99 at a single moment in time. A negative value indicates that the true heading can't be determined. */ - trueHeading: number; - /** The deviation in degrees between the reported heading and the true heading. */ - headingAccuracy: number; - /** The time at which this heading was determined. */ - timestamp: number; -} - -interface CompassOptions { - filter?: number; - frequency?: number; -} - -/** A CompassError object is returned to the onError callback function when an error occurs. */ -interface CompassError { - /** - * One of the predefined error codes - * CompassError.COMPASS_INTERNAL_ERR - * CompassError.COMPASS_NOT_SUPPORTED - */ - code: number; -} - -declare var CompassError: { - /** Constructor for CompassError object */ - new(code: number): CompassError; - COMPASS_INTERNAL_ERR: number; - COMPASS_NOT_SUPPORTED: number -} \ No newline at end of file diff --git a/types/cordova-plugin-device-orientation/tsconfig.json b/types/cordova-plugin-device-orientation/tsconfig.json deleted file mode 100644 index 9b5d7a2f53..0000000000 --- a/types/cordova-plugin-device-orientation/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cordova-plugin-device-orientation-tests.ts" - ] -} \ No newline at end of file diff --git a/types/cordova-plugin-device-orientation/tslint.json b/types/cordova-plugin-device-orientation/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/cordova-plugin-device-orientation/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/cordova-plugin-device/cordova-plugin-device-tests.ts b/types/cordova-plugin-device/cordova-plugin-device-tests.ts deleted file mode 100644 index cb894785c2..0000000000 --- a/types/cordova-plugin-device/cordova-plugin-device-tests.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(JSON.stringify(device)); \ No newline at end of file diff --git a/types/cordova-plugin-device/index.d.ts b/types/cordova-plugin-device/index.d.ts deleted file mode 100644 index 0451afb4de..0000000000 --- a/types/cordova-plugin-device/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Type definitions for Apache Cordova Device plugin -// Project: https://github.com/apache/cordova-plugin-device -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies Inc -// Licensed under the MIT license - -/** - * This plugin defines a global device object, which describes the device's hardware and software. - * Although the object is in the global scope, it is not available until after the deviceready event. - */ -interface Device { - /** Get the version of Cordova running on the device. */ - cordova: string; - /** Indicates that Cordova initialize successfully. */ - available: boolean; - /** - * The device.model returns the name of the device's model or product. The value is set - * by the device manufacturer and may be different across versions of the same product. - */ - model: string; - /** Get the device's operating system name. */ - platform: string; - /** Get the device's Universally Unique Identifier (UUID). */ - uuid: string; - /** Get the operating system version. */ - version: string; - /** Get the device's manufacturer. */ - manufacturer: string; - /** Whether the device is running on a simulator. */ - isVirtual: boolean; - /** Get the device hardware serial number. */ - serial: string; -} - -interface Window { - device: Device; -} - -declare var device: Device; diff --git a/types/cordova-plugin-device/tsconfig.json b/types/cordova-plugin-device/tsconfig.json deleted file mode 100644 index 43170b45db..0000000000 --- a/types/cordova-plugin-device/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": false, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cordova-plugin-device-tests.ts" - ] -} \ No newline at end of file diff --git a/types/cordova-plugin-device/tslint.json b/types/cordova-plugin-device/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/cordova-plugin-device/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts b/types/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts deleted file mode 100644 index 498d7d1000..0000000000 --- a/types/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts +++ /dev/null @@ -1,2 +0,0 @@ -navigator.notification.alert('Alert!', () => { alert('You\'re alerted'); }, 'Alert', 'Ok'); -navigator.notification.confirm('Are you ok?', (choice: number) => { alert('Your choice is ' + choice); }); diff --git a/types/cordova-plugin-dialogs/index.d.ts b/types/cordova-plugin-dialogs/index.d.ts deleted file mode 100644 index 8a4035bf01..0000000000 --- a/types/cordova-plugin-dialogs/index.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Type definitions for Apache Cordova Dialogs plugin -// Project: https://github.com/apache/cordova-plugin-dialogs -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies Inc -// Licensed under the MIT license. - -interface Navigator { - /** This plugin provides access to some native dialog UI elements. */ - notification: Notification -} - -/** This plugin provides access to some native dialog UI elements. */ -interface Notification { - /** - * Shows a custom alert or dialog box. Most Cordova implementations use a native dialog box for this feature, - * but some platforms use the browser's alert function, which is typically less customizable. - * @param message Dialog message. - * @param alertCallback Callback to invoke when alert dialog is dismissed. - * @param title Dialog title, defaults to 'Alert'. - * @param buttonName Button name, defaults to OK. - */ - alert(message: string, - alertCallback: () => void, - title?: string, - buttonName?: string): void; - /** - * The device plays a beep sound. - * @param times The number of times to repeat the beep. - */ - beep(times: number): void; - /** - * Displays a customizable confirmation dialog box. - * @param message Dialog message. - * @param confirmCallback Callback to invoke with index of button pressed (1, 2, or 3) - * or when the dialog is dismissed without a button press (0). - * @param title Dialog title, defaults to Confirm. - * @param buttonLabels Array of strings specifying button labels, defaults to [OK,Cancel]. - */ - confirm(message: string, - confirmCallback: (choice: number) => void, - title?: string, - buttonLabels?: string[]): void; - /** - * Displays a native dialog box that is more customizable than the browser's prompt function. - * @param message Dialog message. - * @param promptCallback Callback to invoke when a button is pressed. - * @param title Dialog title, defaults to "Prompt". - * @param buttonLabels Array of strings specifying button labels, defaults to ["OK","Cancel"]. - * @param defaultText Default textbox input value, default: "". - */ - prompt(message: string, - promptCallback: (result: NotificationPromptResult) => void, - title?: string, - buttonLabels?: string[], - defaultText?: string): void; -} - -/** Object, passed to promptCallback */ -interface NotificationPromptResult { - /** - * The index of the pressed button. Note that the index uses one-based indexing, so the value is 1, 2, 3, etc. - * 0 is the result when the dialog is dismissed without a button press. - */ - buttonIndex: number; - /** The text entered in the prompt dialog box. */ - input1: string; -} \ No newline at end of file diff --git a/types/cordova-plugin-dialogs/tsconfig.json b/types/cordova-plugin-dialogs/tsconfig.json deleted file mode 100644 index 0f12ab4850..0000000000 --- a/types/cordova-plugin-dialogs/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": false, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cordova-plugin-dialogs-tests.ts" - ] -} \ No newline at end of file diff --git a/types/cordova-plugin-dialogs/tslint.json b/types/cordova-plugin-dialogs/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/cordova-plugin-dialogs/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts b/types/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts deleted file mode 100644 index eec24db2e0..0000000000 --- a/types/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts +++ /dev/null @@ -1,37 +0,0 @@ -var file = new FileTransfer(); - -file.onprogress = (ev: ProgressEvent) => { - if (ev.lengthComputable) { - console.log(ev.loaded + '/' + ev.total); - } -}; - -file.download('http://some.server.com/download.php', - 'cdvfile://localhost/persistent/path/to/downloads/', - (file: FileEntry)=> { console.log('File Downloaded to ' + file.fullPath); }, - (err: FileTransferError) => { - console.error('Error ' + err.code); - if (err.exception) { - console.error('Failed with exception ' + err.exception); - } - }, - true, - { - headers: { - "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA==" - } - }); - -file.upload('cdvfile://localhost/persistent/path/to/downloads/', - 'http://some.server.com/download.php', - (result: FileUploadResult)=> { console.log('File uploaded. Bytes uploaded: ' + result.bytesSent); }, - (err: FileTransferError) => { - console.error('Error ' + err.code); - if (err.exception) { - console.error('Failed with exception ' + err.exception); - } - }, - { headers: {"X-Email": "user@mail.com", 'X-Token': "asdf3w234"}, httpMethod: "PUT" }, - true); - -file.abort(); diff --git a/types/cordova-plugin-file-transfer/index.d.ts b/types/cordova-plugin-file-transfer/index.d.ts deleted file mode 100644 index ad8d9945f5..0000000000 --- a/types/cordova-plugin-file-transfer/index.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -// Type definitions for Apache Cordova FileTransfer plugin -// Project: https://github.com/apache/cordova-plugin-file-transfer -// Definitions by: Microsoft Open Technologies Inc. -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies Inc -// Licensed under the MIT license - -/// - -/** - * The FileTransfer object provides a way to upload files using an HTTP multi-part POST request, - * and to download files as well. - */ -interface FileTransfer { - /** Called with a ProgressEvent whenever a new chunk of data is transferred. */ - onprogress: (event: ProgressEvent) => void; - /** - * Sends a file to a server. - * @param fileURL Filesystem URL representing the file on the device. For backwards compatibility, - * this can also be the full path of the file on the device. - * @param server URL of the server to receive the file, as encoded by encodeURI(). - * @param successCallback A callback that is passed a FileUploadResult object. - * @param errorCallback A callback that executes if an error occurs retrieving the FileUploadResult. - * Invoked with a FileTransferError object. - * @param options Optional parameters. - * @param trustAllHosts Optional parameter, defaults to false. If set to true, it accepts all security certificates. - * This is useful since Android rejects self-signed security certificates. - * Not recommended for production use. Supported on Android and iOS. - */ - upload( - fileURL: string, - server: string, - successCallback: (result: FileUploadResult) => void, - errorCallback: (error: FileTransferError) => void, - options?: FileUploadOptions, - trustAllHosts?: boolean): void; - /** - * downloads a file from server. - * @param source URL of the server to download the file, as encoded by encodeURI(). - * @param target Filesystem url representing the file on the device. For backwards compatibility, - * this can also be the full path of the file on the device. - * @param successCallback A callback that is passed a FileEntry object. (Function) - * @param errorCallback A callback that executes if an error occurs when retrieving the fileEntry. - * Invoked with a FileTransferError object. - * @param options Optional parameters. - * @param trustAllHosts Optional parameter, defaults to false. If set to true, it accepts all security certificates. - * This is useful since Android rejects self-signed security certificates. - * Not recommended for production use. Supported on Android and iOS. - */ - download( - source: string, - target: string, - successCallback: (fileEntry: FileEntry) => void, - errorCallback: (error: FileTransferError) => void, - trustAllHosts?: boolean, - options?: FileDownloadOptions): void; - /** - * Aborts an in-progress transfer. The onerror callback is passed a FileTransferError object - * which has an error code of FileTransferError.ABORT_ERR. - */ - abort(): void; -} - -declare var FileTransfer: { - new (): FileTransfer; -}; - -/** A FileUploadResult object is passed to the success callback of the FileTransfer object's upload() method. */ -interface FileUploadResult { - /** The number of bytes sent to the server as part of the upload. */ - bytesSent: number; - /** The HTTP response code returned by the server. */ - responseCode: number; - /** The HTTP response returned by the server. */ - response: string; - /** The HTTP response headers by the server. Currently supported on iOS only.*/ - headers: any; -} - -/** Optional parameters for upload method. */ -interface FileUploadOptions { - /** The name of the form element. Defaults to file. */ - fileKey?: string; - /** The file name to use when saving the file on the server. Defaults to image.jpg. */ - fileName?: string; - /** The HTTP method to use - either `PUT` or `POST`. Defaults to `POST`. */ - httpMethod?: string; - /** The mime type of the data to upload. Defaults to image/jpeg. */ - mimeType?: string; - /** A set of optional key/value pairs to pass in the HTTP request. */ - params?: Object; - /** Whether to upload the data in chunked streaming mode. Defaults to true. */ - chunkedMode?: boolean; - /** A map of header name/header values. Use an array to specify more than one value. */ - headers?: Object; -} - -/** Optional parameters for download method. */ -interface FileDownloadOptions { - /** A map of header name/header values. */ - headers?: {}; -} - -/** A FileTransferError object is passed to an error callback when an error occurs. */ -interface FileTransferError { - /** - * One of the predefined error codes listed below. - * FileTransferError.FILE_NOT_FOUND_ERR - * FileTransferError.INVALID_URL_ERR - * FileTransferError.CONNECTION_ERR - * FileTransferError.ABORT_ERR - * FileTransferError.NOT_MODIFIED_ERR - */ - code: number; - /** URL to the source. */ - source: string; - /** URL to the target. */ - target: string; - /** HTTP status code. This attribute is only available when a response code is received from the HTTP connection. */ - http_status: number; - /* Response body. This attribute is only available when a response is received from the HTTP connection. */ - body: string; - /* Exception that is thrown by native code */ - exception: any; -} - -declare var FileTransferError: { - /** Constructor for FileTransferError object */ - new (code?: number, source?: string, target?: string, status?: number, body?: any, exception?: any): FileTransferError; - FILE_NOT_FOUND_ERR: number; - INVALID_URL_ERR: number; - CONNECTION_ERR: number; - ABORT_ERR: number; - NOT_MODIFIED_ERR: number; -} \ No newline at end of file diff --git a/types/cordova-plugin-file-transfer/tsconfig.json b/types/cordova-plugin-file-transfer/tsconfig.json deleted file mode 100644 index eaa8a05e18..0000000000 --- a/types/cordova-plugin-file-transfer/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "cordova-plugin-file-transfer-tests.ts" - ] -} \ No newline at end of file diff --git a/types/cordova-plugin-file-transfer/tslint.json b/types/cordova-plugin-file-transfer/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/cordova-plugin-file-transfer/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} diff --git a/types/cordova-plugin-file/cordova-plugin-file-tests.ts b/types/cordova-plugin-file/cordova-plugin-file-tests.ts deleted file mode 100644 index 37538434e3..0000000000 --- a/types/cordova-plugin-file/cordova-plugin-file-tests.ts +++ /dev/null @@ -1,46 +0,0 @@ -/// - -function fsaccessor(fs: FileSystem) { - console.log('FS root is: ' + fs.root.name); - var fsreader: DirectoryReader = fs.root.createReader(); - fsreader.readEntries( - (entries: Entry[]) => { console.log(fs.root.name + ' has ' + entries.length + ' child elements'); }, - (err: FileError)=> { alert('Error: ' + err.code); }); -} - -window.requestFileSystem( - LocalFileSystem.TEMPORARY, - 1024 * 1024 * 5, - fsaccessor, - (err: FileError) => { alert('Error: ' + err.code); } -); - -window.requestFileSystem( - LocalFileSystem.PERSISTENT, - 1024 * 1024 * 5, - fsaccessor, - (err: FileError) => { alert('Error: ' + err.code); } -); - -window.resolveLocalFileSystemURI(cordova.file.applicationDirectory, - (entry: Entry)=> { - if (entry.isDirectory) { - console.log('successfully resolved ' + entry.fullPath + 'directory'); - console.log(entry.toURL()); - console.log(entry.toInternalURL()); - } else { - var fentry = entry; - fentry.file((f: File) => { console.log(f.slice(f.size - 10, f.size)); }); - fentry.createWriter((writer: FileWriter)=> { - if (writer.readyState == FileWriter.INIT) { - console.log('Init FileWriter'); - writer.write(new Blob(['sdfdsfsdf'])); - writer.onprogress = function(ev: ProgressEvent) { - console.log('Writing ' + ev.target); - }; - } - }); - } - }, - (error: FileError) => { console.log(error.code); } -); \ No newline at end of file diff --git a/types/cordova-plugin-file/index.d.ts b/types/cordova-plugin-file/index.d.ts deleted file mode 100644 index 6aadbf6fad..0000000000 --- a/types/cordova-plugin-file/index.d.ts +++ /dev/null @@ -1,378 +0,0 @@ -// Type definitions for Apache Cordova File System plugin -// Project: https://github.com/apache/cordova-plugin-file -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies, Inc. -// Licensed under the MIT license. - -interface Window { - /** - * Requests a filesystem in which to store application data. - * @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT. - * @param size This is an indicator of how much storage space, in bytes, the application expects to need. - * @param successCallback The callback that is called when the user agent provides a filesystem. - * @param errorCallback A callback that is called when errors happen, or when the request to obtain the filesystem is denied. - */ - requestFileSystem( - type: LocalFileSystem, - size: number, - successCallback: (fileSystem: FileSystem) => void, - errorCallback?: (fileError: FileError) => void): void; - /** - * Look up file system Entry referred to by local URL. - * @param string url URL referring to a local file or directory - * @param successCallback invoked with Entry object corresponding to URL - * @param errorCallback invoked if error occurs retrieving file system entry - */ - resolveLocalFileSystemURL(url: string, - successCallback: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Look up file system Entry referred to by local URI. - * @param string uri URI referring to a local file or directory - * @param successCallback invoked with Entry object corresponding to URI - * @param errorCallback invoked if error occurs retrieving file system entry - */ - resolveLocalFileSystemURI(uri: string, - successCallback: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; - TEMPORARY: number; - PERSISTENT: number; -} - -/** This interface represents a file system. */ -interface FileSystem { - /* The name of the file system, unique across the list of exposed file systems. */ - name: string; - /** The root directory of the file system. */ - root: DirectoryEntry; -} - -/** - * An abstract interface representing entries in a file system, - * each of which may be a File or DirectoryEntry. - */ -interface Entry { - /** Entry is a file. */ - isFile: boolean; - /** Entry is a directory. */ - isDirectory: boolean; - /** The name of the entry, excluding the path leading to it. */ - name: string; - /** The full absolute path from the root to the entry. */ - fullPath: string; - /** The file system on which the entry resides. */ - fileSystem: FileSystem; - nativeURL: string; - /** - * Look up metadata about this entry. - * @param successCallback A callback that is called with the time of the last modification. - * @param errorCallback A callback that is called when errors happen. - */ - getMetadata( - successCallback: (metadata: Metadata) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Move an entry to a different location on the file system. It is an error to try to: - * move a directory inside itself or to any child at any depth;move an entry into its parent if a name different from its current one isn't provided; - * move a file to a path occupied by a directory; - * move a directory to a path occupied by a file; - * move any element to a path occupied by a directory which is not empty. - * A move of a file on top of an existing file must attempt to delete and replace that file. - * A move of a directory on top of an existing empty directory must attempt to delete and replace that directory. - * @param parent The directory to which to move the entry. - * @param newName The new name of the entry. Defaults to the Entry's current name if unspecified. - * @param successCallback A callback that is called with the Entry for the new location. - * @param errorCallback A callback that is called when errors happen. - */ - moveTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Copy an entry to a different location on the file system. It is an error to try to: - * copy a directory inside itself or to any child at any depth; - * copy an entry into its parent if a name different from its current one isn't provided; - * copy a file to a path occupied by a directory; - * copy a directory to a path occupied by a file; - * copy any element to a path occupied by a directory which is not empty. - * A copy of a file on top of an existing file must attempt to delete and replace that file. - * A copy of a directory on top of an existing empty directory must attempt to delete and replace that directory. - * Directory copies are always recursive--that is, they copy all contents of the directory. - * @param parent The directory to which to move the entry. - * @param newName The new name of the entry. Defaults to the Entry's current name if unspecified. - * @param successCallback A callback that is called with the Entry for the new object. - * @param errorCallback A callback that is called when errors happen. - */ - copyTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Returns a URL that can be used as the src attribute of a