@dcloudio/uni-app-x 0.7.13 → 0.7.15

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 (187) hide show
  1. package/options.d.ts +1 -1
  2. package/package.json +1 -1
  3. package/types/app.d.ts +5 -6
  4. package/types/index.d.ts +1 -1
  5. package/types/native/CanvasRenderingContext2D.d.ts +378 -0
  6. package/types/native/IUniElement.d.ts +40 -12
  7. package/types/native/Path2D.d.ts +74 -0
  8. package/types/native/UniApp.d.ts +17 -1
  9. package/types/native/UniCanvasElement.d.ts +9 -0
  10. package/types/native/UniEvent.d.ts +30 -0
  11. package/types/native/UniNativePage.d.ts +31 -1
  12. package/types/native/UniPageManager.d.ts +4 -1
  13. package/types/native/UniProvider.d.ts +14 -0
  14. package/types/native/UniResizeObserver.d.ts +10 -10
  15. package/types/native/UniScrollEvent.d.ts +1 -1
  16. package/types/native/UniSwiperAnimationFinishEvent.d.ts +24 -2
  17. package/types/native/UniSwiperChangeEvent.d.ts +24 -2
  18. package/types/native/UniSwiperTransitionEvent.d.ts +2 -2
  19. package/types/native/UniWebViewErrorEvent.d.ts +3 -3
  20. package/types/native/UniWebViewLoadEvent.d.ts +2 -2
  21. package/types/native/UniWebViewLoadingEvent.d.ts +2 -2
  22. package/types/native/UniWebViewMessageEvent.d.ts +1 -1
  23. package/types/native/global.d.ts +40 -9
  24. package/types/native/index.d.ts +4 -0
  25. package/types/page.d.ts +85 -0
  26. package/types/shim-uts-basic.d.ts +4495 -0
  27. package/types/uni/env/index.d.ts +21 -0
  28. package/types/uni/global.d.ts +1 -0
  29. package/types/uni/index.d.ts +2 -1
  30. package/types/uni/uts-plugin-api/global.d.ts +14 -2
  31. package/types/uni/uts-plugin-api/index.d.ts +14 -2
  32. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/global.d.ts +10 -0
  33. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/index.d.ts +4 -0
  34. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +77 -0
  35. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/global.d.ts +10 -0
  36. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/index.d.ts +4 -0
  37. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +77 -0
  38. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +40 -0
  39. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +19 -0
  40. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +203 -0
  41. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/global.d.ts +20 -0
  42. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/index.d.ts +9 -0
  43. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +152 -0
  44. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +20 -3
  45. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +19 -8
  46. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +13 -6
  47. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +30 -2
  48. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +12 -3
  49. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +6 -0
  50. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +3 -0
  51. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +64 -8
  52. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +20 -17
  53. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +111 -27
  54. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +465 -45
  55. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +651 -115
  56. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +7 -1
  57. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +10 -1
  58. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/global.d.ts +24 -0
  59. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/index.d.ts +11 -0
  60. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +173 -0
  61. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +2 -14
  62. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +1 -6
  63. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -151
  64. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/global.d.ts +8 -0
  65. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/index.d.ts +4 -0
  66. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/interface.d.ts +1 -0
  67. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +12 -5
  68. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +11 -5
  69. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +8 -0
  70. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +4 -0
  71. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +176 -72
  72. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +1728 -59
  73. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +123 -16
  74. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/interface.d.ts +9 -6
  75. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +18 -2
  76. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/global.d.ts +22 -0
  77. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/index.d.ts +10 -0
  78. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +60 -0
  79. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +8 -1
  80. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/global.d.ts +24 -0
  81. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/index.d.ts +11 -0
  82. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +100 -0
  83. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +2 -0
  84. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +1 -0
  85. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +459 -67
  86. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +34 -5
  87. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +909 -101
  88. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +20 -15
  89. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +24 -0
  90. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +11 -0
  91. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +70 -0
  92. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/global.d.ts +2 -0
  93. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/index.d.ts +1 -0
  94. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +16 -6
  95. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +26 -16
  96. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/global.d.ts +8 -0
  97. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/index.d.ts +4 -0
  98. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/interface.d.ts +1 -0
  99. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/global.d.ts +8 -0
  100. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/index.d.ts +4 -0
  101. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/interface.d.ts +3 -0
  102. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +120 -42
  103. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/global.d.ts +2 -0
  104. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/index.d.ts +1 -0
  105. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +16 -1
  106. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +251 -42
  107. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +7 -2
  108. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/global.d.ts +24 -0
  109. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/index.d.ts +11 -0
  110. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +73 -0
  111. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +114 -45
  112. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/global.d.ts +16 -0
  113. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/index.d.ts +8 -0
  114. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +167 -7
  115. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +42 -0
  116. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +20 -0
  117. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +516 -0
  118. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +320 -83
  119. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +4 -4
  120. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +2 -2
  121. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +48 -39
  122. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +33 -15
  123. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +4 -0
  124. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +2 -0
  125. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +777 -394
  126. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +19 -15
  127. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +132 -15
  128. package/types/uni/uts-plugin-extend/README.md +3 -0
  129. package/types/uni/uts-plugin-extend/global.d.ts +13 -0
  130. package/types/uni/uts-plugin-extend/index.d.ts +13 -0
  131. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/global.d.ts +12 -0
  132. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/index.d.ts +1 -0
  133. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +365 -0
  134. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/global.d.ts +23 -0
  135. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/index.d.ts +10 -0
  136. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +710 -0
  137. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/global.d.ts +21 -0
  138. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/index.d.ts +9 -0
  139. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/interface.d.ts +151 -0
  140. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/global.d.ts +25 -0
  141. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/index.d.ts +11 -0
  142. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +363 -0
  143. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/global.d.ts +11 -0
  144. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/index.d.ts +4 -0
  145. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +224 -0
  146. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/global.d.ts +53 -0
  147. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/index.d.ts +25 -0
  148. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +486 -0
  149. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +7 -0
  150. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +1 -0
  151. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +296 -0
  152. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/global.d.ts +15 -0
  153. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/index.d.ts +1 -0
  154. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +229 -0
  155. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/global.d.ts +14 -0
  156. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/index.d.ts +1 -0
  157. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +559 -0
  158. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/global.d.ts +9 -0
  159. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/index.d.ts +1 -0
  160. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +163 -0
  161. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/global.d.ts +21 -0
  162. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/index.d.ts +9 -0
  163. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +143 -0
  164. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/global.d.ts +7 -0
  165. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/index.d.ts +1 -0
  166. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/interface.d.ts +106 -0
  167. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/global.d.ts +9 -0
  168. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/index.d.ts +1 -0
  169. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/interface.d.ts +165 -0
  170. package/types/uni-cloud/index.d.ts +4 -0
  171. package/types/uni-cloud/interface.d.ts +163 -20
  172. package/types/vue/CheckboxGroupChangeEvent.d.ts +10 -13
  173. package/types/vue/LifeCycle.d.ts +32 -32
  174. package/types/vue/PickerViewChangeEvent.d.ts +10 -13
  175. package/types/vue/ProgressActiveendEvent.d.ts +9 -11
  176. package/types/vue/RadioGroupChangeEvent.d.ts +10 -13
  177. package/types/vue/SliderChangeEvent.d.ts +9 -10
  178. package/types/vue/SwitchChangeEvent.d.ts +11 -13
  179. package/types/vue/UniCloudDBElement.d.ts +72 -75
  180. package/types/vue/UniFormElement.d.ts +17 -19
  181. package/types/vue/UniNavigatorElement.d.ts +1 -2
  182. package/types/vue/global.d.ts +190 -0
  183. package/types/vue/index.d.ts +10 -11
  184. package/types/vue-global/index.d.ts +1 -0
  185. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +0 -78
  186. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +0 -38
  187. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +0 -643
@@ -1,11 +1,9 @@
1
1
  export interface Uni {
2
2
  /**
3
- * ConnectSocket()
4
- * @description
5
3
  * 创建一个 WebSocket 连接。
6
- * @param {ConnectSocketOptions} options
7
- * @return {SocketTask}
8
- * @tutorial https://uniapp.dcloud.net.cn/api/request/websocket.html#connectsocket
4
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#connectsocket
5
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#connectsocket
6
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#connectsocket
9
7
  * @uniPlatform
10
8
  * {
11
9
  * "app": {
@@ -18,7 +16,12 @@ export interface Uni {
18
16
  * "osVer": "12.0",
19
17
  * "uniVer": "√",
20
18
  * "unixVer": "4.11"
21
- * }
19
+ * },
20
+ * "harmony": {
21
+ * "osVer": "3.0",
22
+ * "uniVer": "4.23",
23
+ * "unixVer": "x"
24
+ * }
22
25
  * },
23
26
  * "web": {
24
27
  * "uniVer": "√",
@@ -37,12 +40,11 @@ export interface Uni {
37
40
  */
38
41
  connectSocket(options: ConnectSocketOptions): SocketTask;
39
42
  /**
40
- * OnSocketOpen()
41
- * @description
43
+ * @description
42
44
  * 监听WebSocket连接打开事件。
43
- * @param {OnSocketOpenCallback} options
44
- * @return {void}
45
- * @tutorial https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketopen
45
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketopen
46
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketopen
47
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketopen
46
48
  * @uniPlatform
47
49
  * {
48
50
  * "app": {
@@ -55,7 +57,12 @@ export interface Uni {
55
57
  * "osVer": "12.0",
56
58
  * "uniVer": "√",
57
59
  * "unixVer": "4.11"
58
- * }
60
+ * },
61
+ * "harmony": {
62
+ * "osVer": "3.0",
63
+ * "uniVer": "4.23",
64
+ * "unixVer": "x"
65
+ * }
59
66
  * },
60
67
  * "web": {
61
68
  * "uniVer": "√",
@@ -72,12 +79,10 @@ export interface Uni {
72
79
  onSocketOpen(options: OnSocketOpenCallback): void;
73
80
 
74
81
  /**
75
- * OnSocketError()
76
- * @description
77
- * 下载文件资源到本地,客户端直接发起一个 HTTP GET 请求,返回文件的本地临时路径。
78
- * @param {OnSocketErrorCallback} callback
79
- * @return {void}
80
- * @tutorial https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketerror
82
+ * 监听WebSocket错误。
83
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketerror
84
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketerror
85
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketerror
81
86
  * @uniPlatform
82
87
  * {
83
88
  * "app": {
@@ -90,7 +95,12 @@ export interface Uni {
90
95
  * "osVer": "12.0",
91
96
  * "uniVer": "√",
92
97
  * "unixVer": "4.11"
93
- * }
98
+ * },
99
+ * "harmony": {
100
+ * "osVer": "3.0",
101
+ * "uniVer": "4.23",
102
+ * "unixVer": "x"
103
+ * }
94
104
  * },
95
105
  * "web": {
96
106
  * "uniVer": "√",
@@ -107,12 +117,10 @@ export interface Uni {
107
117
  onSocketError(callback: OnSocketErrorCallback): void;
108
118
 
109
119
  /**
110
- * SendSocketMessage()
111
- * @description
112
120
  * 通过 WebSocket 连接发送数据,需要先 uni.connectSocket,并在 uni.onSocketOpen 回调之后才能发送。
113
- * @param {SendSocketMessageOptions} options
114
- * @return {void}
115
- * @tutorial https://uniapp.dcloud.net.cn/api/request/websocket.html#sendsocketmessage
121
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#sendsocketmessage
122
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#sendsocketmessage
123
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#sendsocketmessage
116
124
  * @uniPlatform
117
125
  * {
118
126
  * "app": {
@@ -125,7 +133,12 @@ export interface Uni {
125
133
  * "osVer": "12.0",
126
134
  * "uniVer": "√",
127
135
  * "unixVer": "4.11"
128
- * }
136
+ * },
137
+ * "harmony": {
138
+ * "osVer": "x",
139
+ * "uniVer": "x",
140
+ * "unixVer": "x"
141
+ * }
129
142
  * },
130
143
  * "web": {
131
144
  * "uniVer": "√",
@@ -141,12 +154,10 @@ export interface Uni {
141
154
  */
142
155
  sendSocketMessage(options: SendSocketMessageOptions): void;
143
156
  /**
144
- * OnSocketMessage()
145
- * @description
146
157
  * 监听WebSocket接受到服务器的消息事件。
147
- * @param {OnSocketMessageCallback} callback
148
- * @return {void}
149
- * @tutorial https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketmessage
158
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketmessage
159
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketmessage
160
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketmessage
150
161
  * @uniPlatform
151
162
  * {
152
163
  * "app": {
@@ -159,7 +170,12 @@ export interface Uni {
159
170
  * "osVer": "12.0",
160
171
  * "uniVer": "√",
161
172
  * "unixVer": "4.11"
162
- * }
173
+ * },
174
+ * "harmony": {
175
+ * "osVer": "3.0",
176
+ * "uniVer": "4.23",
177
+ * "unixVer": "x"
178
+ * }
163
179
  * },
164
180
  * "web": {
165
181
  * "uniVer": "√",
@@ -175,12 +191,10 @@ export interface Uni {
175
191
  */
176
192
  onSocketMessage(callback: OnSocketMessageCallback): void;
177
193
  /**
178
- * CloseSocket()
179
- * @description
180
194
  * 关闭 WebSocket 连接。
181
- * @param {CloseSocketOptions} options
182
- * @return {void}
183
- * @tutorial https://uniapp.dcloud.net.cn/api/request/websocket.html#closesocket
195
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#closesocket
196
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#closesocket
197
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#closesocket
184
198
  * @uniPlatform
185
199
  * {
186
200
  * "app": {
@@ -193,7 +207,12 @@ export interface Uni {
193
207
  * "osVer": "12.0",
194
208
  * "uniVer": "√",
195
209
  * "unixVer": "4.11"
196
- * }
210
+ * },
211
+ * "harmony": {
212
+ * "osVer": "3.0",
213
+ * "uniVer": "4.23",
214
+ * "unixVer": "x"
215
+ * }
197
216
  * },
198
217
  * "web": {
199
218
  * "uniVer": "√",
@@ -207,12 +226,10 @@ export interface Uni {
207
226
  */
208
227
  closeSocket(options: CloseSocketOptions): void;
209
228
  /**
210
- * OnSocketClose()
211
- * @description
212
229
  * 监听WebSocket关闭。
213
- * @param {OnSocketCloseCallback} callback
214
- * @return {void}
215
- * @tutorial https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketclose
230
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/websocket.html#onsocketclose
231
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketclose
232
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onsocketclose
216
233
  * @uniPlatform
217
234
  * {
218
235
  * "app": {
@@ -225,7 +242,12 @@ export interface Uni {
225
242
  * "osVer": "12.0",
226
243
  * "uniVer": "√",
227
244
  * "unixVer": "4.11"
228
- * }
245
+ * },
246
+ * "harmony": {
247
+ * "osVer": "3.0",
248
+ * "uniVer": "4.23",
249
+ * "unixVer": "x"
250
+ * }
229
251
  * },
230
252
  * "web": {
231
253
  * "uniVer": "√",
@@ -256,7 +278,7 @@ export type ConnectSocketErrorCode = 600009;
256
278
  /**
257
279
  * 连接调用失败的错误回调参数
258
280
  */
259
- export interface ConnectSocketFail extends IUniError {
281
+ export interface ConnectSocketFail extends IUniError {
260
282
  errCode: ConnectSocketErrorCode;
261
283
  };
262
284
 
@@ -265,17 +287,72 @@ type ConnectSocketComplete = any;
265
287
  type ConnectSocketCompleteCallback = (result: ConnectSocketComplete) => void;
266
288
  export type ConnectSocketOptions = {
267
289
  /**
268
- * 开发者服务器接口地址,必须是 wss 协议,且域名必须是后台配置的合法域名
290
+ * 开发者服务器接口地址
291
+ * @uniPlatform
292
+ * {
293
+ * "app": {
294
+ * "android": {
295
+ * "osVer": "5.0",
296
+ * "uniVer": "√",
297
+ * "unixVer": "3.9+"
298
+ * },
299
+ * "ios": {
300
+ * "osVer": "12.0",
301
+ * "uniVer": "√",
302
+ * "unixVer": "4.11"
303
+ * },
304
+ * "harmony": {
305
+ * "osVer": "3.0",
306
+ * "uniVer": "4.23",
307
+ * "unixVer": "x"
308
+ * }
309
+ * }
310
+ * }
269
311
  */
270
312
  url: string,
271
313
  /**
272
314
  * HTTP 请求 Header,header 中不能设置 Referer
273
315
  * @defaultValue null
316
+ * @uniPlatform
317
+ * {
318
+ * "app": {
319
+ * "android": {
320
+ * "osVer": "5.0",
321
+ * "uniVer": "√",
322
+ * "unixVer": "3.9+"
323
+ * },
324
+ * "ios": {
325
+ * "osVer": "12.0",
326
+ * "uniVer": "√",
327
+ * "unixVer": "4.11"
328
+ * },
329
+ * "harmony": {
330
+ * "osVer": "3.0",
331
+ * "uniVer": "4.23",
332
+ * "unixVer": "x"
333
+ * }
334
+ * }
335
+ * }
274
336
  */
275
337
  header?: UTSJSONObject | null,
276
338
  /**
277
339
  * 子协议数组
278
340
  * @defaultValue null
341
+ * @uniPlatform
342
+ * {
343
+ * "app": {
344
+ * "android": {
345
+ * "osVer": "5.0",
346
+ * "uniVer": "√",
347
+ * "unixVer": "3.9+"
348
+ * },
349
+ * "ios": {
350
+ * "osVer": "12.0",
351
+ * "uniVer": "√",
352
+ * "unixVer": "4.11"
353
+ * }
354
+ * }
355
+ * }
279
356
  */
280
357
  protocols?: (string[]) | null,
281
358
  /**
@@ -310,7 +387,7 @@ export type SendSocketMessageErrorCode = 10001 | 10002 | 602001;
310
387
  /**
311
388
  * 发送失败的错误回调参数
312
389
  */
313
- export interface SendSocketMessageFail extends IUniError {
390
+ export interface SendSocketMessageFail extends IUniError {
314
391
  errCode: SendSocketMessageErrorCode;
315
392
  };
316
393
  export type SendSocketMessageOptions = {
@@ -318,6 +395,26 @@ export type SendSocketMessageOptions = {
318
395
  * 需要发送的内容
319
396
  * @type string | ArrayBuffer
320
397
  * @type {SocketDataOptions}
398
+ * @uniPlatform
399
+ * {
400
+ * "app": {
401
+ * "android": {
402
+ * "osVer": "5.0",
403
+ * "uniVer": "√",
404
+ * "unixVer": "3.9+"
405
+ * },
406
+ * "ios": {
407
+ * "osVer": "12.0",
408
+ * "uniVer": "√",
409
+ * "unixVer": "4.11"
410
+ * },
411
+ * "harmony": {
412
+ * "osVer": "3.0",
413
+ * "uniVer": "4.23",
414
+ * "unixVer": "x"
415
+ * }
416
+ * }
417
+ * }
321
418
  */
322
419
  data: any,
323
420
  /**
@@ -340,11 +437,51 @@ export type CloseSocketOptions = {
340
437
  /**
341
438
  * 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。如果这个参数没有被指定,默认的取值是1000 (表示正常连接关闭)
342
439
  * @defaultValue 1000
440
+ * @uniPlatform
441
+ * {
442
+ * "app": {
443
+ * "android": {
444
+ * "osVer": "5.0",
445
+ * "uniVer": "√",
446
+ * "unixVer": "3.9+"
447
+ * },
448
+ * "ios": {
449
+ * "osVer": "12.0",
450
+ * "uniVer": "√",
451
+ * "unixVer": "4.11"
452
+ * },
453
+ * "harmony": {
454
+ * "osVer": "3.0",
455
+ * "uniVer": "4.23",
456
+ * "unixVer": "x"
457
+ * }
458
+ * }
459
+ * }
343
460
  */
344
461
  code?: number | null,
345
462
  /**
346
463
  * 一个可读的字符串,表示连接被关闭的原因。这个字符串必须是不长于123字节的UTF-8 文本(不是字符)
347
464
  * @defaultValue ""
465
+ * @uniPlatform
466
+ * {
467
+ * "app": {
468
+ * "android": {
469
+ * "osVer": "5.0",
470
+ * "uniVer": "√",
471
+ * "unixVer": "3.9+"
472
+ * },
473
+ * "ios": {
474
+ * "osVer": "12.0",
475
+ * "uniVer": "√",
476
+ * "unixVer": "4.11"
477
+ * },
478
+ * "harmony": {
479
+ * "osVer": "3.0",
480
+ * "uniVer": "4.23",
481
+ * "unixVer": "x"
482
+ * }
483
+ * }
484
+ * }
348
485
  */
349
486
  reason?: string | null,
350
487
  /**
@@ -366,6 +503,26 @@ export type CloseSocketOptions = {
366
503
  export type OnSocketOpenCallbackResult = {
367
504
  /**
368
505
  * 连接成功的 HTTP 响应 Header
506
+ * @uniPlatform
507
+ * {
508
+ * "app": {
509
+ * "android": {
510
+ * "osVer": "5.0",
511
+ * "uniVer": "√",
512
+ * "unixVer": "3.9+"
513
+ * },
514
+ * "ios": {
515
+ * "osVer": "12.0",
516
+ * "uniVer": "√",
517
+ * "unixVer": "4.11"
518
+ * },
519
+ * "harmony": {
520
+ * "osVer": "3.0",
521
+ * "uniVer": "4.23",
522
+ * "unixVer": "x"
523
+ * }
524
+ * }
525
+ * }
369
526
  */
370
527
  header: any
371
528
  };
@@ -373,17 +530,35 @@ export type OnSocketMessageCallbackResult = {
373
530
  /**
374
531
  * 服务器返回的消息
375
532
  * @type {SocketDataOptions}
533
+ * @uniPlatform
534
+ * {
535
+ * "app": {
536
+ * "android": {
537
+ * "osVer": "5.0",
538
+ * "uniVer": "√",
539
+ * "unixVer": "3.9+"
540
+ * },
541
+ * "ios": {
542
+ * "osVer": "12.0",
543
+ * "uniVer": "√",
544
+ * "unixVer": "4.11"
545
+ * },
546
+ * "harmony": {
547
+ * "osVer": "3.0",
548
+ * "uniVer": "4.23",
549
+ * "unixVer": "x"
550
+ * }
551
+ * }
552
+ * }
376
553
  */
377
554
  data: any
378
555
  };
379
556
  export interface SocketTask {
380
557
  /**
381
- * send()
382
- * @description
383
558
  * 通过 WebSocket 连接发送数据
384
- * @param {SendSocketMessageOptions} options
385
- * @return {void}
386
- * @tutorial https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-send
559
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-send
560
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#send
561
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#send
387
562
  * @uniPlatform
388
563
  * {
389
564
  * "app": {
@@ -396,7 +571,12 @@ export interface SocketTask {
396
571
  * "osVer": "12.0",
397
572
  * "uniVer": "√",
398
573
  * "unixVer": "4.11"
399
- * }
574
+ * },
575
+ * "harmony": {
576
+ * "osVer": "3.0",
577
+ * "uniVer": "4.23",
578
+ * "unixVer": "x"
579
+ * }
400
580
  * },
401
581
  * "web": {
402
582
  * "uniVer": "√",
@@ -410,12 +590,10 @@ export interface SocketTask {
410
590
  */
411
591
  send(options: SendSocketMessageOptions): void;
412
592
  /**
413
- * close()
414
- * @description
415
593
  * 关闭 WebSocket 连接
416
- * @param {CloseSocketOptions} options
417
- * @return {void}
418
- * @tutorial https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-close
594
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-close
595
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#close
596
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#close
419
597
  * @uniPlatform
420
598
  * {
421
599
  * "app": {
@@ -428,7 +606,12 @@ export interface SocketTask {
428
606
  * "osVer": "12.0",
429
607
  * "uniVer": "√",
430
608
  * "unixVer": "4.11"
431
- * }
609
+ * },
610
+ * "harmony": {
611
+ * "osVer": "3.0",
612
+ * "uniVer": "4.23",
613
+ * "unixVer": "x"
614
+ * }
432
615
  * },
433
616
  * "web": {
434
617
  * "uniVer": "√",
@@ -442,12 +625,10 @@ export interface SocketTask {
442
625
  */
443
626
  close(options: CloseSocketOptions): void;
444
627
  /**
445
- * onOpen()
446
- * @description
447
628
  * 监听 WebSocket 连接打开事件
448
- * @param {OnSocketOpenCallbackResult} options
449
- * @return {void}
450
- * @tutorial https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onopen
629
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onopen
630
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onopen
631
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onopen
451
632
  * @uniPlatform
452
633
  * {
453
634
  * "app": {
@@ -460,7 +641,12 @@ export interface SocketTask {
460
641
  * "osVer": "12.0",
461
642
  * "uniVer": "√",
462
643
  * "unixVer": "4.11"
463
- * }
644
+ * },
645
+ * "harmony": {
646
+ * "osVer": "3.0",
647
+ * "uniVer": "4.23",
648
+ * "unixVer": "x"
649
+ * }
464
650
  * },
465
651
  * "web": {
466
652
  * "uniVer": "√",
@@ -474,12 +660,10 @@ export interface SocketTask {
474
660
  */
475
661
  onOpen(callback: (result: OnSocketOpenCallbackResult) => void): void;
476
662
  /**
477
- * onClose()
478
- * @description
479
663
  * 监听 WebSocket 连接关闭事件
480
- * @param {(result : any) => void} callback
481
- * @return {void}
482
- * @tutorial https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onclose
664
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onclose
665
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onclose
666
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onclose
483
667
  * @uniPlatform
484
668
  * {
485
669
  * "app": {
@@ -492,7 +676,12 @@ export interface SocketTask {
492
676
  * "osVer": "12.0",
493
677
  * "uniVer": "√",
494
678
  * "unixVer": "4.11"
495
- * }
679
+ * },
680
+ * "harmony": {
681
+ * "osVer": "3.0",
682
+ * "uniVer": "4.23",
683
+ * "unixVer": "x"
684
+ * }
496
685
  * },
497
686
  * "web": {
498
687
  * "uniVer": "√",
@@ -508,11 +697,11 @@ export interface SocketTask {
508
697
  onClose(callback: (result: any) => void): void;
509
698
  /**
510
699
  * onError()
511
- * @description
700
+ * @description
512
701
  * 监听 WebSocket 错误
513
- * @param {(result : GeneralCallbackResult) => void} callback
514
- * @return {void}
515
- * @tutorial https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onerror
702
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onerror
703
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onerror
704
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onerror
516
705
  * @uniPlatform
517
706
  * {
518
707
  * "app": {
@@ -525,7 +714,12 @@ export interface SocketTask {
525
714
  * "osVer": "12.0",
526
715
  * "uniVer": "√",
527
716
  * "unixVer": "4.11"
528
- * }
717
+ * },
718
+ * "harmony": {
719
+ * "osVer": "3.0",
720
+ * "uniVer": "4.23",
721
+ * "unixVer": "x"
722
+ * }
529
723
  * },
530
724
  * "web": {
531
725
  * "uniVer": "√",
@@ -540,12 +734,10 @@ export interface SocketTask {
540
734
  */
541
735
  onError(callback: (result: GeneralCallbackResult) => void): void;
542
736
  /**
543
- * onMessage()
544
- * @description
545
737
  * 监听 WebSocket 接受到服务器的消息事件
546
- * @param {(result : OnSocketMessageCallbackResult) => void} callback
547
- * @return {void}
548
- * @tutorial https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onmessage
738
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/request/socket-task.html#sockettask-onmessage
739
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onmessage
740
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/websocket-global.html#onmessage
549
741
  * @uniPlatform
550
742
  * {
551
743
  * "app": {
@@ -558,7 +750,12 @@ export interface SocketTask {
558
750
  * "osVer": "12.0",
559
751
  * "uniVer": "√",
560
752
  * "unixVer": "4.11"
561
- * }
753
+ * },
754
+ * "harmony": {
755
+ * "osVer": "3.0",
756
+ * "uniVer": "4.23",
757
+ * "unixVer": "x"
758
+ * }
562
759
  * },
563
760
  * "web": {
564
761
  * "uniVer": "√",
@@ -594,11 +791,51 @@ export type OnSocketMessage = (callback: OnSocketMessageCallback) => void;
594
791
  export type CloseSocket = (options: CloseSocketOptions) => void;
595
792
  export type OnSocketCloseCallbackResult = {
596
793
  /**
597
- * 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。
794
+ * 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。
795
+ * @uniPlatform
796
+ * {
797
+ * "app": {
798
+ * "android": {
799
+ * "osVer": "5.0",
800
+ * "uniVer": "√",
801
+ * "unixVer": "3.9+"
802
+ * },
803
+ * "ios": {
804
+ * "osVer": "12.0",
805
+ * "uniVer": "√",
806
+ * "unixVer": "4.11"
807
+ * },
808
+ * "harmony": {
809
+ * "osVer": "3.0",
810
+ * "uniVer": "4.23",
811
+ * "unixVer": "x"
812
+ * }
813
+ * }
814
+ * }
598
815
  */
599
816
  code: number,
600
817
  /**
601
- * 一个可读的字符串,表示连接被关闭的原因。
818
+ * 一个可读的字符串,表示连接被关闭的原因。
819
+ * @uniPlatform
820
+ * {
821
+ * "app": {
822
+ * "android": {
823
+ * "osVer": "5.0",
824
+ * "uniVer": "√",
825
+ * "unixVer": "3.9+"
826
+ * },
827
+ * "ios": {
828
+ * "osVer": "12.0",
829
+ * "uniVer": "√",
830
+ * "unixVer": "4.11"
831
+ * },
832
+ * "harmony": {
833
+ * "osVer": "3.0",
834
+ * "uniVer": "4.23",
835
+ * "unixVer": "x"
836
+ * }
837
+ * }
838
+ * }
602
839
  */
603
840
  reason: string
604
841
  };
@@ -3,6 +3,8 @@ import {
3
3
  UrlCallbackOptions as UrlCallbackOptionsOrigin,
4
4
  CreateRewardedVideoAdOptions as CreateRewardedVideoAdOptionsOrigin,
5
5
  RewardedVideoAd as RewardedVideoAdOrigin,
6
+ IVideoAd as IVideoAdOrigin,
7
+ IRewardedVideoAd as IRewardedVideoAdOrigin,
6
8
  VideoAdClose as VideoAdCloseOrigin,
7
9
  RewardedVideoAdClose as RewardedVideoAdCloseOrigin,
8
10
  UniAdErrorCode as UniAdErrorCodeOrigin,
@@ -11,8 +13,6 @@ import {
11
13
  AdCloseCallBackEvent as AdCloseCallBackEventOrigin,
12
14
  AdErrorCallBackEvent as AdErrorCallBackEventOrigin,
13
15
  AdVerifyCallBackEvent as AdVerifyCallBackEventOrigin,
14
- IVideoAd as IVideoAdOrigin,
15
- IRewardedVideoAd as IRewardedVideoAdOrigin,
16
16
  CreateRewardedVideoAd as CreateRewardedVideoAdOrigin,
17
17
  Uni as UniOrigin
18
18
  } from './interface'
@@ -21,6 +21,8 @@ declare global {
21
21
  type UrlCallbackOptions = UrlCallbackOptionsOrigin
22
22
  type CreateRewardedVideoAdOptions = CreateRewardedVideoAdOptionsOrigin
23
23
  type RewardedVideoAd = RewardedVideoAdOrigin
24
+ type IVideoAd = IVideoAdOrigin
25
+ type IRewardedVideoAd = IRewardedVideoAdOrigin
24
26
  type VideoAdClose = VideoAdCloseOrigin
25
27
  type RewardedVideoAdClose = RewardedVideoAdCloseOrigin
26
28
  type UniAdErrorCode = UniAdErrorCodeOrigin
@@ -29,8 +31,6 @@ declare global {
29
31
  type AdCloseCallBackEvent = AdCloseCallBackEventOrigin
30
32
  type AdErrorCallBackEvent = AdErrorCallBackEventOrigin
31
33
  type AdVerifyCallBackEvent = AdVerifyCallBackEventOrigin
32
- type IVideoAd = IVideoAdOrigin
33
- type IRewardedVideoAd = IRewardedVideoAdOrigin
34
34
  type CreateRewardedVideoAd = CreateRewardedVideoAdOrigin
35
35
  interface Uni extends UniOrigin { }
36
36
  }