@ftvs/jssdk 1.4.0 → 1.4.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.
- package/README.md +2 -0
- package/lib/index.d.ts +46 -2
- package/lib/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -268,6 +268,38 @@ interface GetTokenResult {
|
|
|
268
268
|
*/
|
|
269
269
|
declare function getAuthToken(): Promise<GetTokenResult>;
|
|
270
270
|
|
|
271
|
+
interface GetAuthUserInfoResult {
|
|
272
|
+
/**
|
|
273
|
+
* 昵称
|
|
274
|
+
*/
|
|
275
|
+
username: string;
|
|
276
|
+
/**
|
|
277
|
+
* 用户头像
|
|
278
|
+
*/
|
|
279
|
+
avatar: string;
|
|
280
|
+
/**
|
|
281
|
+
* 实名状态
|
|
282
|
+
* 0-未实名
|
|
283
|
+
* 1-已实名
|
|
284
|
+
*/
|
|
285
|
+
authStatus: number;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* 用户基本信息(多彩未来内部使用)。
|
|
289
|
+
* @category 开放接口 > 用户信息
|
|
290
|
+
* @example
|
|
291
|
+
* ```javascript
|
|
292
|
+
* const res = await ftv.getAuthUserInfo();
|
|
293
|
+
* // 结果类似:
|
|
294
|
+
* // {
|
|
295
|
+
* // username: '张三’
|
|
296
|
+
* // avatar: 'https://www.dcwl.tv/xxxxx.png’
|
|
297
|
+
* // username: 1
|
|
298
|
+
* // }
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
declare function getAuthUserInfo(): Promise<GetAuthUserInfoResult>;
|
|
302
|
+
|
|
271
303
|
interface Environment {
|
|
272
304
|
/**
|
|
273
305
|
* 是否在未来电视客户端中。
|
|
@@ -441,15 +473,21 @@ interface NavigateToPayLoad {
|
|
|
441
473
|
*/
|
|
442
474
|
declare function navigateTo(payload: NavigateToPayLoad): Promise<void>;
|
|
443
475
|
|
|
476
|
+
interface OpenLoginPagePayLoad {
|
|
477
|
+
/**
|
|
478
|
+
* 登录页按返回按键是否关闭当前的web
|
|
479
|
+
*/
|
|
480
|
+
isCloseCurrentWindow?: boolean;
|
|
481
|
+
}
|
|
444
482
|
/**
|
|
445
483
|
* 去登录页。
|
|
446
484
|
* @category 基础
|
|
447
485
|
* @example
|
|
448
486
|
* ```javascript
|
|
449
|
-
* await ftv.openLoginPage();
|
|
487
|
+
* await ftv.openLoginPage({isCloseCurrentWindow: true});
|
|
450
488
|
* ```
|
|
451
489
|
*/
|
|
452
|
-
declare function openLoginPage(): Promise<void>;
|
|
490
|
+
declare function openLoginPage(payload?: OpenLoginPagePayLoad): Promise<void>;
|
|
453
491
|
|
|
454
492
|
interface RequestFaceAuthenticationPayload {
|
|
455
493
|
/**
|
|
@@ -641,6 +679,8 @@ type _ftv_GetAuthCodeResult = GetAuthCodeResult;
|
|
|
641
679
|
declare const _ftv_getAuthCode: typeof getAuthCode;
|
|
642
680
|
type _ftv_GetTokenResult = GetTokenResult;
|
|
643
681
|
declare const _ftv_getAuthToken: typeof getAuthToken;
|
|
682
|
+
type _ftv_GetAuthUserInfoResult = GetAuthUserInfoResult;
|
|
683
|
+
declare const _ftv_getAuthUserInfo: typeof getAuthUserInfo;
|
|
644
684
|
declare const _ftv_getEnv: typeof getEnv;
|
|
645
685
|
type _ftv_Environment = Environment;
|
|
646
686
|
declare const _ftv_getEnvSync: typeof getEnvSync;
|
|
@@ -650,6 +690,7 @@ declare const _ftv_getUserInfo: typeof getUserInfo;
|
|
|
650
690
|
declare const _ftv_navigateBack: typeof navigateBack;
|
|
651
691
|
type _ftv_NavigateToPayLoad = NavigateToPayLoad;
|
|
652
692
|
declare const _ftv_navigateTo: typeof navigateTo;
|
|
693
|
+
type _ftv_OpenLoginPagePayLoad = OpenLoginPagePayLoad;
|
|
653
694
|
declare const _ftv_openLoginPage: typeof openLoginPage;
|
|
654
695
|
type _ftv_RequestFaceAuthenticationPayload = RequestFaceAuthenticationPayload;
|
|
655
696
|
type _ftv_RequestFaceAuthenticationResult = RequestFaceAuthenticationResult;
|
|
@@ -680,6 +721,8 @@ declare namespace _ftv {
|
|
|
680
721
|
_ftv_getAuthCode as getAuthCode,
|
|
681
722
|
_ftv_GetTokenResult as GetTokenResult,
|
|
682
723
|
_ftv_getAuthToken as getAuthToken,
|
|
724
|
+
_ftv_GetAuthUserInfoResult as GetAuthUserInfoResult,
|
|
725
|
+
_ftv_getAuthUserInfo as getAuthUserInfo,
|
|
683
726
|
_ftv_getEnv as getEnv,
|
|
684
727
|
_ftv_Environment as Environment,
|
|
685
728
|
_ftv_getEnvSync as getEnvSync,
|
|
@@ -689,6 +732,7 @@ declare namespace _ftv {
|
|
|
689
732
|
_ftv_navigateBack as navigateBack,
|
|
690
733
|
_ftv_NavigateToPayLoad as NavigateToPayLoad,
|
|
691
734
|
_ftv_navigateTo as navigateTo,
|
|
735
|
+
_ftv_OpenLoginPagePayLoad as OpenLoginPagePayLoad,
|
|
692
736
|
_ftv_openLoginPage as openLoginPage,
|
|
693
737
|
_ftv_RequestFaceAuthenticationPayload as RequestFaceAuthenticationPayload,
|
|
694
738
|
_ftv_RequestFaceAuthenticationResult as RequestFaceAuthenticationResult,
|