@tarojs/taro-h5 3.7.0-alpha.2 → 3.7.0-alpha.3

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 (292) hide show
  1. package/dist/api/ad/index.js +2 -2
  2. package/dist/api/ad/index.js.map +1 -1
  3. package/dist/api/ai/facial.js +3 -3
  4. package/dist/api/ai/facial.js.map +1 -1
  5. package/dist/api/ai/index.d.ts +3 -2
  6. package/dist/api/ai/index.js +1 -0
  7. package/dist/api/ai/index.js.map +1 -1
  8. package/dist/api/ai/inference.d.ts +3 -0
  9. package/dist/api/ai/inference.js +8 -0
  10. package/dist/api/ai/inference.js.map +1 -0
  11. package/dist/api/ai/visual.js +2 -2
  12. package/dist/api/ai/visual.js.map +1 -1
  13. package/dist/api/alipay/index.js +1 -1
  14. package/dist/api/alipay/index.js.map +1 -1
  15. package/dist/api/base/crypto.js +1 -1
  16. package/dist/api/base/crypto.js.map +1 -1
  17. package/dist/api/base/debug.js +3 -3
  18. package/dist/api/base/debug.js.map +1 -1
  19. package/dist/api/base/index.d.ts +8 -9
  20. package/dist/api/base/index.js +6 -6
  21. package/dist/api/base/index.js.map +1 -1
  22. package/dist/api/base/performance.d.ts +4 -1
  23. package/dist/api/base/performance.js +6 -3
  24. package/dist/api/base/performance.js.map +1 -1
  25. package/dist/api/base/system.d.ts +4 -1
  26. package/dist/api/base/system.js +6 -3
  27. package/dist/api/base/system.js.map +1 -1
  28. package/dist/api/base/update.js +2 -2
  29. package/dist/api/base/update.js.map +1 -1
  30. package/dist/api/base/weapp/app-event.d.ts +13 -11
  31. package/dist/api/base/weapp/app-event.js +84 -14
  32. package/dist/api/base/weapp/app-event.js.map +1 -1
  33. package/dist/api/canvas/CanvasContext.d.ts +2 -1
  34. package/dist/api/canvas/CanvasContext.js.map +1 -1
  35. package/dist/api/canvas/index.d.ts +4 -4
  36. package/dist/api/canvas/index.js +1 -1
  37. package/dist/api/canvas/index.js.map +1 -1
  38. package/dist/api/data-analysis/index.js +4 -4
  39. package/dist/api/data-analysis/index.js.map +1 -1
  40. package/dist/api/device/accelerometer.js +1 -2
  41. package/dist/api/device/accelerometer.js.map +1 -1
  42. package/dist/api/device/accessibility.js +1 -1
  43. package/dist/api/device/accessibility.js.map +1 -1
  44. package/dist/api/device/battery.js +1 -1
  45. package/dist/api/device/battery.js.map +1 -1
  46. package/dist/api/device/bluetooth-ble.js +16 -16
  47. package/dist/api/device/bluetooth-ble.js.map +1 -1
  48. package/dist/api/device/bluetooth-peripheral.js +3 -3
  49. package/dist/api/device/bluetooth-peripheral.js.map +1 -1
  50. package/dist/api/device/bluetooth.js +13 -13
  51. package/dist/api/device/bluetooth.js.map +1 -1
  52. package/dist/api/device/calendar.d.ts +3 -2
  53. package/dist/api/device/calendar.js +142 -3
  54. package/dist/api/device/calendar.js.map +1 -1
  55. package/dist/api/device/compass.js +1 -2
  56. package/dist/api/device/compass.js.map +1 -1
  57. package/dist/api/device/contact.js +2 -2
  58. package/dist/api/device/contact.js.map +1 -1
  59. package/dist/api/device/crypto.js +1 -1
  60. package/dist/api/device/crypto.js.map +1 -1
  61. package/dist/api/device/gyroscope.js +4 -4
  62. package/dist/api/device/gyroscope.js.map +1 -1
  63. package/dist/api/device/iBeacon.js +7 -7
  64. package/dist/api/device/iBeacon.js.map +1 -1
  65. package/dist/api/device/index.d.ts +24 -23
  66. package/dist/api/device/index.js +3 -2
  67. package/dist/api/device/index.js.map +1 -1
  68. package/dist/api/device/keyboard.js +4 -4
  69. package/dist/api/device/keyboard.js.map +1 -1
  70. package/dist/api/device/memory.js +2 -2
  71. package/dist/api/device/memory.js.map +1 -1
  72. package/dist/api/device/motion.js +1 -2
  73. package/dist/api/device/motion.js.map +1 -1
  74. package/dist/api/device/network.js +3 -3
  75. package/dist/api/device/network.js.map +1 -1
  76. package/dist/api/device/nfc.js +7 -7
  77. package/dist/api/device/nfc.js.map +1 -1
  78. package/dist/api/device/scan.js +1 -1
  79. package/dist/api/device/scan.js.map +1 -1
  80. package/dist/api/device/screen.d.ts +4 -1
  81. package/dist/api/device/screen.js +10 -7
  82. package/dist/api/device/screen.js.map +1 -1
  83. package/dist/api/device/sms.d.ts +2 -0
  84. package/dist/api/device/sms.js +7 -0
  85. package/dist/api/device/sms.js.map +1 -0
  86. package/dist/api/device/wifi.d.ts +2 -1
  87. package/dist/api/device/wifi.js +13 -12
  88. package/dist/api/device/wifi.js.map +1 -1
  89. package/dist/api/ext/index.js +2 -2
  90. package/dist/api/ext/index.js.map +1 -1
  91. package/dist/api/files/index.js +8 -8
  92. package/dist/api/files/index.js.map +1 -1
  93. package/dist/api/framework/index.d.ts +1 -1
  94. package/dist/api/index.d.ts +25 -24
  95. package/dist/api/index.js +24 -14
  96. package/dist/api/index.js.map +1 -1
  97. package/dist/api/location/chooseLocation.js +9 -5
  98. package/dist/api/location/chooseLocation.js.map +1 -1
  99. package/dist/api/location/getLocation.js +1 -1
  100. package/dist/api/location/getLocation.js.map +1 -1
  101. package/dist/api/location/index.d.ts +2 -2
  102. package/dist/api/location/index.js +10 -10
  103. package/dist/api/location/index.js.map +1 -1
  104. package/dist/api/media/audio/InnerAudioContext.d.ts +3 -1
  105. package/dist/api/media/audio/InnerAudioContext.js +4 -1
  106. package/dist/api/media/audio/InnerAudioContext.js.map +1 -1
  107. package/dist/api/media/audio/index.js +8 -8
  108. package/dist/api/media/audio/index.js.map +1 -1
  109. package/dist/api/media/background-audio/BackgroundAudioManager.d.ts +1 -1
  110. package/dist/api/media/background-audio/index.d.ts +1 -1
  111. package/dist/api/media/background-audio/index.js +8 -8
  112. package/dist/api/media/background-audio/index.js.map +1 -1
  113. package/dist/api/media/camera.js +1 -1
  114. package/dist/api/media/camera.js.map +1 -1
  115. package/dist/api/media/image/chooseImage.d.ts +1 -0
  116. package/dist/api/media/image/chooseImage.js +28 -71
  117. package/dist/api/media/image/chooseImage.js.map +1 -1
  118. package/dist/api/media/image/index.d.ts +9 -6
  119. package/dist/api/media/image/index.js +8 -7
  120. package/dist/api/media/image/index.js.map +1 -1
  121. package/dist/api/media/image/previewImage.js +5 -5
  122. package/dist/api/media/image/previewImage.js.map +1 -1
  123. package/dist/api/media/image/saveImageToPhotosAlbum.d.ts +3 -0
  124. package/dist/api/media/image/saveImageToPhotosAlbum.js +30 -0
  125. package/dist/api/media/image/saveImageToPhotosAlbum.js.map +1 -0
  126. package/dist/api/media/index.d.ts +12 -12
  127. package/dist/api/media/index.js +3 -3
  128. package/dist/api/media/live.js +2 -2
  129. package/dist/api/media/live.js.map +1 -1
  130. package/dist/api/media/map.js +1 -1
  131. package/dist/api/media/map.js.map +1 -1
  132. package/dist/api/media/media-recorder.js +1 -1
  133. package/dist/api/media/media-recorder.js.map +1 -1
  134. package/dist/api/media/recorder.js +3 -3
  135. package/dist/api/media/recorder.js.map +1 -1
  136. package/dist/api/media/video/chooseMedia.d.ts +6 -0
  137. package/dist/api/media/video/chooseMedia.js +208 -0
  138. package/dist/api/media/video/chooseMedia.js.map +1 -0
  139. package/dist/api/media/video/chooseVideo.d.ts +7 -0
  140. package/dist/api/media/video/chooseVideo.js +44 -0
  141. package/dist/api/media/video/chooseVideo.js.map +1 -0
  142. package/dist/api/media/video/getVideoInfo.d.ts +3 -0
  143. package/dist/api/media/video/getVideoInfo.js +63 -0
  144. package/dist/api/media/video/getVideoInfo.js.map +1 -0
  145. package/dist/api/media/video/index.d.ts +5 -8
  146. package/dist/api/media/video/index.js +8 -67
  147. package/dist/api/media/video/index.js.map +1 -1
  148. package/dist/api/media/video/saveVideoToPhotosAlbum.d.ts +3 -0
  149. package/dist/api/media/video/saveVideoToPhotosAlbum.js +30 -0
  150. package/dist/api/media/video/saveVideoToPhotosAlbum.js.map +1 -0
  151. package/dist/api/media/video-decoder.js +1 -1
  152. package/dist/api/media/video-decoder.js.map +1 -1
  153. package/dist/api/media/video-processing.js +1 -1
  154. package/dist/api/media/video-processing.js.map +1 -1
  155. package/dist/api/media/voip.d.ts +3 -1
  156. package/dist/api/media/voip.js +17 -15
  157. package/dist/api/media/voip.js.map +1 -1
  158. package/dist/api/navigate/index.js +5 -5
  159. package/dist/api/navigate/index.js.map +1 -1
  160. package/dist/api/network/index.d.ts +7 -7
  161. package/dist/api/network/mdns.js +10 -10
  162. package/dist/api/network/mdns.js.map +1 -1
  163. package/dist/api/network/request/index.d.ts +1 -1
  164. package/dist/api/network/request/index.js +23 -18
  165. package/dist/api/network/request/index.js.map +1 -1
  166. package/dist/api/network/tcp.js +1 -1
  167. package/dist/api/network/tcp.js.map +1 -1
  168. package/dist/api/network/udp.js +1 -1
  169. package/dist/api/network/udp.js.map +1 -1
  170. package/dist/api/network/upload.js.map +1 -1
  171. package/dist/api/open-api/account.js +1 -1
  172. package/dist/api/open-api/account.js.map +1 -1
  173. package/dist/api/open-api/address.js +1 -1
  174. package/dist/api/open-api/address.js.map +1 -1
  175. package/dist/api/open-api/authorize.js +2 -2
  176. package/dist/api/open-api/authorize.js.map +1 -1
  177. package/dist/api/open-api/card.js +2 -2
  178. package/dist/api/open-api/card.js.map +1 -1
  179. package/dist/api/open-api/channels-live.d.ts +3 -1
  180. package/dist/api/open-api/channels-live.js +9 -7
  181. package/dist/api/open-api/channels-live.js.map +1 -1
  182. package/dist/api/open-api/customer-service.js +1 -1
  183. package/dist/api/open-api/customer-service.js.map +1 -1
  184. package/dist/api/open-api/device-voip.d.ts +3 -0
  185. package/dist/api/open-api/device-voip.js +8 -0
  186. package/dist/api/open-api/device-voip.js.map +1 -0
  187. package/dist/api/open-api/facial.js +4 -4
  188. package/dist/api/open-api/facial.js.map +1 -1
  189. package/dist/api/open-api/favorites.js +3 -3
  190. package/dist/api/open-api/favorites.js.map +1 -1
  191. package/dist/api/open-api/group.js +1 -1
  192. package/dist/api/open-api/group.js.map +1 -1
  193. package/dist/api/open-api/index.d.ts +19 -18
  194. package/dist/api/open-api/index.js +3 -2
  195. package/dist/api/open-api/index.js.map +1 -1
  196. package/dist/api/open-api/invoice.js +2 -2
  197. package/dist/api/open-api/invoice.js.map +1 -1
  198. package/dist/api/open-api/license-plate.js +1 -1
  199. package/dist/api/open-api/license-plate.js.map +1 -1
  200. package/dist/api/open-api/login.js +3 -3
  201. package/dist/api/open-api/login.js.map +1 -1
  202. package/dist/api/open-api/red-package.js +1 -1
  203. package/dist/api/open-api/red-package.js.map +1 -1
  204. package/dist/api/open-api/settings.js +2 -2
  205. package/dist/api/open-api/settings.js.map +1 -1
  206. package/dist/api/open-api/soter.js +3 -3
  207. package/dist/api/open-api/soter.js.map +1 -1
  208. package/dist/api/open-api/subscribe-message.d.ts +2 -1
  209. package/dist/api/open-api/subscribe-message.js +4 -2
  210. package/dist/api/open-api/subscribe-message.js.map +1 -1
  211. package/dist/api/open-api/user-info.js +2 -2
  212. package/dist/api/open-api/user-info.js.map +1 -1
  213. package/dist/api/open-api/werun.js +2 -2
  214. package/dist/api/open-api/werun.js.map +1 -1
  215. package/dist/api/payment/index.d.ts +2 -1
  216. package/dist/api/payment/index.js +4 -3
  217. package/dist/api/payment/index.js.map +1 -1
  218. package/dist/api/qq/index.d.ts +2 -0
  219. package/dist/api/qq/index.js +7 -0
  220. package/dist/api/qq/index.js.map +1 -0
  221. package/dist/api/share/index.d.ts +10 -0
  222. package/dist/api/share/index.js +21 -11
  223. package/dist/api/share/index.js.map +1 -1
  224. package/dist/api/storage/background-fetch.js +4 -4
  225. package/dist/api/storage/background-fetch.js.map +1 -1
  226. package/dist/api/storage/cache-manager.d.ts +2 -0
  227. package/dist/api/storage/cache-manager.js +7 -0
  228. package/dist/api/storage/cache-manager.js.map +1 -0
  229. package/dist/api/storage/index.d.ts +7 -2
  230. package/dist/api/storage/index.js +8 -3
  231. package/dist/api/storage/index.js.map +1 -1
  232. package/dist/api/swan/index.js +21 -21
  233. package/dist/api/swan/index.js.map +1 -1
  234. package/dist/api/taro.d.ts +7 -2
  235. package/dist/api/taro.js +13 -4
  236. package/dist/api/taro.js.map +1 -1
  237. package/dist/api/ui/background.js +2 -2
  238. package/dist/api/ui/background.js.map +1 -1
  239. package/dist/api/ui/index.d.ts +12 -12
  240. package/dist/api/ui/index.js +1 -1
  241. package/dist/api/ui/interaction/index.d.ts +1 -1
  242. package/dist/api/ui/interaction/index.js +4 -4
  243. package/dist/api/ui/interaction/index.js.map +1 -1
  244. package/dist/api/ui/interaction/modal.js +6 -0
  245. package/dist/api/ui/interaction/modal.js.map +1 -1
  246. package/dist/api/ui/interaction/toast.js +4 -0
  247. package/dist/api/ui/interaction/toast.js.map +1 -1
  248. package/dist/api/ui/menu.js +1 -1
  249. package/dist/api/ui/menu.js.map +1 -1
  250. package/dist/api/ui/navigation-bar/index.js +3 -3
  251. package/dist/api/ui/navigation-bar/index.js.map +1 -1
  252. package/dist/api/ui/scroll/index.js +4 -3
  253. package/dist/api/ui/scroll/index.js.map +1 -1
  254. package/dist/api/ui/sticky.js +1 -1
  255. package/dist/api/ui/sticky.js.map +1 -1
  256. package/dist/api/ui/window.d.ts +2 -1
  257. package/dist/api/ui/window.js +3 -2
  258. package/dist/api/ui/window.js.map +1 -1
  259. package/dist/api/worker/index.js +1 -1
  260. package/dist/api/worker/index.js.map +1 -1
  261. package/dist/api/wxml/IntersectionObserver.d.ts +1 -1
  262. package/dist/api/wxml/IntersectionObserver.js +15 -13
  263. package/dist/api/wxml/IntersectionObserver.js.map +1 -1
  264. package/dist/api/wxml/MediaQueryObserver.d.ts +1 -1
  265. package/dist/api/wxml/MediaQueryObserver.js +1 -2
  266. package/dist/api/wxml/MediaQueryObserver.js.map +1 -1
  267. package/dist/api/wxml/nodesRef.d.ts +1 -1
  268. package/dist/api/wxml/selectorQuery.d.ts +1 -1
  269. package/dist/api/wxml/selectorQuery.js +9 -6
  270. package/dist/api/wxml/selectorQuery.js.map +1 -1
  271. package/dist/index.cjs.d.ts +95 -51
  272. package/dist/index.cjs.js +3226 -2710
  273. package/dist/index.cjs.js.map +1 -1
  274. package/dist/index.d.ts +3 -3
  275. package/dist/index.esm.d.ts +95 -51
  276. package/dist/index.esm.js +2401 -1914
  277. package/dist/index.esm.js.map +1 -1
  278. package/dist/index.js +29 -15
  279. package/dist/index.js.map +1 -1
  280. package/dist/utils/handler.d.ts +13 -26
  281. package/dist/utils/handler.js +4 -16
  282. package/dist/utils/handler.js.map +1 -1
  283. package/dist/utils/helper.d.ts +2 -0
  284. package/dist/utils/helper.js +11 -0
  285. package/dist/utils/helper.js.map +1 -0
  286. package/dist/utils/index.d.ts +7 -6
  287. package/dist/utils/index.js +4 -12
  288. package/dist/utils/index.js.map +1 -1
  289. package/package.json +20 -14
  290. package/dist/utils/lodash.d.ts +0 -3
  291. package/dist/utils/lodash.js +0 -32
  292. package/dist/utils/lodash.js.map +0 -1
@@ -1,20 +1,22 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 实时语音
4
- const updateVoIPChatMuteConfig = temporarilyNotSupport('updateVoIPChatMuteConfig');
5
- const subscribeVoIPVideoMembers = temporarilyNotSupport('subscribeVoIPVideoMembers');
6
- const setEnable1v1Chat = temporarilyNotSupport('setEnable1v1Chat');
7
- const onVoIPVideoMembersChanged = temporarilyNotSupport('onVoIPVideoMembersChanged');
8
- const onVoIPChatStateChanged = temporarilyNotSupport('onVoIPChatStateChanged');
9
- const onVoIPChatSpeakersChanged = temporarilyNotSupport('onVoIPChatSpeakersChanged');
10
- const onVoIPChatMembersChanged = temporarilyNotSupport('onVoIPChatMembersChanged');
11
- const onVoIPChatInterrupted = temporarilyNotSupport('onVoIPChatInterrupted');
12
- const offVoIPVideoMembersChanged = temporarilyNotSupport('offVoIPVideoMembersChanged');
13
- const offVoIPChatStateChanged = temporarilyNotSupport('offVoIPChatStateChanged');
14
- const offVoIPChatMembersChanged = temporarilyNotSupport('offVoIPChatMembersChanged');
15
- const offVoIPChatInterrupted = temporarilyNotSupport('offVoIPChatInterrupted');
16
- const joinVoIPChat = temporarilyNotSupport('joinVoIPChat');
17
- const exitVoIPChat = temporarilyNotSupport('exitVoIPChat');
4
+ const updateVoIPChatMuteConfig = /* @__PURE__ */ temporarilyNotSupport('updateVoIPChatMuteConfig');
5
+ const subscribeVoIPVideoMembers = /* @__PURE__ */ temporarilyNotSupport('subscribeVoIPVideoMembers');
6
+ const setEnable1v1Chat = /* @__PURE__ */ temporarilyNotSupport('setEnable1v1Chat');
7
+ const onVoIPVideoMembersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPVideoMembersChanged');
8
+ const onVoIPChatStateChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatStateChanged');
9
+ const onVoIPChatSpeakersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatSpeakersChanged');
10
+ const onVoIPChatMembersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatMembersChanged');
11
+ const onVoIPChatInterrupted = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatInterrupted');
12
+ const offVoIPChatSpeakersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatSpeakersChanged');
13
+ const offVoIPVideoMembersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPVideoMembersChanged');
14
+ const offVoIPChatStateChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatStateChanged');
15
+ const offVoIPChatMembersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatMembersChanged');
16
+ const offVoIPChatInterrupted = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatInterrupted');
17
+ const joinVoIPChat = /* @__PURE__ */ temporarilyNotSupport('joinVoIPChat');
18
+ const join1v1Chat = /* @__PURE__ */ temporarilyNotSupport('join1v1Chat');
19
+ const exitVoIPChat = /* @__PURE__ */ temporarilyNotSupport('exitVoIPChat');
18
20
 
19
- export { exitVoIPChat, joinVoIPChat, offVoIPChatInterrupted, offVoIPChatMembersChanged, offVoIPChatStateChanged, offVoIPVideoMembersChanged, onVoIPChatInterrupted, onVoIPChatMembersChanged, onVoIPChatSpeakersChanged, onVoIPChatStateChanged, onVoIPVideoMembersChanged, setEnable1v1Chat, subscribeVoIPVideoMembers, updateVoIPChatMuteConfig };
21
+ export { exitVoIPChat, join1v1Chat, joinVoIPChat, offVoIPChatInterrupted, offVoIPChatMembersChanged, offVoIPChatSpeakersChanged, offVoIPChatStateChanged, offVoIPVideoMembersChanged, onVoIPChatInterrupted, onVoIPChatMembersChanged, onVoIPChatSpeakersChanged, onVoIPChatStateChanged, onVoIPVideoMembersChanged, setEnable1v1Chat, subscribeVoIPVideoMembers, updateVoIPChatMuteConfig };
20
22
  //# sourceMappingURL=voip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"voip.js","sources":["../../../src/api/media/voip.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 实时语音\nexport const updateVoIPChatMuteConfig = temporarilyNotSupport('updateVoIPChatMuteConfig')\nexport const subscribeVoIPVideoMembers = temporarilyNotSupport('subscribeVoIPVideoMembers')\nexport const setEnable1v1Chat = temporarilyNotSupport('setEnable1v1Chat')\nexport const onVoIPVideoMembersChanged = temporarilyNotSupport('onVoIPVideoMembersChanged')\nexport const onVoIPChatStateChanged = temporarilyNotSupport('onVoIPChatStateChanged')\nexport const onVoIPChatSpeakersChanged = temporarilyNotSupport('onVoIPChatSpeakersChanged')\nexport const onVoIPChatMembersChanged = temporarilyNotSupport('onVoIPChatMembersChanged')\nexport const onVoIPChatInterrupted = temporarilyNotSupport('onVoIPChatInterrupted')\nexport const offVoIPVideoMembersChanged = temporarilyNotSupport('offVoIPVideoMembersChanged')\nexport const offVoIPChatStateChanged = temporarilyNotSupport('offVoIPChatStateChanged')\nexport const offVoIPChatMembersChanged = temporarilyNotSupport('offVoIPChatMembersChanged')\nexport const offVoIPChatInterrupted = temporarilyNotSupport('offVoIPChatInterrupted')\nexport const joinVoIPChat = temporarilyNotSupport('joinVoIPChat')\nexport const exitVoIPChat = temporarilyNotSupport('exitVoIPChat')\n"],"names":[],"mappings":";;AAEA;MACa,wBAAwB,GAAG,qBAAqB,CAAC,0BAA0B,EAAC;MAC5E,yBAAyB,GAAG,qBAAqB,CAAC,2BAA2B,EAAC;MAC9E,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB,EAAC;MAC5D,yBAAyB,GAAG,qBAAqB,CAAC,2BAA2B,EAAC;MAC9E,sBAAsB,GAAG,qBAAqB,CAAC,wBAAwB,EAAC;MACxE,yBAAyB,GAAG,qBAAqB,CAAC,2BAA2B,EAAC;MAC9E,wBAAwB,GAAG,qBAAqB,CAAC,0BAA0B,EAAC;MAC5E,qBAAqB,GAAG,qBAAqB,CAAC,uBAAuB,EAAC;MACtE,0BAA0B,GAAG,qBAAqB,CAAC,4BAA4B,EAAC;MAChF,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;MAC1E,yBAAyB,GAAG,qBAAqB,CAAC,2BAA2B,EAAC;MAC9E,sBAAsB,GAAG,qBAAqB,CAAC,wBAAwB,EAAC;MACxE,YAAY,GAAG,qBAAqB,CAAC,cAAc,EAAC;MACpD,YAAY,GAAG,qBAAqB,CAAC,cAAc;;;;"}
1
+ {"version":3,"file":"voip.js","sources":["../../../src/api/media/voip.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 实时语音\nexport const updateVoIPChatMuteConfig = /* @__PURE__ */ temporarilyNotSupport('updateVoIPChatMuteConfig')\nexport const subscribeVoIPVideoMembers = /* @__PURE__ */ temporarilyNotSupport('subscribeVoIPVideoMembers')\nexport const setEnable1v1Chat = /* @__PURE__ */ temporarilyNotSupport('setEnable1v1Chat')\nexport const onVoIPVideoMembersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPVideoMembersChanged')\nexport const onVoIPChatStateChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatStateChanged')\nexport const onVoIPChatSpeakersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatSpeakersChanged')\nexport const onVoIPChatMembersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatMembersChanged')\nexport const onVoIPChatInterrupted = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatInterrupted')\nexport const offVoIPChatSpeakersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatSpeakersChanged')\nexport const offVoIPVideoMembersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPVideoMembersChanged')\nexport const offVoIPChatStateChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatStateChanged')\nexport const offVoIPChatMembersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatMembersChanged')\nexport const offVoIPChatInterrupted = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatInterrupted')\nexport const joinVoIPChat = /* @__PURE__ */ temporarilyNotSupport('joinVoIPChat')\nexport const join1v1Chat = /* @__PURE__ */ temporarilyNotSupport('join1v1Chat')\nexport const exitVoIPChat = /* @__PURE__ */ temporarilyNotSupport('exitVoIPChat')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,wBAAwB,mBAAmB,qBAAqB,CAAC,0BAA0B,EAAC;AAC5F,MAAA,yBAAyB,mBAAmB,qBAAqB,CAAC,2BAA2B,EAAC;AAC9F,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAC5E,MAAA,yBAAyB,mBAAmB,qBAAqB,CAAC,2BAA2B,EAAC;AAC9F,MAAA,sBAAsB,mBAAmB,qBAAqB,CAAC,wBAAwB,EAAC;AACxF,MAAA,yBAAyB,mBAAmB,qBAAqB,CAAC,2BAA2B,EAAC;AAC9F,MAAA,wBAAwB,mBAAmB,qBAAqB,CAAC,0BAA0B,EAAC;AAC5F,MAAA,qBAAqB,mBAAmB,qBAAqB,CAAC,uBAAuB,EAAC;AACtF,MAAA,0BAA0B,mBAAmB,qBAAqB,CAAC,4BAA4B,EAAC;AAChG,MAAA,0BAA0B,mBAAmB,qBAAqB,CAAC,4BAA4B,EAAC;AAChG,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,yBAAyB,mBAAmB,qBAAqB,CAAC,2BAA2B,EAAC;AAC9F,MAAA,sBAAsB,mBAAmB,qBAAqB,CAAC,wBAAwB,EAAC;AACxF,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc,EAAC;AACpE,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa,EAAC;AAClE,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 跳转
4
- const openEmbeddedMiniProgram = temporarilyNotSupport('openEmbeddedMiniProgram');
5
- const navigateToMiniProgram = temporarilyNotSupport('navigateToMiniProgram');
6
- const navigateBackMiniProgram = temporarilyNotSupport('navigateBackMiniProgram');
7
- const exitMiniProgram = temporarilyNotSupport('exitMiniProgram');
8
- const openBusinessView = temporarilyNotSupport('openBusinessView');
4
+ const openEmbeddedMiniProgram = /* @__PURE__ */ temporarilyNotSupport('openEmbeddedMiniProgram');
5
+ const navigateToMiniProgram = /* @__PURE__ */ temporarilyNotSupport('navigateToMiniProgram');
6
+ const navigateBackMiniProgram = /* @__PURE__ */ temporarilyNotSupport('navigateBackMiniProgram');
7
+ const exitMiniProgram = /* @__PURE__ */ temporarilyNotSupport('exitMiniProgram');
8
+ const openBusinessView = /* @__PURE__ */ temporarilyNotSupport('openBusinessView');
9
9
 
10
10
  export { exitMiniProgram, navigateBackMiniProgram, navigateToMiniProgram, openBusinessView, openEmbeddedMiniProgram };
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/api/navigate/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 跳转\nexport const openEmbeddedMiniProgram = temporarilyNotSupport('openEmbeddedMiniProgram')\nexport const navigateToMiniProgram = temporarilyNotSupport('navigateToMiniProgram')\nexport const navigateBackMiniProgram = temporarilyNotSupport('navigateBackMiniProgram')\nexport const exitMiniProgram = temporarilyNotSupport('exitMiniProgram')\nexport const openBusinessView = temporarilyNotSupport('openBusinessView')\n"],"names":[],"mappings":";;AAEA;MACa,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;MAC1E,qBAAqB,GAAG,qBAAqB,CAAC,uBAAuB,EAAC;MACtE,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;MAC1E,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,EAAC;MAC1D,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/navigate/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 跳转\nexport const openEmbeddedMiniProgram = /* @__PURE__ */ temporarilyNotSupport('openEmbeddedMiniProgram')\nexport const navigateToMiniProgram = /* @__PURE__ */ temporarilyNotSupport('navigateToMiniProgram')\nexport const navigateBackMiniProgram = /* @__PURE__ */ temporarilyNotSupport('navigateBackMiniProgram')\nexport const exitMiniProgram = /* @__PURE__ */ temporarilyNotSupport('exitMiniProgram')\nexport const openBusinessView = /* @__PURE__ */ temporarilyNotSupport('openBusinessView')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,qBAAqB,mBAAmB,qBAAqB,CAAC,uBAAuB,EAAC;AACtF,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,eAAe,mBAAmB,qBAAqB,CAAC,iBAAiB,EAAC;AAC1E,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB;;;;"}
@@ -1,7 +1,7 @@
1
- export * from "./download";
2
- export * from "./mdns";
3
- export * from "./request/index";
4
- export * from "./tcp";
5
- export * from "./udp";
6
- export * from "./upload";
7
- export * from "./websocket/index";
1
+ export * from "./download.js";
2
+ export * from "./mdns.js";
3
+ export * from "./request/index.js";
4
+ export * from "./tcp.js";
5
+ export * from "./udp.js";
6
+ export * from "./upload.js";
7
+ export * from "./websocket/index.js";
@@ -1,16 +1,16 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // mDNS
4
- const stopLocalServiceDiscovery = temporarilyNotSupport('stopLocalServiceDiscovery');
5
- const startLocalServiceDiscovery = temporarilyNotSupport('startLocalServiceDiscovery');
6
- const onLocalServiceResolveFail = temporarilyNotSupport('onLocalServiceResolveFail');
7
- const onLocalServiceLost = temporarilyNotSupport('onLocalServiceLost');
8
- const onLocalServiceFound = temporarilyNotSupport('onLocalServiceFound');
9
- const onLocalServiceDiscoveryStop = temporarilyNotSupport('onLocalServiceDiscoveryStop');
10
- const offLocalServiceResolveFail = temporarilyNotSupport('offLocalServiceResolveFail');
11
- const offLocalServiceLost = temporarilyNotSupport('offLocalServiceLost');
12
- const offLocalServiceFound = temporarilyNotSupport('offLocalServiceFound');
13
- const offLocalServiceDiscoveryStop = temporarilyNotSupport('offLocalServiceDiscoveryStop');
4
+ const stopLocalServiceDiscovery = /* @__PURE__ */ temporarilyNotSupport('stopLocalServiceDiscovery');
5
+ const startLocalServiceDiscovery = /* @__PURE__ */ temporarilyNotSupport('startLocalServiceDiscovery');
6
+ const onLocalServiceResolveFail = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceResolveFail');
7
+ const onLocalServiceLost = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceLost');
8
+ const onLocalServiceFound = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceFound');
9
+ const onLocalServiceDiscoveryStop = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceDiscoveryStop');
10
+ const offLocalServiceResolveFail = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceResolveFail');
11
+ const offLocalServiceLost = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceLost');
12
+ const offLocalServiceFound = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceFound');
13
+ const offLocalServiceDiscoveryStop = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceDiscoveryStop');
14
14
 
15
15
  export { offLocalServiceDiscoveryStop, offLocalServiceFound, offLocalServiceLost, offLocalServiceResolveFail, onLocalServiceDiscoveryStop, onLocalServiceFound, onLocalServiceLost, onLocalServiceResolveFail, startLocalServiceDiscovery, stopLocalServiceDiscovery };
16
16
  //# sourceMappingURL=mdns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mdns.js","sources":["../../../src/api/network/mdns.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// mDNS\nexport const stopLocalServiceDiscovery = temporarilyNotSupport('stopLocalServiceDiscovery')\nexport const startLocalServiceDiscovery = temporarilyNotSupport('startLocalServiceDiscovery')\nexport const onLocalServiceResolveFail = temporarilyNotSupport('onLocalServiceResolveFail')\nexport const onLocalServiceLost = temporarilyNotSupport('onLocalServiceLost')\nexport const onLocalServiceFound = temporarilyNotSupport('onLocalServiceFound')\nexport const onLocalServiceDiscoveryStop = temporarilyNotSupport('onLocalServiceDiscoveryStop')\nexport const offLocalServiceResolveFail = temporarilyNotSupport('offLocalServiceResolveFail')\nexport const offLocalServiceLost = temporarilyNotSupport('offLocalServiceLost')\nexport const offLocalServiceFound = temporarilyNotSupport('offLocalServiceFound')\nexport const offLocalServiceDiscoveryStop = temporarilyNotSupport('offLocalServiceDiscoveryStop')\n"],"names":[],"mappings":";;AAEA;MACa,yBAAyB,GAAG,qBAAqB,CAAC,2BAA2B,EAAC;MAC9E,0BAA0B,GAAG,qBAAqB,CAAC,4BAA4B,EAAC;MAChF,yBAAyB,GAAG,qBAAqB,CAAC,2BAA2B,EAAC;MAC9E,kBAAkB,GAAG,qBAAqB,CAAC,oBAAoB,EAAC;MAChE,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;MAClE,2BAA2B,GAAG,qBAAqB,CAAC,6BAA6B,EAAC;MAClF,0BAA0B,GAAG,qBAAqB,CAAC,4BAA4B,EAAC;MAChF,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;MAClE,oBAAoB,GAAG,qBAAqB,CAAC,sBAAsB,EAAC;MACpE,4BAA4B,GAAG,qBAAqB,CAAC,8BAA8B;;;;"}
1
+ {"version":3,"file":"mdns.js","sources":["../../../src/api/network/mdns.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// mDNS\nexport const stopLocalServiceDiscovery = /* @__PURE__ */ temporarilyNotSupport('stopLocalServiceDiscovery')\nexport const startLocalServiceDiscovery = /* @__PURE__ */ temporarilyNotSupport('startLocalServiceDiscovery')\nexport const onLocalServiceResolveFail = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceResolveFail')\nexport const onLocalServiceLost = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceLost')\nexport const onLocalServiceFound = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceFound')\nexport const onLocalServiceDiscoveryStop = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceDiscoveryStop')\nexport const offLocalServiceResolveFail = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceResolveFail')\nexport const offLocalServiceLost = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceLost')\nexport const offLocalServiceFound = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceFound')\nexport const offLocalServiceDiscoveryStop = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceDiscoveryStop')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,yBAAyB,mBAAmB,qBAAqB,CAAC,2BAA2B,EAAC;AAC9F,MAAA,0BAA0B,mBAAmB,qBAAqB,CAAC,4BAA4B,EAAC;AAChG,MAAA,yBAAyB,mBAAmB,qBAAqB,CAAC,2BAA2B,EAAC;AAC9F,MAAA,kBAAkB,mBAAmB,qBAAqB,CAAC,oBAAoB,EAAC;AAChF,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,2BAA2B,mBAAmB,qBAAqB,CAAC,6BAA6B,EAAC;AAClG,MAAA,0BAA0B,mBAAmB,qBAAqB,CAAC,4BAA4B,EAAC;AAChG,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,oBAAoB,mBAAmB,qBAAqB,CAAC,sBAAsB,EAAC;AACpF,MAAA,4BAA4B,mBAAmB,qBAAqB,CAAC,8BAA8B;;;;"}
@@ -1,5 +1,5 @@
1
1
  import Taro from '@tarojs/api';
2
- declare const request: typeof Taro.request;
2
+ declare const request: <T = any, U = any>(option: Taro.request.Option<T, U>) => Taro.RequestTask<T>;
3
3
  declare const addInterceptor: any;
4
4
  declare const cleanInterceptors: any;
5
5
  export { request, addInterceptor, cleanInterceptors };
@@ -1,3 +1,4 @@
1
+ import { __rest } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
2
  import 'whatwg-fetch';
2
3
  import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
3
4
  import Taro from '@tarojs/api';
@@ -7,7 +8,7 @@ import { serializeParams } from '../../../utils/index.js';
7
8
 
8
9
  // @ts-ignore
9
10
  const { Link } = Taro;
10
- function generateRequestUrlWithParams(url, params) {
11
+ function generateRequestUrlWithParams(url = '', params) {
11
12
  params = typeof params === 'string' ? params : serializeParams(params);
12
13
  if (params) {
13
14
  url += (~url.indexOf('?') ? '&' : '?') + params;
@@ -15,26 +16,21 @@ function generateRequestUrlWithParams(url, params) {
15
16
  url = url.replace('?&', '?');
16
17
  return url;
17
18
  }
18
- // FIXME 移除 any 标注
19
- function _request(options) {
20
- options = options || {};
21
- if (typeof options === 'string') {
22
- options = {
23
- url: options
24
- };
25
- }
19
+ function _request(options = {}) {
26
20
  const { success, complete, fail } = options;
27
- let url = options.url;
21
+ let url = options.url || '';
28
22
  const params = {};
29
23
  const res = {};
30
24
  if (options.jsonp) {
31
- Object.assign(params, options);
32
- params.params = options.data;
33
- params.cache = options.jsonpCache;
34
- if (typeof options.jsonp === 'string') {
35
- params.name = options.jsonp;
25
+ const { jsonp } = options, opts = __rest(options, ["jsonp"]);
26
+ Object.assign(params, opts);
27
+ // @ts-ignore
28
+ params.params = opts.data;
29
+ params.cache = opts.jsonpCache;
30
+ if (typeof jsonp === 'string') {
31
+ // @ts-ignore
32
+ params.name = jsonp;
36
33
  }
37
- delete params.jsonp;
38
34
  return jsonpRetry(url, params)
39
35
  .then(data => {
40
36
  res.statusCode = 200;
@@ -55,7 +51,7 @@ function _request(options) {
55
51
  if (methodUpper === 'GET' || methodUpper === 'HEAD') {
56
52
  url = generateRequestUrlWithParams(url, options.data);
57
53
  }
58
- else if (Object.prototype.toString.call(options.data) === '[object Object]') {
54
+ else if (['[object Array]', '[object Object]'].indexOf(Object.prototype.toString.call(options.data)) >= 0) {
59
55
  options.header = options.header || {};
60
56
  const keyOfContentType = Object.keys(options.header).find(item => item.toLowerCase() === 'content-type');
61
57
  if (!keyOfContentType) {
@@ -145,7 +141,16 @@ function taroInterceptor(chain) {
145
141
  return _request(chain.requestParams);
146
142
  }
147
143
  const link = new Link(taroInterceptor);
148
- const request = link.request.bind(link);
144
+ const request = ((...args) => {
145
+ const [url = '', options = {}] = args;
146
+ if (typeof url === 'string') {
147
+ options.url = url;
148
+ }
149
+ else {
150
+ Object.assign(options, url);
151
+ }
152
+ return link.request(options);
153
+ });
149
154
  const addInterceptor = link.addInterceptor.bind(link);
150
155
  const cleanInterceptors = link.cleanInterceptors.bind(link);
151
156
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/api/network/request/index.ts"],"sourcesContent":["import 'whatwg-fetch'\nimport 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'\n\nimport Taro from '@tarojs/api'\nimport { isFunction } from '@tarojs/shared'\nimport jsonpRetry from 'jsonp-retry'\n\nimport { serializeParams } from '../../../utils'\n\n// @ts-ignore\nconst { Link } = Taro\n\nfunction generateRequestUrlWithParams (url: string, params?: unknown) {\n params = typeof params === 'string' ? params : serializeParams(params)\n if (params) {\n url += (~url.indexOf('?') ? '&' : '?') + params\n }\n url = url.replace('?&', '?')\n return url\n}\n\n// FIXME 移除 any 标注\nfunction _request (options) {\n options = options || {}\n if (typeof options === 'string') {\n options = {\n url: options\n }\n }\n const { success, complete, fail } = options\n let url = options.url\n const params: any = {}\n const res: any = {}\n if (options.jsonp) {\n Object.assign(params, options)\n params.params = options.data\n params.cache = options.jsonpCache\n if (typeof options.jsonp === 'string') {\n params.name = options.jsonp\n }\n delete params.jsonp\n return jsonpRetry(url, params)\n .then(data => {\n res.statusCode = 200\n res.data = data\n isFunction(success) && success(res)\n isFunction(complete) && complete(res)\n return res\n })\n .catch(err => {\n isFunction(fail) && fail(err)\n isFunction(complete) && complete(res)\n return Promise.reject(err)\n })\n }\n params.method = options.method || 'GET'\n const methodUpper = params.method.toUpperCase()\n params.cache = options.cache || 'default'\n if (methodUpper === 'GET' || methodUpper === 'HEAD') {\n url = generateRequestUrlWithParams(url, options.data)\n } else if (Object.prototype.toString.call(options.data) === '[object Object]') {\n options.header = options.header || {}\n\n const keyOfContentType = Object.keys(options.header).find(item => item.toLowerCase() === 'content-type')\n if (!keyOfContentType) {\n options.header['Content-Type'] = 'application/json'\n }\n const contentType = options.header[keyOfContentType || 'Content-Type']\n\n if (contentType.indexOf('application/json') >= 0) {\n params.body = JSON.stringify(options.data)\n } else if (contentType.indexOf('application/x-www-form-urlencoded') >= 0) {\n params.body = serializeParams(options.data)\n } else {\n params.body = options.data\n }\n } else {\n params.body = options.data\n }\n if (options.header) {\n params.headers = options.header\n }\n if (options.mode) {\n params.mode = options.mode\n }\n let timeoutTimer: ReturnType<typeof setTimeout> | null = null\n if (options.signal) {\n params.signal = options.signal\n } else if (typeof options.timeout === 'number') {\n const controller = new window.AbortController()\n params.signal = controller.signal\n timeoutTimer = setTimeout(function () {\n controller.abort()\n }, options.timeout)\n }\n params.credentials = options.credentials\n return fetch(url, params)\n .then(response => {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer)\n timeoutTimer = null\n }\n if (!response) {\n const errorResponse = { ok: false }\n throw errorResponse\n }\n res.statusCode = response.status\n res.header = {}\n for (const key of response.headers.keys()) {\n res.header[key] = response.headers.get(key)\n }\n if (options.responseType === 'arraybuffer') {\n return response.arrayBuffer()\n }\n if (res.statusCode !== 204) {\n if (options.dataType === 'json' || typeof options.dataType === 'undefined') {\n return response.json().catch(() => {\n return null\n })\n }\n }\n if (options.responseType === 'text' || options.dataType === 'text') {\n return response.text()\n }\n return Promise.resolve(null)\n })\n .then(data => {\n res.data = data\n isFunction(success) && success(res)\n isFunction(complete) && complete(res)\n return res\n })\n .catch(err => {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer)\n timeoutTimer = null\n }\n isFunction(fail) && fail(err)\n isFunction(complete) && complete(res)\n err.statusCode = res.statusCode\n err.errMsg = err.message\n return Promise.reject(err)\n })\n}\n\nfunction taroInterceptor (chain) {\n return _request(chain.requestParams)\n}\n\nconst link = new Link(taroInterceptor)\n\nexport const request: typeof Taro.request = link.request.bind(link)\nexport const addInterceptor = link.addInterceptor.bind(link)\nexport const cleanInterceptors = link.cleanInterceptors.bind(link)\n"],"names":[],"mappings":";;;;;;;AASA;AACA,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;AAErB,SAAS,4BAA4B,CAAE,GAAW,EAAE,MAAgB,EAAA;AAClE,IAAA,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AACtE,IAAA,IAAI,MAAM,EAAE;QACV,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,MAAM,CAAA;AAChD,KAAA;IACD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAC5B,IAAA,OAAO,GAAG,CAAA;AACZ,CAAC;AAED;AACA,SAAS,QAAQ,CAAE,OAAO,EAAA;AACxB,IAAA,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;AACvB,IAAA,IAAI,OAAO,O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OAAO,GAAG,CAAA;AACZ,KAAC,CAAC;SACD,KAAK,CAAC,GAAG,IAAG;AACX,QAAA,IAAI,YAAY,EAAE;YAChB,YAAY,CAAC,YAAY,CAAC,CAAA;YAC1B,YAAY,GAAG,IAAI,CAAA;AACpB,SAAA;QACD,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC7B,UAAU,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAA;AACrC,QAAA,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAA;AAC/B,QAAA,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAA;AACxB,QAAA,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAC5B,KAAC,CAAC,CAAA;AACN,CAAC;AAED,SAAS,eAAe,CAAE,KAAK,EAAA;AAC7B,IAAA,OAAO,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AACtC,CAAC;AAED,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,CAAA;AAE/B,MAAM,OAAO,GAAwB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAC;AAC5D,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAC;AACrD,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/api/network/request/index.ts"],"sourcesContent":["import 'whatwg-fetch'\nimport 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'\n\nimport Taro from '@tarojs/api'\nimport { isFunction } from '@tarojs/shared'\nimport jsonpRetry from 'jsonp-retry'\n\nimport { serializeParams } from '../../../utils'\n\n// @ts-ignore\nconst { Link } = Taro\n\nfunction generateRequestUrlWithParams (url = '', params?: unknown) {\n params = typeof params === 'string' ? params : serializeParams(params)\n if (params) {\n url += (~url.indexOf('?') ? '&' : '?') + params\n }\n url = url.replace('?&', '?')\n return url\n}\n\nfunction _request (options: Partial<Taro.request.Option> = {}) {\n const { success, complete, fail } = options\n let url = options.url || ''\n const params: RequestInit = {}\n const res: any = {}\n if (options.jsonp) {\n const { jsonp, ...opts } = options\n Object.assign(params, opts)\n // @ts-ignore\n params.params = opts.data\n params.cache = opts.jsonpCache\n if (typeof jsonp === 'string') {\n // @ts-ignore\n params.name = jsonp\n }\n return jsonpRetry(url, params)\n .then(data => {\n res.statusCode = 200\n res.data = data\n isFunction(success) && success(res)\n isFunction(complete) && complete(res)\n return res\n })\n .catch(err => {\n isFunction(fail) && fail(err)\n isFunction(complete) && complete(res)\n return Promise.reject(err)\n })\n }\n params.method = options.method || 'GET'\n const methodUpper = params.method.toUpperCase()\n params.cache = options.cache || 'default'\n if (methodUpper === 'GET' || methodUpper === 'HEAD') {\n url = generateRequestUrlWithParams(url, options.data)\n } else if (['[object Array]', '[object Object]'].indexOf(Object.prototype.toString.call(options.data)) >= 0) {\n options.header = options.header || {}\n\n const keyOfContentType = Object.keys(options.header).find(item => item.toLowerCase() === 'content-type')\n if (!keyOfContentType) {\n options.header['Content-Type'] = 'application/json'\n }\n const contentType = options.header[keyOfContentType || 'Content-Type']\n\n if (contentType.indexOf('application/json') >= 0) {\n params.body = JSON.stringify(options.data)\n } else if (contentType.indexOf('application/x-www-form-urlencoded') >= 0) {\n params.body = serializeParams(options.data)\n } else {\n params.body = options.data\n }\n } else {\n params.body = options.data\n }\n if (options.header) {\n params.headers = options.header\n }\n if (options.mode) {\n params.mode = options.mode\n }\n let timeoutTimer: ReturnType<typeof setTimeout> | null = null\n if (options.signal) {\n params.signal = options.signal\n } else if (typeof options.timeout === 'number') {\n const controller = new window.AbortController()\n params.signal = controller.signal\n timeoutTimer = setTimeout(function () {\n controller.abort()\n }, options.timeout)\n }\n params.credentials = options.credentials\n return fetch(url, params)\n .then(response => {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer)\n timeoutTimer = null\n }\n if (!response) {\n const errorResponse = { ok: false }\n throw errorResponse\n }\n res.statusCode = response.status\n res.header = {}\n for (const key of response.headers.keys()) {\n res.header[key] = response.headers.get(key)\n }\n if (options.responseType === 'arraybuffer') {\n return response.arrayBuffer()\n }\n if (res.statusCode !== 204) {\n if (options.dataType === 'json' || typeof options.dataType === 'undefined') {\n return response.json().catch(() => {\n return null\n })\n }\n }\n if (options.responseType === 'text' || options.dataType === 'text') {\n return response.text()\n }\n return Promise.resolve(null)\n })\n .then(data => {\n res.data = data\n isFunction(success) && success(res)\n isFunction(complete) && complete(res)\n return res\n })\n .catch(err => {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer)\n timeoutTimer = null\n }\n isFunction(fail) && fail(err)\n isFunction(complete) && complete(res)\n err.statusCode = res.statusCode\n err.errMsg = err.message\n return Promise.reject(err)\n })\n}\n\nfunction taroInterceptor (chain) {\n return _request(chain.requestParams)\n}\n\nconst link = new Link(taroInterceptor)\n\nexport const request = (<T extends Partial<Taro.request.Option> = TaroGeneral.IAnyObject>(...args: [string | T, T]) => {\n const [url = '', options = {} as T] = args\n if (typeof url === 'string') {\n options.url = url\n } else {\n Object.assign(options, url)\n }\n return link.request(options)\n}) as typeof Taro.request\nexport const addInterceptor = link.addInterceptor.bind(link)\nexport const cleanInterceptors = link.cleanInterceptors.bind(link)\n"],"names":[],"mappings":";;;;;;;;AASA;AACA,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;AAErB,SAAS,4BAA4B,CAAE,GAAG,GAAG,EAAE,EAAE,MAAgB,EAAA;AAC/D,IAAA,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AACtE,IAAA,IAAI,MAAM,EAAE;QACV,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,MAAM,CAAA;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D,IAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;AAC9B,CAAC,EAAwB;AAClB,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAC;AACrD,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // TCP 通信
4
- const createTCPSocket = temporarilyNotSupport('createTCPSocket');
4
+ const createTCPSocket = /* @__PURE__ */ temporarilyNotSupport('createTCPSocket');
5
5
 
6
6
  export { createTCPSocket };
7
7
  //# sourceMappingURL=tcp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tcp.js","sources":["../../../src/api/network/tcp.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// TCP 通信\nexport const createTCPSocket = temporarilyNotSupport('createTCPSocket')\n"],"names":[],"mappings":";;AAEA;MACa,eAAe,GAAG,qBAAqB,CAAC,iBAAiB;;;;"}
1
+ {"version":3,"file":"tcp.js","sources":["../../../src/api/network/tcp.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// TCP 通信\nexport const createTCPSocket = /* @__PURE__ */ temporarilyNotSupport('createTCPSocket')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,eAAe,mBAAmB,qBAAqB,CAAC,iBAAiB;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // UDP 通信
4
- const createUDPSocket = temporarilyNotSupport('createUDPSocket');
4
+ const createUDPSocket = /* @__PURE__ */ temporarilyNotSupport('createUDPSocket');
5
5
 
6
6
  export { createUDPSocket };
7
7
  //# sourceMappingURL=udp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"udp.js","sources":["../../../src/api/network/udp.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// UDP 通信\nexport const createUDPSocket = temporarilyNotSupport('createUDPSocket')\n"],"names":[],"mappings":";;AAEA;MACa,eAAe,GAAG,qBAAqB,CAAC,iBAAiB;;;;"}
1
+ {"version":3,"file":"udp.js","sources":["../../../src/api/network/udp.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// UDP 通信\nexport const createUDPSocket = /* @__PURE__ */ temporarilyNotSupport('createUDPSocket')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,eAAe,mBAAmB,qBAAqB,CAAC,iBAAiB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"upload.js","sources":["../../../src/api/network/upload.ts"],"sourcesContent":["import Taro from '@tarojs/api'\r\n\r\nimport { CallbackManager } from '../../utils/handler'\r\nimport {\r\n convertObjectUrlToBlob,\r\n NETWORK_TIMEOUT,\r\n setHeader,\r\n XHR_STATS\r\n} from './utils'\r\n\r\nconst createUploadTask = ({ url, filePath, formData = {}, name, header, timeout, fileName, withCredentials = true, success, error }): Taro.UploadTask => {\r\n let timeoutInter: ReturnType<typeof setTimeout>\r\n let formKey\r\n const apiName = 'uploadFile'\r\n const xhr = new XMLHttpRequest()\r\n const form = new FormData()\r\n const callbackManager = {\r\n headersReceived: new CallbackManager(),\r\n progressUpdate: new CallbackManager()\r\n }\r\n\r\n xhr.open('POST', url)\r\n xhr.withCredentials = !!withCredentials\r\n setHeader(xhr, header)\r\n\r\n for (formKey in formData) {\r\n form.append(formKey, formData[formKey])\r\n }\r\n\r\n xhr.upload.onprogress = e => {\r\n const { loaded, total } = e\r\n callbackManager.progressUpdate.trigger({\r\n progress: Math.round(loaded / total * 100),\r\n totalBytesSent: loaded,\r\n totalBytesExpectedToSend: total\r\n })\r\n }\r\n\r\n xhr.onreadystatechange = () => {\r\n if (xhr.readyState !== XHR_STATS.HEADERS_RECEIVED) return\r\n callbackManager.headersReceived.trigger({\r\n header: xhr.getAllResponseHeaders()\r\n })\r\n }\r\n\r\n xhr.onload = () => {\r\n const status = xhr.status\r\n clearTimeout(timeoutInter)\r\n success({\r\n errMsg: `${apiName}:ok`,\r\n statusCode: status,\r\n data: xhr.responseText || xhr.response\r\n })\r\n }\r\n\r\n xhr.onabort = () => {\r\n clearTimeout(timeoutInter)\r\n error({\r\n errMsg: `${apiName}:fail abort`\r\n })\r\n }\r\n\r\n xhr.onerror = (e: ProgressEvent<EventTarget> & { message?: string }) => {\r\n clearTimeout(timeoutInter)\r\n error({\r\n errMsg: `${apiName}:fail ${e.message}`\r\n })\r\n }\r\n\r\n /**\r\n * 中断任务\r\n */\r\n const abort = () => {\r\n clearTimeout(timeoutInter)\r\n xhr.abort()\r\n }\r\n\r\n const send = () => {\r\n xhr.send(form)\r\n timeoutInter = setTimeout(() => {\r\n xhr.onabort = null\r\n xhr.onload = null\r\n xhr.upload.onprogress = null\r\n xhr.onreadystatechange = null\r\n xhr.onerror = null\r\n abort()\r\n error({\r\n errMsg: `${apiName}:fail timeout`\r\n })\r\n }, timeout || NETWORK_TIMEOUT)\r\n }\r\n\r\n convertObjectUrlToBlob(filePath)\r\n .then((fileObj: string | (Blob & { name?: string })) => {\r\n if (!fileName) {\r\n fileName = typeof fileObj !== 'string' && fileObj.name\r\n }\r\n form.append(name, fileObj, fileName || `file-${Date.now()}`)\r\n send()\r\n })\r\n .catch(e => {\r\n error({\r\n errMsg: `${apiName}:fail ${e.message}`\r\n })\r\n })\r\n\r\n /**\r\n * 监听 HTTP Response Header 事件。会比请求完成事件更早\r\n * @param {HeadersReceivedCallback} callback HTTP Response Header 事件的回调函数\r\n */\r\n const onHeadersReceived = callbackManager.headersReceived.add\r\n /**\r\n * 取消监听 HTTP Response Header 事件\r\n * @param {HeadersReceivedCallback} callback HTTP Response Header 事件的回调函数\r\n */\r\n const offHeadersReceived = callbackManager.headersReceived.remove\r\n\r\n /**\r\n * 监听进度变化事件\r\n * @param {ProgressUpdateCallback} callback HTTP Response Header 事件的回调函数\r\n */\r\n const onProgressUpdate = callbackManager.progressUpdate.add\r\n /**\r\n * 取消监听进度变化事件\r\n * @param {ProgressUpdateCallback} callback HTTP Response Header 事件的回调函数\r\n */\r\n const offProgressUpdate = callbackManager.progressUpdate.remove\r\n\r\n return {\r\n abort,\r\n onHeadersReceived,\r\n offHeadersReceived,\r\n onProgressUpdate,\r\n offProgressUpdate\r\n }\r\n}\r\n\r\n/**\r\n * 将本地资源上传到服务器。客户端发起一个 HTTPS POST 请求,其中 content-type 为 multipart/form-data。使用前请注意阅读相关说明。\r\n */\r\nexport const uploadFile: typeof Taro.uploadFile = ({ url, filePath, name, header, formData, timeout, fileName,withCredentials, success, fail, complete }) => {\r\n let task!: Taro.UploadTask\r\n const result: ReturnType<typeof Taro.uploadFile> = new Promise((resolve, reject) => {\r\n task = createUploadTask({\r\n url,\r\n header,\r\n name,\r\n filePath,\r\n formData,\r\n timeout,\r\n fileName,\r\n withCredentials,\r\n success: res => {\r\n success && success(res)\r\n complete && complete(res)\r\n resolve(res)\r\n },\r\n error: res => {\r\n fail && fail(res)\r\n complete && complete(res)\r\n reject(res)\r\n }\r\n })\r\n }) as any\r\n\r\n result.headersReceive = task.onHeadersReceived\r\n result.progress = task.onProgressUpdate\r\n\r\n return new Proxy(result, {\r\n get (target, prop) {\r\n const object = prop in task ? task : target\r\n const value = object[prop]\r\n return typeof value === 'function' ? value.bind(object) : value\r\n },\r\n })\r\n}\r\n"],"names":[],"mappings":";;;AAUA,MAAM,gBAAgB,GAAG,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAqB;AACtJ,IAAA,IAAI,YAA2C,CAAA;AAC/C,IAAA,IAAI,OAAO,CAAA;IACX,MAAM,OAAO,GAAG,YAAY,CAAA;AAC5B,IAAA,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAA;AAChC,IAAA,MAAM,IAAI,GAAG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.js","sources":["../../../src/api/network/upload.ts"],"sourcesContent":["import Taro from '@tarojs/api'\r\n\r\nimport { CallbackManager } from '../../utils/handler'\r\nimport {\r\n convertObjectUrlToBlob,\r\n NETWORK_TIMEOUT,\r\n setHeader,\r\n XHR_STATS\r\n} from './utils'\r\n\r\nconst createUploadTask = ({ url, filePath, formData = {}, name, header, timeout, fileName, withCredentials = true, success, error }): Taro.UploadTask => {\r\n let timeoutInter: ReturnType<typeof setTimeout>\r\n let formKey\r\n const apiName = 'uploadFile'\r\n const xhr = new XMLHttpRequest()\r\n const form = new FormData()\r\n const callbackManager = {\r\n headersReceived: new CallbackManager(),\r\n progressUpdate: new CallbackManager()\r\n }\r\n\r\n xhr.open('POST', url)\r\n xhr.withCredentials = !!withCredentials\r\n setHeader(xhr, header)\r\n\r\n for (formKey in formData) {\r\n form.append(formKey, formData[formKey])\r\n }\r\n\r\n xhr.upload.onprogress = e => {\r\n const { loaded, total } = e\r\n callbackManager.progressUpdate.trigger({\r\n progress: Math.round(loaded / total * 100),\r\n totalBytesSent: loaded,\r\n totalBytesExpectedToSend: total\r\n })\r\n }\r\n\r\n xhr.onreadystatechange = () => {\r\n if (xhr.readyState !== XHR_STATS.HEADERS_RECEIVED) return\r\n callbackManager.headersReceived.trigger({\r\n header: xhr.getAllResponseHeaders()\r\n })\r\n }\r\n\r\n xhr.onload = () => {\r\n const status = xhr.status\r\n clearTimeout(timeoutInter)\r\n success({\r\n errMsg: `${apiName}:ok`,\r\n statusCode: status,\r\n data: xhr.responseText || xhr.response\r\n })\r\n }\r\n\r\n xhr.onabort = () => {\r\n clearTimeout(timeoutInter)\r\n error({\r\n errMsg: `${apiName}:fail abort`\r\n })\r\n }\r\n\r\n xhr.onerror = (e: ProgressEvent<EventTarget> & { message?: string }) => {\r\n clearTimeout(timeoutInter)\r\n error({\r\n errMsg: `${apiName}:fail ${e.message}`\r\n })\r\n }\r\n\r\n /**\r\n * 中断任务\r\n */\r\n const abort = () => {\r\n clearTimeout(timeoutInter)\r\n xhr.abort()\r\n }\r\n\r\n const send = () => {\r\n xhr.send(form)\r\n timeoutInter = setTimeout(() => {\r\n xhr.onabort = null\r\n xhr.onload = null\r\n xhr.upload.onprogress = null\r\n xhr.onreadystatechange = null\r\n xhr.onerror = null\r\n abort()\r\n error({\r\n errMsg: `${apiName}:fail timeout`\r\n })\r\n }, timeout || NETWORK_TIMEOUT)\r\n }\r\n\r\n convertObjectUrlToBlob(filePath)\r\n .then((fileObj: string | (Blob & { name?: string })) => {\r\n if (!fileName) {\r\n fileName = typeof fileObj !== 'string' && fileObj.name\r\n }\r\n form.append(name, fileObj, fileName || `file-${Date.now()}`)\r\n send()\r\n })\r\n .catch(e => {\r\n error({\r\n errMsg: `${apiName}:fail ${e.message}`\r\n })\r\n })\r\n\r\n /**\r\n * 监听 HTTP Response Header 事件。会比请求完成事件更早\r\n * @param {HeadersReceivedCallback} callback HTTP Response Header 事件的回调函数\r\n */\r\n const onHeadersReceived = callbackManager.headersReceived.add\r\n /**\r\n * 取消监听 HTTP Response Header 事件\r\n * @param {HeadersReceivedCallback} callback HTTP Response Header 事件的回调函数\r\n */\r\n const offHeadersReceived = callbackManager.headersReceived.remove\r\n\r\n /**\r\n * 监听进度变化事件\r\n * @param {ProgressUpdateCallback} callback HTTP Response Header 事件的回调函数\r\n */\r\n const onProgressUpdate = callbackManager.progressUpdate.add\r\n /**\r\n * 取消监听进度变化事件\r\n * @param {ProgressUpdateCallback} callback HTTP Response Header 事件的回调函数\r\n */\r\n const offProgressUpdate = callbackManager.progressUpdate.remove\r\n\r\n return {\r\n abort,\r\n onHeadersReceived,\r\n offHeadersReceived,\r\n onProgressUpdate,\r\n offProgressUpdate\r\n }\r\n}\r\n\r\n/**\r\n * 将本地资源上传到服务器。客户端发起一个 HTTPS POST 请求,其中 content-type 为 multipart/form-data。使用前请注意阅读相关说明。\r\n */\r\nexport const uploadFile: typeof Taro.uploadFile = ({ url, filePath, name, header, formData, timeout, fileName, withCredentials, success, fail, complete }) => {\r\n let task!: Taro.UploadTask\r\n const result: ReturnType<typeof Taro.uploadFile> = new Promise((resolve, reject) => {\r\n task = createUploadTask({\r\n url,\r\n header,\r\n name,\r\n filePath,\r\n formData,\r\n timeout,\r\n fileName,\r\n withCredentials,\r\n success: res => {\r\n success && success(res)\r\n complete && complete(res)\r\n resolve(res)\r\n },\r\n error: res => {\r\n fail && fail(res)\r\n complete && complete(res)\r\n reject(res)\r\n }\r\n })\r\n }) as any\r\n\r\n result.headersReceive = task.onHeadersReceived\r\n result.progress = task.onProgressUpdate\r\n\r\n return new Proxy(result, {\r\n get (target, prop) {\r\n const object = prop in task ? task : target\r\n const value = object[prop]\r\n return typeof value === 'function' ? value.bind(object) : value\r\n },\r\n })\r\n}\r\n"],"names":[],"mappings":";;;AAUA,MAAM,gBAAgB,GAAG,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAqB;AACtJ,IAAA,IAAI,YAA2C,CAAA;AAC/C,IAAA,IAAI,OAAO,CAAA;IACX,MAAM,OAAO,GAAG,YAAY,CAAA;AAC5B,IAAA,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAA;AAChC,IAAA,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAA;AAC3B,IAAA,MAAM,eAAe,GAAG;QACtB,eAAe,EAAE,IAAI,eAAe,EAAE;QACtC,cAAc,EAAE,IAAI,eAAe,EAAE;KACtC,CAAA;AAED,IAAA,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACrB,IAAA,GAAG,CAAC,eAAe,GAAG,CAAC,CAAC,eAAe,CAAA;AACvC,IAAA,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAEtB,KAAK,OAAO,IAAI,QAAQ,EAAE;QACxB,IAAI,CA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AAA;AACvB,gBAAA,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAA;gBACzB,OAAO,CAAC,GAAG,CAAC,CAAA;aACb;YACD,KAAK,EAAE,GAAG,IAAG;AACX,gBAAA,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;AACjB,gBAAA,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAA;gBACzB,MAAM,CAAC,GAAG,CAAC,CAAA;aACZ;AACF,SAAA,CAAC,CAAA;AACJ,KAAC,CAAQ,CAAA;AAET,IAAA,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAA;AAC9C,IAAA,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAA;AAEvC,IAAA,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE;QACvB,GAAG,CAAE,MAAM,EAAE,IAAI,EAAA;AACf,YAAA,MAAM,MAAM,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;AAC3C,YAAA,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;AAC1B,YAAA,OAAO,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;SAChE;AACF,KAAA,CAAC,CAAA;AACJ;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 帐号信息
4
- const getAccountInfoSync = temporarilyNotSupport('getAccountInfoSync');
4
+ const getAccountInfoSync = /* @__PURE__ */ temporarilyNotSupport('getAccountInfoSync');
5
5
 
6
6
  export { getAccountInfoSync };
7
7
  //# sourceMappingURL=account.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","sources":["../../../src/api/open-api/account.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 帐号信息\nexport const getAccountInfoSync = temporarilyNotSupport('getAccountInfoSync')\n"],"names":[],"mappings":";;AAEA;MACa,kBAAkB,GAAG,qBAAqB,CAAC,oBAAoB;;;;"}
1
+ {"version":3,"file":"account.js","sources":["../../../src/api/open-api/account.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 帐号信息\nexport const getAccountInfoSync = /* @__PURE__ */ temporarilyNotSupport('getAccountInfoSync')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,kBAAkB,mBAAmB,qBAAqB,CAAC,oBAAoB;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 收货地址
4
- const chooseAddress = temporarilyNotSupport('chooseAddress');
4
+ const chooseAddress = /* @__PURE__ */ temporarilyNotSupport('chooseAddress');
5
5
 
6
6
  export { chooseAddress };
7
7
  //# sourceMappingURL=address.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"address.js","sources":["../../../src/api/open-api/address.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 收货地址\nexport const chooseAddress = temporarilyNotSupport('chooseAddress')\n"],"names":[],"mappings":";;AAEA;MACa,aAAa,GAAG,qBAAqB,CAAC,eAAe;;;;"}
1
+ {"version":3,"file":"address.js","sources":["../../../src/api/open-api/address.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 收货地址\nexport const chooseAddress = /* @__PURE__ */ temporarilyNotSupport('chooseAddress')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 授权
4
- const authorizeForMiniProgram = temporarilyNotSupport('authorizeForMiniProgram');
5
- const authorize = temporarilyNotSupport('authorize');
4
+ const authorizeForMiniProgram = /* @__PURE__ */ temporarilyNotSupport('authorizeForMiniProgram');
5
+ const authorize = /* @__PURE__ */ temporarilyNotSupport('authorize');
6
6
 
7
7
  export { authorize, authorizeForMiniProgram };
8
8
  //# sourceMappingURL=authorize.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"authorize.js","sources":["../../../src/api/open-api/authorize.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 授权\nexport const authorizeForMiniProgram = temporarilyNotSupport('authorizeForMiniProgram')\nexport const authorize = temporarilyNotSupport('authorize')\n"],"names":[],"mappings":";;AAEA;MACa,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;MAC1E,SAAS,GAAG,qBAAqB,CAAC,WAAW;;;;"}
1
+ {"version":3,"file":"authorize.js","sources":["../../../src/api/open-api/authorize.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 授权\nexport const authorizeForMiniProgram = /* @__PURE__ */ temporarilyNotSupport('authorizeForMiniProgram')\nexport const authorize = /* @__PURE__ */ temporarilyNotSupport('authorize')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 卡券
4
- const openCard = temporarilyNotSupport('openCard');
5
- const addCard = temporarilyNotSupport('addCard');
4
+ const openCard = /* @__PURE__ */ temporarilyNotSupport('openCard');
5
+ const addCard = /* @__PURE__ */ temporarilyNotSupport('addCard');
6
6
 
7
7
  export { addCard, openCard };
8
8
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sources":["../../../src/api/open-api/card.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 卡券\nexport const openCard = temporarilyNotSupport('openCard')\nexport const addCard = temporarilyNotSupport('addCard')\n"],"names":[],"mappings":";;AAEA;MACa,QAAQ,GAAG,qBAAqB,CAAC,UAAU,EAAC;MAC5C,OAAO,GAAG,qBAAqB,CAAC,SAAS;;;;"}
1
+ {"version":3,"file":"card.js","sources":["../../../src/api/open-api/card.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 卡券\nexport const openCard = /* @__PURE__ */ temporarilyNotSupport('openCard')\nexport const addCard = /* @__PURE__ */ temporarilyNotSupport('addCard')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,QAAQ,mBAAmB,qBAAqB,CAAC,UAAU,EAAC;AAC5D,MAAA,OAAO,mBAAmB,qBAAqB,CAAC,SAAS;;;;"}
@@ -1,7 +1,9 @@
1
1
  declare const reserveChannelsLive: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ declare const openChannelsUserProfile: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
3
  declare const openChannelsLive: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
4
  declare const openChannelsEvent: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
4
5
  declare const openChannelsActivity: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
+ declare const getChannelsShareKey: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
5
7
  declare const getChannelsLiveNoticeInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
8
  declare const getChannelsLiveInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
7
- export { reserveChannelsLive, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsLiveNoticeInfo, getChannelsLiveInfo };
9
+ export { reserveChannelsLive, openChannelsUserProfile, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsShareKey, getChannelsLiveNoticeInfo, getChannelsLiveInfo };
@@ -1,12 +1,14 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 视频号
4
- const reserveChannelsLive = temporarilyNotSupport('reserveChannelsLive');
5
- const openChannelsLive = temporarilyNotSupport('openChannelsLive');
6
- const openChannelsEvent = temporarilyNotSupport('openChannelsEvent');
7
- const openChannelsActivity = temporarilyNotSupport('openChannelsActivity');
8
- const getChannelsLiveNoticeInfo = temporarilyNotSupport('getChannelsLiveNoticeInfo');
9
- const getChannelsLiveInfo = temporarilyNotSupport('getChannelsLiveInfo');
4
+ const reserveChannelsLive = /* @__PURE__ */ temporarilyNotSupport('reserveChannelsLive');
5
+ const openChannelsUserProfile = /* @__PURE__ */ temporarilyNotSupport('openChannelsUserProfile');
6
+ const openChannelsLive = /* @__PURE__ */ temporarilyNotSupport('openChannelsLive');
7
+ const openChannelsEvent = /* @__PURE__ */ temporarilyNotSupport('openChannelsEvent');
8
+ const openChannelsActivity = /* @__PURE__ */ temporarilyNotSupport('openChannelsActivity');
9
+ const getChannelsShareKey = /* @__PURE__ */ temporarilyNotSupport('getChannelsShareKey');
10
+ const getChannelsLiveNoticeInfo = /* @__PURE__ */ temporarilyNotSupport('getChannelsLiveNoticeInfo');
11
+ const getChannelsLiveInfo = /* @__PURE__ */ temporarilyNotSupport('getChannelsLiveInfo');
10
12
 
11
- export { getChannelsLiveInfo, getChannelsLiveNoticeInfo, openChannelsActivity, openChannelsEvent, openChannelsLive, reserveChannelsLive };
13
+ export { getChannelsLiveInfo, getChannelsLiveNoticeInfo, getChannelsShareKey, openChannelsActivity, openChannelsEvent, openChannelsLive, openChannelsUserProfile, reserveChannelsLive };
12
14
  //# sourceMappingURL=channels-live.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"channels-live.js","sources":["../../../src/api/open-api/channels-live.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 视频号\nexport const reserveChannelsLive = temporarilyNotSupport('reserveChannelsLive')\nexport const openChannelsLive = temporarilyNotSupport('openChannelsLive')\nexport const openChannelsEvent = temporarilyNotSupport('openChannelsEvent')\nexport const openChannelsActivity = temporarilyNotSupport('openChannelsActivity')\nexport const getChannelsLiveNoticeInfo = temporarilyNotSupport('getChannelsLiveNoticeInfo')\nexport const getChannelsLiveInfo = temporarilyNotSupport('getChannelsLiveInfo')\n"],"names":[],"mappings":";;AAEA;MACa,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;MAClE,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB,EAAC;MAC5D,iBAAiB,GAAG,qBAAqB,CAAC,mBAAmB,EAAC;MAC9D,oBAAoB,GAAG,qBAAqB,CAAC,sBAAsB,EAAC;MACpE,yBAAyB,GAAG,qBAAqB,CAAC,2BAA2B,EAAC;MAC9E,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB;;;;"}
1
+ {"version":3,"file":"channels-live.js","sources":["../../../src/api/open-api/channels-live.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 视频号\nexport const reserveChannelsLive = /* @__PURE__ */ temporarilyNotSupport('reserveChannelsLive')\nexport const openChannelsUserProfile = /* @__PURE__ */ temporarilyNotSupport('openChannelsUserProfile')\nexport const openChannelsLive = /* @__PURE__ */ temporarilyNotSupport('openChannelsLive')\nexport const openChannelsEvent = /* @__PURE__ */ temporarilyNotSupport('openChannelsEvent')\nexport const openChannelsActivity = /* @__PURE__ */ temporarilyNotSupport('openChannelsActivity')\nexport const getChannelsShareKey = /* @__PURE__ */ temporarilyNotSupport('getChannelsShareKey')\nexport const getChannelsLiveNoticeInfo = /* @__PURE__ */ temporarilyNotSupport('getChannelsLiveNoticeInfo')\nexport const getChannelsLiveInfo = /* @__PURE__ */ temporarilyNotSupport('getChannelsLiveInfo')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB,EAAC;AAC1F,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAC5E,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB,EAAC;AAC9E,MAAA,oBAAoB,mBAAmB,qBAAqB,CAAC,sBAAsB,EAAC;AACpF,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,yBAAyB,mBAAmB,qBAAqB,CAAC,2BAA2B,EAAC;AAC9F,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 微信客服
4
- const openCustomerServiceChat = temporarilyNotSupport('openCustomerServiceChat');
4
+ const openCustomerServiceChat = /* @__PURE__ */ temporarilyNotSupport('openCustomerServiceChat');
5
5
 
6
6
  export { openCustomerServiceChat };
7
7
  //# sourceMappingURL=customer-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customer-service.js","sources":["../../../src/api/open-api/customer-service.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 微信客服\nexport const openCustomerServiceChat = temporarilyNotSupport('openCustomerServiceChat')\n"],"names":[],"mappings":";;AAEA;MACa,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB;;;;"}
1
+ {"version":3,"file":"customer-service.js","sources":["../../../src/api/open-api/customer-service.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 微信客服\nexport const openCustomerServiceChat = /* @__PURE__ */ temporarilyNotSupport('openCustomerServiceChat')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,uBAAuB,mBAAmB,qBAAqB,CAAC,yBAAyB;;;;"}
@@ -0,0 +1,3 @@
1
+ declare const requestDeviceVoIP: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ declare const getDeviceVoIPList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ export { requestDeviceVoIP, getDeviceVoIPList };
@@ -0,0 +1,8 @@
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
3
+ // 设备(组)音视频通话
4
+ const requestDeviceVoIP = /* @__PURE__ */ temporarilyNotSupport('requestDeviceVoIP');
5
+ const getDeviceVoIPList = /* @__PURE__ */ temporarilyNotSupport('getDeviceVoIPList');
6
+
7
+ export { getDeviceVoIPList, requestDeviceVoIP };
8
+ //# sourceMappingURL=device-voip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-voip.js","sources":["../../../src/api/open-api/device-voip.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 设备(组)音视频通话\nexport const requestDeviceVoIP = /* @__PURE__ */ temporarilyNotSupport('requestDeviceVoIP')\nexport const getDeviceVoIPList = /* @__PURE__ */ temporarilyNotSupport('getDeviceVoIPList')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB,EAAC;AAC9E,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 过往接口
4
- const checkIsSupportFacialRecognition = temporarilyNotSupport('checkIsSupportFacialRecognition');
5
- const startFacialRecognitionVerify = temporarilyNotSupport('startFacialRecognitionVerify');
6
- const startFacialRecognitionVerifyAndUploadVideo = temporarilyNotSupport('startFacialRecognitionVerifyAndUploadVideo');
7
- const faceVerifyForPay = temporarilyNotSupport('faceVerifyForPay');
4
+ const checkIsSupportFacialRecognition = /* @__PURE__ */ temporarilyNotSupport('checkIsSupportFacialRecognition');
5
+ const startFacialRecognitionVerify = /* @__PURE__ */ temporarilyNotSupport('startFacialRecognitionVerify');
6
+ const startFacialRecognitionVerifyAndUploadVideo = /* @__PURE__ */ temporarilyNotSupport('startFacialRecognitionVerifyAndUploadVideo');
7
+ const faceVerifyForPay = /* @__PURE__ */ temporarilyNotSupport('faceVerifyForPay');
8
8
 
9
9
  export { checkIsSupportFacialRecognition, faceVerifyForPay, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo };
10
10
  //# sourceMappingURL=facial.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"facial.js","sources":["../../../src/api/open-api/facial.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 过往接口\nexport const checkIsSupportFacialRecognition = temporarilyNotSupport('checkIsSupportFacialRecognition')\nexport const startFacialRecognitionVerify = temporarilyNotSupport('startFacialRecognitionVerify')\nexport const startFacialRecognitionVerifyAndUploadVideo = temporarilyNotSupport('startFacialRecognitionVerifyAndUploadVideo')\nexport const faceVerifyForPay = temporarilyNotSupport('faceVerifyForPay')\n"],"names":[],"mappings":";;AAEA;MACa,+BAA+B,GAAG,qBAAqB,CAAC,iCAAiC,EAAC;MAC1F,4BAA4B,GAAG,qBAAqB,CAAC,8BAA8B,EAAC;MACpF,0CAA0C,GAAG,qBAAqB,CAAC,4CAA4C,EAAC;MAChH,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB;;;;"}
1
+ {"version":3,"file":"facial.js","sources":["../../../src/api/open-api/facial.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 过往接口\nexport const checkIsSupportFacialRecognition = /* @__PURE__ */ temporarilyNotSupport('checkIsSupportFacialRecognition')\nexport const startFacialRecognitionVerify = /* @__PURE__ */ temporarilyNotSupport('startFacialRecognitionVerify')\nexport const startFacialRecognitionVerifyAndUploadVideo = /* @__PURE__ */ temporarilyNotSupport('startFacialRecognitionVerifyAndUploadVideo')\nexport const faceVerifyForPay = /* @__PURE__ */ temporarilyNotSupport('faceVerifyForPay')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,+BAA+B,mBAAmB,qBAAqB,CAAC,iCAAiC,EAAC;AAC1G,MAAA,4BAA4B,mBAAmB,qBAAqB,CAAC,8BAA8B,EAAC;AACpG,MAAA,0CAA0C,mBAAmB,qBAAqB,CAAC,4CAA4C,EAAC;AAChI,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 收藏
4
- const addVideoToFavorites = temporarilyNotSupport('addVideoToFavorites');
5
- const addFileToFavorites = temporarilyNotSupport('addFileToFavorites');
6
- const checkIsAddedToMyMiniProgram = temporarilyNotSupport('checkIsAddedToMyMiniProgram');
4
+ const addVideoToFavorites = /* @__PURE__ */ temporarilyNotSupport('addVideoToFavorites');
5
+ const addFileToFavorites = /* @__PURE__ */ temporarilyNotSupport('addFileToFavorites');
6
+ const checkIsAddedToMyMiniProgram = /* @__PURE__ */ temporarilyNotSupport('checkIsAddedToMyMiniProgram');
7
7
 
8
8
  export { addFileToFavorites, addVideoToFavorites, checkIsAddedToMyMiniProgram };
9
9
  //# sourceMappingURL=favorites.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"favorites.js","sources":["../../../src/api/open-api/favorites.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 收藏\nexport const addVideoToFavorites = temporarilyNotSupport('addVideoToFavorites')\nexport const addFileToFavorites = temporarilyNotSupport('addFileToFavorites')\nexport const checkIsAddedToMyMiniProgram = temporarilyNotSupport('checkIsAddedToMyMiniProgram')\n"],"names":[],"mappings":";;AAEA;MACa,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;MAClE,kBAAkB,GAAG,qBAAqB,CAAC,oBAAoB,EAAC;MAChE,2BAA2B,GAAG,qBAAqB,CAAC,6BAA6B;;;;"}
1
+ {"version":3,"file":"favorites.js","sources":["../../../src/api/open-api/favorites.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 收藏\nexport const addVideoToFavorites = /* @__PURE__ */ temporarilyNotSupport('addVideoToFavorites')\nexport const addFileToFavorites = /* @__PURE__ */ temporarilyNotSupport('addFileToFavorites')\nexport const checkIsAddedToMyMiniProgram = /* @__PURE__ */ temporarilyNotSupport('checkIsAddedToMyMiniProgram')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,kBAAkB,mBAAmB,qBAAqB,CAAC,oBAAoB,EAAC;AAChF,MAAA,2BAA2B,mBAAmB,qBAAqB,CAAC,6BAA6B;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 微信群
4
- const getGroupEnterInfo = temporarilyNotSupport('getGroupEnterInfo');
4
+ const getGroupEnterInfo = /* @__PURE__ */ temporarilyNotSupport('getGroupEnterInfo');
5
5
 
6
6
  export { getGroupEnterInfo };
7
7
  //# sourceMappingURL=group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","sources":["../../../src/api/open-api/group.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 微信群\nexport const getGroupEnterInfo = temporarilyNotSupport('getGroupEnterInfo')\n"],"names":[],"mappings":";;AAEA;MACa,iBAAiB,GAAG,qBAAqB,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"group.js","sources":["../../../src/api/open-api/group.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 微信群\nexport const getGroupEnterInfo = /* @__PURE__ */ temporarilyNotSupport('getGroupEnterInfo')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB;;;;"}