@dcloudio/uni-app-x 0.6.4 → 0.6.6

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 (32) hide show
  1. package/package.json +3 -3
  2. package/types/app.d.ts +843 -842
  3. package/types/index.d.ts +1 -0
  4. package/types/native/Element.d.ts +18 -1
  5. package/types/native/IDocument.d.ts +12 -0
  6. package/types/native/IPage.d.ts +2 -1
  7. package/types/native/SnapshotOptions.d.ts +4 -4
  8. package/types/native/WebViewStyles.d.ts +1 -1
  9. package/types/page.d.ts +1593 -1587
  10. package/types/process.d.ts +5 -0
  11. package/types/uni/env/index.d.ts +64 -0
  12. package/types/uni/index.d.ts +2 -1
  13. package/types/uni/uts-plugin-api/index.d.ts +2 -2
  14. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +66 -0
  15. package/types/uni/uts-plugin-api/lib/{uni-file-manager → uni-fileSystemManager}/utssdk/interface.d.ts +87 -11
  16. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +1 -1
  17. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +24 -0
  18. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/interface.d.ts +76 -0
  19. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +16 -7
  20. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +6 -6
  21. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +9 -9
  22. package/types/uni/uts-plugin-biz/index.d.ts +3 -0
  23. package/types/uni/{uts-plugin-modules → uts-plugin-biz}/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +2 -1
  24. package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-push/utssdk/interface.d.ts +1 -1
  25. package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-verify/utssdk/index.d.ts +2 -0
  26. package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-verify/utssdk/interface.d.ts +7 -3
  27. package/types/uni-cloud/interface.d.ts +21 -6
  28. package/types/uni-cloud/unicloud-db/index.ts +314 -0
  29. package/uts-plugin.d.ts +2 -0
  30. package/types/uni/uts-plugin-modules/index.d.ts +0 -1
  31. /package/types/uni/{uts-plugin-modules → uts-plugin-biz}/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +0 -0
  32. /package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-push/utssdk/index.d.ts +0 -0
@@ -0,0 +1,5 @@
1
+ declare const process: {
2
+ env: {
3
+ NODE_ENV: 'development' | 'production'
4
+ }
5
+ }
@@ -0,0 +1,64 @@
1
+ interface Uni {
2
+
3
+ env : {
4
+
5
+ /**
6
+ * 应用专属存储空间的外置存储空间根目录下的files目录
7
+ * @uniPlatform {
8
+ * "app": {
9
+ * "android": {
10
+ * "osVer": "5.0",
11
+ * "uniVer": "x",
12
+ * "unixVer": "3.99"
13
+ * },
14
+ * "ios": {
15
+ * "osVer": "x",
16
+ * "uniVer": "x",
17
+ * "unixVer": "x"
18
+ * }
19
+ * }
20
+ * }
21
+ */
22
+ USER_DATA_PATH : "unifile://usr/",
23
+ /**
24
+ * 应用专属存储空间的外置存储空间根目录下的cache目录
25
+ * @uniPlatform {
26
+ * "app": {
27
+ * "android": {
28
+ * "osVer": "5.0",
29
+ * "uniVer": "x",
30
+ * "unixVer": "3.99"
31
+ * },
32
+ * "ios": {
33
+ * "osVer": "x",
34
+ * "uniVer": "x",
35
+ * "unixVer": "x"
36
+ * }
37
+ * }
38
+ * }
39
+ */
40
+ CACHE_PATH : "unifile://cache/",
41
+ /**
42
+ * 应用专属存储空间的外置存储空间根目录(caches/files)
43
+ * @uniPlatform {
44
+ * "app": {
45
+ * "android": {
46
+ * "osVer": "5.0",
47
+ * "uniVer": "x",
48
+ * "unixVer": "3.99"
49
+ * },
50
+ * "ios": {
51
+ * "osVer": "x",
52
+ * "uniVer": "x",
53
+ * "unixVer": "x"
54
+ * }
55
+ * }
56
+ * }
57
+ */
58
+ SANDBOX_PATH : "unifile://sandbox/",
59
+
60
+ }
61
+
62
+ }
63
+
64
+
@@ -1,5 +1,6 @@
1
1
  /// <reference path='./base/index.d.ts' />
2
2
  /// <reference path='./core/index.d.ts' />
3
+ /// <reference path='./env/index.d.ts' />
3
4
  /// <reference path='./uts-plugin-api/index.d.ts' />
4
5
  /// <reference path='./uts-plugin-component/index.d.ts' />
5
- /// <reference path='./uts-plugin-modules/index.d.ts' />
6
+ /// <reference path='./uts-plugin-biz/index.d.ts' />
@@ -1,11 +1,10 @@
1
1
  /// <reference path='./lib/uni-websocket/utssdk/index.d.ts' />
2
- /// <reference path='./lib/uni-verify/utssdk/index.d.ts' />
3
2
  /// <reference path='./lib/uni-storage/utssdk/index.d.ts' />
4
- /// <reference path='./lib/uni-push/utssdk/index.d.ts' />
5
3
  /// <reference path='./lib/uni-prompt/utssdk/index.d.ts' />
6
4
  /// <reference path='./lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts' />
7
5
  /// <reference path='./lib/uni-network/utssdk/index.d.ts' />
8
6
  /// <reference path='./lib/uni-media/utssdk/index.d.ts' />
7
+ /// <reference path='./lib/uni-installApk/utssdk/index.d.ts' />
9
8
  /// <reference path='./lib/uni-getSystemSetting/utssdk/index.d.ts' />
10
9
  /// <reference path='./lib/uni-getSystemInfo/utssdk/index.d.ts' />
11
10
  /// <reference path='./lib/uni-getNetworkType/utssdk/index.d.ts' />
@@ -13,6 +12,7 @@
13
12
  /// <reference path='./lib/uni-getDeviceInfo/utssdk/index.d.ts' />
14
13
  /// <reference path='./lib/uni-getAppBaseInfo/utssdk/index.d.ts' />
15
14
  /// <reference path='./lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts' />
15
+ /// <reference path='./lib/uni-fileSystemManager/utssdk/index.d.ts' />
16
16
  /// <reference path='./lib/uni-getAccessibilityInfo/utssdk/index.d.ts' />
17
17
  /// <reference path='./lib/uni-exit/utssdk/index.d.ts' />
18
18
  /// <reference path='./lib/uni-createWebviewContext/utssdk/index.d.ts' />
@@ -0,0 +1,66 @@
1
+ // 本文件为自动构建生成
2
+ import {
3
+ ReadFileSuccessResult as ReadFileSuccessResultOrigin,
4
+ FileManagerSuccessResult as FileManagerSuccessResultOrigin,
5
+ FileManagerSuccessCallback as FileManagerSuccessCallbackOrigin,
6
+ FileManagerFailCallback as FileManagerFailCallbackOrigin,
7
+ FileManagerCompleteCallback as FileManagerCompleteCallbackOrigin,
8
+ ReadFileSuccessCallback as ReadFileSuccessCallbackOrigin,
9
+ ReadFileOptions as ReadFileOptionsOrigin,
10
+ WriteFileOptions as WriteFileOptionsOrigin,
11
+ UnLinkSuccessCallback as UnLinkSuccessCallbackOrigin,
12
+ UnLinkOptions as UnLinkOptionsOrigin,
13
+ MkDirSuccessCallback as MkDirSuccessCallbackOrigin,
14
+ MkDirOptions as MkDirOptionsOrigin,
15
+ RmDirSuccessCallback as RmDirSuccessCallbackOrigin,
16
+ RmDirOptions as RmDirOptionsOrigin,
17
+ ReadDirSuccessResult as ReadDirSuccessResultOrigin,
18
+ ReadDirSuccessCallback as ReadDirSuccessCallbackOrigin,
19
+ ReadDirOptions as ReadDirOptionsOrigin,
20
+ AccessOptions as AccessOptionsOrigin,
21
+ RenameOptions as RenameOptionsOrigin,
22
+ CopyFileOptions as CopyFileOptionsOrigin,
23
+ GetFileInfoSuccessResult as GetFileInfoSuccessResultOrigin,
24
+ GetFileInfoSuccessCallback as GetFileInfoSuccessCallbackOrigin,
25
+ GetFileInfoOptions as GetFileInfoOptionsOrigin,
26
+ FileStats as FileStatsOrigin,
27
+ StatSuccessResult as StatSuccessResultOrigin,
28
+ StatSuccessCallback as StatSuccessCallbackOrigin,
29
+ StatOptions as StatOptionsOrigin,
30
+ FileSystemManager as FileSystemManagerOrigin,
31
+ GetFileSystemManager as GetFileSystemManagerOrigin,
32
+ Uni as UniOrigin
33
+ } from './interface'
34
+
35
+ declare global {
36
+ type ReadFileSuccessResult = ReadFileSuccessResultOrigin
37
+ type FileManagerSuccessResult = FileManagerSuccessResultOrigin
38
+ type FileManagerSuccessCallback = FileManagerSuccessCallbackOrigin
39
+ type FileManagerFailCallback = FileManagerFailCallbackOrigin
40
+ type FileManagerCompleteCallback = FileManagerCompleteCallbackOrigin
41
+ type ReadFileSuccessCallback = ReadFileSuccessCallbackOrigin
42
+ type ReadFileOptions = ReadFileOptionsOrigin
43
+ type WriteFileOptions = WriteFileOptionsOrigin
44
+ type UnLinkSuccessCallback = UnLinkSuccessCallbackOrigin
45
+ type UnLinkOptions = UnLinkOptionsOrigin
46
+ type MkDirSuccessCallback = MkDirSuccessCallbackOrigin
47
+ type MkDirOptions = MkDirOptionsOrigin
48
+ type RmDirSuccessCallback = RmDirSuccessCallbackOrigin
49
+ type RmDirOptions = RmDirOptionsOrigin
50
+ type ReadDirSuccessResult = ReadDirSuccessResultOrigin
51
+ type ReadDirSuccessCallback = ReadDirSuccessCallbackOrigin
52
+ type ReadDirOptions = ReadDirOptionsOrigin
53
+ type AccessOptions = AccessOptionsOrigin
54
+ type RenameOptions = RenameOptionsOrigin
55
+ type CopyFileOptions = CopyFileOptionsOrigin
56
+ type GetFileInfoSuccessResult = GetFileInfoSuccessResultOrigin
57
+ type GetFileInfoSuccessCallback = GetFileInfoSuccessCallbackOrigin
58
+ type GetFileInfoOptions = GetFileInfoOptionsOrigin
59
+ type FileStats = FileStatsOrigin
60
+ type StatSuccessResult = StatSuccessResultOrigin
61
+ type StatSuccessCallback = StatSuccessCallbackOrigin
62
+ type StatOptions = StatOptionsOrigin
63
+ type FileSystemManager = FileSystemManagerOrigin
64
+ type GetFileSystemManager = GetFileSystemManagerOrigin
65
+ interface Uni extends UniOrigin { }
66
+ }
@@ -61,6 +61,11 @@ export type WriteFileOptions = {
61
61
  * 文件路径,只支持绝对地址
62
62
  */
63
63
  filePath: string,
64
+ /**
65
+ * 指定写入文件的字符编码
66
+ * 支持:ascii base64 utf-8
67
+ */
68
+ encoding: string,
64
69
  /**
65
70
  * 写入的文本内容
66
71
  */
@@ -293,34 +298,105 @@ export type GetFileInfoOptions = {
293
298
  }
294
299
 
295
300
 
301
+ export class Stats implements io.dcloud.uts.log.LogSelf,io.dcloud.uts.json.IJsonStringify{
302
+ mode: number = 0;
303
+ size: number = 0;
304
+ lastAccessedTime: number = 0;
305
+ lastModifiedTime: number = 0;
306
+
307
+ mIsFile:boolean = false
308
+ constructor(){
309
+ }
310
+
311
+ isDirectory():boolean{
312
+ return !this.mIsFile
313
+ }
314
+
315
+ isFile():boolean{
316
+ return this.mIsFile
317
+ }
318
+
319
+ override toLog():any|null{
320
+ return this.toJSON()
321
+ }
322
+ override toJSON():any|null{
323
+ let jsonRet = new UTSJSONObject()
324
+ jsonRet.set("mode",this.mode)
325
+ jsonRet.set("size",this.size)
326
+ jsonRet.set("lastAccessedTime",this.lastAccessedTime)
327
+ jsonRet.set("lastModifiedTime",this.lastModifiedTime)
328
+ return jsonRet
329
+ }
330
+ }
331
+
332
+
333
+ export type FileStats = {
334
+ path: string,
335
+ stats:Stats,
336
+ }
337
+
338
+ export type StatSuccessResult = {
339
+ errMsg: string,
340
+ stats:FileStats[]
341
+ }
342
+
343
+
344
+ export type StatSuccessCallback = (res: StatSuccessResult) => void
345
+
346
+
347
+ export type StatOptions = {
348
+ /**
349
+ * 文件/目录路径 (本地路径)
350
+ */
351
+ path: string,
352
+ /**
353
+ * 是否递归获取目录下的每个文件的 Stats 信息
354
+ */
355
+ recursive: boolean,
356
+ /**
357
+ * 接口调用的回调函数
358
+ */
359
+ success?: StatSuccessCallback | null,
360
+ /**
361
+ * 接口调用失败的回调函数
362
+ */
363
+ fail?: FileManagerFailCallback | null,
364
+ /**
365
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
366
+ */
367
+ complete?: FileManagerCompleteCallback | null
368
+ }
369
+
296
370
 
297
371
  export interface FileSystemManager {
298
- readFile(config: ReadFileOptions): void;
372
+ readFile(options: ReadFileOptions): void;
299
373
  // readFileSync(filePath: string,encoding:string): string|null;
300
- writeFile(config: WriteFileOptions): void;
374
+ writeFile(options: WriteFileOptions): void;
301
375
  // writeFileSync(filePath: string,data:string): number;
302
- unlink(config: UnLinkOptions): void;
376
+ unlink(options: UnLinkOptions): void;
303
377
  // unlinkSync(filePath: string): number;
304
- mkdir(config: MkDirOptions): void;
378
+ mkdir(options: MkDirOptions): void;
305
379
  // mkdirSync(dirPath: string,recursive:boolean): number;
306
- rmdir(config: RmDirOptions): void;
380
+ rmdir(options: RmDirOptions): void;
307
381
  // rmdirSync(dirPath: string,recursive:boolean): number;
308
- readdir(config: ReadDirOptions): void;
382
+ readdir(options: ReadDirOptions): void;
309
383
  // readdirSync(dirPath: string): string[] | null;
310
- access(config: AccessOptions): void;
384
+ access(options: AccessOptions): void;
311
385
  // accessSync(path: string): number;
312
- rename(config: RenameOptions): void;
386
+ rename(options: RenameOptions): void;
313
387
  // renameSync(oldPath:string,newPath:string): number;
314
- copyFile(config: CopyFileOptions): void;
388
+ copyFile(options: CopyFileOptions): void;
315
389
  // copyFileSync(srcPath:string,destPath:string): number;
316
- getFileInfo(config: GetFileInfoOptions): void;
390
+ getFileInfo(options: GetFileInfoOptions): void;
391
+ //获取文件 Stats 对象
392
+ stat(options: StatOptions): void;
317
393
  }
318
394
 
319
395
 
320
396
  export type GetFileSystemManager = () => FileSystemManager;
321
397
 
322
398
 
323
- interface Uni {
399
+ export interface Uni {
324
400
  /**
325
401
  * 获取文件管理器
326
402
  * @uniPlatform {
@@ -95,7 +95,7 @@ export type GetAppAuthorizeSettingResult = {
95
95
  */
96
96
  locationAuthorized: string,
97
97
  /**
98
- * 定位准确度。true 表示模糊定位,false 表示精确定位
98
+ * 定位准确度。
99
99
  * - reduced: 模糊定位
100
100
  * - full: 精准定位
101
101
  * - unsupported: 不支持(包括用户拒绝定位权限和没有在 `manifest.json -> App模块配置` 中配置 `Geolocation(定位)` 模块)
@@ -0,0 +1,24 @@
1
+ // 本文件为自动构建生成
2
+ import {
3
+ InstallApkSuccess as InstallApkSuccessOrigin,
4
+ InstallApkComplete as InstallApkCompleteOrigin,
5
+ InstallApkSuccessCallback as InstallApkSuccessCallbackOrigin,
6
+ InstallApkErrorCode as InstallApkErrorCodeOrigin,
7
+ InstallApkFail as InstallApkFailOrigin,
8
+ InstallApkFailCallback as InstallApkFailCallbackOrigin,
9
+ InstallApkCompleteCallback as InstallApkCompleteCallbackOrigin,
10
+ InstallApkOptions as InstallApkOptionsOrigin,
11
+ Uni as UniOrigin
12
+ } from './interface'
13
+
14
+ declare global {
15
+ type InstallApkSuccess = InstallApkSuccessOrigin
16
+ type InstallApkComplete = InstallApkCompleteOrigin
17
+ type InstallApkSuccessCallback = InstallApkSuccessCallbackOrigin
18
+ type InstallApkErrorCode = InstallApkErrorCodeOrigin
19
+ type InstallApkFail = InstallApkFailOrigin
20
+ type InstallApkFailCallback = InstallApkFailCallbackOrigin
21
+ type InstallApkCompleteCallback = InstallApkCompleteCallbackOrigin
22
+ type InstallApkOptions = InstallApkOptionsOrigin
23
+ interface Uni extends UniOrigin { }
24
+ }
@@ -0,0 +1,76 @@
1
+ export interface Uni {
2
+ /**
3
+ * installApk()
4
+ * @description
5
+ * 安装apk
6
+ * @param {InstallApkOptions}
7
+ * @return {void}
8
+ * @uniPlatform {
9
+ * "app": {
10
+ * "android": {
11
+ * "osVer": "4.4",
12
+ * "uniVer": "3.94+",
13
+ * "unixVer": "3.94+"
14
+ * },
15
+ * "ios": {
16
+ * "osVer": "x",
17
+ * "uniVer": "x",
18
+ * "unixVer": "x"
19
+ * }
20
+ * }
21
+ * }
22
+ * @example
23
+ ```typescript
24
+ uni.installApk({
25
+ filePath: "/xx/xx/xx.apk",
26
+ complete: (res: any) => {
27
+ console.log("complete => " + JSON.stringify(res));
28
+ }
29
+ });
30
+ ```
31
+ */
32
+ installApk(options : InstallApkOptions) : void
33
+ }
34
+ export type InstallApkSuccess = {
35
+ /**
36
+ * 安装成功消息
37
+ */
38
+ errMsg : string
39
+ }
40
+ export type InstallApkComplete = any
41
+ export type InstallApkSuccessCallback = (res : InstallApkSuccess) => void
42
+ /**
43
+ * 错误码
44
+ * - 1300002 找不到文件
45
+ */
46
+ export type InstallApkErrorCode = 1300002
47
+ /**
48
+ * 网络请求失败的错误回调参数
49
+ */
50
+ export interface InstallApkFail extends IUniError {
51
+ errCode : InstallApkErrorCode
52
+ };
53
+ export type InstallApkFailCallback = (err : InstallApkFail) => void
54
+ export type InstallApkCompleteCallback = (res : InstallApkComplete) => void
55
+
56
+ export type InstallApkOptions = {
57
+ /**
58
+ * apk文件地址
59
+ */
60
+ filePath : string,
61
+ /**
62
+ * 接口调用成功的回调函数
63
+ * @defaultValue null
64
+ */
65
+ success ?: InstallApkSuccessCallback | null,
66
+ /**
67
+ * 接口调用失败的回调函数
68
+ * @defaultValue null
69
+ */
70
+ fail ?: InstallApkFailCallback | null,
71
+ /**
72
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
73
+ * @defaultValue null
74
+ */
75
+ complete ?: InstallApkCompleteCallback | null
76
+ }
@@ -88,6 +88,15 @@ export type ChooseImageOptions = {
88
88
  sourceType ?: (string[]) | null,
89
89
  /**
90
90
  * 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持
91
+ * @uniPlatform {
92
+ * "app": {
93
+ * "android": {
94
+ * "osVer": "4.4",
95
+ * "uniVer": "√",
96
+ * "unixVer": "x"
97
+ * }
98
+ * }
99
+ * }
91
100
  */
92
101
  extension ?: (string[]) | null,
93
102
  /**
@@ -169,7 +178,7 @@ export type PreviewImageOptions = {
169
178
  /**
170
179
  * 需要预览的图片链接列表
171
180
  */
172
- urls : string[],
181
+ urls : Array<string.ImageURIString>,
173
182
  /**
174
183
  * 图片指示器样式
175
184
  * - default: 底部圆点指示器
@@ -273,7 +282,7 @@ export type GetImageInfoOptions = {
273
282
  /**
274
283
  * 图片的路径,可以是相对路径,临时文件路径,存储文件路径,网络图片路径
275
284
  */
276
- src : string,
285
+ src : string.ImageURIString,
277
286
  /**
278
287
  * 接口调用成功的回调函数
279
288
  */
@@ -306,7 +315,7 @@ export type SaveImageToPhotosAlbumOptions = {
306
315
  /**
307
316
  * 图片文件路径,可以是临时文件路径也可以是永久文件路径,不支持网络图片路径
308
317
  */
309
- filePath : string,
318
+ filePath : string.ImageURIString,
310
319
  /**
311
320
  * 接口调用成功的回调函数
312
321
  */
@@ -337,7 +346,7 @@ export type CompressImageOptions = {
337
346
  /**
338
347
  * 图片路径,图片的路径,可以是相对路径、临时文件路径、存储文件路径
339
348
  */
340
- src : string,
349
+ src : string.ImageURIString,
341
350
  /**
342
351
  * 压缩质量,范围0~100,数值越小,质量越低,压缩率越高(仅对jpg有效)
343
352
  */
@@ -497,7 +506,7 @@ export type GetVideoInfoOptions = {
497
506
  /**
498
507
  * 视频文件路径,可以是临时文件路径也可以是永久文件路径
499
508
  */
500
- src : string,
509
+ src : string.VideoURIString,
501
510
  /**
502
511
  * 接口调用成功的回调函数
503
512
  */
@@ -525,7 +534,7 @@ export type SaveVideoToPhotosAlbumOptions = {
525
534
  /**
526
535
  * 视频文件路径,可以是临时文件路径也可以是永久文件路径
527
536
  */
528
- filePath : string,
537
+ filePath : string.VideoURIString,
529
538
  /**
530
539
  * 接口调用成功的回调函数
531
540
  */
@@ -562,7 +571,7 @@ export type CompressVideoOptions = {
562
571
  /**
563
572
  * 视频文件路径,可以是临时文件路径也可以是永久文件路径
564
573
  */
565
- src : string,
574
+ src : string.VideoURIString,
566
575
  /**
567
576
  * 压缩质量
568
577
  * - low: 低
@@ -1,5 +1,5 @@
1
1
 
2
- export type Request = (param: RequestOptions) => RequestTask | null;
2
+ export type Request = (param: RequestOptions) => RequestTask;
3
3
 
4
4
  /**
5
5
  * 网络请求参数
@@ -157,7 +157,7 @@ export interface RequestTask {
157
157
  //===============================上传==================================
158
158
 
159
159
 
160
- export type UploadFile = (options: UploadFileOptions) => UploadTask | null;
160
+ export type UploadFile = (options: UploadFileOptions) => UploadTask;
161
161
  export type UploadFileOptionFiles = {
162
162
  /**
163
163
  * multipart 提交时,表单的项目名,默认为 file,如果 name 不填或填的值相同,可能导致服务端读取文件时只能读取到一个文件。
@@ -327,7 +327,7 @@ export interface UploadTask {
327
327
 
328
328
  //===============================下载==================================
329
329
 
330
- export type DownloadFile = (options: DownloadFileOptions) => DownloadTask | null;
330
+ export type DownloadFile = (options: DownloadFileOptions) => DownloadTask;
331
331
  export type DownloadFileSuccess = {
332
332
  /**
333
333
  * 临时文件路径,下载后的文件会存储到一个临时文件
@@ -456,7 +456,7 @@ export interface Uni {
456
456
  * @description
457
457
  * 发起网络请求。
458
458
  * @param {RequestOptions} options
459
- * @return {RequestTask | null}
459
+ * @return {RequestTask}
460
460
  * @tutorial https://uniapp.dcloud.net.cn/api/request/request.html
461
461
  * @uniPlatform {
462
462
  * "app": {
@@ -507,7 +507,7 @@ export interface Uni {
507
507
  * @description
508
508
  * 将本地资源上传到开发者服务器。
509
509
  * @param {UploadFileOptions} options
510
- * @return {UploadTask | null}
510
+ * @return {UploadTask}
511
511
  * @tutorial https://uniapp.dcloud.net.cn/api/request/network-file.html#uploadfile
512
512
  * @uniPlatform {
513
513
  * "app": {
@@ -544,7 +544,7 @@ export interface Uni {
544
544
  * @description
545
545
  * 下载文件资源到本地,客户端直接发起一个 HTTP GET 请求,返回文件的本地临时路径。
546
546
  * @param {DownloadFileOptions} options
547
- * @return {DownloadTask | null}
547
+ * @return {DownloadTask}
548
548
  * @tutorial https://uniapp.dcloud.net.cn/api/request/network-file.html#downloadfile
549
549
  * @uniPlatform {
550
550
  * "app": {
@@ -1,4 +1,4 @@
1
- export type Request<T> = (param: RequestOptions<T>) => RequestTask | null;
1
+ export type Request<T> = (param: RequestOptions<T>) => RequestTask;
2
2
 
3
3
  /**
4
4
  * 网络请求参数
@@ -185,7 +185,7 @@ export interface RequestTask {
185
185
  //===============================上传==================================
186
186
 
187
187
 
188
- export type UploadFile = (options: UploadFileOptions) => UploadTask | null;
188
+ export type UploadFile = (options: UploadFileOptions) => UploadTask;
189
189
  export type UploadFileOptionFiles = {
190
190
  /**
191
191
  * multipart 提交时,表单的项目名,默认为 file,如果 name 不填或填的值相同,可能导致服务端读取文件时只能读取到一个文件。
@@ -369,7 +369,7 @@ export interface UploadTask {
369
369
 
370
370
  //===============================下载==================================
371
371
 
372
- export type DownloadFile = (options: DownloadFileOptions) => DownloadTask | null;
372
+ export type DownloadFile = (options: DownloadFileOptions) => DownloadTask;
373
373
  export type DownloadFileSuccess = {
374
374
  /**
375
375
  * 临时文件路径,下载后的文件会存储到一个临时文件
@@ -517,7 +517,7 @@ export interface Uni {
517
517
  * @description
518
518
  * 发起网络请求。
519
519
  * @param {RequestOptions} options
520
- * @return {RequestTask | null}
520
+ * @return {RequestTask}
521
521
  * @tutorial https://uniapp.dcloud.net.cn/api/request/request.html
522
522
  * @uniPlatform {
523
523
  * "app": {
@@ -562,13 +562,13 @@ export interface Uni {
562
562
  });
563
563
  ```
564
564
  */
565
- request<T>(param: RequestOptions<T>): RequestTask | null;
565
+ request<T>(param: RequestOptions<T>): RequestTask;
566
566
  /**
567
567
  * UploadFile()
568
568
  * @description
569
569
  * 将本地资源上传到开发者服务器。
570
570
  * @param {UploadFileOptions} options
571
- * @return {UploadTask | null}
571
+ * @return {UploadTask}
572
572
  * @tutorial https://uniapp.dcloud.net.cn/api/request/network-file.html#uploadfile
573
573
  * @uniPlatform {
574
574
  * "app": {
@@ -599,13 +599,13 @@ export interface Uni {
599
599
  });
600
600
  ```
601
601
  */
602
- uploadFile(options: UploadFileOptions): UploadTask | null;
602
+ uploadFile(options: UploadFileOptions): UploadTask;
603
603
  /**
604
604
  * DownloadFile()
605
605
  * @description
606
606
  * 下载文件资源到本地,客户端直接发起一个 HTTP GET 请求,返回文件的本地临时路径。
607
607
  * @param {DownloadFileOptions} options
608
- * @return {DownloadTask | null}
608
+ * @return {DownloadTask}
609
609
  * @tutorial https://uniapp.dcloud.net.cn/api/request/network-file.html#downloadfile
610
610
  * @uniPlatform {
611
611
  * "app": {
@@ -631,5 +631,5 @@ export interface Uni {
631
631
  });
632
632
  ```
633
633
  */
634
- downloadFile(options: DownloadFileOptions): DownloadTask | null;
634
+ downloadFile(options: DownloadFileOptions): DownloadTask;
635
635
  }
@@ -0,0 +1,3 @@
1
+ /// <reference path='./lib/uni-verify/utssdk/index.d.ts' />
2
+ /// <reference path='./lib/uni-push/utssdk/index.d.ts' />
3
+ /// <reference path='./lib/uni-facialRecognitionVerify/utssdk/index.d.ts' />
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * 错误码
3
3
  * - 10001 certifyId 不能为空
4
+ * - 10002 "当前设备不支持"
4
5
  * - 10010 刷脸异常
5
6
  * - 10012 网络异常
6
7
  * - 10011 验证中断
@@ -8,7 +9,7 @@
8
9
  * - 10020 设备设置时间异常
9
10
  */
10
11
 
11
- export type FacialRecognitionVerifyErrorCode = 10010 | 10012 | 10011 | 10013 | 10020 | 10001;
12
+ export type FacialRecognitionVerifyErrorCode = 10010 | 10012 | 10011 | 10013 | 10020 | 10001 | 10002;
12
13
 
13
14
  /**
14
15
  * 认证时屏幕方向
@@ -323,7 +323,7 @@ export type CreatePushMessageOptions = {
323
323
  sound? : string | null,
324
324
  /**
325
325
  * 推送消息的标题
326
- * @defaultValue ""
326
+ * @defaultValue App的名称
327
327
  */
328
328
  title? : string | null,
329
329
  /**
@@ -17,6 +17,7 @@ import {
17
17
  LoginComplete as LoginCompleteOrigin,
18
18
  LoginCompleteCallback as LoginCompleteCallbackOrigin,
19
19
  UniverifyErrorCode as UniverifyErrorCodeOrigin,
20
+ UniverifyErrorCode as UniverifyErrorCodeOrigin,
20
21
  InternalResponse as InternalResponseOrigin,
21
22
  Uni as UniOrigin
22
23
  } from './interface'
@@ -39,6 +40,7 @@ declare global {
39
40
  type LoginComplete = LoginCompleteOrigin
40
41
  type LoginCompleteCallback = LoginCompleteCallbackOrigin
41
42
  type UniverifyErrorCode = UniverifyErrorCodeOrigin
43
+ type UniverifyErrorCode = UniverifyErrorCodeOrigin
42
44
  type InternalResponse = InternalResponseOrigin
43
45
  interface Uni extends UniOrigin { }
44
46
  }
@@ -165,13 +165,17 @@ export type LoginComplete = any;
165
165
  export type LoginCompleteCallback = (res : LoginComplete) => void
166
166
 
167
167
  /**
168
- * 30002 其他登录方式
169
- * 30003 登录界面关闭
168
+ * 1000 当前应用appid尚未开通uni一键登录
169
+ * 1001 应用所有者账号信息异常,请检查账号一键登录服务是否正常
170
+ * 1002 应用所有者账号信息异常,请检查账号余额是否充足
171
+ * 1004 uni一键登录应用不存在
172
+ * 4001 参数异常
170
173
  * 30004 其他错误
171
174
  * 30005 预登录失败
172
175
  * 30006 一键登录失败
173
176
  */
174
- export type UniverifyErrorCode = 30004 | 30005 | 30006;
177
+ // export type UniverifyErrorCode = 1000 | 1001 | 1002 | 1004 | 4001 | 30002 | 30003 | 30004 | 30005 | 30006;
178
+ export type UniverifyErrorCode = 1000 | 1001 | 1002 | 1004 | 4001 | 30004 | 30005 | 30006;
175
179
 
176
180
  /**
177
181
  * SDK响应数据结构