forked from lucasferreira/react-native-send-intent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
75 lines (68 loc) · 2.66 KB
/
index.d.ts
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
declare namespace SendIntentAndroid {
type TextType = typeof TEXT_HTML | typeof TEXT_PLAIN
interface TextIntentConfig {
title: string
text: string
type: TextType
}
interface CalendarEventConfig {
title: string
description: string
/**
* A datetime string with following format: yyyy-MM-dd HH:mm
*/
startDate: string
/**
* A datetime string with following format: yyyy-MM-dd HH:mm
*/
endDate: string
recurrence?: 'daily' | 'weekly' | 'monthly' | 'yearly'
location: string
/**
* **default**: false
*/
isAllDay?: boolean
}
interface ChooserOptions {
subject?: string
text?: string
imageUrl?: string
videoUrl?: string
}
interface TextToLineOptions {
text?: string
}
interface FileChooserOptions {
fileUrl: string
subject?: string
type: string
}
const sendText: (config: TextIntentConfig) => void
const sendPhoneCall: (phoneNumber: string, phoneAppOnly?: boolean) => void
const sendPhoneDial: (phoneNumber: string, phoneAppOnly?: boolean) => void
const sendSms: (phoneNumber: string, body?: string|null) => void
const addCalendarEvent: (config: CalendarEventConfig) => void
const isAppInstalled: (packageName: string) => Promise<boolean>
const installRemoteApp: (uri: string, saveAs: string) => Promise<boolean>
const openCalendar: () => void
const sendMail: (recepientMail: string, subject?: string, body?: string) => void
const openChooserWithOptions: (options: ChooserOptions, title: string) => void
const openChooserWithMultipleOptions: (options: ChooserOptions[], title: string)=> void
const openMaps: (query: string)=> void
const openCamera: ()=> void
const openMapsWithRoute: (query: string, mode: string)=> void
const shareTextToLine: (options: TextToLineOptions)=> void
const shareImageToInstagram: (mimeType: string, mediaPath: string) => void
const openSettings: (settingsName: string) => void
const getVoiceMailNumber: () => Promise<string>
const getPhoneNumber: () => Promise<string>
const openApp: (packageName: string, extras: { [index: string]: string }) => void
const openAppWithData: (packageName: string, dataUri: string, mimeType?: string, extras?: { [index: string]: string }) => Promise<boolean>
const openChromeIntent: (dataUri: string) => Promise<boolean>
const openDownloadManager: () => void
const openFileChooser: (options: FileChooserOptions, title: string) => void
const openEmailApp: () => void
const TEXT_PLAIN: unique symbol
const TEXT_HTML: unique symbol
}
export = SendIntentAndroid