From d2261b643202df5fa2face83a178eb848a6f7829 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Fri, 16 Mar 2018 15:11:08 +0100 Subject: [PATCH] feat(device-accounts): add android account interface --- .../plugins/device-accounts/index.ts | 41 ++++++++++++++----- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/@ionic-native/plugins/device-accounts/index.ts b/src/@ionic-native/plugins/device-accounts/index.ts index ec345c165..903ddc380 100644 --- a/src/@ionic-native/plugins/device-accounts/index.ts +++ b/src/@ionic-native/plugins/device-accounts/index.ts @@ -1,5 +1,16 @@ import { Injectable } from '@angular/core'; -import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; + +export interface AndroidAccount { + /** Account creator */ + CREATOR: AndroidAccount; + + /** Account name */ + name: string; + + /** Account type */ + type: string; +} /** * @name Device Accounts @@ -19,6 +30,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; * .catch(error => console.error(error)); * * ``` + * @interfaces + * AndroidAccount */ @Plugin({ pluginName: 'DeviceAccounts', @@ -29,33 +42,39 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; }) @Injectable() export class DeviceAccounts extends IonicNativePlugin { - /** * Gets all accounts registered on the Android Device - * @returns {Promise} + * @returns {Promise} */ @Cordova() - get(): Promise { return; } + get(): Promise { + return; + } /** * Get all accounts registered on Android device for requested type - * @returns {Promise} + * @returns {Promise} */ @Cordova() - getByType(type: string): Promise { return; } + getByType(type: string): Promise { + return; + } /** * Get all emails registered on Android device (accounts with 'com.google' type) - * @returns {Promise} + * @returns {Promise} */ @Cordova() - getEmails(): Promise { return; } + getEmails(): Promise { + return; + } /** * Get the first email registered on Android device - * @returns {Promise} + * @returns {Promise} */ @Cordova() - getEmail(): Promise { return; } - + getEmail(): Promise { + return; + } }