diff --git a/src/@ionic-native/plugins/email-composer/index.ts b/src/@ionic-native/plugins/email-composer/index.ts index a7f794ef28..3891c259b5 100644 --- a/src/@ionic-native/plugins/email-composer/index.ts +++ b/src/@ionic-native/plugins/email-composer/index.ts @@ -117,6 +117,30 @@ export interface EmailComposerOptions { }) @Injectable() export class EmailComposer extends IonicNativePlugin { + /** + * Checks if the app has a permission to access email accounts information + * @return {Promise} returns a promise that resolves with a boolean that indicates if the permission was granted + */ + @Cordova({ + successIndex: 0, + errorIndex: 2 + }) + hasPermission(): Promise { + return; + } + + /** + * Request permission to access email accounts information + * @return {Promise} returns a promise that resolves with a boolean that indicates if the permission was granted + */ + @Cordova({ + successIndex: 0, + errorIndex: 2 + }) + requestPermission(): Promise { + return; + } + /** * Verifies if sending emails is supported on the device. * @@ -147,26 +171,17 @@ export class EmailComposer extends IonicNativePlugin { } /** - * Request permission to access email accounts information - * @return {Promise} returns a promise that resolves with a boolean that indicates if the permission was granted - */ - @Cordova({ - successIndex: 0, - errorIndex: 2 - }) - requestPermission(): Promise { - return; - } - - /** - * Checks if the app has a permission to access email accounts information - * @return {Promise} returns a promise that resolves with a boolean that indicates if the permission was granted + * Displays the email composer pre-filled with data. + * + * @param {EmailComposerOptions} options Email + * @param {any} [scope] Scope for the promise + * @returns {Promise} Resolves promise when the EmailComposer has been opened */ @Cordova({ - successIndex: 0, - errorIndex: 2 + successIndex: 1, + errorIndex: 3 }) - hasPermission(): Promise { + open(options: EmailComposerOptions, scope?: any): Promise { return; } @@ -178,19 +193,4 @@ export class EmailComposer extends IonicNativePlugin { */ @Cordova() addAlias(alias: string, packageName: string): void {} - - /** - * Displays the email composer pre-filled with data. - * - * @param {EmailComposerOptions} options Email - * @param {any} [scope] Scope for the promise - * @returns {Promise} Resolves promise when the EmailComposer has been opened - */ - @Cordova({ - successIndex: 1, - errorIndex: 3 - }) - open(options: EmailComposerOptions, scope?: any): Promise { - return; - } }