@tarojs/taro-h5 3.5.0-theta.1 → 3.5.0

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 (287) hide show
  1. package/dist/api/ad/index.d.ts +6 -0
  2. package/dist/api/ai/facial.d.ts +9 -0
  3. package/dist/api/ai/index.d.ts +2 -0
  4. package/dist/api/ai/visual.d.ts +6 -0
  5. package/dist/api/alipay/index.d.ts +3 -0
  6. package/dist/api/base/crypto.d.ts +3 -0
  7. package/dist/api/base/debug.d.ts +9 -0
  8. package/dist/api/base/index.d.ts +12 -0
  9. package/dist/api/base/performance.d.ts +6 -0
  10. package/dist/api/base/system.d.ts +27 -0
  11. package/dist/api/base/system.js +2 -2
  12. package/dist/api/base/update.d.ts +6 -0
  13. package/dist/api/base/weapp/app-event.d.ts +41 -0
  14. package/dist/api/base/weapp/life-cycle.d.ts +6 -0
  15. package/dist/api/canvas/CanvasContext.d.ts +104 -0
  16. package/dist/api/canvas/canvasGetImageData.d.ts +5 -0
  17. package/dist/api/canvas/canvasPutImageData.d.ts +6 -0
  18. package/dist/api/canvas/canvasToTempFilePath.d.ts +6 -0
  19. package/dist/api/canvas/createCanvasContext.d.ts +5 -0
  20. package/dist/api/canvas/index.d.ts +12 -0
  21. package/dist/api/cloud/index.d.ts +31 -0
  22. package/dist/api/data-analysis/index.d.ts +12 -0
  23. package/dist/api/device/accelerometer.d.ts +17 -0
  24. package/dist/api/device/accessibility.d.ts +3 -0
  25. package/dist/api/device/battery.d.ts +5 -0
  26. package/dist/api/device/bluetooth-ble.d.ts +48 -0
  27. package/dist/api/device/bluetooth-peripheral.d.ts +9 -0
  28. package/dist/api/device/bluetooth.d.ts +39 -0
  29. package/dist/api/device/calendar.d.ts +6 -0
  30. package/dist/api/device/clipboard.d.ts +15 -0
  31. package/dist/api/device/compass.d.ts +17 -0
  32. package/dist/api/device/contact.d.ts +6 -0
  33. package/dist/api/device/crypto.d.ts +3 -0
  34. package/dist/api/device/gyroscope.d.ts +12 -0
  35. package/dist/api/device/iBeacon.d.ts +21 -0
  36. package/dist/api/device/index.d.ts +23 -0
  37. package/dist/api/device/keyboard.d.ts +12 -0
  38. package/dist/api/device/memory.d.ts +6 -0
  39. package/dist/api/device/motion.d.ts +17 -0
  40. package/dist/api/device/network.d.ts +20 -0
  41. package/dist/api/device/nfc.d.ts +21 -0
  42. package/dist/api/device/phone.d.ts +2 -0
  43. package/dist/api/device/scan.d.ts +3 -0
  44. package/dist/api/device/screen.d.ts +18 -0
  45. package/dist/api/device/vibrate.d.ts +9 -0
  46. package/dist/api/device/vibrate.js +5 -7
  47. package/dist/api/device/wifi.d.ts +33 -0
  48. package/dist/api/ext/index.d.ts +6 -0
  49. package/dist/api/files/index.d.ts +24 -0
  50. package/dist/api/framework/index.d.ts +4 -0
  51. package/dist/api/index.d.ts +24 -0
  52. package/dist/api/location/chooseLocation.d.ts +6 -0
  53. package/dist/api/location/getLocation.d.ts +2 -0
  54. package/dist/api/location/index.d.ts +32 -0
  55. package/dist/api/location/index.js +1 -0
  56. package/dist/api/media/EditorContext.d.ts +42 -0
  57. package/dist/api/media/audio/InnerAudioContext.d.ts +58 -0
  58. package/dist/api/media/audio/index.d.ts +29 -0
  59. package/dist/api/media/background-audio/BackgroundAudioManager.d.ts +71 -0
  60. package/dist/api/media/background-audio/index.d.ts +29 -0
  61. package/dist/api/media/camera.d.ts +3 -0
  62. package/dist/api/media/image/chooseImage.d.ts +5 -0
  63. package/dist/api/media/image/getImageInfo.d.ts +5 -0
  64. package/dist/api/media/image/index.d.ts +15 -0
  65. package/dist/api/media/image/previewImage.d.ts +8 -0
  66. package/dist/api/media/index.d.ts +12 -0
  67. package/dist/api/media/live.d.ts +6 -0
  68. package/dist/api/media/map.d.ts +3 -0
  69. package/dist/api/media/media-recorder.d.ts +3 -0
  70. package/dist/api/media/recorder.d.ts +9 -0
  71. package/dist/api/media/video/index.d.ts +24 -0
  72. package/dist/api/media/video-decoder.d.ts +3 -0
  73. package/dist/api/media/video-processing.d.ts +3 -0
  74. package/dist/api/media/voip.d.ts +42 -0
  75. package/dist/api/navigate/index.d.ts +12 -0
  76. package/dist/api/network/download.d.ts +6 -0
  77. package/dist/api/network/index.d.ts +7 -0
  78. package/dist/api/network/mdns.d.ts +30 -0
  79. package/dist/api/network/request/index.d.ts +4 -0
  80. package/dist/api/network/tcp.d.ts +3 -0
  81. package/dist/api/network/udp.d.ts +3 -0
  82. package/dist/api/network/upload.d.ts +5 -0
  83. package/{src/api/network/utils.ts → dist/api/network/utils.d.ts} +44 -72
  84. package/dist/api/network/websocket/index.d.ts +7 -0
  85. package/dist/api/network/websocket/socketTask.d.ts +25 -0
  86. package/dist/api/open-api/account.d.ts +3 -0
  87. package/dist/api/open-api/address.d.ts +3 -0
  88. package/dist/api/open-api/authorize.d.ts +6 -0
  89. package/dist/api/open-api/card.d.ts +6 -0
  90. package/dist/api/open-api/channels-live.d.ts +18 -0
  91. package/dist/api/open-api/customer-service.d.ts +3 -0
  92. package/dist/api/open-api/facial.d.ts +12 -0
  93. package/dist/api/open-api/favorites.d.ts +6 -0
  94. package/dist/api/open-api/group.d.ts +3 -0
  95. package/dist/api/open-api/index.d.ts +18 -0
  96. package/dist/api/open-api/invoice.d.ts +6 -0
  97. package/dist/api/open-api/license-plate.d.ts +3 -0
  98. package/dist/api/open-api/login.d.ts +9 -0
  99. package/dist/api/open-api/red-package.d.ts +3 -0
  100. package/dist/api/open-api/settings.d.ts +6 -0
  101. package/dist/api/open-api/soter.d.ts +9 -0
  102. package/dist/api/open-api/subscribe-message.d.ts +3 -0
  103. package/dist/api/open-api/user-info.d.ts +6 -0
  104. package/dist/api/open-api/werun.d.ts +6 -0
  105. package/dist/api/payment/index.d.ts +6 -0
  106. package/dist/api/route/index.d.ts +1 -0
  107. package/dist/api/share/index.d.ts +30 -0
  108. package/dist/api/storage/background-fetch.d.ts +12 -0
  109. package/dist/api/storage/index.d.ts +18 -0
  110. package/dist/api/swan/index.d.ts +63 -0
  111. package/dist/api/taro.d.ts +12 -0
  112. package/dist/api/ui/animation/index.d.ts +2 -0
  113. package/dist/api/ui/background.d.ts +6 -0
  114. package/dist/api/ui/custom-component.d.ts +1 -0
  115. package/dist/api/ui/fonts.d.ts +2 -0
  116. package/dist/api/ui/index.d.ts +12 -0
  117. package/dist/api/ui/interaction/actionSheet.d.ts +61 -0
  118. package/dist/api/ui/interaction/index.d.ts +14 -0
  119. package/dist/api/ui/interaction/modal.d.ts +69 -0
  120. package/dist/api/ui/interaction/modal.js +1 -0
  121. package/dist/api/ui/interaction/toast.d.ts +85 -0
  122. package/dist/api/ui/menu.d.ts +3 -0
  123. package/dist/api/ui/navigation-bar/index.d.ts +15 -0
  124. package/dist/api/ui/navigation-bar/index.js +2 -3
  125. package/dist/api/ui/pull-down-refresh.d.ts +9 -0
  126. package/dist/api/ui/scroll/index.d.ts +5 -0
  127. package/dist/api/ui/sticky.d.ts +3 -0
  128. package/dist/api/ui/tab-bar.d.ts +34 -0
  129. package/dist/api/ui/window.d.ts +15 -0
  130. package/dist/api/worker/index.d.ts +3 -0
  131. package/dist/api/wxml/index.d.ts +5 -0
  132. package/dist/api/wxml/nodesRef.d.ts +13 -0
  133. package/dist/api/wxml/selectorQuery.d.ts +24 -0
  134. package/dist/api/wxml/selectorQuery.js +1 -1
  135. package/dist/index.cjs.d.ts +1373 -0
  136. package/dist/index.cjs.js +12 -14
  137. package/dist/index.cjs.js.map +1 -1
  138. package/dist/index.d.ts +4 -0
  139. package/dist/index.esm.d.ts +1373 -0
  140. package/dist/index.esm.js +12 -14
  141. package/dist/index.esm.js.map +1 -1
  142. package/dist/taroApis.d.ts +1364 -0
  143. package/dist/taroApis.js +1 -1
  144. package/dist/utils/animation.d.ts +6 -0
  145. package/dist/utils/handler.d.ts +48 -0
  146. package/dist/utils/index.d.ts +39 -0
  147. package/dist/utils/lodash.d.ts +2 -0
  148. package/dist/utils/valid.d.ts +2 -0
  149. package/package.json +6 -7
  150. package/types/api.d.ts +4 -0
  151. package/types/define.d.ts +2 -0
  152. package/types/index.d.ts +33 -0
  153. package/types/overlay.d.ts +9 -0
  154. package/src/api/ad/index.ts +0 -5
  155. package/src/api/ai/facial.ts +0 -6
  156. package/src/api/ai/index.ts +0 -2
  157. package/src/api/ai/visual.ts +0 -7
  158. package/src/api/alipay/index.ts +0 -4
  159. package/src/api/base/crypto.ts +0 -4
  160. package/src/api/base/debug.ts +0 -5
  161. package/src/api/base/index.ts +0 -23
  162. package/src/api/base/performance.ts +0 -5
  163. package/src/api/base/system.ts +0 -207
  164. package/src/api/base/update.ts +0 -5
  165. package/src/api/base/weapp/app-event.ts +0 -79
  166. package/src/api/base/weapp/life-cycle.ts +0 -5
  167. package/src/api/canvas/CanvasContext.ts +0 -233
  168. package/src/api/canvas/canvasGetImageData.ts +0 -28
  169. package/src/api/canvas/canvasPutImageData.ts +0 -25
  170. package/src/api/canvas/canvasToTempFilePath.ts +0 -25
  171. package/src/api/canvas/createCanvasContext.ts +0 -19
  172. package/src/api/canvas/index.ts +0 -18
  173. package/src/api/cloud/index.ts +0 -32
  174. package/src/api/data-analysis/index.ts +0 -6
  175. package/src/api/device/accelerometer.ts +0 -79
  176. package/src/api/device/accessibility.ts +0 -4
  177. package/src/api/device/battery.ts +0 -23
  178. package/src/api/device/bluetooth-ble.ts +0 -19
  179. package/src/api/device/bluetooth-peripheral.ts +0 -6
  180. package/src/api/device/bluetooth.ts +0 -16
  181. package/src/api/device/calendar.ts +0 -5
  182. package/src/api/device/clipboard.ts +0 -68
  183. package/src/api/device/compass.ts +0 -83
  184. package/src/api/device/contact.ts +0 -5
  185. package/src/api/device/crypto.ts +0 -4
  186. package/src/api/device/gyroscope.ts +0 -7
  187. package/src/api/device/iBeacon.ts +0 -10
  188. package/src/api/device/index.ts +0 -23
  189. package/src/api/device/keyboard.ts +0 -7
  190. package/src/api/device/memory.ts +0 -5
  191. package/src/api/device/motion.ts +0 -77
  192. package/src/api/device/network.ts +0 -90
  193. package/src/api/device/nfc.ts +0 -10
  194. package/src/api/device/phone.ts +0 -31
  195. package/src/api/device/scan.ts +0 -11
  196. package/src/api/device/screen.ts +0 -9
  197. package/src/api/device/vibrate.ts +0 -37
  198. package/src/api/device/wifi.ts +0 -14
  199. package/src/api/ext/index.ts +0 -5
  200. package/src/api/files/index.ts +0 -11
  201. package/src/api/framework/index.ts +0 -10
  202. package/src/api/index.ts +0 -24
  203. package/src/api/location/chooseLocation.ts +0 -117
  204. package/src/api/location/getLocation.ts +0 -81
  205. package/src/api/location/index.ts +0 -22
  206. package/src/api/location/style.css +0 -79
  207. package/src/api/media/EditorContext.ts +0 -32
  208. package/src/api/media/audio/InnerAudioContext.ts +0 -99
  209. package/src/api/media/audio/index.ts +0 -21
  210. package/src/api/media/background-audio/BackgroundAudioManager.ts +0 -104
  211. package/src/api/media/background-audio/index.ts +0 -17
  212. package/src/api/media/camera.ts +0 -4
  213. package/src/api/media/image/chooseImage.ts +0 -95
  214. package/src/api/media/image/getImageInfo.ts +0 -50
  215. package/src/api/media/image/index.ts +0 -13
  216. package/src/api/media/image/previewImage.ts +0 -80
  217. package/src/api/media/index.ts +0 -12
  218. package/src/api/media/live.ts +0 -5
  219. package/src/api/media/map.ts +0 -4
  220. package/src/api/media/media-recorder.ts +0 -4
  221. package/src/api/media/recorder.ts +0 -6
  222. package/src/api/media/video/index.ts +0 -82
  223. package/src/api/media/video-decoder.ts +0 -4
  224. package/src/api/media/video-processing.ts +0 -4
  225. package/src/api/media/voip.ts +0 -17
  226. package/src/api/navigate/index.ts +0 -7
  227. package/src/api/network/download.ts +0 -142
  228. package/src/api/network/index.ts +0 -7
  229. package/src/api/network/mdns.ts +0 -13
  230. package/src/api/network/request/index.ts +0 -135
  231. package/src/api/network/tcp.ts +0 -4
  232. package/src/api/network/udp.ts +0 -4
  233. package/src/api/network/upload.ts +0 -170
  234. package/src/api/network/websocket/index.ts +0 -88
  235. package/src/api/network/websocket/socketTask.ts +0 -89
  236. package/src/api/open-api/account.ts +0 -4
  237. package/src/api/open-api/address.ts +0 -4
  238. package/src/api/open-api/authorize.ts +0 -5
  239. package/src/api/open-api/card.ts +0 -5
  240. package/src/api/open-api/channels-live.ts +0 -9
  241. package/src/api/open-api/customer-service.ts +0 -4
  242. package/src/api/open-api/facial.ts +0 -7
  243. package/src/api/open-api/favorites.ts +0 -5
  244. package/src/api/open-api/group.ts +0 -4
  245. package/src/api/open-api/index.ts +0 -18
  246. package/src/api/open-api/invoice.ts +0 -5
  247. package/src/api/open-api/license-plate.ts +0 -4
  248. package/src/api/open-api/login.ts +0 -6
  249. package/src/api/open-api/red-package.ts +0 -4
  250. package/src/api/open-api/settings.ts +0 -5
  251. package/src/api/open-api/soter.ts +0 -6
  252. package/src/api/open-api/subscribe-message.ts +0 -4
  253. package/src/api/open-api/user-info.ts +0 -5
  254. package/src/api/open-api/werun.ts +0 -5
  255. package/src/api/payment/index.ts +0 -5
  256. package/src/api/route/index.ts +0 -10
  257. package/src/api/share/index.ts +0 -13
  258. package/src/api/storage/background-fetch.ts +0 -7
  259. package/src/api/storage/index.ts +0 -182
  260. package/src/api/swan/index.ts +0 -31
  261. package/src/api/taro.ts +0 -84
  262. package/src/api/ui/animation/index.ts +0 -356
  263. package/src/api/ui/background.ts +0 -5
  264. package/src/api/ui/custom-component.ts +0 -4
  265. package/src/api/ui/fonts.ts +0 -64
  266. package/src/api/ui/index.ts +0 -12
  267. package/src/api/ui/interaction/actionSheet.ts +0 -212
  268. package/src/api/ui/interaction/index.ts +0 -302
  269. package/src/api/ui/interaction/modal.ts +0 -237
  270. package/src/api/ui/interaction/toast.ts +0 -220
  271. package/src/api/ui/menu.ts +0 -4
  272. package/src/api/ui/navigation-bar/index.ts +0 -52
  273. package/src/api/ui/pull-down-refresh.ts +0 -28
  274. package/src/api/ui/scroll/index.ts +0 -85
  275. package/src/api/ui/sticky.ts +0 -4
  276. package/src/api/ui/tab-bar.ts +0 -327
  277. package/src/api/ui/window.ts +0 -38
  278. package/src/api/worker/index.ts +0 -4
  279. package/src/api/wxml/index.ts +0 -10
  280. package/src/api/wxml/nodesRef.ts +0 -56
  281. package/src/api/wxml/selectorQuery.ts +0 -220
  282. package/src/index.ts +0 -6
  283. package/src/utils/animation.ts +0 -15
  284. package/src/utils/handler.ts +0 -105
  285. package/src/utils/index.ts +0 -179
  286. package/src/utils/lodash.ts +0 -30
  287. package/src/utils/valid.ts +0 -8
@@ -0,0 +1,42 @@
1
+ export declare const updateVoIPChatMuteConfig: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const subscribeVoIPVideoMembers: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const setEnable1v1Chat: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onVoIPVideoMembersChanged: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const onVoIPChatStateChanged: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const onVoIPChatSpeakersChanged: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const onVoIPChatMembersChanged: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const onVoIPChatInterrupted: () => Promise<{
23
+ errMsg: string;
24
+ }>;
25
+ export declare const offVoIPVideoMembersChanged: () => Promise<{
26
+ errMsg: string;
27
+ }>;
28
+ export declare const offVoIPChatStateChanged: () => Promise<{
29
+ errMsg: string;
30
+ }>;
31
+ export declare const offVoIPChatMembersChanged: () => Promise<{
32
+ errMsg: string;
33
+ }>;
34
+ export declare const offVoIPChatInterrupted: () => Promise<{
35
+ errMsg: string;
36
+ }>;
37
+ export declare const joinVoIPChat: () => Promise<{
38
+ errMsg: string;
39
+ }>;
40
+ export declare const exitVoIPChat: () => Promise<{
41
+ errMsg: string;
42
+ }>;
@@ -0,0 +1,12 @@
1
+ export declare const openEmbeddedMiniProgram: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const navigateToMiniProgram: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const navigateBackMiniProgram: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const exitMiniProgram: () => Promise<{
11
+ errMsg: string;
12
+ }>;
@@ -0,0 +1,6 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 下载文件资源到本地。客户端直接发起一个 HTTPS GET 请求,返回文件的本地临时路径。使用前请注意阅读相关说明。
4
+ * 注意:请在服务端响应的 header 中指定合理的 Content-Type 字段,以保证客户端正确处理文件类型。
5
+ */
6
+ export declare const downloadFile: typeof Taro.downloadFile;
@@ -0,0 +1,7 @@
1
+ export * from './download';
2
+ export * from './mdns';
3
+ export * from './request';
4
+ export * from './tcp';
5
+ export * from './udp';
6
+ export * from './upload';
7
+ export * from './websocket';
@@ -0,0 +1,30 @@
1
+ export declare const stopLocalServiceDiscovery: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startLocalServiceDiscovery: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const onLocalServiceResolveFail: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onLocalServiceLost: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const onLocalServiceFound: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const onLocalServiceDiscoveryStop: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const offLocalServiceResolveFail: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const offLocalServiceLost: () => Promise<{
23
+ errMsg: string;
24
+ }>;
25
+ export declare const offLocalServiceFound: () => Promise<{
26
+ errMsg: string;
27
+ }>;
28
+ export declare const offLocalServiceDiscoveryStop: () => Promise<{
29
+ errMsg: string;
30
+ }>;
@@ -0,0 +1,4 @@
1
+ import 'whatwg-fetch';
2
+ import Taro from '@tarojs/api';
3
+ export declare const request: typeof Taro.request;
4
+ export declare const addInterceptor: any;
@@ -0,0 +1,3 @@
1
+ export declare const createTCPSocket: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const createUDPSocket: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,5 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 将本地资源上传到服务器。客户端发起一个 HTTPS POST 请求,其中 content-type 为 multipart/form-data。使用前请注意阅读相关说明。
4
+ */
5
+ export declare const uploadFile: typeof Taro.uploadFile;
@@ -1,72 +1,44 @@
1
- /**
2
- * HTTP Response Header 事件回调函数的参数
3
- * @typedef {Object} HeadersReceivedParam
4
- * @property {Object} header 开发者服务器返回的 HTTP Response Header
5
- */
6
-
7
- /**
8
- * HTTP Response Header 事件的回调函数
9
- * @callback HeadersReceivedCallback
10
- * @param {HeadersReceivedParam} res 参数
11
- */
12
-
13
- /**
14
- * 进度变化回调函数的参数
15
- * @typedef {Object} ProgressUpdateParam
16
- * @property {number} progress 进度百分比
17
- * @property {number} [totalBytesWritten] 已经下载的数据长度,单位 Bytes
18
- * @property {number} [totalBytesSent] 已经上传的数据长度,单位 Bytes
19
- * @property {number} [totalBytesExpectedToWrite] 预期需要下载的数据总长度,单位 Bytes
20
- * @property {number} [totalBytesExpectedToSend] 预期需要上传的数据总长度,单位 Bytes
21
- */
22
-
23
- /**
24
- * 进度变化事件的回调函数
25
- * @callback ProgressUpdateCallback
26
- * @param {ProgressUpdateParam} res 参数
27
- */
28
-
29
- export const NETWORK_TIMEOUT = 60000
30
-
31
- export const XHR_STATS = {
32
- UNSENT: 0, // Client has been created. open() not called yet.
33
- OPENED: 1, // open() has been called.
34
- HEADERS_RECEIVED: 2, // send() has been called, and headers and status are available.
35
- LOADING: 3, // Downloading; responseText holds partial data.
36
- DONE: 4 // The operation is complete.
37
- }
38
-
39
- /**
40
- * 设置xhr的header
41
- * @param {XMLHttpRequest} xhr
42
- * @param {Object} header
43
- */
44
- export const setHeader = (xhr, header) => {
45
- let headerKey
46
- for (headerKey in header) {
47
- xhr.setRequestHeader(headerKey, header[headerKey])
48
- }
49
- }
50
-
51
- /**
52
- * 将 blob url 转化为文件
53
- * @param {string} url 要转换的 blob url
54
- * @returns {Promise<File>}
55
- */
56
- export const convertObjectUrlToBlob = url => {
57
- return new Promise((resolve, reject) => {
58
- const xhr = new XMLHttpRequest()
59
- xhr.open('GET', url, true)
60
- xhr.responseType = 'blob'
61
- xhr.withCredentials = true
62
- xhr.onload = function () {
63
- if (this.status === 200) {
64
- resolve(this.response)
65
- } else {
66
- /* eslint-disable prefer-promise-reject-errors */
67
- reject({ status: this.status })
68
- }
69
- }
70
- xhr.send()
71
- })
72
- }
1
+ /**
2
+ * HTTP Response Header 事件回调函数的参数
3
+ * @typedef {Object} HeadersReceivedParam
4
+ * @property {Object} header 开发者服务器返回的 HTTP Response Header
5
+ */
6
+ /**
7
+ * HTTP Response Header 事件的回调函数
8
+ * @callback HeadersReceivedCallback
9
+ * @param {HeadersReceivedParam} res 参数
10
+ */
11
+ /**
12
+ * 进度变化回调函数的参数
13
+ * @typedef {Object} ProgressUpdateParam
14
+ * @property {number} progress 进度百分比
15
+ * @property {number} [totalBytesWritten] 已经下载的数据长度,单位 Bytes
16
+ * @property {number} [totalBytesSent] 已经上传的数据长度,单位 Bytes
17
+ * @property {number} [totalBytesExpectedToWrite] 预期需要下载的数据总长度,单位 Bytes
18
+ * @property {number} [totalBytesExpectedToSend] 预期需要上传的数据总长度,单位 Bytes
19
+ */
20
+ /**
21
+ * 进度变化事件的回调函数
22
+ * @callback ProgressUpdateCallback
23
+ * @param {ProgressUpdateParam} res 参数
24
+ */
25
+ export declare const NETWORK_TIMEOUT = 60000;
26
+ export declare const XHR_STATS: {
27
+ UNSENT: number;
28
+ OPENED: number;
29
+ HEADERS_RECEIVED: number;
30
+ LOADING: number;
31
+ DONE: number;
32
+ };
33
+ /**
34
+ * 设置xhr的header
35
+ * @param {XMLHttpRequest} xhr
36
+ * @param {Object} header
37
+ */
38
+ export declare const setHeader: (xhr: any, header: any) => void;
39
+ /**
40
+ * 将 blob url 转化为文件
41
+ * @param {string} url 要转换的 blob url
42
+ * @returns {Promise<File>}
43
+ */
44
+ export declare const convertObjectUrlToBlob: (url: any) => Promise<unknown>;
@@ -0,0 +1,7 @@
1
+ export declare function sendSocketMessage(): void;
2
+ export declare function onSocketOpen(): void;
3
+ export declare function onSocketMessage(): void;
4
+ export declare function onSocketError(): void;
5
+ export declare function onSocketClose(): void;
6
+ export declare function connectSocket(options: any): Promise<unknown>;
7
+ export declare function closeSocket(): void;
@@ -0,0 +1,25 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare class SocketTask {
3
+ ws: WebSocket;
4
+ CONNECTING: number;
5
+ OPEN: number;
6
+ CLOSING: number;
7
+ CLOSED: number;
8
+ closeDetail: {
9
+ code: any;
10
+ reason: any;
11
+ };
12
+ _destroyWhenClose?: () => void;
13
+ constructor(url: any, protocols: any);
14
+ get readyState(): number;
15
+ send(opts?: Partial<Taro.SocketTask.SendOption>): Promise<{
16
+ errMsg: string;
17
+ }>;
18
+ close(opts?: Partial<Taro.SocketTask.CloseOption>): Promise<{
19
+ errMsg: string;
20
+ }>;
21
+ onOpen(func: any): void;
22
+ onMessage(func: any): void;
23
+ onClose(func: any): void;
24
+ onError(func: any): void;
25
+ }
@@ -0,0 +1,3 @@
1
+ export declare const getAccountInfoSync: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const chooseAddress: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const authorizeForMiniProgram: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const authorize: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const openCard: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const addCard: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,18 @@
1
+ export declare const reserveChannelsLive: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const openChannelsLive: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const openChannelsEvent: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const openChannelsActivity: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const getChannelsLiveNoticeInfo: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const getChannelsLiveInfo: () => Promise<{
17
+ errMsg: string;
18
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const openCustomerServiceChat: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,12 @@
1
+ export declare const checkIsSupportFacialRecognition: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startFacialRecognitionVerify: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const startFacialRecognitionVerifyAndUploadVideo: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const faceVerifyForPay: () => Promise<{
11
+ errMsg: string;
12
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const addVideoToFavorites: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const addFileToFavorites: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const getGroupEnterInfo: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,18 @@
1
+ export * from './account';
2
+ export * from './address';
3
+ export * from './authorize';
4
+ export * from './card';
5
+ export * from './channels-live';
6
+ export * from './customer-service';
7
+ export * from './facial';
8
+ export * from './favorites';
9
+ export * from './group';
10
+ export * from './invoice';
11
+ export * from './license-plate';
12
+ export * from './login';
13
+ export * from './red-package';
14
+ export * from './settings';
15
+ export * from './soter';
16
+ export * from './subscribe-message';
17
+ export * from './user-info';
18
+ export * from './werun';
@@ -0,0 +1,6 @@
1
+ export declare const chooseInvoiceTitle: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const chooseInvoice: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const chooseLicensePlate: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,9 @@
1
+ export declare const pluginLogin: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const login: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const checkSession: () => Promise<{
8
+ errMsg: string;
9
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const showRedPackage: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const openSetting: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const getSetting: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,9 @@
1
+ export declare const startSoterAuthentication: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const checkIsSupportSoterAuthentication: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const checkIsSoterEnrolledInDevice: () => Promise<{
8
+ errMsg: string;
9
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const requestSubscribeMessage: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const getUserProfile: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const getUserInfo: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const shareToWeRun: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const getWeRunData: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const requestPayment: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const requestOrderPayment: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1 @@
1
+ export { navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from '@tarojs/router';
@@ -0,0 +1,30 @@
1
+ export declare const updateShareMenu: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const showShareMenu: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const showShareImageMenu: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const shareVideoMessage: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const shareFileMessage: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const onCopyUrl: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const offCopyUrl: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const hideShareMenu: () => Promise<{
23
+ errMsg: string;
24
+ }>;
25
+ export declare const getShareInfo: () => Promise<{
26
+ errMsg: string;
27
+ }>;
28
+ export declare const authPrivateMessage: () => Promise<{
29
+ errMsg: string;
30
+ }>;
@@ -0,0 +1,12 @@
1
+ export declare const setBackgroundFetchToken: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const onBackgroundFetchData: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const getBackgroundFetchToken: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const getBackgroundFetchData: () => Promise<{
11
+ errMsg: string;
12
+ }>;
@@ -0,0 +1,18 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const setStorageSync: typeof Taro.setStorageSync;
3
+ export declare const setStorage: typeof Taro.setStorage;
4
+ export declare const revokeBufferURL: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const removeStorageSync: typeof Taro.removeStorageSync;
8
+ export declare const removeStorage: typeof Taro.removeStorage;
9
+ export declare const getStorageSync: typeof Taro.getStorageSync;
10
+ export declare const getStorageInfoSync: typeof Taro.getStorageInfoSync;
11
+ export declare const getStorageInfo: typeof Taro.getStorageInfo;
12
+ export declare const getStorage: typeof Taro.getStorage;
13
+ export declare const createBufferURL: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const clearStorageSync: typeof Taro.clearStorageSync;
17
+ export declare const clearStorage: typeof Taro.clearStorage;
18
+ export * from './background-fetch';
@@ -0,0 +1,63 @@
1
+ export declare const setPageInfo: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const ocrIdCard: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const ocrBankCard: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const ocrDrivingLicense: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const ocrVehicleLicense: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const textReview: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const textToAudio: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const imageAudit: () => Promise<{
23
+ errMsg: string;
24
+ }>;
25
+ export declare const advancedGeneralIdentify: () => Promise<{
26
+ errMsg: string;
27
+ }>;
28
+ export declare const objectDetectIdentify: () => Promise<{
29
+ errMsg: string;
30
+ }>;
31
+ export declare const carClassify: () => Promise<{
32
+ errMsg: string;
33
+ }>;
34
+ export declare const dishClassify: () => Promise<{
35
+ errMsg: string;
36
+ }>;
37
+ export declare const logoClassify: () => Promise<{
38
+ errMsg: string;
39
+ }>;
40
+ export declare const animalClassify: () => Promise<{
41
+ errMsg: string;
42
+ }>;
43
+ export declare const plantClassify: () => Promise<{
44
+ errMsg: string;
45
+ }>;
46
+ export declare const getSwanId: () => Promise<{
47
+ errMsg: string;
48
+ }>;
49
+ export declare const requestPolymerPayment: () => Promise<{
50
+ errMsg: string;
51
+ }>;
52
+ export declare const navigateToSmartGameProgram: () => Promise<{
53
+ errMsg: string;
54
+ }>;
55
+ export declare const navigateToSmartProgram: () => Promise<{
56
+ errMsg: string;
57
+ }>;
58
+ export declare const navigateBackSmartProgram: () => Promise<{
59
+ errMsg: string;
60
+ }>;
61
+ export declare const preloadSubPackage: () => Promise<{
62
+ errMsg: string;
63
+ }>;
@@ -0,0 +1,12 @@
1
+ import Taro from '@tarojs/api';
2
+ import { history } from '@tarojs/router';
3
+ declare const Behavior: any, getEnv: any, ENV_TYPE: any, Link: any, interceptors: any, Current: any, options: any, eventCenter: any, Events: any, preload: any;
4
+ declare const taro: typeof Taro;
5
+ declare const initPxTransform: any;
6
+ declare const requirePlugin: () => Promise<{
7
+ errMsg: string;
8
+ }>;
9
+ declare const pxTransform: (size: any) => string;
10
+ declare const canIUseWebp: () => boolean;
11
+ export default taro;
12
+ export { Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getEnv, history, initPxTransform, interceptors, Link, options, preload, pxTransform, requirePlugin };
@@ -0,0 +1,2 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const createAnimation: typeof Taro.createAnimation;
@@ -0,0 +1,6 @@
1
+ export declare const setBackgroundTextStyle: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const setBackgroundColor: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1 @@
1
+ export declare const nextTick: (callback: (...args: any[]) => any) => void;
@@ -0,0 +1,2 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const loadFontFace: typeof Taro.loadFontFace;
@@ -0,0 +1,12 @@
1
+ export * from './animation';
2
+ export * from './background';
3
+ export * from './custom-component';
4
+ export * from './fonts';
5
+ export * from './interaction';
6
+ export * from './menu';
7
+ export * from './navigation-bar';
8
+ export * from './pull-down-refresh';
9
+ export * from './scroll';
10
+ export * from './sticky';
11
+ export * from './tab-bar';
12
+ export * from './window';