-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
78 lines (67 loc) · 1.26 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
76
77
78
interface InitDisable {
/**
* 是否禁用华为推送
* @default false
*/
hms?: boolean
/**
* 是否禁用OPPO推送
* @default false
*/
oppo?: boolean
/**
* 是否禁用VIVO推送
*/
vivo?: string
/**
* 友盟平台appkey
*/
umeng: string
/**
* 友盟平台channel
*/
channel: string
}
namespace DuxPush {
/**
* 初始化推送
* @param appid 项目的appid
* @param secret 可不传
*/
function init(appid: string, secret?: string, disable?: InitDisable): void
/**
* 设置别名
* @param text 名称
*/
function setAlias(text: string): void
/**
* 取消设置别名
* @param text 名称
*/
function unsetAlias(text: string): void
/**
* 设置标签
* @param text 名称
*/
function setTag(text: string): void
/**
* 取消设置标签
* @param text 名称
*/
function unsetTag(text: string): void
/**
* 发送本地通知
* @param title 消息标题
* @param body 消息内容
*/
function notify(title: string, body: string): void
/**
* 判断是否开启了消息通知
*/
function notificationsEnabled(): Promise
/**
* 跳转到开启消息通知页面
*/
function goPushSetting(): void
}
export default DuxPush