@dcloudio/uni-app-x 0.7.22 → 0.7.23

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.
Files changed (41) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +16 -16
  3. package/types/native/CanvasRenderingContext2D.d.ts +1697 -111
  4. package/types/native/IUniElement.d.ts +73 -4
  5. package/types/native/Path2D.d.ts +41 -13
  6. package/types/native/UniProvider.d.ts +17 -0
  7. package/types/native/UniVideoElement.d.ts +13 -5
  8. package/types/native/global.d.ts +18 -0
  9. package/types/uni/uts-plugin-api/global.d.ts +1 -1
  10. package/types/uni/uts-plugin-api/index.d.ts +1 -1
  11. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +14 -4
  12. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/global.d.ts +2 -2
  13. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/index.d.ts +1 -1
  14. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +2 -2
  15. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +78 -14
  16. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +9 -3
  17. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +56 -15
  18. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +191 -65
  19. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +3 -3
  20. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +7 -7
  21. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +614 -169
  22. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +12 -6
  23. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +6 -3
  24. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +249 -103
  25. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +9 -2
  26. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +49 -11
  27. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +33 -16
  28. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +80 -33
  29. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +63 -17
  30. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +307 -20
  31. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +213 -21
  32. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +554 -24
  33. package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/global.d.ts +22 -0
  34. package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/index.d.ts +10 -0
  35. package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/interface.d.ts +120 -0
  36. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +28 -8
  37. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +766 -364
  38. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +14 -4
  39. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/global.d.ts +0 -12
  40. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/index.d.ts +0 -5
  41. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/interface.d.ts +0 -50
@@ -16,7 +16,12 @@ export type GetSystemSettingResult = {
16
16
  * "osVer": "12.0",
17
17
  * "uniVer": "√",
18
18
  * "unixVer": "4.11"
19
- * }
19
+ * },
20
+ * "harmony": {
21
+ * "osVer": "3.0",
22
+ * "uniVer": "4.25",
23
+ * "unixVer": "x"
24
+ * }
20
25
  * }
21
26
  * }
22
27
  */
@@ -36,11 +41,16 @@ export type GetSystemSettingResult = {
36
41
  * "osVer": "12.0",
37
42
  * "uniVer": "√",
38
43
  * "unixVer": "4.11"
39
- * }
44
+ * },
45
+ * "harmony": {
46
+ * "osVer": "3.0",
47
+ * "uniVer": "4.25",
48
+ * "unixVer": "x"
49
+ * }
40
50
  * }
41
51
  * }
42
52
  */
43
- bluetoothError?: string,
53
+ bluetoothError?: string | null,
44
54
  /**
45
55
  * 位置是否开启
46
56
  *
@@ -56,7 +66,12 @@ export type GetSystemSettingResult = {
56
66
  * "osVer": "12.0",
57
67
  * "uniVer": "√",
58
68
  * "unixVer": "4.11"
59
- * }
69
+ * },
70
+ * "harmony": {
71
+ * "osVer": "3.0",
72
+ * "uniVer": "4.25",
73
+ * "unixVer": "x"
74
+ * }
60
75
  * }
61
76
  * }
62
77
  */
@@ -76,7 +91,12 @@ export type GetSystemSettingResult = {
76
91
  * "osVer": "12.0",
77
92
  * "uniVer": "√",
78
93
  * "unixVer": "4.11"
79
- * }
94
+ * },
95
+ * "harmony": {
96
+ * "osVer": "3.0",
97
+ * "uniVer": "4.25",
98
+ * "unixVer": "x"
99
+ * }
80
100
  * }
81
101
  * }
82
102
  */
@@ -96,11 +116,16 @@ export type GetSystemSettingResult = {
96
116
  * "osVer": "x",
97
117
  * "uniVer": "x",
98
118
  * "unixVer": "x"
99
- * }
119
+ * },
120
+ * "harmony": {
121
+ * "osVer": "3.0",
122
+ * "uniVer": "4.25",
123
+ * "unixVer": "x"
124
+ * }
100
125
  * }
101
126
  * }
102
127
  */
103
- wifiError?: string,
128
+ wifiError?: string | null,
104
129
  /**
105
130
  * 设备方向
106
131
  *
@@ -116,11 +141,24 @@ export type GetSystemSettingResult = {
116
141
  * "osVer": "12.0",
117
142
  * "uniVer": "√",
118
143
  * "unixVer": "4.11"
119
- * }
144
+ * },
145
+ * "harmony": {
146
+ * "osVer": "3.0",
147
+ * "uniVer": "4.25",
148
+ * "unixVer": "x"
149
+ * }
120
150
  * }
121
151
  * }
122
152
  */
123
- deviceOrientation : 'portrait' | 'landscape',
153
+ deviceOrientation :
154
+ /**
155
+ * 纵向
156
+ */
157
+ 'portrait' |
158
+ /**
159
+ * 横向
160
+ */
161
+ 'landscape',
124
162
  }
125
163
 
126
164
 
@@ -150,8 +188,8 @@ export interface Uni {
150
188
  * "unixVer": "4.11"
151
189
  * },
152
190
  * "harmony": {
153
- * "osVer": "x",
154
- * "uniVer": "x",
191
+ * "osVer": "3.0",
192
+ * "uniVer": "4.25",
155
193
  * "unixVer": "x"
156
194
  * }
157
195
  * },
@@ -5,24 +5,41 @@ export type LoadFontFaceOptionDesc = {
5
5
  }
6
6
  /**
7
7
  * 错误码
8
- * - 4: 框架内部异常
9
- * - 99: page is not ready
10
- * - 101: 参数错误
11
- * - 100001: family is null
12
- * - 100002: source is null
13
- * - 200001: local font not found
14
- * - 300001: same source task is loading
15
- * - 300002: download fail
16
8
  */
17
9
  export type LoadFontFaceErrCode =
18
- | 4
19
- | 99
20
- | 101
21
- | 100001
22
- | 100002
23
- | 200001
24
- | 300001
25
- | 300002
10
+ /**
11
+ * 框架内部异常
12
+ */
13
+ 4 |
14
+ /**
15
+ * page is not ready
16
+ */
17
+ 99 |
18
+ /**
19
+ * 参数错误
20
+ */
21
+ 101 |
22
+ /**
23
+ * family is null
24
+ */
25
+ 100001 |
26
+ /**
27
+ * source is null
28
+ */
29
+ 100002 |
30
+ /**
31
+ * local font not found
32
+ */
33
+ 200001 |
34
+ /**
35
+ * same source task is loading
36
+ */
37
+ 300001 |
38
+ /**
39
+ * download fail
40
+ */
41
+ 300002;
42
+
26
43
  export interface LoadFontFaceFail extends IUniError {
27
44
  errCode: LoadFontFaceErrCode
28
45
  }
@@ -10,19 +10,48 @@ export type MediaOrientation =
10
10
 
11
11
  /**
12
12
  * 错误码
13
- * - 1101001 用户取消
14
- * - 1101002 urls至少包含一张图片地址
15
- * - 1101003 文件不存在
16
- * - 1101004 图片加载失败
17
- * - 1101005 未获取权限
18
- * - 1101006 图片或视频保存失败
19
- * - 1101007 图片裁剪失败
20
- * - 1101008 拍照或录像失败
21
- * - 1101009 图片压缩失败
22
- * - 1101010 其他错误
23
13
  */
24
-
25
- export type MediaErrorCode = 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;
14
+ export type MediaErrorCode =
15
+ /**
16
+ * 用户取消
17
+ */
18
+ 1101001 |
19
+ /**
20
+ * urls至少包含一张图片地址
21
+ */
22
+ 1101002 |
23
+ /**
24
+ * 文件不存在
25
+ */
26
+ 1101003 |
27
+ /**
28
+ * 图片加载失败
29
+ */
30
+ 1101004 |
31
+ /**
32
+ * 未获取权限
33
+ */
34
+ 1101005 |
35
+ /**
36
+ * 图片或视频保存失败
37
+ */
38
+ 1101006 |
39
+ /**
40
+ * 图片裁剪失败
41
+ */
42
+ 1101007 |
43
+ /**
44
+ * 拍照或录像失败
45
+ */
46
+ 1101008 |
47
+ /**
48
+ * 图片压缩失败
49
+ */
50
+ 1101009 |
51
+ /**
52
+ * 其他错误
53
+ */
54
+ 1101010;
26
55
 
27
56
  /**
28
57
  * 图片或视频操作失败的错误回调
@@ -70,12 +99,12 @@ export type ChooseImageCropOptions = {
70
99
  * 取值范围为1-100,数值越小,质量越低(仅对jpg格式有效)。默认值为80。
71
100
  * @defaultValue 80
72
101
  */
73
- quality : (number) | null;
102
+ quality ?: (number) | null;
74
103
  /**
75
104
  * 是否将width和height作为裁剪保存图片真实的像素值。默认值为true。注:设置为false时在裁剪编辑界面显示图片的像素值,设置为true时不显示。
76
105
  * @type boolean
77
106
  */
78
- resize : (boolean) | null;
107
+ resize ?: (boolean) | null;
79
108
  }
80
109
 
81
110
  export type ChooseImageOptions = {
@@ -118,11 +147,15 @@ export type ChooseImageOptions = {
118
147
  * "unixVer": "x"
119
148
  * },
120
149
  * "harmony": {
121
- * "osVer": "3.0",
122
- * "uniVer": "4.23",
150
+ * "osVer": "x",
151
+ * "uniVer": "x",
123
152
  * "unixVer": "x"
124
153
  * }
125
- * }
154
+ * },
155
+ * "web": {
156
+ * "uniVer": "2.9.9",
157
+ * "unixVer": "4.0"
158
+ * }
126
159
  * }
127
160
  */
128
161
  extension ?: (string[]) | null,
@@ -131,8 +164,8 @@ export type ChooseImageOptions = {
131
164
  * @uniPlatform {
132
165
  * "app":{
133
166
  * "harmony": {
134
- * "osVer": "3.0",
135
- * "uniVer": "4.23",
167
+ * "osVer": "x",
168
+ * "uniVer": "x",
136
169
  * "unixVer": "x"
137
170
  * }
138
171
  * },
@@ -225,10 +258,7 @@ export type PreviewImageOptions = {
225
258
  showmenu ?: boolean | null,
226
259
  /**
227
260
  * 图片指示器样式
228
- * - default: 底部圆点指示器
229
- * - number: 顶部数字指示器
230
- * - none: 不显示指示器
231
- * @type 'default' | 'number' | 'none'
261
+ *
232
262
  * @uniPlatform {
233
263
  * "app": {
234
264
  * "harmony": {
@@ -239,7 +269,20 @@ export type PreviewImageOptions = {
239
269
  * }
240
270
  * }
241
271
  */
242
- indicator ?: string | null,
272
+ indicator ?:
273
+ /**
274
+ * 底部圆点指示器
275
+ */
276
+ 'default' |
277
+ /**
278
+ * 顶部数字指示器
279
+ */
280
+ 'number' |
281
+ /**
282
+ * 不显示指示器
283
+ */
284
+ 'none' |
285
+ null,
243
286
  /**
244
287
  * 是否可循环预览
245
288
  * @type boolean
@@ -536,9 +579,7 @@ export type ChooseVideoOptions = {
536
579
  maxDuration ?: number | null,
537
580
  /**
538
581
  * 摄像切换
539
- * - front: 前置摄像头
540
- * - back: 后置摄像头
541
- * @type 'front' | 'back'
582
+ *
542
583
  * @uniPlatform {
543
584
  * "app": {
544
585
  * "harmony": {
@@ -553,7 +594,15 @@ export type ChooseVideoOptions = {
553
594
  * }
554
595
  * }
555
596
  */
556
- camera ?: string | null,
597
+ camera ?:
598
+ /**
599
+ * 前置摄像头
600
+ */
601
+ 'front' |
602
+ /**
603
+ * 后置摄像头
604
+ */
605
+ 'back' | null,
557
606
  /**
558
607
  * 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。
559
608
  * @uniPlatform {
@@ -752,9 +801,7 @@ export type CompressVideoOptions = {
752
801
  src : string.VideoURIString,
753
802
  /**
754
803
  * 压缩质量
755
- * - low: 低
756
- * - medium: 中
757
- * - high: 高
804
+ *
758
805
  * @type 'low' | 'medium' | 'high'
759
806
  */
760
807
  quality ?: string | null,
@@ -1134,8 +1181,8 @@ export interface Uni {
1134
1181
  * "unixVer": "4.25"
1135
1182
  * },
1136
1183
  * "harmony": {
1137
- * "osVer": "x",
1138
- * "uniVer": "x",
1184
+ * "osVer": "3.0",
1185
+ * "uniVer": "4.25",
1139
1186
  * "unixVer": "x"
1140
1187
  * }
1141
1188
  * },
@@ -355,28 +355,74 @@ export type RequestSuccess<T> = {
355
355
 
356
356
  /**
357
357
  * 请求方法
358
- * - GET GET方法请求一个指定资源的表示形式,使用 GET 的请求应该只被用于获取数据。
359
- * - POST POST方法用于将实体提交到指定的资源,通常导致在服务器上的状态变化或副作用。
360
- * - PUT PUT方法用有效载荷请求替换目标资源的所有当前表示。
361
- * - PATCH PATCH方法用于对资源应用部分修改。
362
- * - DELETE DELETE方法删除指定的资源。
363
- * - HEAD HEAD方法请求一个与GET请求的响应相同的响应,但没有响应体。
364
- * - OPTIONS OPTIONS 方法用于描述目标资源的通信选项。
365
358
  */
366
- export type RequestMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
359
+ export type RequestMethod =
360
+ /**
361
+ * GET方法请求一个指定资源的表示形式,使用 GET 的请求应该只被用于获取数据。
362
+ */
363
+ "GET" |
364
+ /**
365
+ * POST方法用于将实体提交到指定的资源,通常导致在服务器上的状态变化或副作用。
366
+ */
367
+ "POST" |
368
+ /**
369
+ * PUT方法用有效载荷请求替换目标资源的所有当前表示。
370
+ */
371
+ "PUT" |
372
+ /**
373
+ * PATCH方法用于对资源应用部分修改。
374
+ */
375
+ "PATCH" |
376
+ /**
377
+ * DELETE方法删除指定的资源。
378
+ */
379
+ "DELETE" |
380
+ /**
381
+ * HEAD方法请求一个与GET请求的响应相同的响应,但没有响应体。
382
+ */
383
+ "HEAD" |
384
+ /**
385
+ * OPTIONS 方法用于描述目标资源的通信选项。
386
+ */
387
+ "OPTIONS";
367
388
 
368
389
  /**
369
390
  * 错误码
370
- * - 5 接口超时
371
- * - 1000 服务端系统错误
372
- * - 100001 json数据解析错误
373
- * - 100002 错误信息json解析失败
374
- * - 600003 网络中断
375
- * - 600008 data参数类型不合法
376
- * - 600009 URL格式不合法
377
- * - 602001 request系统错误
378
391
  */
379
- export type RequestErrorCode = 5 | 1000 | 100001 | 100002 | 600003 | 600008 | 600009 | 602001;
392
+ export type RequestErrorCode =
393
+ /**
394
+ * 接口超时
395
+ */
396
+ 5 |
397
+ /**
398
+ * 服务端系统错误
399
+ */
400
+ 1000 |
401
+ /**
402
+ * json数据解析错误
403
+ */
404
+ 100001 |
405
+ /**
406
+ * 错误信息json解析失败
407
+ */
408
+ 100002 |
409
+ /**
410
+ * 网络中断
411
+ */
412
+ 600003 |
413
+ /**
414
+ * data参数类型不合法
415
+ */
416
+ 600008 |
417
+ /**
418
+ * URL格式不合法
419
+ */
420
+ 600009 |
421
+ /**
422
+ * request系统错误
423
+ */
424
+ 602001;
425
+
380
426
  /**
381
427
  * 网络请求失败的错误回调参数
382
428
  */