forked from msywensky/nativescript-phone
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
44 lines (39 loc) · 1.24 KB
/
index.d.ts
File metadata and controls
44 lines (39 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { LocalEventEmitter } from './LocalEventEmitter';
export declare const NSPhoneEventEmitter: LocalEventEmitter;
/**
* Initiate a phone call.
* @param {string} number - The number to dial.
* @param {boolean} confirm - To enable OS specific confirmation before dialing.
* @returns {boolean} Result of dial
*/
export function dial(number: string, confirm: boolean): boolean;
/**
* Open the OS specific SMS app.
* @param {Array<string>} numbers - The number to send SMS to.
* @param {string} message - The message to send.
* @returns {Promise} response
*/
export function sms(numbers: Array<string>, message: string);
/**
* Request Call Permission on Android (dummy function on ios).
* @param {string} explanation - The explanation text if the user denies permission twice.
* @returns {Promise} Permission granted for then, denied for catch.
*/
export function requestCallPermission(explanation?: string): Promise<string>;
interface response {
success: string;
cancelled: string;
failed: string;
}
export declare enum SMSEvents {
FAILED = 'Failed',
SUCCESS = 'Success',
CANCELLED = 'Cancelled',
ERROR = 'Error',
UNKNOWN = 'Unknown'
}
export declare enum DialEvents {
FAILED = 'Failed',
SUCCESS = 'Success',
ERROR = 'Error'
}