@dcloudio/uni-app-x 0.7.19 → 0.7.20

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 (27) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +184 -24
  3. package/types/native/CanvasRenderingContext2D.d.ts +2 -1
  4. package/types/native/IUniElement.d.ts +2 -2
  5. package/types/uni/uts-plugin-api/global.d.ts +2 -1
  6. package/types/uni/uts-plugin-api/index.d.ts +2 -1
  7. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/interface.d.ts +1 -1
  8. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/global.d.ts +60 -0
  9. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/index.d.ts +29 -0
  10. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +161 -0
  11. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +23 -1
  12. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +37 -0
  13. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +2 -2
  14. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +4 -4
  15. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +5 -5
  16. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +1 -1
  17. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +6 -8
  18. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +3 -4
  19. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +49 -49
  20. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +4 -0
  21. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +2 -0
  22. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +193 -8
  23. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +2 -2
  24. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +808 -778
  25. package/types/uni-cloud/index.d.ts +5 -1
  26. package/types/uni-cloud/interface.d.ts +846 -850
  27. package/types/shim-uts-basic.d.ts +0 -4495
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.19",
3
+ "version": "0.7.20",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
package/types/app.d.ts CHANGED
@@ -45,19 +45,22 @@ type GlobalData = Record<string, any | null>
45
45
  interface UniAppOptions<G extends GlobalData = GlobalData> {
46
46
  /**
47
47
  * 全局对象
48
- * 文档:[https://uniapp.dcloud.io/collocation/App?id=globaldata](https://uniapp.dcloud.io/collocation/App?id=globaldata)
49
- * @autodoc false
48
+ *
49
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
50
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
51
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
52
+ *
50
53
  * @uniPlatform {
51
54
  * "app": {
52
55
  * "android": {
53
56
  * "osVer": "5.0",
54
57
  * "uniVer": "√",
55
- * "unixVer": "x"
58
+ * "unixVer": "3.9"
56
59
  * },
57
60
  * "ios": {
58
61
  * "osVer": "10.0",
59
62
  * "uniVer": "√",
60
- * "unixVer": "x"
63
+ * "unixVer": "4.0"
61
64
  * }
62
65
  * },
63
66
  * "mp": {
@@ -110,12 +113,12 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
110
113
  */
111
114
  globalData?: G;
112
115
  /**
113
- * 生命周期回调 监听应用初始化
116
+ * 生命周期回调,监听应用初始化,应用初始化完成时触发,全局只触发一次。
114
117
  *
115
- * 应用初始化完成时触发,全局只触发一次。
118
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
119
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
120
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
116
121
  *
117
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
118
- * @autodoc false
119
122
  * @uniPlatform {
120
123
  * "app": {
121
124
  * "android": {
@@ -126,7 +129,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
126
129
  * "ios": {
127
130
  * "osVer": "10.0",
128
131
  * "uniVer": "√",
129
- * "unixVer": "x"
132
+ * "unixVer": "4.0"
130
133
  * }
131
134
  * },
132
135
  * "mp": {
@@ -183,8 +186,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
183
186
  *
184
187
  * 应用启动,或从后台进入前台显示时触发
185
188
  *
186
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
187
- * @autodoc false
189
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
190
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
191
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
188
192
  * @uniPlatform {
189
193
  * "app": {
190
194
  * "android": {
@@ -195,7 +199,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
195
199
  * "ios": {
196
200
  * "osVer": "10.0",
197
201
  * "uniVer": "√",
198
- * "unixVer": "x"
202
+ * "unixVer": "4.0"
199
203
  * }
200
204
  * },
201
205
  * "mp": {
@@ -252,8 +256,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
252
256
  *
253
257
  * 应用从前台进入后台时触发
254
258
  *
255
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
256
- * @autodoc false
259
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
260
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
261
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
257
262
  * @uniPlatform {
258
263
  * "app": {
259
264
  * "android": {
@@ -264,7 +269,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
264
269
  * "ios": {
265
270
  * "osVer": "10.0",
266
271
  * "uniVer": "√",
267
- * "unixVer": "x"
272
+ * "unixVer": "4.0"
268
273
  * }
269
274
  * },
270
275
  * "mp": {
@@ -321,7 +326,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
321
326
  * 应用发生脚本错误或 API 调用报错时触发
322
327
  * @param error 错误信息
323
328
  *
324
- * @tutorial [https://doc.dcloud.net.cn/uni-app-x/collocation/app.html](https://doc.dcloud.net.cn/uni-app-x/collocation/app.html)
329
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
330
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
331
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
325
332
  * @uniPlatform {
326
333
  * "app": {
327
334
  * "android": {
@@ -393,8 +400,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
393
400
  * 1. 如果开发者没有添加 `onPageNotFound` 监听,当跳转页面不存在时,将推入微信客户端原生的页面不存在提示页面。
394
401
  * 2. 如果 `onPageNotFound` 回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再回调 `onPageNotFound`。
395
402
  *
396
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
397
- * @autodoc false
403
+ * @tutorial https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
404
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
405
+ * @internal
398
406
  * @uniPlatform {
399
407
  * "app": {
400
408
  * "android": {
@@ -462,8 +470,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
462
470
  *
463
471
  * nvue 页面使用 `uni.postMessage` 发送消息时触发
464
472
  *
465
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
466
- * @autodoc false
473
+ * @tutorial https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
474
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
475
+ * @internal
467
476
  * @uniPlatform {
468
477
  * "app": {
469
478
  * "android": {
@@ -538,8 +547,8 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
538
547
  /**
539
548
  * 监听应用退出。app-uvue-android 3.9+
540
549
  *
541
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
542
- * @autodoc false
550
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
551
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
543
552
  * @uniPlatform {
544
553
  * "app": {
545
554
  * "android": {
@@ -614,8 +623,9 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
614
623
  /**
615
624
  * 最后一个页面按下Android back键,常用于自定义退出。app-uvue-android 3.9+
616
625
  *
617
- * @tutorial [https://uniapp.dcloud.io/collocation/frame/lifecycle](https://uniapp.dcloud.io/collocation/frame/lifecycle)
618
- * @autodoc false
626
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/exit.html
627
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/exit.html
628
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/collocation/App.html#applifecycle
619
629
  * @uniPlatform {
620
630
  * "app": {
621
631
  * "android": {
@@ -722,6 +732,82 @@ declare global {
722
732
  * 应用启动页面路径
723
733
  */
724
734
  path: string;
735
+ /**
736
+ * 首次启动时的Scheme。返回值与App.onLaunch的回调参数一致
737
+ *
738
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/getLaunchOptionsSync.html
739
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-launch-options-sync.html
740
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-launch-options-sync.html
741
+ * @uniPlatform {
742
+ * "app": {
743
+ * "android": {
744
+ * "osVer": "5.0",
745
+ * "uniVer": "√",
746
+ * "unixVer": "4.25"
747
+ * },
748
+ * "ios": {
749
+ * "osVer": "12.0",
750
+ * "uniVer": "√",
751
+ * "unixVer": "4.25"
752
+ * },
753
+ * "harmony": {
754
+ * "osVer": "x",
755
+ * "uniVer": "x",
756
+ * "unixVer": "x"
757
+ * }
758
+ * },
759
+ * "mp": {
760
+ * "weixin": {
761
+ * "hostVer": "√",
762
+ * "uniVer": "√",
763
+ * "unixVer": "x"
764
+ * },
765
+ * },
766
+ * "web": {
767
+ * "uniVer": "√",
768
+ * "unixVer": "4.0"
769
+ * }
770
+ * }
771
+ */
772
+ appScheme: string | null,
773
+ /**
774
+ * 首次启动时的appLink。返回值与App.onLaunch的回调参数一致
775
+ *
776
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/getLaunchOptionsSync.html
777
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-launch-options-sync.html
778
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-launch-options-sync.html
779
+ * @uniPlatform {
780
+ * "app": {
781
+ * "android": {
782
+ * "osVer": "5.0",
783
+ * "uniVer": "√",
784
+ * "unixVer": "4.25"
785
+ * },
786
+ * "ios": {
787
+ * "osVer": "12.0",
788
+ * "uniVer": "√",
789
+ * "unixVer": "4.25"
790
+ * },
791
+ * "harmony": {
792
+ * "osVer": "x",
793
+ * "uniVer": "x",
794
+ * "unixVer": "x"
795
+ * }
796
+ * },
797
+ * "mp": {
798
+ * "weixin": {
799
+ * "hostVer": "√",
800
+ * "uniVer": "√",
801
+ * "unixVer": "x"
802
+ * },
803
+ * },
804
+ * "web": {
805
+ * "uniVer": "√",
806
+ * "unixVer": "4.0"
807
+ * }
808
+ * }
809
+ */
810
+ appLink: string | null
725
811
  /**
726
812
  * 打开小程序的query
727
813
  */
@@ -814,6 +900,80 @@ declare global {
814
900
  * 应用启动页面路径
815
901
  */
816
902
  path: string
903
+ /**
904
+ * 本次启动时的Scheme。返回值与App.onShow的回调参数一致
905
+ *
906
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-enter-options-sync.html
907
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-enter-options-sync.html
908
+ * @uniPlatform {
909
+ * "app": {
910
+ * "android": {
911
+ * "osVer": "5.0",
912
+ * "uniVer": "x",
913
+ * "unixVer": "4.25"
914
+ * },
915
+ * "ios": {
916
+ * "osVer": "12.0",
917
+ * "uniVer": "x",
918
+ * "unixVer": "4.25"
919
+ * },
920
+ * "harmony": {
921
+ * "osVer": "x",
922
+ * "uniVer": "x",
923
+ * "unixVer": "x"
924
+ * }
925
+ * },
926
+ * "mp": {
927
+ * "weixin": {
928
+ * "hostVer": "√",
929
+ * "uniVer": "√",
930
+ * "unixVer": "x"
931
+ * },
932
+ * },
933
+ * "web": {
934
+ * "uniVer": "√",
935
+ * "unixVer": "4.0"
936
+ * }
937
+ * }
938
+ */
939
+ appScheme: string | null
940
+ /**
941
+ * 本次启动时的appLink。返回值与App.onShow的回调参数一致
942
+ *
943
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-enter-options-sync.html
944
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-enter-options-sync.html
945
+ * @uniPlatform {
946
+ * "app": {
947
+ * "android": {
948
+ * "osVer": "5.0",
949
+ * "uniVer": "x",
950
+ * "unixVer": "4.25"
951
+ * },
952
+ * "ios": {
953
+ * "osVer": "12.0",
954
+ * "uniVer": "x",
955
+ * "unixVer": "4.25"
956
+ * },
957
+ * "harmony": {
958
+ * "osVer": "x",
959
+ * "uniVer": "x",
960
+ * "unixVer": "x"
961
+ * }
962
+ * },
963
+ * "mp": {
964
+ * "weixin": {
965
+ * "hostVer": "√",
966
+ * "uniVer": "√",
967
+ * "unixVer": "x"
968
+ * },
969
+ * },
970
+ * "web": {
971
+ * "uniVer": "√",
972
+ * "unixVer": "4.0"
973
+ * }
974
+ * }
975
+ */
976
+ appLink: string | null
817
977
  }
818
978
 
819
979
  interface OnPageNotFoundOption {
@@ -51,6 +51,7 @@ export interface TextMetrics {
51
51
  * }
52
52
  */
53
53
  export interface ImageData {
54
+ readonly data: Uint8ClampedArray
54
55
  readonly width: number
55
56
  readonly height: number
56
57
  }
@@ -1069,7 +1070,7 @@ export interface CanvasRenderingContext2D {
1069
1070
  createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r01: number): CanvasGradient
1070
1071
 
1071
1072
  /**
1072
- * 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas
1073
+ * 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中, 该操作为可选非web标准,canvas组件会自动选择合适时机进行绘制
1073
1074
  * @uniPlatform {
1074
1075
  * "app": {
1075
1076
  * "android": {
@@ -2744,7 +2744,7 @@ export interface UniCanvasElement extends UniElement {
2744
2744
  toBlob(callback: BlobCallback, type: string): void
2745
2745
  toBlob(callback: BlobCallback, type: string, quality: number): void
2746
2746
  /**
2747
- * 返回一个包含图片展示的 data URI (app平台不支持webp格式)
2747
+ * 返回一个包含图片展示的 data URI (iOS平台不支持webp格式)
2748
2748
  * @uniPlatform {
2749
2749
  * "app": {
2750
2750
  * "android": {
@@ -2765,7 +2765,7 @@ export interface UniCanvasElement extends UniElement {
2765
2765
  * }
2766
2766
  * }
2767
2767
  */
2768
- toDataURL(type: string | null, encoderOptions: any | null): string
2768
+ toDataURL(type?: string | null, encoderOptions?: any | null): string
2769
2769
  }
2770
2770
 
2771
2771
  // 允许instanceof检查
@@ -1,7 +1,7 @@
1
1
  /// <reference path='./lib/uni-websocket/utssdk/global.d.ts' />
2
2
  /// <reference path='./lib/uni-virtualPayment/utssdk/global.d.ts' />
3
- /// <reference path='./lib/uni-theme/utssdk/global.d.ts' />
4
3
  /// <reference path='./lib/uni-tabBar/utssdk/global.d.ts' />
4
+ /// <reference path='./lib/uni-theme/utssdk/global.d.ts' />
5
5
  /// <reference path='./lib/uni-storage/utssdk/global.d.ts' />
6
6
  /// <reference path='./lib/uni-scanCode/utssdk/global.d.ts' />
7
7
  /// <reference path='./lib/uni-rpx2px/utssdk/global.d.ts' />
@@ -52,6 +52,7 @@
52
52
  /// <reference path='./lib/uni-clipboard/utssdk/global.d.ts' />
53
53
  /// <reference path='./lib/uni-canvas/utssdk/global.d.ts' />
54
54
  /// <reference path='./lib/uni-base64ToArrayBuffer/utssdk/global.d.ts' />
55
+ /// <reference path='./lib/uni-authentication/utssdk/global.d.ts' />
55
56
  /// <reference path='./lib/uni-arrayBufferToBase64/utssdk/global.d.ts' />
56
57
  /// <reference path='./lib/uni-animationFrame/utssdk/global.d.ts' />
57
58
  /// <reference path='./lib/uni-addPhoneContact/utssdk/global.d.ts' />
@@ -1,7 +1,7 @@
1
1
  export * from './lib/uni-websocket/utssdk'
2
2
  export * from './lib/uni-virtualPayment/utssdk'
3
- export * from './lib/uni-theme/utssdk'
4
3
  export * from './lib/uni-tabBar/utssdk'
4
+ export * from './lib/uni-theme/utssdk'
5
5
  export * from './lib/uni-storage/utssdk'
6
6
  export * from './lib/uni-scanCode/utssdk'
7
7
  export * from './lib/uni-rpx2px/utssdk'
@@ -52,6 +52,7 @@ export * from './lib/uni-createInnerAudioContext/utssdk'
52
52
  export * from './lib/uni-clipboard/utssdk'
53
53
  export * from './lib/uni-canvas/utssdk'
54
54
  export * from './lib/uni-base64ToArrayBuffer/utssdk'
55
+ export * from './lib/uni-authentication/utssdk'
55
56
  export * from './lib/uni-arrayBufferToBase64/utssdk'
56
57
  export * from './lib/uni-animationFrame/utssdk'
57
58
  export * from './lib/uni-addPhoneContact/utssdk'
@@ -26,7 +26,7 @@ export interface Uni {
26
26
  requestAnimationFrame(callback: UniRequestAnimationFrameCallback): number;
27
27
  // requestAnimationFrame(callback: UniRequestAnimationFrameWithNoArgumentCallback): number;
28
28
  /**
29
- * 方法取消一个先前通过调用 window.requestAnimationFrame() 方法添加到计划中的动画帧请求
29
+ * 取消一个先前通过调用 uni.requestAnimationFrame() 方法添加到计划中的动画帧请求
30
30
  * @uniPlatform {
31
31
  * "app": {
32
32
  * "android": {
@@ -0,0 +1,60 @@
1
+ // 本文件为自动构建生成
2
+ import {
3
+ StartSoterAuthentication as StartSoterAuthenticationOrigin,
4
+ SoterAuthMode as SoterAuthModeOrigin,
5
+ StartSoterAuthenticationSuccess as StartSoterAuthenticationSuccessOrigin,
6
+ StartSoterAuthenticationSuccessCallback as StartSoterAuthenticationSuccessCallbackOrigin,
7
+ StartSoterAuthenticationFail as StartSoterAuthenticationFailOrigin,
8
+ UniError as UniErrorOrigin,
9
+ StartSoterAuthenticationFailCallback as StartSoterAuthenticationFailCallbackOrigin,
10
+ StartSoterAuthenticationComplete as StartSoterAuthenticationCompleteOrigin,
11
+ StartSoterAuthenticationCompleteCallback as StartSoterAuthenticationCompleteCallbackOrigin,
12
+ StartSoterAuthenticationOptions as StartSoterAuthenticationOptionsOrigin,
13
+ CheckIsSupportSoterAuthentication as CheckIsSupportSoterAuthenticationOrigin,
14
+ CheckIsSupportSoterAuthenticationSuccess as CheckIsSupportSoterAuthenticationSuccessOrigin,
15
+ CheckIsSupportSoterAuthenticationSuccessCallback as CheckIsSupportSoterAuthenticationSuccessCallbackOrigin,
16
+ CheckIsSupportSoterAuthenticationFail as CheckIsSupportSoterAuthenticationFailOrigin,
17
+ CheckIsSupportSoterAuthenticationFailCallback as CheckIsSupportSoterAuthenticationFailCallbackOrigin,
18
+ CheckIsSupportSoterAuthenticationComplete as CheckIsSupportSoterAuthenticationCompleteOrigin,
19
+ CheckIsSupportSoterAuthenticationCompleteCallback as CheckIsSupportSoterAuthenticationCompleteCallbackOrigin,
20
+ CheckIsSupportSoterAuthenticationOptions as CheckIsSupportSoterAuthenticationOptionsOrigin,
21
+ CheckIsSoterEnrolledInDevice as CheckIsSoterEnrolledInDeviceOrigin,
22
+ CheckIsSoterEnrolledInDeviceSuccess as CheckIsSoterEnrolledInDeviceSuccessOrigin,
23
+ CheckIsSoterEnrolledInDeviceSuccessCallback as CheckIsSoterEnrolledInDeviceSuccessCallbackOrigin,
24
+ CheckIsSoterEnrolledInDeviceFail as CheckIsSoterEnrolledInDeviceFailOrigin,
25
+ CheckIsSoterEnrolledInDeviceFailCallback as CheckIsSoterEnrolledInDeviceFailCallbackOrigin,
26
+ CheckIsSoterEnrolledInDeviceComplete as CheckIsSoterEnrolledInDeviceCompleteOrigin,
27
+ CheckIsSoterEnrolledInDeviceCompleteCallback as CheckIsSoterEnrolledInDeviceCompleteCallbackOrigin,
28
+ CheckIsSoterEnrolledInDeviceOptions as CheckIsSoterEnrolledInDeviceOptionsOrigin,
29
+ Uni as UniOrigin
30
+ } from './interface'
31
+
32
+ declare global {
33
+ type StartSoterAuthentication = StartSoterAuthenticationOrigin
34
+ type SoterAuthMode = SoterAuthModeOrigin
35
+ type StartSoterAuthenticationSuccess = StartSoterAuthenticationSuccessOrigin
36
+ type StartSoterAuthenticationSuccessCallback = StartSoterAuthenticationSuccessCallbackOrigin
37
+ type StartSoterAuthenticationFail = StartSoterAuthenticationFailOrigin
38
+ type UniError = UniErrorOrigin
39
+ type StartSoterAuthenticationFailCallback = StartSoterAuthenticationFailCallbackOrigin
40
+ type StartSoterAuthenticationComplete = StartSoterAuthenticationCompleteOrigin
41
+ type StartSoterAuthenticationCompleteCallback = StartSoterAuthenticationCompleteCallbackOrigin
42
+ type StartSoterAuthenticationOptions = StartSoterAuthenticationOptionsOrigin
43
+ type CheckIsSupportSoterAuthentication = CheckIsSupportSoterAuthenticationOrigin
44
+ type CheckIsSupportSoterAuthenticationSuccess = CheckIsSupportSoterAuthenticationSuccessOrigin
45
+ type CheckIsSupportSoterAuthenticationSuccessCallback = CheckIsSupportSoterAuthenticationSuccessCallbackOrigin
46
+ type CheckIsSupportSoterAuthenticationFail = CheckIsSupportSoterAuthenticationFailOrigin
47
+ type CheckIsSupportSoterAuthenticationFailCallback = CheckIsSupportSoterAuthenticationFailCallbackOrigin
48
+ type CheckIsSupportSoterAuthenticationComplete = CheckIsSupportSoterAuthenticationCompleteOrigin
49
+ type CheckIsSupportSoterAuthenticationCompleteCallback = CheckIsSupportSoterAuthenticationCompleteCallbackOrigin
50
+ type CheckIsSupportSoterAuthenticationOptions = CheckIsSupportSoterAuthenticationOptionsOrigin
51
+ type CheckIsSoterEnrolledInDevice = CheckIsSoterEnrolledInDeviceOrigin
52
+ type CheckIsSoterEnrolledInDeviceSuccess = CheckIsSoterEnrolledInDeviceSuccessOrigin
53
+ type CheckIsSoterEnrolledInDeviceSuccessCallback = CheckIsSoterEnrolledInDeviceSuccessCallbackOrigin
54
+ type CheckIsSoterEnrolledInDeviceFail = CheckIsSoterEnrolledInDeviceFailOrigin
55
+ type CheckIsSoterEnrolledInDeviceFailCallback = CheckIsSoterEnrolledInDeviceFailCallbackOrigin
56
+ type CheckIsSoterEnrolledInDeviceComplete = CheckIsSoterEnrolledInDeviceCompleteOrigin
57
+ type CheckIsSoterEnrolledInDeviceCompleteCallback = CheckIsSoterEnrolledInDeviceCompleteCallbackOrigin
58
+ type CheckIsSoterEnrolledInDeviceOptions = CheckIsSoterEnrolledInDeviceOptionsOrigin
59
+ interface Uni extends UniOrigin { }
60
+ }
@@ -0,0 +1,29 @@
1
+ // 本文件为自动构建生成
2
+ export {
3
+ StartSoterAuthentication,
4
+ SoterAuthMode,
5
+ StartSoterAuthenticationSuccess,
6
+ StartSoterAuthenticationSuccessCallback,
7
+ StartSoterAuthenticationFail,
8
+ UniError,
9
+ StartSoterAuthenticationFailCallback,
10
+ StartSoterAuthenticationComplete,
11
+ StartSoterAuthenticationCompleteCallback,
12
+ StartSoterAuthenticationOptions,
13
+ CheckIsSupportSoterAuthentication,
14
+ CheckIsSupportSoterAuthenticationSuccess,
15
+ CheckIsSupportSoterAuthenticationSuccessCallback,
16
+ CheckIsSupportSoterAuthenticationFail,
17
+ CheckIsSupportSoterAuthenticationFailCallback,
18
+ CheckIsSupportSoterAuthenticationComplete,
19
+ CheckIsSupportSoterAuthenticationCompleteCallback,
20
+ CheckIsSupportSoterAuthenticationOptions,
21
+ CheckIsSoterEnrolledInDevice,
22
+ CheckIsSoterEnrolledInDeviceSuccess,
23
+ CheckIsSoterEnrolledInDeviceSuccessCallback,
24
+ CheckIsSoterEnrolledInDeviceFail,
25
+ CheckIsSoterEnrolledInDeviceFailCallback,
26
+ CheckIsSoterEnrolledInDeviceComplete,
27
+ CheckIsSoterEnrolledInDeviceCompleteCallback,
28
+ CheckIsSoterEnrolledInDeviceOptions,
29
+ } from './interface'
@@ -0,0 +1,161 @@
1
+
2
+ export interface Uni {
3
+ /**
4
+ * 开始 SOTER 生物认证
5
+ *
6
+ * 文档: [http://uniapp.dcloud.io/api/system/authentication?id=startsoterauthentication](http://uniapp.dcloud.io/api/system/authentication?id=startsoterauthentication)
7
+ */
8
+ startSoterAuthentication: StartSoterAuthentication;
9
+ /**
10
+ * 获取本机支持的 SOTER 生物认证方式
11
+ *
12
+ * 文档: [http://uniapp.dcloud.io/api/system/authentication?id=checkissupportsoterauthentication](http://uniapp.dcloud.io/api/system/authentication?id=checkissupportsoterauthentication)
13
+ */
14
+ checkIsSupportSoterAuthentication: CheckIsSupportSoterAuthentication;
15
+ /**
16
+ * 获取设备内是否录入如指纹等生物信息
17
+ *
18
+ * 文档: [http://uniapp.dcloud.io/api/system/authentication?id=checkissoterenrolledindevice](http://uniapp.dcloud.io/api/system/authentication?id=checkissoterenrolledindevice)
19
+ */
20
+ checkIsSoterEnrolledInDevice: CheckIsSoterEnrolledInDevice;
21
+ }
22
+
23
+ export type StartSoterAuthentication = (options: StartSoterAuthenticationOptions) => void;
24
+ /**
25
+ * 生物认证方式
26
+ * - fingerPrint: 指纹识别
27
+ * - facial: 人脸识别(暂未支持)
28
+ * - speech: 声纹识别(暂未支持)
29
+ */
30
+ export type SoterAuthMode = 'fingerPrint' | 'facial' | 'speech';
31
+ export type StartSoterAuthenticationSuccess = {
32
+ /**
33
+ * 错误码
34
+ */
35
+ errCode: number,
36
+ /**
37
+ * 生物认证方式
38
+ * - fingerPrint: 指纹识别
39
+ * - facial: 人脸识别(暂未支持)
40
+ * - speech: 声纹识别(暂未支持)
41
+ */
42
+ authMode: SoterAuthMode,
43
+ /**
44
+ * 在设备安全区域(TEE)内获得的本机安全信息以及本次认证信息
45
+ */
46
+ resultJSON?: string | null,
47
+ /**
48
+ * 用SOTER安全密钥对 resultJSON 的签名(SHA256 with RSA/PSS, saltlen=20)
49
+ */
50
+ resultJSONSignature?: string | null,
51
+ /**
52
+ * 接口调用结果
53
+ */
54
+ errMsg: string
55
+ };
56
+ export type StartSoterAuthenticationSuccessCallback = (result: StartSoterAuthenticationSuccess) => void;
57
+ export type StartSoterAuthenticationFail = UniError;
58
+ export type UniError = {
59
+ errSubject: string,
60
+ errCode: number,
61
+ errMsg: string,
62
+ data?: object | null,
63
+ cause?: any | null
64
+ };
65
+ export type StartSoterAuthenticationFailCallback = (result: StartSoterAuthenticationFail) => void;
66
+ export type StartSoterAuthenticationComplete = any;
67
+ export type StartSoterAuthenticationCompleteCallback = (result: StartSoterAuthenticationComplete) => void;
68
+ export type StartSoterAuthenticationOptions = {
69
+ /**
70
+ * 请求使用的可接受的生物认证方式
71
+ */
72
+ requestAuthModes: SoterAuthMode[],
73
+ /**
74
+ * 挑战因子
75
+ */
76
+ challenge?: string | null,
77
+ /**
78
+ * 验证描述,即识别过程中显示在界面上的对话框提示内容
79
+ */
80
+ authContent?: string | null,
81
+ /**
82
+ * 接口调用成功的回调函数
83
+ */
84
+ success?: StartSoterAuthenticationSuccessCallback | null,
85
+ /**
86
+ * 接口调用失败的回调函数
87
+ */
88
+ fail?: StartSoterAuthenticationFailCallback | null,
89
+ /**
90
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
91
+ */
92
+ complete?: StartSoterAuthenticationCompleteCallback | null
93
+ };
94
+ export type CheckIsSupportSoterAuthentication = (options: CheckIsSupportSoterAuthenticationOptions) => void;
95
+ export type CheckIsSupportSoterAuthenticationSuccess = {
96
+ /**
97
+ * 接口调用成功的回调函数
98
+ */
99
+ supportMode: SoterAuthMode[],
100
+ /**
101
+ * 接口调用结果
102
+ */
103
+ errMsg: string
104
+ };
105
+ export type CheckIsSupportSoterAuthenticationSuccessCallback = (result: CheckIsSupportSoterAuthenticationSuccess) => void;
106
+ export type CheckIsSupportSoterAuthenticationFail = UniError;
107
+ export type CheckIsSupportSoterAuthenticationFailCallback = (result: CheckIsSupportSoterAuthenticationFail) => void;
108
+ export type CheckIsSupportSoterAuthenticationComplete = any;
109
+ export type CheckIsSupportSoterAuthenticationCompleteCallback = (result: CheckIsSupportSoterAuthenticationComplete) => void;
110
+ export type CheckIsSupportSoterAuthenticationOptions = {
111
+ /**
112
+ * 接口调用成功的回调函数
113
+ */
114
+ success?: CheckIsSupportSoterAuthenticationSuccessCallback | null,
115
+ /**
116
+ * 接口调用失败的回调函数
117
+ */
118
+ fail?: CheckIsSupportSoterAuthenticationFailCallback | null,
119
+ /**
120
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
121
+ */
122
+ complete?: CheckIsSupportSoterAuthenticationCompleteCallback | null
123
+ };
124
+ export type CheckIsSoterEnrolledInDevice = (options: CheckIsSoterEnrolledInDeviceOptions) => void;
125
+ export type CheckIsSoterEnrolledInDeviceSuccess = {
126
+ /**
127
+ * 是否已录入信息
128
+ * @type boolean
129
+ */
130
+ isEnrolled: boolean,
131
+ /**
132
+ * 错误信息
133
+ */
134
+ errMsg: string
135
+ };
136
+ export type CheckIsSoterEnrolledInDeviceSuccessCallback = (result: CheckIsSoterEnrolledInDeviceSuccess) => void;
137
+ export type CheckIsSoterEnrolledInDeviceFail = UniError;
138
+ export type CheckIsSoterEnrolledInDeviceFailCallback = (result: CheckIsSoterEnrolledInDeviceFail) => void;
139
+ export type CheckIsSoterEnrolledInDeviceComplete = any;
140
+ export type CheckIsSoterEnrolledInDeviceCompleteCallback = (result: CheckIsSoterEnrolledInDeviceComplete) => void;
141
+ export type CheckIsSoterEnrolledInDeviceOptions = {
142
+ /**
143
+ * 生物认证方式
144
+ * - fingerPrint: 指纹识别
145
+ * - facial: 人脸识别(暂未支持)
146
+ * - speech: 声纹识别(暂未支持)
147
+ */
148
+ checkAuthMode: SoterAuthMode,
149
+ /**
150
+ * 接口调用成功的回调函数
151
+ */
152
+ success?: CheckIsSoterEnrolledInDeviceSuccessCallback | null,
153
+ /**
154
+ * 接口调用失败的回调函数
155
+ */
156
+ fail?: CheckIsSoterEnrolledInDeviceFailCallback | null,
157
+ /**
158
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
159
+ */
160
+ complete?: CheckIsSoterEnrolledInDeviceCompleteCallback | null
161
+ };