@dcloudio/uni-app-x 0.7.32 → 0.7.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/app.d.ts +182 -146
- package/types/native/CSSStyleDeclaration.d.ts +72 -0
- package/types/native/DOMRect.d.ts +180 -0
- package/types/native/DrawableContext.d.ts +471 -4
- package/types/native/SnapshotOptions.d.ts +0 -1
- package/types/native/UniEvent.d.ts +23 -1
- package/types/page.d.ts +99 -84
- package/types/uni/uts-plugin-api/global.d.ts +2 -0
- package/types/uni/uts-plugin-api/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-crash/utssdk/global.d.ts +20 -0
- package/types/uni/uts-plugin-api/lib/uni-crash/utssdk/index.d.ts +9 -0
- package/types/uni/uts-plugin-api/lib/uni-crash/utssdk/interface.d.ts +48 -0
- package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +6 -6
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +20 -20
- package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent-uni1/utssdk/global.d.ts +22 -0
- package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent-uni1/utssdk/index.d.ts +10 -0
- package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent-uni1/utssdk/interface.d.ts +781 -0
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +7 -5
- package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +4 -4
- package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/interface.d.ts +33 -33
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +3 -4
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +224 -5
- package/types/uni/uts-plugin-biz/lib/uni-map-tencent/utssdk/global.d.ts +14 -8
- package/types/uni/uts-plugin-biz/lib/uni-map-tencent/utssdk/index.d.ts +7 -4
- package/types/uni/uts-plugin-biz/lib/uni-map-tencent/utssdk/interface.d.ts +1788 -183
- package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +686 -661
- package/types/uni-cloud/interface.d.ts +1 -1
|
@@ -7,33 +7,38 @@ export interface Uni {
|
|
|
7
7
|
* @return {void}
|
|
8
8
|
* @tutorial http://uniapp.dcloud.io/api/plugins/push.html#getpushclientid
|
|
9
9
|
* @uniPlatform {
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
* "app": {
|
|
11
|
+
* "android": {
|
|
12
|
+
* "osVer": "4.4",
|
|
13
|
+
* "uniVer": "√",
|
|
14
|
+
* "unixVer": "3.98"
|
|
15
|
+
* },
|
|
16
|
+
* "ios": {
|
|
17
|
+
* "osVer": "12.0",
|
|
18
|
+
* "uniVer": "√",
|
|
19
|
+
* "unixVer": "4.18"
|
|
20
|
+
* },
|
|
21
|
+
* "harmony": {
|
|
22
|
+
* "osVer": "3.0",
|
|
23
|
+
* "uniVer": "4.31",
|
|
24
|
+
* "unixVer": "x"
|
|
25
|
+
* }
|
|
26
|
+
* },
|
|
27
|
+
* "web": {
|
|
28
|
+
* "uniVer": "x",
|
|
29
|
+
* "unixVer": "4.27"
|
|
30
|
+
* }
|
|
26
31
|
* }
|
|
27
32
|
* @example
|
|
28
|
-
|
|
33
|
+
```typescript
|
|
29
34
|
uni.getPushClientId({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
complete: (res: any) => {
|
|
36
|
+
console.log("getPushClientId complete => " + JSON.stringify(res));
|
|
37
|
+
}
|
|
33
38
|
});
|
|
34
|
-
|
|
39
|
+
```
|
|
35
40
|
*/
|
|
36
|
-
getPushClientId(options
|
|
41
|
+
getPushClientId(options: GetPushClientIdOptions): void;
|
|
37
42
|
/**
|
|
38
43
|
* onPushMessage()
|
|
39
44
|
* @description
|
|
@@ -42,31 +47,36 @@ export interface Uni {
|
|
|
42
47
|
* @return {void}
|
|
43
48
|
* @tutorial http://uniapp.dcloud.io/api/plugins/push.html#onpushmessage
|
|
44
49
|
* @uniPlatform {
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
* "app": {
|
|
51
|
+
* "android": {
|
|
52
|
+
* "osVer": "4.4",
|
|
53
|
+
* "uniVer": "√",
|
|
54
|
+
* "unixVer": "3.98"
|
|
55
|
+
* },
|
|
56
|
+
* "ios": {
|
|
57
|
+
* "osVer": "12.0",
|
|
58
|
+
* "uniVer": "√",
|
|
59
|
+
* "unixVer": "4.18"
|
|
60
|
+
* },
|
|
61
|
+
* "harmony": {
|
|
62
|
+
* "osVer": "3.0",
|
|
63
|
+
* "uniVer": "4.31",
|
|
64
|
+
* "unixVer": "x"
|
|
65
|
+
* }
|
|
66
|
+
* },
|
|
67
|
+
* "web": {
|
|
68
|
+
* "uniVer": "x",
|
|
69
|
+
* "unixVer": "4.27"
|
|
70
|
+
* }
|
|
61
71
|
* }
|
|
62
72
|
* @example
|
|
63
73
|
```typescript
|
|
64
74
|
uni.onPushMessage((res : OnPushMessageCallbackResult) => {
|
|
65
|
-
|
|
75
|
+
console.log("onPushMessage => " + JSON.stringify(res))
|
|
66
76
|
});
|
|
67
77
|
```
|
|
68
78
|
*/
|
|
69
|
-
onPushMessage(callback
|
|
79
|
+
onPushMessage(callback: OnPushMessageCallback): void;
|
|
70
80
|
/**
|
|
71
81
|
* offPushMessage()
|
|
72
82
|
* @description
|
|
@@ -75,32 +85,37 @@ export interface Uni {
|
|
|
75
85
|
* @return {void}
|
|
76
86
|
* @tutorial http://uniapp.dcloud.io/api/plugins/push.html#offpushmessage
|
|
77
87
|
* @uniPlatform {
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
* "app": {
|
|
89
|
+
* "android": {
|
|
90
|
+
* "osVer": "4.4",
|
|
91
|
+
* "uniVer": "√",
|
|
92
|
+
* "unixVer": "3.98"
|
|
93
|
+
* },
|
|
94
|
+
* "ios": {
|
|
95
|
+
* "osVer": "12.0",
|
|
96
|
+
* "uniVer": "√",
|
|
97
|
+
* "unixVer": "4.18"
|
|
98
|
+
* },
|
|
99
|
+
* "harmony": {
|
|
100
|
+
* "osVer": "3.0",
|
|
101
|
+
* "uniVer": "4.31",
|
|
102
|
+
* "unixVer": "x"
|
|
103
|
+
* }
|
|
104
|
+
* },
|
|
105
|
+
* "web": {
|
|
106
|
+
* "uniVer": "x",
|
|
107
|
+
* "unixVer": "4.27"
|
|
108
|
+
* }
|
|
94
109
|
* }
|
|
95
110
|
* @example
|
|
96
111
|
```typescript
|
|
97
112
|
const cb = (res : OnPushMessageCallbackResult) => {
|
|
98
|
-
|
|
113
|
+
console.log("onPushMessage => " + JSON.stringify(res))
|
|
99
114
|
}
|
|
100
115
|
uni.offPushMessage(cb);
|
|
101
116
|
```
|
|
102
117
|
*/
|
|
103
|
-
offPushMessage(callback
|
|
118
|
+
offPushMessage(callback: OnPushMessageCallback): void;
|
|
104
119
|
/**
|
|
105
120
|
* getChannelManager()
|
|
106
121
|
* @description
|
|
@@ -109,41 +124,41 @@ export interface Uni {
|
|
|
109
124
|
* @param {void}
|
|
110
125
|
* @return {ChannelManager}
|
|
111
126
|
* @uniPlatform {
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
127
|
+
* "app": {
|
|
128
|
+
* "android": {
|
|
129
|
+
* "osVer": "4.4",
|
|
130
|
+
* "uniVer": "3.98",
|
|
131
|
+
* "unixVer": "3.98"
|
|
132
|
+
* },
|
|
133
|
+
* "ios": {
|
|
134
|
+
* "osVer": "x",
|
|
135
|
+
* "uniVer": "x",
|
|
136
|
+
* "unixVer": "x"
|
|
137
|
+
* }
|
|
138
|
+
* },
|
|
139
|
+
* "web": {
|
|
140
|
+
* "uniVer": "x",
|
|
141
|
+
* "unixVer": "x"
|
|
142
|
+
* }
|
|
128
143
|
* }
|
|
129
144
|
* @example
|
|
130
145
|
```typescript
|
|
131
146
|
const channelManager = uni.getChannelManager();
|
|
132
147
|
channelManager.setPushChannel({
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
148
|
+
channelId: "test1",
|
|
149
|
+
channelDesc: "test1 desc",
|
|
150
|
+
soundName: "pushsound",
|
|
151
|
+
enableLights: true,
|
|
152
|
+
enableVibration: true,
|
|
153
|
+
importance: 4,
|
|
154
|
+
lockscreenVisibility: 1
|
|
140
155
|
})
|
|
141
156
|
const channels = channelManager.getAllChannels() as string[]
|
|
142
157
|
console.log("channels : " + channels);
|
|
143
158
|
```
|
|
144
159
|
*/
|
|
145
|
-
getChannelManager()
|
|
146
|
-
|
|
160
|
+
getChannelManager(): ChannelManager;
|
|
161
|
+
|
|
147
162
|
/**
|
|
148
163
|
* getPushChannelManager()
|
|
149
164
|
* @description
|
|
@@ -151,41 +166,41 @@ export interface Uni {
|
|
|
151
166
|
* @param {void}
|
|
152
167
|
* @return {PushChannelManager}
|
|
153
168
|
* @uniPlatform {
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
169
|
+
* "app": {
|
|
170
|
+
* "android": {
|
|
171
|
+
* "osVer": "4.4",
|
|
172
|
+
* "uniVer": "4.25",
|
|
173
|
+
* "unixVer": "4.25"
|
|
174
|
+
* },
|
|
175
|
+
* "ios": {
|
|
176
|
+
* "osVer": "x",
|
|
177
|
+
* "uniVer": "x",
|
|
178
|
+
* "unixVer": "x"
|
|
179
|
+
* }
|
|
180
|
+
* },
|
|
181
|
+
* "web": {
|
|
182
|
+
* "uniVer": "x",
|
|
183
|
+
* "unixVer": "x"
|
|
184
|
+
* }
|
|
170
185
|
* }
|
|
171
186
|
* @example
|
|
172
187
|
```typescript
|
|
173
188
|
const channelManager = uni.getPushChannelManager();
|
|
174
189
|
channelManager.setPushChannel({
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
190
|
+
channelId: "test1",
|
|
191
|
+
channelDesc: "test1 desc",
|
|
192
|
+
soundName: "pushsound",
|
|
193
|
+
enableLights: true,
|
|
194
|
+
enableVibration: true,
|
|
195
|
+
importance: 4,
|
|
196
|
+
lockscreenVisibility: 1
|
|
182
197
|
})
|
|
183
198
|
const channels = channelManager.getAllChannels() as string[]
|
|
184
199
|
console.log("channels : " + channels);
|
|
185
200
|
```
|
|
186
201
|
*/
|
|
187
|
-
getPushChannelManager()
|
|
188
|
-
|
|
202
|
+
getPushChannelManager(): PushChannelManager;
|
|
203
|
+
|
|
189
204
|
/**
|
|
190
205
|
* createPushMessage()
|
|
191
206
|
* @description
|
|
@@ -194,156 +209,166 @@ export interface Uni {
|
|
|
194
209
|
* @return {void}
|
|
195
210
|
* @tutorial http://uniapp.dcloud.io/api/plugins/push.html#createpushmessage
|
|
196
211
|
* @uniPlatform {
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
* "app": {
|
|
213
|
+
* "android": {
|
|
214
|
+
* "osVer": "4.4",
|
|
215
|
+
* "uniVer": "√",
|
|
216
|
+
* "unixVer": "3.98"
|
|
217
|
+
* },
|
|
218
|
+
* "ios": {
|
|
219
|
+
* "osVer": "12.0",
|
|
220
|
+
* "uniVer": "√",
|
|
221
|
+
* "unixVer": "4.18"
|
|
222
|
+
* },
|
|
223
|
+
* "harmony": {
|
|
224
|
+
* "osVer": "3.0",
|
|
225
|
+
* "uniVer": "4.31",
|
|
226
|
+
* "unixVer": "x"
|
|
227
|
+
* }
|
|
228
|
+
* },
|
|
229
|
+
* "web": {
|
|
230
|
+
* "uniVer": "x",
|
|
231
|
+
* "unixVer": "x"
|
|
232
|
+
* }
|
|
213
233
|
* }
|
|
214
234
|
* @example
|
|
215
235
|
```typescript
|
|
216
236
|
uni.createPushMessage({
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
237
|
+
title: "标题",
|
|
238
|
+
content: "您有新的消息",
|
|
239
|
+
cover:true,
|
|
240
|
+
channelId: "test1",
|
|
241
|
+
when:1697623177000,
|
|
242
|
+
icon:"/static/icon.png",
|
|
243
|
+
delay:5,
|
|
244
|
+
payload:{
|
|
245
|
+
pkey:"pvalue1"
|
|
246
|
+
},
|
|
247
|
+
channelId:"message",
|
|
248
|
+
category : "IM",
|
|
249
|
+
success(res : CreatePushMessageSuccess) {
|
|
250
|
+
console.log("res: " + res);
|
|
251
|
+
}
|
|
232
252
|
});
|
|
233
253
|
```
|
|
234
254
|
*/
|
|
235
|
-
createPushMessage(options
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
255
|
+
createPushMessage(options: CreatePushMessageOptions): void;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* setAppBadgeNumber()
|
|
259
|
+
* @description 设置应用图标上显示的角标数字,注意:不同手机厂商的角标显示规则不同,有部分设备的rom版本不支持显示角标,另有部分rom需要在应用的通知管理里开启`桌面角标`配置,才可以设置角标成功。
|
|
260
|
+
* @param num - 要显示的角标数字值,参数为0则表示清除角标数字。
|
|
261
|
+
* @param options - 小米手机显示角标需要在系统消息中心显示一条通知,此参数用于设置通知的标题(title)和内容(content)。
|
|
262
|
+
* @return {void}
|
|
263
|
+
* @uniPlatform {
|
|
264
|
+
* "app": {
|
|
265
|
+
* "android": {
|
|
266
|
+
* "osVer": "5.0",
|
|
267
|
+
* "uniVer": "x",
|
|
268
|
+
* "unixVer": "4.25"
|
|
269
|
+
* },
|
|
270
|
+
* "ios": {
|
|
271
|
+
* "osVer": "12.0",
|
|
272
|
+
* "uniVer": "x",
|
|
273
|
+
* "unixVer": "4.25"
|
|
274
|
+
* },
|
|
275
|
+
* "harmony": {
|
|
276
|
+
* "osVer": "3.0",
|
|
277
|
+
* "uniVer": "4.31",
|
|
278
|
+
* "unixVer": "x"
|
|
279
|
+
* }
|
|
280
|
+
* },
|
|
281
|
+
* "web": {
|
|
282
|
+
* "uniVer": "x",
|
|
283
|
+
* "unixVer": "x"
|
|
284
|
+
* }
|
|
285
|
+
* }
|
|
286
|
+
*
|
|
262
287
|
* @example
|
|
263
288
|
```typescript
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
289
|
+
if (uni.getDeviceInfo().deviceBrand?.toLowerCase() == "xiaomi") {
|
|
290
|
+
uni.setAppBadgeNumber(1, {
|
|
291
|
+
title:"AppName",
|
|
292
|
+
content: "您有1条未读消息"
|
|
293
|
+
} as BadgeOptions)
|
|
294
|
+
} else {
|
|
295
|
+
uni.setAppBadgeNumber(5)
|
|
296
|
+
}
|
|
272
297
|
```
|
|
273
298
|
*/
|
|
274
|
-
setAppBadgeNumber(num
|
|
299
|
+
setAppBadgeNumber(num: number, options?: BadgeOptions | null): void;
|
|
275
300
|
}
|
|
276
301
|
|
|
277
|
-
export type GetPushClientId = (options
|
|
302
|
+
export type GetPushClientId = (options: GetPushClientIdOptions) => void;
|
|
278
303
|
export type GetPushClientIdSuccess = {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
304
|
+
/**
|
|
305
|
+
* 个推客户端推送id,对应uni-id-device表的push_clientid
|
|
306
|
+
*
|
|
307
|
+
* @uniPlatform {
|
|
308
|
+
* "app": {
|
|
309
|
+
* "android": {
|
|
310
|
+
* "osVer": "4.4",
|
|
311
|
+
* "uniVer": "√",
|
|
312
|
+
* "unixVer": "3.98"
|
|
313
|
+
* },
|
|
314
|
+
* "ios": {
|
|
315
|
+
* "osVer": "12.0",
|
|
316
|
+
* "uniVer": "√",
|
|
317
|
+
* "unixVer": "4.18"
|
|
318
|
+
* }
|
|
319
|
+
* },
|
|
320
|
+
* "web": {
|
|
321
|
+
* "uniVer": "x",
|
|
322
|
+
* "unixVer": "4.27"
|
|
323
|
+
* }
|
|
324
|
+
* }
|
|
325
|
+
*/
|
|
326
|
+
cid: string,
|
|
327
|
+
/**
|
|
328
|
+
* 错误描述
|
|
329
|
+
*
|
|
330
|
+
* @uniPlatform {
|
|
331
|
+
* "app": {
|
|
332
|
+
* "android": {
|
|
333
|
+
* "osVer": "4.4",
|
|
334
|
+
* "uniVer": "√",
|
|
335
|
+
* "unixVer": "3.98"
|
|
336
|
+
* },
|
|
337
|
+
* "ios": {
|
|
338
|
+
* "osVer": "12.0",
|
|
339
|
+
* "uniVer": "√",
|
|
340
|
+
* "unixVer": "4.18"
|
|
341
|
+
* }
|
|
342
|
+
* },
|
|
343
|
+
* "web": {
|
|
344
|
+
* "uniVer": "x",
|
|
345
|
+
* "unixVer": "4.27"
|
|
346
|
+
* }
|
|
347
|
+
* }
|
|
348
|
+
*/
|
|
349
|
+
errMsg: string
|
|
325
350
|
};
|
|
326
|
-
export type GetPushClientIdSuccessCallback = (result
|
|
351
|
+
export type GetPushClientIdSuccessCallback = (result: GetPushClientIdSuccess) => void;
|
|
327
352
|
export type GetPushClientIdFail = UniError;
|
|
328
|
-
export type GetPushClientIdFailCallback = (result
|
|
353
|
+
export type GetPushClientIdFailCallback = (result: GetPushClientIdFail) => void;
|
|
329
354
|
export type GetPushClientIdComplete = any;
|
|
330
|
-
export type GetPushClientIdCompleteCallback = (result
|
|
355
|
+
export type GetPushClientIdCompleteCallback = (result: GetPushClientIdComplete) => void;
|
|
331
356
|
export type GetPushClientIdOptions = {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
357
|
+
/**
|
|
358
|
+
* 接口调用成功的回调函数
|
|
359
|
+
* @defaultValue null
|
|
360
|
+
*/
|
|
361
|
+
success?: GetPushClientIdSuccessCallback | null,
|
|
362
|
+
/**
|
|
363
|
+
* 接口调用失败的回调函数
|
|
364
|
+
* @defaultValue null
|
|
365
|
+
*/
|
|
366
|
+
fail?: GetPushClientIdFailCallback | null,
|
|
367
|
+
/**
|
|
368
|
+
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
|
369
|
+
* @defaultValue null
|
|
370
|
+
*/
|
|
371
|
+
complete?: GetPushClientIdCompleteCallback | null
|
|
347
372
|
};
|
|
348
373
|
/**
|
|
349
374
|
* 事件类型
|
|
@@ -352,410 +377,410 @@ export type GetPushClientIdOptions = {
|
|
|
352
377
|
*/
|
|
353
378
|
export type OnPushMessageType = "click" | "receive";
|
|
354
379
|
|
|
355
|
-
export type OnPushMessageCallbackResult= {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
380
|
+
export type OnPushMessageCallbackResult = {
|
|
381
|
+
/**
|
|
382
|
+
* 事件类型
|
|
383
|
+
* @type{OnPushMessageType}
|
|
384
|
+
*
|
|
385
|
+
* @uniPlatform {
|
|
386
|
+
* "app": {
|
|
387
|
+
* "android": {
|
|
388
|
+
* "osVer": "4.4",
|
|
389
|
+
* "uniVer": "√",
|
|
390
|
+
* "unixVer": "3.98"
|
|
391
|
+
* },
|
|
392
|
+
* "ios": {
|
|
393
|
+
* "osVer": "12.0",
|
|
394
|
+
* "uniVer": "√",
|
|
395
|
+
* "unixVer": "4.18"
|
|
396
|
+
* }
|
|
397
|
+
* },
|
|
398
|
+
* "web": {
|
|
399
|
+
* "uniVer": "x",
|
|
400
|
+
* "unixVer": "4.27"
|
|
401
|
+
* }
|
|
402
|
+
* }
|
|
403
|
+
*/
|
|
404
|
+
type: OnPushMessageType,
|
|
405
|
+
/**
|
|
406
|
+
* 消息内容
|
|
407
|
+
*
|
|
408
|
+
* @uniPlatform {
|
|
409
|
+
* "app": {
|
|
410
|
+
* "android": {
|
|
411
|
+
* "osVer": "4.4",
|
|
412
|
+
* "uniVer": "√",
|
|
413
|
+
* "unixVer": "3.98"
|
|
414
|
+
* },
|
|
415
|
+
* "ios": {
|
|
416
|
+
* "osVer": "12.0",
|
|
417
|
+
* "uniVer": "√",
|
|
418
|
+
* "unixVer": "4.18"
|
|
419
|
+
* }
|
|
420
|
+
* },
|
|
421
|
+
* "web": {
|
|
422
|
+
* "uniVer": "x",
|
|
423
|
+
* "unixVer": "4.27"
|
|
424
|
+
* }
|
|
425
|
+
* }
|
|
426
|
+
*/
|
|
427
|
+
data: UTSJSONObject
|
|
403
428
|
};
|
|
404
429
|
|
|
405
|
-
export type OnPushMessageCallback = (result
|
|
406
|
-
export type OnPushMessage = (callback
|
|
407
|
-
export type OffPushMessage = (callback
|
|
430
|
+
export type OnPushMessageCallback = (result: OnPushMessageCallbackResult) => void;
|
|
431
|
+
export type OnPushMessage = (callback: OnPushMessageCallback) => void;
|
|
432
|
+
export type OffPushMessage = (callback: OnPushMessageCallback) => void;
|
|
408
433
|
|
|
409
434
|
|
|
410
435
|
export type GetChannelManager = () => ChannelManager;
|
|
411
436
|
export type SetPushChannelOptions = {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
437
|
+
/**
|
|
438
|
+
* 添加的声音文件,注意raw目录下必须要有 ,不传此字段将使用默认铃音。
|
|
439
|
+
* @defaultValue null
|
|
440
|
+
*/
|
|
441
|
+
soundName?: string | null,
|
|
442
|
+
/**
|
|
443
|
+
* 通知渠道id
|
|
444
|
+
*/
|
|
445
|
+
channelId: string,
|
|
446
|
+
/**
|
|
447
|
+
* 通知渠道描述
|
|
448
|
+
*/
|
|
449
|
+
channelDesc: string,
|
|
450
|
+
/**
|
|
451
|
+
* 呼吸灯闪烁
|
|
452
|
+
* @defaultValue false
|
|
453
|
+
*/
|
|
454
|
+
enableLights?: boolean | null,
|
|
455
|
+
/**
|
|
456
|
+
* 震动
|
|
457
|
+
* @defaultValue false
|
|
458
|
+
*/
|
|
459
|
+
enableVibration?: boolean | null,
|
|
460
|
+
/**
|
|
461
|
+
* 通知的重要性级别,可选范围IMPORTANCE_LOW:2、IMPORTANCE_DEFAULT:3、IMPORTANCE_HIGH:4 。
|
|
462
|
+
* @defaultValue 3
|
|
463
|
+
*/
|
|
464
|
+
importance?: number | null,
|
|
465
|
+
/**
|
|
466
|
+
* 锁屏可见性,可选范围VISIBILITY_PRIVATE:0、VISIBILITY_PUBLIC:1、VISIBILITY_SECRET:-1、VISIBILITY_NO_OVERRIDE:-1000。
|
|
467
|
+
* @defaultValue -1000
|
|
468
|
+
*/
|
|
469
|
+
lockscreenVisibility?: number | null
|
|
445
470
|
}
|
|
446
471
|
|
|
447
472
|
export interface ChannelManager {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
473
|
+
/**
|
|
474
|
+
* 设置推送渠道
|
|
475
|
+
*
|
|
476
|
+
* @uniPlatform {
|
|
477
|
+
* "app": {
|
|
478
|
+
* "android": {
|
|
479
|
+
* "osVer": "4.4",
|
|
480
|
+
* "uniVer": "√",
|
|
481
|
+
* "unixVer": "3.98"
|
|
482
|
+
* },
|
|
483
|
+
* "ios": {
|
|
484
|
+
* "osVer": "x",
|
|
485
|
+
* "uniVer": "x",
|
|
486
|
+
* "unixVer": "x"
|
|
487
|
+
* }
|
|
488
|
+
* },
|
|
489
|
+
* "web": {
|
|
490
|
+
* "uniVer": "x",
|
|
491
|
+
* "unixVer": "x"
|
|
492
|
+
* }
|
|
493
|
+
* }
|
|
494
|
+
*/
|
|
495
|
+
setPushChannel(options: SetPushChannelOptions): void;
|
|
496
|
+
/**
|
|
497
|
+
* 获取当前应用注册的所有的通知渠道。
|
|
498
|
+
*
|
|
499
|
+
* @uniPlatform {
|
|
500
|
+
* "app": {
|
|
501
|
+
* "android": {
|
|
502
|
+
* "osVer": "4.4",
|
|
503
|
+
* "uniVer": "√",
|
|
504
|
+
* "unixVer": "3.98"
|
|
505
|
+
* },
|
|
506
|
+
* "ios": {
|
|
507
|
+
* "osVer": "x",
|
|
508
|
+
* "uniVer": "x",
|
|
509
|
+
* "unixVer": "x"
|
|
510
|
+
* }
|
|
511
|
+
* },
|
|
512
|
+
* "web": {
|
|
513
|
+
* "uniVer": "x",
|
|
514
|
+
* "unixVer": "x"
|
|
515
|
+
* }
|
|
516
|
+
* }
|
|
517
|
+
*/
|
|
518
|
+
getAllChannels(): Array<string>;
|
|
494
519
|
}
|
|
495
520
|
|
|
496
521
|
export type PushChannelManager = ChannelManager
|
|
497
522
|
|
|
498
523
|
|
|
499
|
-
export type CreatePushMessage = (options
|
|
524
|
+
export type CreatePushMessage = (options: CreatePushMessageOptions) => void;
|
|
500
525
|
export type CreatePushMessageSuccess = {};
|
|
501
|
-
export type CreatePushMessageSuccessCallback = (result
|
|
526
|
+
export type CreatePushMessageSuccessCallback = (result: CreatePushMessageSuccess) => void;
|
|
502
527
|
export type CreatePushMessageFail = UniError;
|
|
503
|
-
export type CreatePushMessageFailCallback = (result
|
|
528
|
+
export type CreatePushMessageFailCallback = (result: CreatePushMessageFail) => void;
|
|
504
529
|
export type CreatePushMessageComplete = any;
|
|
505
|
-
export type CreatePushMessageCompleteCallback = (result
|
|
530
|
+
export type CreatePushMessageCompleteCallback = (result: CreatePushMessageComplete) => void;
|
|
506
531
|
export type CreatePushMessageOptions = {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
532
|
+
/**
|
|
533
|
+
* 是否覆盖上一次提示的消息
|
|
534
|
+
* @type boolean
|
|
535
|
+
* @defaultValue false
|
|
536
|
+
* @uniPlatform {
|
|
537
|
+
* "app": {
|
|
538
|
+
* "android": {
|
|
539
|
+
* "osVer": "4.4",
|
|
540
|
+
* "uniVer": "√",
|
|
541
|
+
* "unixVer": "3.98"
|
|
542
|
+
* },
|
|
543
|
+
* "ios": {
|
|
544
|
+
* "osVer": "12.0",
|
|
545
|
+
* "uniVer": "√",
|
|
546
|
+
* "unixVer": "4.18"
|
|
547
|
+
* }
|
|
548
|
+
* },
|
|
549
|
+
* "web": {
|
|
550
|
+
* "uniVer": "x",
|
|
551
|
+
* "unixVer": "x"
|
|
552
|
+
* }
|
|
553
|
+
* }
|
|
554
|
+
*/
|
|
555
|
+
cover?: boolean | null,
|
|
556
|
+
/**
|
|
557
|
+
* 提示消息延迟显示的时间,单位为s
|
|
558
|
+
* @defaultValue 0
|
|
559
|
+
* @uniPlatform {
|
|
560
|
+
* "app": {
|
|
561
|
+
* "android": {
|
|
562
|
+
* "osVer": "4.4",
|
|
563
|
+
* "uniVer": "√",
|
|
564
|
+
* "unixVer": "3.98"
|
|
565
|
+
* },
|
|
566
|
+
* "ios": {
|
|
567
|
+
* "osVer": "12.0",
|
|
568
|
+
* "uniVer": "√",
|
|
569
|
+
* "unixVer": "4.18"
|
|
570
|
+
* }
|
|
571
|
+
* },
|
|
572
|
+
* "web": {
|
|
573
|
+
* "uniVer": "x",
|
|
574
|
+
* "unixVer": "x"
|
|
575
|
+
* }
|
|
576
|
+
* }
|
|
577
|
+
*/
|
|
578
|
+
delay?: number | null,
|
|
579
|
+
/**
|
|
580
|
+
* 推送消息的图标
|
|
581
|
+
* @defaultValue null
|
|
582
|
+
* @uniPlatform {
|
|
583
|
+
* "app": {
|
|
584
|
+
* "android": {
|
|
585
|
+
* "osVer": "4.4",
|
|
586
|
+
* "uniVer": "√",
|
|
587
|
+
* "unixVer": "3.98"
|
|
588
|
+
* },
|
|
589
|
+
* "ios": {
|
|
590
|
+
* "osVer": "12.0",
|
|
591
|
+
* "uniVer": "x",
|
|
592
|
+
* "unixVer": "x"
|
|
593
|
+
* }
|
|
594
|
+
* },
|
|
595
|
+
* "web": {
|
|
596
|
+
* "uniVer": "x",
|
|
597
|
+
* "unixVer": "x"
|
|
598
|
+
* }
|
|
599
|
+
* }
|
|
600
|
+
*/
|
|
601
|
+
icon?: string | null,
|
|
602
|
+
/**
|
|
603
|
+
* 推送消息的提示音
|
|
604
|
+
* - system: 使用系统通知提示音(默认值)
|
|
605
|
+
* - none: 不使用提示音
|
|
606
|
+
* @type 'system' | 'none'
|
|
607
|
+
* @defaultValue "system"
|
|
608
|
+
* @uniPlatform {
|
|
609
|
+
* "app": {
|
|
610
|
+
* "android": {
|
|
611
|
+
* "osVer": "4.4",
|
|
612
|
+
* "uniVer": "√",
|
|
613
|
+
* "unixVer": "3.98"
|
|
614
|
+
* },
|
|
615
|
+
* "ios": {
|
|
616
|
+
* "osVer": "12.0",
|
|
617
|
+
* "uniVer": "√",
|
|
618
|
+
* "unixVer": "4.18"
|
|
619
|
+
* }
|
|
620
|
+
* },
|
|
621
|
+
* "web": {
|
|
622
|
+
* "uniVer": "x",
|
|
623
|
+
* "unixVer": "x"
|
|
624
|
+
* }
|
|
625
|
+
* }
|
|
626
|
+
*/
|
|
627
|
+
sound?: string | null,
|
|
628
|
+
/**
|
|
629
|
+
* 推送消息的标题
|
|
630
|
+
* @defaultValue App的名称
|
|
631
|
+
* @uniPlatform {
|
|
632
|
+
* "app": {
|
|
633
|
+
* "android": {
|
|
634
|
+
* "osVer": "4.4",
|
|
635
|
+
* "uniVer": "√",
|
|
636
|
+
* "unixVer": "3.98"
|
|
637
|
+
* },
|
|
638
|
+
* "ios": {
|
|
639
|
+
* "osVer": "12.0",
|
|
640
|
+
* "uniVer": "√",
|
|
641
|
+
* "unixVer": "4.18"
|
|
642
|
+
* }
|
|
643
|
+
* },
|
|
644
|
+
* "web": {
|
|
645
|
+
* "uniVer": "x",
|
|
646
|
+
* "unixVer": "x"
|
|
647
|
+
* }
|
|
648
|
+
* }
|
|
649
|
+
*/
|
|
650
|
+
title?: string | null,
|
|
651
|
+
/**
|
|
652
|
+
* 消息显示的内容,在系统通知中心中显示的文本内容。鸿蒙系统中,此字段为必填字段。
|
|
653
|
+
*
|
|
654
|
+
* @uniPlatform {
|
|
655
|
+
* "app": {
|
|
656
|
+
* "android": {
|
|
657
|
+
* "osVer": "4.4",
|
|
658
|
+
* "uniVer": "√",
|
|
659
|
+
* "unixVer": "3.98"
|
|
660
|
+
* },
|
|
661
|
+
* "ios": {
|
|
662
|
+
* "osVer": "12.0",
|
|
663
|
+
* "uniVer": "√",
|
|
664
|
+
* "unixVer": "4.18"
|
|
665
|
+
* }
|
|
666
|
+
* },
|
|
667
|
+
* "web": {
|
|
668
|
+
* "uniVer": "x",
|
|
669
|
+
* "unixVer": "x"
|
|
670
|
+
* }
|
|
671
|
+
* }
|
|
672
|
+
*/
|
|
673
|
+
content: string,
|
|
674
|
+
/**
|
|
675
|
+
* 消息承载的数据,可根据业务逻辑自定义数据格式,在点击通知消息时`onPushMessage`回调中会返回此字段的数据。
|
|
676
|
+
* @defaultValue null
|
|
677
|
+
* @uniPlatform {
|
|
678
|
+
* "app": {
|
|
679
|
+
* "android": {
|
|
680
|
+
* "osVer": "4.4",
|
|
681
|
+
* "uniVer": "√",
|
|
682
|
+
* "unixVer": "3.98"
|
|
683
|
+
* },
|
|
684
|
+
* "ios": {
|
|
685
|
+
* "osVer": "12.0",
|
|
686
|
+
* "uniVer": "√",
|
|
687
|
+
* "unixVer": "4.18"
|
|
688
|
+
* }
|
|
689
|
+
* },
|
|
690
|
+
* "web": {
|
|
691
|
+
* "uniVer": "x",
|
|
692
|
+
* "unixVer": "x"
|
|
693
|
+
* }
|
|
694
|
+
* }
|
|
695
|
+
*/
|
|
696
|
+
payload?: any | null,
|
|
697
|
+
/**
|
|
698
|
+
* 消息上显示的提示时间,需要传入时间戳。
|
|
699
|
+
* @defaultValue 当前时间
|
|
700
|
+
*
|
|
701
|
+
* @uniPlatform {
|
|
702
|
+
* "app": {
|
|
703
|
+
* "android": {
|
|
704
|
+
* "osVer": "4.4",
|
|
705
|
+
* "uniVer": "√",
|
|
706
|
+
* "unixVer": "3.98"
|
|
707
|
+
* },
|
|
708
|
+
* "ios": {
|
|
709
|
+
* "osVer": "x",
|
|
710
|
+
* "uniVer": "x",
|
|
711
|
+
* "unixVer": "x"
|
|
712
|
+
* }
|
|
713
|
+
* },
|
|
714
|
+
* "web": {
|
|
715
|
+
* "uniVer": "x",
|
|
716
|
+
* "unixVer": "x"
|
|
717
|
+
* }
|
|
718
|
+
* }
|
|
719
|
+
*/
|
|
720
|
+
when?: number | null,
|
|
721
|
+
/**
|
|
722
|
+
* 渠道id,Android特有字段,[通知渠道介绍](https://developer.android.com/develop/ui/views/notifications/channels?hl=zh-cn),
|
|
723
|
+
* 创建通知渠道请使用`getPushChannelManager`获取PushChannelManager对象,调用`setPushChannel`方法配置渠道。
|
|
724
|
+
* @defaultValue "DcloudChannelID"
|
|
725
|
+
* @uniPlatform {
|
|
726
|
+
* "app": {
|
|
727
|
+
* "android": {
|
|
728
|
+
* "osVer": "4.4",
|
|
729
|
+
* "uniVer": "√",
|
|
730
|
+
* "unixVer": "3.98"
|
|
731
|
+
* },
|
|
732
|
+
* "ios": {
|
|
733
|
+
* "osVer": "x",
|
|
734
|
+
* "uniVer": "x",
|
|
735
|
+
* "unixVer": "x"
|
|
736
|
+
* }
|
|
737
|
+
* },
|
|
738
|
+
* "web": {
|
|
739
|
+
* "uniVer": "x",
|
|
740
|
+
* "unixVer": "x"
|
|
741
|
+
* }
|
|
742
|
+
* }
|
|
743
|
+
*/
|
|
744
|
+
channelId?: string | null,
|
|
745
|
+
/**
|
|
746
|
+
* 通知类别,Android特有字段,[通知渠道介绍](https://developer.android.com/develop/ui/views/notifications/channels?hl=zh-cn),
|
|
747
|
+
* 标识通知的类别,应用场景为对于离线推送厂商配置的支持,比如[华为消息分类](https://developer.huawei.com/consumer/cn/doc/HMSCore-Guides/message-classification-0000001149358835#section5101818813)
|
|
748
|
+
* @defaultValue null
|
|
749
|
+
* @uniPlatform {
|
|
750
|
+
* "app": {
|
|
751
|
+
* "android": {
|
|
752
|
+
* "osVer": "4.4",
|
|
753
|
+
* "uniVer": "√",
|
|
754
|
+
* "unixVer": "3.98"
|
|
755
|
+
* },
|
|
756
|
+
* "ios": {
|
|
757
|
+
* "osVer": "x",
|
|
758
|
+
* "uniVer": "x",
|
|
759
|
+
* "unixVer": "x"
|
|
760
|
+
* }
|
|
761
|
+
* },
|
|
762
|
+
* "web": {
|
|
763
|
+
* "uniVer": "x",
|
|
764
|
+
* "unixVer": "x"
|
|
765
|
+
* }
|
|
766
|
+
* }
|
|
767
|
+
*/
|
|
768
|
+
category?: string | null,
|
|
769
|
+
/**
|
|
770
|
+
* 接口调用成功的回调函数
|
|
771
|
+
* @defaultValue null
|
|
772
|
+
*/
|
|
773
|
+
success?: CreatePushMessageSuccessCallback | null,
|
|
774
|
+
/**
|
|
775
|
+
* 接口调用失败的回调函数
|
|
776
|
+
* @defaultValue null
|
|
777
|
+
*/
|
|
778
|
+
fail?: CreatePushMessageFailCallback | null,
|
|
779
|
+
/**
|
|
780
|
+
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
|
781
|
+
* @defaultValue null
|
|
782
|
+
*/
|
|
783
|
+
complete?: CreatePushMessageCompleteCallback | null
|
|
759
784
|
};
|
|
760
785
|
|
|
761
786
|
|
|
@@ -764,46 +789,46 @@ export type BadgeOptions = {
|
|
|
764
789
|
* 消息的标题
|
|
765
790
|
* @defaultValue 应用的名称
|
|
766
791
|
* @uniPlatform {
|
|
767
|
-
*
|
|
768
|
-
*
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
*
|
|
792
|
+
* "app": {
|
|
793
|
+
* "android": {
|
|
794
|
+
* "osVer": "4.4",
|
|
795
|
+
* "uniVer": "x",
|
|
796
|
+
* "unixVer": "4.25"
|
|
797
|
+
* },
|
|
798
|
+
* "ios": {
|
|
799
|
+
* "osVer": "12.0",
|
|
800
|
+
* "uniVer": "x",
|
|
801
|
+
* "unixVer": "4.25"
|
|
802
|
+
* }
|
|
803
|
+
* },
|
|
804
|
+
* "web": {
|
|
805
|
+
* "uniVer": "x",
|
|
806
|
+
* "unixVer": "x"
|
|
807
|
+
* }
|
|
783
808
|
* }
|
|
784
809
|
*/
|
|
785
|
-
title
|
|
810
|
+
title?: string | null,
|
|
786
811
|
/**
|
|
787
812
|
* 消息的内容
|
|
788
813
|
* @defaultValue '您有x条未读消息',其中x为设置的角标数字值。
|
|
789
814
|
* @uniPlatform {
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
799
|
-
*
|
|
800
|
-
*
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
-
*
|
|
804
|
-
*
|
|
805
|
-
*
|
|
815
|
+
* "app": {
|
|
816
|
+
* "android": {
|
|
817
|
+
* "osVer": "4.4",
|
|
818
|
+
* "uniVer": "x",
|
|
819
|
+
* "unixVer": "4.25"
|
|
820
|
+
* },
|
|
821
|
+
* "ios": {
|
|
822
|
+
* "osVer": "12.0",
|
|
823
|
+
* "uniVer": "x",
|
|
824
|
+
* "unixVer": "4.25"
|
|
825
|
+
* }
|
|
826
|
+
* },
|
|
827
|
+
* "web": {
|
|
828
|
+
* "uniVer": "x",
|
|
829
|
+
* "unixVer": "x"
|
|
830
|
+
* }
|
|
806
831
|
* }
|
|
807
832
|
*/
|
|
808
|
-
content
|
|
809
|
-
}
|
|
833
|
+
content?: string | null
|
|
834
|
+
}
|