@dcloudio/uni-app-x 0.7.58 → 0.7.59

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 (138) hide show
  1. package/package.json +6 -2
  2. package/types/index.d.ts +1 -0
  3. package/types/native/CSSStyleDeclaration.d.ts +31 -6
  4. package/types/native/DOMRect.d.ts +60 -10
  5. package/types/native/IUniElement.d.ts +459 -0
  6. package/types/native/UniElement.d.ts +3 -2
  7. package/types/native/UniPage.d.ts +2 -2
  8. package/types/native/UniWebViewContentHeightChangeEvent.d.ts +31 -0
  9. package/types/native/UniWebViewElement.d.ts +3 -1
  10. package/types/native/global.d.ts +8 -0
  11. package/types/native/index.d.ts +1 -0
  12. package/types/uni/env/index.d.ts +5 -5
  13. package/types/uni/uts-plugin-api/.temp/uni-actionSheet/utssdk/interface.uts +554 -0
  14. package/types/uni/uts-plugin-api/.temp/uni-addPhoneContact/utssdk/interface.uts +224 -0
  15. package/types/uni/uts-plugin-api/.temp/uni-arrayBufferToBase64/utssdk/interface.uts +77 -0
  16. package/types/uni/uts-plugin-api/.temp/uni-authentication/utssdk/interface.uts +365 -0
  17. package/types/uni/uts-plugin-api/.temp/uni-base64ToArrayBuffer/utssdk/interface.uts +77 -0
  18. package/types/uni/uts-plugin-api/.temp/uni-canvas/utssdk/interface.uts +972 -0
  19. package/types/uni/uts-plugin-api/.temp/uni-chooseLocation/utssdk/interface.uts +410 -0
  20. package/types/uni/uts-plugin-api/.temp/uni-chooseMedia/utssdk/interface.uts +459 -0
  21. package/types/uni/uts-plugin-api/.temp/uni-clipboard/utssdk/interface.uts +203 -0
  22. package/types/uni/uts-plugin-api/.temp/uni-createInnerAudioContext/utssdk/interface.uts +2613 -0
  23. package/types/uni/uts-plugin-api/.temp/uni-createIntersectionObserver/utssdk/interface.uts +152 -0
  24. package/types/uni/uts-plugin-api/.temp/uni-createRequestPermissionListener/utssdk/interface.uts +61 -0
  25. package/types/uni/uts-plugin-api/.temp/uni-createSelectorQuery/utssdk/interface.uts +548 -0
  26. package/types/uni/uts-plugin-api/.temp/uni-createWebviewContext/utssdk/interface.uts +137 -0
  27. package/types/uni/uts-plugin-api/.temp/uni-dialogPage/utssdk/interface.uts +1380 -0
  28. package/types/uni/uts-plugin-api/.temp/uni-document/utssdk/interface.uts +76 -0
  29. package/types/uni/uts-plugin-api/.temp/uni-event/utssdk/interface.uts +338 -0
  30. package/types/uni/uts-plugin-api/.temp/uni-exit/utssdk/interface.uts +102 -0
  31. package/types/uni/uts-plugin-api/.temp/uni-file/utssdk/interface.uts +384 -0
  32. package/types/uni/uts-plugin-api/.temp/uni-fileSystemManager/utssdk/interface.uts +5316 -0
  33. package/types/uni/uts-plugin-api/.temp/uni-getAccessibilityInfo/utssdk/interface.uts +35 -0
  34. package/types/uni/uts-plugin-api/.temp/uni-getAppAuthorizeSetting/utssdk/interface.uts +616 -0
  35. package/types/uni/uts-plugin-api/.temp/uni-getAppBaseInfo/utssdk/interface.uts +2157 -0
  36. package/types/uni/uts-plugin-api/.temp/uni-getBackgroundAudioManager/utssdk/interface.uts +895 -0
  37. package/types/uni/uts-plugin-api/.temp/uni-getDeviceInfo/utssdk/interface.uts +1755 -0
  38. package/types/uni/uts-plugin-api/.temp/uni-getElementById/utssdk/interface.uts +82 -0
  39. package/types/uni/uts-plugin-api/.temp/uni-getEnterOptionsSync/utssdk/interface.uts +295 -0
  40. package/types/uni/uts-plugin-api/.temp/uni-getLaunchOptionsSync/utssdk/interface.uts +299 -0
  41. package/types/uni/uts-plugin-api/.temp/uni-getLocation/utssdk/interface.uts +1764 -0
  42. package/types/uni/uts-plugin-api/.temp/uni-getLocation-system/utssdk/interface.uts +1 -0
  43. package/types/uni/uts-plugin-api/.temp/uni-getLocation-tencent/utssdk/interface.uts +1 -0
  44. package/types/uni/uts-plugin-api/.temp/uni-getLocation-tencent-uni1/utssdk/interface.uts +736 -0
  45. package/types/uni/uts-plugin-api/.temp/uni-getNetworkType/utssdk/interface.uts +274 -0
  46. package/types/uni/uts-plugin-api/.temp/uni-getPerformance/utssdk/interface.uts +198 -0
  47. package/types/uni/uts-plugin-api/.temp/uni-getProvider/utssdk/interface.uts +634 -0
  48. package/types/uni/uts-plugin-api/.temp/uni-getRecorderManager/utssdk/interface.uts +980 -0
  49. package/types/uni/uts-plugin-api/.temp/uni-getSystemInfo/utssdk/interface.uts +5550 -0
  50. package/types/uni/uts-plugin-api/.temp/uni-getSystemSetting/utssdk/interface.uts +501 -0
  51. package/types/uni/uts-plugin-api/.temp/uni-installApk/utssdk/interface.uts +83 -0
  52. package/types/uni/uts-plugin-api/.temp/uni-interceptor/utssdk/interface.uts +169 -0
  53. package/types/uni/uts-plugin-api/.temp/uni-keyboard/utssdk/interface.uts +102 -0
  54. package/types/uni/uts-plugin-api/.temp/uni-loadFontFace/utssdk/interface.uts +580 -0
  55. package/types/uni/uts-plugin-api/.temp/uni-makePhoneCall/utssdk/interface.uts +100 -0
  56. package/types/uni/uts-plugin-api/.temp/uni-media/utssdk/interface.uts +2980 -0
  57. package/types/uni/uts-plugin-api/.temp/uni-modal/utssdk/interface.uts +190 -0
  58. package/types/uni/uts-plugin-api/.temp/uni-navigationBar/utssdk/interface.uts +1002 -0
  59. package/types/uni/uts-plugin-api/.temp/uni-network/utssdk/interface.uts +3620 -0
  60. package/types/uni/uts-plugin-api/.temp/uni-oauth/utssdk/interface.uts +1592 -0
  61. package/types/uni/uts-plugin-api/.temp/uni-oauth-huawei/utssdk/interface.uts +1 -0
  62. package/types/uni/uts-plugin-api/.temp/uni-openAppAuthorizeSetting/utssdk/interface.uts +254 -0
  63. package/types/uni/uts-plugin-api/.temp/uni-openDocument/utssdk/interface.uts +112 -0
  64. package/types/uni/uts-plugin-api/.temp/uni-pageScrollTo/utssdk/interface.uts +153 -0
  65. package/types/uni/uts-plugin-api/.temp/uni-payment/utssdk/interface.uts +833 -0
  66. package/types/uni/uts-plugin-api/.temp/uni-payment-alipay/utssdk/interface.uts +1 -0
  67. package/types/uni/uts-plugin-api/.temp/uni-payment-huawei/utssdk/interface.uts +1 -0
  68. package/types/uni/uts-plugin-api/.temp/uni-payment-wxpay/utssdk/interface.uts +3 -0
  69. package/types/uni/uts-plugin-api/.temp/uni-previewImage/utssdk/interface.uts +518 -0
  70. package/types/uni/uts-plugin-api/.temp/uni-privacy/utssdk/interface.uts +560 -0
  71. package/types/uni/uts-plugin-api/.temp/uni-prompt/utssdk/interface.uts +2607 -0
  72. package/types/uni/uts-plugin-api/.temp/uni-pullDownRefresh/utssdk/interface.uts +189 -0
  73. package/types/uni/uts-plugin-api/.temp/uni-requestMerchantTransfer/utssdk/interface.uts +710 -0
  74. package/types/uni/uts-plugin-api/.temp/uni-route/utssdk/interface.uts +2695 -0
  75. package/types/uni/uts-plugin-api/.temp/uni-rpx2px/utssdk/interface.uts +80 -0
  76. package/types/uni/uts-plugin-api/.temp/uni-scanCode/utssdk/interface.uts +130 -0
  77. package/types/uni/uts-plugin-api/.temp/uni-shareWithSystem/utssdk/interface.uts +719 -0
  78. package/types/uni/uts-plugin-api/.temp/uni-sse/utssdk/interface.uts +277 -0
  79. package/types/uni/uts-plugin-api/.temp/uni-storage/utssdk/interface.uts +1020 -0
  80. package/types/uni/uts-plugin-api/.temp/uni-tabBar/utssdk/interface.uts +1148 -0
  81. package/types/uni/uts-plugin-api/.temp/uni-theme/utssdk/interface.uts +1059 -0
  82. package/types/uni/uts-plugin-api/.temp/uni-virtualPayment/utssdk/interface.uts +1660 -0
  83. package/types/uni/uts-plugin-api/.temp/uni-websocket/utssdk/interface.uts +1941 -0
  84. package/types/uni/uts-plugin-api/global.d.ts +3 -0
  85. package/types/uni/uts-plugin-api/index.d.ts +3 -0
  86. package/types/uni/uts-plugin-api/lib/uni-barcode-scanning/utssdk/global.d.ts +8 -0
  87. package/types/uni/uts-plugin-api/lib/uni-barcode-scanning/utssdk/index.d.ts +4 -0
  88. package/types/uni/uts-plugin-api/lib/uni-barcode-scanning/utssdk/interface.d.ts +0 -0
  89. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +4 -0
  90. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +2 -0
  91. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +16 -6
  92. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +1 -1
  93. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +2 -0
  94. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +1 -0
  95. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +45 -0
  96. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +3 -0
  97. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +238 -233
  98. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +1 -1
  99. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +28 -1
  100. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +0 -9
  101. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +67 -239
  102. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +24 -4
  103. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/global.d.ts +4 -0
  104. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/index.d.ts +2 -0
  105. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +293 -179
  106. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +118 -78
  107. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +8 -0
  108. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +4 -0
  109. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +3932 -3514
  110. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +4 -0
  111. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +2 -0
  112. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +778 -290
  113. package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/global.d.ts +4 -0
  114. package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/index.d.ts +2 -0
  115. package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/interface.d.ts +2254 -1281
  116. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +1 -1
  117. package/types/uni/uts-plugin-api/lib/uni-share/utssdk/global.d.ts +36 -0
  118. package/types/uni/uts-plugin-api/lib/uni-share/utssdk/index.d.ts +17 -0
  119. package/types/uni/uts-plugin-api/lib/uni-share/utssdk/interface.d.ts +180 -0
  120. package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/global.d.ts +8 -0
  121. package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/index.d.ts +4 -0
  122. package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/interface.d.ts +1 -0
  123. package/types/uni/uts-plugin-api/lib/uni-sse/utssdk/interface.d.ts +2 -2
  124. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +126 -67
  125. package/types/uni/uts-plugin-biz/.temp/uni-ad/utssdk/interface.uts +726 -0
  126. package/types/uni/uts-plugin-biz/.temp/uni-crash/utssdk/interface.uts +89 -0
  127. package/types/uni/uts-plugin-biz/.temp/uni-facialRecognitionVerify/utssdk/interface.uts +212 -0
  128. package/types/uni/uts-plugin-biz/.temp/uni-map-tencent/utssdk/interface.uts +2359 -0
  129. package/types/uni/uts-plugin-biz/.temp/uni-push/utssdk/interface.uts +960 -0
  130. package/types/uni/uts-plugin-biz/.temp/uni-secure-network/utssdk/interface.uts +204 -0
  131. package/types/uni/uts-plugin-biz/.temp/uni-verify/utssdk/interface.uts +730 -0
  132. package/types/uni/uts-plugin-component/.temp/uni-camera/utssdk/interface.uts +221 -0
  133. package/types/uni/uts-plugin-component/.temp/uni-video/utssdk/interface.uts +935 -0
  134. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/global.d.ts +16 -0
  135. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/index.d.ts +8 -0
  136. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/interface.d.ts +203 -1
  137. package/types/uni-cloud/interface.d.ts +229 -0
  138. package/types/vite.d.ts +269 -0
@@ -15,6 +15,14 @@ import {
15
15
  CameraContextStopRecordOptions as CameraContextStopRecordOptionsOrigin,
16
16
  CameraContext as CameraContextOrigin,
17
17
  CreateCameraContext as CreateCameraContextOrigin,
18
+ ScreenShot as ScreenShotOrigin,
19
+ BarcodeInformation as BarcodeInformationOrigin,
20
+ AndroidScannerListener as AndroidScannerListenerOrigin,
21
+ AndroidFrameScannerOptions as AndroidFrameScannerOptionsOrigin,
22
+ AndroidPhotoScannerOptions as AndroidPhotoScannerOptionsOrigin,
23
+ AndroidScanner as AndroidScannerOrigin,
24
+ initAndroidScanner as initAndroidScannerOrigin,
25
+ getAndroidScanner as getAndroidScannerOrigin,
18
26
  Uni as UniOrigin
19
27
  } from './interface'
20
28
 
@@ -34,5 +42,13 @@ declare global {
34
42
  type CameraContextStopRecordOptions = CameraContextStopRecordOptionsOrigin
35
43
  type CameraContext = CameraContextOrigin
36
44
  type CreateCameraContext = CreateCameraContextOrigin
45
+ type ScreenShot = ScreenShotOrigin
46
+ type BarcodeInformation = BarcodeInformationOrigin
47
+ type AndroidScannerListener = AndroidScannerListenerOrigin
48
+ type AndroidFrameScannerOptions = AndroidFrameScannerOptionsOrigin
49
+ type AndroidPhotoScannerOptions = AndroidPhotoScannerOptionsOrigin
50
+ type AndroidScanner = AndroidScannerOrigin
51
+ type initAndroidScanner = initAndroidScannerOrigin
52
+ type getAndroidScanner = getAndroidScannerOrigin
37
53
  interface Uni extends UniOrigin { }
38
54
  }
@@ -15,4 +15,12 @@ export {
15
15
  CameraContextStopRecordOptions,
16
16
  CameraContext,
17
17
  CreateCameraContext,
18
+ ScreenShot,
19
+ BarcodeInformation,
20
+ AndroidScannerListener,
21
+ AndroidFrameScannerOptions,
22
+ AndroidPhotoScannerOptions,
23
+ AndroidScanner,
24
+ initAndroidScanner,
25
+ getAndroidScanner,
18
26
  } from './interface'
@@ -1,3 +1,10 @@
1
+ // #ifdef APP-ANDROID
2
+ import ImageProxy from "androidx.camera.core.ImageProxy";
3
+ // import ByteBuffer from 'java.nio.ByteBuffer'
4
+ import Bitmap from 'android.graphics.Bitmap';
5
+ import Context from 'android.content.Context';
6
+ // #endif
7
+
1
8
  export type CameraErrorCode =
2
9
  /**
3
10
  * 相机权限未授权
@@ -756,7 +763,6 @@ export type CameraContextStopRecordOptions = {
756
763
  complete ?: ((result : any) => void) | null;
757
764
  }
758
765
 
759
-
760
766
  export interface CameraContext {
761
767
  /**
762
768
  * 获取 Camera 实时帧数据
@@ -777,6 +783,156 @@ export interface CameraContext {
777
783
  * }
778
784
  */
779
785
  onCameraFrame(callback : (frame : CameraContextOnCameraFrame) => void) : CameraContextCameraFrameListener | null;
786
+
787
+
788
+ // #ifdef APP-ANDROID
789
+ /**
790
+ * 获取Android平台的原始帧数据,**获取到了ImageProxy使用后一定要close,否则App会触发崩溃
791
+ * @uniPlatform {
792
+ * "mp": {
793
+ * "weixin": {
794
+ * "hostVer": "√",
795
+ * "uniVer": "√",
796
+ * "unixVer": "4.41"
797
+ * },
798
+ * "alipay": {
799
+ * "hostVer": "-",
800
+ * "uniVer": "-",
801
+ * "unixVer": "-"
802
+ * },
803
+ * "baidu": {
804
+ * "hostVer": "-",
805
+ * "uniVer": "-",
806
+ * "unixVer": "-"
807
+ * },
808
+ * "toutiao": {
809
+ * "hostVer": "-",
810
+ * "uniVer": "-",
811
+ * "unixVer": "-"
812
+ * },
813
+ * "lark": {
814
+ * "hostVer": "-",
815
+ * "uniVer": "-",
816
+ * "unixVer": "-"
817
+ * },
818
+ * "qq": {
819
+ * "hostVer": "-",
820
+ * "uniVer": "-",
821
+ * "unixVer": "-"
822
+ * },
823
+ * "kuaishou": {
824
+ * "hostVer": "-",
825
+ * "uniVer": "-",
826
+ * "unixVer": "-"
827
+ * },
828
+ * "jd": {
829
+ * "hostVer": "-",
830
+ * "uniVer": "-",
831
+ * "unixVer": "-"
832
+ * }
833
+ * }
834
+ * }
835
+ */
836
+ onAndroidCameraOriginalFrame(callback: (imageProxy: ImageProxy) => void): void;
837
+
838
+ /**
839
+ * 停止获取Android平台的原始帧数据
840
+ * @uniPlatform {
841
+ * "mp": {
842
+ * "weixin": {
843
+ * "hostVer": "√",
844
+ * "uniVer": "√",
845
+ * "unixVer": "4.41"
846
+ * },
847
+ * "alipay": {
848
+ * "hostVer": "-",
849
+ * "uniVer": "-",
850
+ * "unixVer": "-"
851
+ * },
852
+ * "baidu": {
853
+ * "hostVer": "-",
854
+ * "uniVer": "-",
855
+ * "unixVer": "-"
856
+ * },
857
+ * "toutiao": {
858
+ * "hostVer": "-",
859
+ * "uniVer": "-",
860
+ * "unixVer": "-"
861
+ * },
862
+ * "lark": {
863
+ * "hostVer": "-",
864
+ * "uniVer": "-",
865
+ * "unixVer": "-"
866
+ * },
867
+ * "qq": {
868
+ * "hostVer": "-",
869
+ * "uniVer": "-",
870
+ * "unixVer": "-"
871
+ * },
872
+ * "kuaishou": {
873
+ * "hostVer": "-",
874
+ * "uniVer": "-",
875
+ * "unixVer": "-"
876
+ * },
877
+ * "jd": {
878
+ * "hostVer": "-",
879
+ * "uniVer": "-",
880
+ * "unixVer": "-"
881
+ * }
882
+ * }
883
+ * }
884
+ */
885
+ offAndroidCameraOriginalFrame();
886
+
887
+ /**
888
+ * 获取当前缩放级别
889
+ * @uniPlatform {
890
+ * "mp": {
891
+ * "weixin": {
892
+ * "hostVer": "√",
893
+ * "uniVer": "√",
894
+ * "unixVer": "4.41"
895
+ * },
896
+ * "alipay": {
897
+ * "hostVer": "-",
898
+ * "uniVer": "-",
899
+ * "unixVer": "-"
900
+ * },
901
+ * "baidu": {
902
+ * "hostVer": "-",
903
+ * "uniVer": "-",
904
+ * "unixVer": "-"
905
+ * },
906
+ * "toutiao": {
907
+ * "hostVer": "-",
908
+ * "uniVer": "-",
909
+ * "unixVer": "-"
910
+ * },
911
+ * "lark": {
912
+ * "hostVer": "-",
913
+ * "uniVer": "-",
914
+ * "unixVer": "-"
915
+ * },
916
+ * "qq": {
917
+ * "hostVer": "-",
918
+ * "uniVer": "-",
919
+ * "unixVer": "-"
920
+ * },
921
+ * "kuaishou": {
922
+ * "hostVer": "-",
923
+ * "uniVer": "-",
924
+ * "unixVer": "-"
925
+ * },
926
+ * "jd": {
927
+ * "hostVer": "-",
928
+ * "uniVer": "-",
929
+ * "unixVer": "-"
930
+ * }
931
+ * }
932
+ * }
933
+ */
934
+ getCurrentZoom() : number;
935
+ // #endif
780
936
  /**
781
937
  * 设置缩放级别
782
938
  *
@@ -857,6 +1013,52 @@ export interface CameraContext {
857
1013
 
858
1014
  export type CreateCameraContext = () => CameraContext | null;
859
1015
 
1016
+ // #ifdef APP-ANDROID
1017
+ export type ScreenShot = {
1018
+ bitmap: Bitmap,
1019
+ }
1020
+
1021
+ export type BarcodeInformation = {
1022
+ result: string,
1023
+ scanType: string,
1024
+ charset: string,
1025
+ rawData: string,
1026
+ scanArea: Array<number>
1027
+ }
1028
+
1029
+ export interface AndroidScannerListener {
1030
+ onScanSuccess(barcodeInformation: Array<BarcodeInformation>, screenShot: ScreenShot | null): void;
1031
+ onScanFailure(error: string): void;
1032
+ needZoom(): void;
1033
+ onLight(light: boolean):void;
1034
+ }
1035
+
1036
+ export type AndroidFrameScannerOptions = {
1037
+ imageProxy: ImageProxy,
1038
+ scanType : Array<string>,
1039
+ autoZoom: boolean,
1040
+ width: number,
1041
+ height: number,
1042
+ androidScannerListenner : AndroidScannerListener | null
1043
+ }
1044
+
1045
+ export type AndroidPhotoScannerOptions = {
1046
+ context: Context,
1047
+ filePath: string,
1048
+ scanType : Array<string>,
1049
+ androidScannerListenner : AndroidScannerListener | null
1050
+ }
1051
+
1052
+ export interface AndroidScanner {
1053
+ processScanBarCode(options: AndroidFrameScannerOptions):void;
1054
+ processScanBarCodeWithPhoto(options: AndroidPhotoScannerOptions):void;
1055
+ }
1056
+
1057
+ export type initAndroidScanner = (scanner: AndroidScanner) => void
1058
+
1059
+ export type getAndroidScanner = () => AndroidScanner | null
1060
+ // #endif
1061
+
860
1062
 
861
1063
  export interface Uni {
862
1064
  /**
@@ -40,6 +40,7 @@ type UniCloudInitOptions = {
40
40
  */
41
41
  wsEndpoint?: string
42
42
  };
43
+ type SecretType = 'request' | 'response' | 'both' | 'none'
43
44
  type UniCloudCallFunctionOptions = {
44
45
  /**
45
46
  * 云函数名
@@ -49,6 +50,38 @@ type UniCloudCallFunctionOptions = {
49
50
  * 云函数参数
50
51
  */
51
52
  data?: UTSJSONObject;
53
+ /**
54
+ * 加密类型,指定加密请求、响应还是都加密
55
+ * @uniPlatform {
56
+ * "app": {
57
+ * "android": {
58
+ * "osVer": "5.0",
59
+ * "uniVer": "√",
60
+ * "unixVer": "4.65"
61
+ * },
62
+ * "ios": {
63
+ * "uniVer": "√",
64
+ * "unixVer": "4.65"
65
+ * },
66
+ * "harmony": {
67
+ * "uniVer": "x",
68
+ * "unixVer": "x"
69
+ * }
70
+ * },
71
+ * "mp": {
72
+ * "weixin": {
73
+ * "osVer": "√",
74
+ * "uniVer": "√",
75
+ * "unixVer": "4.41"
76
+ * }
77
+ * },
78
+ * "web": {
79
+ * "uniVer": "x",
80
+ * "unixVer": "x"
81
+ * }
82
+ * }
83
+ */
84
+ secretType?: SecretType
52
85
  };
53
86
  type UniCloudCallFunctionResult<T = UTSJSONObject> = {
54
87
  /**
@@ -276,6 +309,17 @@ declare class UniCloudError extends Error {
276
309
  * "ios": {
277
310
  * "uniVer": "√",
278
311
  * "unixVer": "4.11"
312
+ * },
313
+ * "harmony": {
314
+ * "uniVer": "√",
315
+ * "unixVer": "4.61"
316
+ * }
317
+ * },
318
+ * "mp": {
319
+ * "weixin": {
320
+ * "osVer": "√",
321
+ * "uniVer": "√",
322
+ * "unixVer": "4.41"
279
323
  * }
280
324
  * },
281
325
  * "web": {
@@ -367,6 +411,38 @@ type UniCloudImportObjectOptions = {
367
411
  * 错误提示配置
368
412
  */
369
413
  errorOptions?: UniCloudImportObjectErrorOptions | null;
414
+ /**
415
+ * 指定方法的加密类型
416
+ * @uniPlatform {
417
+ * "app": {
418
+ * "android": {
419
+ * "osVer": "5.0",
420
+ * "uniVer": "√",
421
+ * "unixVer": "4.65"
422
+ * },
423
+ * "ios": {
424
+ * "uniVer": "√",
425
+ * "unixVer": "4.65"
426
+ * },
427
+ * "harmony": {
428
+ * "uniVer": "x",
429
+ * "unixVer": "x"
430
+ * }
431
+ * },
432
+ * "mp": {
433
+ * "weixin": {
434
+ * "osVer": "√",
435
+ * "uniVer": "√",
436
+ * "unixVer": "4.41"
437
+ * }
438
+ * },
439
+ * "web": {
440
+ * "uniVer": "x",
441
+ * "unixVer": "x"
442
+ * }
443
+ * }
444
+ */
445
+ secretMethods?: Record<string, SecretType>;
370
446
  };
371
447
  declare class InternalUniCloudCloudObject {
372
448
  private _name;
@@ -673,6 +749,63 @@ type UniCloudConnectWebSocketOptions = {
673
749
  query?: UTSJSONObject;
674
750
  }
675
751
 
752
+ declare class SSEChannel implements IJSONStringify {
753
+ constructor();
754
+ /**
755
+ * @description 开启通道,注意只有开启之后才能把SSEChannel实例传入云函数
756
+ */
757
+ open(): Promise<void>;
758
+ toJSON(): {
759
+ appId: string;
760
+ pushClientId: string;
761
+ seqId: string;
762
+ };
763
+ /**
764
+ * @description 关闭通道
765
+ */
766
+ close(): void;
767
+ /**
768
+ * @description 监听消息接收事件
769
+ */
770
+ on(event: 'message', callback: (message: string) => void): void;
771
+ /**
772
+ * @description 监听连接关闭事件
773
+ */
774
+ on(event: 'end', callback: (message: string) => void): void;
775
+ /**
776
+ * @description 监听连接打开事件
777
+ */
778
+ on(event: 'open', callback: () => void): void;
779
+ /**
780
+ * @description 监听连接关闭事件
781
+ */
782
+ on(event: 'close', callback: () => void): void;
783
+ /**
784
+ * @description 监听连接错误事件
785
+ */
786
+ on(event: 'error', callback: (error: UniCloudError) => void): void;
787
+ /**
788
+ * @description 取消监听消息接收事件
789
+ */
790
+ off(event: 'message', callback: (message: string) => void): void;
791
+ /**
792
+ * @description 取消监听连接关闭事件
793
+ */
794
+ off(event: 'end', callback: (message: string) => void): void;
795
+ /**
796
+ * @description 取消监听连接打开事件
797
+ */
798
+ off(event: 'open', callback: () => void): void;
799
+ /**
800
+ * @description 取消监听连接关闭事件
801
+ */
802
+ off(event: 'close', callback: () => void): void;
803
+ /**
804
+ * @description 取消监听连接错误事件
805
+ */
806
+ off(event: 'error', callback: (error: UniCloudError) => void): void;
807
+ }
808
+
676
809
  declare class UniCloud {
677
810
  private _client;
678
811
  private _provider;
@@ -713,6 +846,17 @@ declare class UniCloud {
713
846
  * "ios": {
714
847
  * "uniVer": "4.21",
715
848
  * "unixVer": "4.21"
849
+ * },
850
+ * "harmony": {
851
+ * "uniVer": "√",
852
+ * "unixVer": "4.61"
853
+ * }
854
+ * },
855
+ * "mp": {
856
+ * "weixin": {
857
+ * "hostVer": "√",
858
+ * "uniVer": "√",
859
+ * "unixVer": "4.41"
716
860
  * }
717
861
  * },
718
862
  * "web": {
@@ -736,6 +880,10 @@ declare class UniCloud {
736
880
  * "ios": {
737
881
  * "uniVer": "√",
738
882
  * "unixVer": "4.11"
883
+ * },
884
+ * "harmony": {
885
+ * "uniVer": "√",
886
+ * "unixVer": "4.61"
739
887
  * }
740
888
  * },
741
889
  * "mp": {
@@ -765,6 +913,10 @@ declare class UniCloud {
765
913
  * "ios": {
766
914
  * "uniVer": "√",
767
915
  * "unixVer": "4.11"
916
+ * },
917
+ * "harmony": {
918
+ * "uniVer": "√",
919
+ * "unixVer": "4.61"
768
920
  * }
769
921
  * },
770
922
  * "mp": {
@@ -794,6 +946,10 @@ declare class UniCloud {
794
946
  * "ios": {
795
947
  * "uniVer": "√",
796
948
  * "unixVer": "4.11"
949
+ * },
950
+ * "harmony": {
951
+ * "uniVer": "√",
952
+ * "unixVer": "4.61"
797
953
  * }
798
954
  * },
799
955
  * "mp": {
@@ -823,6 +979,10 @@ declare class UniCloud {
823
979
  * "ios": {
824
980
  * "uniVer": "√",
825
981
  * "unixVer": "4.11"
982
+ * },
983
+ * "harmony": {
984
+ * "uniVer": "√",
985
+ * "unixVer": "4.61"
826
986
  * }
827
987
  * },
828
988
  * "mp": {
@@ -830,6 +990,10 @@ declare class UniCloud {
830
990
  * "osVer": "√",
831
991
  * "uniVer": "√",
832
992
  * "unixVer": "4.41"
993
+ * },
994
+ * "harmony": {
995
+ * "uniVer": "√",
996
+ * "unixVer": "4.61"
833
997
  * }
834
998
  * },
835
999
  * "web": {
@@ -852,6 +1016,10 @@ declare class UniCloud {
852
1016
  * "ios": {
853
1017
  * "uniVer": "√",
854
1018
  * "unixVer": "4.11"
1019
+ * },
1020
+ * "harmony": {
1021
+ * "uniVer": "√",
1022
+ * "unixVer": "4.61"
855
1023
  * }
856
1024
  * },
857
1025
  * "mp": {
@@ -881,6 +1049,10 @@ declare class UniCloud {
881
1049
  * "ios": {
882
1050
  * "uniVer": "√",
883
1051
  * "unixVer": "4.11"
1052
+ * },
1053
+ * "harmony": {
1054
+ * "uniVer": "√",
1055
+ * "unixVer": "4.61"
884
1056
  * }
885
1057
  * },
886
1058
  * "mp": {
@@ -910,6 +1082,10 @@ declare class UniCloud {
910
1082
  * "ios": {
911
1083
  * "uniVer": "√",
912
1084
  * "unixVer": "4.11"
1085
+ * },
1086
+ * "harmony": {
1087
+ * "uniVer": "√",
1088
+ * "unixVer": "4.61"
913
1089
  * }
914
1090
  * },
915
1091
  * "mp": {
@@ -939,6 +1115,10 @@ declare class UniCloud {
939
1115
  * "ios": {
940
1116
  * "uniVer": "√",
941
1117
  * "unixVer": "4.11"
1118
+ * },
1119
+ * "harmony": {
1120
+ * "uniVer": "√",
1121
+ * "unixVer": "4.61"
942
1122
  * }
943
1123
  * },
944
1124
  * "mp": {
@@ -968,6 +1148,10 @@ declare class UniCloud {
968
1148
  * "ios": {
969
1149
  * "uniVer": "√",
970
1150
  * "unixVer": "4.11"
1151
+ * },
1152
+ * "harmony": {
1153
+ * "uniVer": "√",
1154
+ * "unixVer": "4.61"
971
1155
  * }
972
1156
  * },
973
1157
  * "mp": {
@@ -997,6 +1181,10 @@ declare class UniCloud {
997
1181
  * "ios": {
998
1182
  * "uniVer": "√",
999
1183
  * "unixVer": "4.11"
1184
+ * },
1185
+ * "harmony": {
1186
+ * "uniVer": "√",
1187
+ * "unixVer": "4.61"
1000
1188
  * }
1001
1189
  * },
1002
1190
  * "mp": {
@@ -1026,6 +1214,10 @@ declare class UniCloud {
1026
1214
  * "ios": {
1027
1215
  * "uniVer": "√",
1028
1216
  * "unixVer": "4.11"
1217
+ * },
1218
+ * "harmony": {
1219
+ * "uniVer": "√",
1220
+ * "unixVer": "4.61"
1029
1221
  * }
1030
1222
  * },
1031
1223
  * "mp": {
@@ -1055,6 +1247,10 @@ declare class UniCloud {
1055
1247
  * "ios": {
1056
1248
  * "uniVer": "4.23",
1057
1249
  * "unixVer": "4.24"
1250
+ * },
1251
+ * "harmony": {
1252
+ * "uniVer": "√",
1253
+ * "unixVer": "4.61"
1058
1254
  * }
1059
1255
  * },
1060
1256
  * "mp": {
@@ -1071,6 +1267,39 @@ declare class UniCloud {
1071
1267
  * }
1072
1268
  */
1073
1269
  connectWebSocket(options: UniCloudConnectWebSocketOptions): SocketTask;
1270
+ /**
1271
+ * 服务端通知通道
1272
+ * @description 服务端通知通道
1273
+ * @uniPlatform {
1274
+ * "app": {
1275
+ * "android": {
1276
+ * "osVer": "5.0",
1277
+ * "uniVer": "√",
1278
+ * "unixVer": "4.65"
1279
+ * },
1280
+ * "ios": {
1281
+ * "uniVer": "√",
1282
+ * "unixVer": "4.65"
1283
+ * },
1284
+ * "harmony": {
1285
+ * "uniVer": "√",
1286
+ * "unixVer": "4.61"
1287
+ * }
1288
+ * },
1289
+ * "mp": {
1290
+ * "weixin": {
1291
+ * "osVer": "√",
1292
+ * "uniVer": "√",
1293
+ * "unixVer": "4.65"
1294
+ * }
1295
+ * },
1296
+ * "web": {
1297
+ * "uniVer": "√",
1298
+ * "unixVer": "4.65"
1299
+ * }
1300
+ * }
1301
+ */
1302
+ get SSEChannel(): typeof SSEChannel;
1074
1303
  }
1075
1304
 
1076
1305
  declare const uniCloud: UniCloud;