@dcloudio/uni-app-x 0.7.19 → 0.7.21

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 (335) hide show
  1. package/.prettierrc +5 -5
  2. package/README.md +1 -1
  3. package/index.d.ts +1 -1
  4. package/options.d.ts +9 -9
  5. package/package.json +27 -27
  6. package/types/app.d.ts +1002 -842
  7. package/types/index.d.ts +7 -7
  8. package/types/native/AsyncApiResult.d.ts +7 -7
  9. package/types/native/CSSStyleDeclaration.d.ts +25 -25
  10. package/types/native/CanvasRenderingContext2D.d.ts +2048 -2047
  11. package/types/native/DOMRect.d.ts +56 -56
  12. package/types/native/DrawableContext.d.ts +162 -162
  13. package/types/native/INavigationBar.d.ts +22 -22
  14. package/types/native/IUniElement.d.ts +2859 -2859
  15. package/types/native/IUniError.d.ts +20 -20
  16. package/types/native/IUniForm.d.ts +9 -9
  17. package/types/native/IUniObjectElement.d.ts +124 -124
  18. package/types/native/NativeLoadFontFaceOptions.d.ts +11 -11
  19. package/types/native/NodeData.d.ts +22 -22
  20. package/types/native/PageNode.d.ts +6 -6
  21. package/types/native/Path2D.d.ts +240 -240
  22. package/types/native/SnapshotOptions.d.ts +63 -63
  23. package/types/native/SourceError.d.ts +46 -46
  24. package/types/native/UTSAndroidHookProxy.d.ts +14 -14
  25. package/types/native/UniAggregateError.d.ts +19 -19
  26. package/types/native/UniApp.d.ts +205 -205
  27. package/types/native/UniCallbackWrapper.d.ts +7 -7
  28. package/types/native/UniCanvasElement.d.ts +9 -9
  29. package/types/native/UniCustomEvent.d.ts +24 -24
  30. package/types/native/UniDocument.d.ts +83 -83
  31. package/types/native/UniElement.d.ts +79 -79
  32. package/types/native/UniError.d.ts +70 -70
  33. package/types/native/UniEvent.d.ts +92 -92
  34. package/types/native/UniFormControl.d.ts +8 -8
  35. package/types/native/UniFormControlElement.d.ts +14 -14
  36. package/types/native/UniImageErrorEvent.d.ts +33 -33
  37. package/types/native/UniImageLoadEvent.d.ts +37 -37
  38. package/types/native/UniInputBlurEvent.d.ts +36 -36
  39. package/types/native/UniInputConfirmEvent.d.ts +30 -30
  40. package/types/native/UniInputEvent.d.ts +38 -38
  41. package/types/native/UniInputFocusEvent.d.ts +53 -53
  42. package/types/native/UniNativePage.d.ts +270 -270
  43. package/types/native/UniNestedPreScrollEvent.d.ts +45 -45
  44. package/types/native/UniPageEvent.d.ts +10 -10
  45. package/types/native/UniPageManager.d.ts +27 -20
  46. package/types/native/UniPageScrollEvent.d.ts +13 -13
  47. package/types/native/UniPointerEvent.d.ts +74 -74
  48. package/types/native/UniProvider.d.ts +15 -15
  49. package/types/native/UniRefresherEvent.d.ts +18 -18
  50. package/types/native/UniResizeEvent.d.ts +34 -34
  51. package/types/native/UniResizeObserver.d.ts +184 -184
  52. package/types/native/UniRichTextItemClickEvent.d.ts +41 -41
  53. package/types/native/UniScrollEvent.d.ts +42 -42
  54. package/types/native/UniScrollToLowerEvent.d.ts +23 -23
  55. package/types/native/UniScrollToUpperEvent.d.ts +23 -23
  56. package/types/native/UniStartNestedScrollEvent.d.ts +33 -33
  57. package/types/native/UniStopNestedScrollEvent.d.ts +28 -28
  58. package/types/native/UniSwiperAnimationFinishEvent.d.ts +44 -44
  59. package/types/native/UniSwiperChangeEvent.d.ts +44 -44
  60. package/types/native/UniSwiperTransitionEvent.d.ts +24 -24
  61. package/types/native/UniTabTapEvent.d.ts +18 -18
  62. package/types/native/UniTabsElement.d.ts +59 -59
  63. package/types/native/UniTextElement.d.ts +34 -34
  64. package/types/native/UniTextareaFocusEvent.d.ts +54 -54
  65. package/types/native/UniTouchEvent.d.ts +64 -64
  66. package/types/native/UniVideoElement.d.ts +75 -75
  67. package/types/native/UniWebViewDownloadEvent.d.ts +52 -52
  68. package/types/native/UniWebViewElement.d.ts +10 -10
  69. package/types/native/UniWebViewErrorEvent.d.ts +59 -59
  70. package/types/native/UniWebViewLoadEvent.d.ts +41 -41
  71. package/types/native/UniWebViewLoadingEvent.d.ts +41 -41
  72. package/types/native/UniWebViewMessageEvent.d.ts +36 -36
  73. package/types/native/UniWebViewServiceMessageEvent.d.ts +8 -8
  74. package/types/native/ViewToTempFilePathOptions.d.ts +47 -47
  75. package/types/native/WebViewStyles.d.ts +20 -20
  76. package/types/native/global.d.ts +598 -598
  77. package/types/native/index.d.ts +71 -71
  78. package/types/native-global/index.d.ts +1 -1
  79. package/types/page.d.ts +1682 -1682
  80. package/types/process.d.ts +5 -5
  81. package/types/uni/base/index.d.ts +3 -3
  82. package/types/uni/env/index.d.ts +103 -103
  83. package/types/uni/global.d.ts +6 -6
  84. package/types/uni/index.d.ts +4 -4
  85. package/types/uni/uts-plugin-api/global.d.ts +58 -57
  86. package/types/uni/uts-plugin-api/index.d.ts +58 -57
  87. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/global.d.ts +26 -26
  88. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/index.d.ts +12 -12
  89. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +231 -231
  90. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/global.d.ts +12 -12
  91. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/index.d.ts +5 -5
  92. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/interface.d.ts +50 -50
  93. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/global.d.ts +10 -10
  94. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/index.d.ts +4 -4
  95. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +77 -77
  96. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/global.d.ts +60 -0
  97. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/index.d.ts +29 -0
  98. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +161 -0
  99. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/global.d.ts +10 -10
  100. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/index.d.ts +4 -4
  101. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +77 -77
  102. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/global.d.ts +20 -20
  103. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/index.d.ts +9 -9
  104. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +264 -242
  105. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +40 -40
  106. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +19 -19
  107. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +203 -203
  108. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/global.d.ts +12 -12
  109. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/index.d.ts +5 -5
  110. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +1733 -1733
  111. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/global.d.ts +20 -20
  112. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/index.d.ts +9 -9
  113. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +152 -152
  114. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -18
  115. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -8
  116. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +61 -61
  117. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/global.d.ts +20 -20
  118. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/index.d.ts +9 -9
  119. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +464 -427
  120. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +12 -12
  121. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +5 -5
  122. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +137 -137
  123. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/global.d.ts +28 -28
  124. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/index.d.ts +13 -13
  125. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +1336 -1336
  126. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/global.d.ts +16 -16
  127. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/index.d.ts +7 -7
  128. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +305 -305
  129. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +26 -26
  130. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +12 -12
  131. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +91 -91
  132. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/global.d.ts +80 -80
  133. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/index.d.ts +39 -39
  134. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +174 -174
  135. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +142 -142
  136. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +70 -70
  137. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +1840 -1840
  138. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +10 -10
  139. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +4 -4
  140. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +12 -12
  141. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +5 -5
  142. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +329 -329
  143. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/global.d.ts +14 -14
  144. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +6 -6
  145. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +818 -818
  146. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +12 -12
  147. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +5 -5
  148. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +297 -297
  149. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/global.d.ts +14 -14
  150. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +6 -6
  151. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +657 -657
  152. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/global.d.ts +10 -10
  153. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/index.d.ts +4 -4
  154. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +81 -81
  155. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/global.d.ts +12 -12
  156. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/index.d.ts +5 -5
  157. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +155 -155
  158. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/global.d.ts +12 -12
  159. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/index.d.ts +5 -5
  160. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +159 -159
  161. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/global.d.ts +24 -24
  162. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/index.d.ts +11 -11
  163. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +563 -564
  164. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +8 -8
  165. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +4 -4
  166. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -1
  167. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/global.d.ts +8 -8
  168. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/index.d.ts +4 -4
  169. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +32 -32
  170. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +15 -15
  171. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/global.d.ts +22 -22
  172. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/index.d.ts +10 -10
  173. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +163 -163
  174. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +30 -32
  175. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +14 -15
  176. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +375 -375
  177. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/global.d.ts +16 -16
  178. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/index.d.ts +7 -7
  179. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +980 -980
  180. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +30 -30
  181. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +14 -14
  182. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +2131 -2131
  183. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/global.d.ts +12 -12
  184. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +5 -5
  185. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +169 -169
  186. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/global.d.ts +24 -24
  187. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +11 -11
  188. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/global.d.ts +16 -16
  189. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/index.d.ts +7 -7
  190. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +169 -169
  191. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/global.d.ts +22 -22
  192. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/index.d.ts +10 -10
  193. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +60 -60
  194. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/global.d.ts +26 -26
  195. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/index.d.ts +12 -12
  196. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +564 -564
  197. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/global.d.ts +24 -24
  198. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/index.d.ts +11 -11
  199. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +100 -100
  200. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +160 -160
  201. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +79 -79
  202. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +1339 -1339
  203. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/global.d.ts +68 -68
  204. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/index.d.ts +33 -33
  205. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +1002 -1002
  206. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +72 -72
  207. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +35 -35
  208. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +1493 -1493
  209. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +24 -24
  210. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +11 -11
  211. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +24 -24
  212. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +11 -11
  213. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +70 -70
  214. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/global.d.ts +26 -26
  215. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/index.d.ts +12 -12
  216. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +153 -153
  217. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/global.d.ts +32 -32
  218. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/index.d.ts +15 -15
  219. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +240 -240
  220. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/global.d.ts +8 -8
  221. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/index.d.ts +4 -4
  222. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/global.d.ts +8 -8
  223. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/index.d.ts +4 -4
  224. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +78 -74
  225. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +38 -36
  226. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +193 -8
  227. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/global.d.ts +28 -28
  228. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/index.d.ts +13 -13
  229. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +189 -189
  230. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/global.d.ts +58 -58
  231. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/index.d.ts +28 -28
  232. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +2165 -2165
  233. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/global.d.ts +10 -10
  234. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/index.d.ts +4 -4
  235. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +38 -38
  236. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/global.d.ts +24 -24
  237. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/index.d.ts +11 -11
  238. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +73 -73
  239. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts +78 -78
  240. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +38 -38
  241. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +600 -600
  242. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/global.d.ts +148 -148
  243. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/index.d.ts +73 -73
  244. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +1086 -1086
  245. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +42 -42
  246. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +20 -20
  247. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/global.d.ts +112 -112
  248. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/index.d.ts +55 -55
  249. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/global.d.ts +58 -58
  250. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +28 -28
  251. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +844 -844
  252. package/types/uni/uts-plugin-biz/global.d.ts +4 -4
  253. package/types/uni/uts-plugin-biz/index.d.ts +4 -4
  254. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +36 -36
  255. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +17 -17
  256. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +141 -141
  257. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/global.d.ts +28 -28
  258. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -13
  259. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +160 -160
  260. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +60 -60
  261. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +29 -29
  262. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +808 -778
  263. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +46 -46
  264. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +22 -22
  265. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +207 -207
  266. package/types/uni/uts-plugin-component/global.d.ts +1 -1
  267. package/types/uni/uts-plugin-component/index.d.ts +1 -1
  268. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +64 -64
  269. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +31 -31
  270. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +522 -522
  271. package/types/uni/uts-plugin-extend/README.md +3 -3
  272. package/types/uni/uts-plugin-extend/global.d.ts +14 -14
  273. package/types/uni/uts-plugin-extend/index.d.ts +14 -14
  274. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/global.d.ts +12 -12
  275. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/index.d.ts +1 -1
  276. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +365 -365
  277. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/global.d.ts +23 -23
  278. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/index.d.ts +10 -10
  279. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +710 -710
  280. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/global.d.ts +21 -21
  281. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/index.d.ts +9 -9
  282. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/interface.d.ts +151 -151
  283. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/global.d.ts +25 -25
  284. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/index.d.ts +11 -11
  285. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +363 -363
  286. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/global.d.ts +11 -11
  287. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/index.d.ts +4 -4
  288. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +224 -224
  289. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/global.d.ts +53 -53
  290. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/index.d.ts +25 -25
  291. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +487 -487
  292. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/global.d.ts +13 -13
  293. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/index.d.ts +5 -5
  294. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +126 -126
  295. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +7 -7
  296. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +1 -1
  297. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +296 -296
  298. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/global.d.ts +15 -15
  299. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/index.d.ts +1 -1
  300. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +229 -229
  301. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/global.d.ts +14 -14
  302. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/index.d.ts +1 -1
  303. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +559 -559
  304. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/global.d.ts +9 -9
  305. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/index.d.ts +1 -1
  306. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +163 -163
  307. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/global.d.ts +21 -21
  308. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/index.d.ts +9 -9
  309. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +143 -143
  310. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/global.d.ts +7 -7
  311. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/index.d.ts +1 -1
  312. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/interface.d.ts +106 -106
  313. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/global.d.ts +9 -9
  314. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/index.d.ts +1 -1
  315. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/interface.d.ts +165 -165
  316. package/types/uni-cloud/index.d.ts +67 -63
  317. package/types/uni-cloud/interface.d.ts +987 -991
  318. package/types/uni-cloud/unicloud-db/index.ts +314 -314
  319. package/types/uni-global/index.d.ts +1 -1
  320. package/types/vue/CheckboxGroupChangeEvent.d.ts +41 -41
  321. package/types/vue/LifeCycle.d.ts +55 -55
  322. package/types/vue/PickerViewChangeEvent.d.ts +41 -41
  323. package/types/vue/ProgressActiveendEvent.d.ts +32 -32
  324. package/types/vue/RadioGroupChangeEvent.d.ts +41 -41
  325. package/types/vue/SliderChangeEvent.d.ts +35 -35
  326. package/types/vue/SwitchChangeEvent.d.ts +32 -32
  327. package/types/vue/UniCanvasElement.d.ts +275 -275
  328. package/types/vue/UniCloudDBElement.d.ts +217 -217
  329. package/types/vue/UniFormElement.d.ts +54 -54
  330. package/types/vue/UniNavigatorElement.d.ts +11 -11
  331. package/types/vue/global.d.ts +191 -191
  332. package/types/vue/index.d.ts +10 -10
  333. package/types/vue-global/index.d.ts +1 -1
  334. package/uts-plugin.d.ts +27 -27
  335. package/types/shim-uts-basic.d.ts +0 -4495
@@ -1,779 +1,809 @@
1
- export interface Uni {
2
- /**
3
- * getPushClientId()
4
- * @description
5
- * 获取客户端唯一的推送标识
6
- * @param {GetPushClientIdOptions}
7
- * @return {void}
8
- * @tutorial http://uniapp.dcloud.io/api/plugins/push.html#getpushclientid
9
- * @uniPlatform {
10
- * "app": {
11
- * "android": {
12
- * "osVer": "4.4",
13
- * "uniVer": "√",
14
- * "unixVer": "3.98"
15
- * },
16
- * "ios": {
17
- * "osVer": "12.0",
18
- * "uniVer": "√",
19
- * "unixVer": "4.18"
20
- * }
21
- * },
22
- * "web": {
23
- * "uniVer": "x",
24
- * "unixVer": "x"
25
- * }
26
- * }
27
- * @example
28
- ```typescript
29
- uni.getPushClientId({
30
- complete: (res: any) => {
31
- console.log("getPushClientId complete => " + JSON.stringify(res));
32
- }
33
- });
34
- ```
35
- */
36
- getPushClientId(options : GetPushClientIdOptions) : void;
37
- /**
38
- * onPushMessage()
39
- * @description
40
- * 启动监听推送消息事件
41
- * @param {OnPushMessageCallback}
42
- * @return {void}
43
- * @tutorial http://uniapp.dcloud.io/api/plugins/push.html#onpushmessage
44
- * @uniPlatform {
45
- * "app": {
46
- * "android": {
47
- * "osVer": "4.4",
48
- * "uniVer": "√",
49
- * "unixVer": "3.98"
50
- * },
51
- * "ios": {
52
- * "osVer": "12.0",
53
- * "uniVer": "√",
54
- * "unixVer": "4.18"
55
- * }
56
- * },
57
- * "web": {
58
- * "uniVer": "x",
59
- * "unixVer": "x"
60
- * }
61
- * }
62
- * @example
63
- ```typescript
64
- uni.onPushMessage((res : OnPushMessageCallbackResult) => {
65
- console.log("onPushMessage => " + JSON.stringify(res))
66
- });
67
- ```
68
- */
69
- onPushMessage(callback : OnPushMessageCallback) : void;
70
- /**
71
- * offPushMessage()
72
- * @description
73
- * 关闭推送消息监听事件,iOS端调用会关闭所有监听。
74
- * @param {OnPushMessageCallback}
75
- * @return {void}
76
- * @tutorial http://uniapp.dcloud.io/api/plugins/push.html#offpushmessage
77
- * @uniPlatform {
78
- * "app": {
79
- * "android": {
80
- * "osVer": "4.4",
81
- * "uniVer": "√",
82
- * "unixVer": "3.98"
83
- * },
84
- * "ios": {
85
- * "osVer": "12.0",
86
- * "uniVer": "√",
87
- * "unixVer": "4.18"
88
- * }
89
- * },
90
- * "web": {
91
- * "uniVer": "x",
92
- * "unixVer": "x"
93
- * }
94
- * }
95
- * @example
96
- ```typescript
97
- const cb = (res : OnPushMessageCallbackResult) => {
98
- console.log("onPushMessage => " + JSON.stringify(res))
99
- }
100
- uni.offPushMessage(cb);
101
- ```
102
- */
103
- offPushMessage(callback : OnPushMessageCallback) : void;
104
- /**
105
- * getChannelManager()
106
- * @description
107
- * 获取通知渠道管理器,Android 8系统以上才可以设置通知渠道,Android 8系统以下返回null
108
- * @deprecated 已废弃,仅为了向下兼容保留,建议使用`getPushChannelManager`。
109
- * @param {void}
110
- * @return {ChannelManager}
111
- * @uniPlatform {
112
- * "app": {
113
- * "android": {
114
- * "osVer": "4.4",
115
- * "uniVer": "3.98",
116
- * "unixVer": "3.98"
117
- * },
118
- * "ios": {
119
- * "osVer": "12.0",
120
- * "uniVer": "x",
121
- * "unixVer": "x"
122
- * }
123
- * },
124
- * "web": {
125
- * "uniVer": "x",
126
- * "unixVer": "x"
127
- * }
128
- * }
129
- * @example
130
- ```typescript
131
- const channelManager = uni.getChannelManager();
132
- channelManager.setPushChannel({
133
- channelId: "test1",
134
- channelDesc: "test1 desc",
135
- soundName: "pushsound"
136
- })
137
- const channels = channelManager.getAllChannels() as string[]
138
- console.log("channels : " + channels);
139
- ```
140
- */
141
- getChannelManager() : ChannelManager;
142
-
143
- /**
144
- * getPushChannelManager()
145
- * @description
146
- * 获取通知渠道管理器,Android 8系统以上才可以设置通知渠道,Android 8系统以下返回null。
147
- * @param {void}
148
- * @return {PushChannelManager}
149
- * @uniPlatform {
150
- * "app": {
151
- * "android": {
152
- * "osVer": "4.4",
153
- * "uniVer": "4.25",
154
- * "unixVer": "4.25"
155
- * },
156
- * "ios": {
157
- * "osVer": "12.0",
158
- * "uniVer": "x",
159
- * "unixVer": "x"
160
- * }
161
- * },
162
- * "web": {
163
- * "uniVer": "x",
164
- * "unixVer": "x"
165
- * }
166
- * }
167
- * @example
168
- ```typescript
169
- const channelManager = uni.getPushChannelManager();
170
- channelManager.setPushChannel({
171
- channelId: "test1",
172
- channelDesc: "test1 desc",
173
- soundName: "pushsound"
174
- })
175
- const channels = channelManager.getAllChannels() as string[]
176
- console.log("channels : " + channels);
177
- ```
178
- */
179
- getPushChannelManager() : PushChannelManager;
180
-
181
- /**
182
- * createPushMessage()
183
- * @description
184
- * 创建本地通知栏消息
185
- * @param {CreatePushMessageOptions}
186
- * @return {void}
187
- * @tutorial http://uniapp.dcloud.io/api/plugins/push.html#createpushmessage
188
- * @uniPlatform {
189
- * "app": {
190
- * "android": {
191
- * "osVer": "4.4",
192
- * "uniVer": "√",
193
- * "unixVer": "3.98"
194
- * },
195
- * "ios": {
196
- * "osVer": "12.0",
197
- * "uniVer": "√",
198
- * "unixVer": "4.18"
199
- * }
200
- * },
201
- * "web": {
202
- * "uniVer": "x",
203
- * "unixVer": "x"
204
- * }
205
- * }
206
- * @example
207
- ```typescript
208
- uni.createPushMessage({
209
- title:"hello",
210
- content: "content"
211
- });
212
- ```
213
- */
214
- createPushMessage(options : CreatePushMessageOptions) : void;
215
-
216
- /**
217
- * setAppBadgeNumber()
218
- * @description 设置应用图标上显示的角标数字
219
- * @param num - 要显示的角标数字值,参数为0则表示清除角标数字。
220
- * @param options - 小米手机显示角标需要在系统消息中心显示一条通知,此参数用于设置通知的标题(title)和内容(content)。
221
- * @return {void}
222
- * @uniPlatform {
223
- * "app": {
224
- * "android": {
225
- * "osVer": "5.0",
226
- * "uniVer": "x",
227
- * "unixVer": "4.25"
228
- * },
229
- * "ios": {
230
- * "osVer": "12.0",
231
- * "uniVer": "x",
232
- * "unixVer": "4.25"
233
- * }
234
- * },
235
- * "web": {
236
- * "uniVer": "x",
237
- * "unixVer": "x"
238
- * }
239
- * }
240
- *
241
- * @example
242
- ```typescript
243
- uni.setAppBadgeNumber(1);
244
- ```
245
- */
246
- setAppBadgeNumber(num : number, options ?: BadgeOptions | null) : void;
247
- }
248
-
249
- export type GetPushClientId = (options : GetPushClientIdOptions) => void;
250
- export type GetPushClientIdSuccess = {
251
- /**
252
- * 个推客户端推送id,对应uni-id-device表的push_clientid
253
- *
254
- * @uniPlatform {
255
- * "app": {
256
- * "android": {
257
- * "osVer": "4.4",
258
- * "uniVer": "",
259
- * "unixVer": "3.98"
260
- * },
261
- * "ios": {
262
- * "osVer": "12.0",
263
- * "uniVer": "√",
264
- * "unixVer": "4.18"
265
- * }
266
- * },
267
- * "web": {
268
- * "uniVer": "x",
269
- * "unixVer": "x"
270
- * }
271
- * }
272
- */
273
- cid : string,
274
- /**
275
- * 错误描述
276
- *
277
- * @uniPlatform {
278
- * "app": {
279
- * "android": {
280
- * "osVer": "4.4",
281
- * "uniVer": "√",
282
- * "unixVer": "3.98"
283
- * },
284
- * "ios": {
285
- * "osVer": "12.0",
286
- * "uniVer": "√",
287
- * "unixVer": "4.18"
288
- * }
289
- * },
290
- * "web": {
291
- * "uniVer": "x",
292
- * "unixVer": "x"
293
- * }
294
- * }
295
- */
296
- errMsg : string
297
- };
298
- export type GetPushClientIdSuccessCallback = (result : GetPushClientIdSuccess) => void;
299
- export type GetPushClientIdFail = UniError;
300
- export type GetPushClientIdFailCallback = (result : GetPushClientIdFail) => void;
301
- export type GetPushClientIdComplete = any;
302
- export type GetPushClientIdCompleteCallback = (result : GetPushClientIdComplete) => void;
303
- export type GetPushClientIdOptions = {
304
- /**
305
- * 接口调用成功的回调函数
306
- * @defaultValue null
307
- */
308
- success ?: GetPushClientIdSuccessCallback | null,
309
- /**
310
- * 接口调用失败的回调函数
311
- * @defaultValue null
312
- */
313
- fail ?: GetPushClientIdFailCallback | null,
314
- /**
315
- * 接口调用结束的回调函数(调用成功、失败都会执行)
316
- * @defaultValue null
317
- */
318
- complete ?: GetPushClientIdCompleteCallback | null
319
- };
320
- /**
321
- * 事件类型
322
- * - click 从系统推送服务点击消息启动应用事件
323
- * - receive 应用从推送服务器接收到推送消息事件
324
- */
325
- export type OnPushMessageType = "click" | "receive";
326
-
327
- export type OnPushMessageCallbackResult= {
328
- /**
329
- * 事件类型
330
- * @type{OnPushMessageType}
331
- *
332
- * @uniPlatform {
333
- * "app": {
334
- * "android": {
335
- * "osVer": "4.4",
336
- * "uniVer": "√",
337
- * "unixVer": "3.98"
338
- * },
339
- * "ios": {
340
- * "osVer": "12.0",
341
- * "uniVer": "√",
342
- * "unixVer": "4.18"
343
- * }
344
- * },
345
- * "web": {
346
- * "uniVer": "x",
347
- * "unixVer": "x"
348
- * }
349
- * }
350
- */
351
- type : OnPushMessageType,
352
- /**
353
- * 消息内容
354
- *
355
- * @uniPlatform {
356
- * "app": {
357
- * "android": {
358
- * "osVer": "4.4",
359
- * "uniVer": "√",
360
- * "unixVer": "3.98"
361
- * },
362
- * "ios": {
363
- * "osVer": "12.0",
364
- * "uniVer": "√",
365
- * "unixVer": "4.18"
366
- * }
367
- * },
368
- * "web": {
369
- * "uniVer": "x",
370
- * "unixVer": "x"
371
- * }
372
- * }
373
- */
374
- data : UTSJSONObject
375
- };
376
-
377
- export type OnPushMessageCallback = (result : OnPushMessageCallbackResult) => void;
378
- export type OnPushMessage = (callback : OnPushMessageCallback) => void;
379
- export type OffPushMessage = (callback : OnPushMessageCallback) => void;
380
-
381
-
382
- export type GetChannelManager = () => ChannelManager;
383
- export type SetPushChannelOptions = {
384
- /**
385
- * 添加的声音文件,注意raw目录下必须要有 ,不传此字段将使用默认铃音。
386
- * @defaultValue null
387
- */
388
- soundName? : string | null,
389
- /**
390
- * 通知渠道id
391
- */
392
- channelId : string,
393
- /**
394
- * 通知渠道描述
395
- */
396
- channelDesc : string,
397
- /**
398
- * 呼吸灯闪烁
399
- * @defaultValue false
400
- */
401
- enableLights? : boolean | null,
402
- /**
403
- * 震动
404
- * @defaultValue false
405
- */
406
- enableVibration? : boolean | null,
407
- /**
408
- * 通知的重要性级别,可选范围IMPORTANCE_LOW:2、IMPORTANCE_DEFAULT:3、IMPORTANCE_HIGH:4 。
409
- * @defaultValue 3
410
- */
411
- importance? : number | null,
412
- /**
413
- * 锁屏可见性,可选范围VISIBILITY_PRIVATE:0、VISIBILITY_PUBLIC:1、VISIBILITY_SECRET:-1、VISIBILITY_NO_OVERRIDE:-1000。
414
- * @defaultValue -1000
415
- */
416
- lockscreenVisibility? : number | null
417
- }
418
-
419
- export interface ChannelManager {
420
- /**
421
- * 设置推送渠道
422
- *
423
- * @uniPlatform {
424
- * "app": {
425
- * "android": {
426
- * "osVer": "4.4",
427
- * "uniVer": "√",
428
- * "unixVer": "3.98"
429
- * },
430
- * "ios": {
431
- * "osVer": "12.0",
432
- * "uniVer": "x",
433
- * "unixVer": "x"
434
- * }
435
- * },
436
- * "web": {
437
- * "uniVer": "x",
438
- * "unixVer": "x"
439
- * }
440
- * }
441
- */
442
- setPushChannel(options : SetPushChannelOptions) : void;
443
- /**
444
- * 获取当前应用注册的所有的通知渠道。
445
- *
446
- * @uniPlatform {
447
- * "app": {
448
- * "android": {
449
- * "osVer": "4.4",
450
- * "uniVer": "√",
451
- * "unixVer": "3.98"
452
- * },
453
- * "ios": {
454
- * "osVer": "12.0",
455
- * "uniVer": "x",
456
- * "unixVer": "x"
457
- * }
458
- * },
459
- * "web": {
460
- * "uniVer": "x",
461
- * "unixVer": "x"
462
- * }
463
- * }
464
- */
465
- getAllChannels() : Array<string>;
466
- }
467
-
468
- export type PushChannelManager = ChannelManager
469
-
470
-
471
- export type CreatePushMessage = (options : CreatePushMessageOptions) => void;
472
- export type CreatePushMessageSuccess = {};
473
- export type CreatePushMessageSuccessCallback = (result : CreatePushMessageSuccess) => void;
474
- export type CreatePushMessageFail = UniError;
475
- export type CreatePushMessageFailCallback = (result : CreatePushMessageFail) => void;
476
- export type CreatePushMessageComplete = any;
477
- export type CreatePushMessageCompleteCallback = (result : CreatePushMessageComplete) => void;
478
- export type CreatePushMessageOptions = {
479
- /**
480
- * 是否覆盖上一次提示的消息
481
- * @type boolean
482
- * @defaultValue false
483
- * @uniPlatform {
484
- * "app": {
485
- * "android": {
486
- * "osVer": "4.4",
487
- * "uniVer": "√",
488
- * "unixVer": "3.98"
489
- * },
490
- * "ios": {
491
- * "osVer": "12.0",
492
- * "uniVer": "√",
493
- * "unixVer": "4.18"
494
- * }
495
- * },
496
- * "web": {
497
- * "uniVer": "x",
498
- * "unixVer": "x"
499
- * }
500
- * }
501
- */
502
- cover? : boolean | null,
503
- /**
504
- * 提示消息延迟显示的时间,单位为s
505
- * @defaultValue 0
506
- * @uniPlatform {
507
- * "app": {
508
- * "android": {
509
- * "osVer": "4.4",
510
- * "uniVer": "√",
511
- * "unixVer": "3.98"
512
- * },
513
- * "ios": {
514
- * "osVer": "12.0",
515
- * "uniVer": "√",
516
- * "unixVer": "4.18"
517
- * }
518
- * },
519
- * "web": {
520
- * "uniVer": "x",
521
- * "unixVer": "x"
522
- * }
523
- * }
524
- */
525
- delay? : number | null,
526
- /**
527
- * 推送消息的图标
528
- * @defaultValue null
529
- * @uniPlatform {
530
- * "app": {
531
- * "android": {
532
- * "osVer": "4.4",
533
- * "uniVer": "√",
534
- * "unixVer": "3.98"
535
- * },
536
- * "ios": {
537
- * "osVer": "12.0",
538
- * "uniVer": "x",
539
- * "unixVer": "x"
540
- * }
541
- * },
542
- * "web": {
543
- * "uniVer": "x",
544
- * "unixVer": "x"
545
- * }
546
- * }
547
- */
548
- icon? : string | null,
549
- /**
550
- * 推送消息的提示音
551
- * - system: 使用系统通知提示音(默认值)
552
- * - none: 不使用提示音
553
- * @type 'system' | 'none'
554
- * @defaultValue "system"
555
- * @uniPlatform {
556
- * "app": {
557
- * "android": {
558
- * "osVer": "4.4",
559
- * "uniVer": "√",
560
- * "unixVer": "3.98"
561
- * },
562
- * "ios": {
563
- * "osVer": "12.0",
564
- * "uniVer": "√",
565
- * "unixVer": "4.18"
566
- * }
567
- * },
568
- * "web": {
569
- * "uniVer": "x",
570
- * "unixVer": "x"
571
- * }
572
- * }
573
- */
574
- sound? : string | null,
575
- /**
576
- * 推送消息的标题
577
- * @defaultValue App的名称
578
- * @uniPlatform {
579
- * "app": {
580
- * "android": {
581
- * "osVer": "4.4",
582
- * "uniVer": "",
583
- * "unixVer": "3.98"
584
- * },
585
- * "ios": {
586
- * "osVer": "12.0",
587
- * "uniVer": "√",
588
- * "unixVer": "4.18"
589
- * }
590
- * },
591
- * "web": {
592
- * "uniVer": "x",
593
- * "unixVer": "x"
594
- * }
595
- * }
596
- */
597
- title? : string | null,
598
- /**
599
- * 消息显示的内容,在系统通知中心中显示的文本内容
600
- *
601
- * @uniPlatform {
602
- * "app": {
603
- * "android": {
604
- * "osVer": "4.4",
605
- * "uniVer": "√",
606
- * "unixVer": "3.98"
607
- * },
608
- * "ios": {
609
- * "osVer": "12.0",
610
- * "uniVer": "√",
611
- * "unixVer": "4.18"
612
- * }
613
- * },
614
- * "web": {
615
- * "uniVer": "x",
616
- * "unixVer": "x"
617
- * }
618
- * }
619
- */
620
- content : string,
621
- /**
622
- * 消息承载的数据,可根据业务逻辑自定义数据格式
623
- * @defaultValue null
624
- * @uniPlatform {
625
- * "app": {
626
- * "android": {
627
- * "osVer": "4.4",
628
- * "uniVer": "√",
629
- * "unixVer": "3.98"
630
- * },
631
- * "ios": {
632
- * "osVer": "12.0",
633
- * "uniVer": "√",
634
- * "unixVer": "4.18"
635
- * }
636
- * },
637
- * "web": {
638
- * "uniVer": "x",
639
- * "unixVer": "x"
640
- * }
641
- * }
642
- */
643
- payload? : any | null,
644
- /**
645
- * 消息上显示的提示时间
646
- * @defaultValue 当前时间
647
- *
648
- * @uniPlatform {
649
- * "app": {
650
- * "android": {
651
- * "osVer": "4.4",
652
- * "uniVer": "√",
653
- * "unixVer": "3.98"
654
- * },
655
- * "ios": {
656
- * "osVer": "12.0",
657
- * "uniVer": "x",
658
- * "unixVer": "x"
659
- * }
660
- * },
661
- * "web": {
662
- * "uniVer": "x",
663
- * "unixVer": "x"
664
- * }
665
- * }
666
- */
667
- when? : number | null,
668
- /**
669
- * 渠道id
670
- * @defaultValue "DcloudChannelID"
671
- * @uniPlatform {
672
- * "app": {
673
- * "android": {
674
- * "osVer": "4.4",
675
- * "uniVer": "√",
676
- * "unixVer": "3.98"
677
- * },
678
- * "ios": {
679
- * "osVer": "12.0",
680
- * "uniVer": "x",
681
- * "unixVer": "x"
682
- * }
683
- * },
684
- * "web": {
685
- * "uniVer": "x",
686
- * "unixVer": "x"
687
- * }
688
- * }
689
- */
690
- channelId? : string | null,
691
- /**
692
- * 通知类别
693
- * @defaultValue null
694
- * @uniPlatform {
695
- * "app": {
696
- * "android": {
697
- * "osVer": "4.4",
698
- * "uniVer": "√",
699
- * "unixVer": "3.98"
700
- * },
701
- * "ios": {
702
- * "osVer": "12.0",
703
- * "uniVer": "x",
704
- * "unixVer": "x"
705
- * }
706
- * },
707
- * "web": {
708
- * "uniVer": "x",
709
- * "unixVer": "x"
710
- * }
711
- * }
712
- */
713
- category? : string | null,
714
- /**
715
- * 接口调用成功的回调函数
716
- * @defaultValue null
717
- */
718
- success ?: CreatePushMessageSuccessCallback | null,
719
- /**
720
- * 接口调用失败的回调函数
721
- * @defaultValue null
722
- */
723
- fail ?: CreatePushMessageFailCallback | null,
724
- /**
725
- * 接口调用结束的回调函数(调用成功、失败都会执行)
726
- * @defaultValue null
727
- */
728
- complete ?: CreatePushMessageCompleteCallback | null
729
- };
730
-
731
-
732
- export type BadgeOptions = {
733
- /**
734
- * 消息的标题
735
- * @defaultValue 应用的名称
736
- * @uniPlatform {
737
- * "app": {
738
- * "android": {
739
- * "osVer": "4.4",
740
- * "uniVer": "x",
741
- * "unixVer": "4.25"
742
- * },
743
- * "ios": {
744
- * "osVer": "12.0",
745
- * "uniVer": "x",
746
- * "unixVer": "4.25"
747
- * }
748
- * },
749
- * "web": {
750
- * "uniVer": "x",
751
- * "unixVer": "x"
752
- * }
753
- * }
754
- */
755
- title ?: string | null,
756
- /**
757
- * 消息的内容
758
- * @defaultValue '您有x条未读消息',其中x未设置的角标数字值。
759
- * @uniPlatform {
760
- * "app": {
761
- * "android": {
762
- * "osVer": "4.4",
763
- * "uniVer": "x",
764
- * "unixVer": "4.25"
765
- * },
766
- * "ios": {
767
- * "osVer": "12.0",
768
- * "uniVer": "x",
769
- * "unixVer": "4.25"
770
- * }
771
- * },
772
- * "web": {
773
- * "uniVer": "x",
774
- * "unixVer": "x"
775
- * }
776
- * }
777
- */
778
- content ?: string | null
1
+ export interface Uni {
2
+ /**
3
+ * getPushClientId()
4
+ * @description
5
+ * 获取客户端唯一的推送标识
6
+ * @param {GetPushClientIdOptions}
7
+ * @return {void}
8
+ * @tutorial http://uniapp.dcloud.io/api/plugins/push.html#getpushclientid
9
+ * @uniPlatform {
10
+ * "app": {
11
+ * "android": {
12
+ * "osVer": "4.4",
13
+ * "uniVer": "√",
14
+ * "unixVer": "3.98"
15
+ * },
16
+ * "ios": {
17
+ * "osVer": "12.0",
18
+ * "uniVer": "√",
19
+ * "unixVer": "4.18"
20
+ * }
21
+ * },
22
+ * "web": {
23
+ * "uniVer": "x",
24
+ * "unixVer": "x"
25
+ * }
26
+ * }
27
+ * @example
28
+ ```typescript
29
+ uni.getPushClientId({
30
+ complete: (res: any) => {
31
+ console.log("getPushClientId complete => " + JSON.stringify(res));
32
+ }
33
+ });
34
+ ```
35
+ */
36
+ getPushClientId(options : GetPushClientIdOptions) : void;
37
+ /**
38
+ * onPushMessage()
39
+ * @description
40
+ * 启动监听推送消息事件
41
+ * @param {OnPushMessageCallback}
42
+ * @return {void}
43
+ * @tutorial http://uniapp.dcloud.io/api/plugins/push.html#onpushmessage
44
+ * @uniPlatform {
45
+ * "app": {
46
+ * "android": {
47
+ * "osVer": "4.4",
48
+ * "uniVer": "√",
49
+ * "unixVer": "3.98"
50
+ * },
51
+ * "ios": {
52
+ * "osVer": "12.0",
53
+ * "uniVer": "√",
54
+ * "unixVer": "4.18"
55
+ * }
56
+ * },
57
+ * "web": {
58
+ * "uniVer": "x",
59
+ * "unixVer": "x"
60
+ * }
61
+ * }
62
+ * @example
63
+ ```typescript
64
+ uni.onPushMessage((res : OnPushMessageCallbackResult) => {
65
+ console.log("onPushMessage => " + JSON.stringify(res))
66
+ });
67
+ ```
68
+ */
69
+ onPushMessage(callback : OnPushMessageCallback) : void;
70
+ /**
71
+ * offPushMessage()
72
+ * @description
73
+ * 关闭推送消息监听事件,iOS端调用会关闭所有监听。
74
+ * @param {OnPushMessageCallback}
75
+ * @return {void}
76
+ * @tutorial http://uniapp.dcloud.io/api/plugins/push.html#offpushmessage
77
+ * @uniPlatform {
78
+ * "app": {
79
+ * "android": {
80
+ * "osVer": "4.4",
81
+ * "uniVer": "√",
82
+ * "unixVer": "3.98"
83
+ * },
84
+ * "ios": {
85
+ * "osVer": "12.0",
86
+ * "uniVer": "√",
87
+ * "unixVer": "4.18"
88
+ * }
89
+ * },
90
+ * "web": {
91
+ * "uniVer": "x",
92
+ * "unixVer": "x"
93
+ * }
94
+ * }
95
+ * @example
96
+ ```typescript
97
+ const cb = (res : OnPushMessageCallbackResult) => {
98
+ console.log("onPushMessage => " + JSON.stringify(res))
99
+ }
100
+ uni.offPushMessage(cb);
101
+ ```
102
+ */
103
+ offPushMessage(callback : OnPushMessageCallback) : void;
104
+ /**
105
+ * getChannelManager()
106
+ * @description
107
+ * 获取通知渠道管理器,Android 8系统以上才可以设置通知渠道,Android 8系统以下返回null,[通知渠道介绍](https://developer.android.com/develop/ui/views/notifications/channels?hl=zh-cn) ,iOS不支持。
108
+ * @deprecated 已废弃,仅为了向下兼容保留,建议使用`getPushChannelManager`。
109
+ * @param {void}
110
+ * @return {ChannelManager}
111
+ * @uniPlatform {
112
+ * "app": {
113
+ * "android": {
114
+ * "osVer": "4.4",
115
+ * "uniVer": "3.98",
116
+ * "unixVer": "3.98"
117
+ * },
118
+ * "ios": {
119
+ * "osVer": "x",
120
+ * "uniVer": "x",
121
+ * "unixVer": "x"
122
+ * }
123
+ * },
124
+ * "web": {
125
+ * "uniVer": "x",
126
+ * "unixVer": "x"
127
+ * }
128
+ * }
129
+ * @example
130
+ ```typescript
131
+ const channelManager = uni.getChannelManager();
132
+ channelManager.setPushChannel({
133
+ channelId: "test1",
134
+ channelDesc: "test1 desc",
135
+ soundName: "pushsound",
136
+ enableLights: true,
137
+ enableVibration: true,
138
+ importance: 4,
139
+ lockscreenVisibility: 1
140
+ })
141
+ const channels = channelManager.getAllChannels() as string[]
142
+ console.log("channels : " + channels);
143
+ ```
144
+ */
145
+ getChannelManager() : ChannelManager;
146
+
147
+ /**
148
+ * getPushChannelManager()
149
+ * @description
150
+ * 获取通知渠道管理器,Android 8系统以上才可以设置通知渠道,Android 8系统以下返回null,[通知渠道介绍](https://developer.android.com/develop/ui/views/notifications/channels?hl=zh-cn),iOS不支持。
151
+ * @param {void}
152
+ * @return {PushChannelManager}
153
+ * @uniPlatform {
154
+ * "app": {
155
+ * "android": {
156
+ * "osVer": "4.4",
157
+ * "uniVer": "4.25",
158
+ * "unixVer": "4.25"
159
+ * },
160
+ * "ios": {
161
+ * "osVer": "x",
162
+ * "uniVer": "x",
163
+ * "unixVer": "x"
164
+ * }
165
+ * },
166
+ * "web": {
167
+ * "uniVer": "x",
168
+ * "unixVer": "x"
169
+ * }
170
+ * }
171
+ * @example
172
+ ```typescript
173
+ const channelManager = uni.getPushChannelManager();
174
+ channelManager.setPushChannel({
175
+ channelId: "test1",
176
+ channelDesc: "test1 desc",
177
+ soundName: "pushsound",
178
+ enableLights: true,
179
+ enableVibration: true,
180
+ importance: 4,
181
+ lockscreenVisibility: 1
182
+ })
183
+ const channels = channelManager.getAllChannels() as string[]
184
+ console.log("channels : " + channels);
185
+ ```
186
+ */
187
+ getPushChannelManager() : PushChannelManager;
188
+
189
+ /**
190
+ * createPushMessage()
191
+ * @description
192
+ * 创建本地通知栏消息
193
+ * @param {CreatePushMessageOptions}
194
+ * @return {void}
195
+ * @tutorial http://uniapp.dcloud.io/api/plugins/push.html#createpushmessage
196
+ * @uniPlatform {
197
+ * "app": {
198
+ * "android": {
199
+ * "osVer": "4.4",
200
+ * "uniVer": "√",
201
+ * "unixVer": "3.98"
202
+ * },
203
+ * "ios": {
204
+ * "osVer": "12.0",
205
+ * "uniVer": "√",
206
+ * "unixVer": "4.18"
207
+ * }
208
+ * },
209
+ * "web": {
210
+ * "uniVer": "x",
211
+ * "unixVer": "x"
212
+ * }
213
+ * }
214
+ * @example
215
+ ```typescript
216
+ uni.createPushMessage({
217
+ title: "标题",
218
+ content: "您有新的消息",
219
+ cover:true,
220
+ channelId: "test1",
221
+ when:1697623177000,
222
+ icon:"/static/icon.png",
223
+ delay:5,
224
+ payload:{
225
+ pkey:"pvalue1"
226
+ },
227
+ channelId:"message",
228
+ category : "IM",
229
+ success(res : CreatePushMessageSuccess) {
230
+ console.log("res: " + res);
231
+ }
232
+ });
233
+ ```
234
+ */
235
+ createPushMessage(options : CreatePushMessageOptions) : void;
236
+
237
+ /**
238
+ * setAppBadgeNumber()
239
+ * @description 设置应用图标上显示的角标数字,注意:不同手机厂商的角标显示规则不同,有部分设备的rom版本不支持显示角标,另有部分rom需要在应用的通知管理里开启`桌面角标`配置,才可以设置角标成功。
240
+ * @param num - 要显示的角标数字值,参数为0则表示清除角标数字。
241
+ * @param options - 小米手机显示角标需要在系统消息中心显示一条通知,此参数用于设置通知的标题(title)和内容(content)。
242
+ * @return {void}
243
+ * @uniPlatform {
244
+ * "app": {
245
+ * "android": {
246
+ * "osVer": "5.0",
247
+ * "uniVer": "x",
248
+ * "unixVer": "4.25"
249
+ * },
250
+ * "ios": {
251
+ * "osVer": "12.0",
252
+ * "uniVer": "x",
253
+ * "unixVer": "4.25"
254
+ * }
255
+ * },
256
+ * "web": {
257
+ * "uniVer": "x",
258
+ * "unixVer": "x"
259
+ * }
260
+ * }
261
+ *
262
+ * @example
263
+ ```typescript
264
+ if (uni.getDeviceInfo().deviceBrand?.toLowerCase() == "xiaomi") {
265
+ uni.setAppBadgeNumber(1, {
266
+ title:"AppName",
267
+ content: "您有1条未读消息"
268
+ } as BadgeOptions)
269
+ } else {
270
+ uni.setAppBadgeNumber(5)
271
+ }
272
+ ```
273
+ */
274
+ setAppBadgeNumber(num : number, options ?: BadgeOptions | null) : void;
275
+ }
276
+
277
+ export type GetPushClientId = (options : GetPushClientIdOptions) => void;
278
+ export type GetPushClientIdSuccess = {
279
+ /**
280
+ * 个推客户端推送id,对应uni-id-device表的push_clientid
281
+ *
282
+ * @uniPlatform {
283
+ * "app": {
284
+ * "android": {
285
+ * "osVer": "4.4",
286
+ * "uniVer": "√",
287
+ * "unixVer": "3.98"
288
+ * },
289
+ * "ios": {
290
+ * "osVer": "12.0",
291
+ * "uniVer": "",
292
+ * "unixVer": "4.18"
293
+ * }
294
+ * },
295
+ * "web": {
296
+ * "uniVer": "x",
297
+ * "unixVer": "x"
298
+ * }
299
+ * }
300
+ */
301
+ cid : string,
302
+ /**
303
+ * 错误描述
304
+ *
305
+ * @uniPlatform {
306
+ * "app": {
307
+ * "android": {
308
+ * "osVer": "4.4",
309
+ * "uniVer": "√",
310
+ * "unixVer": "3.98"
311
+ * },
312
+ * "ios": {
313
+ * "osVer": "12.0",
314
+ * "uniVer": "√",
315
+ * "unixVer": "4.18"
316
+ * }
317
+ * },
318
+ * "web": {
319
+ * "uniVer": "x",
320
+ * "unixVer": "x"
321
+ * }
322
+ * }
323
+ */
324
+ errMsg : string
325
+ };
326
+ export type GetPushClientIdSuccessCallback = (result : GetPushClientIdSuccess) => void;
327
+ export type GetPushClientIdFail = UniError;
328
+ export type GetPushClientIdFailCallback = (result : GetPushClientIdFail) => void;
329
+ export type GetPushClientIdComplete = any;
330
+ export type GetPushClientIdCompleteCallback = (result : GetPushClientIdComplete) => void;
331
+ export type GetPushClientIdOptions = {
332
+ /**
333
+ * 接口调用成功的回调函数
334
+ * @defaultValue null
335
+ */
336
+ success ?: GetPushClientIdSuccessCallback | null,
337
+ /**
338
+ * 接口调用失败的回调函数
339
+ * @defaultValue null
340
+ */
341
+ fail ?: GetPushClientIdFailCallback | null,
342
+ /**
343
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
344
+ * @defaultValue null
345
+ */
346
+ complete ?: GetPushClientIdCompleteCallback | null
347
+ };
348
+ /**
349
+ * 事件类型
350
+ * - click 从系统推送服务点击消息启动应用事件
351
+ * - receive 应用从推送服务器接收到推送消息事件
352
+ */
353
+ export type OnPushMessageType = "click" | "receive";
354
+
355
+ export type OnPushMessageCallbackResult= {
356
+ /**
357
+ * 事件类型
358
+ * @type{OnPushMessageType}
359
+ *
360
+ * @uniPlatform {
361
+ * "app": {
362
+ * "android": {
363
+ * "osVer": "4.4",
364
+ * "uniVer": "√",
365
+ * "unixVer": "3.98"
366
+ * },
367
+ * "ios": {
368
+ * "osVer": "12.0",
369
+ * "uniVer": "",
370
+ * "unixVer": "4.18"
371
+ * }
372
+ * },
373
+ * "web": {
374
+ * "uniVer": "x",
375
+ * "unixVer": "x"
376
+ * }
377
+ * }
378
+ */
379
+ type : OnPushMessageType,
380
+ /**
381
+ * 消息内容
382
+ *
383
+ * @uniPlatform {
384
+ * "app": {
385
+ * "android": {
386
+ * "osVer": "4.4",
387
+ * "uniVer": "√",
388
+ * "unixVer": "3.98"
389
+ * },
390
+ * "ios": {
391
+ * "osVer": "12.0",
392
+ * "uniVer": "√",
393
+ * "unixVer": "4.18"
394
+ * }
395
+ * },
396
+ * "web": {
397
+ * "uniVer": "x",
398
+ * "unixVer": "x"
399
+ * }
400
+ * }
401
+ */
402
+ data : UTSJSONObject
403
+ };
404
+
405
+ export type OnPushMessageCallback = (result : OnPushMessageCallbackResult) => void;
406
+ export type OnPushMessage = (callback : OnPushMessageCallback) => void;
407
+ export type OffPushMessage = (callback : OnPushMessageCallback) => void;
408
+
409
+
410
+ export type GetChannelManager = () => ChannelManager;
411
+ export type SetPushChannelOptions = {
412
+ /**
413
+ * 添加的声音文件,注意raw目录下必须要有 ,不传此字段将使用默认铃音。
414
+ * @defaultValue null
415
+ */
416
+ soundName? : string | null,
417
+ /**
418
+ * 通知渠道id
419
+ */
420
+ channelId : string,
421
+ /**
422
+ * 通知渠道描述
423
+ */
424
+ channelDesc : string,
425
+ /**
426
+ * 呼吸灯闪烁
427
+ * @defaultValue false
428
+ */
429
+ enableLights? : boolean | null,
430
+ /**
431
+ * 震动
432
+ * @defaultValue false
433
+ */
434
+ enableVibration? : boolean | null,
435
+ /**
436
+ * 通知的重要性级别,可选范围IMPORTANCE_LOW:2、IMPORTANCE_DEFAULT:3、IMPORTANCE_HIGH:4 。
437
+ * @defaultValue 3
438
+ */
439
+ importance? : number | null,
440
+ /**
441
+ * 锁屏可见性,可选范围VISIBILITY_PRIVATE:0、VISIBILITY_PUBLIC:1、VISIBILITY_SECRET:-1、VISIBILITY_NO_OVERRIDE:-1000。
442
+ * @defaultValue -1000
443
+ */
444
+ lockscreenVisibility? : number | null
445
+ }
446
+
447
+ export interface ChannelManager {
448
+ /**
449
+ * 设置推送渠道
450
+ *
451
+ * @uniPlatform {
452
+ * "app": {
453
+ * "android": {
454
+ * "osVer": "4.4",
455
+ * "uniVer": "",
456
+ * "unixVer": "3.98"
457
+ * },
458
+ * "ios": {
459
+ * "osVer": "x",
460
+ * "uniVer": "x",
461
+ * "unixVer": "x"
462
+ * }
463
+ * },
464
+ * "web": {
465
+ * "uniVer": "x",
466
+ * "unixVer": "x"
467
+ * }
468
+ * }
469
+ */
470
+ setPushChannel(options : SetPushChannelOptions) : void;
471
+ /**
472
+ * 获取当前应用注册的所有的通知渠道。
473
+ *
474
+ * @uniPlatform {
475
+ * "app": {
476
+ * "android": {
477
+ * "osVer": "4.4",
478
+ * "uniVer": "√",
479
+ * "unixVer": "3.98"
480
+ * },
481
+ * "ios": {
482
+ * "osVer": "x",
483
+ * "uniVer": "x",
484
+ * "unixVer": "x"
485
+ * }
486
+ * },
487
+ * "web": {
488
+ * "uniVer": "x",
489
+ * "unixVer": "x"
490
+ * }
491
+ * }
492
+ */
493
+ getAllChannels() : Array<string>;
494
+ }
495
+
496
+ export type PushChannelManager = ChannelManager
497
+
498
+
499
+ export type CreatePushMessage = (options : CreatePushMessageOptions) => void;
500
+ export type CreatePushMessageSuccess = {};
501
+ export type CreatePushMessageSuccessCallback = (result : CreatePushMessageSuccess) => void;
502
+ export type CreatePushMessageFail = UniError;
503
+ export type CreatePushMessageFailCallback = (result : CreatePushMessageFail) => void;
504
+ export type CreatePushMessageComplete = any;
505
+ export type CreatePushMessageCompleteCallback = (result : CreatePushMessageComplete) => void;
506
+ export type CreatePushMessageOptions = {
507
+ /**
508
+ * 是否覆盖上一次提示的消息
509
+ * @type boolean
510
+ * @defaultValue false
511
+ * @uniPlatform {
512
+ * "app": {
513
+ * "android": {
514
+ * "osVer": "4.4",
515
+ * "uniVer": "√",
516
+ * "unixVer": "3.98"
517
+ * },
518
+ * "ios": {
519
+ * "osVer": "12.0",
520
+ * "uniVer": "",
521
+ * "unixVer": "4.18"
522
+ * }
523
+ * },
524
+ * "web": {
525
+ * "uniVer": "x",
526
+ * "unixVer": "x"
527
+ * }
528
+ * }
529
+ */
530
+ cover? : boolean | null,
531
+ /**
532
+ * 提示消息延迟显示的时间,单位为s
533
+ * @defaultValue 0
534
+ * @uniPlatform {
535
+ * "app": {
536
+ * "android": {
537
+ * "osVer": "4.4",
538
+ * "uniVer": "",
539
+ * "unixVer": "3.98"
540
+ * },
541
+ * "ios": {
542
+ * "osVer": "12.0",
543
+ * "uniVer": "",
544
+ * "unixVer": "4.18"
545
+ * }
546
+ * },
547
+ * "web": {
548
+ * "uniVer": "x",
549
+ * "unixVer": "x"
550
+ * }
551
+ * }
552
+ */
553
+ delay? : number | null,
554
+ /**
555
+ * 推送消息的图标
556
+ * @defaultValue null
557
+ * @uniPlatform {
558
+ * "app": {
559
+ * "android": {
560
+ * "osVer": "4.4",
561
+ * "uniVer": "√",
562
+ * "unixVer": "3.98"
563
+ * },
564
+ * "ios": {
565
+ * "osVer": "12.0",
566
+ * "uniVer": "x",
567
+ * "unixVer": "x"
568
+ * }
569
+ * },
570
+ * "web": {
571
+ * "uniVer": "x",
572
+ * "unixVer": "x"
573
+ * }
574
+ * }
575
+ */
576
+ icon? : string | null,
577
+ /**
578
+ * 推送消息的提示音
579
+ * - system: 使用系统通知提示音(默认值)
580
+ * - none: 不使用提示音
581
+ * @type 'system' | 'none'
582
+ * @defaultValue "system"
583
+ * @uniPlatform {
584
+ * "app": {
585
+ * "android": {
586
+ * "osVer": "4.4",
587
+ * "uniVer": "√",
588
+ * "unixVer": "3.98"
589
+ * },
590
+ * "ios": {
591
+ * "osVer": "12.0",
592
+ * "uniVer": "",
593
+ * "unixVer": "4.18"
594
+ * }
595
+ * },
596
+ * "web": {
597
+ * "uniVer": "x",
598
+ * "unixVer": "x"
599
+ * }
600
+ * }
601
+ */
602
+ sound? : string | null,
603
+ /**
604
+ * 推送消息的标题
605
+ * @defaultValue App的名称
606
+ * @uniPlatform {
607
+ * "app": {
608
+ * "android": {
609
+ * "osVer": "4.4",
610
+ * "uniVer": "√",
611
+ * "unixVer": "3.98"
612
+ * },
613
+ * "ios": {
614
+ * "osVer": "12.0",
615
+ * "uniVer": "",
616
+ * "unixVer": "4.18"
617
+ * }
618
+ * },
619
+ * "web": {
620
+ * "uniVer": "x",
621
+ * "unixVer": "x"
622
+ * }
623
+ * }
624
+ */
625
+ title? : string | null,
626
+ /**
627
+ * 消息显示的内容,在系统通知中心中显示的文本内容
628
+ *
629
+ * @uniPlatform {
630
+ * "app": {
631
+ * "android": {
632
+ * "osVer": "4.4",
633
+ * "uniVer": "√",
634
+ * "unixVer": "3.98"
635
+ * },
636
+ * "ios": {
637
+ * "osVer": "12.0",
638
+ * "uniVer": "",
639
+ * "unixVer": "4.18"
640
+ * }
641
+ * },
642
+ * "web": {
643
+ * "uniVer": "x",
644
+ * "unixVer": "x"
645
+ * }
646
+ * }
647
+ */
648
+ content : string,
649
+ /**
650
+ * 消息承载的数据,可根据业务逻辑自定义数据格式,在点击通知消息时`onPushMessage`回调中会返回此字段的数据。
651
+ * @defaultValue null
652
+ * @uniPlatform {
653
+ * "app": {
654
+ * "android": {
655
+ * "osVer": "4.4",
656
+ * "uniVer": "",
657
+ * "unixVer": "3.98"
658
+ * },
659
+ * "ios": {
660
+ * "osVer": "12.0",
661
+ * "uniVer": "√",
662
+ * "unixVer": "4.18"
663
+ * }
664
+ * },
665
+ * "web": {
666
+ * "uniVer": "x",
667
+ * "unixVer": "x"
668
+ * }
669
+ * }
670
+ */
671
+ payload? : any | null,
672
+ /**
673
+ * 消息上显示的提示时间,需要传入时间戳。
674
+ * @defaultValue 当前时间
675
+ *
676
+ * @uniPlatform {
677
+ * "app": {
678
+ * "android": {
679
+ * "osVer": "4.4",
680
+ * "uniVer": "",
681
+ * "unixVer": "3.98"
682
+ * },
683
+ * "ios": {
684
+ * "osVer": "x",
685
+ * "uniVer": "x",
686
+ * "unixVer": "x"
687
+ * }
688
+ * },
689
+ * "web": {
690
+ * "uniVer": "x",
691
+ * "unixVer": "x"
692
+ * }
693
+ * }
694
+ */
695
+ when? : number | null,
696
+ /**
697
+ * 渠道id,Android特有字段,[通知渠道介绍](https://developer.android.com/develop/ui/views/notifications/channels?hl=zh-cn),
698
+ * 创建通知渠道请使用`getPushChannelManager`获取PushChannelManager对象,调用`setPushChannel`方法配置渠道。
699
+ * @defaultValue "DcloudChannelID"
700
+ * @uniPlatform {
701
+ * "app": {
702
+ * "android": {
703
+ * "osVer": "4.4",
704
+ * "uniVer": "",
705
+ * "unixVer": "3.98"
706
+ * },
707
+ * "ios": {
708
+ * "osVer": "x",
709
+ * "uniVer": "x",
710
+ * "unixVer": "x"
711
+ * }
712
+ * },
713
+ * "web": {
714
+ * "uniVer": "x",
715
+ * "unixVer": "x"
716
+ * }
717
+ * }
718
+ */
719
+ channelId? : string | null,
720
+ /**
721
+ * 通知类别,Android特有字段,[通知渠道介绍](https://developer.android.com/develop/ui/views/notifications/channels?hl=zh-cn),
722
+ * 标识通知的类别,应用场景为对于离线推送厂商配置的支持,比如[华为消息分类](https://developer.huawei.com/consumer/cn/doc/HMSCore-Guides/message-classification-0000001149358835#section5101818813)
723
+ * @defaultValue null
724
+ * @uniPlatform {
725
+ * "app": {
726
+ * "android": {
727
+ * "osVer": "4.4",
728
+ * "uniVer": "√",
729
+ * "unixVer": "3.98"
730
+ * },
731
+ * "ios": {
732
+ * "osVer": "x",
733
+ * "uniVer": "x",
734
+ * "unixVer": "x"
735
+ * }
736
+ * },
737
+ * "web": {
738
+ * "uniVer": "x",
739
+ * "unixVer": "x"
740
+ * }
741
+ * }
742
+ */
743
+ category? : string | null,
744
+ /**
745
+ * 接口调用成功的回调函数
746
+ * @defaultValue null
747
+ */
748
+ success ?: CreatePushMessageSuccessCallback | null,
749
+ /**
750
+ * 接口调用失败的回调函数
751
+ * @defaultValue null
752
+ */
753
+ fail ?: CreatePushMessageFailCallback | null,
754
+ /**
755
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
756
+ * @defaultValue null
757
+ */
758
+ complete ?: CreatePushMessageCompleteCallback | null
759
+ };
760
+
761
+
762
+ export type BadgeOptions = {
763
+ /**
764
+ * 消息的标题
765
+ * @defaultValue 应用的名称
766
+ * @uniPlatform {
767
+ * "app": {
768
+ * "android": {
769
+ * "osVer": "4.4",
770
+ * "uniVer": "x",
771
+ * "unixVer": "4.25"
772
+ * },
773
+ * "ios": {
774
+ * "osVer": "12.0",
775
+ * "uniVer": "x",
776
+ * "unixVer": "4.25"
777
+ * }
778
+ * },
779
+ * "web": {
780
+ * "uniVer": "x",
781
+ * "unixVer": "x"
782
+ * }
783
+ * }
784
+ */
785
+ title ?: string | null,
786
+ /**
787
+ * 消息的内容
788
+ * @defaultValue '您有x条未读消息',其中x为设置的角标数字值。
789
+ * @uniPlatform {
790
+ * "app": {
791
+ * "android": {
792
+ * "osVer": "4.4",
793
+ * "uniVer": "x",
794
+ * "unixVer": "4.25"
795
+ * },
796
+ * "ios": {
797
+ * "osVer": "12.0",
798
+ * "uniVer": "x",
799
+ * "unixVer": "4.25"
800
+ * }
801
+ * },
802
+ * "web": {
803
+ * "uniVer": "x",
804
+ * "unixVer": "x"
805
+ * }
806
+ * }
807
+ */
808
+ content ?: string | null
779
809
  }