@dcloudio/uni-app-x 0.5.17 → 0.6.1

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 (117) hide show
  1. package/options.d.ts +9 -0
  2. package/package.json +4 -3
  3. package/types/app.d.ts +59 -166
  4. package/types/index.d.ts +1 -2
  5. package/types/native/AsyncApiResult.d.ts +1 -1
  6. package/types/native/CSSStyleDeclaration.d.ts +1 -1
  7. package/types/native/CustomEvent.d.ts +3 -3
  8. package/types/native/DOMRect.d.ts +2 -2
  9. package/types/native/DrawableContext.d.ts +149 -149
  10. package/types/native/Element.d.ts +11 -9
  11. package/types/native/Event.d.ts +38 -38
  12. package/types/native/IApp.d.ts +2 -2
  13. package/types/native/IComment.d.ts +5 -0
  14. package/types/native/IDocument.d.ts +5 -4
  15. package/types/native/INavigationBar.d.ts +1 -1
  16. package/types/native/IPage.d.ts +15 -10
  17. package/types/native/IPageManager.d.ts +2 -2
  18. package/types/native/ITextNode.d.ts +6 -0
  19. package/types/native/IUniError.d.ts +18 -18
  20. package/types/native/ImageErrorEvent.d.ts +2 -2
  21. package/types/native/ImageLoadEvent.d.ts +2 -2
  22. package/types/native/InputBlurEvent.d.ts +8 -8
  23. package/types/native/InputConfirmEvent.d.ts +8 -8
  24. package/types/native/InputEvent.d.ts +20 -20
  25. package/types/native/InputFocusEvent.d.ts +13 -13
  26. package/types/native/InputKeyboardHeightChangeEvent.d.ts +12 -12
  27. package/types/native/MouseEvent.d.ts +58 -58
  28. package/types/native/NestedPreScrollEvent.d.ts +41 -22
  29. package/types/native/NodeData.d.ts +2 -2
  30. package/types/native/PageEvent.d.ts +2 -2
  31. package/types/native/PageScrollEvent.d.ts +5 -5
  32. package/types/native/RefresherEvent.d.ts +2 -2
  33. package/types/native/ResizeEvent.d.ts +27 -27
  34. package/types/native/RichTextItemClickEvent.d.ts +2 -2
  35. package/types/native/ScrollEvent.d.ts +28 -28
  36. package/types/native/ScrollToLowerEvent.d.ts +6 -6
  37. package/types/native/ScrollToUpperEvent.d.ts +6 -6
  38. package/types/native/SnapshotOptions.d.ts +8 -8
  39. package/types/native/SourceError.d.ts +1 -1
  40. package/types/native/StartNestedScrollEvent.d.ts +26 -7
  41. package/types/native/StopNestedScrollEvent.d.ts +26 -0
  42. package/types/native/SwiperAnimationFinishEvent.d.ts +12 -6
  43. package/types/native/SwiperChangeEvent.d.ts +12 -6
  44. package/types/native/SwiperTransitionEvent.d.ts +12 -6
  45. package/types/native/TabTapEvent.d.ts +11 -9
  46. package/types/native/TextareaBlurEvent.d.ts +12 -12
  47. package/types/native/TextareaFocusEvent.d.ts +12 -12
  48. package/types/native/TextareaLineChangeEvent.d.ts +16 -16
  49. package/types/native/TouchEvent.d.ts +43 -43
  50. package/types/native/UTSAndroidHookProxy.d.ts +6 -6
  51. package/types/native/UniAggregateError.d.ts +4 -2
  52. package/types/native/UniAppManager.d.ts +3 -3
  53. package/types/native/UniElement.d.ts +30 -15
  54. package/types/native/UniError.d.ts +7 -7
  55. package/types/native/UniTabsElement.d.ts +4 -3
  56. package/types/native/UniTextElement.d.ts +3 -3
  57. package/types/native/UniVideoElement.d.ts +4 -4
  58. package/types/native/UniWebViewElement.d.ts +3 -3
  59. package/types/native/WebViewDownloadEvent.d.ts +3 -3
  60. package/types/native/WebViewErrorEvent.d.ts +3 -3
  61. package/types/native/WebViewLoadedEvent.d.ts +3 -3
  62. package/types/native/WebViewLoadingEvent.d.ts +4 -3
  63. package/types/native/WebViewMessageEvent.d.ts +3 -3
  64. package/types/native/WebViewStyles.d.ts +3 -3
  65. package/types/native/global.d.ts +262 -0
  66. package/types/native/index.d.ts +61 -58
  67. package/types/native-global/index.d.ts +1 -0
  68. package/types/page.d.ts +26 -8
  69. package/types/uni/core/index.d.ts +3 -3
  70. package/types/uni/core/lib/base/event/index.d.ts +1 -0
  71. package/types/uni/core/lib/base/interceptor/index.d.ts +1 -0
  72. package/types/uni/core/lib/lifecycle/index.d.ts +1 -0
  73. package/types/uni/core/lib/performance/index.d.ts +1 -0
  74. package/types/uni/core/lib/route/index.d.ts +13 -0
  75. package/types/uni/core/lib/route/interface.d.ts +31 -5
  76. package/types/uni/core/lib/ui/create-selector-query/index.d.ts +1 -0
  77. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +1 -0
  78. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +1 -1
  79. package/types/uni/core/lib/ui/load-font-face/index.d.ts +1 -0
  80. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +1 -0
  81. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +1 -1
  82. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +1 -0
  83. package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +5 -0
  84. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +9 -1
  85. package/types/uni/core/lib/ui/set-navigation-bar-title/index.d.ts +5 -0
  86. package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +10 -1
  87. package/types/uni/core/lib/ui/tab-bar/index.d.ts +1 -0
  88. package/types/uni/uts-plugin-api/index.d.ts +1 -0
  89. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +1 -0
  90. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +2 -2
  91. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +1 -0
  92. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +1 -0
  93. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +1 -0
  94. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +1 -0
  95. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +1 -0
  96. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +1 -0
  97. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +1 -0
  98. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +1 -0
  99. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +1 -0
  100. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +1 -0
  101. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +27 -6
  102. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +1 -0
  103. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +1 -0
  104. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +1 -0
  105. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +1 -0
  106. package/types/uni/uts-plugin-api/lib/uni-push/utssdk/index.d.ts +1 -0
  107. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +1 -0
  108. package/types/uni/uts-plugin-api/lib/uni-verify/utssdk/index.d.ts +46 -0
  109. package/types/uni/uts-plugin-api/lib/uni-verify/utssdk/interface.d.ts +201 -0
  110. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +1 -0
  111. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +1 -0
  112. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +3 -3
  113. package/types/uni/uts-plugin-modules/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -0
  114. package/types/uni/uts-plugin-modules/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +88 -13
  115. package/types/vue/UniCloudDBElement.d.ts +1 -1
  116. package/uts-plugin.d.ts +17 -4
  117. package/types/shims-vue.d.ts +0 -14
@@ -1,4 +1,7 @@
1
+ // 本文件为自动构建生成
1
2
  import {
3
+ SetNavigationBarColorErrorCode as SetNavigationBarColorErrorCodeOrigin,
4
+ SetNavigationBarColorError as SetNavigationBarColorErrorOrigin,
2
5
  SetNavigationBarColorOptions as SetNavigationBarColorOptionsOrigin,
3
6
  SetNavigationBarColorSuccess as SetNavigationBarColorSuccessOrigin,
4
7
  SetNavigationBarColorSuccessCallback as SetNavigationBarColorSuccessCallbackOrigin,
@@ -11,6 +14,8 @@ import {
11
14
  } from './interface'
12
15
 
13
16
  declare global {
17
+ type SetNavigationBarColorErrorCode = SetNavigationBarColorErrorCodeOrigin
18
+ type SetNavigationBarColorError = SetNavigationBarColorErrorOrigin
14
19
  type SetNavigationBarColorOptions = SetNavigationBarColorOptionsOrigin
15
20
  type SetNavigationBarColorSuccess = SetNavigationBarColorSuccessOrigin
16
21
  type SetNavigationBarColorSuccessCallback = SetNavigationBarColorSuccessCallbackOrigin
@@ -1,4 +1,12 @@
1
1
  import { AsyncApiSuccessResult } from '../../interface'
2
+ /**
3
+ * 设置导航栏字体颜色错误码
4
+ * - 4: 框架内部异常
5
+ */
6
+ export type SetNavigationBarColorErrorCode = 4
7
+ export interface SetNavigationBarColorError extends IUniError {
8
+ errCode: SetNavigationBarColorErrorCode
9
+ }
2
10
 
3
11
  export type SetNavigationBarColorOptions = {
4
12
  /**
@@ -337,7 +345,7 @@ export type SetNavigationBarColorSuccessCallback = (
337
345
  result: SetNavigationBarColorSuccess
338
346
  ) => void
339
347
 
340
- export type SetNavigationBarColorFail = UniError
348
+ export type SetNavigationBarColorFail = SetNavigationBarColorError
341
349
  export type SetNavigationBarColorFailCallback = (
342
350
  error: SetNavigationBarColorFail
343
351
  ) => void
@@ -1,4 +1,7 @@
1
+ // 本文件为自动构建生成
1
2
  import {
3
+ SetNavigationBarTitleErrorCode as SetNavigationBarTitleErrorCodeOrigin,
4
+ SetNavigationBarTitleError as SetNavigationBarTitleErrorOrigin,
2
5
  SetNavigationBarTitleOptions as SetNavigationBarTitleOptionsOrigin,
3
6
  SetNavigationBarTitleSuccess as SetNavigationBarTitleSuccessOrigin,
4
7
  SetNavigationBarTitleSuccessCallback as SetNavigationBarTitleSuccessCallbackOrigin,
@@ -11,6 +14,8 @@ import {
11
14
  } from './interface'
12
15
 
13
16
  declare global {
17
+ type SetNavigationBarTitleErrorCode = SetNavigationBarTitleErrorCodeOrigin
18
+ type SetNavigationBarTitleError = SetNavigationBarTitleErrorOrigin
14
19
  type SetNavigationBarTitleOptions = SetNavigationBarTitleOptionsOrigin
15
20
  type SetNavigationBarTitleSuccess = SetNavigationBarTitleSuccessOrigin
16
21
  type SetNavigationBarTitleSuccessCallback = SetNavigationBarTitleSuccessCallbackOrigin
@@ -1,5 +1,14 @@
1
1
  import { AsyncApiSuccessResult } from '../../interface'
2
2
 
3
+ /**
4
+ * 设置导航栏标题错误码
5
+ * - 4: 框架内部异常
6
+ */
7
+ export type SetNavigationBarTitleErrorCode = 4
8
+ export interface SetNavigationBarTitleError extends IUniError {
9
+ errCode: SetNavigationBarTitleErrorCode
10
+ }
11
+
3
12
  export type SetNavigationBarTitleOptions = {
4
13
  /**
5
14
  * 页面标题
@@ -273,7 +282,7 @@ export type SetNavigationBarTitleSuccessCallback = (
273
282
  result: SetNavigationBarTitleSuccess
274
283
  ) => void
275
284
 
276
- export type SetNavigationBarTitleFail = UniError
285
+ export type SetNavigationBarTitleFail = SetNavigationBarTitleError
277
286
  export type SetNavigationBarTitleFailCallback = (
278
287
  error: SetNavigationBarTitleFail
279
288
  ) => void
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  SetTabBarBadgeSuccess as SetTabBarBadgeSuccessOrigin,
3
4
  SetTabBarBadgeSuccessCallback as SetTabBarBadgeSuccessCallbackOrigin,
@@ -1,4 +1,5 @@
1
1
  /// <reference path='./lib/uni-websocket/utssdk/index.d.ts' />
2
+ /// <reference path='./lib/uni-verify/utssdk/index.d.ts' />
2
3
  /// <reference path='./lib/uni-storage/utssdk/index.d.ts' />
3
4
  /// <reference path='./lib/uni-push/utssdk/index.d.ts' />
4
5
  /// <reference path='./lib/uni-prompt/utssdk/index.d.ts' />
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  CreateWebviewContext as CreateWebviewContextOrigin,
3
4
  WebviewContext as WebviewContextOrigin,
@@ -1,6 +1,6 @@
1
1
  import { ComponentPublicInstance } from 'vue';
2
2
 
3
- export type CreateWebviewContext = (webviewId : string.WebviewIdString, component : ComponentPublicInstance | null) => WebviewContext | null;
3
+ export type CreateWebviewContext = (webviewId : string.WebviewIdString, component ?: ComponentPublicInstance | null) => WebviewContext | null;
4
4
 
5
5
  export interface WebviewContext {
6
6
  /**
@@ -92,7 +92,7 @@ export interface Uni {
92
92
  * }
93
93
  * }
94
94
  * @uniVueVersion 2,3
95
- * @return {CreateWebviewContext} web-view组件上下文对象
95
+ * @return {WebviewContext} web-view组件上下文对象
96
96
  */
97
97
  createWebviewContext : CreateWebviewContext
98
98
  }
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  ExitSuccess as ExitSuccessOrigin,
3
4
  ExitErrorCode as ExitErrorCodeOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  GetAccessibilityInfo as GetAccessibilityInfoOrigin,
3
4
  Uni as UniOrigin
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  GetAppAuthorizeSetting as GetAppAuthorizeSettingOrigin,
3
4
  GetAppAuthorizeSettingResult as GetAppAuthorizeSettingResultOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  GetAppBaseInfoOptions as GetAppBaseInfoOptionsOrigin,
3
4
  GetAppBaseInfoResult as GetAppBaseInfoResultOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  GetDeviceInfoOptions as GetDeviceInfoOptionsOrigin,
3
4
  GetDeviceInfoResult as GetDeviceInfoResultOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  LocationErrorCode as LocationErrorCodeOrigin,
3
4
  IGetLocationFail as IGetLocationFailOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  GetNetworkType as GetNetworkTypeOrigin,
3
4
  GetNetworkTypeSuccess as GetNetworkTypeSuccessOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  GetSystemInfo as GetSystemInfoOrigin,
3
4
  GetSystemInfoSync as GetSystemInfoSyncOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  GetSystemSettingResult as GetSystemSettingResultOrigin,
3
4
  GetSystemSetting as GetSystemSettingOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  MediaErrorCode as MediaErrorCodeOrigin,
3
4
  IMediaError as IMediaErrorOrigin,
@@ -28,8 +28,18 @@ export type ChooseImageSuccess = {
28
28
  * 调用API的名称
29
29
  */
30
30
  errSubject : string,
31
+ /**
32
+ * 描述信息
33
+ */
31
34
  errMsg : string,
35
+ /**
36
+ * 图片的本地文件路径列表
37
+ * @type string | string []
38
+ */
32
39
  tempFilePaths : Array<string>,
40
+ /**
41
+ * 图片的本地文件列表
42
+ */
33
43
  tempFiles : any
34
44
  }
35
45
 
@@ -101,7 +111,13 @@ export type ChooseImageOptions = {
101
111
  export type ChooseImage = (options : ChooseImageOptions) => void
102
112
 
103
113
  export type PreviewImageSuccess = {
114
+ /**
115
+ * 调用API的名称
116
+ */
104
117
  errSubject : string,
118
+ /**
119
+ * 描述信息
120
+ */
105
121
  errMsg : string
106
122
  }
107
123
 
@@ -146,11 +162,7 @@ export type PreviewImageCompleteCallback = ChooseImageCompleteCallback
146
162
 
147
163
  export type PreviewImageOptions = {
148
164
  /**
149
- * 当前显示图片的链接,不填则默认为 urls 的第一张
150
- */
151
- count ?: string | null,
152
- /**
153
- * current 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张。App平台在 1.9.5至1.9.8之间,current为必填。不填会报错
165
+ * current 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张。
154
166
  * @type string | number
155
167
  */
156
168
  current ?: any | null,
@@ -172,7 +184,16 @@ export type PreviewImageOptions = {
172
184
  */
173
185
  loop ?: boolean | null,
174
186
  /**
175
- * 长按图片显示操作菜单,如不填默认为保存相册,1.9.5 起支持。
187
+ * 长按图片显示操作菜单,如不填默认为保存相册。
188
+ * @uniPlatform {
189
+ * "app": {
190
+ * "android": {
191
+ * "osVer": "4.4",
192
+ * "uniVer": "√",
193
+ * "unixVer": "x"
194
+ * }
195
+ * }
196
+ * }
176
197
  */
177
198
  longPressActions ?: LongPressActionsOptions | null,
178
199
  /**
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  Request as RequestOrigin,
3
4
  RequestOptions as RequestOptionsOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  Request as RequestOrigin,
3
4
  RequestOptions as RequestOptionsOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  OpenAppAuthorizeSetting as OpenAppAuthorizeSettingOrigin,
3
4
  OpenAppAuthorizeSettingSuccess as OpenAppAuthorizeSettingSuccessOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  ShowToastSuccess as ShowToastSuccessOrigin,
3
4
  ShowToastSuccessCallback as ShowToastSuccessCallbackOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  GetPushClientId as GetPushClientIdOrigin,
3
4
  GetPushClientIdSuccess as GetPushClientIdSuccessOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  SetStorageSuccess as SetStorageSuccessOrigin,
3
4
  SetStorageSuccessCallback as SetStorageSuccessCallbackOrigin,
@@ -0,0 +1,46 @@
1
+ // 本文件为自动构建生成
2
+ import {
3
+ GetUniverifyManager as GetUniverifyManagerOrigin,
4
+ UniverifyManager as UniverifyManagerOrigin,
5
+ PreLoginOptions as PreLoginOptionsOrigin,
6
+ LoginOptions as LoginOptionsOrigin,
7
+ UniverifyStyle as UniverifyStyleOrigin,
8
+ PreLoginSuccessCallback as PreLoginSuccessCallbackOrigin,
9
+ PreLoginFail as PreLoginFailOrigin,
10
+ PreLoginFailCallback as PreLoginFailCallbackOrigin,
11
+ PreLoginComplete as PreLoginCompleteOrigin,
12
+ PreLoginCompleteCallback as PreLoginCompleteCallbackOrigin,
13
+ LoginSuccess as LoginSuccessOrigin,
14
+ LoginSuccessCallback as LoginSuccessCallbackOrigin,
15
+ LoginFail as LoginFailOrigin,
16
+ LoginFailCallback as LoginFailCallbackOrigin,
17
+ LoginComplete as LoginCompleteOrigin,
18
+ LoginCompleteCallback as LoginCompleteCallbackOrigin,
19
+ UniverifyErrorCode as UniverifyErrorCodeOrigin,
20
+ UniverifyErrorCode as UniverifyErrorCodeOrigin,
21
+ InternalResponse as InternalResponseOrigin,
22
+ Uni as UniOrigin
23
+ } from './interface'
24
+
25
+ declare global {
26
+ type GetUniverifyManager = GetUniverifyManagerOrigin
27
+ type UniverifyManager = UniverifyManagerOrigin
28
+ type PreLoginOptions = PreLoginOptionsOrigin
29
+ type LoginOptions = LoginOptionsOrigin
30
+ type UniverifyStyle = UniverifyStyleOrigin
31
+ type PreLoginSuccessCallback = PreLoginSuccessCallbackOrigin
32
+ type PreLoginFail = PreLoginFailOrigin
33
+ type PreLoginFailCallback = PreLoginFailCallbackOrigin
34
+ type PreLoginComplete = PreLoginCompleteOrigin
35
+ type PreLoginCompleteCallback = PreLoginCompleteCallbackOrigin
36
+ type LoginSuccess = LoginSuccessOrigin
37
+ type LoginSuccessCallback = LoginSuccessCallbackOrigin
38
+ type LoginFail = LoginFailOrigin
39
+ type LoginFailCallback = LoginFailCallbackOrigin
40
+ type LoginComplete = LoginCompleteOrigin
41
+ type LoginCompleteCallback = LoginCompleteCallbackOrigin
42
+ type UniverifyErrorCode = UniverifyErrorCodeOrigin
43
+ type UniverifyErrorCode = UniverifyErrorCodeOrigin
44
+ type InternalResponse = InternalResponseOrigin
45
+ interface Uni extends UniOrigin { }
46
+ }
@@ -0,0 +1,201 @@
1
+ export interface Uni {
2
+ /**
3
+ * @description 获取一键登录管理对象
4
+ * @tutorial https://uniapp.dcloud.net.cn/univerify.html#univerifymanager
5
+ * @uniPlatform {
6
+ * "app": {
7
+ * "android": {
8
+ * "osVer": "4.4",
9
+ * "uniVer": "√",
10
+ * "unixVer": "3.99"
11
+ * },
12
+ * "ios": {
13
+ * "osVer": "9.0",
14
+ * "uniVer": "√",
15
+ * "unixVer": "x"
16
+ * }
17
+ * }
18
+ * }
19
+ */
20
+ getUniverifyManager : GetUniverifyManager
21
+ }
22
+
23
+ export type GetUniverifyManager = () => UniverifyManager
24
+
25
+ export interface UniverifyManager {
26
+ /**
27
+ * @description 预登录
28
+ * @uniPlatform {
29
+ * "app": {
30
+ * "android": {
31
+ * "osVer": "4.4",
32
+ * "uniVer": "√",
33
+ * "unixVer": "3.99"
34
+ * },
35
+ * "ios": {
36
+ * "osVer": "9.0",
37
+ * "uniVer": "√",
38
+ * "unixVer": "x"
39
+ * }
40
+ * }
41
+ * }
42
+ */
43
+ preLogin(options : PreLoginOptions) : void
44
+ /**
45
+ * @description 登录
46
+ * @uniPlatform {
47
+ * "app": {
48
+ * "android": {
49
+ * "osVer": "4.4",
50
+ * "uniVer": "√",
51
+ * "unixVer": "3.99"
52
+ * },
53
+ * "ios": {
54
+ * "osVer": "9.0",
55
+ * "uniVer": "√",
56
+ * "unixVer": "x"
57
+ * }
58
+ * }
59
+ * }
60
+ */
61
+ login(options : LoginOptions) : void
62
+ /**
63
+ * @description 关闭登录页
64
+ * @uniPlatform {
65
+ * "app": {
66
+ * "android": {
67
+ * "osVer": "4.4",
68
+ * "uniVer": "√",
69
+ * "unixVer": "3.99"
70
+ * },
71
+ * "ios": {
72
+ * "osVer": "9.0",
73
+ * "uniVer": "√",
74
+ * "unixVer": "x"
75
+ * }
76
+ * }
77
+ * }
78
+ */
79
+ close() : void
80
+ /**
81
+ * @description 预登录是否有效
82
+ * @uniPlatform {
83
+ * "app": {
84
+ * "android": {
85
+ * "osVer": "4.4",
86
+ * "uniVer": "√",
87
+ * "unixVer": "3.99"
88
+ * },
89
+ * "ios": {
90
+ * "osVer": "9.0",
91
+ * "uniVer": "√",
92
+ * "unixVer": "x"
93
+ * }
94
+ * }
95
+ * }
96
+ */
97
+ isPreLoginResultValid() : boolean
98
+ }
99
+
100
+ /**
101
+ * 预登录参数
102
+ */
103
+ export type PreLoginOptions = {
104
+ success ?: PreLoginSuccessCallback,
105
+ fail ?: PreLoginFailCallback,
106
+ complete ?: PreLoginCompleteCallback
107
+ }
108
+
109
+ /**
110
+ * 登录参数
111
+ */
112
+ export type LoginOptions = {
113
+ univerifyStyle ?: UniverifyStyle,
114
+ success ?: LoginSuccessCallback,
115
+ fail ?: LoginFailCallback,
116
+ complete ?: LoginCompleteCallback
117
+ }
118
+
119
+ /**
120
+ * 登录页样式
121
+ */
122
+ export type UniverifyStyle = {
123
+ /**
124
+ * 是否全屏
125
+ */
126
+ fullScreen ?: boolean,
127
+ /**
128
+ * logo路径
129
+ */
130
+ logoPath ?: string,
131
+ /**
132
+ * 登录页背景色
133
+ */
134
+ backgroundColor ?: string,
135
+ /**
136
+ * 登录按钮文字
137
+ */
138
+ loginBtnText ?: string
139
+ }
140
+
141
+ export type PreLoginSuccessCallback = () => void
142
+ export interface PreLoginFail extends IUniError {
143
+ errCode : UniverifyErrorCode
144
+ }
145
+ export type PreLoginFailCallback = (err : PreLoginFail) => void
146
+ export type PreLoginComplete = any;
147
+ export type PreLoginCompleteCallback = (res : PreLoginComplete) => void
148
+
149
+ export type LoginSuccess = {
150
+ /**
151
+ * 登录授权唯一标识
152
+ */
153
+ openid : string,
154
+ /**
155
+ * token
156
+ */
157
+ accessToken : string
158
+ }
159
+ export type LoginSuccessCallback = (res : LoginSuccess) => void
160
+ export interface LoginFail extends IUniError {
161
+ errCode : UniverifyErrorCode
162
+ }
163
+ export type LoginFailCallback = (err : LoginFail) => void
164
+ export type LoginComplete = any;
165
+ export type LoginCompleteCallback = (res : LoginComplete) => void
166
+
167
+ /**
168
+ * 30002 其他登录方式
169
+ * 30003 登录界面关闭
170
+ * 30004 其他错误
171
+ * 30005 预登录失败
172
+ * 30006 一键登录失败
173
+ */
174
+ // export type UniverifyErrorCode = 30002 | 30003 | 30004 | 30005 | 30006;
175
+ export type UniverifyErrorCode = 30004 | 30005 | 30006;
176
+
177
+ /**
178
+ * SDK响应数据结构
179
+ */
180
+ export type InternalResponse = {
181
+ /**
182
+ * 个验用户唯一标识
183
+ */
184
+ gyuid : string,
185
+ /**
186
+ * code 返回结果,30000为成功
187
+ */
188
+ code : number,
189
+ /**
190
+ * msg 返回结果详情,为json格式,包含errorCode、errorDesc、metadata、及其他业务自定义的字段
191
+ */
192
+ msg : string,
193
+ /**
194
+ * 请求的运营商,CM 移动、CT 电信、CU 联通
195
+ */
196
+ operator : string,
197
+ /**
198
+ * 接口请求是否成功
199
+ */
200
+ isSuccess : boolean
201
+ }
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  ConnectSocket as ConnectSocketOrigin,
3
4
  ConnectSocketSuccess as ConnectSocketSuccessOrigin,
@@ -1,3 +1,4 @@
1
+ // 本文件为自动构建生成
1
2
  import {
2
3
  CreateVideoContext as CreateVideoContextOrigin,
3
4
  Danmu as DanmuOrigin,
@@ -1,6 +1,6 @@
1
1
  import { ComponentPublicInstance } from 'vue';
2
2
 
3
- export type CreateVideoContext = (videoId : string.VideoIdString, component : ComponentPublicInstance | null) => VideoContext | null;
3
+ export type CreateVideoContext = (videoId : string.VideoIdString, component ?: ComponentPublicInstance | null) => VideoContext | null;
4
4
 
5
5
  export type Danmu = {
6
6
  /**
@@ -162,12 +162,12 @@ export interface Uni {
162
162
  * }
163
163
  * }
164
164
  * @uniVueVersion 2,3
165
- * @return {VideoContext} 视频对象
165
+ * @return {VideoContext} video组件上下文对象
166
166
  *
167
167
  * @tutorial http://uniapp.dcloud.io/api/media/video-context?id=createVideoContext
168
168
  *
169
169
  */
170
- createVideoContext(videoId : string, component ?: ComponentPublicInstance | null) : VideoContext | null
170
+ createVideoContext : CreateVideoContext
171
171
  }
172
172
 
173
173
  /**
@@ -1,5 +1,12 @@
1
+ // 本文件为自动构建生成
1
2
  import {
3
+ FacialRecognitionVerifyErrorCode as FacialRecognitionVerifyErrorCodeOrigin,
4
+ StartFacialRecognitionVerifyScreenOrientation as StartFacialRecognitionVerifyScreenOrientationOrigin,
5
+ IFacialRecognitionVerifyError as IFacialRecognitionVerifyErrorOrigin,
2
6
  StartFacialRecognitionVerifySuccess as StartFacialRecognitionVerifySuccessOrigin,
7
+ StartFacialRecognitionVerifySuccessCallback as StartFacialRecognitionVerifySuccessCallbackOrigin,
8
+ StartFacialRecognitionVerifyFailCallback as StartFacialRecognitionVerifyFailCallbackOrigin,
9
+ StartFacialRecognitionVerifyCompleteCallback as StartFacialRecognitionVerifyCompleteCallbackOrigin,
3
10
  StartFacialRecognitionVerifyOptions as StartFacialRecognitionVerifyOptionsOrigin,
4
11
  GetFacialRecognitionMetaInfo as GetFacialRecognitionMetaInfoOrigin,
5
12
  StartFacialRecognitionVerify as StartFacialRecognitionVerifyOrigin,
@@ -7,7 +14,13 @@ import {
7
14
  } from './interface'
8
15
 
9
16
  declare global {
17
+ type FacialRecognitionVerifyErrorCode = FacialRecognitionVerifyErrorCodeOrigin
18
+ type StartFacialRecognitionVerifyScreenOrientation = StartFacialRecognitionVerifyScreenOrientationOrigin
19
+ type IFacialRecognitionVerifyError = IFacialRecognitionVerifyErrorOrigin
10
20
  type StartFacialRecognitionVerifySuccess = StartFacialRecognitionVerifySuccessOrigin
21
+ type StartFacialRecognitionVerifySuccessCallback = StartFacialRecognitionVerifySuccessCallbackOrigin
22
+ type StartFacialRecognitionVerifyFailCallback = StartFacialRecognitionVerifyFailCallbackOrigin
23
+ type StartFacialRecognitionVerifyCompleteCallback = StartFacialRecognitionVerifyCompleteCallbackOrigin
11
24
  type StartFacialRecognitionVerifyOptions = StartFacialRecognitionVerifyOptionsOrigin
12
25
  type GetFacialRecognitionMetaInfo = GetFacialRecognitionMetaInfoOrigin
13
26
  type StartFacialRecognitionVerify = StartFacialRecognitionVerifyOrigin