fix(email-composer): add missing options

#175
This commit is contained in:
Daniel 2018-04-06 22:38:59 +02:00
parent a81a4d3edf
commit 439960092e

View File

@ -1,8 +1,12 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
import {
Cordova,
CordovaCheck,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
export interface EmailComposerOptions {
/**
* App to send the email with
*/
@ -43,9 +47,12 @@ export interface EmailComposerOptions {
*/
isHtml?: boolean;
/**
* Content type of the email (Android only)
*/
type?: string;
}
/**
* @name Email Composer
* @description
@ -106,11 +113,10 @@ export interface EmailComposerOptions {
plugin: 'cordova-plugin-email-composer',
pluginRef: 'cordova.plugins.email',
repo: 'https://github.com/katzer/cordova-plugin-email-composer',
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows', 'macOS']
})
@Injectable()
export class EmailComposer extends IonicNativePlugin {
/**
* Verifies if sending emails is supported on the device.
*
@ -148,7 +154,9 @@ export class EmailComposer extends IonicNativePlugin {
successIndex: 0,
errorIndex: 2
})
requestPermission(): Promise<boolean> { return; }
requestPermission(): Promise<boolean> {
return;
}
/**
* Checks if the app has a permission to access email accounts information
@ -158,7 +166,9 @@ export class EmailComposer extends IonicNativePlugin {
successIndex: 0,
errorIndex: 2
})
hasPermission(): Promise<boolean> { return; }
hasPermission(): Promise<boolean> {
return;
}
/**
* Adds a new mail app alias.
@ -167,7 +177,7 @@ export class EmailComposer extends IonicNativePlugin {
* @param packageName {string} The package name
*/
@Cordova()
addAlias(alias: string, packageName: string): void { }
addAlias(alias: string, packageName: string): void {}
/**
* Displays the email composer pre-filled with data.
@ -180,6 +190,7 @@ export class EmailComposer extends IonicNativePlugin {
successIndex: 1,
errorIndex: 3
})
open(options: EmailComposerOptions, scope?: any): Promise<any> { return; }
open(options: EmailComposerOptions, scope?: any): Promise<any> {
return;
}
}